This commit is contained in:
霍尔 committed 2023-10-26 09:55:15 +08:00
1 parent 523dee5e38
commit f9bf7be066
12 files changed
+635 -42

No files matched your search

@@ -3,7 +3,7 @@
<el-col :span="16">
<el-input v-model="qrcode"
placeholder="请扫描二维码"
@@change="scanCode">
@@change="scanCode" ref="QrCode">
</el-input>
</el-col>
<el-col :span="8">
@@ -72,13 +72,46 @@
data: { code: _this.qrcode },
url: "/configs/Print/ScanCode",
success: function (json) {
console.log(json);
if (json.Code != 200) {
_this.$message({
message: "扫描失败!" + json.Msg,
type: "warning",
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({
@@ -120,14 +153,17 @@
},
});
//清空
this.qrcode = '';
_this.qrcode = '';
},
print() {
var _this = this;
_this.gendCode = "";
hiprint.init();
var hiprintTemplate = new hiprint.PrintTemplate({
template: this.template
})
hiprintTemplate.print(this.printData);
_this.printData = [];
}
}
});