From a09b902158cbeea0c17b1d1f16a0697a176d56bf Mon Sep 17 00:00:00 2001
From: wangyi <2946747746@qq.com>
Date: 星期四, 15 一月 2026 10:32:15 +0800
Subject: [PATCH] 容器申请单和容器退库入库单添加了托数

---
 src/views/scMould/warehouse/Sc_MouldOutRequestBillList.vue |   52 ++++++++++++
 src/views/scMould/warehouse/Sc_MouldInRequestBillList.vue  |   49 ++++++++++++
 src/views/scMould/warehouse/Sc_MouldProdBackBillList.vue   |   54 +++++++++++++
 src/views/scMould/warehouse/Sc_MouldProdOutBillList.vue    |   49 ++++++++++++
 4 files changed, 203 insertions(+), 1 deletions(-)

diff --git a/src/views/scMould/warehouse/Sc_MouldInRequestBillList.vue b/src/views/scMould/warehouse/Sc_MouldInRequestBillList.vue
index 5a3780a..a705dda 100644
--- a/src/views/scMould/warehouse/Sc_MouldInRequestBillList.vue
+++ b/src/views/scMould/warehouse/Sc_MouldInRequestBillList.vue
@@ -131,6 +131,10 @@
         <el-button type="primary" icon="el-icon-edit" size="mini" :disabled="single"
           @click="handleEdit(row = rowForm, OperationType = 2)">缂栬緫</el-button>
       </el-col>
+       <el-col :span="1.5">
+        <el-button type="primary" icon="el-icon-Pallet" size="mini" :disabled="single" @click="set_PalletChange">鎵樻暟鍙樻洿
+        </el-button>
+      </el-col>
       <!-- <el-col :span="1.5">
         <el-button type="primary" icon="el-icon-document-copy" size="mini" :disabled="single"
           @click="handleEdit(row = rowForm, OperationType = 1, copyType = 1)">澶嶅埗</el-button>
@@ -864,6 +868,51 @@
           });
       }).catch(() => { })
     },
+    // 鎵樻暟鍙樻洿
+     set_PalletChange() {
+      if (this.rowList.length !== 1) {
+        this.$modal.msgWarning('璇烽�夋嫨涓�琛屾暟鎹繘琛屾墭鏁板彉鏇达紒')
+        return
+      }
+
+      const rowData = this.rowList[0]
+      const currentPallet = rowData.鎵樻暟 || 0
+
+      // 灏�"璇疯緭鍏ユ柊鎵樻暟"浣滀负杈撳叆妗嗙殑placeholder
+      this.$prompt(`褰撳墠鎵樻暟锛�${currentPallet}`, {
+        confirmButtonText: '淇濆瓨',
+        cancelButtonText: '鍙栨秷',
+        inputValue: currentPallet,
+        inputType: 'number',
+        inputValidator: (value) => {
+          if (!value) return '璇疯緭鍏ユ墭鏁帮紒'
+          const num = parseInt(value)
+          if (isNaN(num)) return '璇疯緭鍏ユ湁鏁堢殑鏁板瓧锛�'
+          if (num.toString() !== value) return '鎵樻暟涓嶈兘涓哄皬鏁帮紒'
+          if (num <= 0) return '鎵樻暟蹇呴』澶т簬0锛�'
+          return true
+        }
+      }).then(({ value }) => {
+        const newPallet = parseInt(value)
+        
+        return axios.post(this.baseURL + '/Sc_MouldOutRequestBill/UpdatePallet', {
+          hmainid: rowData.hmainid,
+          newPallet: newPallet,
+          operator: sessionStorage["HUserName"]
+        })
+      }).then(response => {
+        if (response.data && response.data.count == 1) {
+          this.$modal.msgSuccess('鎵樻暟鍙樻洿鎴愬姛锛�')
+          this.getList()
+        } else {
+          this.$modal.msgError('閿欒锛�' + (response.data.Message || '淇濆瓨澶辫触'))
+        }
+      }).catch(error => {
+        if (error !== 'cancel') {
+          this.$modal.msgError('鎿嶄綔澶辫触锛�' + error.message)
+        }
+      })
+    },
     // 鍙嶅鏍�/瀹℃牳鏁版嵁
     set_CheckBill(num, form) {
       var InterID = form.hmainid || form.HInterID
diff --git a/src/views/scMould/warehouse/Sc_MouldOutRequestBillList.vue b/src/views/scMould/warehouse/Sc_MouldOutRequestBillList.vue
index 69b9299..9ea61ee 100644
--- a/src/views/scMould/warehouse/Sc_MouldOutRequestBillList.vue
+++ b/src/views/scMould/warehouse/Sc_MouldOutRequestBillList.vue
@@ -131,6 +131,10 @@
         <el-button type="primary" icon="el-icon-edit" size="mini" :disabled="single"
           @click="handleEdit(row = rowForm, OperationType = 2)">缂栬緫</el-button>
       </el-col>
+        <el-col :span="1.5">
+        <el-button type="primary" icon="el-icon-Pallet" size="mini" :disabled="single" @click="set_PalletChange">鎵樻暟鍙樻洿
+        </el-button>
+      </el-col>
       <el-col :span="1.5">
         <el-button type="primary" icon="el-icon-document-copy" size="mini" :disabled="single"
           @click="handleEdit(row = rowForm, OperationType = 1, copyType = 1)">澶嶅埗</el-button>
@@ -848,7 +852,7 @@
       this.copyType = 0
     },
     /** 鍒犻櫎鎸夐挳鎿嶄綔 */
-    handleDelete() {
+     handleDelete() {
       this.$modal.confirm('纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗涓嶈兘鎭㈠').then(() => {
         axios.get(this.baseURL + "/Sc_MouldOutRequestBillController/GetSc_MouldOutRequestBill_Delete_Json", {
             params: { 'HInterID': this.rowForm.hmainid.toString(), 'HMaker': sessionStorage["HUserName"] }
@@ -864,6 +868,52 @@
           });
       }).catch(() => { })
     },
+    
+    //鎵樻暟鍙樻洿
+    set_PalletChange() {
+      if (this.rowList.length !== 1) {
+        this.$modal.msgWarning('璇烽�夋嫨涓�琛屾暟鎹繘琛屾墭鏁板彉鏇达紒')
+        return
+      }
+
+      const rowData = this.rowList[0]
+      const currentPallet = rowData.鎵樻暟 || 0
+
+      // 灏�"璇疯緭鍏ユ柊鎵樻暟"浣滀负杈撳叆妗嗙殑placeholder
+      this.$prompt(`褰撳墠鎵樻暟锛�${currentPallet}`, {
+        confirmButtonText: '淇濆瓨',
+        cancelButtonText: '鍙栨秷',
+        inputValue: currentPallet,
+        inputType: 'number',
+        inputValidator: (value) => {
+          if (!value) return '璇疯緭鍏ユ墭鏁帮紒'
+          const num = parseInt(value)
+          if (isNaN(num)) return '璇疯緭鍏ユ湁鏁堢殑鏁板瓧锛�'
+          if (num.toString() !== value) return '鎵樻暟涓嶈兘涓哄皬鏁帮紒'
+          if (num <= 0) return '鎵樻暟蹇呴』澶т簬0锛�'
+          return true
+        }
+      }).then(({ value }) => {
+        const newPallet = parseInt(value)
+        
+        return axios.post(this.baseURL + '/Sc_MouldOutRequestBillController/UpdatePallet', {
+          hmainid: rowData.hmainid,
+          newPallet: newPallet,
+          operator: sessionStorage["HUserName"]
+        })
+      }).then(response => {
+        if (response.data && response.data.count == 1) {
+          this.$modal.msgSuccess('鎵樻暟鍙樻洿鎴愬姛锛�')
+          this.getList()
+        } else {
+          this.$modal.msgError('閿欒锛�' + (response.data.Message || '淇濆瓨澶辫触'))
+        }
+      }).catch(error => {
+        if (error !== 'cancel') {
+          this.$modal.msgError('鎿嶄綔澶辫触锛�' + error.message)
+        }
+      })
+    },
     // 鍙嶅鏍�/瀹℃牳鏁版嵁
     set_CheckBill(num, form) {
       var InterID = form.hmainid || form.HInterID
diff --git a/src/views/scMould/warehouse/Sc_MouldProdBackBillList.vue b/src/views/scMould/warehouse/Sc_MouldProdBackBillList.vue
index 57e38e9..1f23706 100644
--- a/src/views/scMould/warehouse/Sc_MouldProdBackBillList.vue
+++ b/src/views/scMould/warehouse/Sc_MouldProdBackBillList.vue
@@ -131,6 +131,10 @@
         <el-button type="primary" icon="el-icon-edit" size="mini" :disabled="single"
           @click="handleEdit(row = rowForm, OperationType = 2)">缂栬緫</el-button>
       </el-col>
+       <el-col :span="1.5">
+        <el-button type="primary" icon="el-icon-Pallet" size="mini" :disabled="single" @click="set_PalletChange">鎵樻暟鍙樻洿
+        </el-button>
+      </el-col>
       <el-col :span="1.5">
         <el-button type="primary" icon="el-icon-document-copy" size="mini" :disabled="single"
           @click="handleEdit(row = rowForm, OperationType = 1, copyType = 1)">澶嶅埗</el-button>
@@ -186,6 +190,7 @@
         <RowSettings :colName="btResList" :HModName="HModName" @rowEditClose="rowSetClose"
           v-if="rowHideShow" />
       </el-dialog>
+
       <!-- 缂栬緫 -->
       <el-dialog title="缂栬緫瀹瑰櫒棰嗙敤閫�搴撳崟" :visible.sync="openEdit" width="1480px" append-to-body class="xsckdBox" @close="close">
         <edit :OperationType=OperationType :linterid=this.rowForm.hmainid :HSouceBillType=this.rowForm.HSourceBillType
@@ -578,6 +583,9 @@
       this.selectedRow = row; // 璁板綍褰撳墠閫変腑鐨勮
       this.lastSelectedRowIndex = this.tableData.indexOf(row);
       this.$refs.tableData.toggleRowSelection(row);
+      if (this.openPage) {
+        this.$emit('deptEmit', this.rowList, this.BillType)
+      }
     },
     //閫変腑琛岄珮浜牱寮�
     rowStyle({ row, rowIndex }) {
@@ -769,6 +777,52 @@
       this.OperationType = 0
       this.copyType = 0
     },
+
+   //鎵樻暟鍙樻洿
+    set_PalletChange() {
+      if (!this.rowForm || !this.rowForm.hmainid) {
+        this.$modal.msgError('璇峰厛閫夋嫨涓�鏉¤褰曪紒')
+        return
+      }
+      
+      const rowData = this.rowForm // 浣跨敤 rowForm 鑰屼笉鏄� rowList
+      const currentPallet = rowData.鎵樻暟 || 0
+
+      // 灏�"璇疯緭鍏ユ柊鎵樻暟"浣滀负杈撳叆妗嗙殑placeholder
+      this.$prompt(`褰撳墠鎵樻暟锛�${currentPallet}`, {
+        confirmButtonText: '淇濆瓨',
+        cancelButtonText: '鍙栨秷',
+        inputValue: currentPallet,
+        inputType: 'number',
+        inputValidator: (value) => {
+          if (!value) return '璇疯緭鍏ユ墭鏁帮紒'
+          const num = parseInt(value)
+          if (isNaN(num)) return '璇疯緭鍏ユ湁鏁堢殑鏁板瓧锛�'
+          if (num.toString() !== value) return '鎵樻暟涓嶈兘涓哄皬鏁帮紒'
+          if (num <= 0) return '鎵樻暟蹇呴』澶т簬0锛�'
+          return true
+        }
+      }).then(({ value }) => {
+        const newPallet = parseInt(value)
+        
+        return axios.post(this.baseURL + '/Sc_MouldProdBackBillController/UpdatePallet', {
+          hmainid: rowData.hmainid,
+          newPallet: newPallet,
+          operator: sessionStorage["HUserName"]
+        })
+      }).then(response => {
+        if (response.data && response.data.count == 1) {
+          this.$modal.msgSuccess('鎵樻暟鍙樻洿鎴愬姛锛�')
+          this.getList()
+        } else {
+          this.$modal.msgError('閿欒锛�' + (response.data.Message || '淇濆瓨澶辫触'))
+        }
+      }).catch(error => {
+        if (error !== 'cancel') {
+          this.$modal.msgError('鎿嶄綔澶辫触锛�' + error.message)
+        }
+      })
+    },
     /** 鍒犻櫎鎸夐挳鎿嶄綔 */
     handleDelete() {
       this.$modal.confirm('纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗涓嶈兘鎭㈠').then(() => {
diff --git a/src/views/scMould/warehouse/Sc_MouldProdOutBillList.vue b/src/views/scMould/warehouse/Sc_MouldProdOutBillList.vue
index abfe3b1..6e895b8 100644
--- a/src/views/scMould/warehouse/Sc_MouldProdOutBillList.vue
+++ b/src/views/scMould/warehouse/Sc_MouldProdOutBillList.vue
@@ -131,6 +131,10 @@
         <el-button type="primary" icon="el-icon-edit" size="mini" :disabled="single"
           @click="handleEdit(row = rowForm, OperationType = 2)">缂栬緫</el-button>
       </el-col>
+       <el-col :span="1.5">
+        <el-button type="primary" icon="el-icon-Pallet" size="mini" :disabled="single" @click="set_PalletChange">鎵樻暟鍙樻洿
+        </el-button>
+      </el-col>
       <el-col :span="1.5">
         <el-button type="primary" icon="el-icon-document-copy" size="mini" :disabled="single"
           @click="handleEdit(row = rowForm, OperationType = 1, copyType = 1)">澶嶅埗</el-button>
@@ -806,6 +810,51 @@
         this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
       });
     },
+
+    set_PalletChange() {
+      if (!this.rowForm || !this.rowForm.hmainid) {
+        this.$modal.msgError('璇峰厛閫夋嫨涓�鏉¤褰曪紒')
+        return
+      }
+      
+      const rowData = this.rowForm // 浣跨敤 rowForm 鑰屼笉鏄� rowList
+      const currentPallet = rowData.鎵樻暟 || 0
+
+      // 灏�"璇疯緭鍏ユ柊鎵樻暟"浣滀负杈撳叆妗嗙殑placeholder
+      this.$prompt(`褰撳墠鎵樻暟锛�${currentPallet}`, {
+        confirmButtonText: '淇濆瓨',
+        cancelButtonText: '鍙栨秷',
+        inputValue: currentPallet,
+        inputType: 'number',
+        inputValidator: (value) => {
+          if (!value) return '璇疯緭鍏ユ墭鏁帮紒'
+          const num = parseInt(value)
+          if (isNaN(num)) return '璇疯緭鍏ユ湁鏁堢殑鏁板瓧锛�'
+          if (num.toString() !== value) return '鎵樻暟涓嶈兘涓哄皬鏁帮紒'
+          if (num <= 0) return '鎵樻暟蹇呴』澶т簬0锛�'
+          return true
+        }
+      }).then(({ value }) => {
+        const newPallet = parseInt(value)
+        
+        return axios.post(this.baseURL + '/Sc_MouldProdOutBill/UpdatePallet', {
+          hmainid: rowData.hmainid,
+          newPallet: newPallet,
+          operator: sessionStorage["HUserName"]
+        })
+      }).then(response => {
+        if (response.data && response.data.count == 1) {
+          this.$modal.msgSuccess('鎵樻暟鍙樻洿鎴愬姛锛�')
+          this.getList()
+        } else {
+          this.$modal.msgError('閿欒锛�' + (response.data.Message || '淇濆瓨澶辫触'))
+        }
+      }).catch(error => {
+        if (error !== 'cancel') {
+          this.$modal.msgError('鎿嶄綔澶辫触锛�' + error.message)
+        }
+      })
+    },
     //瀵煎嚭
     handleExport() {
       const ws = this.$XLSX.utils.json_to_sheet(this.tyResList); // 灏嗘暟鎹浆鎹负宸ヤ綔琛�

--
Gitblit v1.9.1