feat:车间入库记录打印
This commit is contained in:
parent
bd873b3b32
commit
f02467a881
|
@ -264,6 +264,11 @@
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
>
|
>
|
||||||
</el-table-column>
|
</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>
|
</scTable>
|
||||||
</el-card>
|
</el-card>
|
||||||
<save-dialog
|
<save-dialog
|
||||||
|
@ -277,7 +282,7 @@
|
||||||
@closed="dialog.save = false"
|
@closed="dialog.save = false"
|
||||||
></save-dialog>
|
></save-dialog>
|
||||||
<el-dialog v-model="printVisible" width="1200px">
|
<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-dialog>
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
</template>
|
</template>
|
||||||
|
@ -336,6 +341,7 @@ export default {
|
||||||
userOptions: [],//部门执行人
|
userOptions: [],//部门执行人
|
||||||
deptOptions: [],
|
deptOptions: [],
|
||||||
mgroupOptions: [],
|
mgroupOptions: [],
|
||||||
|
printer_name:localStorage.getItem("printer_name")
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -465,9 +471,34 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
submitOut() {},
|
submitOut() {},
|
||||||
|
//打印
|
||||||
handlePrint(){
|
handlePrint(){
|
||||||
this.printVisible = true;
|
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() {
|
handleSaveSuccess() {
|
||||||
this.$refs.tables.refresh();
|
this.$refs.tables.refresh();
|
||||||
|
|
Loading…
Reference in New Issue