From 0a68226c3bab6318dba5ce5a25269755c64c2bbc Mon Sep 17 00:00:00 2001 From: Zy <1448159279@qq.com> Date: Thu, 3 Sep 2026 17:03:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A1=E6=A3=80-=E6=97=A9=E4=BA=8E=E5=B7=A1?= =?UTF-8?q?=E6=A3=80=E6=97=B6=E9=97=B4=EF=BC=8C=E7=A6=81=E6=AD=A2=E6=8F=90?= =?UTF-8?q?=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/filePicker/filePicker.vue | 49 ++++++++--------- .../inspection/inspection_upload.vue | 52 +++++++++++++++++-- .../pageSubPack/ticket/repairMain.vue | 23 ++++---- 3 files changed, 88 insertions(+), 36 deletions(-) diff --git a/wuye-manager-uniapp/components/filePicker/filePicker.vue b/wuye-manager-uniapp/components/filePicker/filePicker.vue index 6d206ae..a30124a 100644 --- a/wuye-manager-uniapp/components/filePicker/filePicker.vue +++ b/wuye-manager-uniapp/components/filePicker/filePicker.vue @@ -5,8 +5,8 @@ - - + + @@ -14,19 +14,22 @@ 上传中... - - + + - - diff --git a/wuye-manager-uniapp/pageSubPack/inspection/inspection_upload.vue b/wuye-manager-uniapp/pageSubPack/inspection/inspection_upload.vue index 3ab25f6..dd1ff6e 100644 --- a/wuye-manager-uniapp/pageSubPack/inspection/inspection_upload.vue +++ b/wuye-manager-uniapp/pageSubPack/inspection/inspection_upload.vue @@ -77,6 +77,7 @@ file-field-name="file" uploadUrl="/api/butler/file/uploadImage" @fail="onUploadFail" + :disabled="disableUpload" > @@ -92,7 +93,14 @@ - + 提交 @@ -149,6 +157,26 @@ const rules = { } } +// 限制提交任务时间段 true 不可以提交 false 可以提交 +const disableUpload = computed(() => { + if (info.value) { + const day = new Date() + const [start, end] = info.value.taskTime.split('-') ?? [] + if (start && end) { + const startTime = day.toLocaleDateString() + ' ' + start + ':00' + const endTime = day.toLocaleDateString() + ' ' + end + ':00' + if (new Date(startTime).getTime() <= day.getTime()) { + return false + } else { + return true + } + } else { + return true + } + } else { + return true + } +}) function init() { if (!taskid.value) return getInspectionMain(taskid.value) @@ -168,7 +196,6 @@ function init() { files: ite.imgUrl ? ite.imgUrl.split(',') : [] } }) - console.log(points) return { routeName: item.routeName, routeId: item.routeId, @@ -192,7 +219,6 @@ onLoad(options => { }) // ---------------------------------------------- - function onUploadFail() { uni.showToast({ icon: 'error', @@ -200,14 +226,28 @@ function onUploadFail() { }) } +let isSubmit = false + /** 提交巡检点 检查情况 */ function handleSubmit(item) { + if (isSubmit) return + isSubmit = true + if (disableUpload.value) { + uni.showToast({ + icon: 'none', + title: '不在任务时间段内', + mask: true + }) + isSubmit = false + return + } if (item.files.length <= 0) { uni.showToast({ icon: 'error', mask: true, title: '必须拍照' }) + isSubmit = false return } uni.showLoading({ @@ -243,6 +283,7 @@ function handleSubmit(item) { }) .finally(() => { uni.hideLoading() + isSubmit = false }) } @@ -393,6 +434,11 @@ function previewImages(images, currentIndex) { color: #ffffff; line-height: 80rpx; margin-top: 40rpx; + + &.disable { + background-color: #ccc; + color: #fff; + } } } diff --git a/wuye-manager-uniapp/pageSubPack/ticket/repairMain.vue b/wuye-manager-uniapp/pageSubPack/ticket/repairMain.vue index 766d51f..ebc72e0 100644 --- a/wuye-manager-uniapp/pageSubPack/ticket/repairMain.vue +++ b/wuye-manager-uniapp/pageSubPack/ticket/repairMain.vue @@ -16,9 +16,7 @@ {{ data.desc }} - {{ - repairInfo.updateTime - }} + {{ data.time }} @@ -150,10 +148,10 @@ import { getTicketMainById, shareRepairUser } from '@/api/ticket.js' const currentStep = ref(2) // 步骤数据 const stepList = ref([ - { title: '提交维修信息', desc: '等待提交报修' }, - { title: '待分配', desc: '等待物业派单中' }, - { title: '待解决', desc: '等待维修人员' }, - { title: '维修完成', desc: '填写维修记录' } + { title: '提交维修信息', desc: '等待提交报修', time: '' }, + { title: '待分配', desc: '等待物业派单中', time: '' }, + { title: '待解决', desc: '等待维修人员', time: '' }, + { title: '维修完成', desc: '填写维修记录', time: '' } ]) // -------------------------------------- const queryParams = ref({ @@ -231,18 +229,21 @@ function getTicketById() { function handleStop(row) { // 0 已提交 1 已分配 2已解决 let status = row.problemStatus - + const repairInfo = row.repairProcessList[0] currentStep.value = 0 // 维修步骤:0提交 1分配 2维修完成 / 待解决 3记录完成 完成 if (status === '0') { currentStep.value = 1 stepList.value[0].desc = '提交报修成功' + stepList.value[0].time = repairInfo.submitTime return } if (status === '1') { currentStep.value = 2 + stepList.value[0].time = repairInfo.submitTime stepList.value[1].title = '已派单' stepList.value[1].desc = '物业已派单' + stepList.value[1].time = repairInfo.allocateTime stepList.value[2].title = '待解决' stepList.value[2].desc = `维修人员(${row.repairName})维修中` return @@ -250,10 +251,14 @@ function handleStop(row) { if (status === '2') { currentStep.value = 4 stepList.value[0].desc = '提交报修成功' + stepList.value[0].time = repairInfo.submitTime stepList.value[1].title = '已派单' stepList.value[1].desc = '物业已派单' + stepList.value[1].time = repairInfo.allocateTime stepList.value[2].title = '已解决' stepList.value[2].desc = `维修人员(${row.repairName})已解决` + stepList.value[2].time = repairInfo.completeTime + stepList.value[3].time = repairInfo.completeTime return } } @@ -346,7 +351,7 @@ function handlePrivew(items, index = 0) { .subtime { font-weight: 400; font-size: 22rpx; - color: #999999; + color: rgba(77, 93, 250, 1); line-height: 40rpx; } }