cloudroam
2025-03-28 cef2bb0eeeb91a22860cf5d23c7348af1ba921dc
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
<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
      class="readonly-form"
    ></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"
          min-width="150"
          fixed="left"
        ></el-table-column>
        <el-table-column
          label="级别"
          prop="flowerLevelStr"
          min-width="80"
        ></el-table-column>
        <el-table-column
          label="结算单价(元)"
          prop="price"
          min-width="120"
        ></el-table-column>
        <el-table-column
          label="数量"
          prop="num"
          min-width="120"
        ></el-table-column>
        <el-table-column
          label="结算合计(元)"
          prop="totalAmount"
          min-width="120"
        ></el-table-column>
        <el-table-column
          label="降级扣款(元)"
          prop="checkFee"
          min-width="120"
        ></el-table-column>
        <el-table-column
          label="缺货扣款(元)"
          prop="lackFee"
          min-width="120"
        ></el-table-column>
        <el-table-column
          label="补货扣款(元)"
          prop="replaceFee"
          min-width="120"
        ></el-table-column>
        <el-table-column
          label="售后理赔(元)"
          prop="salesFee"
          min-width="120"
        ></el-table-column>
        <el-table-column
          label="集货站运费(元)"
          prop="stationFee"
          min-width="120"
        ></el-table-column>
        <el-table-column
          label="订单号"
          prop="orderNo"
          min-width="180"
          fixed="right"
        >
          <template #default="{ row }">
            <el-link
              href="javascript:void(0)"
              type="primary"
              @click.native="toOrderDetail(row)"
              >{{ row.orderNo }}</el-link
            >
          </template>
        </el-table-column>
        <el-table-column
          label="收货日期"
          prop="receiveTime"
          min-width="150"
          fixed="right"
        ></el-table-column>
        <el-table-column
          label="质检日期"
          prop="checkTime"
          min-width="150"
          fixed="right"
        ></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: 'userName', type: 'input' },
            { 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: 'checkFee', type: 'input', unit: '元' },
            { label: '缺货扣款:', id: 'lackFee', type: 'input', unit: '元' },
            {
              label: '补货扣款:',
              id: 'replaceFee',
              type: 'input',
              unit: '元',
            },
            { label: '售后理赔:', id: 'salesFee', type: 'input', unit: '元' },
            { label: '服务费:', id: 'serviceFee', type: 'input', unit: '元' },
            {
              label: '集货站运费:',
              id: 'stationFee',
              type: 'input',
              unit: '元',
            },
            {
              label: '结算金额:',
              id: 'settlementAmount',
              type: 'input',
              unit: '元',
            },
            { label: '结算类型:', id: 'typeStr', type: 'input' },
            { 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/settlement/list/view',
        { params: { id: this.$route.params.id } }
      )
      if (code === 0) {
        this.$refs.form.updateForm(data)
        this.goodsList = data?.details || []
      }
    },
    toOrderDetail(row) {
      if (row.orderId) {
        this.$router.push(`/order/list/${row.orderId}`)
      }
    },
  },
}
</script>
 
<style lang="scss" scoped>
.settlement-detail {
  .el-bus-title {
    margin-bottom: 10px;
  }
}
</style>