陶杰
2024-08-22 973662aeae3e7c788c14671d17c5962395141770
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<template>
  <div class="base-page-wrapper settlement-detail">
    <el-bus-title title="结算信息" size="small"></el-bus-title>
    <el-bus-form
      ref="form"
      label-width="auto"
      :content="formContent"
      readonly
    ></el-bus-form>
    <template v-if="goodsList && goodsList.length > 0">
      <el-bus-title
        title="结算商品明细"
        size="small"
        class="mt-20"
      ></el-bus-title>
      <el-table :data="goodsList">
        <el-table-column label="商品名称" prop="flowerName"></el-table-column>
        <el-table-column label="级别" prop="flowerLevelStr"></el-table-column>
        <el-table-column label="结算单价(元)" prop="price"></el-table-column>
        <el-table-column label="数量" prop="num"></el-table-column>
        <el-table-column
          label="结算合计(元)"
          prop="totalAmount"
        ></el-table-column>
        <el-table-column label="售后理赔(元)" prop="salesFee"></el-table-column>
      </el-table>
    </template>
    <div class="text-center mt-20">
      <el-button class="min-w-100" @click="goBack">返回</el-button>
    </div>
  </div>
</template>
 
<script>
export default {
  data() {
    return {
      goodsList: [],
      formContent: [
        {
          type: 'row',
          items: [
            { label: '订单数量:', id: 'orderNum', type: 'input' },
            { label: '买家数量:', id: 'customerNum', type: 'input' },
            { label: '商品数量:', id: 'flowerNum', type: 'input' },
            {
              label: '结算合计:',
              id: 'totalAmount',
              type: 'input',
              unit: '元',
            },
            { label: '结算均价:', id: 'price', type: 'input', unit: '元' },
            { label: '售后理赔:', id: 'salesFee', type: 'input', unit: '元' },
            {
              label: '结算金额:',
              id: 'settlementAmount',
              type: 'input',
              unit: '元',
            },
            { label: '结算状态:', id: 'statusStr', type: 'input' },
            { label: '结算时间:', id: 'transferTime', type: 'input' },
          ],
        },
      ],
    }
  },
  head() {
    return {
      title: '结算详情',
    }
  },
  mounted() {
    this.getDetail()
  },
  methods: {
    goBack() {
      this.$router.back()
    },
    async getDetail() {
      const { code, data } = await this.$elBusHttp.request(
        'flower/api/partner/settlement/list/view',
        { params: { id: this.$route.params.id } }
      )
      if (code === 0) {
        this.$refs.form.updateForm(data)
        this.goodsList = data?.details || []
      }
    },
  },
}
</script>
 
<style lang="scss" scoped>
.settlement-detail {
  .el-bus-title {
    margin-bottom: 10px;
  }
}
</style>