feat:车间入库记录打印
This commit is contained in:
parent
bd873b3b32
commit
f02467a881
|
@ -264,6 +264,11 @@
|
|||
show-overflow-tooltip
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column width="90">
|
||||
<template #default="scope">
|
||||
<el-button @click="printMaterial(scope.row)" type="text">物料标签</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-card>
|
||||
<save-dialog
|
||||
|
@ -277,7 +282,7 @@
|
|||
@closed="dialog.save = false"
|
||||
></save-dialog>
|
||||
<el-dialog v-model="printVisible" width="1200px">
|
||||
<print :baseData="form" :tableData="tableData" :type="form.type" mtype="20"/>
|
||||
<print :baseData="form" :tableData="tableData" :type="form.type" mtype="20" @closePrint="printVisible=false"/>
|
||||
</el-dialog>
|
||||
</el-drawer>
|
||||
</template>
|
||||
|
@ -336,6 +341,7 @@ export default {
|
|||
userOptions: [],//部门执行人
|
||||
deptOptions: [],
|
||||
mgroupOptions: [],
|
||||
printer_name:localStorage.getItem("printer_name")
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
|
@ -465,9 +471,34 @@ export default {
|
|||
});
|
||||
},
|
||||
submitOut() {},
|
||||
//打印
|
||||
handlePrint(){
|
||||
this.printVisible = true;
|
||||
},//打印
|
||||
},
|
||||
//打印物料标签
|
||||
printMaterial(row){
|
||||
let that = this;
|
||||
that.$API.cm.labelmat.fromMioitem.req({tid:row.id}).then((res) => {
|
||||
let code = res.code_label;
|
||||
let str = [
|
||||
"SIZE 40 mm,70 mm",
|
||||
"GAP 7 mm,7 mm",
|
||||
"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,
|
||||
];
|
||||
if(res.notok_sign!==null){
|
||||
str.push("WINTEXT 280,550,28,90,0,0,Simhei," +res.notok_sign_name,)
|
||||
}
|
||||
str.push("PRINT 1",)
|
||||
let obj = {};
|
||||
obj.printer_commands = str;
|
||||
obj.printer_name = that.printer_name;
|
||||
this.$API.wpm.prints.req(obj).then((response) => {});
|
||||
})
|
||||
},
|
||||
//本地更新数据
|
||||
handleSaveSuccess() {
|
||||
this.$refs.tables.refresh();
|
||||
|
|
Loading…
Reference in New Issue