打印页面可移除编码
散料入移除限制
This commit is contained in:
parent
9872a308f7
commit
0ced05961b
@ -17,11 +17,29 @@
|
||||
</el-row>
|
||||
<div style="margin: 20px 0;"></div>
|
||||
@* 富文本 *@
|
||||
<el-input type="textarea"
|
||||
@* <el-input type="textarea"
|
||||
:autosize="{ minRows: 4}"
|
||||
readonly
|
||||
v-model="gendCode">
|
||||
</el-input>
|
||||
</el-input> *@
|
||||
<el-divider></el-divider>
|
||||
<el-table :data="invTable" max-height="400" stripe border
|
||||
style="width: 100%">
|
||||
<el-table-column fixed="left"
|
||||
label="操作"
|
||||
width="120"
|
||||
align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button @@click.native.prevent="deleteRow(scope.$index, invTable)"
|
||||
type="text"
|
||||
size="small">
|
||||
移除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="唯一码" width="220" align="center" prop="UniqueCode"></el-table-column>
|
||||
<el-table-column label="批次" width="220" align="center" prop="Batch"></el-table-column>
|
||||
</el-table>
|
||||
<el-button style="float: right" type="primary" @@click="print">打印</el-button>
|
||||
</el-row>
|
||||
|
||||
@ -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({
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user