From e2b2b6d18e766f8499a15838326804615ae703da Mon Sep 17 00:00:00 2001 From: gcd Date: Fri, 30 May 2025 22:21:58 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=AE=8C=E6=88=90=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=8F=AF=E6=8F=90=E4=BA=A4=E6=9D=90=E6=96=99?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages.json | 14 ++--- pages/order/arrived-on-site.vue | 2 +- pages/order/complete-service.vue | 85 ++++++++++++++++++++++++-- pages/order/report-order-exception.vue | 7 ++- pages/order/update-progress.vue | 30 ++++----- static/css/form.scss | 3 +- 6 files changed, 110 insertions(+), 31 deletions(-) diff --git a/pages.json b/pages.json index 64fd4b4..105690e 100644 --- a/pages.json +++ b/pages.json @@ -88,13 +88,13 @@ { "navigationBarTitleText" : "隐私协议" } - }, - { - "path" : "pages/order/update-progress", - "style" : - { - "navigationBarTitleText" : "更新进度" - } + }, + { + "path" : "pages/order/update-progress", + "style" : + { + "navigationBarTitleText" : "更新施工进度" + } } ], "globalStyle": { diff --git a/pages/order/arrived-on-site.vue b/pages/order/arrived-on-site.vue index 6d96234..0991fed 100644 --- a/pages/order/arrived-on-site.vue +++ b/pages/order/arrived-on-site.vue @@ -20,7 +20,7 @@ - 点击上传 diff --git a/pages/order/complete-service.vue b/pages/order/complete-service.vue index a81edf1..6a76aa2 100644 --- a/pages/order/complete-service.vue +++ b/pages/order/complete-service.vue @@ -15,12 +15,12 @@ - + - 点击上传 @@ -28,6 +28,46 @@ + + + + 提交材料信息 + + + 是否使用材料 + {{submitData.is_material_used === 1 ? '已使用' : '未使用'}} + + + @@ -39,8 +79,8 @@ 收款方式 - 请选择收款方式 - {{submitData.final_payment_method === 1 ? '线下尾款' : '线上尾款'}} + 请选择收款方式 + {{submitData.final_payment_method === 1 ? '线下尾款' : '线上尾款'}} @@ -96,6 +136,18 @@ import api from "../../api/api"; import {throttle} from "../../utils/throttle"; import enums from "../../utils/enums"; +const selectIsMaterialUsed = () => { + uni.showActionSheet({ + itemList: ['未使用', '已使用'], + success: function (res) { + submitData.is_material_used = res.tapIndex; + }, + fail: function (res) { + console.log(res.errMsg); + } + }); +} + /** * 上传完成图片 * @param type 上传类型:complete=完成图片,collectPayment=收款图片 @@ -139,6 +191,10 @@ const upload = (type) => { submitData.complete_images.push(fullUrl) } + if (type === 'material_images') { + submitData.material_images.push(fullUrl) + } + if (type === 'collectPayment') { submitData.payment_image = fullUrl } @@ -159,8 +215,8 @@ const upload = (type) => { } //删除完成图片 -const delImg = (idx) => { - submitData.complete_images.splice(idx, 1) +const delImg = (type, idx) => { + submitData[type].splice(idx, 1) helpers.showToast('图片已删除') } @@ -188,6 +244,7 @@ const submit = throttle(() => { let data = helpers.deepObj(submitData) data.complete_images = (submitData.complete_images).join(',') + data.material_images = (submitData.material_images).join(',') data.order_dispatch_id = id.value api.completeService(data).then(() => { @@ -231,6 +288,9 @@ const submitData = reactive({ amount: '',//收款金额 payment_image: '',//收款图片 receive_type: null,//收款类型:1=定金,2=全款 + is_material_used: 0,//是否使用材料:0=未使用,1=已使用 + material_cost: null,//材料成本 + material_images: [],//材料凭证 }) const selectFinalPaymentMethod = () => { @@ -268,6 +328,19 @@ const validate = () => { return true } + // 使用材料 + if (submitData.is_material_used === 1) { + if (submitData.material_cost === null) { + helpers.showToast('请输入材料成本') + return false + } + + if (submitData.material_images.length === 0) { + helpers.showToast('请上传材料凭证图片') + return false + } + } + if (submitData.final_payment_method === null) { helpers.showToast('请选择收款方式') return false diff --git a/pages/order/report-order-exception.vue b/pages/order/report-order-exception.vue index 8a5ad8d..ccd57b5 100644 --- a/pages/order/report-order-exception.vue +++ b/pages/order/report-order-exception.vue @@ -4,8 +4,10 @@ 异常原因 - 请选择异常原因 - {{ abnormalTitle }} + 请选择异常原因 + + + {{ abnormalTitle }} @@ -32,6 +34,7 @@ import {ref, reactive, computed} from 'vue' import {onLoad} from '@dcloudio/uni-app' import api from "../../api/api"; import {throttle} from "../../utils/throttle"; +import MeIcon from "../../components/me-icon/me-icon.vue"; const bindPickerChange = (e) => { typeListIndex.value = e.detail.value; diff --git a/pages/order/update-progress.vue b/pages/order/update-progress.vue index 1d93455..5893518 100644 --- a/pages/order/update-progress.vue +++ b/pages/order/update-progress.vue @@ -1,12 +1,10 @@