diff --git a/api/api.js b/api/api.js
index ec6e0c7..a51c63b 100644
--- a/api/api.js
+++ b/api/api.js
@@ -91,6 +91,18 @@ class Api {
let url = `${config.host}/worker/abnormal/index`;
return fetch.request('GET', url, {}, true)
}
+
+ // 获取订单异常详情
+ static orderAbnormalInfo(data) {
+ let url = `${config.host}/worker/order_abnormal/info`;
+ return fetch.request('GET', url, data, true)
+ }
+
+ // 上报异常
+ static createOrderAbnormal(data) {
+ let url = `${config.host}/worker/order_abnormal/create`;
+ return fetch.request('postFrom', url, data, true)
+ }
}
export default Api
diff --git a/pages/order/order-info.vue b/pages/order/order-info.vue
index 74fe271..340e683 100644
--- a/pages/order/order-info.vue
+++ b/pages/order/order-info.vue
@@ -47,6 +47,12 @@
客户备注
{{data.remark ? data.remark : '无备注信息'}}
+
+
+
+ 上报异常
+
+
@@ -91,7 +97,7 @@
{{data.order_info.online_amount}}元抵扣{{data.order_info.discount_amount}}元
-
+
尾款收款方
{{ data.offline_total_type === 1 ? '师傅收' : '公司收' }}
@@ -164,6 +170,11 @@ const openLocation = () => {
});
}
+//上报异常
+const reportOrderException = (orderId) => {
+ helpers.jumpToPage('report-order-exception', `order_id=${orderId}`)
+}
+
//完成上门
const arrivedOnSite = () => {
helpers.jumpToPage('arrived-on-site', 'id=' + id.value)
@@ -228,7 +239,7 @@ onShow(() => {
const data = ref(null)
const init = () => {
uni.showLoading({
- title: '获取中'
+ title: '加载中'
});
api.orderInfo({order_dispatch_id: id.value}).then(res => {
data.value = res
@@ -347,6 +358,19 @@ const previewImage = (url) => {
line-height: 48rpx;
}
}
+ .report-order-exception {
+ width: 100%;
+ height: 80rpx;
+ .report-ctr {
+ width: 198rpx;
+ height: 64rpx;
+ border-radius: 8rpx;
+ .text {
+ font-size: 28rpx;
+ color: var(--importantColor);
+ }
+ }
+ }
.images {
width: 100%;
position: relative;
diff --git a/pages/order/report-order-exception.vue b/pages/order/report-order-exception.vue
index f1407b0..b224e1f 100644
--- a/pages/order/report-order-exception.vue
+++ b/pages/order/report-order-exception.vue
@@ -1,23 +1,32 @@
-
+
-
+
+
+
+ 异常原因
+ 请选择异常原因
+ {{typeList[typeListIndex].title}}
+
+
+
+
异常原因
- 请选择异常原因
- {{typeList[typeListIndex].title}}
+ {{orderInfo.abnormal_title}}
-
+
异常说明
-
+
+
-
+
@@ -49,48 +58,54 @@ const submit = throttle(() => {
uni.showModal({
title: '提示信息',
confirmText: '确认',
- content: '确认已完成所有服务?',
+ content: '确认上报异常?',
success: function (res) {
if (res.confirm) {
uni.showLoading({
title: '提交中'
});
- let data = helpers.deepObj(submitData)
- data.complete_images = (submitData.complete_images).join(',')
- data.order_dispatch_id = id.value
+ submitData.order_id = orderId.value
- api.completeService(data).then(() => {
+ api.createOrderAbnormal(submitData).then(() => {
uni.hideLoading();
uni.showToast({
- title: '已完成服务',
+ title: '完成上报',
icon: "success"
})
- setTimeout(() => {
- uni.navigateBack();
- }, 1000)
+ init()
}).catch(() => {})
}
}
});
})
-const id = ref(null)
+const orderId = ref(null)
onLoad((params) => {
- id.value = params.id
+ orderId.value = params.order_id
+ uni.showLoading({
+ title: '加载中'
+ })
init()
})
-const data = ref(null)
+const orderInfo = ref(null)
const typeList = ref(null)
const init = () => {
- api.orderInfo({order_dispatch_id: id.value}).then(res => {
- data.value = res
+ api.orderAbnormalInfo({order_id: orderId.value}).then(res => {
+ orderInfo.value = res
+
+ if (orderInfo.value.id !== undefined) {
+ uni.setNavigationBarTitle({
+ title: '上报详情',
+ })
+ }
+
+ uni.hideLoading()
}).catch(() => {})
api.findExceptionTypeList().then(res => {
typeList.value = res
- console.log(typeList.value)
}).catch(() => {})
}
diff --git a/pages/workbench/workbench.vue b/pages/workbench/workbench.vue
index 8490575..6cbf4b1 100644
--- a/pages/workbench/workbench.vue
+++ b/pages/workbench/workbench.vue
@@ -60,7 +60,7 @@
{{getOrderStatusText(item.status)}}
-
+
上报异常
@@ -89,8 +89,8 @@ const toDetail = (id) => {
}
//上报异常
-const reportOrderException = (id) => {
- helpers.jumpToPage('report-order-exception', `id=${id}`)
+const reportOrderException = (orderId) => {
+ helpers.jumpToPage('report-order-exception', `order_id=${orderId}`)
}
//是否显示骨架屏
diff --git a/static/css/form.scss b/static/css/form.scss
index 77fb39f..42a9264 100644
--- a/static/css/form.scss
+++ b/static/css/form.scss
@@ -24,6 +24,7 @@
width: 100%;
height: 80rpx;
font-size: 30rpx;
+ font-weight: 500;
color: var(--titleColor);
}
.value {
@@ -46,6 +47,7 @@
height: 100rpx;
font-size: 30rpx;
color: var(--titleColor);
+ font-weight: 500;
}
.value {
width: 446rpx;
@@ -73,6 +75,7 @@
height: 80rpx;
font-size: 30rpx;
color: var(--titleColor);
+ font-weight: 500;
}
.desc {
margin-left: 8rpx;
@@ -122,6 +125,7 @@
width: 200rpx;
height: 100rpx;
font-size: 30rpx;
+ font-weight: 500;
color: var(--titleColor);
}
.input-ctr {
@@ -148,4 +152,4 @@
color: var(--titleColor);
}
}
-}
\ No newline at end of file
+}