From d873cbc55704ed517607227d9d010204da3f1888 Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期五, 12 七月 2024 13:43:05 +0800
Subject: [PATCH] Merge branch 'master' of http://bore.pub:10439/r/ERP_override

---
 north-glass-erp/northglass-erp/src/views/pp/processCard/ProductionScheduling.vue |   81 +++++++++++++++++++++++++---------------
 1 files changed, 51 insertions(+), 30 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 56d9355..a5ef52f 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
@@ -239,7 +239,7 @@
   keepSource: true,//淇濇寔婧愭暟鎹�
   align: 'center',//鏂囧瓧灞呬腑
   stripe: true,//鏂戦┈绾�
-  rowConfig: {isCurrent: true, isHover: true, height: 50},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒
+  rowConfig: {isCurrent: true, isHover: true, height: 30},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒
   id: 'productionScheduling',
   showFooter: true,//鏄剧ず鑴�
   printConfig: {},
@@ -258,7 +258,7 @@
     storage: true
   },
   editConfig: {
-    trigger: 'click',
+    trigger: 'dblclick',
     mode: 'row',
     showStatus: true
   },
@@ -308,6 +308,15 @@
       editRender: {name: 'input', attrs: {placeholder: '', type: 'date'}},
       title: t('processCard.planEndTime')
     },
+    {
+      field: 'schedulingQuantity',
+      width: 120,
+      editRender: {name: 'input', attrs: {placeholder: ''}},
+      title: t('processCard.productionSchedulingQuantity'),
+      sortable: true
+    },
+    {field: 'notes', title: t('processCard.notes'), editRender: {name: 'input', attrs: {placeholder: ''}}, width: 120},
+
     // {field: '鎺掍骇缂栧彿', title: '鎺掍骇缂栧彿',  width: 120 },
     {
       field: 'orderGlassDetail.orderId',
@@ -356,13 +365,7 @@
     },
     {field: 'orderDetail.quantity', title: t('processCard.orderQuantity'), width: 90},
     {field: 'orderGlassDetail.area', title: t('processCard.orderArea'), width: 90},
-    {
-      field: 'schedulingQuantity',
-      width: 120,
-      editRender: {name: 'input', attrs: {placeholder: ''}},
-      title: t('processCard.productionSchedulingQuantity'),
-      sortable: true
-    },
+
     {field: 'pendingProductionQuantity', title: t('processCard.quantityToScheduled'), width: 100},
     {field: 'pendingProductionArea', title: t('processCard.areaToScheduled'), width: 100},
     {field: 'productionScheduledQuantity', title: t('processCard.plannedProductionQuantity'), width: 100},
@@ -371,7 +374,6 @@
     {field: 'reviewer', title: t('processCard.reviewed'), width: 80},
     {field: 'orderDetail.productName', title: t('order.product'), width: 140},
     {field: 'orderDetail.shape', title: t('order.shape'), width: 80},
-    {field: 'notes', title: t('processCard.notes'), editRender: {name: 'input', attrs: {placeholder: ''}}, width: 120},
     {field: 'schedulingId', title: t('processCard.schedulingId'), width: 120},
   ],//琛ㄥご鎸夐挳
 
@@ -476,22 +478,29 @@
               ElMessage.warning("璇峰嬀閫夋帓浜ф暟鎹�")
               return;
             }
-            const type = await VXETable.modal.confirm('鎮ㄧ‘瀹氳鍒犻櫎璇ユ暟鎹�?')
-            if (type === 'confirm') {
-              let schedulingData = ref({
-                scheduling: selectRecords,
-              })
-
-              request.post("/productionScheduling/deleteScheduling", schedulingData.value).then((res) => {
-                if (res.code == 200) {
-                  ElMessage.success("鍒犻櫎鎴愬姛")
-                  location.reload();
-                } else {
-                  ElMessage.warning(res.msg)
-
-                }
-              })
-            }
+            selectRecords.forEach(item => {
+              if(item.reviewStatus=="宸插鏍�"){
+                ElMessage.warning("涓嶈兘鍒犻櫎宸插鏍告暟鎹�")
+                return;
+              }
+            });
+            alert(1111)
+            // const type = await VXETable.modal.confirm('鎮ㄧ‘瀹氳鍒犻櫎璇ユ暟鎹�?')
+            // if (type === 'confirm') {
+            //   let schedulingData = ref({
+            //     scheduling: selectRecords,
+            //   })
+            //
+            //   request.post("/productionScheduling/deleteScheduling", schedulingData.value).then((res) => {
+            //     if (res.code == 200) {
+            //       ElMessage.success("鍒犻櫎鎴愬姛")
+            //       location.reload();
+            //     } else {
+            //       ElMessage.warning(res.msg)
+            //
+            //     }
+            //   })
+            // }
           }
           return;
         }
@@ -582,17 +591,28 @@
   const table = $grid.getTableData().fullData
   const selectRecords = $grid.getCheckboxRecords()
   let selectState = stateValue.value
-  table.forEach((selectRecords) => {
-    if (selectRecords.scheduling_quantity > selectRecords.pendingProductionQuantity && selectState == 1) {
+  selectRecords.forEach((selectRecords) => {
+    console.log(selectRecords)
+    if (selectRecords.schedulingQuantity > selectRecords.pendingProductionQuantity) {
       ElMessage.warning("鎺掍骇鏁伴噺涓嶈兘澶т簬寰呮帓浜ф暟閲�")
       //绂佺敤淇濆瓨鎸夐挳
       //gridOptions.toolbarConfig.buttons[2].disabled = true
     }
-
-
   })
 }
+const checkBoxConfig = {
+  checkMethod: ({ row }) => {
+    console.log(row)
+    if (row['reviewStatus']==="宸插鏍�"){
+      return row.disable
+    }else{
+      return !row.disable
+    }
 
+  },
+  reserve:true
+
+}
 
 </script>
 
@@ -648,6 +668,7 @@
         v-on="gridEvents"
         @filter-change="filterChanged"
         @checkbox-change="determineNum"
+        :checkbox-config="checkBoxConfig"
     >
       <!--      @toolbar-button-click="toolbarButtonClickEvent"-->
       <!--      涓嬫媺鏄剧ず鎵�鏈変俊鎭彃妲�-->

--
Gitblit v1.8.0