From f60327c377097f67ed42c349bda2a54c3147b7be Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期四, 07 三月 2024 16:35:45 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override

---
 north-glass-erp/northglass-erp/src/views/pp/processCard/ProductionScheduling.vue |   44 +++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 39 insertions(+), 5 deletions(-)

diff --git a/north-glass-erp/northglass-erp/src/views/pp/processCard/ProductionScheduling.vue b/north-glass-erp/northglass-erp/src/views/pp/processCard/ProductionScheduling.vue
index c1ab4c8..bdc6117 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/processCard/ProductionScheduling.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/processCard/ProductionScheduling.vue
@@ -149,6 +149,8 @@
 
 //鐐瑰嚮鏃舵煡璇�
 const getWorkOrder = () => {
+  let startTime = form.date1[0]
+  let endTime = form.date1[1]
   let selectProcesses = value.value
   let selectState = stateValue.value
   let inputVal = form.orderId
@@ -169,13 +171,15 @@
         //绂佺敤鍒犻櫎銆佷繚瀛樻寜閽�
         gridOptions.toolbarConfig.buttons[0].disabled = true
         gridOptions.toolbarConfig.buttons[1].disabled = true
+        //鍚敤淇濆瓨
+        gridOptions.toolbarConfig.buttons[2].disabled = false
       } else {
         ElMessage.warning(res.msg)
       }
     })
   } else if (inputVal != null && selectState == 1) {
 
-    //鏍规嵁璁㈠崟鍙锋煡璇㈡湭鎺掍骇鏁版嵁
+    //鏍规嵁宸ュ簭鏌ヨ鏈帓浜ф暟鎹�
     request.post(`/productionScheduling/selectScheduling/${startTime}/${endTime}/${inputVal}/${selectProcesses}/${selectState}`, filterData.value).then((res) => {
       if (res.code == 200) {
         pageTotal.value = res.data.total
@@ -184,12 +188,15 @@
         //绂佺敤鍒犻櫎銆佷繚瀛樻寜閽�
         gridOptions.toolbarConfig.buttons[0].disabled = true
         gridOptions.toolbarConfig.buttons[1].disabled = true
+        //鍚敤淇濆瓨
+        gridOptions.toolbarConfig.buttons[2].disabled = false
       } else {
         ElMessage.warning(res.msg)
       }
     })
   } else if (inputVal == null && selectState == 2) {
     //鏍规嵁鏃堕棿鏌ヨ宸叉帓浜ф暟鎹�
+    console.log(startTime, endTime, selectProcesses, selectState)
     request.post(`/productionScheduling/selectScheduling/${startTime}/${endTime}/${inputVal}/${selectProcesses}/${selectState}`, filterData.value).then((res) => {
       if (res.code == 200) {
         pageTotal.value = res.data.total
@@ -395,10 +402,13 @@
             }
             const type = await VXETable.modal.confirm('鎮ㄧ‘瀹氳鍒犻櫎璇ユ暟鎹�?')
             if (type === 'confirm') {
-              //淇濆瓨鎺掍骇鏁版嵁
-              request.post("/productionScheduling/deleteScheduling").then((res) => {
+              let schedulingData = ref({
+                scheduling: selectRecords,
+              })
+
+              request.post("/productionScheduling/deleteScheduling",schedulingData.value).then((res) => {
                 if (res.code == 200) {
-                  ElMessage.success("淇濆瓨鎴愬姛")
+                  ElMessage.success("鍒犻櫎鎴愬姛")
                   location.reload();
                 } else {
                   ElMessage.warning(res.msg)
@@ -407,9 +417,33 @@
               })
             }
           }
-
+          return;
         }
+        case 'review': {
+          const $table = xGrid.value
+          const selectRecords = $table.getCheckboxRecords()
+          if ($table) {
+            if (selectRecords.length == 0) {
+              ElMessage.warning("璇峰嬀閫夋帓浜ф暟鎹�")
+              return;
+            }
+            let schedulingData = ref({
+              scheduling: selectRecords,
+              userName: username//瀹℃牳浜�
+            })
+            request.post("/productionScheduling/examineScheduling",schedulingData.value).then((res) => {
+              if (res.code == 200) {
+                ElMessage.success("瀹℃牳鎴愬姛")
+                location.reload();
+              } else {
+                ElMessage.warning(res.msg)
 
+              }
+            })
+
+          }
+          return;
+        }
       }
     }
   },

--
Gitblit v1.8.0