jufubao-base 1.0.243-beta2 → 1.0.243-beta202

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 (172) 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 +587 -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 +547 -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 +488 -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/JfbBaseBalance/Api.js +46 -0
  31. package/src/components/JfbBaseBalance/Attr.js +316 -0
  32. package/src/components/JfbBaseBalance/JfbBaseBalance.vue +336 -0
  33. package/src/components/JfbBaseBalance/JfbBaseBalanceLess.less +79 -0
  34. package/src/components/JfbBaseBalance/JfbBaseBalanceMixin.js +30 -0
  35. package/src/components/JfbBaseBalance/Mock.js +9 -0
  36. package/src/components/JfbBaseCardBindV2/JfbBaseCardBindV2.vue +4 -6
  37. package/src/components/JfbBaseCodeOpenVip/Api.js +35 -0
  38. package/src/components/JfbBaseCodeOpenVip/Attr.js +281 -0
  39. package/src/components/JfbBaseCodeOpenVip/JfbBaseCodeOpenVip.vue +251 -0
  40. package/src/components/JfbBaseCodeOpenVip/JfbBaseCodeOpenVipLess.less +79 -0
  41. package/src/components/JfbBaseCodeOpenVip/JfbBaseCodeOpenVipMixin.js +30 -0
  42. package/src/components/JfbBaseCodeOpenVip/Mock.js +13 -0
  43. package/src/components/JfbBaseConPhone/JfbBaseConPhone.vue +10 -16
  44. package/src/components/JfbBaseConsumpCode/Api.js +133 -0
  45. package/src/components/JfbBaseConsumpCode/Attr.js +74 -0
  46. package/src/components/JfbBaseConsumpCode/JfbBaseConsumpCode.vue +1111 -0
  47. package/src/components/JfbBaseConsumpCode/JfbBaseConsumpCodeLess.less +79 -0
  48. package/src/components/JfbBaseConsumpCode/JfbBaseConsumpCodeMixin.js +30 -0
  49. package/src/components/JfbBaseConsumpCode/Mock.js +22 -0
  50. package/src/components/JfbBaseFastLink/Attr.js +12 -1
  51. package/src/components/JfbBaseFastLink/JfbBaseFastLink.vue +66 -0
  52. package/src/components/JfbBaseFooter/Attr.js +12 -0
  53. package/src/components/JfbBaseFooter/JfbBaseFooter.vue +13 -0
  54. package/src/components/JfbBaseHeader/Attr.js +82 -0
  55. package/src/components/JfbBaseHeader/JfbBaseHeader.vue +47 -1
  56. package/src/components/JfbBaseHeaderColumn/Attr.js +82 -0
  57. package/src/components/JfbBaseHeaderColumn/JfbBaseHeaderColumn.vue +48 -2
  58. package/src/components/JfbBaseLogin/JfbBaseLogin.vue +23 -13
  59. package/src/components/JfbBaseLoginForgetPwd/JfbBaseLoginForgetPwd.vue +6 -10
  60. package/src/components/JfbBaseLoginSetPwd/JfbBaseLoginSetPwd.vue +2 -16
  61. package/src/components/JfbBaseMapOverlay/JfbBaseMapOverlay.vue +3 -5
  62. package/src/components/JfbBaseNoticeDialog/Api.js +1 -1
  63. package/src/components/JfbBaseNoticeDialog/Attr.js +26 -0
  64. package/src/components/JfbBaseNoticeDialog/JfbBaseNoticeDialog.vue +38 -15
  65. package/src/components/JfbBaseNoticeGroup/Api.js +23 -0
  66. package/src/components/JfbBaseNoticeGroup/Attr.js +237 -0
  67. package/src/components/JfbBaseNoticeGroup/JfbBaseNoticeGroup.vue +174 -0
  68. package/src/components/JfbBaseNoticeGroup/JfbBaseNoticeGroupLess.less +79 -0
  69. package/src/components/JfbBaseNoticeGroup/JfbBaseNoticeGroupMixin.js +30 -0
  70. package/src/components/JfbBaseNoticeGroup/Mock.js +13 -0
  71. package/src/components/JfbBaseOpenVip/Api.js +39 -0
  72. package/src/components/JfbBaseOpenVip/Attr.js +331 -0
  73. package/src/components/JfbBaseOpenVip/JfbBaseOpenVip.vue +459 -0
  74. package/src/components/JfbBaseOpenVip/JfbBaseOpenVipLess.less +79 -0
  75. package/src/components/JfbBaseOpenVip/JfbBaseOpenVipMixin.js +30 -0
  76. package/src/components/JfbBaseOpenVip/Mock.js +7 -0
  77. package/src/components/JfbBaseOpenVip/XdVipList.vue +130 -0
  78. package/src/components/JfbBaseOpenVipCard/Api.js +58 -0
  79. package/src/components/JfbBaseOpenVipCard/Attr.js +48 -0
  80. package/src/components/JfbBaseOpenVipCard/JfbBaseOpenVipCard.vue +111 -0
  81. package/src/components/JfbBaseOpenVipCard/JfbBaseOpenVipCardLess.less +79 -0
  82. package/src/components/JfbBaseOpenVipCard/JfbBaseOpenVipCardMixin.js +30 -0
  83. package/src/components/JfbBaseOpenVipCard/Mock.js +13 -0
  84. package/src/components/JfbBaseOpenVipDetail/Api.js +35 -0
  85. package/src/components/JfbBaseOpenVipDetail/Attr.js +37 -0
  86. package/src/components/JfbBaseOpenVipDetail/JfbBaseOpenVipDetail.vue +234 -0
  87. package/src/components/JfbBaseOpenVipDetail/JfbBaseOpenVipDetailLess.less +79 -0
  88. package/src/components/JfbBaseOpenVipDetail/JfbBaseOpenVipDetailMixin.js +30 -0
  89. package/src/components/JfbBaseOpenVipDetail/Mock.js +15 -0
  90. package/src/components/JfbBaseOrderDetail/Attr.js +36 -0
  91. package/src/components/JfbBaseOrderDetail/JfbBaseOrderDetail.vue +211 -19
  92. package/src/components/JfbBaseOrderList/Api.js +11 -0
  93. package/src/components/JfbBaseOrderList/Attr.js +36 -0
  94. package/src/components/JfbBaseOrderList/JfbBaseOrderList.vue +50 -2
  95. package/src/components/JfbBaseOrderList/Mock.js +1 -1
  96. package/src/components/JfbBaseOrderList/XdTfkOrderItem.vue +17 -5
  97. package/src/components/JfbBasePay/Attr.js +52 -0
  98. package/src/components/JfbBasePay/JfbBasePay.vue +42 -41
  99. package/src/components/JfbBasePay/Mock.js +0 -9
  100. package/src/components/JfbBasePersonalData/Api.js +26 -0
  101. package/src/components/JfbBasePersonalData/Attr.js +13 -0
  102. package/src/components/JfbBasePersonalData/JfbBasePersonalData.vue +278 -0
  103. package/src/components/JfbBasePersonalData/JfbBasePersonalDataLess.less +79 -0
  104. package/src/components/JfbBasePersonalData/JfbBasePersonalDataMixin.js +30 -0
  105. package/src/components/JfbBasePersonalData/Mock.js +13 -0
  106. package/src/components/JfbBasePhoneCollect/JfbBasePhoneCollect.vue +5 -21
  107. package/src/components/JfbBasePhoneLogin/JfbBasePhoneLogin.vue +40 -31
  108. package/src/components/JfbBasePointsCard/Api.js +18 -0
  109. package/src/components/JfbBasePointsCard/Attr.js +187 -0
  110. package/src/components/JfbBasePointsCard/JfbBasePointsCard.vue +212 -0
  111. package/src/components/JfbBasePointsCard/JfbBasePointsCardLess.less +79 -0
  112. package/src/components/JfbBasePointsCard/JfbBasePointsCardMixin.js +30 -0
  113. package/src/components/JfbBasePointsCard/Mock.js +5 -0
  114. package/src/components/JfbBasePointsDetail/Api.js +48 -0
  115. package/src/components/JfbBasePointsDetail/Attr.js +305 -0
  116. package/src/components/JfbBasePointsDetail/JfbBasePointsDetail.vue +267 -0
  117. package/src/components/JfbBasePointsDetail/JfbBasePointsDetailLess.less +79 -0
  118. package/src/components/JfbBasePointsDetail/JfbBasePointsDetailMixin.js +30 -0
  119. package/src/components/JfbBasePointsDetail/Mock.js +6 -0
  120. package/src/components/JfbBasePoster/Attr.js +1 -1
  121. package/src/components/JfbBasePosterBigSmall/JfbBasePosterBigSmall.vue +2 -2
  122. package/src/components/JfbBasePosterGroup/Api.js +22 -0
  123. package/src/components/JfbBasePosterGroup/Attr.js +156 -0
  124. package/src/components/JfbBasePosterGroup/JfbBasePosterGroup.vue +268 -0
  125. package/src/components/JfbBasePosterGroup/JfbBasePosterGroupLess.less +79 -0
  126. package/src/components/JfbBasePosterGroup/JfbBasePosterGroupMixin.js +30 -0
  127. package/src/components/JfbBasePosterGroup/Mock.js +13 -0
  128. package/src/components/JfbBaseSavingDetail/Api.js +41 -0
  129. package/src/components/JfbBaseSavingDetail/Attr.js +70 -0
  130. package/src/components/JfbBaseSavingDetail/JfbBaseSavingDetail.vue +724 -0
  131. package/src/components/JfbBaseSavingDetail/JfbBaseSavingDetailLess.less +79 -0
  132. package/src/components/JfbBaseSavingDetail/JfbBaseSavingDetailMixin.js +30 -0
  133. package/src/components/JfbBaseSavingDetail/Mock.js +10 -0
  134. package/src/components/JfbBaseSavingDetail/components/echarts.min.js +26 -0
  135. package/src/components/JfbBaseSavingDetail/components/echarts.vue +254 -0
  136. package/src/components/JfbBaseSavingDetail/components/wx-canvas.js +105 -0
  137. package/src/components/JfbBaseShare/Api.js +20 -0
  138. package/src/components/JfbBaseShare/Attr.js +59 -0
  139. package/src/components/JfbBaseShare/JfbBaseShare.vue +282 -0
  140. package/src/components/JfbBaseShare/JfbBaseShareLess.less +79 -0
  141. package/src/components/JfbBaseShare/JfbBaseShareMixin.js +30 -0
  142. package/src/components/JfbBaseShare/Mock.js +16 -0
  143. package/src/components/JfbBaseSuccess/JfbBaseSuccess.vue +14 -3
  144. package/src/components/JfbBaseTfkCardBind/JfbBaseTfkCardBind.vue +11 -18
  145. package/src/components/JfbBaseTfkSearch/ContentProduct.vue +12 -22
  146. package/src/components/JfbBaseTfkSearch/JfbBaseTfkSearch.vue +12 -1
  147. package/src/components/JfbBaseTfkSearch/Mock.js +51 -3
  148. package/src/components/JfbBaseTfkSearch/listMixins.js +2 -1
  149. package/src/components/JfbBaseUserInfo/Attr.js +175 -11
  150. package/src/components/JfbBaseUserInfo/JfbBaseUserInfo.vue +342 -119
  151. package/src/components/JfbBaseUserOrder/Attr.js +16 -0
  152. package/src/components/JfbBaseUserOrder/JfbBaseUserOrder.vue +11 -2
  153. package/src/components/JfbBaseWalletItem/JfbBaseWalletItem.vue +3 -5
  154. package/src/components/JfbBaseWithDrawAgain/Api.js +41 -0
  155. package/src/components/JfbBaseWithDrawAgain/Attr.js +92 -0
  156. package/src/components/JfbBaseWithDrawAgain/JfbBaseWithDrawAgain.vue +354 -0
  157. package/src/components/JfbBaseWithDrawAgain/JfbBaseWithDrawAgainLess.less +79 -0
  158. package/src/components/JfbBaseWithDrawAgain/JfbBaseWithDrawAgainMixin.js +30 -0
  159. package/src/components/JfbBaseWithDrawAgain/Mock.js +10 -0
  160. package/src/components/JfbBaseWithDrawRecord/Api.js +19 -0
  161. package/src/components/JfbBaseWithDrawRecord/Attr.js +79 -0
  162. package/src/components/JfbBaseWithDrawRecord/JfbBaseWithDrawRecord.vue +233 -0
  163. package/src/components/JfbBaseWithDrawRecord/JfbBaseWithDrawRecordLess.less +79 -0
  164. package/src/components/JfbBaseWithDrawRecord/JfbBaseWithDrawRecordMixin.js +30 -0
  165. package/src/components/JfbBaseWithDrawRecord/Mock.js +7 -0
  166. package/src/components/JfbBaseWithdraw/Api.js +48 -0
  167. package/src/components/JfbBaseWithdraw/Attr.js +328 -0
  168. package/src/components/JfbBaseWithdraw/JfbBaseWithdraw.vue +272 -0
  169. package/src/components/JfbBaseWithdraw/JfbBaseWithdrawLess.less +79 -0
  170. package/src/components/JfbBaseWithdraw/JfbBaseWithdrawMixin.js +30 -0
  171. package/src/components/JfbBaseWithdraw/Mock.js +7 -0
  172. package/src/components/JfbBaseWxAuthorize/JfbBaseWxAuthorize.vue +10 -0
@@ -0,0 +1,587 @@
1
+ <template>
2
+ <view
3
+ class="jfb-base-after-sales"
4
+ @click="handleEditxSelect"
5
+ :class="{ editx : isEditx && active }"
6
+ >
7
+ <!--#ifdef H5-->
8
+ <view
9
+ class="jfb-base-after-sales__edit"
10
+ :class="{ editx : isEditx && active }"
11
+ v-if="isEditx && active"
12
+ >
13
+ <view class="jfb-base-after-sales__edit-icon" @click="delEdit">删除</view>
14
+ </view>
15
+ <!-- #endif -->
16
+ <view class="jfb-base-after-sales__body" :style="{
17
+ minHeight: layoutInfo.bodyMinHeightRpx + 'rpx',
18
+ '--main-color': mainColor
19
+ }">
20
+ <template v-if="step == 1">
21
+ <view class="s_type_box">
22
+ <view class="s_type_title">请选择售后类型</view>
23
+ <view class="service_types">
24
+ <view class="service_item"
25
+ :class="{ active: item.value === after_sale_method }"
26
+ v-for="item in afterSalesMethod" :key="item.value"
27
+ @click="handleSelectAfterSalesMethod(item)"
28
+ >{{ item.label }}</view>
29
+ </view>
30
+ </view>
31
+
32
+ <RefundOrderInfo :list="productList"
33
+ :orderNumber="baseInfo.main_order_id"
34
+ :showRadio="canChoseProduct"
35
+ :showNumberSet="canSetNumber"
36
+ @change="handleSelectProduct"
37
+ ></RefundOrderInfo>
38
+
39
+ <view class="bottom_fixed" :style="prod_bottom">
40
+ <xd-button type="primary" @click="handleStepNext">下一步</xd-button>
41
+ </view>
42
+ </template>
43
+
44
+ <template v-if="step == 2">
45
+ <RefundOrderInfo :list="service_product_list"
46
+ :showRadio="false"
47
+ :orderNumber="baseInfo.main_order_id"
48
+ ></RefundOrderInfo>
49
+
50
+ <view class="list_section section_inline" @click="toChoseReason">
51
+ <view class="sec_label">
52
+ <view class="label_require">*</view>
53
+ <view>申请原因</view>
54
+ </view>
55
+ <view class="sec_content">
56
+ <view>{{ afterSaleTypeText }}</view>
57
+ <xd-font-icon icon="iconxiangyou_xian" :size="28" style="margin-left: 8rpx;"></xd-font-icon>
58
+ </view>
59
+ </view>
60
+ <view class="list_section">
61
+ <view class="sec_label">
62
+ <view class="label_require">*</view>
63
+ <view>问题描述</view>
64
+ </view>
65
+ <view class="sec_content">
66
+ <textarea v-model="customer_feedback"
67
+ placeholder="请描述您遇到的问题"
68
+ style="width: 100%;background:#FAFAFA;height: 140rpx;padding: 16rpx;border-radius: 8rpx;font-size: 24rpx;"
69
+ ></textarea>
70
+ </view>
71
+ </view>
72
+
73
+ <view class="list_section">
74
+ <view class="sec_label">
75
+ <view>上传凭证</view>
76
+ <view class="label_sub">最多9张</view>
77
+ </view>
78
+ <view class="sec_content">
79
+ <view class="img_list">
80
+ <view class="img_box" v-for="(img, i) in showRefundImages" :key="i">
81
+ <image :src="img" class="img_item" mode="aspectFit" @click="handlePreview(i)"></image>
82
+ </view>
83
+ <view v-if="showRefundImages.length < 9" class="img_box img_add" @click="doAddImage">
84
+ <view class="icon">+</view>
85
+ </view>
86
+ </view>
87
+ </view>
88
+ </view>
89
+
90
+ <view class="bottom_fixed" :style="prod_bottom">
91
+ <xd-button type="primary" @click="handleApplyRefund">提交申请</xd-button>
92
+ </view>
93
+ </template>
94
+ <xd-down-drawer :show.sync="reasonShow" :isClose="false">
95
+ <view class="refund_reason_head">申请原因</view>
96
+ <view class="refund_reason_body" style="min-height: 50vh;max-height: 75vh;">
97
+ <view class="reason_cont">
98
+ <view class="reason_item" v-for="item in afterSalesTypes" :key="item.id">
99
+ <view>{{ item.type_name }}</view>
100
+ <xd-radio :value="temp_type === item.id" @change="selectApplyReason(item.id)"></xd-radio>
101
+ </view>
102
+ </view>
103
+ <view class="reason_foot">
104
+ <xd-button type="primary" @click="handleChoseReason">确定</xd-button>
105
+ </view>
106
+ </view>
107
+ </xd-down-drawer>
108
+ <xd-dailog :show.sync="showDialog" :showTitle="false">
109
+ <view class="no_after_prod">
110
+ <view class="_icon">
111
+ <xd-font-icon icon="iconmingchengtubiao" :size="80" :color="mainColor"></xd-font-icon>
112
+ </view>
113
+ <view class="_main">抱歉,该订单已无可申请售后商品</view>
114
+ <view class="_sub">若您对商品售后有疑问,请联系客服处理</view>
115
+ </view>
116
+ <view slot="btn"></view>
117
+ </xd-dailog>
118
+ </view>
119
+ </view>
120
+ </template>
121
+
122
+ <script>
123
+ import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
124
+ import XdButton from "@/components/XdButton/XdButton";
125
+ import XdRadio from "@/components/XdRadio/XdRadio"
126
+ import XdDownDrawer from "@/components/XdDownDrawer/XdDownDrawer"
127
+ import XdDailog from "@/components/XdDailog/XdDailog"
128
+ import RefundOrderInfo from "./refundOrderInfo.vue"
129
+ import { jfbRootExec } from "@/utils/xd.event";
130
+ import JfbBaseAfterSalesMixin from "./JfbBaseAfterSalesMixin";
131
+ import { getContainerPropsValue } from "@/utils/xd.base";
132
+ import componentsMixins from "@/mixins/componentsMixins";
133
+ import extsMixins from "@/mixins/extsMixins";
134
+ import getServiceUrl from "@/common/getServiceUrl";
135
+ export default {
136
+ name: "JfbBaseAfterSales",
137
+ components: {
138
+ XdFontIcon,
139
+ XdButton,
140
+ XdRadio,
141
+ XdDownDrawer,
142
+ RefundOrderInfo,
143
+ XdDailog
144
+ },
145
+ mixins: [
146
+ componentsMixins, extsMixins, JfbBaseAfterSalesMixin
147
+ ],
148
+ data() {
149
+ return {
150
+ step: 1,
151
+ reasonShow: false,
152
+ afterSalesMethod: [],
153
+ after_sale_method: "",
154
+ after_sale_type: "",
155
+ temp_type: "",
156
+ service_product_list: [],
157
+ customer_feedback: "",
158
+ showDialog: false,
159
+
160
+ productList: [],
161
+ afterSalesTypes: [],
162
+ baseInfo: {},
163
+
164
+ refundImgList: [],
165
+ order_id: "",
166
+ //todo
167
+ refundStepPath: "",
168
+ }
169
+ },
170
+ computed: {
171
+ canChoseProduct(){
172
+ if(!this.after_sale_method) return false;
173
+ if(this.baseInfo.support_refund_method === 'all' && this.after_sale_method === 'refund_and_good') return false;
174
+ if(this.productList.length === 1) return false;
175
+ return true;
176
+ },
177
+ canSetNumber(){
178
+ if(!this.after_sale_method) return false;
179
+ if(this.after_sale_method === 'refund_and_good') return false;
180
+ return true;
181
+ },
182
+ afterSaleTypeText(){
183
+ if(!this.after_sale_type) return "";
184
+ let item = this.afterSalesTypes.find(i => i.id === this.after_sale_type);
185
+ return item ? item.type_name : "";
186
+ },
187
+ showRefundImages(){
188
+ return this.refundImgList.map(item => getServiceUrl(item))
189
+ },
190
+ prod_bottom() {
191
+ return this.fixedStyle({ height: 20, zIndex: 111 });
192
+ },
193
+ },
194
+ watch: {
195
+ container(value, oldValue) {
196
+ if (JSON.stringify(value) === JSON.stringify(oldValue)) return;
197
+ if (this.$configProject['isPreview']) this.init(value)
198
+ },
199
+ },
200
+ created() {
201
+ this.init(this.container);
202
+
203
+ //todo
204
+ },
205
+ methods: {
206
+ onJfbLoad(options) {
207
+ this.order_id = options.order_id;
208
+ this.p_getAfterOmsOrder();
209
+ this.p_getAfterSalesTypeList();
210
+ },
211
+ /**
212
+ * @description 监听事件变化
213
+ * @param container {object} 业务组件对象自己
214
+ */
215
+ init(container) {
216
+ this.refundStepPath = getContainerPropsValue(container, 'content.refundStepPath', {value: ""}).value;
217
+ },
218
+ doAddImage(){
219
+ uni.chooseImage({
220
+ count: 1,
221
+ sourceType: ['camera'],
222
+ success: async (res) => {
223
+ console.log('chooseImage',res);
224
+ // let filePath = res.tempFilePaths[0];
225
+ let file = res.tempFiles[0];
226
+ this.$xdShowLoading({});
227
+ try{
228
+ let image = await this.uploadImage(file);
229
+ this.refundImgList.push(image);
230
+ this.$xdHideLoading();
231
+ }catch(err){
232
+ this.$xdHideLoading();
233
+ }
234
+ }
235
+ })
236
+ },
237
+ uploadImage(file){
238
+ let fileName = file.name;
239
+ return new Promise((resolve, reject) => {
240
+ jfbRootExec("getConOssSign", {
241
+ vm: this,
242
+ data: { name: fileName }
243
+ }).then(res => {
244
+ let OSSAccessKeyId = res['id']
245
+ let cdnUrl = res['cdn_url']
246
+ delete res['id']
247
+ delete res['cdn_url']
248
+ uni.uploadFile({
249
+ url: res.action,
250
+ file: file,
251
+ name: 'file',
252
+ formData: {
253
+ ...res,
254
+ OSSAccessKeyId: OSSAccessKeyId,
255
+ name: fileName,
256
+ cdnUrl: cdnUrl,
257
+ success_action_status: 200
258
+ },
259
+ success: (r) => {
260
+ resolve(`/${res.key}`);
261
+ },
262
+ fail:(err)=>{
263
+ resolve('');
264
+ console.error(err)
265
+ }
266
+ });
267
+ }).catch(err => {
268
+ reject(err);
269
+ })
270
+ })
271
+
272
+ },
273
+ p_getAfterSalesTypeList(){
274
+ jfbRootExec("getAfterSalesTypeList", {
275
+ vm: this,
276
+ data: {}
277
+ }).then(res => {
278
+ this.afterSalesTypes = res.list;
279
+ })
280
+ },
281
+ p_getAfterOmsOrder(){
282
+ this.$xdShowLoading({});
283
+ jfbRootExec("getAfterOmsOrder", {
284
+ vm: this,
285
+ data: {
286
+ main_order_id: this.order_id
287
+ }
288
+ }).then(res => {
289
+ this.$xdHideLoading();
290
+ const { product_list, base_info } = res;
291
+ if(product_list.length === 0){
292
+ this.showDialog = true;
293
+ }
294
+ this.productList = product_list.map(item => {
295
+ item.product_thumb = getServiceUrl(item.product_thumb, 'size2');
296
+ return item;
297
+ });
298
+ this.baseInfo = base_info;
299
+ try{
300
+ this.afterSalesMethod = JSON.parse(base_info.support_aftersale_method);
301
+ }catch(e){}
302
+ })
303
+ },
304
+ handleSelectAfterSalesMethod(item){
305
+ this.after_sale_method = item.value;
306
+ this.$nextTick(() => {
307
+ if(this.productList.length === 1){
308
+ this.service_product_list = [this.productList[0]];
309
+ }else if(!this.canChoseProduct){
310
+ this.service_product_list = this.productList;
311
+ }
312
+ })
313
+ },
314
+ handleApplyRefund(){
315
+ let { order_id, after_sale_method, after_sale_type, customer_feedback } = this;
316
+ if(!after_sale_type) {
317
+ this.$xdAlert({
318
+ content: '请选择申请原因',
319
+ type: "error"
320
+ })
321
+ return;
322
+ }
323
+ if(!customer_feedback){
324
+ this.$xdAlert({
325
+ content: '请填写问题描述',
326
+ type: "error"
327
+ })
328
+ return;
329
+ }
330
+ if(!this.service_product_list.length){
331
+ this.$xdAlert({
332
+ content: '请选择售后商品',
333
+ type: "error"
334
+ })
335
+ return;
336
+ }
337
+ let data = {
338
+ main_order_id: order_id,
339
+ sub_order_id: this.service_product_list[0].sub_order_id,
340
+ after_sale_method,
341
+ after_sale_type,
342
+ customer_feedback,
343
+ refund_voucher: JSON.stringify(this.refundImgList),
344
+ product_list: JSON.stringify(this.service_product_list.map(item => ({
345
+ product_id: item.product_id,
346
+ product_sku_id: item.sku_id,
347
+ product_num: item.product_num,
348
+ gift_id: item.gift_id
349
+ })))
350
+ }
351
+ jfbRootExec("createAfterServiceOrder", {
352
+ vm: this,
353
+ data: data
354
+ }).then(res => {
355
+ this.$xdUniHelper.navigateTo({
356
+ url: `${this.refundStepPath}?service_order_id=${res.service_order_id}`,
357
+ });
358
+ })
359
+ },
360
+ handleSelectProduct(productList){
361
+ console.log('handleSelectProduct', productList)
362
+ this.service_product_list = productList;
363
+ },
364
+ handleStepNext(){
365
+ if(!this.after_sale_method){
366
+ this.$xdAlert({
367
+ content: '请选择售后类型',
368
+ type: "error"
369
+ })
370
+ return;
371
+ }
372
+ if(!this.service_product_list.length){
373
+ this.$xdAlert({
374
+ content: '请选择售后商品',
375
+ type: "error"
376
+ })
377
+ return;
378
+ }
379
+ console.log('handleStepNext', this.service_product_list)
380
+ this.step = 2;
381
+ },
382
+ toChoseReason(){
383
+ this.reasonShow = true;
384
+ },
385
+ selectApplyReason(id){
386
+ this.temp_type = id;
387
+ },
388
+ handleChoseReason(){
389
+ this.reasonShow = false;
390
+ this.after_sale_type = this.temp_type;
391
+ },
392
+ handlePreview(i){
393
+ uni.previewImage({
394
+ current: i,
395
+ urls: this.showRefundImages
396
+ })
397
+ },
398
+ onJfbScroll(options) {
399
+ // console.log('event.onJfbScroll', options)
400
+ },
401
+ onJfbReachBottom(options) {
402
+ console.log('event.onJfbReachBottom', options)
403
+ },
404
+ onJfbShow(options) {
405
+ console.log('event.onJfbShow', options)
406
+ },
407
+ onJfbHide(options) {
408
+ console.log('event.onJfbHide', options)
409
+ },
410
+ onJfbBack(options) {
411
+ console.log('event.onJfbBack', options)
412
+ },
413
+ onJfbUpdate(...data) {
414
+ console.log('event.onJfbUpdate', data)
415
+ },
416
+ onJfbCustomEvent(options) {
417
+ console.log('event.onJfbReachBottom', options)
418
+ },
419
+ }
420
+ }
421
+
422
+ </script>
423
+
424
+ <style scoped lang="less">
425
+ @import "./JfbBaseAfterSalesLess.less";
426
+
427
+ .jfb-base-after-sales {
428
+ &__body{
429
+ padding: 20rpx 20rpx 120rpx;
430
+ box-sizing: border-box;
431
+ background-color: #EEEEEE;
432
+ .s_type_box{
433
+ background-color: #FFFFFF;
434
+ border-radius: 16rpx;
435
+ padding: 36rpx;
436
+ font-size: 26rpx;
437
+ .s_type_title{
438
+ color: #333333;
439
+ font-weight: 500;
440
+ margin-bottom: 28rpx;
441
+ }
442
+ .service_types{
443
+ display: flex;
444
+ flex-wrap: wrap;
445
+
446
+ .service_item{
447
+ padding: 12rpx 48rpx;
448
+ border-radius: 40rpx;
449
+ background-color: #F3F3F3;
450
+ color: #999999;
451
+ margin-right: 15rpx;
452
+ &:nth-child(4n){
453
+ margin-right: 0;
454
+ }
455
+ &.active{
456
+ background-color: var(--main-color);
457
+ color: #FFFFFF;
458
+ }
459
+ }
460
+ }
461
+ }
462
+
463
+ .list_section{
464
+ padding: 24rpx 36rpx;
465
+ border-radius: 16rpx;
466
+ background-color: #FFFFFF;
467
+ display: flex;
468
+ flex-direction: column;
469
+ margin: 20rpx 0;
470
+ color: #333333;
471
+ font-size: 28rpx;
472
+ &.section_inline{
473
+ flex-direction: row;
474
+ justify-content: space-between;
475
+ .sec_label{
476
+ margin-bottom: 0;
477
+ }
478
+ }
479
+ .sec_label{
480
+ display: flex;
481
+ align-items: center;
482
+ margin-bottom: 24rpx;
483
+ .label_require{
484
+ color: #FF5733;
485
+ margin-right: 4rpx;
486
+ }
487
+ .label_sub{
488
+ color: #CCCCCC;
489
+ font-size: 24rpx;
490
+ margin-left: 16rpx;
491
+ }
492
+ }
493
+ .sec_content{
494
+ display: flex;
495
+ align-items: center;
496
+ color: #666666;
497
+
498
+ .img_list{
499
+ display: flex;
500
+ flex-wrap: wrap;
501
+ .img_box{
502
+ width: 160rpx;
503
+ height: 160rpx;
504
+ border-radius: 8rpx;
505
+ border: 1px solid #E0E0E0;
506
+ margin-right: 28rpx;
507
+ margin-bottom: 28rpx;
508
+ .img_item{
509
+ width: 100%;
510
+ height: 100%;
511
+ }
512
+
513
+ &.img_add{
514
+ display: flex;
515
+ align-items: center;
516
+ justify-content: center;
517
+ .icon{
518
+ border: 1px solid #E0E0E0;
519
+ width: 36rpx;
520
+ height: 36rpx;
521
+ border-radius: 6rpx;
522
+ display: flex;
523
+ align-items: center;
524
+ justify-content: center;
525
+ color: #E0E0E0;
526
+ }
527
+ }
528
+ }
529
+ }
530
+ }
531
+ }
532
+ .bottom_fixed{
533
+ position: fixed;
534
+ bottom: 0;
535
+ left: 0;
536
+ width: 100%;
537
+ padding: 20rpx;
538
+ box-sizing: border-box;
539
+ }
540
+ .refund_reason_head{
541
+ padding: 32rpx 0;
542
+ text-align: center;
543
+ border-bottom: 1px solid #F2F2F2;
544
+ margin: 0 32rpx;
545
+ font-size: 28rpx;
546
+ color: #333333;
547
+ font-weight: bold;
548
+ }
549
+ .refund_reason_body{
550
+ display: flex;
551
+ flex-direction: column;
552
+ .reason_cont{
553
+ flex: 1;
554
+ padding: 0 40rpx;
555
+ overflow: auto;
556
+ .reason_item{
557
+ display: flex;
558
+ align-items: center;
559
+ justify-content: space-between;
560
+ padding: 20rpx 20rpx;
561
+ font-size: 28rpx;
562
+ color: #333333;
563
+ }
564
+ }
565
+ .reason_foot{
566
+ padding: 32rpx;
567
+ border-top: 1px solid #F2F2F2;
568
+ }
569
+ }
570
+
571
+ .no_after_prod{
572
+ padding: 100rpx 0;
573
+ font-size: 28rpx;
574
+ ._icon{
575
+ margin-bottom: 20rpx;
576
+ }
577
+ ._main{
578
+ color: #333333;
579
+ margin-bottom: 16rpx;
580
+ }
581
+ ._sub{
582
+ color: #999999;
583
+ }
584
+ }
585
+ }
586
+ }
587
+ </style>
@@ -0,0 +1,79 @@
1
+ /**
2
+ * @desc 获取绝对路径完整地址
3
+ * @param @path
4
+ **/
5
+ //例如:https://image.jufubao.cn/20220501010108/image/bg/default_gonghui_bg.png
6
+ @basePath: 'business/';
7
+ @doMain: '//sandbox-img.jufubao.cn/';
8
+
9
+ .getBusinessImageUrl(@path, @size: 'size8') {
10
+ @url: "@{doMain}@{basePath}@{path}?x-oss-process=style/@{size}";
11
+ background-image: url(@url);
12
+ }
13
+
14
+ //start
15
+ .jfb-base-after-sales {
16
+ box-sizing: border-box;
17
+
18
+ &__body{
19
+ position: relative;
20
+ overflow: hidden;
21
+ z-index: 2
22
+ }
23
+
24
+ &.editx,&.editx:hover {
25
+ position: relative;
26
+ min-height: unit(100, rpx);
27
+ z-index: 3;
28
+ &::after {
29
+ border: 2rpx dashed blue;
30
+ content: " ";
31
+ position: absolute;
32
+ top:0;
33
+ left:0;
34
+ bottom:0;
35
+ right:0;
36
+ z-index: 4;
37
+ cursor: pointer;
38
+ }
39
+
40
+ }
41
+
42
+
43
+ &__edit {
44
+ cursor: pointer;
45
+ position: absolute;
46
+ right: unit(0, rpx);
47
+ top: unit(-52, rpx);
48
+ height: unit(50, rpx);
49
+ line-height: unit(50, rpx);
50
+ display: flex;
51
+ justify-content: center;
52
+ align-items: center;
53
+ background: rgba(0, 0, 0, .6);
54
+ border-radius: unit(10, rpx);
55
+ box-shadow: 0 0 10px rbga(0, 0, 0, 0.3);
56
+ color: #fff;
57
+ font-size: unit(22, rpx);
58
+
59
+ &-icon{
60
+ padding: 0 unit(20, rpx);
61
+ }
62
+
63
+ &.editx {
64
+ box-sizing: border-box;
65
+
66
+ }
67
+ }
68
+ }
69
+ //end
70
+
71
+
72
+ /**notPreview**/
73
+ .jfb-base-after-sales {
74
+ //&:before {
75
+ //content: " ";
76
+ //display: table;
77
+ //}
78
+ }
79
+ /**endNotPreview**/
@@ -0,0 +1,30 @@
1
+ 'use strict';
2
+
3
+
4
+ //@AttrImport
5
+ import Attr from "./Attr";
6
+ //@EndAttrImport
7
+
8
+
9
+ export default {
10
+ data() {
11
+ return {
12
+ //#ifdef H5
13
+
14
+ //@AttrData
15
+ Attr:{}, //对外开发编辑属性
16
+ //@EndAttrData
17
+
18
+ // #endif
19
+ cssRoot: 'jfb-base-after-sales'
20
+ }
21
+ },
22
+ created() {
23
+
24
+ //@AttrDataCreated
25
+ this.Attr = this.$xdUniHelper.customClone(Attr);
26
+ //@EndAttrDataCreated
27
+
28
+
29
+ },
30
+ }