diff --git a/pages.json b/pages.json
index 117dbe0..d62c59f 100644
--- a/pages.json
+++ b/pages.json
@@ -52,6 +52,13 @@
{
"navigationBarTitleText" : "已和客户沟通"
}
+ },
+ {
+ "path" : "pages/order/arrived-on-site",
+ "style" :
+ {
+ "navigationBarTitleText" : "完成上门"
+ }
}
],
"globalStyle": {
diff --git a/pages/order/arrived-on-site.vue b/pages/order/arrived-on-site.vue
new file mode 100644
index 0000000..10301ad
--- /dev/null
+++ b/pages/order/arrived-on-site.vue
@@ -0,0 +1,187 @@
+
+
+
+
+
+ 上门后请提交信息
+
+
+
+ 拍照打卡
+ 请上传上门的打卡照片
+
+
+
+
+ 点击上传
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/order/order-info.vue b/pages/order/order-info.vue
index d891d70..0139839 100644
--- a/pages/order/order-info.vue
+++ b/pages/order/order-info.vue
@@ -18,7 +18,7 @@
{{data.order_info.item_title}}
-
+
客户姓名
@@ -50,14 +50,22 @@
-
+
+
-
+
+
+
+
+
+
+
+
@@ -72,6 +80,26 @@ import {ref, reactive, computed, watch, inject} from 'vue'
import api from "../../api/api";
import enums from "../../utils/enums";
+//打开客户位置
+const openLocation = () => {
+ uni.openLocation({
+ latitude: Number(data.value.order_info.lat),
+ longitude: Number(data.value.order_info.lng),
+ success: function () {
+ console.log('success');
+ },
+ fail: function () {
+ helpers.showToast('客户经纬度不正确,请联系平台')
+ }
+ });
+}
+
+//完成上门
+const arrivedOnSite = () => {
+ helpers.jumpToPage('arrived-on-site', 'id=' + id.value)
+}
+
+//选择上门时间
const selectTime = () => {
helpers.jumpToPage('select-time', 'id=' + id.value)
}
diff --git a/pages/order/select-time.vue b/pages/order/select-time.vue
index f39bd97..d8bd96f 100644
--- a/pages/order/select-time.vue
+++ b/pages/order/select-time.vue
@@ -33,6 +33,7 @@ import {ref} from 'vue'
import {onLoad} from '@dcloudio/uni-app'
import api from "../../api/api";
import {throttle} from "../../utils/throttle";
+import enums from "../../utils/enums";
//预约上门时间
const submit = throttle(() => {
@@ -69,8 +70,8 @@ onLoad((params) => {
const data = ref(null)
const init = () => {
api.orderInfo({order_dispatch_id: id.value}).then(res => {
- if (res.status !== 10) {
- return helpers.showToast('该订单已预约')
+ if (res.status !== enums.ORDER_DISPATCH_STATUS.STATUS_GOTIT) {
+ return helpers.showToast('该订单不可预约上门时间')
}
data.value = res
diff --git a/utils/helpers.js b/utils/helpers.js
index 9ef70e0..438185d 100644
--- a/utils/helpers.js
+++ b/utils/helpers.js
@@ -23,6 +23,8 @@ class helpers {
'index': '/pages/index/index',
//选择上门时间
'select-time': '/pages/order/select-time',
+ //完成上门
+ 'arrived-on-site': '/pages/order/arrived-on-site',
}
url = paths[pathName]