diff --git a/HHWMS.Web/Areas/Configs/Views/Print/Index.cshtml b/HHWMS.Web/Areas/Configs/Views/Print/Index.cshtml index 7ddf5b7..e70349b 100644 --- a/HHWMS.Web/Areas/Configs/Views/Print/Index.cshtml +++ b/HHWMS.Web/Areas/Configs/Views/Print/Index.cshtml @@ -17,11 +17,29 @@
@* 富文本 *@ - - + *@ + + + + + + + + 打印 @@ -30,6 +48,7 @@ el: "#print", data() { return { + invTable:[], printData:[], gendCode: '', qrcode: '', @@ -70,6 +89,10 @@ } }, methods: { + // 删除已绑定行 + deleteRow(index, rows) { + rows.splice(index, 1); + }, scanCode() { var _this = this; // 调用后台方法,判断是否在物料表内 @@ -137,8 +160,12 @@ else{ // console.log(json); json.Data.forEach(function (item) { - _this.gendCode += item.UniqueCode + '\n'; - _this.gendCode += item.Batch + '\n'; + // _this.gendCode += item.UniqueCode + '\n'; + // _this.gendCode += item.Batch + '\n'; + _this.invTable.push({ + "UniqueCode": item.UniqueCode, + "Batch": item.Batch + }); _this.printData.push({ uniqueCode: item.UniqueCode }); _this.printData.push({ uniqueCode: item.Batch }); }); @@ -157,6 +184,11 @@ }, print() { var _this = this; + _this.printData = []; + this.invTable.forEach(function (item) { + _this.printData.push({ uniqueCode: item.UniqueCode }); + _this.printData.push({ uniqueCode: item.Batch }); + });; // _this.gendCode = ""; hiprint.init(); var hiprintTemplate = new hiprint.PrintTemplate({ diff --git a/HHWMS.Web/Areas/Receipt/Views/ReceiptSLIn/Index.cshtml b/HHWMS.Web/Areas/Receipt/Views/ReceiptSLIn/Index.cshtml index 1e1b426..fe9e049 100644 --- a/HHWMS.Web/Areas/Receipt/Views/ReceiptSLIn/Index.cshtml +++ b/HHWMS.Web/Areas/Receipt/Views/ReceiptSLIn/Index.cshtml @@ -195,7 +195,8 @@ "uniqueCode": item.UniqueCode, "qty": item.Qty, "bindQty": item.Qty, - "size": item.Flag + "size": item.Flag, + "band":1 }) }); @@ -232,6 +233,9 @@ message: "绑定成功!", }); // _this.bindingData = []; + _this.bindingData.forEach(function (item) { + item.band = 1; + }) _this.disabledbackbutton = false; } else { _this.$message({ @@ -325,7 +329,17 @@ }, // 删除已绑定行 deleteRow(index, rows) { - rows.splice(index, 1); + if (rows[index].band == 1) { + this.$message({ + message: "已绑定物料不能移除!", + type: "warning", + duration: "1000", + }); + return; + } + else { + rows.splice(index, 1); + } }, handleEdit(index, row) { // console.log(index, row, this.bindingData); diff --git a/HHWMS.Web/appsettings.json b/HHWMS.Web/appsettings.json index 2e5bd5f..170fe01 100644 --- a/HHWMS.Web/appsettings.json +++ b/HHWMS.Web/appsettings.json @@ -22,17 +22,17 @@ }, "Connections": [ - { - "Key": "default", - "Value": "Server=127.0.0.1;Port=3306;Database=8357wms;Uid=root;Password=abc123*;Character Set=utf8mb4;", - "DBType": "mysql" - } //{ // "Key": "default", - // "Value": "Data Source=.;Initial Catalog=8357wms;User=sa;Password=abc123*;Persist Security Info=True", - // "DbContext": "DataContext", - // "DBType": "sqlserver" //DataBase, you can choose mysql,sqlserver,pgsql,sqlite,oracle + // "Value": "Server=127.0.0.1;Port=3306;Database=8357wms;Uid=root;Password=abc123*;Character Set=utf8mb4;", + // "DBType": "mysql" //} + { + "Key": "default", + "Value": "Data Source=.;Initial Catalog=8357wms;User=sa;Password=abc123*;Persist Security Info=True", + "DbContext": "DataContext", + "DBType": "sqlserver" //DataBase, you can choose mysql,sqlserver,pgsql,sqlite,oracle + } //{ // "Key": "default", // "Value": "Data Source=10.18.106.4;Initial Catalog=8357wms;User=wms;Password=abc123*;Persist Security Info=True",