From b5a9dccccaf5bed064891a05ec8ff3f21de9cff0 Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期三, 25 九月 2024 16:31:14 +0800
Subject: [PATCH] Merge branch 'master' of http://bore.pub:10439/r/ERP_override

---
 north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue |   52 +++++++++++++++++++++++++++++++++++-----------------
 1 files changed, 35 insertions(+), 17 deletions(-)

diff --git a/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue b/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue
index 9caac38..595cdeb 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue
@@ -103,6 +103,10 @@
         titleSelectJson.value = res.data.basic
         layer= res.data.layer
 
+        //娣诲姞琛ョ墖鐘舵�佸垪
+        let column = {field: 'patchStatusOther', width: 90,title: res.data.title}
+        gridOptions.columns.push(column)
+
         const s01Values = [];
         for (let i = 0; i < res.data.reportingWorkDetails.length; i++) {
           const s01Values = [];
@@ -145,7 +149,6 @@
 })
 
 const data = [{id:1,num:2},{id:1,num:3},{id:2,num:2},{id:1,num:2}];
-
 
 //琛ㄥ熬姹傚拰
 const sumNum = (list, field) => {
@@ -428,12 +431,12 @@
         }
         case 'update':  {
           //鏍规嵁琛ョ墖鐘舵�佸垽鏂槸鍚﹁兘淇敼
-          request.post(`/reportingWork/getPatchCondition/${route.query.reportingWorkId}`).then(async (res) => {
-            if (res.code == 200) {
-              if (res.data > 0) {
-                ElMessage.error("璇ユ姤宸ュ寘鍚凡琛ョ墖鏁版嵁锛屼笉鍙慨鏀�!")
-                return
-              } else {
+          // request.post(`/reportingWork/getPatchCondition/${route.query.reportingWorkId}`).then(async (res) => {
+          //   if (res.code == 200) {
+          //     if (res.data > 0) {
+          //       ElMessage.error("璇ユ姤宸ュ寘鍚凡琛ョ墖鏁版嵁锛屼笉鍙慨鏀�!")
+          //       return
+          //     } else {
                 getQuantity()
                 const errMap = await $grid.validate(true)
                 if (errMap) {
@@ -441,11 +444,11 @@
                   return
                 }
                 saveReportingWork(0, 'update')
-              }
-            } else {
-              ElMessage.warning(res.msg)
-            }
-          })
+           //   }
+          //   } else {
+          //     ElMessage.warning(res.msg)
+          //   }
+          // })
 
           break
         }
@@ -463,7 +466,9 @@
     const { rows, column, cell } = params; // 瑙f瀯鑾峰彇琛屻�佸垪鍜屽崟鍏冩牸淇℃伅
     //鐐瑰嚮娆$牬鏁伴噺鏃舵墦寮�鏄庣粏鐣岄潰
     if(column.field=="breakageQuantity"){
-      brokenVisible.value = true
+      if (row.patchStatusOther!="宸茶ˉ鐗�"){
+        brokenVisible.value = true
+      }
     }
   },
   menuClick({menu, row, column}) {
@@ -788,14 +793,15 @@
 
 //绗竴娆″姞杞芥暟鎹�
 let groupChangeProcess = ref(false)//鐢ㄤ簬鏈彮缁勬樉绀洪棶棰�
-request.post(`/reportingWork/selectProcess`).then((res) => {
+request.post(`/reportingWork/selectProcess/${user.user.userId}`).then((res) => {
   if (res.code == 200) {
     titleSelectJson.value.processType = res.data.process
     if(user.user.address!==null && user.user.address!==''){
       titleUploadData.value.thisProcess = user.user.address
       titleUploadData.value.teamsGroupsName = user.user.userName
-      if (user.user.address!=='鎶�鏈儴澶氭洸'){
-        groupChangeProcess.value = true
+      groupChangeProcess.value = true
+      if (user.user.address==='鎶�鏈儴澶氭洸' || user.user.address==='澶硅兌'){
+        groupChangeProcess.value = false
       }
       gridOptions.toolbarConfig.buttons[1].visible=false
     }
@@ -1010,7 +1016,8 @@
     process: titleUploadData.value.previousProcess,
     processId:processId,
     thisProcess:titleUploadData.value.thisProcess,
-    technologyStr:technologyStr
+    technologyStr:technologyStr,
+    userName:user.user.userName
   }
   loadingFlag.value= true
   request.post("/reportingWork/reviewReportingWork",reportWork).then((res) =>{
@@ -1292,6 +1299,16 @@
     return row?.rowClass
 
 }
+const editConfigDisable = reactive({
+  trigger: 'click',
+  mode: 'cell',
+  beforeEditMethod ({ row }) {
+    if (row.patchStatusOther === '宸茶ˉ鐗�') {
+      return false
+    }
+    return true
+  }
+})
 
 </script>
 
@@ -1469,6 +1486,7 @@
           v-on="gridEvents"
           @edit-closed="editClosedEvent"
           :cell-class-name="cellClassName"
+          :edit-config="editConfigDisable"
 
       >
 

--
Gitblit v1.8.0