From 8b311e8310a5ff81068129f59e4e1c434a1e3a25 Mon Sep 17 00:00:00 2001
From: lyh <925863403@qq.com>
Date: 星期一, 23 六月 2025 14:25:10 +0800
Subject: [PATCH] 新增流程处理,新增程序确认表处理

---
 src/views/dnc/base/modules/ProductStructure/GuideCardBatch/GuideCardBatchList.vue |  109 ++++++++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 100 insertions(+), 9 deletions(-)

diff --git a/src/views/dnc/base/modules/ProductStructure/GuideCardBatch/GuideCardBatchList.vue b/src/views/dnc/base/modules/ProductStructure/GuideCardBatch/GuideCardBatchList.vue
index 1057724..7cab115 100644
--- a/src/views/dnc/base/modules/ProductStructure/GuideCardBatch/GuideCardBatchList.vue
+++ b/src/views/dnc/base/modules/ProductStructure/GuideCardBatch/GuideCardBatchList.vue
@@ -67,17 +67,21 @@
 
         <span slot="action" slot-scope="text, record">
 
-          <a @click="handleEdit(record)">涓婁紶/淇敼淇℃伅</a>
+          <a v-if="record.flowStatus === '1'" @click="handleEdit(record)">涓婁紶/淇敼淇℃伅</a>
+
+          <a-divider v-if="record.flowStatus === '1'" type="vertical" />
+
+          <a @click="handleOpenPrintGuideCardModal(record)">鐢熸垚鏁版帶鍔犲伐绋嬪簭纭琛�</a>
 
           <a-divider type="vertical" />
 
-          <a @click="handleDetail(record)">鐢熸垚鏁版帶鍔犲伐绋嬪簭纭琛�</a>
+          <a @click="handleOpenPrintKnifeListModal(record)">鐢熸垚鍒�鍏锋竻鍗�</a>
 
           <a-divider type="vertical" />
 
-          <a @click="handleDetail(record)">鍙戣捣娴佺▼</a>
+          <a v-if="record.flowStatus === '1'" @click="handleStartFlow(record)">鍙戣捣娴佺▼</a>
 
-          <a-divider type="vertical" />
+          <a-divider v-if="record.flowStatus === '1'" type="vertical" />
 
           <a @click="handleDetail(record)">璇︽儏</a>
 
@@ -89,6 +93,10 @@
     <guide-card-batch-modal ref="modalForm" @ok="modalFormOk"></guide-card-batch-modal>
 
     <GuideCardBatchModalDrawer  ref="modalEditForm" @ok="modalFormOk"></GuideCardBatchModalDrawer>
+
+    <guide-card-print-modal ref="guideCardPrintModal"/>
+
+    <knife-list-print-modal ref="knifeListPrintModal"/>
   </a-card>
 </template>
 
@@ -100,6 +108,8 @@
   import GuideCardBatchModal from './GuideCardBatchModal'
   import GuideCardBatchModalDrawer from './GuideCardBatchModal.Style#Drawer.vue'
   import { getAction } from '@api/manage'
+  import GuideCardPrintModal from './GuideCardPrintModal'
+  import KnifeListPrintModal from './KnifeListPrintModal'
 
   export default {
     name: 'GuideCardBatchList',
@@ -113,6 +123,8 @@
       }
     },
     components: {
+      KnifeListPrintModal,
+      GuideCardPrintModal,
       GuideCardBatchModal,
       GuideCardBatchModalDrawer
     },
@@ -134,7 +146,8 @@
           {
             title:'娴佹按鍙�',
             align:"center",
-            dataIndex: 'serialNumber'
+            dataIndex: 'serialNumber',
+            width:150,
           },
           {
             title:'澶瑰叿',
@@ -161,7 +174,7 @@
             dataIndex: 'action',
             align:"center",
             fixed:"right",
-            width:147,
+            width:500,
             scopedSlots: { customRender: 'action' }
           }
         ],
@@ -171,6 +184,7 @@
           deleteBatch: "/dnc/guideCardBatch/deleteBatch",
           exportXlsUrl: "/dnc/guideCardBatch/exportXls",
           importExcelUrl: "dnc/guideCardBatch/importExcel",
+          startGuideCardBatch: "/dnc/guideCardBatch/startGuideCardBatch"
 
         },
         dictOptions:{},
@@ -188,9 +202,15 @@
     methods: {
       initDictConfig(){
       },
-      getGuideCardBatchList(){
-        console.log('currentDocumentInfo', this.guideCardBatchInfo)
-        let params
+      searchQuery() {
+        this.queryParam.docId = this.guideCardBatchInfo.docId;
+        this.loadData(1);
+      },
+      /**
+      * 鑾峰彇鍔犲伐纭琛ㄥ垪琛�
+      */
+      getGuideCardBatchList() {
+        let params= {};
         params.docId=this.guideCardBatchInfo.docId;
         params.serialNumber=this.queryParam.serialNumber;
         params.fixtureInformation=this.guideCardBatchInfo.fixtureInformation;
@@ -211,6 +231,19 @@
         }).finally(() => {
           this.loading = false
         })
+      },
+      searchReset() {
+        // 淇濈暀蹇呰瀛楁鐨勬祬鎷疯礉鏂瑰紡
+        this.queryParam = {
+          docId: this.guideCardBatchInfo.docId
+        };
+        this.loadData(1);
+      },
+      loadData(pageNum) {
+        if (this.ipagination) {
+          this.ipagination.current = pageNum;
+        }
+        this.getGuideCardBatchList();
       },
       getSuperFieldList(){
         let fieldList=[];
@@ -242,6 +275,64 @@
         this.$refs.modalEditForm.title = "涓婁紶/淇敼淇℃伅";
         this.$refs.modalEditForm.disableSubmit = false;
       },
+
+      /**
+       * 鎺у埗鏁版嵁鍔犲伐绋嬪簭纭琛ㄥ脊绐楀脊鍑�
+       * @param record 鎵规鍒楄〃琛岃褰�
+       */
+      handleOpenPrintGuideCardModal(record){
+        this.$refs.guideCardPrintModal.visible = true
+        this.$refs.guideCardPrintModal.detail = Object.assign({},record)
+      },
+
+
+      /**
+       * 鎺у埗鏁版嵁鍔犲伐绋嬪簭纭琛ㄥ脊绐楀脊鍑�
+       * @param record 鎵规鍒楄〃琛岃褰�
+       */
+      handleOpenPrintKnifeListModal(record){
+        this.$refs.knifeListPrintModal.visible = true
+        this.$refs.knifeListPrintModal.detail = Object.assign({},record)
+        this.$refs.knifeListPrintModal.handleCutter(record.docId)
+      },
+
+      handleStartFlow(record){
+        const that = this
+        that.$confirm({
+          this: '鎻愮ず',
+          content: `纭鍙戣捣纭娴佺▼鍚楋紵`,
+          okText: '纭',
+          cancelText: '鍙栨秷',
+          onOk: () => {
+            getAction(this.url.startGuideCardBatch,{id:record.id}).then(res => {
+                if (res.success) {
+                  that.$notification.success({
+                    message: '娑堟伅',
+                    description: res.message
+                  })
+                } else {
+                  that.$notification.error({
+                    message: '娑堟伅',
+                    description: res.message
+                  })
+                }
+              })
+              .catch(err => {
+                that.$notification.error({
+                  message: '娑堟伅',
+                  description: err.message
+                })
+              })
+              .finally(() => {
+                that.$destroyAll()
+                this.loadData(1)
+              })
+          },
+          onCancel: () => {
+            that.$destroyAll()
+          }
+        })
+      }
     }
   }
 </script>

--
Gitblit v1.9.3