打印
库存回传 入库扫描逻辑 添加物料二维码和唯一码对应表
This commit is contained in:
1 parent
f9bf7be066
commit
da78422528
19 files changed
+1684
-115
No files matched your search
@@ -1,12 +1,17 @@
|
||||
<el-row id="print">
|
||||
<el-row>
|
||||
<el-col :span="16">
|
||||
<el-col :span="12">
|
||||
<el-input v-model="qrcode"
|
||||
placeholder="请扫描二维码"
|
||||
@@change="scanCode" ref="QrCode">
|
||||
</el-input>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-input v-model.number="num"
|
||||
placeholder="请输入数量">
|
||||
</el-input>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-button type="primary" @@click="genCode">生成</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -28,6 +33,7 @@
|
||||
printData:[],
|
||||
gendCode: '',
|
||||
qrcode: '',
|
||||
num: 1,
|
||||
template: {
|
||||
"panels": [
|
||||
{
|
||||
@@ -80,38 +86,6 @@
|
||||
duration: "10000",
|
||||
});
|
||||
}
|
||||
else{
|
||||
$.ajax({
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: { code: _this.qrcode },
|
||||
url: "/configs/Print/GenCode",
|
||||
success: function (json) {
|
||||
if (json.Code != 200) {
|
||||
_this.$message({
|
||||
message: "生成失败!" + json.Msg,
|
||||
type: "warning",
|
||||
duration: "10000",
|
||||
});
|
||||
return;
|
||||
}
|
||||
else {
|
||||
_this.gendCode += json.Data + '\n';
|
||||
_this.printData.push({ uniqueCode: json.Data });
|
||||
//清空
|
||||
_this.qrcode = '';
|
||||
}
|
||||
},
|
||||
error: function (json) {
|
||||
_this.$message({
|
||||
message: "生成失败!",
|
||||
type: "error",
|
||||
duration: "10000",
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
}
|
||||
},
|
||||
error: function (json) {
|
||||
_this.$message({
|
||||
@@ -124,11 +98,27 @@
|
||||
},
|
||||
genCode() {
|
||||
var _this = this;
|
||||
if (_this.qrcode == "") {
|
||||
_this.$message({
|
||||
message: "请扫描二维码后再操作!",
|
||||
type: "warning",
|
||||
duration: "500",
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (_this.num == "") {
|
||||
_this.$message({
|
||||
message: "请输入数量后再操作!",
|
||||
type: "warning",
|
||||
duration: "500",
|
||||
});
|
||||
return;
|
||||
}
|
||||
// 调用后台方法,生成唯一码,(流水号)
|
||||
$.ajax({
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: { code: _this.qrcode },
|
||||
data: { code: _this.qrcode, num: _this.num },
|
||||
url: "/configs/Print/GenCode",
|
||||
success: function (json) {
|
||||
if (json.Code != 200) {
|
||||
@@ -140,8 +130,12 @@
|
||||
return;
|
||||
}
|
||||
else{
|
||||
_this.gendCode += json.Data + '\n';
|
||||
_this.printData.push({ uniqueCode: json.Data });
|
||||
console.log(json);
|
||||
json.Data.forEach(function (item) {
|
||||
_this.gendCode += item.UniqueCode + '\n';
|
||||
_this.printData.push({ uniqueCode: item.UniqueCode });
|
||||
});
|
||||
|
||||
}
|
||||
},
|
||||
error: function (json) {
|
||||
@@ -152,8 +146,7 @@
|
||||
});
|
||||
},
|
||||
});
|
||||
//清空
|
||||
_this.qrcode = '';
|
||||
_this.unm = 1;
|
||||
},
|
||||
print() {
|
||||
var _this = this;
|
||||
@@ -164,6 +157,9 @@
|
||||
})
|
||||
hiprintTemplate.print(this.printData);
|
||||
_this.printData = [];
|
||||
//清空
|
||||
_this.qrcode = '';
|
||||
_this.unm = 1;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user