feat: 完成上门页面
This commit is contained in:
parent
f436bb536f
commit
d05d048eb3
|
|
@ -73,6 +73,12 @@ class Api {
|
|||
let url = `${config.host}/worker/common/ossParams`;
|
||||
return fetch.request('postFrom', url, data, true)
|
||||
}
|
||||
|
||||
// 完成上门
|
||||
static arrivedOnSite(data) {
|
||||
let url = `${config.host}/worker/order_dispatch/arrivedOnSite`;
|
||||
return fetch.request('postFrom', url, data, true)
|
||||
}
|
||||
}
|
||||
|
||||
export default Api
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
</view>
|
||||
<me-empty-space height="376"></me-empty-space>
|
||||
<view class="bottom">
|
||||
<me-button @click="submit()" text="提交" width="686rpx" icon-type="icon-checkbox-circle" margin-top="32rpx"></me-button>
|
||||
<me-button @click="submit()" text="完成上门" width="686rpx" icon-type="icon-checkbox-circle" margin-top="32rpx"></me-button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
|
@ -112,7 +112,16 @@ const submit = throttle(() => {
|
|||
uni.showLoading({
|
||||
title: '提交中'
|
||||
});
|
||||
// uni.hideLoading();
|
||||
api.arrivedOnSite({order_dispatch_id: id.value, img: img.value}).then(() => {
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title: '已上门',
|
||||
icon: "success"
|
||||
})
|
||||
setTimeout(() => {
|
||||
helpers.jumpToPage('order-info', `id=${id.value}`, 'redirectTo')
|
||||
}, 1000)
|
||||
}).catch(() => {})
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ const submit = throttle(() => {
|
|||
uni.showLoading({
|
||||
title: '提交中'
|
||||
});
|
||||
api.appointmentTime({order_dispatch_id: id.value, plan_time: data.value.plan_time}).then(res => {
|
||||
api.appointmentTime({order_dispatch_id: id.value, plan_time: data.value.plan_time}).then(() => {
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title: '预约成功',
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user