From d2e8fb809725fb8e1dbe0a49ff3f910bb52031c1 Mon Sep 17 00:00:00 2001 From: bb_pan Date: Wed, 27 Aug 2025 19:37:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E8=AF=95=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/repair/repairManage/code-operate.vue | 14 +++++++++++--- src/pages/repair/repairManage/code-view.vue | 2 +- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/pages/repair/repairManage/code-operate.vue b/src/pages/repair/repairManage/code-operate.vue index 4d529d5..03f2974 100644 --- a/src/pages/repair/repairManage/code-operate.vue +++ b/src/pages/repair/repairManage/code-operate.vue @@ -296,9 +296,11 @@ const isExpanded = ref(false) onLoad((options) => { console.log(options) + console.log('🚀 ~ options:', options.itemId) queryParams.value = JSON.parse(options.queryParams) - rowIndex.value = options.rowIndex - console.log(queryParams.value) + console.log('🚀 ~ queryParams.value:', queryParams.value) + rowIndex.value = queryParams.value.repairDeviceList.findIndex((v) => v.id == options.itemId) + console.log('🚀 ~ rowIndex.value:', rowIndex.value) getScrapReasonListData() }) onShow(() => { @@ -763,10 +765,15 @@ const saveCode = () => { } } } +const isSubmit = ref(false) //维修完成请求 const saveCodeApi = async () => { + if (isSubmit.value) return + isSubmit.value = true //请求接口 - rowData.value = queryParams.value + rowData.value = JSON.parse(JSON.stringify(queryParams.value)) + console.log('🚀 ~ saveCodeApi ~ rowData.value:', rowData.value) + //维修人员 rowData.value.repairDeviceList[rowIndex.value].repairList = [ { @@ -821,6 +828,7 @@ const saveCodeApi = async () => { }).catch((error) => { console.log(error) }).finally(() => { + isSubmit.value = false uni.hideLoading() }) } diff --git a/src/pages/repair/repairManage/code-view.vue b/src/pages/repair/repairManage/code-view.vue index 1203560..594d779 100644 --- a/src/pages/repair/repairManage/code-view.vue +++ b/src/pages/repair/repairManage/code-view.vue @@ -179,7 +179,7 @@ const goOperate = (item,index) => { if(item.status==0){ const codingUrl = '/pages/repair/repairManage/code-operate' // 编码维修 uni.navigateTo({ - url: `${codingUrl}?queryParams=${JSON.stringify(queryParams.value)}&rowIndex=${index}`, + url: `${codingUrl}?queryParams=${JSON.stringify(queryParams.value)}&itemId=${item.id}`, }) } }