fix:原料库和出入库详情中打印物料标签
This commit is contained in:
parent
b31b2f44f6
commit
8c1e98ce18
|
|
@ -182,42 +182,30 @@ export default {
|
||||||
if(printer_name!==''&&printer_name!==null&&printer_name!==undefined){
|
if(printer_name!==''&&printer_name!==null&&printer_name!==undefined){
|
||||||
if(that.project_code!=='gz'){
|
if(that.project_code!=='gz'){
|
||||||
if(type=='mb'){
|
if(type=='mb'){
|
||||||
that.$API.cm.labelmat.fromMb.req({tid:row.id}).then((res) => {
|
let params = {};
|
||||||
let code = res.code_label;
|
params.tid = row.id;
|
||||||
let str = [
|
params.label_template_name = '库存标签模板';
|
||||||
"SIZE 40 mm,70 mm",
|
params.extra_data={count:row.count};
|
||||||
"GAP 7 mm,7 mm",
|
that.$API.cm.labelmat.fromMb.req(params).then((res) => {
|
||||||
"CLS",
|
|
||||||
"REFERENCE 0,0",
|
|
||||||
'QRCODE 30,400,H,5,A,0,"' +code +'"',
|
|
||||||
"WINTEXT 200,550,28,90,0,0,Simhei," + res.material_name,
|
|
||||||
"WINTEXT 240,550,28,90,0,0,Simhei,"+"批次号:" + res.batch,
|
|
||||||
"WINTEXT 280,550,28,90,0,0,Simhei," +"数量:" + row.count,
|
|
||||||
"PRINT 1",
|
|
||||||
];
|
|
||||||
let obj = {};
|
let obj = {};
|
||||||
obj.printer_commands = str;
|
obj.printer_commands = res.commands;
|
||||||
obj.printer_name = printer_name;
|
obj.printer_name = printer_name;
|
||||||
that.$API.wpm.prints.req(obj).then((response) => {
|
that.$API.wpm.prints.req(obj).then((response) => {
|
||||||
that.$message.success("打印成功");
|
that.$message.success("打印成功");
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
let code = row.number;
|
let params = {};
|
||||||
let str = [
|
let name = row.material_name.split('|')[0];
|
||||||
"SIZE 70 mm,100 mm",
|
params.label_template_name = '单件打印模板';
|
||||||
"GAP 7 mm,7 mm",
|
params.data = {number:row.number,name:name};
|
||||||
"CLS",
|
that.$API.cm.labeltemplate.commands.req(params).then((res) => {
|
||||||
"REFERENCE 0,0",
|
let obj = {};
|
||||||
'QRCODE 30,400,H,5,A,0,"' +code +'"',
|
obj.printer_commands = res.commands;
|
||||||
"WINTEXT 240,550,28,90,0,0,Simhei," + row.number,
|
obj.printer_name = printer_name;
|
||||||
"PRINT 1",
|
that.$API.wpm.prints.req(obj).then((response) => {
|
||||||
];
|
that.$message.success("打印成功");
|
||||||
let obj = {};
|
});
|
||||||
obj.printer_commands = str;
|
|
||||||
obj.printer_name = printer_name;
|
|
||||||
that.$API.wpm.prints.req(obj).then((response) => {
|
|
||||||
that.$message.success("打印成功");
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
|
|
|
||||||
|
|
@ -198,11 +198,12 @@
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-link
|
<el-link
|
||||||
type="primary"
|
type="primary"
|
||||||
v-if="mioObj.type == 'do_out'&&project_code=='bxerp'"
|
v-if="mioObj.type == 'do_out'"
|
||||||
@click="printMaterial(scope.row,'mioitem')"
|
@click="printMaterial(scope.row,'mioitem')"
|
||||||
>
|
>
|
||||||
物料标签
|
物料标签
|
||||||
</el-link>
|
</el-link>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</scTable>
|
</scTable>
|
||||||
|
|
@ -251,7 +252,7 @@
|
||||||
width="120"
|
width="120"
|
||||||
>
|
>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-link :underline="false" @click="printMaterial(scope.row,'wpr')" type="primary">打印标签</el-link>
|
<el-link :underline="false" v-if="mioObj.type == 'do_out'" @click="printMaterial(scope.row,'wpr')" type="primary">打印标签</el-link>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</scTable>
|
</scTable>
|
||||||
|
|
@ -472,6 +473,7 @@ export default {
|
||||||
},//打印
|
},//打印
|
||||||
showWpr(row){
|
showWpr(row){
|
||||||
let that = this;
|
let that = this;
|
||||||
|
that.printMaterialName = row.material_name;
|
||||||
that.wprList = row.mioitemw;
|
that.wprList = row.mioitemw;
|
||||||
that.wprVisibleDrawer = true;
|
that.wprVisibleDrawer = true;
|
||||||
},
|
},
|
||||||
|
|
@ -480,42 +482,30 @@ export default {
|
||||||
let that = this;
|
let that = this;
|
||||||
if(that.printer_name!==''&&that.printer_name!==null&&that.printer_name!==undefined){
|
if(that.printer_name!==''&&that.printer_name!==null&&that.printer_name!==undefined){
|
||||||
if(type=='mioitem'){
|
if(type=='mioitem'){
|
||||||
that.$API.cm.labelmat.fromMioitem.req({tid:row.id}).then((res) => {
|
let params = {};
|
||||||
let code = res.code_label;
|
params.tid = row.id;
|
||||||
let str = [
|
params.extra_data={count:row.count};
|
||||||
"SIZE 40 mm,70 mm",
|
params.label_template_name = '库存标签模板';
|
||||||
"GAP 7 mm,7 mm",
|
that.$API.cm.labelmat.fromMioitem.req(params).then((res) => {
|
||||||
"CLS",
|
|
||||||
"REFERENCE 0,0",
|
|
||||||
'QRCODE 30,400,H,5,A,0,"' +code +'"',
|
|
||||||
"WINTEXT 200,550,28,90,0,0,Simhei," + res.material_name,
|
|
||||||
"WINTEXT 240,550,28,90,0,0,Simhei," +"批次号:"+ res.batch,
|
|
||||||
"WINTEXT 280,550,28,90,0,0,Simhei," +"数量:" + row.count,
|
|
||||||
"PRINT 1",
|
|
||||||
];
|
|
||||||
let obj = {};
|
let obj = {};
|
||||||
obj.printer_commands = str;
|
obj.printer_commands = res.commands;
|
||||||
obj.printer_name = that.printer_name;
|
obj.printer_name = that.printer_name;
|
||||||
that.$API.wpm.prints.req(obj).then((response) => {
|
that.$API.wpm.prints.req(obj).then((response) => {
|
||||||
that.$message.success("打印成功");
|
that.$message.success("打印成功");
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
let code = row.number;
|
let params = {};
|
||||||
let str = [
|
let name = that.printMaterialName.split('|')[0];
|
||||||
"SIZE 70 mm,100 mm",
|
params.label_template_name = '单件打印模板';
|
||||||
"GAP 7 mm,7 mm",
|
params.data = {number:row.number,name:name};
|
||||||
"CLS",
|
that.$API.cm.labeltemplate.commands.req(params).then((res) => {
|
||||||
"REFERENCE 0,0",
|
let obj = {};
|
||||||
'QRCODE 30,400,H,5,A,0,"' +code +'"',
|
obj.printer_commands = res.commands;
|
||||||
"WINTEXT 240,550,28,90,0,0,Simhei," + row.number,
|
obj.printer_name = that.printer_name;
|
||||||
"PRINT 1",
|
that.$API.wpm.prints.req(obj).then((response) => {
|
||||||
];
|
that.$message.success("打印成功");
|
||||||
let obj = {};
|
});
|
||||||
obj.printer_commands = str;
|
|
||||||
obj.printer_name = that.printer_name;
|
|
||||||
that.$API.wpm.prints.req(obj).then((response) => {
|
|
||||||
that.$message.success("打印成功");
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue