From 9620ca5caed59bd206dce701a04a5a4e4cfb9dc5 Mon Sep 17 00:00:00 2001
From: dytyqx <1342948614@qq.com>
Date: 星期二, 31 三月 2026 13:46:57 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-VUEUI
---
src/views/warehouse/barcodeMaster/Gy_BarCodeBillList.vue | 206 +++++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 196 insertions(+), 10 deletions(-)
diff --git a/src/views/warehouse/barcodeMaster/Gy_BarCodeBillList.vue b/src/views/warehouse/barcodeMaster/Gy_BarCodeBillList.vue
index 99c74a4..817c60b 100644
--- a/src/views/warehouse/barcodeMaster/Gy_BarCodeBillList.vue
+++ b/src/views/warehouse/barcodeMaster/Gy_BarCodeBillList.vue
@@ -127,6 +127,22 @@
</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-delete" size="mini" @click="handleBatchLosingBar(0)">鏉$爜瀹炵墿涓㈠け鎵归噺鏍囪
+ </el-button>
+ </el-col>
+ <el-col :span="1.5">
+ <el-button type="primary" icon="el-icon-delete" size="mini" @click="handleBatchLosingBar(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">
@@ -161,10 +177,11 @@
</template>
</el-table>
<!-- 璁板綍鏁般�侀〉鏁般�佸綋鍓嶉〉 -->
- <pagination v-show="total > 0" :total="total" :page.sync="page" :limit.sync="pageSize" @pagination="handleQuery" />
+ <!-- <pagination v-show="total > 0" :total="total" :page.sync="page" :limit.sync="pageSize" @pagination="handleQuery" /> -->
+ <pagination v-show="total > 0" :total="total" :page.sync="page" :limit.sync="pageSize" :pageSizes="pageSizes" @pagination="getList" />
<!-- 鍒楄缃� -->
<el-dialog title="闅愯棌鍒楄缃�" :visible.sync="openRowHide" width="816px" append-to-body>
- <RowSettings :colName="btResList" HModName="Kf_POStockInBillList" @rowEditClose="rowSetClose"
+ <RowSettings :colName="btResList" HModName="Gy_BarCodeBillList" @rowEditClose="rowSetClose"
v-if="rowHideShow" />
</el-dialog>
<!-- 鎵撳嵃 -->
@@ -256,6 +273,15 @@
ColContent2: '',
},
+
+ loading: true,
+ tyResList: [],//鍒楄〃锛堟帴鍙f暟鎹級
+ btList: [],//琛ㄥご鍒楄〃鏄剧ず
+ btResList: [],
+ tableData: [],//鍒楄〃(鍒嗛〉鏄剧ず)
+ dataList: [],
+ titleData: [],//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+ pageSizes: [ 50,100, 500, 5000, 50000],
page: 1, //page椤电储寮�
pageSize: 0, //page椤甸潰璁板綍鏁�
total: 0, //璁板綍鍚堣鏁�
@@ -389,6 +415,10 @@
//#region 蹇�熻繃婊�
handleQuery() {
+ var params = this.get_UrlVars();
+ var HSourceInterID = params[params[1]];
+ var HSourceEntryID = params[params[2]];
+ var HSEQ = params[params[3]];
this.sWhere = ''
if (this.queryParams.ColName && this.queryParams.Comparator) {
var com = "";
@@ -462,7 +492,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) {
@@ -471,10 +501,18 @@
if (this.queryParams.HMaterName) {
this.sWhere += " and 鐗╂枡鍚嶇О like ''%" + this.queryParams.HMaterName + "%''";
}
+ if(HSEQ!=''&&HSEQ!=null){
+ this.sWhere += " and 婧愬崟琛屽彿 = ''" + HSEQ + "''";
+ }
+ if(HSourceInterID!=''&&HSourceInterID!=null){
+ this.sWhere += " and HSourceInterID = ''" + HSourceInterID + "''";
+ }
+ if(HSourceEntryID!=''&&HSourceEntryID!=null){
+ this.sWhere += " and HSourceEntryID = ''" + HSourceEntryID + "''";
+ }
if (this.queryParams.HOrgID) {
this.sWhere += " and HStockOrgID = ''" + this.queryParams.HOrgID + "''";
}
-
//濡傛灉鏄嚜鍔ㄧ櫥褰曪紝鍒欏彧鑳芥煡鐪嬩緵搴斿晢鑷繁鐨勬潯鐮併��
if (sessionStorage["HAutoLogin"] == "1") {
this.sWhere += " and HSupID = ''" + sessionStorage["HUserName"] + "''";
@@ -486,7 +524,6 @@
//#region 鏌ヨ
getList() {
- this.pageSize = 50
if (this.pageSize == 0) {
this.pageSize = 50
}
@@ -536,6 +573,43 @@
let HModName = "Gy_BarCodeBillList"
this.DisPlay_HideColumn(HModName, sessionStorage["HUserName"], option, this.dataList);
}
+ else{
+ if(data1.list){
+ this.btResList = data1.list //鍒楄〃琛ㄥご鏁版嵁
+ this.total = data1.count;
+ var data = [];//鍒楀瓧娈垫暟鎹�
+ var col = [];
+ var totalArray = [];
+ //缁欑┖鐨勬暟缁勮祴鍊�
+ for (var key in data1.list) {//寰簭閬嶅巻鏁扮粍
+ data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });//浠庢瘡涓璞′腑鎻愬彇鏁版嵁
+ }
+ //鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋
+ col.push({ type: 'checkbox', fixed: 'left', totalRowText: '鍚堣' });
+ for (var i = 0; i < data.length; i++) {//閬嶅巻data鏁扮粍閲嶇殑鏁版嵁
+ if (this.titleData.indexOf(data[i].name) > -1) {//妫�鏌ata銆恑銆�.name鏄惁鍦ㄦ暟缁勪腑 //璁$畻鍒�
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒�
+ } else if (totalArray.indexOf(data[i].name) > -1 || (data[i].Type == "Decimal" || data[i].Type == "Int32")) { //璁$畻鍒�
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, totalRow: true, width: 120 });
+ }
+ else {
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 });
+ }
+ }
+ option.cols = [col]
+ this.dataList = option
+ option.data = data1.data;
+ var result = data1.data;
+ option.data = result;
+ this.checkDataList = [];
+ let HModName = "Gy_BarCodeBillList"
+ this.DisPlay_HideColumn(HModName, sessionStorage["HUserName"], option, this.dataList);
+ }
+ else{
+ this.tableShow = true
+ this.loading = false
+ }
+ }
}).catch(error => {
this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
});
@@ -573,6 +647,18 @@
//#endregion
+ //#region 鑾峰彇鍙傛暟
+ get_UrlVars() {
+ var vars = [], hash;
+ var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
+ for (var i = 0; i < hashes.length; i++) {
+ hash = hashes[i].split('=');
+ vars.push(hash[0]);
+ vars[hash[0]] = hash[1];
+ }
+ return vars;
+ },
+ //#endregion
//#region 鍒犻櫎
handleDrop() {
},
@@ -606,6 +692,106 @@
}).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"],
+ },
+ }).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 鏉$爜瀹炵墿涓㈠け鎵归噺 鏍囪/鍙嶆爣璁�
+ handleBatchLosingBar(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(num == 0 && this.checkDataList[i]["鏉$爜鐘舵��"]!="姝e父"){
+ this.$message.error('鏉$爜銆�' + this.checkDataList[i]["鏉$爜缂栧彿"] + "銆戯細褰撳墠鏉$爜鐨勬潯鐮佺姸鎬佷笉涓恒�愭甯搞�戯紝鏍囪澶辫触锛侊紒");
+ return;
+ }else if(num == 1 && this.checkDataList[i]["鏉$爜鐘舵��"]!="鏉$爜瀹炵墿涓㈠け"){
+ this.$message.error('鏉$爜銆�' + this.checkDataList[i]["鏉$爜缂栧彿"] + "銆戯細褰撳墠鏉$爜鐨勬潯鐮佺姸鎬佷笉涓恒�愭潯鐮佸疄鐗╀涪澶便�戯紝鍙嶆爣璁板け璐ワ紒锛�");
+ return;
+ }
+
+ if(i==this.checkDataList.length-1){
+ HInterIDListStr += this.checkDataList[i].hmainid.toString();
+ }else{
+ HInterIDListStr += this.checkDataList[i].hmainid.toString() + ",";
+ }
+ }
+
+ try{
+ var sql = "";
+ if(num == 0){
+ sql = "update Gy_BarCodeBill set HBarCodeStatus = '鏉$爜瀹炵墿涓㈠け' where HItemID in (" + HInterIDListStr + ") select * from Gy_BarCodeBill where HItemID in (" + HInterIDListStr + ")";
+ }else if(num == 1){
+ sql = "update Gy_BarCodeBill set HBarCodeStatus = '姝e父' where HItemID in (" + HInterIDListStr + ") select * from Gy_BarCodeBill where HItemID in (" + HInterIDListStr + ")";
+ }
+
+ var ModRightNameCheck = "";
+ axios.get(this.$baseUrl + "/CommonModel/searchMethod", {
+ params: {
+ "sql": sql
+ , "user": sessionStorage["HUserName"]
+ , "ModRightNameCheck": ModRightNameCheck
+ }
+ }).then(response => {
+ var data1 = response.data
+ if (data1.count == 1) {
+ if(data1.data.length>0){
+ this.$message.error('鎿嶄綔鎴愬姛锛侊紒');
+ this.handleQuery();
+ }else{
+ this.$message.error('鎿嶄綔澶辫触锛侊紒鏈煡璇㈠埌鏉$爜璁板綍锛侊紒');
+ }
+ }
+ else {
+ this.$message.error('鎿嶄綔澶辫触锛侊紒' + data1.Message );
+ }
+ });
+ }catch(error){
+ this.$message.error('鎺ュ彛璇锋眰澶辫触锛侊紒' + error );
+ }
}
},
//#endregion
@@ -727,11 +913,11 @@
this.totalNameList.push(item)
}
})
- if (data1.data[0].HPageSize == 0) {
- this.pageSize = 50
- } else {
- this.pageSize = data1.data[0].HPageSize
- }
+ // if (data1.data[0].HPageSize == 0) {
+ // this.pageSize = 50
+ // } else {
+ // this.pageSize = data1.data[0].HPageSize
+ // }
this.tableData = option.data
this.tableShow = true
this.loading = false
--
Gitblit v1.9.1