jufubao-base 1.0.222-beta1 → 1.0.222-beta2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,96 @@
1
+ <template>
2
+ <view class="order_info">
3
+ <view class="order_number">订单号:{{ orderNumber }}</view>
4
+ <view class="prod_list">
5
+ <view class="prod_item" v-for="(item, i) in list" :key="i">
6
+ <view class="prod_img">
7
+ <image :src="item.product_thumb" mode="aspectFit"></image>
8
+ </view>
9
+ <view class="prod_info">
10
+ <view class="prod_title">{{ item.product_name }}</view>
11
+ <view class="prod_number">申请数量:×{{ item.product_num }}</view>
12
+ </view>
13
+ <view v-if="showRadio" style="margin-left: 10rpx;">
14
+ <xd-radio></xd-radio>
15
+ </view>
16
+ </view>
17
+ </view>
18
+ </view>
19
+ </template>
20
+
21
+ <script>
22
+ import XdRadio from "@/components/XdRadio/XdRadio"
23
+ import XdNumber from "@/components/XdNumber/XdNumber";
24
+ export default {
25
+ components: {
26
+ XdRadio,
27
+ XdNumber
28
+ },
29
+ props: {
30
+ list: {
31
+ type: Array,
32
+ default() {
33
+ return []
34
+ }
35
+ },
36
+ orderNumber: {
37
+ type: String,
38
+ default: ""
39
+ },
40
+ showRadio: {
41
+ type: Boolean,
42
+ default: false
43
+ }
44
+ }
45
+ }
46
+ </script>
47
+
48
+ <style lang="less" scoped>
49
+ .order_info{
50
+ background-color: #FFFFFF;
51
+ margin-top: 20rpx;
52
+ border-radius: 16rpx;
53
+ font-size: 24rpx;
54
+ padding: 32rpx;
55
+ .order_number{
56
+ padding-bottom: 24rpx;
57
+ border-bottom: 1px solid #F2F2F2;
58
+ margin-bottom: 32rpx;
59
+ }
60
+ .prod_item{
61
+ display: flex;
62
+ align-items: center;
63
+ margin-bottom: 40rpx;
64
+ &:last-child{
65
+ margin-bottom: 0;
66
+ }
67
+ .prod_img{
68
+ width: 140rpx;
69
+ height: 140rpx;
70
+ border-radius: 16rpx;
71
+ background-color: #F0F0F0;
72
+ image{
73
+ width: 100%;
74
+ height: 100%;
75
+ }
76
+ }
77
+ .prod_info{
78
+ margin-left: 20rpx;
79
+ flex: 1;
80
+ align-self: stretch;
81
+ display: flex;
82
+ flex-direction: column;
83
+ justify-content: space-between;
84
+ .prod_title{
85
+ margin-bottom: 10rpx;
86
+ font-size: 28rpx;
87
+ color: #333333;
88
+ }
89
+ .prod_number{
90
+ color: #999999;
91
+ font-size: 24rpx;
92
+ }
93
+ }
94
+ }
95
+ }
96
+ </style>
@@ -6,51 +6,34 @@
6
6
  */
7
7
  module.exports = [
8
8
  {
9
- //设置方法名字当别忘记加上【模块名字】:After
10
- mapFnName: 'getAfterByIdFilmSquate',
11
- title: '获取电影广场列表',
12
- path: '/api/account/film/list-film-square',
9
+ mapFnName: "getAfterServiceOrder",
10
+ path: "/aftersale/v1/service-order/get",
11
+ title: "服务单详情",
13
12
  isRule: false,
14
13
  params: {
15
- last_key: ['当前页', 'Number', '必选'],
16
- page_size: ['每页数量', 'Number', '必选'],
14
+ service_order_id: ['服务单订单号', 'String', true],
17
15
  },
18
16
  isConsole: true,
19
17
  disabled: true,
20
18
  },
21
19
  {
22
- //设置方法名字当别忘记加上【模块名字】:After
23
- mapFnName: 'updateAfterFilmPaiqiDate',
24
- title: '更新排期',
25
- path: '/api/account/film/paiqi-date',
20
+ mapFnName: "delAfterServiceOrder",
21
+ path: "/aftersale/v1/service-order/del",
22
+ title: "删除服务单",
26
23
  isRule: false,
27
24
  params: {
28
- film_id: ['电影id', 'Number', '必选'],
29
- cinema_id: ['影院id', 'Number', '必选'],
25
+ service_order_id: ['服务单订单号', 'String', true],
30
26
  },
31
27
  isConsole: true,
32
28
  disabled: true,
33
29
  },
34
30
  {
35
- //设置方法名字当别忘记加上【模块名字】:After
36
- mapFnName: 'removeAfterFilmAddress',
37
- title: '删除我的配送地址',
38
- path: '/api/account/film/paiqi-date',
31
+ mapFnName: "cancelAfterServiceOrder",
32
+ path: "/aftersale/v1/service-order/cancel",
33
+ title: "服务单取消",
39
34
  isRule: false,
40
35
  params: {
41
- film_id: ['电影id', 'Number', '必选'],
42
- },
43
- isConsole: true,
44
- disabled: true,
45
- },
46
- {
47
- //设置方法名字当别忘记加上【模块名字】:After
48
- mapFnName: 'addAfterFilmcart',
49
- title: '添加购物车',
50
- path: '/api/account/film/paiqi-date',
51
- isRule: false,
52
- params: {
53
- film_id: ['电影id', 'Number', '必选'],
36
+ service_order_id: ['服务单订单号', 'String', true],
54
37
  },
55
38
  isConsole: true,
56
39
  disabled: true,
@@ -7,41 +7,7 @@ export default {
7
7
  style: [],
8
8
  content: (data) => {
9
9
  return [
10
- {
11
- label: '背景颜色:',
12
- ele: 'xd-color',
13
- valueKey: 'bgColor',
14
- value: data.bgColor || '',
15
- placeholder: '请输入占位框背景颜色',
16
- groupKey:'content',
17
- },
18
- {
19
- label: '选中路径:',
20
- groupKey:'advanced',
21
- className: 'input100',
22
- ele: 'xd-select-pages-path',
23
- valueKey: 'select-pages-path',
24
- value: data['select-pages-path'] || null,
25
- setting: {
26
- router: XdBus.getParentApi('getPagesTree')
27
- },
28
- },
29
- data.bgColor && {
30
- label: '高度:',
31
- ele: 'el-input',
32
- groupKey:'style',
33
- type: 'number',
34
- valueKey: 'height',
35
- value: data.height || 100,
36
- placeholder: '请输入占位框高度,单位像素,默认:10px',
37
- className: 'input60',
38
- },
39
- {
40
- label: '', //label
41
- groupKey:'advanced',
42
- ele: 'slot', //package 名称
43
- slot: 'is_reference',
44
- },
10
+
45
11
  ].filter(i=>i)
46
12
  },
47
13
  advanced: [],
@@ -13,31 +13,151 @@
13
13
  <view class="jfb-base-after-sales-detail__edit-icon" @click="delEdit">删除</view>
14
14
  </view>
15
15
  <!-- #endif -->
16
- <view class="jfb-base-after-sales-detail__body">
17
- <view>售后详情</view>
16
+ <view v-if="loaded" class="jfb-base-after-sales-detail__body" :style="{
17
+ minHeight: layoutInfo.bodyMinHeightRpx + 'rpx',
18
+ '--main-color': mainColor
19
+ }">
20
+ <view class="service_progress">
21
+ <view class="service_head">
22
+ <view>服务进度</view>
23
+ <view class="head_sub">服务单已提交申请,待平台受理</view>
24
+ </view>
25
+ <view class="service_step">
26
+ <template v-for="(step, i) in stepList">
27
+ <view v-if="step.key==='line'" :key="i" class="step_line"></view>
28
+ <view v-else class="step_item" :key="'1' + i">
29
+ <view>
30
+ <xd-font-icon v-if="step.is_finish" icon="icondui_fill" :size="28" color="#FFFFFF"></xd-font-icon>
31
+ <view v-else class="step_radio"></view>
32
+ </view>
33
+ <view class="step_text">{{ step.name }}</view>
34
+ </view>
35
+ </template>
36
+ </view>
37
+ </view>
38
+
39
+ <view style="margin-top: -100rpx;padding: 20rpx;">
40
+
41
+ <!-- 物流信息 -->
42
+ <view class="refund_section" v-if="logisticsInfo.length">
43
+ <view class="sec_title">物流信息</view>
44
+ <view class="sec_body">
45
+ <view class="sec_item" v-for="(item, i) in logisticsInfo" :key="i">
46
+ <view class="sec_l">
47
+ <view>{{item.label}}:</view>
48
+ <view style="color: #333333;">{{ item.value }}</view>
49
+ </view>
50
+ <view class="sec_r">
51
+ <view v-if="item.copy" class="_copy" @click="handleCopy(item.value)">复制</view>
52
+ </view>
53
+ </view>
54
+ </view>
55
+ </view>
56
+
57
+ <!-- 物流信息、退款明细 -->
58
+ <view class="refund_section" v-if="refundInfo.length">
59
+ <view class="sec_title">退款明细</view>
60
+ <view class="sec_body">
61
+ <view class="sec_item" v-for="(item, i) in refundInfo" :key="i">
62
+ <view class="sec_l">
63
+ <view>{{ item.label }}<text v-if="item.key !== 'price'">:</text></view>
64
+ <view v-if="item.key !== 'price'" style="color: #333333;">{{item.value}}</view>
65
+ </view>
66
+ <view class="sec_r">
67
+ <view v-if="item.key === 'price'">
68
+ <xd-unit
69
+ :price="item.value"
70
+ :isOld="false"
71
+ :fontSize="32"
72
+ iconSize="0.4"
73
+ ></xd-unit>
74
+ </view>
75
+ <view v-if="item.copy" class="_copy" @click="handleCopy(item.value)">复制</view>
76
+ </view>
77
+ </view>
78
+ </view>
79
+ </view>
80
+
81
+ <!-- 新商品 -->
82
+ <view v-if="newProductList.length" class="refund_section">
83
+ <view class="sec_title">
84
+ <view class="sec_tag _new">新商品</view>
85
+ </view>
86
+ <view class="sec_body">
87
+ <SecProd v-for="(item,i) in newProductList" :key="i" :item="item"></SecProd>
88
+ </view>
89
+ </view>
90
+
91
+ <view class="refund_section">
92
+ <!-- 换货展示 -->
93
+ <view v-if="after_sale_method==='exchange'" class="sec_title">
94
+ <view class="sec_tag _refund">退/换商品</view>
95
+ </view>
96
+ <view v-if="refundProductList.length" class="sec_title">
97
+ <SecProd v-for="(item, i) in refundProductList" :key="i" :item="item"></SecProd>
98
+ </view>
99
+ <view class="sec_body">
100
+ <view class="sec_item" v-for="(item, i) in orderInfoList" :key="i">
101
+ <view class="sec_l">
102
+ <view>{{item.label}}:</view>
103
+ <view v-if="item.key=='img'" class="img_list">
104
+ <view class="img_box" v-for="(img, ii) in item.value" :key="ii">
105
+ <image :src="img" mode="aspectFit"></image>
106
+ </view>
107
+ </view>
108
+ <view v-else class="sec_l_text" style="color: #333333;">{{item.value}}</view>
109
+ </view>
110
+ <view v-if="item.copy" class="sec_r" >
111
+ <view class="_copy" @click="handleCopy(item.value)">复制</view>
112
+ </view>
113
+ </view>
114
+ </view>
115
+ </view>
116
+ </view>
117
+ <view class="bottom_fixed">
118
+ <view class="opt_btn primary" @click="handleCancel">撤销</view>
119
+ <view class="opt_btn" @click="handleDel">删除</view>
120
+ </view>
18
121
  </view>
19
122
  </view>
20
123
  </template>
21
124
 
22
125
  <script>
23
126
  import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
127
+ import XdRadio from "@/components/XdRadio/XdRadio"
128
+ import XdUnit from "@/components/XdUnit/XdUnit"
129
+ import XdButton from "@/components/XdButton/XdButton"
130
+ import SecProd from "./secProd.vue"
24
131
  import { jfbRootExec } from "@/utils/xd.event";
25
132
  import JfbBaseAfterSalesDetailMixin from "./JfbBaseAfterSalesDetailMixin";
26
133
  import { getContainerPropsValue } from "@/utils/xd.base";
27
134
  import componentsMixins from "@/mixins/componentsMixins";
28
135
  import extsMixins from "@/mixins/extsMixins";
136
+ import getServiceUrl from "@/common/getServiceUrl";
29
137
  export default {
30
138
  name: "JfbBaseAfterSalesDetail",
31
139
  components: {
32
- XdFontIcon
140
+ XdFontIcon,
141
+ XdRadio,
142
+ XdUnit,
143
+ XdButton,
144
+ SecProd
33
145
  },
34
146
  mixins: [
35
147
  componentsMixins, extsMixins, JfbBaseAfterSalesDetailMixin
36
148
  ],
37
149
  data() {
38
150
  return {
39
-
151
+ stepList: [],
152
+ orderInfoList: [],
153
+ refundInfo: [],
154
+ logisticsInfo: [],
155
+ refundProductList: [],
156
+ newProductList: [],
40
157
  //todo
158
+ service_order_id: "",
159
+ after_sale_method: "",
160
+ loaded: false,
41
161
  }
42
162
  },
43
163
  watch: {
@@ -53,16 +173,8 @@
53
173
  },
54
174
  methods: {
55
175
  onJfbLoad(options) {
56
-
57
- // jfbRootExec('baiduUserLogin', {
58
-
59
- // vm: this,// data: {
60
-
61
- // account: 'gaoshiyong',// password: '123456789',// type: 3,// ...options
62
-
63
- // }
64
-
65
- // }).then().catch()
176
+ this.service_order_id = options.service_order_id;
177
+ this.p_getAfterServiceOrder();
66
178
  },
67
179
  /**
68
180
  * @description 监听事件变化
@@ -71,11 +183,137 @@
71
183
  init(container) {
72
184
 
73
185
  //this.bgcolor = getContainerPropsValue(container, 'content.bgcolor', '#fff');
74
-
75
186
  //this.height = getContainerPropsValue(container, 'content.height', 10);
76
187
  },
188
+ p_getAfterServiceOrder(){
189
+ this.$xdShowLoading({});
190
+ jfbRootExec("getAfterServiceOrder", {
191
+ vm: this,
192
+ data: {
193
+ service_order_id: this.service_order_id,
194
+ }
195
+ }).then(res => {
196
+ this.$xdHideLoading();
197
+ try{
198
+ var imgList = JSON.parse(res.refund_voucher);
199
+ imgList = imgList.map(item => {
200
+ return getServiceUrl(item)
201
+ })
202
+ }catch(e){imgList=[]}
203
+ this.orderInfoList = [
204
+ { label: "订单编号", value: res.main_order_id, copy: true },
205
+ { label: "工单编号", value: res.service_order_id, copy: true },
206
+ { label: "申请时间", value: this.$xdUniHelper.getDate( res["created_time"] * 1000 ).fullTime },
207
+ { label: "售后类型", value: res.after_sale_method_name },
208
+ { label: "申请原因", value: res.after_sale_type_name },
209
+ { label: "问题描述", value: res.customer_feedback },
210
+ { label: "凭证内容", value: imgList.length ? imgList : '无', key: imgList.length? "img" : ''}
211
+ ];
212
+ this.stepList = [
213
+ res.progress[0],
214
+ { key: "line"},
215
+ res.progress[1],
216
+ { key: "line"},
217
+ res.progress[2],
218
+ ]
219
+ //物流信息
220
+ if(res.express_info && res.express_info.express_number){
221
+ this.logisticsInfo = [
222
+ { label: "物流单号", value: res.express_info.express_number, copy: true },
223
+ { label: "快递公司", value: res.express_info.express_name }
224
+ ]
225
+ }
226
+ //退换货商品
227
+ this.refundProductList = res.product_list.map(item => {
228
+ item.thumb = getServiceUrl(item.thumb, 'size2');
229
+ return item;
230
+ })
231
+ //新商品
232
+ this.newProductList = res.new_product_list.map(item => {
233
+ item.thumb = getServiceUrl(item.thumb, 'size2');
234
+ return item;
235
+ })
236
+ //售后类型
237
+ this.after_sale_method = res.after_sale_method;
238
+ //退款明细
239
+ this.refundInfo = res.refund_settlement.map(item => {
240
+ item.label = item.pay_info || item.pay_name;
241
+ item.value = item.pay_price;
242
+ item.key = 'price';
243
+ return item;
244
+ });
245
+
246
+ this.loaded = true;
247
+ })
248
+ },
249
+ handleCopy(text){
250
+ uni.setClipboardData({
251
+ data: text,
252
+ success: function () {
253
+ uni.showToast({
254
+ title: '复制成功',
255
+ icon: "none"
256
+ });
257
+ }
258
+ });
259
+
260
+ },
261
+ handleCancel(){
262
+ this.$xdConfirm({
263
+ styles: this.styles,
264
+ title: "提示",
265
+ width: '90%',
266
+ content: '确定撤销当前工单吗?',
267
+ confirmText: '确认',
268
+ isHtml: true,
269
+ cancelText: '取消',
270
+ showClose: false,
271
+ success: (res) => {
272
+ if (res.confirm) {
273
+ jfbRootExec("cancelAfterServiceOrder", {
274
+ vm: this,
275
+ data: {
276
+ service_order_id: this.service_order_id
277
+ }
278
+ }).then(res => {
279
+
280
+ })
281
+ }
282
+ else{
283
+ console.log('取消')
284
+ }
285
+ }
286
+ })
287
+ },
288
+ handleDel(){
289
+ this.$xdConfirm({
290
+ styles: this.styles,
291
+ title: "提示",
292
+ width: '90%',
293
+ content: '确定删除当前工单吗?',
294
+ confirmText: '确认',
295
+ isHtml: true,
296
+ cancelText: '取消',
297
+ showClose: false,
298
+ success: (res) => {
299
+ if (res.confirm) {
300
+ jfbRootExec("delAfterServiceOrder", {
301
+ vm: this,
302
+ data:{
303
+ service_order_id: this.service_order_id
304
+ }
305
+ }).then(res => {
306
+
307
+ })
308
+ }
309
+ else{
310
+ console.log('取消')
311
+ }
312
+ }
313
+ })
314
+ },
77
315
  onJfbScroll(options) {
78
- console.log('event.onJfbScroll', options)
316
+ // console.log('event.onJfbScroll', options)
79
317
  },
80
318
  onJfbReachBottom(options) {
81
319
  console.log('event.onJfbReachBottom', options)
@@ -105,7 +343,176 @@
105
343
 
106
344
  .jfb-base-after-sales-detail {
107
345
  &__body{
346
+ background: #FAFAFA;
347
+ padding-bottom: 100rpx;
348
+ box-sizing: border-box;
349
+ .service_progress{
350
+ height: 320rpx;
351
+ background: linear-gradient(270deg, #FF8469 0%, #FF5252 100%);
352
+ color: #FFFFFF;
353
+ padding: 40rpx;
354
+ box-sizing: border-box;
355
+ .service_head{
356
+ display: flex;
357
+ align-items: center;
358
+ font-size: 32rpx;
359
+ font-weight: 500;
360
+ justify-content: space-between;
361
+ .head_sub{
362
+ font-size: 24rpx;
363
+ font-weight: 400;
364
+ }
365
+ }
366
+ .service_step{
367
+ display: flex;
368
+ align-items: center;
369
+ justify-content: space-between;
370
+ font-size: 24rpx;
371
+ font-weight: 400;
372
+ margin-top: 48rpx;
373
+ .step_item{
374
+ display: flex;
375
+ flex-direction: column;
376
+ align-items: center;
108
377
 
378
+ .step_radio{
379
+ width: 24rpx;
380
+ height: 24rpx;
381
+ background: rgba(255, 255, 255, 0.3);
382
+ border: 2px solid #FFFFFF;
383
+ border-radius: 24rpx;
384
+ box-sizing: border-box;
385
+ }
386
+ .step_text{
387
+ margin-top: 8rpx;
388
+ }
389
+ }
390
+ .step_line{
391
+ width: 146rpx;
392
+ height: 4rpx;
393
+ background: #FFFFFF;
394
+ border-radius: 4rpx;
395
+ }
396
+ }
397
+ }
398
+ .refund_section{
399
+ background: #FFFFFF;
400
+ border-radius: 16rpx;
401
+ padding: 24rpx 40rpx;
402
+ box-sizing: border-box;
403
+ margin-bottom: 20rpx;
404
+ .sec_tag{
405
+ border-radius: 8rpx;
406
+ padding: 4rpx 16rpx;
407
+ font-size: 24rpx;
408
+ font-weight: 400;
409
+ display: inline-block;
410
+ &._new{
411
+ background: #FFDEDE;
412
+ color: #F00000;
413
+ }
414
+ &._refund{
415
+ background: #E6EEFF;
416
+ color: #0070F0;
417
+ }
418
+ }
419
+ .sec_title{
420
+ padding-bottom: 24rpx;
421
+ border-bottom: 1px solid #EEEEEE;
422
+ font-size: 26rpx;
423
+ color: #333333;
424
+ font-weight: 500;
425
+ margin-bottom: 24rpx;
426
+ }
427
+ .sec_body{
428
+ font-size: 24rpx;
429
+ font-weight: 400;
430
+ .sec_item{
431
+ display: flex;
432
+ align-items: center;
433
+ justify-content: space-between;
434
+ margin: 24rpx 0;
435
+ &:last-child{
436
+ margin-bottom: 0;
437
+ }
438
+ .sec_l{
439
+ color: #999999;
440
+ display: flex;
441
+ // align-items: center;
442
+ align-items: flex-start;
443
+ flex: 1;
444
+
445
+ .sec_l_text{
446
+ flex: 1;
447
+ width: 400rpx;
448
+ }
449
+
450
+ .img_list{
451
+ display: flex;
452
+ flex-wrap: wrap;
453
+ flex: 1;
454
+ .img_box{
455
+ width: 150rpx;
456
+ height: 150rpx;
457
+ border-radius: 8rpx;
458
+ border: 1px solid #E0E0E0;
459
+ margin-right: 20rpx;
460
+ margin-bottom: 20rpx;
461
+ &:nth-of-type(3n){
462
+ margin-right: 0;
463
+ }
464
+ image{
465
+ width: 100%;
466
+ height: 100%;
467
+ }
468
+ }
469
+ }
470
+ }
471
+ .sec_r{
472
+ width: 100rpx;
473
+ ._copy{
474
+ padding: 4rpx 20rpx;
475
+ border-radius: 24rpx;
476
+ color: #CCCCCC;
477
+ border: 1px solid #CCCCCC;
478
+ }
479
+ }
480
+ }
481
+
482
+ }
483
+ }
484
+ .bottom_fixed{
485
+ position: fixed;
486
+ bottom: 0;
487
+ left: 0;
488
+ width: 100%;
489
+ padding: 20rpx;
490
+ box-sizing: border-box;
491
+ background: #FFFFFF;
492
+ box-shadow: 0px 0px 3px rgba(0, 0, 0, 0.1);
493
+ text-align: right;
494
+
495
+ .opt_btn{
496
+ width: 120rpx;
497
+ height: 60rpx;
498
+ background: #FFFFFF;
499
+ color: #999999;
500
+ border: 1px solid #999999;
501
+ font-size: 24rpx;
502
+ text-align: center;
503
+ line-height: 60rpx;
504
+ border-radius: 60rpx;
505
+ display: inline-block;
506
+ & + .opt_btn{
507
+ margin-left: 20rpx;
508
+ }
509
+ &.primary{
510
+ background: var(--main-color);
511
+ border-color: var(--main-color);
512
+ color: #FFFFFF;
513
+ }
514
+ }
515
+ }
109
516
  }
110
517
  }
111
518
  </style>