From aafcb416dbee13dfee5b955ae3da0781dac48700 Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期三, 21 一月 2026 15:13:32 +0800
Subject: [PATCH] 修改 容器 编辑 单据 仓位获取 字段

---
 src/views/warehouse/barcodeMaster/Gy_BarCodeBillList.vue |   62 ++++++++++++++++++++++++++++--
 1 files changed, 57 insertions(+), 5 deletions(-)

diff --git a/src/views/warehouse/barcodeMaster/Gy_BarCodeBillList.vue b/src/views/warehouse/barcodeMaster/Gy_BarCodeBillList.vue
index c1960b0..f4535ed 100644
--- a/src/views/warehouse/barcodeMaster/Gy_BarCodeBillList.vue
+++ b/src/views/warehouse/barcodeMaster/Gy_BarCodeBillList.vue
@@ -127,6 +127,14 @@
         </el-button>
       </el-col>
       <el-col :span="1.5">
+        <el-button type="primary" icon="el-icon-delete" size="mini" @click="handleBatchDelete(0)">鎵归噺浣滃簾
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button type="primary" icon="el-icon-delete" size="mini" @click="handleBatchDelete(1)">鎵归噺鍙嶄綔搴�
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
         <el-button type="primary" icon="el-icon-download" size="mini" @click="handleExport">瀵煎嚭</el-button>
       </el-col>
       <el-col :span="1.5">
@@ -348,7 +356,7 @@
     
     //#region 鍔犺浇缁勭粐涓嬫媺鍒楄〃鏁版嵁
     fetchData() {
-      axios.get(this.baseURL + "/Web/GetOrganizations", {
+      axios.get(this.$baseUrl + "/Web/GetOrganizations", {
       }).then(response => {
         if (response.data.count == 1) {
           this.organizationList = response.data.data;//缁勭粐鍒楄〃
@@ -462,7 +470,7 @@
       if (this.queryParams.HBarCode) {
         this.sWhere += " and 鏉$爜缂栧彿 like ''%" + this.queryParams.HBarCode + "%''";
       }
-      if (this.queryParams.HSupName) {
+      if (this.queryParams.HSourceBillNo) {
         this.sWhere += " and 婧愬崟鍗曞彿 like ''%" + this.queryParams.HSourceBillNo + "%''";
       }
       if (this.queryParams.HMaterNumber) {
@@ -474,6 +482,12 @@
       if (this.queryParams.HOrgID) {
         this.sWhere += " and HStockOrgID = ''" + this.queryParams.HOrgID + "''";
       }
+
+      //濡傛灉鏄嚜鍔ㄧ櫥褰曪紝鍒欏彧鑳芥煡鐪嬩緵搴斿晢鑷繁鐨勬潯鐮併��
+      if (sessionStorage["HAutoLogin"] == "1") {
+        this.sWhere += " and HSupID = ''" + sessionStorage["HUserName"] + "''";
+      }
+
       this.getList()
     },
     //#endregion
@@ -488,7 +502,7 @@
       this.loading = true
       
       // 鍒楄〃鏌ヨ
-      axios.get(this.baseURL + '/Gy_BarCodeBillList/page', {
+      axios.get(this.$baseUrl + '/Gy_BarCodeBillList/page', {
         params: {
           "sWhere": this.sWhere,
           "user": sessionStorage["HUserName"],
@@ -584,9 +598,47 @@
 
         var HInterID = this.checkDataList[0].HItemID;
         // 鍒楄〃鏌ヨ
-        axios.get(this.baseURL + '/Gy_BarCodeBillList/DeleteGy_BarCodeBillList', {
+        axios.get(this.$baseUrl + '/Gy_BarCodeBillList/DeleteGy_BarCodeBillList', {
           params: {
             "HInterID": HInterID,
+            "IsAudit": num,
+            "CurUserName": sessionStorage["HUserName"],
+          },
+        }).then(response => {
+          let data1 = response.data
+          if (data1.count == 1) {
+            this.handleQuery();
+          }else{
+            this.$modal.msgError(data1.Message);
+          }
+        }).catch(error => {
+          this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+        });
+      }
+    },
+    //#endregion
+
+    //#region 鎵归噺浣滃簾
+    handleBatchDelete(num) {
+      if (this.checkDataList.length == 0) {
+        this.$modal.msgError("璇烽�夋嫨鏁版嵁");
+      } 
+      else if(this.checkDataList.length >100){
+        this.$modal.msgError("閫夋嫨鏁版嵁涓嶅彲澶т簬100鏉★紒");
+      }
+      else {
+        var HInterIDListStr = "";
+        for(var i=0;i<this.checkDataList.length;i++){
+          if(i==this.checkDataList.length-1){
+            HInterIDListStr += this.checkDataList[i].hmainid.toString();
+          }else{
+            HInterIDListStr += this.checkDataList[i].hmainid.toString() + ",";
+          }
+        }
+        // 鍒楄〃鏌ヨ
+        axios.get(this.$baseUrl + '/Gy_BarCodeBillList/DeleteBatchGy_BarCodeBillList', {
+          params: {
+            "HInterID": HInterIDListStr,
             "IsAudit": num,
             "CurUserName": sessionStorage["HUserName"],
           },
@@ -617,7 +669,7 @@
     },
     DisPlay_HideColumn(HModName, user, option, dataOption) {
       this.totalNameList = []
-      axios.get(this.baseURL + '/Xt_grdAlignment_WMES/grdAlignmentWMESList', {
+      axios.get(this.$baseUrl + '/Xt_grdAlignment_WMES/grdAlignmentWMESList', {
         params: {
           "HModName": HModName,
           "user": user,

--
Gitblit v1.9.1