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
| <template>
| <div v-loading="wholeLoading" class="base-page-wrapper sale-detail">
| <el-bus-title title="订单信息" size="small"></el-bus-title>
| <el-bus-form
| ref="form"
| label-width="auto"
| :content="formContent"
| readonly
| ></el-bus-form>
| <div
| v-if="detail.imageListFormat && detail.imageListFormat.length > 0"
| class="mb-20"
| >
| <el-bus-title title="售后图片" size="small"></el-bus-title>
| <el-bus-upload
| :value="detail.imageListFormat"
| disabled
| list-type="picture-card"
| ></el-bus-upload>
| </div>
| <div v-if="detail.videoList && detail.videoList.length > 0" class="mb-20">
| <el-bus-title title="售后视频" size="small"></el-bus-title>
| <video
| v-for="(item, index) in detail.videoList"
| :key="index"
| controls
| width="300px"
| height="200"
| class="mr-20 mb-15"
| >
| <source :src="item" />
| </video>
| </div>
| <el-bus-title title="售后处理" size="small"></el-bus-title>
| <el-bus-form
| ref="auditForm"
| label-width="auto"
| :content="auditFormContent"
| :readonly="!editable"
| ></el-bus-form>
| <div class="text-center mt-20">
| <el-button class="min-w-100" @click="goBack">返回</el-button>
| </div>
| </div>
| </template>
|
| <script>
| import AfterSaleItems from '@/components/order/after-sale-items.vue'
| export default {
| data() {
| return {
| editable: false,
| detail: {},
| wholeLoading: false,
| loading: false,
| formContent: [
| {
| type: 'row',
| items: [
| { label: '订单号:', id: 'orderNo', type: 'input' },
| { label: '售后单号:', id: 'salesNo', type: 'input' },
| { label: '用户账号:', id: 'createName', type: 'input' },
| { label: '收货人:', id: 'customer', type: 'input' },
| { label: '收货人电话:', id: 'customerTel', type: 'input' },
| { label: '收货地址:', id: 'customerWholeAddress', type: 'input' },
| { label: '下单时间:', id: 'createTime', type: 'input' },
| { label: '订单金额:', id: 'totalOrderAmount', type: 'input' },
| { label: '售后状态:', id: 'statusStr', type: 'input' },
| { label: '售后理由:', id: 'reason', type: 'input', span: 24 },
| { label: '处理时间:', id: 'auditTime', type: 'input' },
| ],
| },
| ],
| auditFormContent: [
| {
| label: '处理意见:',
| id: 'auditStatus',
| type: 'bus-radio',
| el: {
| code: 'SALES_AUDIT_STATUS',
| },
| rules: { required: true, message: '请选择处理意见' },
| on: {
| change: (e, updateForm) => {
| updateForm({ auditRemarks: '' })
| },
| },
| str: true,
| },
| {
| label: '不通过原因:',
| id: 'auditRemarks',
| type: 'input',
| el: {
| type: 'textarea',
| rows: 6,
| },
| rules: {
| required: true,
| message: '请输入不通过原因',
| trigger: 'blur',
| },
| hidden: (row) => row.auditStatus !== 'REJECT',
| },
| {
| label: '',
| id: 'items',
| component: AfterSaleItems,
| forceDisabled: true,
| },
| ],
| }
| },
| head() {
| return {
| title: '售后详情',
| }
| },
| mounted() {
| this.getDetail()
| },
| methods: {
| goBack() {
| this.$router.back()
| },
| async getDetail() {
| this.wholeLoading = true
| const { code, data } = await this.$elBusHttp.request(
| 'flower/api/partner/sales/list/view',
| { params: { id: this.$route.params.id } }
| )
| if (code === 0 && data) {
| data.customerWholeAddress = `${data.customerProvince || ''}${
| data.customerCity || ''
| }${data.customerRegion || ''}${data.customerAddress || ''}`
| data.imageListFormat = Array.isArray(data.imageList)
| ? data.imageList.map((i) => ({ url: i }))
| : []
| this.detail = data || {}
| this.$refs.form.updateForm(data)
| this.$refs.auditForm.updateForm(data)
| }
| this.wholeLoading = false
| },
| },
| }
| </script>
|
| <style lang="scss" scoped>
| .sale-detail {
| .el-bus-title {
| margin-bottom: 10px;
| }
| }
| </style>
|
|