From 1d193f2cc23f54634ef8ed73c11436fbe76bb575 Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期一, 19 八月 2024 14:13:39 +0800
Subject: [PATCH] Merge branch 'master' of http://bore.pub:10439/r/ERP_override

---
 north-glass-erp/northglass-erp/src/views/pp/processCard/AddProcessCard.vue |   30 ++++++++++++++++++++++++++++--
 1 files changed, 28 insertions(+), 2 deletions(-)

diff --git a/north-glass-erp/northglass-erp/src/views/pp/processCard/AddProcessCard.vue b/north-glass-erp/northglass-erp/src/views/pp/processCard/AddProcessCard.vue
index 3a702f0..82c7891 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/processCard/AddProcessCard.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/processCard/AddProcessCard.vue
@@ -74,13 +74,14 @@
 
 const orderOtherMoney = ref(null)
 
-
+let maxProcseeId=null
 //绗竴娆″姞杞芥暟鎹�
 
 request.post(`/processCard/selectNoCard/${orderId}/${productionId}`, filterData.value).then((res) => {
 
   if (res.code == 200) {
     pageTotal.value = res.data.total
+    maxProcseeId=res.data.maxFlowCard[0].process_id
     orderOtherMoney.value = res.data.orderOtherMoney
     orderOtherMoney.value.forEach(item => {
       let column = {
@@ -354,7 +355,32 @@
     index = leftData[0].landingSequence + 1
     //index = index.toString().padStart(2, '0')
   }
-  const processId = productionId + index.toString().padStart(3, '0')
+  let processId= null
+  // if (leftData.length !== 0){
+  //   processId = productionId + index.toString().padStart(3, '0')
+  // }
+  // else {
+    if (maxProcseeId!== null || maxProcseeId!== undefined|| maxProcseeId!== ''){
+      if (leftData.length !== 0){
+        const str=leftData[0].processId
+        const lastThree = str.slice(-3);
+        const result =  lastThree*1 + 1;
+        processId= productionId + result.toString().padStart(3, '0')
+      }
+      else {
+        // 鎴彇鍚庝笁浣�
+        const lastThree = maxProcseeId.slice(-3);
+        const result =  lastThree*1 + 1;
+        processId= productionId + result.toString().padStart(3, '0')
+      }
+
+    }
+    else {
+      processId = productionId + index.toString().padStart(3, '0')
+    }
+  //}
+
+
   const regex = /^(\d+|)$/;
   if (!regex.test(checkedNum.value)) {
     ElMessage.warning(t('processCard.schedulingNo'))

--
Gitblit v1.8.0