|
|
@ -233,8 +233,13 @@
|
|
|
|
<el-form :model="form">
|
|
|
|
<el-form :model="form">
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 表头-工单信息 -->
|
|
|
|
<!-- 表头-工单信息 -->
|
|
|
|
<el-row class="my-print-head">
|
|
|
|
<div class="my-print-barcode" :width="shengchan?'821px':'721px'">
|
|
|
|
|
|
|
|
<svg id="barcode"></svg>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<el-row>
|
|
|
|
|
|
|
|
<div class="my-print-head">
|
|
|
|
<el-col>生产订单备料单({{printData.printTitle}})</el-col>
|
|
|
|
<el-col>生产订单备料单({{printData.printTitle}})</el-col>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</el-row>
|
|
|
|
</el-row>
|
|
|
|
<!-- 导航栏 -->
|
|
|
|
<!-- 导航栏 -->
|
|
|
|
<el-row class="my-print-nav">
|
|
|
|
<el-row class="my-print-nav">
|
|
|
@ -297,6 +302,8 @@
|
|
|
|
import { listPrepare, getPrepare, delPrepare, addPrepare, updatePrepare } from "@/api/mes/prepare";
|
|
|
|
import { listPrepare, getPrepare, delPrepare, addPrepare, updatePrepare } from "@/api/mes/prepare";
|
|
|
|
import {printPrepareByCode,printPrepareXByCode} from "@/api/mes/prepareDetail";
|
|
|
|
import {printPrepareByCode,printPrepareXByCode} from "@/api/mes/prepareDetail";
|
|
|
|
import moment from "moment/moment";
|
|
|
|
import moment from "moment/moment";
|
|
|
|
|
|
|
|
import JsBarcode from 'jsbarcode';
|
|
|
|
|
|
|
|
|
|
|
|
// import { listPrepareDetail, getPrepareDetail, delPrepareDetail, addPrepareDetail, updatePrepareDetail } from "@/api/mes/prepareDetail";
|
|
|
|
// import { listPrepareDetail, getPrepareDetail, delPrepareDetail, addPrepareDetail, updatePrepareDetail } from "@/api/mes/prepareDetail";
|
|
|
|
// import Detail from "./prepareDetail.vue";
|
|
|
|
// import Detail from "./prepareDetail.vue";
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
@ -323,6 +330,7 @@ export default {
|
|
|
|
factory: null,
|
|
|
|
factory: null,
|
|
|
|
productDate: null,
|
|
|
|
productDate: null,
|
|
|
|
workTable: [],
|
|
|
|
workTable: [],
|
|
|
|
|
|
|
|
barcode:null,//打印生产物料和反冲物料的条码
|
|
|
|
},
|
|
|
|
},
|
|
|
|
printDialogVisible: false,
|
|
|
|
printDialogVisible: false,
|
|
|
|
// 遮罩层
|
|
|
|
// 遮罩层
|
|
|
@ -400,6 +408,9 @@ export default {
|
|
|
|
created() {
|
|
|
|
created() {
|
|
|
|
this.getList();
|
|
|
|
this.getList();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
mounted() {
|
|
|
|
|
|
|
|
this.generateBarcode();
|
|
|
|
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
//产品编码格式化
|
|
|
|
//产品编码格式化
|
|
|
|
productCodeFormate(row, column, cellValue){
|
|
|
|
productCodeFormate(row, column, cellValue){
|
|
|
@ -463,6 +474,8 @@ export default {
|
|
|
|
this.printData.prodLineCode = response.data.mesPrepare.prodLineCode
|
|
|
|
this.printData.prodLineCode = response.data.mesPrepare.prodLineCode
|
|
|
|
this.refreshNewWorkerTable = true // 立即将refreshProTable设置为true,显示表格
|
|
|
|
this.refreshNewWorkerTable = true // 立即将refreshProTable设置为true,显示表格
|
|
|
|
this.newWorkerLoading = false // 设置加载状态为false,表示加载完成
|
|
|
|
this.newWorkerLoading = false // 设置加载状态为false,表示加载完成
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.generateBarcode(this.selectPrepare[0].workorderCode); //条码 根据工单号生成
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 打印预览(反冲物料)
|
|
|
|
// 打印预览(反冲物料)
|
|
|
@ -503,8 +516,21 @@ export default {
|
|
|
|
this.printData.workTable = chunkedArray;
|
|
|
|
this.printData.workTable = chunkedArray;
|
|
|
|
this.refreshNewWorkerTable = true // 立即将refreshProTable设置为true,显示表格
|
|
|
|
this.refreshNewWorkerTable = true // 立即将refreshProTable设置为true,显示表格
|
|
|
|
this.newWorkerLoading = false // 设置加载状态为false,表示加载完成
|
|
|
|
this.newWorkerLoading = false // 设置加载状态为false,表示加载完成
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.generateBarcode(this.printData.printDate); //条码 根据打印日期生成
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//打印条码
|
|
|
|
|
|
|
|
generateBarcode(barcode){
|
|
|
|
|
|
|
|
JsBarcode("#barcode", barcode, {
|
|
|
|
|
|
|
|
format: "CODE128",
|
|
|
|
|
|
|
|
height:75,
|
|
|
|
|
|
|
|
width:2,
|
|
|
|
|
|
|
|
displayValue: true,
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
// 生成表头序号
|
|
|
|
// 生成表头序号
|
|
|
|
indexMethod(index){
|
|
|
|
indexMethod(index){
|
|
|
|
return index+1 ;
|
|
|
|
return index+1 ;
|
|
|
@ -629,10 +655,16 @@ export default {
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
<style>
|
|
|
|
<style>
|
|
|
|
.my-print-head {
|
|
|
|
.my-print-head {
|
|
|
|
margin-top: 20px;
|
|
|
|
|
|
|
|
font-weight: bold;
|
|
|
|
font-weight: bold;
|
|
|
|
text-align: center;
|
|
|
|
text-align: center;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.my-print-barcode {
|
|
|
|
|
|
|
|
margin-top: 0px;
|
|
|
|
|
|
|
|
margin-right: 40px;
|
|
|
|
|
|
|
|
text-align: right;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.my-print-nav {
|
|
|
|
.my-print-nav {
|
|
|
|
margin-top: 15px;
|
|
|
|
margin-top: 15px;
|
|
|
|
margin-bottom: 15px;
|
|
|
|
margin-bottom: 15px;
|
|
|
|