feat:工段交接记录打印
This commit is contained in:
parent
f02467a881
commit
4acdc9f4cd
|
@ -226,9 +226,13 @@
|
|||
<el-button type="primary" @click="savePrinter">保存</el-button>
|
||||
</el-footer>
|
||||
</el-dialog>
|
||||
<el-dialog v-model="printVisible" width="1200px">
|
||||
<print :baseData="handoverItem" :tableData="handoverItem.handoverb" :type="'handover'" @closePrint="printVisible=false"/>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import saveDialog from "./handover_form.vue";
|
||||
import print from "./../setting/print/A4.vue";
|
||||
export default {
|
||||
props: {
|
||||
mgroupName: {
|
||||
|
@ -238,7 +242,7 @@ export default {
|
|||
},
|
||||
name: "handover",
|
||||
components: {
|
||||
saveDialog,
|
||||
saveDialog,print
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -263,7 +267,7 @@ export default {
|
|||
options: ["交送", "接收"],
|
||||
tableData: [],
|
||||
selection: [],
|
||||
handoverItem: {},
|
||||
handoverItem:{},
|
||||
values: "交送",
|
||||
deptId:'',
|
||||
mtask: "",
|
||||
|
@ -272,7 +276,9 @@ export default {
|
|||
processId: "",
|
||||
processCate: "",
|
||||
printer_name: "",
|
||||
printVisible:false,
|
||||
setNameVisible: false,
|
||||
testCode: "mat:3689278065261125632",
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
|
@ -320,36 +326,39 @@ export default {
|
|||
printSetting(){
|
||||
this.setNameVisible = true;
|
||||
},
|
||||
handoverPrint() {
|
||||
handoverPrint(row) {
|
||||
let that = this;
|
||||
let str = [
|
||||
"SIZE 70 mm,90 mm",
|
||||
"GAP 2 mm,0 mm",
|
||||
"SIZE 60 mm,90 mm",
|
||||
"GAP 0 mm,0 mm",
|
||||
"CLS",
|
||||
"WINTEXT 50,80,36,0,0,0,Simhei,光芯科技——交接单",
|
||||
'BARCODE 50,140,"128",108,0,0,3,5,"' +
|
||||
that.handoverItem.id +
|
||||
'"',
|
||||
"WINTEXT 50,280,36,0,0,0,Simhei," +
|
||||
that.handoverItem.material_name,
|
||||
"WINTEXT 50,340,36,0,0,0,Simhei,批次:" +
|
||||
that.handoverItem.batch,
|
||||
"WINTEXT 50,400,36,0,0,0,Simhei,数量:" +
|
||||
that.handoverItem.count,
|
||||
"WINTEXT 50,460,36,0,0,0,Simhei,日期:" +
|
||||
that.handoverItem.send_date,
|
||||
"WINTEXT 50,520,36,0,0,0,Simhei,送料:" +
|
||||
that.handoverItem.send_mgroup_name +
|
||||
"——" +
|
||||
that.handoverItem.send_user_name,
|
||||
"WINTEXT 50,580,36,0,0,0,Simhei,收料:" +
|
||||
that.handoverItem.recive_mgroup_name +
|
||||
"——" +
|
||||
that.handoverItem.recive_user_name,
|
||||
"PRINT 1",
|
||||
];
|
||||
// 送料:工段-姓名
|
||||
// 收料:工段-姓名
|
||||
'QRCODE 0,60,H,5,A,0,"' +that.testCode +'"',
|
||||
"WINTEXT 0,200,36,0,0,0,Simhei," +row.material_name,
|
||||
"WINTEXT 0,240,36,0,0,0,Simhei,批次:" +
|
||||
row.batch,
|
||||
];
|
||||
if(row.wm_notok_sign!==null){
|
||||
str.push("WINTEXT 0,280,36,0,0,0,Simhei,不合格原因:" +
|
||||
row.wm_notok_sign,)
|
||||
}
|
||||
//供应商----原料、辅料
|
||||
// if(row.type==30||row.type==40){
|
||||
// str.push("WINTEXT 50,460,36,0,0,0,Simhei,供应商:" +
|
||||
// row.supplier_name,)
|
||||
// }
|
||||
str.push("PRINT 1",)
|
||||
// let str = [
|
||||
// "SIZE 60 mm,90 mm",
|
||||
// "GAP 0 mm,0 mm",
|
||||
// "CLS",
|
||||
// "WINTEXT 0,10,36,0,0,0,Simhei," +row.material_name,
|
||||
// 'QRCODE 0,60,H,5,A,0,"' +that.testCode +'"',
|
||||
// "WINTEXT 50,340,36,0,0,0,Simhei,批次:" +
|
||||
// row.batch,
|
||||
// "WINTEXT 50,400,36,0,0,0,Simhei,不合格原因:" +
|
||||
// row.wm_notok_sign,
|
||||
// "PRINT 1",
|
||||
// ];
|
||||
let obj = {};
|
||||
obj.printer_commands = str;
|
||||
obj.printer_name = that.printer_name;
|
||||
|
@ -432,20 +441,22 @@ export default {
|
|||
});
|
||||
},
|
||||
table_print(row) {
|
||||
//打印
|
||||
let that = this;
|
||||
if (
|
||||
that.printer_name == null ||
|
||||
that.printer_name == "" ||
|
||||
that.printer_name == undefined
|
||||
) {
|
||||
this.setNameVisible = true;
|
||||
} else {
|
||||
that.$API.wpm.handover.item.req(row.id).then((res) => {
|
||||
that.handoverItem = res;
|
||||
that.handoverPrint();
|
||||
});
|
||||
}
|
||||
that.handoverItem = row;
|
||||
that.printVisible = true;
|
||||
//打印
|
||||
// if (
|
||||
// that.printer_name == null ||
|
||||
// that.printer_name == "" ||
|
||||
// that.printer_name == undefined
|
||||
// ) {
|
||||
// this.setNameVisible = true;
|
||||
// } else {
|
||||
// that.$API.wpm.handover.item.req(row.id).then((res) => {
|
||||
// that.handoverItem = res;
|
||||
// that.handoverPrint(row);
|
||||
// });
|
||||
// }
|
||||
},
|
||||
savePrinter() {
|
||||
let that = this;
|
||||
|
|
Loading…
Reference in New Issue