diff --git a/components/me-button/me-button.vue b/components/me-button/me-button.vue
index 96d6a8f..d1b3aff 100644
--- a/components/me-button/me-button.vue
+++ b/components/me-button/me-button.vue
@@ -142,8 +142,6 @@ const submit = () => {
font-size: 30rpx;
line-height: 112rpx;
text-align: center;
- color: transparent;
- transition: background .2s ease;
.text {
height: 96rpx;
line-height: 96rpx;
@@ -160,7 +158,6 @@ const submit = () => {
.btn {
border: 1px solid var(--contentBgColor);
box-sizing: border-box;
- background-color: transparent;
}
}
}
diff --git a/pages/index/index.vue b/pages/index/index.vue
index a42bdfe..1d070d1 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -68,7 +68,12 @@ const acceptOrder = (index, id) => {
content: '接单后请及时和客户联系,确认接单?',
success: function (res) {
if (res.confirm) {
+ uni.showLoading({
+ title: '接单中'
+ });
+
api.orderConfirm({type: 'accept', order_dispatch_id: id}).then(res => {
+ uni.hideLoading();
helpers.showToast('已接单')
data.list.splice(index, 1)
}).catch(() => {})
@@ -81,10 +86,19 @@ const rejectOrder = (index, id) => {
uni.showModal({
title: '拒接提示',
confirmText: '确认',
- content: '确认拒接该单?',
+ editable: true,
+ placeholderText: '请输入拒接原因',
success: function (res) {
if (res.confirm) {
- api.orderConfirm({type: 'reject', order_dispatch_id: id}).then(res => {
+ if (!res.content) {
+ return helpers.showToast('请输入拒接原因')
+ }
+
+ uni.showLoading({
+ title: '拒接中'
+ });
+ api.orderConfirm({type: 'reject', order_dispatch_id: id, reject_reason: res.content}).then(() => {
+ uni.hideLoading();
helpers.showToast('已拒接')
data.list.splice(index, 1)
}).catch(() => {})
diff --git a/pages/order/arrived-on-site.vue b/pages/order/arrived-on-site.vue
index ab6222e..f5530f9 100644
--- a/pages/order/arrived-on-site.vue
+++ b/pages/order/arrived-on-site.vue
@@ -126,7 +126,7 @@ const submit = throttle(() => {
icon: "success"
})
setTimeout(() => {
- helpers.jumpToPage('order-info', `id=${id.value}`, 'redirectTo')
+ uni.navigateBack();
}, 1000)
}).catch(() => {})
}
diff --git a/pages/order/complete-service.vue b/pages/order/complete-service.vue
index 73f1a05..c4c7ec4 100644
--- a/pages/order/complete-service.vue
+++ b/pages/order/complete-service.vue
@@ -39,7 +39,7 @@
尾款收款方
- 请选择尾款收款方
+ 请选择尾款收款方
{{submitData.offline_total_type === 1 ? '师傅收' : '公司收'}}
@@ -185,7 +185,7 @@ const submit = throttle(() => {
icon: "success"
})
setTimeout(() => {
- helpers.jumpToPage('order-info', `id=${id.value}`, 'redirectTo')
+ uni.navigateBack();
}, 1000)
}).catch(() => {})
}
@@ -214,7 +214,7 @@ const init = () => {
const submitData = reactive({
complete_images: [],//完成图片
final_payment_method: null,//尾款支付方式:1=线下尾款,2=线上尾款
- offline_total_type: null,//尾款收款方:1=师傅收,2=公司收
+ offline_total_type: 0,//尾款收款方:1=师傅收,2=公司收
amount: '',//收款金额
payment_image: '',//收款图片
})
@@ -255,7 +255,7 @@ const validate = () => {
return false
}
- if (submitData.final_payment_method === 1 && submitData.offline_total_type === null) {
+ if (submitData.final_payment_method === 1 && submitData.offline_total_type === 0) {
helpers.showToast('请选择尾款收款方')
return false
}
diff --git a/pages/order/order-info.vue b/pages/order/order-info.vue
index ccca734..74fe271 100644
--- a/pages/order/order-info.vue
+++ b/pages/order/order-info.vue
@@ -57,7 +57,7 @@
-
+
上门时间
@@ -75,6 +75,44 @@
+
+
+
+ 完成图片
+
+
+
+
+
+
+
+ 优惠信息
+
+ {{data.order_info.online_amount}}元抵扣{{data.order_info.discount_amount}}元
+
+
+
+ 尾款收款方
+
+ {{ data.offline_total_type === 1 ? '师傅收' : '公司收' }}
+
+
+
+ 收款金额
+
+ ¥{{ data.total > 0 ? data.total : data.online_total }}
+
+
+
+ 收款凭证
+
+
+
+
+
+
+
+
@@ -165,6 +203,10 @@ const rejectOrder = () => {
placeholderText: '请输入拒接原因',
success: function (res) {
if (res.confirm) {
+ if (!res.content) {
+ return helpers.showToast('请输入拒接原因')
+ }
+
api.orderConfirm({type: 'reject', order_dispatch_id: id.value, reject_reason: res.content}).then(() => {
helpers.showToast('已拒接')
init()
@@ -185,8 +227,12 @@ onShow(() => {
const data = ref(null)
const init = () => {
+ uni.showLoading({
+ title: '获取中'
+ });
api.orderInfo({order_dispatch_id: id.value}).then(res => {
data.value = res
+ uni.hideLoading();
}).catch(() => {})
}
@@ -303,6 +349,7 @@ const previewImage = (url) => {
}
.images {
width: 100%;
+ position: relative;
.title {
width: 100%;
height: 80rpx;
diff --git a/pages/order/select-time.vue b/pages/order/select-time.vue
index 287e6b3..b497f48 100644
--- a/pages/order/select-time.vue
+++ b/pages/order/select-time.vue
@@ -53,7 +53,7 @@ const submit = throttle(() => {
icon: "success"
})
setTimeout(() => {
- helpers.jumpToPage('order-info', `id=${id.value}`, 'redirectTo')
+ uni.navigateBack();
}, 1000)
}).catch(() => {})
}
diff --git a/pages/workbench/workbench.vue b/pages/workbench/workbench.vue
index 5cde3a0..00d75c5 100644
--- a/pages/workbench/workbench.vue
+++ b/pages/workbench/workbench.vue
@@ -106,7 +106,7 @@ const call = (tel) => {
});
}
-onLoad(() => {
+onShow(() => {
init()
})