From 723793a0aa8d69cbbb463830a3344dbd6655cee5 Mon Sep 17 00:00:00 2001
From: chenhaozhe <gaozhechen26@gmail.com>
Date: 星期六, 04 四月 2026 14:57:02 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-VUEUI

---
 src/views/KCGL/MoveStockBill/Kf_MoveStockBillList.vue |   48 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 48 insertions(+), 0 deletions(-)

diff --git a/src/views/KCGL/MoveStockBill/Kf_MoveStockBillList.vue b/src/views/KCGL/MoveStockBill/Kf_MoveStockBillList.vue
index 7d0233d..677aa13 100644
--- a/src/views/KCGL/MoveStockBill/Kf_MoveStockBillList.vue
+++ b/src/views/KCGL/MoveStockBill/Kf_MoveStockBillList.vue
@@ -114,6 +114,10 @@
           @click="handleEdit(row = rowForm, OperationType = 3)">缂栬緫</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>
       </el-col>
@@ -642,6 +646,50 @@
       });
     },
     //#endregion
+           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 + '/Kf_POStockInBill/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)
+        }
+      })
+    },
 
     //#region 鍒楄缃�
     handleRowHide() {

--
Gitblit v1.9.1