|
|
|
@ -226,7 +226,7 @@
|
|
|
|
|
<el-dialog
|
|
|
|
|
title="备料信息"
|
|
|
|
|
:visible.sync="printDialogVisible"
|
|
|
|
|
width="1000px"
|
|
|
|
|
:width="shengchan?'821px':'721px'"
|
|
|
|
|
>
|
|
|
|
|
<div id="printFrom" class="my-print-box">
|
|
|
|
|
|
|
|
|
@ -234,31 +234,33 @@
|
|
|
|
|
|
|
|
|
|
<!-- 表头-工单信息 -->
|
|
|
|
|
<el-row class="my-print-head">
|
|
|
|
|
<el-col :offset="10" :span="5">生产订单备料单({{printData.printTitle}})</el-col>
|
|
|
|
|
<el-col>生产订单备料单({{printData.printTitle}})</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<!-- 导航栏 -->
|
|
|
|
|
<el-row class="my-print-nav">
|
|
|
|
|
<el-col :span="4">工厂:{{printData.factory}}</el-col>
|
|
|
|
|
<el-col :span="4">工作中心:{{printData.workCenter}}</el-col>
|
|
|
|
|
<el-col :span="4" v-if="printData.prodLineCode!=null">线体:{{printData.prodLineCode}}</el-col>
|
|
|
|
|
<el-col :span="4">生产日期:{{printData.productDate}}</el-col>
|
|
|
|
|
<el-col :span="4">打印日期:{{printData.printDate}}</el-col>
|
|
|
|
|
<el-col :span="4">页次: 1/ 1</el-col>
|
|
|
|
|
<el-col :span="8">工厂:{{printData.factory}}</el-col>
|
|
|
|
|
<el-col :span="8">工作中心:{{printData.workCenter}}</el-col>
|
|
|
|
|
<el-col :span="8" v-if="printData.prodLineCode!=null">线体:{{printData.prodLineCode}}</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row class="my-print-nav">
|
|
|
|
|
<el-col :span="8">生产日期:{{printData.productDate}}</el-col>
|
|
|
|
|
<el-col :span="8">打印日期:{{printData.printDate}}</el-col>
|
|
|
|
|
<el-col :span="8">页次: 1/ 1</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<!-- 主数据 -->
|
|
|
|
|
<el-table
|
|
|
|
|
v-if="refreshNewWorkerTable" v-loading="newWorkerLoading"class="my-print-table":data="printData.workTable"
|
|
|
|
|
v-if="refreshNewWorkerTable" v-loading="newWorkerLoading" class="my-print-table" :data="printData.workTable"
|
|
|
|
|
border style="width: 100%">
|
|
|
|
|
<el-table-column type="index" label="序号" width="50"></el-table-column>
|
|
|
|
|
<el-table-column type="index" label="序号" width="40"></el-table-column>
|
|
|
|
|
<el-table-column prop="materialCode" label="料号" width="120" :formatter="productCodeFormate"></el-table-column>
|
|
|
|
|
<el-table-column prop="materialName" label="物料描述" width="320"></el-table-column>
|
|
|
|
|
<el-table-column prop="materialName" label="物料描述" width="250"></el-table-column>
|
|
|
|
|
<el-table-column prop="unit" width="50" label="单位"></el-table-column>
|
|
|
|
|
<el-table-column v-if="showWorkorderCode" prop="workorderCode" width="100" label="生产订单" :formatter="orderCodeFormate"></el-table-column>
|
|
|
|
|
<el-table-column prop="quantity" label="请领数量 width="100""></el-table-column>
|
|
|
|
|
<!-- <el-table-column prop="fundQuanlity" label="欠领数量"></el-table-column>-->
|
|
|
|
|
<el-table-column prop="routeCode" width="100" label="实发数量"></el-table-column>
|
|
|
|
|
<el-table-column prop="routeCode" width="100" label="实发数量2"></el-table-column>
|
|
|
|
|
<!-- <el-table-column prop="recoil" label="反冲物料"></el-table-column>-->
|
|
|
|
|
<el-table-column prop="quantity" label="请领数量" width="100"></el-table-column>
|
|
|
|
|
|
|
|
|
|
<el-table-column prop="routeCode" width="60" label="实发数量"></el-table-column>
|
|
|
|
|
<el-table-column prop="routeCode" width="60" label="实发数量2"></el-table-column>
|
|
|
|
|
|
|
|
|
|
</el-table>
|
|
|
|
|
<br/>
|
|
|
|
|
<!-- 底部 -->
|
|
|
|
@ -293,6 +295,7 @@ export default {
|
|
|
|
|
// components: {Detail},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
shengchan:true,
|
|
|
|
|
newWorkerLoading: false,
|
|
|
|
|
refreshNewWorkerTable:true,
|
|
|
|
|
showWorkorderCode:true,
|
|
|
|
@ -403,17 +406,38 @@ export default {
|
|
|
|
|
printJS({
|
|
|
|
|
printable: params.printable, // 'printFrom', // 标签元素id
|
|
|
|
|
type: params.type || 'html',
|
|
|
|
|
maxWidth: 1500, // 最大宽度
|
|
|
|
|
font_size: "",// 设置字体大小
|
|
|
|
|
dpi: 300, // 清晰度
|
|
|
|
|
//font_size: "",// 设置字体大小
|
|
|
|
|
header: params.header, // '表单',
|
|
|
|
|
targetStyles: ['*'],
|
|
|
|
|
style: '@page {margin:0 10mm};', // 可选-打印时去掉眉页眉尾
|
|
|
|
|
style: `
|
|
|
|
|
|
|
|
|
|
body {margin: 5mm;padding: 0;}
|
|
|
|
|
.my-print-table {
|
|
|
|
|
width: 100%;
|
|
|
|
|
}
|
|
|
|
|
.my-print-table tr {
|
|
|
|
|
page-break-inside: avoid;
|
|
|
|
|
page-break-after: auto;
|
|
|
|
|
}
|
|
|
|
|
.my-print-table thead {
|
|
|
|
|
display: table-header-group; /* 确保表头在每一页显示 */
|
|
|
|
|
}
|
|
|
|
|
.my-print-table tbody {
|
|
|
|
|
display: table-row-group;
|
|
|
|
|
}
|
|
|
|
|
.my-print-table th, .my-print-table td {
|
|
|
|
|
word-wrap: break-word;
|
|
|
|
|
white-space: normal;
|
|
|
|
|
}
|
|
|
|
|
`,
|
|
|
|
|
ignoreElements: params.ignore || [], // ['no-print']
|
|
|
|
|
properties: params.properties || null
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 打印预览(生产物料)
|
|
|
|
|
showPrint() {
|
|
|
|
|
this.shengchan = true;
|
|
|
|
|
// 清楚缓存
|
|
|
|
|
this.printData.workCenter = "暂无数据";
|
|
|
|
|
this.printData.printDate = null;
|
|
|
|
@ -444,7 +468,7 @@ export default {
|
|
|
|
|
this.$modal.msgError("请选择工单生产日期");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.shengchan = false;
|
|
|
|
|
// 清楚缓存
|
|
|
|
|
this.printData.workCenter = "暂无数据";
|
|
|
|
|
this.printData.printDate = null;
|
|
|
|
@ -593,22 +617,52 @@ export default {
|
|
|
|
|
.my-print-head {
|
|
|
|
|
margin-top: 20px;
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
text-align: center;
|
|
|
|
|
}
|
|
|
|
|
.my-print-nav {
|
|
|
|
|
margin-top: 15px;
|
|
|
|
|
margin-bottom: 15px;
|
|
|
|
|
}
|
|
|
|
|
.my-print-table {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
.my-print-foot {
|
|
|
|
|
margin-top: 20px;
|
|
|
|
|
}
|
|
|
|
|
@media print {
|
|
|
|
|
body {
|
|
|
|
|
font-family: 'Arial', sans-serif; /* 设置字体为'Arial'或其他清晰的无衬线字体 */
|
|
|
|
|
font-size: 14px; /* 设置字体大小 */
|
|
|
|
|
}
|
|
|
|
|
table, th, td {
|
|
|
|
|
border: 1px solid black;
|
|
|
|
|
border-collapse: collapse;
|
|
|
|
|
font-size: 14px; /* 确保表格内字体大小一致 */
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/* @media print {
|
|
|
|
|
#printFrom{
|
|
|
|
|
font-family: "SimSun", "宋体" !important;
|
|
|
|
|
color: #000 !important;
|
|
|
|
|
font-size: 14pt !important; /* 调整字体大小 */
|
|
|
|
|
font-size: 14pt !important;
|
|
|
|
|
-webkit-print-color-adjust: exact;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.my-print-table {
|
|
|
|
|
width: 100%;
|
|
|
|
|
page-break-inside: auto;
|
|
|
|
|
}
|
|
|
|
|
.my-print-table tr {
|
|
|
|
|
page-break-inside: avoid;
|
|
|
|
|
}
|
|
|
|
|
.my-print-table thead {
|
|
|
|
|
display: table-header-group;
|
|
|
|
|
}
|
|
|
|
|
.my-print-table th, .my-print-table td {
|
|
|
|
|
word-wrap: break-word;
|
|
|
|
|
white-space: normal;
|
|
|
|
|
}
|
|
|
|
|
@page {
|
|
|
|
|
size: A5 portrait;
|
|
|
|
|
margin: 5mm;
|
|
|
|
|
}
|
|
|
|
|
} */
|
|
|
|
|
</style>
|
|
|
|
|