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.
- package/package.json +1 -1
- package/src/components/JfbBaseAfterSales/Api.js +26 -26
- package/src/components/JfbBaseAfterSales/Attr.js +7 -30
- package/src/components/JfbBaseAfterSales/JfbBaseAfterSales.vue +411 -17
- package/src/components/JfbBaseAfterSales/refundOrderInfo.vue +96 -0
- package/src/components/JfbBaseAfterSalesDetail/Api.js +12 -29
- package/src/components/JfbBaseAfterSalesDetail/Attr.js +1 -35
- package/src/components/JfbBaseAfterSalesDetail/JfbBaseAfterSalesDetail.vue +423 -16
- package/src/components/JfbBaseAfterSalesDetail/secProd.vue +54 -0
- package/src/components/JfbBaseAfterSalesFast/Api.js +12 -40
- package/src/components/JfbBaseAfterSalesFast/Attr.js +12 -28
- package/src/components/JfbBaseAfterSalesFast/JfbBaseAfterSalesFast.vue +181 -19
- package/src/components/JfbBaseAfterSalesList/Api.js +18 -0
- package/src/components/JfbBaseAfterSalesList/Attr.js +48 -0
- package/src/components/JfbBaseAfterSalesList/JfbBaseAfterSalesList.vue +454 -0
- package/src/components/JfbBaseAfterSalesList/JfbBaseAfterSalesListLess.less +79 -0
- package/src/components/JfbBaseAfterSalesList/JfbBaseAfterSalesListMixin.js +30 -0
- package/src/components/JfbBaseAfterSalesList/Mock.js +5 -0
- package/src/components/JfbBaseOrderList/Attr.js +24 -0
- package/src/components/JfbBaseOrderList/JfbBaseOrderList.vue +28 -1
- package/src/components/JfbBaseOrderList/Mock.js +1 -1
- package/src/components/JfbBaseOrderList/XdTfkOrderItem.vue +17 -5
|
@@ -0,0 +1,454 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view
|
|
3
|
+
class="jfb-base-after-sales-list"
|
|
4
|
+
@click="handleEditxSelect"
|
|
5
|
+
:class="{ editx : isEditx && active }"
|
|
6
|
+
>
|
|
7
|
+
<!--#ifdef H5-->
|
|
8
|
+
<view
|
|
9
|
+
class="jfb-base-after-sales-list__edit"
|
|
10
|
+
:class="{ editx : isEditx && active }"
|
|
11
|
+
v-if="isEditx && active"
|
|
12
|
+
>
|
|
13
|
+
<view class="jfb-base-after-sales-list__edit-icon" @click="delEdit">删除</view>
|
|
14
|
+
</view>
|
|
15
|
+
<!-- #endif -->
|
|
16
|
+
<view class="jfb-base-after-sales-list__body" :style="{
|
|
17
|
+
'--main-color': mainColor,
|
|
18
|
+
}">
|
|
19
|
+
<view v-if="showStatusFilter==='Y'" class="filter_tab" :style="{
|
|
20
|
+
top: layoutInfo.top + 'rpx',
|
|
21
|
+
}">
|
|
22
|
+
<view class="filter_item active">处理中</view>
|
|
23
|
+
<view class="filter_item">已完成</view>
|
|
24
|
+
</view>
|
|
25
|
+
<view style="height: 80rpx"></view>
|
|
26
|
+
|
|
27
|
+
<view :style="{ padding: outMargin }">
|
|
28
|
+
<view v-if="loadingList" class="skeleton-wrap">
|
|
29
|
+
<view
|
|
30
|
+
class="jfb-base-after-order-list__body-order" v-for="i in 3" :key="i"
|
|
31
|
+
:style="{
|
|
32
|
+
background: backgroundColor,
|
|
33
|
+
border: borderBox,
|
|
34
|
+
borderRadius: radius + 'rpx',
|
|
35
|
+
boxShadow: shadowBox,
|
|
36
|
+
marginBottom: padding + 'rpx',
|
|
37
|
+
}"
|
|
38
|
+
>
|
|
39
|
+
<view class="jfb-base-after-order-list__body-order-biz">
|
|
40
|
+
<view></view>
|
|
41
|
+
</view>
|
|
42
|
+
<view class="jfb-base-after-order-list__body-order-title">
|
|
43
|
+
<view></view>
|
|
44
|
+
<view></view>
|
|
45
|
+
</view>
|
|
46
|
+
<view class="jfb-base-after-order-list__body-order-content">
|
|
47
|
+
<view class="image"></view>
|
|
48
|
+
<view>
|
|
49
|
+
<view></view>
|
|
50
|
+
<view></view>
|
|
51
|
+
</view>
|
|
52
|
+
</view>
|
|
53
|
+
</view>
|
|
54
|
+
</view>
|
|
55
|
+
<template v-else>
|
|
56
|
+
<view v-if="orderList && orderList.length > 0">
|
|
57
|
+
<view
|
|
58
|
+
class="jfb-base-after-order-list__body-order"
|
|
59
|
+
v-for="(item, index) in orderList"
|
|
60
|
+
:key="index"
|
|
61
|
+
@click="handleToLink(item)"
|
|
62
|
+
:style="{
|
|
63
|
+
background: backgroundColor,
|
|
64
|
+
border: borderBox,
|
|
65
|
+
borderRadius: radius + 'rpx',
|
|
66
|
+
boxShadow: shadowBox,
|
|
67
|
+
marginBottom: padding + 'rpx',
|
|
68
|
+
}"
|
|
69
|
+
>
|
|
70
|
+
<view class="jfb-base-after-order-list__body-order-biz">
|
|
71
|
+
<view
|
|
72
|
+
v-if="item.business_icon"
|
|
73
|
+
class="jfb-base-after-order-list__body-order-biz-icon"
|
|
74
|
+
>
|
|
75
|
+
<xd-font-icon
|
|
76
|
+
:icon="item.business_icon"
|
|
77
|
+
:size="item.business_icon_size"
|
|
78
|
+
></xd-font-icon>
|
|
79
|
+
</view>
|
|
80
|
+
<view>{{ item.business_name }}订单</view>
|
|
81
|
+
</view>
|
|
82
|
+
<view class="jfb-base-after-order-list__body-order-title">
|
|
83
|
+
<view>服务单号:{{ item.order_id }}</view>
|
|
84
|
+
<view :style="{ color: mainColor }">{{ item.after_sale_method_name }}</view>
|
|
85
|
+
</view>
|
|
86
|
+
<view
|
|
87
|
+
class="jfb-base-after-order-list__body-order-content"
|
|
88
|
+
v-for="(Sitem, Sindex) in item.sale_goods"
|
|
89
|
+
:key="Sindex"
|
|
90
|
+
>
|
|
91
|
+
<view><image mode="aspectFit" :src="Sitem.thumb"></image></view>
|
|
92
|
+
<view>
|
|
93
|
+
<view>{{ Sitem.product_name }}</view>
|
|
94
|
+
<view v-if="Sitem.brand_name" class="brand-name" :style="{color:brandTextColor}">{{ Sitem.brand_name }}</view>
|
|
95
|
+
</view>
|
|
96
|
+
|
|
97
|
+
</view>
|
|
98
|
+
</view>
|
|
99
|
+
</view>
|
|
100
|
+
<view v-else class="jfb-base-after-order-list__body-no">
|
|
101
|
+
<xd-font-icon
|
|
102
|
+
size="120"
|
|
103
|
+
color="#B3C1C4"
|
|
104
|
+
icon="iconzanwudingdan"
|
|
105
|
+
></xd-font-icon>
|
|
106
|
+
<view>暂无订单</view>
|
|
107
|
+
</view>
|
|
108
|
+
</template>
|
|
109
|
+
</view>
|
|
110
|
+
</view>
|
|
111
|
+
</view>
|
|
112
|
+
</template>
|
|
113
|
+
|
|
114
|
+
<script>
|
|
115
|
+
import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
|
|
116
|
+
import { jfbRootExec } from "@/utils/xd.event";
|
|
117
|
+
import JfbBaseAfterSalesListMixin from "./JfbBaseAfterSalesListMixin";
|
|
118
|
+
import { getContainerPropsValue } from "@/utils/xd.base";
|
|
119
|
+
import componentsMixins from "@/mixins/componentsMixins";
|
|
120
|
+
import extsMixins from "@/mixins/extsMixins";
|
|
121
|
+
import getServiceUrl from "@/common/getServiceUrl";
|
|
122
|
+
export default {
|
|
123
|
+
name: "JfbBaseAfterSalesList",
|
|
124
|
+
components: {
|
|
125
|
+
XdFontIcon
|
|
126
|
+
},
|
|
127
|
+
mixins: [
|
|
128
|
+
componentsMixins, extsMixins, JfbBaseAfterSalesListMixin
|
|
129
|
+
],
|
|
130
|
+
data() {
|
|
131
|
+
return {
|
|
132
|
+
orderList: [],
|
|
133
|
+
detailPath: "",
|
|
134
|
+
page_size: 10,
|
|
135
|
+
page_token: 1,
|
|
136
|
+
hasNext: true,
|
|
137
|
+
next_page_token: "",
|
|
138
|
+
loadingList: true,
|
|
139
|
+
brandTextColor:'',
|
|
140
|
+
|
|
141
|
+
showStatusFilter: "",
|
|
142
|
+
|
|
143
|
+
//基础
|
|
144
|
+
radius: 0,
|
|
145
|
+
backgroundColor: "",
|
|
146
|
+
padding: 0,
|
|
147
|
+
|
|
148
|
+
//投影
|
|
149
|
+
is_shadow: "Y",
|
|
150
|
+
is_shadow_bg: 0,
|
|
151
|
+
is_shadow_w: 0,
|
|
152
|
+
|
|
153
|
+
//边框
|
|
154
|
+
is_border: "Y",
|
|
155
|
+
is_border_w: 0,
|
|
156
|
+
is_border_c: "",
|
|
157
|
+
|
|
158
|
+
//其他
|
|
159
|
+
margin: {},
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
watch: {
|
|
163
|
+
container(value, oldValue) {
|
|
164
|
+
if (JSON.stringify(value) === JSON.stringify(oldValue)) return;
|
|
165
|
+
if (this.$configProject['isPreview']) this.init(value)
|
|
166
|
+
},
|
|
167
|
+
},
|
|
168
|
+
computed: {
|
|
169
|
+
outMargin() {
|
|
170
|
+
let str = `${this.checkValue(this.margin.top, 20)}rpx`;
|
|
171
|
+
str = `${str} ${this.checkValue(this.margin.right, 20)}rpx`;
|
|
172
|
+
str = `${str} ${this.checkValue(this.margin.bottom, 20)}rpx`;
|
|
173
|
+
str = `${str} ${this.checkValue(this.margin.left, 20)}rpx`;
|
|
174
|
+
return str
|
|
175
|
+
},
|
|
176
|
+
shadowBox() {
|
|
177
|
+
if (this.is_shadow === "Y")
|
|
178
|
+
return `0 0 ${this.is_shadow_w}rpx ${this.is_shadow_bg}`;
|
|
179
|
+
else return "0 0 0 rgba(0,0,0,0)";
|
|
180
|
+
},
|
|
181
|
+
borderBox() {
|
|
182
|
+
if (this.is_border === "Y")
|
|
183
|
+
return `${this.is_border_w}rpx solid ${this.is_border_c}`;
|
|
184
|
+
else return "0";
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
created() {
|
|
188
|
+
this.init(this.container);
|
|
189
|
+
|
|
190
|
+
//todo
|
|
191
|
+
},
|
|
192
|
+
methods: {
|
|
193
|
+
onJfbLoad(options) {
|
|
194
|
+
this.getList();
|
|
195
|
+
},
|
|
196
|
+
/**
|
|
197
|
+
* @description 监听事件变化
|
|
198
|
+
* @param container {object} 业务组件对象自己
|
|
199
|
+
*/
|
|
200
|
+
init(container) {
|
|
201
|
+
this.showStatusFilter = getContainerPropsValue(container, "content.showStatusFilter", "");
|
|
202
|
+
this.margin = getContainerPropsValue(container, "content.margin", {});
|
|
203
|
+
this.radius = getContainerPropsValue(container, "content.radius", 0);
|
|
204
|
+
this.backgroundColor = getContainerPropsValue(container, "content.backgroundColor", "#f8f8f8");
|
|
205
|
+
this.brandTextColor = getContainerPropsValue(container, "content.brandTextColor", this.mainColor);
|
|
206
|
+
|
|
207
|
+
this.padding = getContainerPropsValue(container, "content.padding", 20);
|
|
208
|
+
|
|
209
|
+
this.is_shadow = getContainerPropsValue(container, "content.is_shadow", "N");
|
|
210
|
+
this.is_shadow_bg = getContainerPropsValue(container, "content.is_shadow_bg", "#fff");
|
|
211
|
+
this.is_shadow_w = getContainerPropsValue(container, "content.is_shadow_w", "10");
|
|
212
|
+
|
|
213
|
+
this.is_border = getContainerPropsValue(container, "content.is_border", "N");
|
|
214
|
+
this.is_border_c = getContainerPropsValue(container, "content.is_border_c", "#fff");
|
|
215
|
+
this.is_border_w = getContainerPropsValue(container, "content.is_border_w", 2);
|
|
216
|
+
this.detailPath = getContainerPropsValue(container, "content.detailPath", { value: "" }).value;
|
|
217
|
+
},
|
|
218
|
+
getList() {
|
|
219
|
+
this.$xdShowLoading({});
|
|
220
|
+
jfbRootExec("getAfterServiceOrderList", {
|
|
221
|
+
vm: this,
|
|
222
|
+
data: {
|
|
223
|
+
page_size: this.page_size,
|
|
224
|
+
page_token: this.page_token,
|
|
225
|
+
},
|
|
226
|
+
})
|
|
227
|
+
.then((res) => {
|
|
228
|
+
this.loadingList = false;
|
|
229
|
+
this.$xdHideLoading();
|
|
230
|
+
let list =
|
|
231
|
+
res.list &&
|
|
232
|
+
res.list.map((item) => {
|
|
233
|
+
item.sale_goods.map((Sitem) => {
|
|
234
|
+
Sitem.thumb = getServiceUrl(Sitem.thumb);
|
|
235
|
+
});
|
|
236
|
+
return item;
|
|
237
|
+
});
|
|
238
|
+
if (this.page_token === 1) {
|
|
239
|
+
this.orderList = list;
|
|
240
|
+
} else {
|
|
241
|
+
console.log(
|
|
242
|
+
this.orderList,
|
|
243
|
+
res.list,
|
|
244
|
+
"this.page_tokenthis.page_token"
|
|
245
|
+
);
|
|
246
|
+
this.orderList = this.orderList.concat(list);
|
|
247
|
+
}
|
|
248
|
+
this.hasNext = res.next_page_token !== "";
|
|
249
|
+
this.next_page_token = res.next_page_token;
|
|
250
|
+
})
|
|
251
|
+
.catch((err) => {
|
|
252
|
+
this.$xdHideLoading();
|
|
253
|
+
});
|
|
254
|
+
},
|
|
255
|
+
handleToLink(item) {
|
|
256
|
+
this.$xdUniHelper.navigateTo({
|
|
257
|
+
url: `${this.detailPath}?id=${item.order_id}`,
|
|
258
|
+
});
|
|
259
|
+
},
|
|
260
|
+
onJfbScroll(options) {
|
|
261
|
+
console.log("event.onJfbScroll", options);
|
|
262
|
+
},
|
|
263
|
+
onJfbReachBottom(options) {
|
|
264
|
+
if (this.hasNext) {
|
|
265
|
+
this.page_token = this.next_page_token;
|
|
266
|
+
this.getList();
|
|
267
|
+
}
|
|
268
|
+
},
|
|
269
|
+
onJfbShow(options) {
|
|
270
|
+
console.log('event.onJfbShow', options)
|
|
271
|
+
},
|
|
272
|
+
onJfbHide(options) {
|
|
273
|
+
console.log('event.onJfbHide', options)
|
|
274
|
+
},
|
|
275
|
+
onJfbBack(options) {
|
|
276
|
+
console.log('event.onJfbBack', options)
|
|
277
|
+
},
|
|
278
|
+
onJfbUpdate(...data) {
|
|
279
|
+
console.log('event.onJfbUpdate', data)
|
|
280
|
+
},
|
|
281
|
+
onJfbCustomEvent(options) {
|
|
282
|
+
console.log('event.onJfbReachBottom', options)
|
|
283
|
+
},
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
</script>
|
|
288
|
+
|
|
289
|
+
<style scoped lang="less">
|
|
290
|
+
@import "./JfbBaseAfterSalesListLess.less";
|
|
291
|
+
|
|
292
|
+
.jfb-base-after-sales-list {
|
|
293
|
+
&__body{
|
|
294
|
+
.filter_tab{
|
|
295
|
+
display: flex;
|
|
296
|
+
align-items: center;
|
|
297
|
+
justify-content: center;
|
|
298
|
+
height: 80rpx;
|
|
299
|
+
line-height: 80rpx;
|
|
300
|
+
border-bottom: 1px solid #DDD;
|
|
301
|
+
position: fixed;
|
|
302
|
+
top: 0;
|
|
303
|
+
left: 0;
|
|
304
|
+
width: 100%;
|
|
305
|
+
.filter_item{
|
|
306
|
+
margin: 0 40rpx;
|
|
307
|
+
&.active{
|
|
308
|
+
border-bottom: 1px solid var(--main-color);
|
|
309
|
+
color: var(--main-color);
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
.brand-name {
|
|
314
|
+
padding-top: 5rpx;
|
|
315
|
+
font-size: 24rpx;
|
|
316
|
+
margin-bottom: 6rpx;
|
|
317
|
+
.uni-max-cut(2, 64);
|
|
318
|
+
line-height: 32rpx;
|
|
319
|
+
}
|
|
320
|
+
&-no {
|
|
321
|
+
display: flex;
|
|
322
|
+
justify-content: center;
|
|
323
|
+
align-items: center;
|
|
324
|
+
flex-direction: column;
|
|
325
|
+
color: #b3c1c4;
|
|
326
|
+
font-size: unit(32, rpx);
|
|
327
|
+
margin-top: unit(360, rpx);
|
|
328
|
+
& > view {
|
|
329
|
+
margin-top: unit(30, rpx);
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
&-order {
|
|
333
|
+
border-radius: unit(20, rpx);
|
|
334
|
+
padding: unit(30, rpx);
|
|
335
|
+
background: rgba(255, 255, 255, 1);
|
|
336
|
+
box-shadow: 0px unit(4, rpx) unit(24, rpx) 0px rgba(154, 0, 255, 0.05);
|
|
337
|
+
margin-bottom: unit(32, rpx);
|
|
338
|
+
|
|
339
|
+
&-biz {
|
|
340
|
+
color: #333333;
|
|
341
|
+
font-size: unit(28, rpx);
|
|
342
|
+
padding-bottom: unit(30, rpx);
|
|
343
|
+
border-bottom: unit(2, rpx) solid #eee;
|
|
344
|
+
display: flex;
|
|
345
|
+
align-items: center;
|
|
346
|
+
|
|
347
|
+
& > view {
|
|
348
|
+
.skeleton-wrap &{
|
|
349
|
+
.skeleton-item(100rpx, 40rpx, 20rpx);
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
&-icon {
|
|
354
|
+
margin-right: unit(10, rpx);
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
&-title {
|
|
359
|
+
display: flex;
|
|
360
|
+
align-items: center;
|
|
361
|
+
justify-content: space-between;
|
|
362
|
+
font-size: unit(24, rpx);
|
|
363
|
+
font-weight: 500;
|
|
364
|
+
padding-top: unit(40, rpx);
|
|
365
|
+
color: #333333;
|
|
366
|
+
|
|
367
|
+
& > view:first-child {
|
|
368
|
+
.skeleton-wrap &{
|
|
369
|
+
.skeleton-item(300rpx, 40rpx, 20rpx);
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
& > view:nth-child(2) {
|
|
374
|
+
display: flex;
|
|
375
|
+
align-items: center;
|
|
376
|
+
font-weight: 400;
|
|
377
|
+
.skeleton-wrap &{
|
|
378
|
+
.skeleton-item(100rpx);
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
&-content {
|
|
384
|
+
display: flex;
|
|
385
|
+
align-items: center;
|
|
386
|
+
padding-top: unit(40, rpx);
|
|
387
|
+
|
|
388
|
+
& > view:first-child {
|
|
389
|
+
width: 160rpx;
|
|
390
|
+
height: 160rpx;
|
|
391
|
+
flex-shrink: 0;
|
|
392
|
+
margin-right: 20rpx;
|
|
393
|
+
|
|
394
|
+
image {
|
|
395
|
+
width: unit(160, rpx);
|
|
396
|
+
height: unit(160, rpx);
|
|
397
|
+
border-radius: unit(8, rpx);
|
|
398
|
+
flex-shrink: 0;
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
.image{
|
|
403
|
+
.skeleton-wrap &{
|
|
404
|
+
.skeleton-item(160rpx, 160rpx);
|
|
405
|
+
max-height: none;
|
|
406
|
+
flex: none;
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
& > view:last-child {
|
|
411
|
+
flex: 1;
|
|
412
|
+
& > view {
|
|
413
|
+
&:nth-child(2) {
|
|
414
|
+
margin-top: 20rpx;
|
|
415
|
+
}
|
|
416
|
+
.skeleton-wrap &{
|
|
417
|
+
.skeleton-item(100%);
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
//& > view {
|
|
423
|
+
// margin-left: unit(20, rpx);
|
|
424
|
+
// flex: 1;
|
|
425
|
+
// font-size: unit(32, rpx);
|
|
426
|
+
// color: #333333;
|
|
427
|
+
// font-weight: 500;
|
|
428
|
+
// .uni-max-cut(1, 64);
|
|
429
|
+
// line-height: unit(64, rpx);
|
|
430
|
+
//}
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
&-bottom {
|
|
434
|
+
display: flex;
|
|
435
|
+
justify-content: space-between;
|
|
436
|
+
align-items: center;
|
|
437
|
+
font-size: unit(24, rpx);
|
|
438
|
+
background: #eeeeee;
|
|
439
|
+
padding: unit(20, rpx);
|
|
440
|
+
border-radius: unit(12, rpx);
|
|
441
|
+
|
|
442
|
+
& > view:first-child {
|
|
443
|
+
font-weight: 500;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
& > view:nth-child(2) {
|
|
447
|
+
display: flex;
|
|
448
|
+
color: #999999;
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
</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-list {
|
|
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-list {
|
|
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-list'
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
created() {
|
|
23
|
+
|
|
24
|
+
//@AttrDataCreated
|
|
25
|
+
this.Attr = this.$xdUniHelper.customClone(Attr);
|
|
26
|
+
//@EndAttrDataCreated
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
},
|
|
30
|
+
}
|
|
@@ -276,6 +276,30 @@ export default {
|
|
|
276
276
|
},
|
|
277
277
|
inline: false,
|
|
278
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
|
+
},
|
|
279
303
|
].filter(i=>i)
|
|
280
304
|
},
|
|
281
305
|
advanced: [],
|
|
@@ -155,7 +155,16 @@
|
|
|
155
155
|
v-if="item.buttons.length"
|
|
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>
|
|
@@ -273,6 +283,9 @@ export default {
|
|
|
273
283
|
layout_style: "old",
|
|
274
284
|
isShowOrderNo: "Y",
|
|
275
285
|
|
|
286
|
+
refundPath: "",
|
|
287
|
+
refundFastPath: "",
|
|
288
|
+
|
|
276
289
|
noticeBgc:'',
|
|
277
290
|
};
|
|
278
291
|
},
|
|
@@ -337,7 +350,7 @@ export default {
|
|
|
337
350
|
* @param container {object} 业务组件对象自己
|
|
338
351
|
*/
|
|
339
352
|
init(container) {
|
|
340
|
-
this.showApplyAfter = getContainerPropsValue(container, "content.showApplyAfter", "");
|
|
353
|
+
this.showApplyAfter = getContainerPropsValue(container, "content.showApplyAfter", "N");
|
|
341
354
|
this.margin = getContainerPropsValue(container, "content.margin", {top: 0, left: 0, right: 0, bottom: 0,});
|
|
342
355
|
this.radius = getContainerPropsValue(container, "content.radius", 0);
|
|
343
356
|
this.backgroundColor = getContainerPropsValue(container, "content.backgroundColor", "#f8f8f8");
|
|
@@ -366,6 +379,8 @@ export default {
|
|
|
366
379
|
|
|
367
380
|
this.detailPath = getContainerPropsValue(container, "content.detailPath", { value: "" }).value;
|
|
368
381
|
this.payPath = getContainerPropsValue(container, "content.payPath", {value: "",}).value;
|
|
382
|
+
this.refundPath = getContainerPropsValue(container, "content.refundPath", {value: "",}).value;
|
|
383
|
+
this.refundFastPath = getContainerPropsValue(container, "content.refundFastPath", {value: "",}).value;
|
|
369
384
|
this.layout_style = getContainerPropsValue(container, "content.layout_style", "old");
|
|
370
385
|
this.isShowOrderNo = getContainerPropsValue(container, "content.isShowOrderNo", "Y");
|
|
371
386
|
this.tabList = getContainerPropsValue(container, "content.orderTypeList", []).map((item) => {
|
|
@@ -435,6 +450,18 @@ export default {
|
|
|
435
450
|
this.$xdUniHelper.navigateTo({
|
|
436
451
|
url: `${this.payPath}?order_id=${item.pay_order_id}&main_order_id=${item.main_order_id}`,
|
|
437
452
|
});
|
|
453
|
+
} else if( action === 'apply_refund'){
|
|
454
|
+
//普通退款
|
|
455
|
+
if(item.is_support_quick_refund !== "Y"){
|
|
456
|
+
this.$xdUniHelper.navigateTo({
|
|
457
|
+
url: `${this.refundPath}?order_id=${item.main_order_id}`,
|
|
458
|
+
});
|
|
459
|
+
}else{
|
|
460
|
+
//极速退款
|
|
461
|
+
this.$xdUniHelper.navigateTo({
|
|
462
|
+
url: `${this.refundFastPath}?order_id=${item.main_order_id}`,
|
|
463
|
+
});
|
|
464
|
+
}
|
|
438
465
|
}
|
|
439
466
|
},
|
|
440
467
|
|
|
@@ -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",
|