feat: 标签打印支持ip传入
This commit is contained in:
parent
d87662ce33
commit
d3daab7ea8
|
|
@ -364,7 +364,8 @@ table_print(row){
|
|||
let obj = {};
|
||||
obj.printer_commands = res.commands;
|
||||
obj.printer_name = that.printer_name;
|
||||
that.$API.wpm.prints.req(obj).then((response) => {
|
||||
let printer_ip=localStorage.getItem("printer_ip")||'127.0.0.1';
|
||||
that.$API.wpm.prints.req(printer_ip, obj).then((response) => {
|
||||
that.$message.success("打印成功");
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -277,6 +277,7 @@ export default {
|
|||
printMaterial(row,type){
|
||||
let that = this;
|
||||
let printer_name=localStorage.getItem("printer_name");
|
||||
let printer_ip=localStorage.getItem("printer_ip")||'127.0.0.1';
|
||||
if(printer_name!==''&&printer_name!==null&&printer_name!==undefined){
|
||||
if(that.project_code!=='gz'){
|
||||
if(type=='mb'){
|
||||
|
|
@ -288,7 +289,7 @@ export default {
|
|||
let obj = {};
|
||||
obj.printer_commands = res.commands;
|
||||
obj.printer_name = printer_name;
|
||||
that.$API.wpm.prints.req(obj).then((response) => {
|
||||
that.$API.wpm.prints.req(printer_ip, obj).then((response) => {
|
||||
that.$message.success("打印成功");
|
||||
});
|
||||
})
|
||||
|
|
@ -301,7 +302,8 @@ export default {
|
|||
let obj = {};
|
||||
obj.printer_commands = res.commands;
|
||||
obj.printer_name = printer_name;
|
||||
that.$API.wpm.prints.req(obj).then((response) => {
|
||||
let printer_ip=localStorage.getItem("printer_ip")||'127.0.0.1';
|
||||
that.$API.wpm.prints.req(printer_ip, obj).then((response) => {
|
||||
that.$message.success("打印成功");
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -212,7 +212,8 @@ export default {
|
|||
let obj = {};
|
||||
obj.printer_commands = res.commands;
|
||||
obj.printer_name = printer_name;
|
||||
that.$API.wpm.prints.req(obj).then((response) => {
|
||||
let printer_ip=localStorage.getItem("printer_ip")||'127.0.0.1';
|
||||
that.$API.wpm.prints.req(printer_ip, obj).then((response) => {
|
||||
that.$message.success("打印成功");
|
||||
});
|
||||
})
|
||||
|
|
@ -225,7 +226,8 @@ export default {
|
|||
let obj = {};
|
||||
obj.printer_commands = res.commands;
|
||||
obj.printer_name = printer_name;
|
||||
that.$API.wpm.prints.req(obj).then((response) => {
|
||||
let printer_ip=localStorage.getItem("printer_ip")||'127.0.0.1';
|
||||
that.$API.wpm.prints.req(printer_ip, obj).then((response) => {
|
||||
that.$message.success("打印成功");
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -456,7 +456,8 @@ export default {
|
|||
let obj = {};
|
||||
obj.printer_commands = res.commands;
|
||||
obj.printer_name = printer_name;
|
||||
that.$API.wpm.prints.req(obj).then((response) => {
|
||||
let printer_ip=localStorage.getItem("printer_ip")||'127.0.0.1';
|
||||
that.$API.wpm.prints.req(printer_ip, obj).then((response) => {
|
||||
that.$message.success("打印成功");
|
||||
});
|
||||
})
|
||||
|
|
@ -469,7 +470,8 @@ export default {
|
|||
let obj = {};
|
||||
obj.printer_commands = res.commands;
|
||||
obj.printer_name = printer_name;
|
||||
that.$API.wpm.prints.req(obj).then((response) => {
|
||||
let printer_ip=localStorage.getItem("printer_ip")||'127.0.0.1';
|
||||
that.$API.wpm.prints.req(printer_ip, obj).then((response) => {
|
||||
that.$message.success("打印成功");
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -616,7 +616,8 @@ export default {
|
|||
let obj = {};
|
||||
obj.printer_commands = res.commands;
|
||||
obj.printer_name = that.printer_name;
|
||||
that.$API.wpm.prints.req(obj).then((response) => {
|
||||
let printer_ip=localStorage.getItem("printer_ip")||'127.0.0.1';
|
||||
that.$API.wpm.prints.req(printer_ip, obj).then((response) => {
|
||||
that.$message.success("打印成功");
|
||||
});
|
||||
})
|
||||
|
|
@ -629,7 +630,8 @@ export default {
|
|||
let obj = {};
|
||||
obj.printer_commands = res.commands;
|
||||
obj.printer_name = that.printer_name;
|
||||
that.$API.wpm.prints.req(obj).then((response) => {
|
||||
let printer_ip=localStorage.getItem("printer_ip")||'127.0.0.1';
|
||||
that.$API.wpm.prints.req(printer_ip, obj).then((response) => {
|
||||
that.$message.success("打印成功");
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -375,7 +375,8 @@ export default {
|
|||
let obj = {};
|
||||
obj.printer_commands = res.commands;
|
||||
obj.printer_name = that.printer_name;
|
||||
that.$API.wpm.prints.req(obj).then((response) => {
|
||||
let printer_ip=localStorage.getItem("printer_ip")||'127.0.0.1';
|
||||
that.$API.wpm.prints.req(printer_ip, obj).then((response) => {
|
||||
that.$message.success("打印成功");
|
||||
});
|
||||
})
|
||||
|
|
@ -388,7 +389,8 @@ export default {
|
|||
let obj = {};
|
||||
obj.printer_commands = res.commands;
|
||||
obj.printer_name = that.printer_name;
|
||||
that.$API.wpm.prints.req(obj).then((response) => {
|
||||
let printer_ip=localStorage.getItem("printer_ip")||'127.0.0.1';
|
||||
that.$API.wpm.prints.req(printer_ip, obj).then((response) => {
|
||||
that.$message.success("打印成功");
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -257,7 +257,8 @@ export default {
|
|||
let obj = {};
|
||||
obj.printer_commands = commands;
|
||||
obj.printer_name = that.printer_name;
|
||||
that.$API.wpm.prints.req(obj).then((response) => {
|
||||
let printer_ip=localStorage.getItem("printer_ip")||'127.0.0.1';
|
||||
that.$API.wpm.prints.req(printer_ip, obj).then((response) => {
|
||||
that.$message.success("打印成功");
|
||||
that.isSaveing = false;
|
||||
that.$emit("success");
|
||||
|
|
|
|||
|
|
@ -118,7 +118,8 @@ export default {
|
|||
that.$message.warning("请等待当前打印任务完成");
|
||||
}
|
||||
}else{
|
||||
that.$API.wpm.prints.req(obj).then((response) => {});
|
||||
let printer_ip=localStorage.getItem("printer_ip")||'127.0.0.1';
|
||||
that.$API.wpm.prints.req(printer_ip, obj).then((response) => {});
|
||||
}
|
||||
|
||||
})
|
||||
|
|
@ -128,7 +129,8 @@ export default {
|
|||
},
|
||||
printLabel(obj){
|
||||
let that = this;
|
||||
that.$API.wpm.prints.req(obj).then((response) => {
|
||||
let printer_ip=localStorage.getItem("printer_ip")||'127.0.0.1';
|
||||
that.$API.wpm.prints.req(printer_ip, obj).then((response) => {
|
||||
that.count_printed ++
|
||||
if (that.count_printed >= that.print_count){
|
||||
let printerInterval = that.$TOOL.data.get('printerInterval');
|
||||
|
|
|
|||
|
|
@ -654,7 +654,8 @@ export default {
|
|||
let obj = {};
|
||||
obj.printer_commands = res.commands;
|
||||
obj.printer_name = that.printer_name;
|
||||
that.$API.wpm.prints.req(obj).then((response) => {
|
||||
let printer_ip=localStorage.getItem("printer_ip")||'127.0.0.1';
|
||||
that.$API.wpm.prints.req(printer_ip, obj).then((response) => {
|
||||
that.$message.success("打印成功");
|
||||
});
|
||||
});
|
||||
|
|
@ -697,7 +698,8 @@ export default {
|
|||
let obj = {};
|
||||
obj.printer_commands = res.commands;
|
||||
obj.printer_name = that.printer_name;
|
||||
that.$API.wpm.prints.req(obj).then((response) => {
|
||||
let printer_ip=localStorage.getItem("printer_ip")||'127.0.0.1';
|
||||
that.$API.wpm.prints.req(printer_ip, obj).then((response) => {
|
||||
that.$message.success("打印成功");
|
||||
});
|
||||
});
|
||||
|
|
@ -714,7 +716,8 @@ export default {
|
|||
let obj = {};
|
||||
obj.printer_commands = res.commands;
|
||||
obj.printer_name = that.printer_name;
|
||||
that.$API.wpm.prints.req(obj).then((response) => {
|
||||
let printer_ip=localStorage.getItem("printer_ip")||'127.0.0.1';
|
||||
that.$API.wpm.prints.req(printer_ip, obj).then((response) => {
|
||||
that.$message.success("打印成功");
|
||||
});
|
||||
})
|
||||
|
|
|
|||
|
|
@ -679,7 +679,8 @@ export default {
|
|||
let obj = {};
|
||||
obj.printer_commands = res.commands;
|
||||
obj.printer_name = that.printer_name;
|
||||
that.$API.wpm.prints.req(obj).then((response) => {
|
||||
let printer_ip=localStorage.getItem("printer_ip")||'127.0.0.1';
|
||||
that.$API.wpm.prints.req(printer_ip, obj).then((response) => {
|
||||
that.$message.success("打印成功");
|
||||
});
|
||||
});
|
||||
|
|
@ -722,7 +723,8 @@ export default {
|
|||
let obj = {};
|
||||
obj.printer_commands = res.commands;
|
||||
obj.printer_name = that.printer_name;
|
||||
that.$API.wpm.prints.req(obj).then((response) => {
|
||||
let printer_ip=localStorage.getItem("printer_ip")||'127.0.0.1';
|
||||
that.$API.wpm.prints.req(printer_ip, obj).then((response) => {
|
||||
that.$message.success("打印成功");
|
||||
});
|
||||
});
|
||||
|
|
@ -738,7 +740,8 @@ export default {
|
|||
let obj = {};
|
||||
obj.printer_commands = res.commands;
|
||||
obj.printer_name = that.printer_name;
|
||||
that.$API.wpm.prints.req(obj).then((response) => {
|
||||
let printer_ip=localStorage.getItem("printer_ip")||'127.0.0.1';
|
||||
that.$API.wpm.prints.req(printer_ip, obj).then((response) => {
|
||||
that.$message.success("打印成功");
|
||||
});
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1011,7 +1011,8 @@ export default {
|
|||
let obj = {};
|
||||
obj.printer_commands = str;
|
||||
obj.printer_name = that.printer_name;
|
||||
that.$API.wpm.prints.req(obj).then((response) => {
|
||||
let printer_ip=localStorage.getItem("printer_ip")||'127.0.0.1';
|
||||
that.$API.wpm.prints.req(printer_ip, obj).then((response) => {
|
||||
that.$message.success("打印成功");
|
||||
});
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1006,7 +1006,8 @@ export default {
|
|||
let obj = {};
|
||||
obj.printer_commands = str;
|
||||
obj.printer_name = that.printer_name;
|
||||
that.$API.wpm.prints.req(obj).then((response) => {
|
||||
let printer_ip=localStorage.getItem("printer_ip")||'127.0.0.1';
|
||||
that.$API.wpm.prints.req(printer_ip, obj).then((response) => {
|
||||
that.$message.success("打印成功");
|
||||
});
|
||||
})
|
||||
|
|
|
|||
|
|
@ -763,7 +763,8 @@ export default {
|
|||
let obj = {};
|
||||
obj.printer_commands = str;
|
||||
obj.printer_name = that.printer_name;
|
||||
that.$API.wpm.prints.req(obj).then((response) => {
|
||||
let printer_ip=localStorage.getItem("printer_ip")||'127.0.0.1';
|
||||
that.$API.wpm.prints.req(printer_ip, obj).then((response) => {
|
||||
that.$message.success("打印成功");
|
||||
});
|
||||
})
|
||||
|
|
|
|||
|
|
@ -276,7 +276,8 @@ export default {
|
|||
let obj = {};
|
||||
obj.printer_commands = res.commands;
|
||||
obj.printer_name = that.printer_name;
|
||||
that.$API.wpm.prints.req(obj).then((response) => {
|
||||
let printer_ip=localStorage.getItem("printer_ip")||'127.0.0.1';
|
||||
that.$API.wpm.prints.req(printer_ip, obj).then((response) => {
|
||||
that.$message.success("打印成功");
|
||||
});
|
||||
});
|
||||
|
|
@ -319,7 +320,8 @@ export default {
|
|||
let obj = {};
|
||||
obj.printer_commands = res.commands;
|
||||
obj.printer_name = that.printer_name;
|
||||
that.$API.wpm.prints.req(obj).then((response) => {
|
||||
let printer_ip=localStorage.getItem("printer_ip")||'127.0.0.1';
|
||||
that.$API.wpm.prints.req(printer_ip, obj).then((response) => {
|
||||
that.$message.success("打印成功");
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -364,7 +364,8 @@ export default {
|
|||
let obj = {};
|
||||
obj.printer_commands = str;
|
||||
obj.printer_name = that.printer_name;
|
||||
this.$API.wpm.prints.req(obj).then((response) => {});
|
||||
let printer_ip=localStorage.getItem("printer_ip")||'127.0.0.1';
|
||||
this.$API.wpm.prints.req(printer_ip, obj).then((response) => {});
|
||||
})
|
||||
|
||||
},
|
||||
|
|
|
|||
|
|
@ -157,7 +157,8 @@ export default {
|
|||
let obj = {};
|
||||
obj.printer_commands = res.commands;
|
||||
obj.printer_name = that.printer_name;
|
||||
that.$API.wpm.prints.req(obj).then((response) => {
|
||||
let printer_ip=localStorage.getItem("printer_ip")||'127.0.0.1';
|
||||
that.$API.wpm.prints.req(printer_ip, obj).then((response) => {
|
||||
that.$message.success("打印成功");
|
||||
});
|
||||
})
|
||||
|
|
|
|||
|
|
@ -456,7 +456,8 @@ export default {
|
|||
let obj = {};
|
||||
obj.printer_commands = res.commands;
|
||||
obj.printer_name = that.printer_name;
|
||||
that.$API.wpm.prints.req(obj).then((response) => {
|
||||
let printer_ip=localStorage.getItem("printer_ip")||'127.0.0.1';
|
||||
that.$API.wpm.prints.req(printer_ip, obj).then((response) => {
|
||||
that.$message.success("打印成功");
|
||||
});
|
||||
})
|
||||
|
|
|
|||
|
|
@ -473,7 +473,8 @@ export default {
|
|||
let obj = {};
|
||||
obj.printer_commands = res.commands;
|
||||
obj.printer_name = that.printer_name;
|
||||
that.$API.wpm.prints.req(obj).then((response) => {
|
||||
let printer_ip=localStorage.getItem("printer_ip")||'127.0.0.1';
|
||||
that.$API.wpm.prints.req(printer_ip, obj).then((response) => {
|
||||
that.$message.success("打印成功");
|
||||
});
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in New Issue