create-weapp-vite 2.0.30 → 2.0.32
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/README.md +1 -0
- package/dist/{chunk-HT7GOIHP.js → chunk-IT75MAH3.js} +3 -2
- package/dist/cli.js +5 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/templates/tailwindcss/package.json +1 -1
- package/templates/tdesign/package.json +1 -1
- package/templates/vant/package.json +1 -1
- package/templates/wevu-retail/.editorconfig +9 -0
- package/templates/wevu-retail/.vscode/settings.json +10 -0
- package/templates/wevu-retail/AGENTS.md +35 -0
- package/templates/wevu-retail/README.md +26 -0
- package/templates/wevu-retail/auto-import-components.json +1 -0
- package/templates/wevu-retail/gitignore +35 -0
- package/templates/wevu-retail/package.json +42 -0
- package/templates/wevu-retail/postcss.config.js +6 -0
- package/templates/wevu-retail/project.config.json +44 -0
- package/templates/wevu-retail/project.private.config.json +8 -0
- package/templates/wevu-retail/src/app.vue +104 -0
- package/templates/wevu-retail/src/common/updateManager.ts +29 -0
- package/templates/wevu-retail/src/components/filter/index.vue +134 -0
- package/templates/wevu-retail/src/components/filter-popup/index.vue +67 -0
- package/templates/wevu-retail/src/components/goods-card/index.vue +219 -0
- package/templates/wevu-retail/src/components/goods-list/index.vue +91 -0
- package/templates/wevu-retail/src/components/load-more/index.vue +99 -0
- package/templates/wevu-retail/src/components/loading-content/index.vue +48 -0
- package/templates/wevu-retail/src/components/price/index.vue +104 -0
- package/templates/wevu-retail/src/components/promotion/ui-coupon-card/index.vue +143 -0
- package/templates/wevu-retail/src/components/promotion/ui-coupon-card/tools.wxs +18 -0
- package/templates/wevu-retail/src/components/swipeout/index.vue +118 -0
- package/templates/wevu-retail/src/components/swipeout/swipe.wxs +151 -0
- package/templates/wevu-retail/src/components/webp-image/index.vue +105 -0
- package/templates/wevu-retail/src/components/webp-image/utils.wxs +140 -0
- package/templates/wevu-retail/src/config/index.ts +20437 -0
- package/templates/wevu-retail/src/custom-tab-bar/data.ts +22 -0
- package/templates/wevu-retail/src/custom-tab-bar/index.vue +62 -0
- package/templates/wevu-retail/src/model/activities.ts +7 -0
- package/templates/wevu-retail/src/model/activity.ts +18 -0
- package/templates/wevu-retail/src/model/address.ts +31 -0
- package/templates/wevu-retail/src/model/cart.ts +306 -0
- package/templates/wevu-retail/src/model/category.ts +175 -0
- package/templates/wevu-retail/src/model/comments/queryDetail.ts +50 -0
- package/templates/wevu-retail/src/model/comments.ts +298 -0
- package/templates/wevu-retail/src/model/coupon.ts +39 -0
- package/templates/wevu-retail/src/model/detailsComments.ts +30 -0
- package/templates/wevu-retail/src/model/good.ts +1904 -0
- package/templates/wevu-retail/src/model/goods.ts +7 -0
- package/templates/wevu-retail/src/model/order/applyService.ts +329 -0
- package/templates/wevu-retail/src/model/order/orderConfirm.ts +147 -0
- package/templates/wevu-retail/src/model/order/orderDetail.ts +1191 -0
- package/templates/wevu-retail/src/model/order/orderList.ts +1033 -0
- package/templates/wevu-retail/src/model/promotion.ts +20 -0
- package/templates/wevu-retail/src/model/search.ts +60 -0
- package/templates/wevu-retail/src/model/submitComment.ts +58 -0
- package/templates/wevu-retail/src/model/swiper.ts +39 -0
- package/templates/wevu-retail/src/model/usercenter.ts +52 -0
- package/templates/wevu-retail/src/pages/cart/components/cart-bar/index.vue +104 -0
- package/templates/wevu-retail/src/pages/cart/components/cart-empty/index.vue +41 -0
- package/templates/wevu-retail/src/pages/cart/components/cart-group/index.vue +333 -0
- package/templates/wevu-retail/src/pages/cart/components/cart-group/index.wxs +5 -0
- package/templates/wevu-retail/src/pages/cart/components/cart-group/utils.wxs +20 -0
- package/templates/wevu-retail/src/pages/cart/components/goods-card/index.vue +334 -0
- package/templates/wevu-retail/src/pages/cart/components/specs-popup/index.vue +100 -0
- package/templates/wevu-retail/src/pages/cart/index.vue +342 -0
- package/templates/wevu-retail/src/pages/category/components/goods-category/components/c-sidebar/README.md +95 -0
- package/templates/wevu-retail/src/pages/category/components/goods-category/components/c-sidebar/c-sidebar-item/index.vue +73 -0
- package/templates/wevu-retail/src/pages/category/components/goods-category/components/c-sidebar/index.vue +121 -0
- package/templates/wevu-retail/src/pages/category/components/goods-category/components/c-tabbar/c-tabbar-more/index.vue +74 -0
- package/templates/wevu-retail/src/pages/category/components/goods-category/components/c-tabbar/index.vue +102 -0
- package/templates/wevu-retail/src/pages/category/components/goods-category/index.vue +137 -0
- package/templates/wevu-retail/src/pages/category/index.vue +50 -0
- package/templates/wevu-retail/src/pages/coupon/components/coupon-card/index.vue +95 -0
- package/templates/wevu-retail/src/pages/coupon/components/floating-button/index.vue +44 -0
- package/templates/wevu-retail/src/pages/coupon/coupon-activity-goods/index.vue +135 -0
- package/templates/wevu-retail/src/pages/coupon/coupon-detail/index.vue +94 -0
- package/templates/wevu-retail/src/pages/coupon/coupon-list/index.vue +136 -0
- package/templates/wevu-retail/src/pages/goods/comments/components/comments-card/components/images-videos/assets/play.png +0 -0
- package/templates/wevu-retail/src/pages/goods/comments/components/comments-card/components/images-videos/index.vue +65 -0
- package/templates/wevu-retail/src/pages/goods/comments/components/comments-card/components/my-video/index.vue +92 -0
- package/templates/wevu-retail/src/pages/goods/comments/components/comments-card/index.vue +93 -0
- package/templates/wevu-retail/src/pages/goods/comments/create/index.vue +196 -0
- package/templates/wevu-retail/src/pages/goods/comments/index.vue +293 -0
- package/templates/wevu-retail/src/pages/goods/details/components/buy-bar/index.vue +117 -0
- package/templates/wevu-retail/src/pages/goods/details/components/goods-specs-popup/index.vue +440 -0
- package/templates/wevu-retail/src/pages/goods/details/components/promotion-popup/index.vue +83 -0
- package/templates/wevu-retail/src/pages/goods/details/index.vue +598 -0
- package/templates/wevu-retail/src/pages/goods/list/index.vue +299 -0
- package/templates/wevu-retail/src/pages/goods/result/index.vue +350 -0
- package/templates/wevu-retail/src/pages/goods/search/index.vue +196 -0
- package/templates/wevu-retail/src/pages/home/home.vue +215 -0
- package/templates/wevu-retail/src/pages/home/readme +8 -0
- package/templates/wevu-retail/src/pages/order/after-service-detail/api.ts +34 -0
- package/templates/wevu-retail/src/pages/order/after-service-detail/index.vue +430 -0
- package/templates/wevu-retail/src/pages/order/after-service-list/api.ts +1262 -0
- package/templates/wevu-retail/src/pages/order/after-service-list/index.vue +299 -0
- package/templates/wevu-retail/src/pages/order/apply-service/index.vue +665 -0
- package/templates/wevu-retail/src/pages/order/components/after-service-button-bar/index.vue +142 -0
- package/templates/wevu-retail/src/pages/order/components/customer-service/index.vue +75 -0
- package/templates/wevu-retail/src/pages/order/components/goods-card/index.vue +356 -0
- package/templates/wevu-retail/src/pages/order/components/noGoods/noGood.wxs +17 -0
- package/templates/wevu-retail/src/pages/order/components/noGoods/noGoods.vue +125 -0
- package/templates/wevu-retail/src/pages/order/components/order-button-bar/index.vue +262 -0
- package/templates/wevu-retail/src/pages/order/components/order-card/index.vue +126 -0
- package/templates/wevu-retail/src/pages/order/components/order-goods-card/index.vue +86 -0
- package/templates/wevu-retail/src/pages/order/components/reason-sheet/index.vue +161 -0
- package/templates/wevu-retail/src/pages/order/components/reason-sheet/reasonSheet.ts +25 -0
- package/templates/wevu-retail/src/pages/order/components/selectCoupons/mock.ts +22 -0
- package/templates/wevu-retail/src/pages/order/components/selectCoupons/selectCoupon.wxs +16 -0
- package/templates/wevu-retail/src/pages/order/components/selectCoupons/selectCoupons.vue +207 -0
- package/templates/wevu-retail/src/pages/order/components/specs-goods-card/index.vue +185 -0
- package/templates/wevu-retail/src/pages/order/config.ts +94 -0
- package/templates/wevu-retail/src/pages/order/delivery-detail/index.vue +145 -0
- package/templates/wevu-retail/src/pages/order/delivery-detail/isUrl.wxs +7 -0
- package/templates/wevu-retail/src/pages/order/fill-tracking-no/api.ts +71 -0
- package/templates/wevu-retail/src/pages/order/fill-tracking-no/index.vue +267 -0
- package/templates/wevu-retail/src/pages/order/invoice/index.vue +94 -0
- package/templates/wevu-retail/src/pages/order/order-confirm/components/address-card/index.vue +78 -0
- package/templates/wevu-retail/src/pages/order/order-confirm/getNotes.wxs +11 -0
- package/templates/wevu-retail/src/pages/order/order-confirm/handleInvoice.wxs +11 -0
- package/templates/wevu-retail/src/pages/order/order-confirm/index.vue +707 -0
- package/templates/wevu-retail/src/pages/order/order-confirm/order.wxs +8 -0
- package/templates/wevu-retail/src/pages/order/order-confirm/pay.ts +115 -0
- package/templates/wevu-retail/src/pages/order/order-detail/index.vue +456 -0
- package/templates/wevu-retail/src/pages/order/order-list/index.vue +288 -0
- package/templates/wevu-retail/src/pages/order/pay-result/index.vue +77 -0
- package/templates/wevu-retail/src/pages/order/receipt/index.vue +336 -0
- package/templates/wevu-retail/src/pages/promotion/promotion-detail/index.vue +145 -0
- package/templates/wevu-retail/src/pages/user/address/edit/index.vue +514 -0
- package/templates/wevu-retail/src/pages/user/address/list/index.vue +249 -0
- package/templates/wevu-retail/src/pages/user/components/t-location/index.vue +156 -0
- package/templates/wevu-retail/src/pages/user/components/ui-address-item/index.vue +92 -0
- package/templates/wevu-retail/src/pages/user/name-edit/index.vue +49 -0
- package/templates/wevu-retail/src/pages/user/person-info/index.vue +198 -0
- package/templates/wevu-retail/src/pages/usercenter/address/edit/util.ts +33 -0
- package/templates/wevu-retail/src/pages/usercenter/components/order-group/index.vue +90 -0
- package/templates/wevu-retail/src/pages/usercenter/components/ui-select-picker/index.vue +108 -0
- package/templates/wevu-retail/src/pages/usercenter/components/user-center-card/index.vue +82 -0
- package/templates/wevu-retail/src/pages/usercenter/index.vue +301 -0
- package/templates/wevu-retail/src/services/_utils/delay.ts +3 -0
- package/templates/wevu-retail/src/services/_utils/timeout.ts +3 -0
- package/templates/wevu-retail/src/services/activity/fetchActivity.ts +20 -0
- package/templates/wevu-retail/src/services/activity/fetchActivityList.ts +20 -0
- package/templates/wevu-retail/src/services/address/edit.ts +33 -0
- package/templates/wevu-retail/src/services/address/fetchAddress.ts +48 -0
- package/templates/wevu-retail/src/services/address/list.ts +31 -0
- package/templates/wevu-retail/src/services/cart/cart.ts +20 -0
- package/templates/wevu-retail/src/services/comments/fetchComments.ts +18 -0
- package/templates/wevu-retail/src/services/comments/fetchCommentsCount.ts +18 -0
- package/templates/wevu-retail/src/services/coupon/index.ts +65 -0
- package/templates/wevu-retail/src/services/good/comments/fetchCommentDetail.ts +20 -0
- package/templates/wevu-retail/src/services/good/fetchCategoryList.ts +18 -0
- package/templates/wevu-retail/src/services/good/fetchGood.ts +18 -0
- package/templates/wevu-retail/src/services/good/fetchGoods.ts +29 -0
- package/templates/wevu-retail/src/services/good/fetchGoodsDetailsComments.ts +37 -0
- package/templates/wevu-retail/src/services/good/fetchGoodsList.ts +39 -0
- package/templates/wevu-retail/src/services/good/fetchSearchHistory.ts +35 -0
- package/templates/wevu-retail/src/services/good/fetchSearchResult.ts +38 -0
- package/templates/wevu-retail/src/services/home/home.ts +53 -0
- package/templates/wevu-retail/src/services/order/applyService.ts +70 -0
- package/templates/wevu-retail/src/services/order/orderConfirm.ts +69 -0
- package/templates/wevu-retail/src/services/order/orderDetail.ts +39 -0
- package/templates/wevu-retail/src/services/order/orderList.ts +39 -0
- package/templates/wevu-retail/src/services/order/orderSubmitComment.ts +22 -0
- package/templates/wevu-retail/src/services/promotion/detail.ts +18 -0
- package/templates/wevu-retail/src/services/usercenter/fetchPerson.ts +28 -0
- package/templates/wevu-retail/src/services/usercenter/fetchUsercenter.ts +18 -0
- package/templates/wevu-retail/src/sitemap.json +7 -0
- package/templates/wevu-retail/src/utils/addressParse.ts +25 -0
- package/templates/wevu-retail/src/utils/getPermission.ts +45 -0
- package/templates/wevu-retail/src/utils/mock.ts +51 -0
- package/templates/wevu-retail/src/utils/util.ts +134 -0
- package/templates/wevu-retail/src/vite-env.d.ts +1 -0
- package/templates/wevu-retail/tailwind.config.ts +15 -0
- package/templates/wevu-retail/tsconfig.app.json +58 -0
- package/templates/wevu-retail/tsconfig.json +11 -0
- package/templates/wevu-retail/tsconfig.node.json +33 -0
- package/templates/wevu-retail/vite.config.ts +14 -0
- package/templates/wevu-tdesign/package.json +1 -1
|
@@ -0,0 +1,665 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import Dialog from 'tdesign-miniprogram/dialog/index';
|
|
3
|
+
import Toast from 'tdesign-miniprogram/toast/index';
|
|
4
|
+
import { priceFormat } from '../../../utils/util';
|
|
5
|
+
import { OrderStatus, ServiceType, ServiceReceiptStatus } from '../config';
|
|
6
|
+
import reasonSheet from '../components/reason-sheet/reasonSheet';
|
|
7
|
+
import {
|
|
8
|
+
fetchRightsPreview,
|
|
9
|
+
dispatchConfirmReceived,
|
|
10
|
+
fetchApplyReasonList,
|
|
11
|
+
dispatchApplyService,
|
|
12
|
+
} from '../../../services/order/applyService';
|
|
13
|
+
|
|
14
|
+
Page({
|
|
15
|
+
query: {},
|
|
16
|
+
data: {
|
|
17
|
+
uploading: false, // 凭证上传状态
|
|
18
|
+
canApplyReturn: true, // 是否可退货
|
|
19
|
+
goodsInfo: {},
|
|
20
|
+
receiptStatusList: [
|
|
21
|
+
{ desc: '未收到货', status: ServiceReceiptStatus.NOT_RECEIPTED },
|
|
22
|
+
{ desc: '已收到货', status: ServiceReceiptStatus.RECEIPTED },
|
|
23
|
+
],
|
|
24
|
+
applyReasons: [],
|
|
25
|
+
serviceType: null, // 20-仅退款,10-退货退款
|
|
26
|
+
serviceFrom: {
|
|
27
|
+
returnNum: 1,
|
|
28
|
+
receiptStatus: { desc: '请选择', status: null },
|
|
29
|
+
applyReason: { desc: '请选择', type: null },
|
|
30
|
+
// max-填写上限(单位分),current-当前值(单位分),temp输入框中的值(单位元)
|
|
31
|
+
amount: { max: 0, current: 0, temp: 0, focus: false },
|
|
32
|
+
remark: '',
|
|
33
|
+
rightsImageUrls: [],
|
|
34
|
+
},
|
|
35
|
+
maxApplyNum: 2, // 最大可申请售后的商品数
|
|
36
|
+
amountTip: '',
|
|
37
|
+
showReceiptStatusDialog: false,
|
|
38
|
+
validateRes: {
|
|
39
|
+
valid: false,
|
|
40
|
+
msg: '',
|
|
41
|
+
},
|
|
42
|
+
submitting: false,
|
|
43
|
+
inputDialogVisible: false,
|
|
44
|
+
uploadGridConfig: {
|
|
45
|
+
column: 3,
|
|
46
|
+
width: 212,
|
|
47
|
+
height: 212,
|
|
48
|
+
},
|
|
49
|
+
serviceRequireType: '',
|
|
50
|
+
},
|
|
51
|
+
|
|
52
|
+
setWatcher(key, callback) {
|
|
53
|
+
let lastData = this.data;
|
|
54
|
+
const keys = key.split('.');
|
|
55
|
+
keys.slice(0, -1).forEach((k) => {
|
|
56
|
+
lastData = lastData[k];
|
|
57
|
+
});
|
|
58
|
+
const lastKey = keys[keys.length - 1];
|
|
59
|
+
this.observe(lastData, lastKey, callback);
|
|
60
|
+
},
|
|
61
|
+
|
|
62
|
+
observe(data, k, callback) {
|
|
63
|
+
let val = data[k];
|
|
64
|
+
Object.defineProperty(data, k, {
|
|
65
|
+
configurable: true,
|
|
66
|
+
enumerable: true,
|
|
67
|
+
set: (value) => {
|
|
68
|
+
val = value;
|
|
69
|
+
callback();
|
|
70
|
+
},
|
|
71
|
+
get: () => {
|
|
72
|
+
return val;
|
|
73
|
+
},
|
|
74
|
+
});
|
|
75
|
+
},
|
|
76
|
+
|
|
77
|
+
validate() {
|
|
78
|
+
let valid = true;
|
|
79
|
+
let msg = '';
|
|
80
|
+
// 检查必填项
|
|
81
|
+
if (!this.data.serviceFrom.applyReason.type) {
|
|
82
|
+
valid = false;
|
|
83
|
+
msg = '请填写退款原因';
|
|
84
|
+
} else if (!this.data.serviceFrom.amount.current) {
|
|
85
|
+
valid = false;
|
|
86
|
+
msg = '请填写退款金额';
|
|
87
|
+
}
|
|
88
|
+
if (this.data.serviceFrom.amount.current <= 0) {
|
|
89
|
+
valid = false;
|
|
90
|
+
msg = '退款金额必须大于0';
|
|
91
|
+
}
|
|
92
|
+
this.setData({ validateRes: { valid, msg } });
|
|
93
|
+
},
|
|
94
|
+
|
|
95
|
+
onLoad(query) {
|
|
96
|
+
this.query = query;
|
|
97
|
+
if (!this.checkQuery()) return;
|
|
98
|
+
this.setData({
|
|
99
|
+
canApplyReturn: query.canApplyReturn === 'true',
|
|
100
|
+
});
|
|
101
|
+
this.init();
|
|
102
|
+
this.inputDialog = this.selectComponent('#input-dialog');
|
|
103
|
+
this.setWatcher('serviceFrom.returnNum', this.validate.bind(this));
|
|
104
|
+
this.setWatcher('serviceFrom.applyReason', this.validate.bind(this));
|
|
105
|
+
this.setWatcher('serviceFrom.amount', this.validate.bind(this));
|
|
106
|
+
this.setWatcher('serviceFrom.rightsImageUrls', this.validate.bind(this));
|
|
107
|
+
},
|
|
108
|
+
|
|
109
|
+
async init() {
|
|
110
|
+
try {
|
|
111
|
+
await this.refresh();
|
|
112
|
+
} catch (e) {}
|
|
113
|
+
},
|
|
114
|
+
|
|
115
|
+
checkQuery() {
|
|
116
|
+
const { orderNo, skuId } = this.query;
|
|
117
|
+
if (!orderNo) {
|
|
118
|
+
Dialog.alert({
|
|
119
|
+
content: '请先选择订单',
|
|
120
|
+
}).then(() => {
|
|
121
|
+
wx.redirectTo({ url: 'pages/order/order-list/index' });
|
|
122
|
+
});
|
|
123
|
+
return false;
|
|
124
|
+
}
|
|
125
|
+
if (!skuId) {
|
|
126
|
+
Dialog.alert({
|
|
127
|
+
content: '请先选择商品',
|
|
128
|
+
}).then(() => {
|
|
129
|
+
wx.redirectTo(`pages/order/order-detail/index?orderNo=${orderNo}`);
|
|
130
|
+
});
|
|
131
|
+
return false;
|
|
132
|
+
}
|
|
133
|
+
return true;
|
|
134
|
+
},
|
|
135
|
+
|
|
136
|
+
async refresh() {
|
|
137
|
+
wx.showLoading({ title: 'loading' });
|
|
138
|
+
try {
|
|
139
|
+
const res = await this.getRightsPreview();
|
|
140
|
+
wx.hideLoading();
|
|
141
|
+
const goodsInfo = {
|
|
142
|
+
id: res.data.skuId,
|
|
143
|
+
thumb: res.data.goodsInfo && res.data.goodsInfo.skuImage,
|
|
144
|
+
title: res.data.goodsInfo && res.data.goodsInfo.goodsName,
|
|
145
|
+
spuId: res.data.spuId,
|
|
146
|
+
skuId: res.data.skuId,
|
|
147
|
+
specs: ((res.data.goodsInfo && res.data.goodsInfo.specInfo) || []).map((s) => s.specValue),
|
|
148
|
+
paidAmountEach: res.data.paidAmountEach,
|
|
149
|
+
boughtQuantity: res.data.boughtQuantity,
|
|
150
|
+
};
|
|
151
|
+
this.setData({
|
|
152
|
+
goodsInfo,
|
|
153
|
+
'serviceFrom.amount': {
|
|
154
|
+
max: res.data.refundableAmount,
|
|
155
|
+
current: res.data.refundableAmount,
|
|
156
|
+
},
|
|
157
|
+
'serviceFrom.returnNum': res.data.numOfSku,
|
|
158
|
+
amountTip: `最多可申请退款¥ ${priceFormat(res.data.refundableAmount, 2)},含发货运费¥ ${priceFormat(
|
|
159
|
+
res.data.shippingFeeIncluded,
|
|
160
|
+
2,
|
|
161
|
+
)}`,
|
|
162
|
+
maxApplyNum: res.data.numOfSkuAvailable,
|
|
163
|
+
});
|
|
164
|
+
} catch (err) {
|
|
165
|
+
wx.hideLoading();
|
|
166
|
+
throw err;
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
|
|
170
|
+
async getRightsPreview() {
|
|
171
|
+
const { orderNo, skuId, spuId } = this.query;
|
|
172
|
+
const params = {
|
|
173
|
+
orderNo,
|
|
174
|
+
skuId,
|
|
175
|
+
spuId,
|
|
176
|
+
numOfSku: this.data.serviceFrom.returnNum,
|
|
177
|
+
};
|
|
178
|
+
const res = await fetchRightsPreview(params);
|
|
179
|
+
return res;
|
|
180
|
+
},
|
|
181
|
+
|
|
182
|
+
onApplyOnlyRefund() {
|
|
183
|
+
wx.setNavigationBarTitle({ title: '申请退款' });
|
|
184
|
+
this.setData({ serviceRequireType: 'REFUND_MONEY' });
|
|
185
|
+
this.switchReceiptStatus(0);
|
|
186
|
+
},
|
|
187
|
+
|
|
188
|
+
onApplyReturnGoods() {
|
|
189
|
+
wx.setNavigationBarTitle({ title: '申请退货退款' });
|
|
190
|
+
this.setData({ serviceRequireType: 'REFUND_GOODS' });
|
|
191
|
+
const orderStatus = parseInt(this.query.orderStatus);
|
|
192
|
+
Promise.resolve()
|
|
193
|
+
.then(() => {
|
|
194
|
+
if (orderStatus === OrderStatus.PENDING_RECEIPT) {
|
|
195
|
+
return Dialog.confirm({
|
|
196
|
+
title: '订单商品是否已经收到货',
|
|
197
|
+
content: '',
|
|
198
|
+
confirmBtn: '确认收货,并申请退货',
|
|
199
|
+
cancelBtn: '未收到货',
|
|
200
|
+
}).then(() => {
|
|
201
|
+
return dispatchConfirmReceived({
|
|
202
|
+
parameter: {
|
|
203
|
+
logisticsNo: this.query.logisticsNo,
|
|
204
|
+
orderNo: this.query.orderNo,
|
|
205
|
+
},
|
|
206
|
+
});
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
return;
|
|
210
|
+
})
|
|
211
|
+
.then(() => {
|
|
212
|
+
this.setData({ serviceType: ServiceType.RETURN_GOODS });
|
|
213
|
+
this.switchReceiptStatus(1);
|
|
214
|
+
});
|
|
215
|
+
},
|
|
216
|
+
|
|
217
|
+
onApplyReturnGoodsStatus() {
|
|
218
|
+
reasonSheet({
|
|
219
|
+
show: true,
|
|
220
|
+
title: '选择退款原因',
|
|
221
|
+
options: this.data.applyReasons.map((r) => ({
|
|
222
|
+
title: r.desc,
|
|
223
|
+
})),
|
|
224
|
+
showConfirmButton: true,
|
|
225
|
+
showCancelButton: true,
|
|
226
|
+
emptyTip: '请选择退款原因',
|
|
227
|
+
}).then((indexes) => {
|
|
228
|
+
this.setData({
|
|
229
|
+
'serviceFrom.applyReason': this.data.applyReasons[indexes[0]],
|
|
230
|
+
});
|
|
231
|
+
});
|
|
232
|
+
},
|
|
233
|
+
|
|
234
|
+
onChangeReturnNum(e) {
|
|
235
|
+
const { value } = e.detail;
|
|
236
|
+
this.setData({
|
|
237
|
+
'serviceFrom.returnNum': value,
|
|
238
|
+
});
|
|
239
|
+
},
|
|
240
|
+
|
|
241
|
+
onApplyGoodsStatus() {
|
|
242
|
+
reasonSheet({
|
|
243
|
+
show: true,
|
|
244
|
+
title: '请选择收货状态',
|
|
245
|
+
options: this.data.receiptStatusList.map((r) => ({
|
|
246
|
+
title: r.desc,
|
|
247
|
+
})),
|
|
248
|
+
showConfirmButton: true,
|
|
249
|
+
emptyTip: '请选择收货状态',
|
|
250
|
+
}).then((indexes) => {
|
|
251
|
+
this.setData({
|
|
252
|
+
'serviceFrom.receiptStatus': this.data.receiptStatusList[indexes[0]],
|
|
253
|
+
});
|
|
254
|
+
});
|
|
255
|
+
},
|
|
256
|
+
|
|
257
|
+
switchReceiptStatus(index) {
|
|
258
|
+
const statusItem = this.data.receiptStatusList[index];
|
|
259
|
+
// 没有找到对应的状态,则清空/初始化
|
|
260
|
+
if (!statusItem) {
|
|
261
|
+
this.setData({
|
|
262
|
+
showReceiptStatusDialog: false,
|
|
263
|
+
'serviceFrom.receiptStatus': { desc: '请选择', status: null },
|
|
264
|
+
'serviceFrom.applyReason': { desc: '请选择', type: null }, // 收货状态改变时,初始化申请原因
|
|
265
|
+
applyReasons: [],
|
|
266
|
+
});
|
|
267
|
+
return;
|
|
268
|
+
}
|
|
269
|
+
// 仅选中项与当前项不一致时,才切换申请原因列表applyReasons
|
|
270
|
+
if (!statusItem || statusItem.status === this.data.serviceFrom.receiptStatus.status) {
|
|
271
|
+
this.setData({ showReceiptStatusDialog: false });
|
|
272
|
+
return;
|
|
273
|
+
}
|
|
274
|
+
this.getApplyReasons(statusItem.status).then((reasons) => {
|
|
275
|
+
this.setData({
|
|
276
|
+
showReceiptStatusDialog: false,
|
|
277
|
+
'serviceFrom.receiptStatus': statusItem,
|
|
278
|
+
'serviceFrom.applyReason': { desc: '请选择', type: null }, // 收货状态改变时,重置申请原因
|
|
279
|
+
applyReasons: reasons,
|
|
280
|
+
});
|
|
281
|
+
});
|
|
282
|
+
},
|
|
283
|
+
|
|
284
|
+
getApplyReasons(receiptStatus) {
|
|
285
|
+
const params = { rightsReasonType: receiptStatus };
|
|
286
|
+
return fetchApplyReasonList(params)
|
|
287
|
+
.then((res) => {
|
|
288
|
+
return res.data.rightsReasonList.map((reason) => ({
|
|
289
|
+
type: reason.id,
|
|
290
|
+
desc: reason.desc,
|
|
291
|
+
}));
|
|
292
|
+
})
|
|
293
|
+
.catch(() => {
|
|
294
|
+
return [];
|
|
295
|
+
});
|
|
296
|
+
},
|
|
297
|
+
|
|
298
|
+
onReceiptStatusDialogConfirm(e) {
|
|
299
|
+
const { index } = e.currentTarget.dataset;
|
|
300
|
+
this.switchReceiptStatus(index);
|
|
301
|
+
},
|
|
302
|
+
|
|
303
|
+
onAmountTap() {
|
|
304
|
+
this.setData({
|
|
305
|
+
'serviceFrom.amount.temp': priceFormat(this.data.serviceFrom.amount.current),
|
|
306
|
+
'serviceFrom.amount.focus': true,
|
|
307
|
+
inputDialogVisible: true,
|
|
308
|
+
});
|
|
309
|
+
this.inputDialog.setData({
|
|
310
|
+
cancelBtn: '取消',
|
|
311
|
+
confirmBtn: '确定',
|
|
312
|
+
});
|
|
313
|
+
this.inputDialog._onConfirm = () => {
|
|
314
|
+
this.setData({
|
|
315
|
+
'serviceFrom.amount.current': this.data.serviceFrom.amount.temp * 100,
|
|
316
|
+
});
|
|
317
|
+
};
|
|
318
|
+
this.inputDialog._onCancel = () => {};
|
|
319
|
+
},
|
|
320
|
+
|
|
321
|
+
// 对输入的值进行过滤
|
|
322
|
+
onAmountInput(e) {
|
|
323
|
+
let { value } = e.detail;
|
|
324
|
+
const regRes = value.match(/\d+(\.?\d*)?/); // 输入中,允许末尾为小数点
|
|
325
|
+
value = regRes ? regRes[0] : '';
|
|
326
|
+
this.setData({ 'serviceFrom.amount.temp': value });
|
|
327
|
+
},
|
|
328
|
+
|
|
329
|
+
// 失去焦点时,更严格的过滤并转化为float
|
|
330
|
+
onAmountBlur(e) {
|
|
331
|
+
let { value } = e.detail;
|
|
332
|
+
const regRes = value.match(/\d+(\.?\d+)?/); // 失去焦点时,不允许末尾为小数点
|
|
333
|
+
value = regRes ? regRes[0] : '0';
|
|
334
|
+
value = parseFloat(value) * 100;
|
|
335
|
+
if (value > this.data.serviceFrom.amount.max) {
|
|
336
|
+
value = this.data.serviceFrom.amount.max;
|
|
337
|
+
}
|
|
338
|
+
this.setData({
|
|
339
|
+
'serviceFrom.amount.temp': priceFormat(value),
|
|
340
|
+
'serviceFrom.amount.focus': false,
|
|
341
|
+
});
|
|
342
|
+
},
|
|
343
|
+
|
|
344
|
+
onAmountFocus() {
|
|
345
|
+
this.setData({ 'serviceFrom.amount.focus': true });
|
|
346
|
+
},
|
|
347
|
+
|
|
348
|
+
onRemarkChange(e) {
|
|
349
|
+
const { value } = e.detail;
|
|
350
|
+
this.setData({
|
|
351
|
+
'serviceFrom.remark': value,
|
|
352
|
+
});
|
|
353
|
+
},
|
|
354
|
+
|
|
355
|
+
// 发起申请售后请求
|
|
356
|
+
onSubmit() {
|
|
357
|
+
this.submitCheck().then(() => {
|
|
358
|
+
const params = {
|
|
359
|
+
rights: {
|
|
360
|
+
orderNo: this.query.orderNo,
|
|
361
|
+
refundRequestAmount: this.data.serviceFrom.amount.current,
|
|
362
|
+
rightsImageUrls: this.data.serviceFrom.rightsImageUrls,
|
|
363
|
+
rightsReasonDesc: this.data.serviceFrom.applyReason.desc,
|
|
364
|
+
rightsReasonType: this.data.serviceFrom.receiptStatus.status,
|
|
365
|
+
rightsType: this.data.serviceType,
|
|
366
|
+
},
|
|
367
|
+
rightsItem: [
|
|
368
|
+
{
|
|
369
|
+
itemTotalAmount: this.data.goodsInfo.price * this.data.serviceFrom.returnNum,
|
|
370
|
+
rightsQuantity: this.data.serviceFrom.returnNum,
|
|
371
|
+
skuId: this.query.skuId,
|
|
372
|
+
spuId: this.query.spuId,
|
|
373
|
+
},
|
|
374
|
+
],
|
|
375
|
+
refundMemo: this.data.serviceFrom.remark.current,
|
|
376
|
+
};
|
|
377
|
+
this.setData({ submitting: true });
|
|
378
|
+
// 发起申请售后请求
|
|
379
|
+
dispatchApplyService(params)
|
|
380
|
+
.then((res) => {
|
|
381
|
+
Toast({
|
|
382
|
+
context: this,
|
|
383
|
+
selector: '#t-toast',
|
|
384
|
+
message: '申请成功',
|
|
385
|
+
icon: '',
|
|
386
|
+
});
|
|
387
|
+
|
|
388
|
+
wx.redirectTo({
|
|
389
|
+
url: `/pages/order/after-service-detail/index?rightsNo=${res.data.rightsNo}`,
|
|
390
|
+
});
|
|
391
|
+
})
|
|
392
|
+
.then(() => this.setData({ submitting: false }))
|
|
393
|
+
.catch(() => this.setData({ submitting: false }));
|
|
394
|
+
});
|
|
395
|
+
},
|
|
396
|
+
|
|
397
|
+
submitCheck() {
|
|
398
|
+
return new Promise((resolve) => {
|
|
399
|
+
const { msg, valid } = this.data.validateRes;
|
|
400
|
+
if (!valid) {
|
|
401
|
+
Toast({
|
|
402
|
+
context: this,
|
|
403
|
+
selector: '#t-toast',
|
|
404
|
+
message: msg,
|
|
405
|
+
icon: '',
|
|
406
|
+
});
|
|
407
|
+
return;
|
|
408
|
+
}
|
|
409
|
+
resolve();
|
|
410
|
+
});
|
|
411
|
+
},
|
|
412
|
+
|
|
413
|
+
handleSuccess(e) {
|
|
414
|
+
const { files } = e.detail;
|
|
415
|
+
this.setData({
|
|
416
|
+
'sessionFrom.rightsImageUrls': files,
|
|
417
|
+
});
|
|
418
|
+
},
|
|
419
|
+
|
|
420
|
+
handleRemove(e) {
|
|
421
|
+
const { index } = e.detail;
|
|
422
|
+
const {
|
|
423
|
+
sessionFrom: { rightsImageUrls },
|
|
424
|
+
} = this.data;
|
|
425
|
+
rightsImageUrls.splice(index, 1);
|
|
426
|
+
this.setData({
|
|
427
|
+
'sessionFrom.rightsImageUrls': rightsImageUrls,
|
|
428
|
+
});
|
|
429
|
+
},
|
|
430
|
+
|
|
431
|
+
handleComplete() {
|
|
432
|
+
this.setData({
|
|
433
|
+
uploading: false,
|
|
434
|
+
});
|
|
435
|
+
},
|
|
436
|
+
|
|
437
|
+
handleSelectChange() {
|
|
438
|
+
this.setData({
|
|
439
|
+
uploading: true,
|
|
440
|
+
});
|
|
441
|
+
},
|
|
442
|
+
});
|
|
443
|
+
</script>
|
|
444
|
+
|
|
445
|
+
<template>
|
|
446
|
+
<view class="select-service [&_.service-form_.service-from-group]:[margin-top:20rpx] [&_.service-form]:[padding-bottom:calc(env(safe-area-inset-bottom)_+_80rpx)] [&_.order-goods-card-footer_.order-goods-card-footer-price-class]:[font-size:36rpx] [&_.order-goods-card-footer_.order-goods-card-footer-price-class]:[color:#333] [&_.order-goods-card-footer_.order-goods-card-footer-price-class]:[font-family:DIN_Alternate] [&_.order-goods-card-footer_.order-goods-card-footer-price-decimal]:[font-size:28rpx] [&_.order-goods-card-footer_.order-goods-card-footer-price-decimal]:[color:#333] [&_.order-goods-card-footer_.order-goods-card-footer-price-decimal]:[font-family:DIN_Alternate] [&_.order-goods-card-footer_.order-goods-card-footer-price-symbol]:[color:#333] [&_.order-goods-card-footer_.order-goods-card-footer-price-symbol]:[font-size:24rpx] [&_.order-goods-card-footer_.order-goods-card-footer-price-symbol]:[font-family:DIN_Alternate] [&_.remark]:[min-height:110rpx] [&_.remark]:[border-radius:10rpx] [&_.remark]:[margin-top:20rpx] [&_.remark]:[background-color:#f5f5f5] [&_.special-cell_.special-cell-note]:[display:flex] [&_.special-cell_.special-cell-note]:[flex-direction:column] [&_.special-cell_.wr-cell__title]:[margin-right:100rpx] [&_.special-cell_.special-cell-note-price-class]:[font-size:36rpx] [&_.special-cell_.special-cell-note-price-class]:[color:#fa4126] [&_.special-cell_.special-cell-note-price-class]:[font-family:DIN_Alternate] [&_.special-cell_.special-cell-note-price-decimal]:[font-size:28rpx] [&_.special-cell_.special-cell-note-price-decimal]:[color:#fa4126] [&_.special-cell_.special-cell-note-price-decimal]:[font-family:DIN_Alternate] [&_.special-cell_.special-cell-note-price-symbol]:[color:#fa4126] [&_.special-cell_.special-cell-note-price-symbol]:[font-size:24rpx] [&_.special-cell_.special-cell-note-price-symbol]:[font-family:DIN_Alternate] [&_.bottom-bar__btn]:[width:686rpx] [&_.bottom-bar__btn]:[background-color:#fa4126] [&_.bottom-bar__btn]:[color:white] [&_.bottom-bar__btn]:[font-size:32rpx] [&_.bottom-bar__btn]:[border-radius:48rpx] [&_.bottom-bar__btn]:[position:absolute] [&_.bottom-bar__btn]:[left:50%] [&_.bottom-bar__btn]:[top:20rpx] [&_.bottom-bar__btn]:[transform:translateX(-50%)] [&_.bottom-bar__btn_.disabled]:[background-color:#c6c6c6] [&_.order-goods-card_.wr-goods-card]:[padding:0_30rpx] [&_.bottom-bar]:[background-color:#fff] [&_.bottom-bar]:[position:fixed] [&_.bottom-bar]:[bottom:0] [&_.bottom-bar]:[left:0] [&_.bottom-bar]:[width:100%] [&_.bottom-bar]:[height:158rpx] [&_.bottom-bar]:[z-index:3]">
|
|
447
|
+
<view class="order-goods-card [background:#fff] [margin-bottom:24rpx]">
|
|
448
|
+
<wr-order-goods-card goods="{{goodsInfo}}" no-top-line thumb-class="order-goods-card-title-class ![width:10rpx]">
|
|
449
|
+
<view slot="footer" class="order-goods-card-footer [display:flex] [width:calc(100%_-_190rpx)] [justify-content:space-between] [position:absolute] [bottom:0] [left:190rpx] [bottom:20rpx]">
|
|
450
|
+
<wr-price
|
|
451
|
+
price="{{goodsInfo.paidAmountEach}}"
|
|
452
|
+
fill
|
|
453
|
+
wr-class="order-goods-card-footer-price-class"
|
|
454
|
+
symbol-class="order-goods-card-footer-price-symbol"
|
|
455
|
+
decimal-class="order-goods-card-footer-price-decimal"
|
|
456
|
+
/>
|
|
457
|
+
<view class="order-goods-card-footer-num [color:#999] [line-height:40rpx]">x {{goodsInfo.boughtQuantity}}</view>
|
|
458
|
+
</view>
|
|
459
|
+
</wr-order-goods-card>
|
|
460
|
+
</view>
|
|
461
|
+
<view wx:if="{{!serviceRequireType}}" class="service-choice [&_.t-cell__title-text]:[color:#333] [&_.t-cell__title-text]:[font-weight:bold]">
|
|
462
|
+
<t-cell-group>
|
|
463
|
+
<t-cell
|
|
464
|
+
title="申请退款(无需退货)"
|
|
465
|
+
arrow
|
|
466
|
+
description="没收到货,或与商家协商同意不用退货只退款"
|
|
467
|
+
bindtap="onApplyOnlyRefund"
|
|
468
|
+
>
|
|
469
|
+
<t-icon
|
|
470
|
+
slot="left-icon"
|
|
471
|
+
prefix="wr"
|
|
472
|
+
class="t-cell__left__icon [position:relative] [top:-24rpx] [margin-right:18rpx]"
|
|
473
|
+
name="goods_refund"
|
|
474
|
+
size="48rpx"
|
|
475
|
+
color="#fa4126"
|
|
476
|
+
/>
|
|
477
|
+
</t-cell>
|
|
478
|
+
<t-cell
|
|
479
|
+
wx:if="{{canApplyReturn}}"
|
|
480
|
+
title="退货退款"
|
|
481
|
+
description="已收到货,需要退还收到的商品"
|
|
482
|
+
arrow
|
|
483
|
+
bindtap="onApplyReturnGoods"
|
|
484
|
+
>
|
|
485
|
+
<t-icon
|
|
486
|
+
slot="left-icon"
|
|
487
|
+
prefix="wr"
|
|
488
|
+
class="t-cell__left__icon [position:relative] [top:-24rpx] [margin-right:18rpx]"
|
|
489
|
+
name="goods_return"
|
|
490
|
+
size="48rpx"
|
|
491
|
+
color="#fa4126"
|
|
492
|
+
/>
|
|
493
|
+
</t-cell>
|
|
494
|
+
<t-cell wx:else class="non-returnable" title="退货退款" description="该商品不支持退货">
|
|
495
|
+
<t-icon
|
|
496
|
+
slot="left-icon"
|
|
497
|
+
prefix="wr"
|
|
498
|
+
class="t-cell__left__icon [position:relative] [top:-24rpx] [margin-right:18rpx]"
|
|
499
|
+
name="goods_return"
|
|
500
|
+
size="48rpx"
|
|
501
|
+
color="#fa4126"
|
|
502
|
+
/>
|
|
503
|
+
</t-cell>
|
|
504
|
+
</t-cell-group>
|
|
505
|
+
</view>
|
|
506
|
+
<!-- 售后表单 -->
|
|
507
|
+
<view wx:else class="service-form [&_.service-from-group_.service-from-group__wrapper_.refund-money-price-class]:[font-size:36rpx] [&_.service-from-group_.service-from-group__wrapper_.refund-money-price-class]:[font-family:DIN_Alternate] [&_.service-from-group_.service-from-group__wrapper_.refund-money-price-decimal]:[font-size:28rpx] [&_.service-from-group_.service-from-group__wrapper_.refund-money-price-decimal]:[font-family:DIN_Alternate] [&_.service-from-group_.service-from-group__wrapper_.refund-money-price-symbol]:[font-size:24rpx] [&_.service-from-group_.service-from-group__wrapper_.refund-money-price-symbol]:[font-family:DIN_Alternate]">
|
|
508
|
+
<view class="service-from-group">
|
|
509
|
+
<t-cell-group>
|
|
510
|
+
<t-cell title="商品收货状态" arrow note="{{serviceFrom.receiptStatus.desc}}" bind:tap="onApplyGoodsStatus" />
|
|
511
|
+
<t-cell
|
|
512
|
+
bordered="{{false}}"
|
|
513
|
+
title="退款原因"
|
|
514
|
+
wx:if="{{canApplyReturn}}"
|
|
515
|
+
note="{{serviceFrom.applyReason.desc}}"
|
|
516
|
+
arrow
|
|
517
|
+
bindtap="onApplyReturnGoodsStatus"
|
|
518
|
+
/>
|
|
519
|
+
</t-cell-group>
|
|
520
|
+
</view>
|
|
521
|
+
<view class="service-from-group">
|
|
522
|
+
<t-cell-group>
|
|
523
|
+
<t-cell title="退款商品数量">
|
|
524
|
+
<t-stepper
|
|
525
|
+
slot="note"
|
|
526
|
+
theme="filled"
|
|
527
|
+
min="1"
|
|
528
|
+
max="{{maxApplyNum}}"
|
|
529
|
+
value="{{serviceFrom.returnNum}}"
|
|
530
|
+
bindchange="onChangeReturnNum"
|
|
531
|
+
/>
|
|
532
|
+
</t-cell>
|
|
533
|
+
<t-cell
|
|
534
|
+
title="退款金额"
|
|
535
|
+
t-class-description="refund-money__description"
|
|
536
|
+
description="{{amountTip}}"
|
|
537
|
+
bind:tap="onAmountTap"
|
|
538
|
+
>
|
|
539
|
+
<view class="service-from-group__wrapper [display:flex] [flex-direction:column] [font-family:DIN_Alternate] [font-weight:bold] [font-size:36rpx] [text-align:right] [color:#fa4126]" slot="note">
|
|
540
|
+
<wr-price
|
|
541
|
+
price="{{serviceFrom.amount.current}}"
|
|
542
|
+
fill
|
|
543
|
+
wr-class="refund-money-price-class"
|
|
544
|
+
symbol-class="refund-money-price-symbol"
|
|
545
|
+
decimal-class="refund-money-price-decimal"
|
|
546
|
+
/>
|
|
547
|
+
<view class="service-from-group__price [display:flex] [align-items:center] [color:#bbb] [font-size:24rpx] [position:relative] [left:30rpx]">
|
|
548
|
+
修改
|
|
549
|
+
<t-icon color="#bbb" name="chevron-right" size="30rpx" slot="left-icon" />
|
|
550
|
+
</view>
|
|
551
|
+
</view>
|
|
552
|
+
</t-cell>
|
|
553
|
+
</t-cell-group>
|
|
554
|
+
</view>
|
|
555
|
+
<view class="service-from-group__textarea [margin-top:20rpx] [background-color:#fff] [padding:32rpx_32rpx_24rpx] [&_.t-textarea__wrapper_.t-textarea__wrapper-textarea]:[height:136rpx] [&_.t-textarea__wrapper_.t-textarea__wrapper-textarea]:[box-sizing:border-box]">
|
|
556
|
+
<text class="textarea--label">退款说明</text>
|
|
557
|
+
<t-textarea
|
|
558
|
+
style="height: 220rpx"
|
|
559
|
+
value="{{serviceFrom.remark}}"
|
|
560
|
+
t-class="textarea--content [margin-top:32rpx] ![background:#f5f5f5] [border-radius:16rpx]"
|
|
561
|
+
maxlength="200"
|
|
562
|
+
indicator
|
|
563
|
+
placeholder="退款说明(选填)"
|
|
564
|
+
bind:change="onRemarkChange"
|
|
565
|
+
/>
|
|
566
|
+
</view>
|
|
567
|
+
<view class="service-from-group__grid [padding:0_32rpx_48rpx] [background:#fff] [margin-bottom:148rpx]">
|
|
568
|
+
<t-upload
|
|
569
|
+
media-type="{{['image','video']}}"
|
|
570
|
+
files="{{sessionFrom.rightsImageUrls}}"
|
|
571
|
+
bind:remove="handleRemove"
|
|
572
|
+
bind:success="handleSuccess"
|
|
573
|
+
bind:complete="handleComplete"
|
|
574
|
+
bind:select-change="handleSelectChange"
|
|
575
|
+
gridConfig="{{uploadGridConfig}}"
|
|
576
|
+
max="3"
|
|
577
|
+
>
|
|
578
|
+
<view slot="add-content" class="upload-addcontent-slot [background-color:#f5f5f5] [height:inherit] [display:flex] [flex-direction:column] [align-items:center] [justify-content:center]">
|
|
579
|
+
<t-icon name="add" size="60rpx" />
|
|
580
|
+
<view class="upload-desc [text-align:center] [display:flex] [flex-direction:column] [font-size:24rpx] [color:#999]">
|
|
581
|
+
<text>上传凭证</text>
|
|
582
|
+
<text>(最多3张)</text>
|
|
583
|
+
</view>
|
|
584
|
+
</view>
|
|
585
|
+
</t-upload>
|
|
586
|
+
</view>
|
|
587
|
+
<view class="bottom-bar">
|
|
588
|
+
<t-button
|
|
589
|
+
t-class="bottom-bar__btn {{validateRes.valid && !uploading ? '' : 'disabled'}}"
|
|
590
|
+
bindtap="onSubmit"
|
|
591
|
+
loading="{{submitting}}"
|
|
592
|
+
>
|
|
593
|
+
提交
|
|
594
|
+
</t-button>
|
|
595
|
+
</view>
|
|
596
|
+
</view>
|
|
597
|
+
</view>
|
|
598
|
+
<!-- 收货状态选择 -->
|
|
599
|
+
<t-popup visible="{{showReceiptStatusDialog}}" placement="bottom" bindclose="onReceiptStatusDialogConfirm">
|
|
600
|
+
<view class="dialog--service-status [background-color:#f3f4f5] [overflow:hidden] [&_.options_.option]:[color:#333333] [&_.options_.option]:[font-size:30rpx] [&_.options_.option]:[text-align:center] [&_.options_.option]:[height:100rpx] [&_.options_.option]:[line-height:100rpx] [&_.options_.option]:[background-color:white] [&_.options_.option--active]:[opacity:0.5] [&_.options_.option_.main]:[color:#fa4126] [&_.cancel]:[color:#333333] [&_.cancel]:[font-size:30rpx] [&_.cancel]:[text-align:center] [&_.cancel]:[height:100rpx] [&_.cancel]:[line-height:100rpx] [&_.cancel]:[background-color:white] [&_.cancel]:[margin-top:20rpx] [&_.cancel--active]:[opacity:0.5]" slot="content">
|
|
601
|
+
<view class="options">
|
|
602
|
+
<view
|
|
603
|
+
wx:for="{{receiptStatusList}}"
|
|
604
|
+
wx:key="status"
|
|
605
|
+
class="option"
|
|
606
|
+
hover-class="option--active"
|
|
607
|
+
bindtap="onReceiptStatusDialogConfirm"
|
|
608
|
+
data-index="{{index}}"
|
|
609
|
+
>
|
|
610
|
+
{{item.desc}}
|
|
611
|
+
</view>
|
|
612
|
+
</view>
|
|
613
|
+
<view class="cancel" hover-class="cancel--active" bindtap="onReceiptStatusDialogConfirm">取消</view>
|
|
614
|
+
</view>
|
|
615
|
+
</t-popup>
|
|
616
|
+
<!-- 理由选择 -->
|
|
617
|
+
<wr-reason-sheet id="wr-reason-sheet" />
|
|
618
|
+
<!-- 金额填写 -->
|
|
619
|
+
<t-dialog
|
|
620
|
+
id="input-dialog"
|
|
621
|
+
visible="{{inputDialogVisible}}"
|
|
622
|
+
class="{{serviceFrom.amount.focus ? 'amount-dialog--focus' : ''}} [&_.popup__content--center]:[top:100rpx] [&_.popup__content--center]:[transform:translate(-50%,_0)]"
|
|
623
|
+
>
|
|
624
|
+
<view class="input-dialog__title [color:#333] [font-size:32rpx] [font-weight:normal]" slot="title">退款金额</view>
|
|
625
|
+
<view class="input-dialog__content [&_.input-dialog__input]:[font-size:72rpx] [&_.input-dialog__input]:[height:64rpx] [&_.input-dialog__input]:[line-height:64rpx] [&_.input]:[font-size:48rpx] [&_.input]:[padding-left:0] [&_.input]:[padding-right:0] [&_.tips]:[margin-top:24rpx] [&_.tips]:[font-size:24rpx] [&_.tips]:[color:#999999]" slot="content">
|
|
626
|
+
<t-input
|
|
627
|
+
t-class="input"
|
|
628
|
+
t-class-input="input-dialog__input"
|
|
629
|
+
t-class-label="input-dialog__label"
|
|
630
|
+
placeholder=""
|
|
631
|
+
value="{{serviceFrom.amount.temp}}"
|
|
632
|
+
type="digit"
|
|
633
|
+
focus="{{serviceFrom.amount.focus}}"
|
|
634
|
+
bindinput="onAmountInput"
|
|
635
|
+
bindfocus="onAmountFocus"
|
|
636
|
+
bindblur="onAmountBlur"
|
|
637
|
+
label="¥"
|
|
638
|
+
></t-input>
|
|
639
|
+
<view class="tips">{{amountTip}}</view>
|
|
640
|
+
</view>
|
|
641
|
+
</t-dialog>
|
|
642
|
+
<t-dialog id="t-dialog" />
|
|
643
|
+
<t-toast id="t-toast" />
|
|
644
|
+
</template>
|
|
645
|
+
|
|
646
|
+
<json>
|
|
647
|
+
{
|
|
648
|
+
"navigationBarTitleText": "选择售后类型",
|
|
649
|
+
"usingComponents": {
|
|
650
|
+
"wr-price": "/components/price/index",
|
|
651
|
+
"wr-order-goods-card": "../components/order-goods-card/index",
|
|
652
|
+
"wr-reason-sheet": "../components/reason-sheet/index",
|
|
653
|
+
"t-cell": "tdesign-miniprogram/cell/cell",
|
|
654
|
+
"t-icon": "tdesign-miniprogram/icon/icon",
|
|
655
|
+
"t-toast": "tdesign-miniprogram/toast/toast",
|
|
656
|
+
"t-dialog": "tdesign-miniprogram/dialog/dialog",
|
|
657
|
+
"t-button": "tdesign-miniprogram/button/button",
|
|
658
|
+
"t-cell-group": "tdesign-miniprogram/cell-group/cell-group",
|
|
659
|
+
"t-stepper": "tdesign-miniprogram/stepper/stepper",
|
|
660
|
+
"t-popup": "tdesign-miniprogram/popup/popup",
|
|
661
|
+
"t-textarea": "tdesign-miniprogram/textarea/textarea",
|
|
662
|
+
"t-input": "tdesign-miniprogram/input/input",
|
|
663
|
+
"t-upload": "tdesign-miniprogram/upload/upload"
|
|
664
|
+
}
|
|
665
|
+
}</json>
|