diff --git a/common/js/request.js b/common/js/request.js
index a4022a6..fcf4f6b 100644
--- a/common/js/request.js
+++ b/common/js/request.js
@@ -603,6 +603,19 @@ export default {
})
return res[1].data;
},
+ async delAfterServiceRecord(ids) {
+ let res = await uni.request({
+ url: '/worker/record/remove',
+ method: 'POST',
+ data: {
+ ids: ids
+ },
+ header: {
+ 'content-type': 'application/x-www-form-urlencoded'
+ }
+ })
+ return res[1].data;
+ },
async getOrderAfterServiceRecords(params = {}) {
let res = await uni.request({
url: '/worker/record/app/list',
@@ -622,5 +635,13 @@ export default {
}
})
return res[1].data;
- }
+ },
+ async getChangeOrderPrice(params = {}) {
+ let res = await uni.request({
+ url: '/order/detail/app/getChangePrice',
+ method: 'POST',
+ data: params
+ })
+ return res[1].data;
+ },
}
diff --git a/pages/my/components/modal/apply-after-service.vue b/pages/my/components/modal/apply-after-service.vue
index 0f5adcd..5ee2b4e 100644
--- a/pages/my/components/modal/apply-after-service.vue
+++ b/pages/my/components/modal/apply-after-service.vue
@@ -20,9 +20,13 @@
v-model="customerReasonType">
-
+
+ 最大可退款金额:
+ {{detailObj ? detailObj.payMoney : 0}}
+
+
退款金额:
-
+
具体原因:
@@ -152,7 +156,30 @@
}
})
},
+ validData() {
+ let errMsg = null;
+ if (!this.detailObj) {
+ errMsg = "请选择子单";
+ } else if (this.refund == null) {
+ errMsg = "退款金额不能为空";
+ } else if (this.refund > this.detailObj.payMoney) {
+ errMsg = "不可超出最大退款金额";
+ }
+ if (errMsg) {
+ uni.showToast({
+ title: errMsg,
+ duration: 1500,
+ icon: 'none'
+ })
+ return false;
+ }
+ return true;
+ },
async apply() {
+ if (!this.validData()) {
+ return;
+ }
+
let imgObjList = [];
this.imgList.forEach(url => {
imgObjList.push({
@@ -181,8 +208,9 @@
}
if (updateStatusRes && updateStatusRes.code === 0) {
uni.showToast({
- icon: 'success',
- duration: 1000
+ title: '已发起售后,进度可在订单详情内查看',
+ icon: 'none',
+ duration: 2000
})
this.hideModal();
this.$emit('confirmFeedback');
diff --git a/pages/my/serv-detail.vue b/pages/my/serv-detail.vue
index f1ad9fb..3d367ae 100644
--- a/pages/my/serv-detail.vue
+++ b/pages/my/serv-detail.vue
@@ -94,7 +94,7 @@
v-for="(item, index) in servDetail.orderStandardDetailList">
- 施工记录
+ 服务记录
编码:{{item.orderDetailCode}}
@@ -131,9 +131,12 @@
-
- 客户发起
-
+
+ 客户发起
+
+
+ 退单退款已提交至商家,其最大时限24小时内需完成操作!
退款申请:
-
+
+ 售后已提交至商家,其最大时限24小时内需完成操作!
待处理售后:
-
+
-->
-
-
-
- 取消订单
-
-
- 发起投诉
-
-
- 发起售后/投诉
-
-
- 退单退款
-
-
-
-
+
+
+ 取消订单
+
+
+ 发起投诉
+
+
+ 发起投诉/售后
+
+
+ 退单退款
+
+
+
@@ -314,7 +315,7 @@
servDetail: {},
finishRecord4Show: [],
servingColumnHeaders: ['购买型号', '购买量', '待服务'],
- servedColumnHeaders: ['购买型号', '购买量', '已服务'],
+ servedColumnHeaders: ['购买型号', '待服务', '已服务'],
servingValFields: ['standardName', 'standardNum', 'waitServerNum'],
servedValFields: ['standardName', 'standardNum', 'serverNum'],
process: '',
@@ -400,11 +401,11 @@
customerFinalCheck: agreeStatus
});
if (res && res.code === 0) {
- uni.showToast({
- icon: 'success',
- duration: 1000
+ this.loadData(this.servDetail.orderMasterId);
+ uni.showToast({
+ icon: 'success',
+ duration: 1000
})
- this.loadData(this.servDetail.orderMasterId);
return;
}
uni.showToast({
@@ -426,7 +427,24 @@
},
showModalByRef(refName, curOrder, params) {
this.$refs[refName].showModal(curOrder, params);
- }
+ },
+ async cancelAfterService(id) {
+ let res = await this.$request.delAfterServiceRecord(id);
+ if (res && res.code === 0) {
+ this.loadData(this.servDetail.orderMasterId);
+ uni.showToast({
+ icon: 'success',
+ title: '撤销成功',
+ duration: 1000
+ })
+ } else {
+ uni.showToast({
+ icon: 'error',
+ title: '撤销失败',
+ duration: 1000
+ })
+ }
+ },
}
}
@@ -435,16 +453,6 @@
.bar-first-action {
margin-left: unset !important;
font-size: 30rpx !important;
- }
-
- .fixed-bottom-popup {
- position: fixed !important;
- width: 100% !important;
- bottom: 0 !important;
- margin-bottom: 0 !important;
- z-index: 98;
- padding-bottom: constant(safe-area-inset-bottom) !important;
- padding-bottom: env(safe-area-inset-bottom) !important;
}
.cu-bar.tabbar .action {