jufubao-base 1.0.260 → 1.0.261

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.
Files changed (40) hide show
  1. package/package.json +1 -1
  2. package/src/components/JfbBaseAfterOrderList/Attr.js +13 -0
  3. package/src/components/JfbBaseAfterOrderList/JfbBaseAfterOrderList.vue +33 -1
  4. package/src/components/JfbBaseAfterSales/Api.js +58 -0
  5. package/src/components/JfbBaseAfterSales/Attr.js +25 -0
  6. package/src/components/JfbBaseAfterSales/JfbBaseAfterSales.vue +598 -0
  7. package/src/components/JfbBaseAfterSales/JfbBaseAfterSalesLess.less +79 -0
  8. package/src/components/JfbBaseAfterSales/JfbBaseAfterSalesMixin.js +30 -0
  9. package/src/components/JfbBaseAfterSales/Mock.js +6 -0
  10. package/src/components/JfbBaseAfterSales/refundOrderInfo.vue +150 -0
  11. package/src/components/JfbBaseAfterSalesDetail/Api.js +41 -0
  12. package/src/components/JfbBaseAfterSalesDetail/Attr.js +25 -0
  13. package/src/components/JfbBaseAfterSalesDetail/JfbBaseAfterSalesDetail.vue +562 -0
  14. package/src/components/JfbBaseAfterSalesDetail/JfbBaseAfterSalesDetailLess.less +79 -0
  15. package/src/components/JfbBaseAfterSalesDetail/JfbBaseAfterSalesDetailMixin.js +30 -0
  16. package/src/components/JfbBaseAfterSalesDetail/Mock.js +60 -0
  17. package/src/components/JfbBaseAfterSalesDetail/secProd.vue +66 -0
  18. package/src/components/JfbBaseAfterSalesFast/Api.js +30 -0
  19. package/src/components/JfbBaseAfterSalesFast/Attr.js +32 -0
  20. package/src/components/JfbBaseAfterSalesFast/JfbBaseAfterSalesFast.vue +297 -0
  21. package/src/components/JfbBaseAfterSalesFast/JfbBaseAfterSalesFastLess.less +79 -0
  22. package/src/components/JfbBaseAfterSalesFast/JfbBaseAfterSalesFastMixin.js +30 -0
  23. package/src/components/JfbBaseAfterSalesFast/Mock.js +38 -0
  24. package/src/components/JfbBaseAfterSalesList/Api.js +40 -0
  25. package/src/components/JfbBaseAfterSalesList/Attr.js +130 -0
  26. package/src/components/JfbBaseAfterSalesList/JfbBaseAfterSalesList.vue +512 -0
  27. package/src/components/JfbBaseAfterSalesList/JfbBaseAfterSalesListLess.less +79 -0
  28. package/src/components/JfbBaseAfterSalesList/JfbBaseAfterSalesListMixin.js +30 -0
  29. package/src/components/JfbBaseAfterSalesList/Mock.js +362 -0
  30. package/src/components/JfbBaseCard/JfbBaseCard.vue +3 -1
  31. package/src/components/JfbBaseCardV2/JfbBaseCardV2.vue +3 -1
  32. package/src/components/JfbBaseCardV3/JfbBaseCardV3.vue +3 -1
  33. package/src/components/JfbBaseOrderDetail/Api.js +11 -0
  34. package/src/components/JfbBaseOrderDetail/Attr.js +36 -0
  35. package/src/components/JfbBaseOrderDetail/JfbBaseOrderDetail.vue +47 -2
  36. package/src/components/JfbBaseOrderList/Api.js +11 -0
  37. package/src/components/JfbBaseOrderList/Attr.js +36 -0
  38. package/src/components/JfbBaseOrderList/JfbBaseOrderList.vue +50 -2
  39. package/src/components/JfbBaseOrderList/Mock.js +1 -1
  40. package/src/components/JfbBaseOrderList/XdTfkOrderItem.vue +17 -5
@@ -4,6 +4,18 @@ export default {
4
4
  style: [],
5
5
  content: (data)=>{
6
6
  return [
7
+ {
8
+ label: "申请售后:",
9
+ ele: 'xd-radio',
10
+ valueKey: "showApplyAfter",
11
+ value: data.showApplyAfter || 'N',
12
+ list: [
13
+ {label: '展示', value: 'Y'},
14
+ {label: '隐藏', value: 'N'},
15
+ ],
16
+ groupKey:'content',
17
+ labelInline: true,
18
+ },
7
19
  {
8
20
  label: "布局样式配置",
9
21
  ele: "xd-radio",
@@ -264,6 +276,30 @@ export default {
264
276
  },
265
277
  inline: false,
266
278
  },
279
+ {
280
+ label: '售后服务页面路径:',
281
+ ele: 'xd-select-pages-path',
282
+ valueKey: 'refundPath',
283
+ groupKey:'advanced',
284
+ placeholder: '请选择普通售后服务路径',
285
+ value: data['refundPath'] || null,
286
+ setting: {
287
+ router: XdBus.getParentApi('getPagesTree'),
288
+ },
289
+ inline: false,
290
+ },
291
+ {
292
+ label: '极速退款页面路径:',
293
+ ele: 'xd-select-pages-path',
294
+ valueKey: 'refundFastPath',
295
+ groupKey:'advanced',
296
+ placeholder: '请选择极速退款页面路径',
297
+ value: data['refundFastPath'] || null,
298
+ setting: {
299
+ router: XdBus.getParentApi('getPagesTree'),
300
+ },
301
+ inline: false,
302
+ },
267
303
  ].filter(i=>i)
268
304
  },
269
305
  advanced: [],
@@ -152,10 +152,19 @@
152
152
  </view>
153
153
  <view
154
154
  class="jfb-base-order-list__body-order-item-pay"
155
- v-if="item.buttons.length"
155
+ v-if="isShowFooter(item.buttons)"
156
156
  >
157
157
  <view v-for="(btn,index) in item.buttons" :key="btn.key">
158
+ <template v-if="btn.action === 'apply_refund'">
159
+ <xd-button
160
+ v-if="showApplyAfter === 'Y'"
161
+ type="default"
162
+ size="mini"
163
+ @click="handleBtnEvent(btn.action, item)"
164
+ >{{ btn.text }}</xd-button>
165
+ </template>
158
166
  <xd-button
167
+ v-else
159
168
  :type="getBtnType(btn.action)"
160
169
  size="mini"
161
170
  @click="handleBtnEvent(btn.action, item)"
@@ -182,6 +191,7 @@
182
191
  :mainColor="mainColor"
183
192
  :isShowOrderNo="isShowOrderNo"
184
193
  :brandTextColor="brandTextColor"
194
+ :showApplyAfter="showApplyAfter"
185
195
  :item="item"
186
196
  @handleBtnEvent="action => handleBtnEvent(action, item)"
187
197
  ></xd-tfk-order-item>
@@ -243,6 +253,8 @@ export default {
243
253
  initStatus: false,
244
254
  loadingList: true,
245
255
 
256
+ showApplyAfter: "",
257
+
246
258
  //基础
247
259
  radius: 0,
248
260
  backgroundColor: "",
@@ -271,6 +283,9 @@ export default {
271
283
  layout_style: "old",
272
284
  isShowOrderNo: "Y",
273
285
 
286
+ refundPath: "",
287
+ refundFastPath: "",
288
+
274
289
  noticeBgc:'',
275
290
  };
276
291
  },
@@ -332,6 +347,7 @@ export default {
332
347
  * @param container {object} 业务组件对象自己
333
348
  */
334
349
  init(container) {
350
+ this.showApplyAfter = getContainerPropsValue(container, "content.showApplyAfter", "N");
335
351
  this.margin = getContainerPropsValue(container, "content.margin", {top: 0, left: 0, right: 0, bottom: 0,});
336
352
  this.radius = getContainerPropsValue(container, "content.radius", 0);
337
353
  this.backgroundColor = getContainerPropsValue(container, "content.backgroundColor", "#f8f8f8");
@@ -360,6 +376,8 @@ export default {
360
376
 
361
377
  this.detailPath = getContainerPropsValue(container, "content.detailPath", { value: "" }).value;
362
378
  this.payPath = getContainerPropsValue(container, "content.payPath", {value: "",}).value;
379
+ this.refundPath = getContainerPropsValue(container, "content.refundPath", {value: "",}).value;
380
+ this.refundFastPath = getContainerPropsValue(container, "content.refundFastPath", {value: "",}).value;
363
381
  this.layout_style = getContainerPropsValue(container, "content.layout_style", "old");
364
382
  this.isShowOrderNo = getContainerPropsValue(container, "content.isShowOrderNo", "Y");
365
383
  this.tabList = getContainerPropsValue(container, "content.orderTypeList", []).map((item) => {
@@ -403,7 +421,10 @@ export default {
403
421
  },
404
422
  });
405
423
  },
406
-
424
+ isShowFooter(buttons){
425
+ if(this.showApplyAfter === 'Y') return buttons.length > 0;
426
+ else return buttons.filter(item => item.action !== 'apply_refund').length > 0;
427
+ },
407
428
  handleBtnEvent(action, item) {
408
429
  if (action === "cancel_unpaid") {
409
430
  //取消订单
@@ -426,6 +447,32 @@ export default {
426
447
  this.$xdUniHelper.navigateTo({
427
448
  url: `${this.payPath}?order_id=${item.pay_order_id}&main_order_id=${item.main_order_id}`,
428
449
  });
450
+ } else if( action === 'apply_refund'){
451
+
452
+ this.$xdShowLoading({});
453
+ jfbRootExec("getSupportQuickRefund", {
454
+ vm: this,
455
+ data: {
456
+ main_order_id: item.main_order_id
457
+ }
458
+ }).then(res => {
459
+ this.$xdHideLoading();
460
+ //普通退款
461
+ if(res.is_support_quick_refund !== "Y"){
462
+ this.$xdUniHelper.navigateTo({
463
+ url: `${this.refundPath}?order_id=${item.main_order_id}`,
464
+ });
465
+ }else{
466
+ //极速退款
467
+ this.$xdUniHelper.navigateTo({
468
+ url: `${this.refundFastPath}?order_id=${item.main_order_id}`,
469
+ });
470
+ }
471
+ }).catch(err => {
472
+ this.$xdHideLoading();
473
+ })
474
+
475
+
429
476
  }
430
477
  },
431
478
 
@@ -439,6 +486,7 @@ export default {
439
486
  tab,
440
487
  page_size: this.page_size,
441
488
  page_token: this.page_token,
489
+ is_show_after_btn: this.showApplyAfter === 'Y' ? 1 : 0
442
490
  },
443
491
  })
444
492
  .then((res) => {
@@ -25,7 +25,7 @@ module.exports = {
25
25
  "product_thumb": "\/\/sandbox-img.jufubao.cn\/uploads\/20230506\/40018e35f8d9b3bcc2f180cfe073ce28.png",
26
26
  "sale_price": 2678
27
27
  }],
28
- "buttons": [{"text": "支付", "action": "pay"}, {"text": "取消订单", "action": "cancel_unpaid"}]
28
+ "buttons": [{"text": "支付", "action": "pay"}, {"text": "取消订单", "action": "cancel_unpaid"}, { "text": "申请退款", "action": "apply_refund"}]
29
29
  },
30
30
  {
31
31
  "main_order_id": "m513033785675509760",
@@ -83,10 +83,21 @@
83
83
  </view>
84
84
  <view v-if="item.buttons.length" class="prod_footer">
85
85
  <view style="flex: 1;"></view>
86
- <view class="btn"
87
- v-for="(btn,index) in item.buttons" :key="btn.key"
88
- @click="handleBtnEvent(btn.action, item)"
89
- >{{btn.text}}</view>
86
+ <template v-for="(btn,index) in item.buttons">
87
+ <template v-if="btn.action === 'apply_refund'">
88
+ <view class="btn"
89
+ v-if="showApplyAfter === 'Y'"
90
+ :key="btn.key"
91
+ @click="handleBtnEvent(btn.action, item)"
92
+ >{{btn.text}}</view>
93
+ </template>
94
+ <view class="btn"
95
+ v-else
96
+ :key="btn.key"
97
+ @click="handleBtnEvent(btn.action, item)"
98
+ >{{btn.text}}</view>
99
+ </template>
100
+
90
101
  </view>
91
102
  </view>
92
103
  </template>
@@ -106,7 +117,8 @@
106
117
  isShowOrderNo: {
107
118
  type: String,
108
119
  },
109
- brandTextColor: String
120
+ brandTextColor: String,
121
+ showApplyAfter: String
110
122
  },
111
123
  data(){
112
124
  return{