Compare commits

...

2 Commits

  1. 87
      src/views/qualityManagement/inspectionArchiving/ERecord/index.vue
  2. 431
      src/views/qualityManagement/inspectionArchiving/ERecord/printBlDialog.vue
  3. 557
      src/views/qualityManagement/inspectionArchiving/ERecord/printJinDialog.vue
  4. 389
      src/views/qualityManagement/inspectionArchiving/ERecord/printMoldDialog.vue
  5. 4
      vite.config.mjs

@ -22,7 +22,7 @@
<template #menu="{ row }">
<span>
<el-button type="text" @click="inspectionRecord(row)">检验记录</el-button>
<el-button v-if="row.yieldType == 12001" type="text" @click="rbPrint(row,2)">热表打印</el-button>
<el-button v-if="row.yieldType == 1" type="text" @click="rbPrint(row,2)">热表打印</el-button>
<el-button v-else type="text" @click="sjPrint(row)">烧结打印</el-button>
</span>
<el-button type="text" @click="handleThickness(row)">测厚打印</el-button>
@ -104,6 +104,17 @@
</el-form-item>
</template>
</el-form>
<!-- 烧结打印类型选择 -->
<el-form ref="form" label-width="80px" class="vd-form-row" v-if="sjTypeSelectOpen">
<el-form-item label="打印类型">
<el-radio-group v-model="sjPrintType">
<el-radio :value="1">烧结打印</el-radio>
<el-radio :value="2">玻璃打印</el-radio>
<el-radio :value="3">金属件打印</el-radio>
<el-radio :value="4">石墨模打印</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
<template #footer>
<span class="dialog-footer">
<el-button @click="previewOpen = false"> </el-button>
@ -114,8 +125,18 @@
<print-dialog v-if="showPrint" :show-print="showPrint" :rbChecked="rbChecked" :checked-list="checkedList"
:printType="printType" :woId="checkWoId"
@closeDialog="closeDialog"></print-dialog>
<!-- 烧结 -->
<print-sj-dialog v-if="showSjPrint" :show-print="showSjPrint" @closeDialog="closeDialog"
:planList="checkedList" :checkRow="checkRow"></print-sj-dialog>
<!-- 玻璃 -->
<print-bl-dialog v-if="showBlPrint" :show-print="showBlPrint" @closeDialog="closeDialog"
:planList="checkedList" :checkRow="checkRow"></print-bl-dialog>
<!-- 金属件 -->
<print-jin-dialog v-if="showJinPrint" :show-print="showJinPrint" @closeDialog="closeDialog"
:planList="checkedList" :checkRow="checkRow"></print-jin-dialog>
<!-- 石墨烯 -->
<print-mold-dialog v-if="showMoldPrint" :show-print="showMoldPrint" @closeDialog="closeDialog"
:planList="checkedList" :checkRow="checkRow"></print-mold-dialog>
</basic-container>
</template>
@ -125,14 +146,23 @@ import { mapGetters } from 'vuex';
import website from '@/config/website';
import printDialog from './printDialog.vue';
import printSjDialog from './printSjDialog.vue';
import printBlDialog from './printBlDialog.vue';
import printJinDialog from './printJinDialog.vue';
import printMoldDialog from './printMoldDialog.vue';
export default {
components:{
printDialog,
printSjDialog
printSjDialog,
printBlDialog,
printJinDialog,
printMoldDialog
},
data() {
return {
showBlPrint:false,
showJinPrint:false,
showMoldPrint:false,
form: {},
query: {},
loading: true,
@ -166,7 +196,7 @@ export default {
editBtnText: '修改',
viewBtnText:'详情',
labelWidth: 120,
menuWidth: 180,
menuWidth: 200,
dialogWidth: 1200,
dialogClickModal: false,
searchEnter: true,
@ -716,6 +746,8 @@ export default {
},
planOpenSj:false,
sjTypeSelectOpen: false,
sjPrintType: 1,
showSjPrint:false,
data: [],
prWorkPlanList:[],
@ -739,6 +771,40 @@ export default {
},
methods: {
submitPrint(){
//
if(this.sjTypeSelectOpen){
this.sjTypeSelectOpen = false
this.previewOpen = false
//
getProcessList({
woId:'2019646268865155074'
// woId: this.checkRow.woId
}).then(res =>{
res.data.data.forEach(ele =>{
this.prWorkPlanList.push({
orders:ele.ppsCode,
procedureSet:{
ppsName:ele.ppsName
}
})
})
this.checkedList = []
for(let i = 0;i<this.prWorkPlanList.length;i++){
this.checkedList.push(true)
}
//
if(this.sjPrintType === 1){
this.showSjPrint = true
} else if(this.sjPrintType === 2){
this.showBlPrint = true
} else if(this.sjPrintType === 3){
this.showJinPrint = true
} else if(this.sjPrintType === 4){
this.showMoldPrint = true
}
})
return
}
if(this.planOpenSj){
this.previewOpen = false
this.showSjPrint = true
@ -747,7 +813,7 @@ export default {
this.printType = '热表'
this.showPrint = true
}
},
printPreview(val,type){
this.dialogType = type
@ -757,13 +823,18 @@ export default {
closeDialog(){
this.showPrint = false
this.showSjPrint = false
this.showBlPrint = false
this.showJinPrint = false
this.showMoldPrint = false
this.previewOpen = false
this.sjTypeSelectOpen = false
this.planOpenSj = false
},
sjPrint(row){
this.checkedList = []
this.prWorkPlanList = []
this.checkRow = row
if(row.yieldType == 12002){
// if(row.yieldType == 2){
getProcessList({
woId:'2019646268865155074'
// woId:row.woId
@ -784,9 +855,9 @@ export default {
this.planOpenSj = true
this.previewOpen = true
})
}else{
this.showSjPrint = true
}
// }else{
// this.showSjPrint = true
// }
},
handleThickness(row){
window.open(window.THICKNESS_PRINT+'?woId='+row.woId)

@ -0,0 +1,431 @@
<template>
<el-dialog title="打印预览" append-to-body :modelValue="showPrint" fullscreen width="85%"
@close="closeDialog">
<el-button v-print="printConfig" type="primary" class="printButton no-print"> </el-button>
<div id="printMe" ref="printContent" class="printBox">
<div class="fixTopLeft">JONHON受控</div>
<div class="printTitle">热表分厂质量记录卡</div>
<div class="tableNo">表号</div>
<table v-loading="loading" id="cus-table" cellspacing="0" style="width:100%">
<tbody>
<tr>
<td colspan="3">订单号</td>
<td colspan="2">{{ prWorkOrder.woCode }}</td>
<td colspan="3">玻璃饼号</td>
<td colspan="2">{{ dsPart.partName }}</td>
<td colspan="2">批次号</td>
<td colspan="2">{{ prWorkOrder.batchNo }}</td>
</tr>
<tr>
<td colspan="3">数量</td>
<td colspan="2">{{ prWorkOrder.pjYieldOrder.poQty }}</td>
<td colspan="3">成型厚度(mm)</td>
<td colspan="2">{{ dsPart.formingThickness }}</td>
<td colspan="2">粉重(g)</td>
<td colspan="2">{{ dsPart.powderWeight }}</td>
</tr>
<!-- 生产过程 -->
<tr>
<td colspan="14" style="font-size:19px">生产过程</td>
</tr>
<tr>
<td>序号</td>
<td>工序</td>
<td colspan="12">内容</td>
</tr>
<template v-for="(prWpItem,prWpIndex) in prWorkPlanList" :key="prWpIndex">
<tr>
<td v-if="prWpItem.procedureSet.ppsName == '玻璃饼压制'" :rowspan="prWpItem.totalPrList+2">{{ prWpItem.orders }}</td>
<td v-if="prWpItem.procedureSet.ppsName == '玻璃饼压制'" :rowspan="prWpItem.totalPrList+2">{{ prWpItem.procedureSet.ppsName }}</td>
<td v-if="prWpItem.procedureSet.ppsName == '玻璃饼振光'" :rowspan="3">{{ prWpItem.orders }}</td>
<td v-if="prWpItem.procedureSet.ppsName == '玻璃饼振光'" :rowspan="3">{{ prWpItem.procedureSet.ppsName }}</td>
<td v-if="prWpItem.procedureSet.ppsName == '玻璃饼排蜡玻化' || prWpItem.procedureSet.ppsName == '玻璃饼印字'" :rowspan="prWpItem.totalPrList+2">{{ prWpItem.orders }}</td>
<td v-if="prWpItem.procedureSet.ppsName == '玻璃饼排蜡玻化' || prWpItem.procedureSet.ppsName == '玻璃饼印字'" :rowspan="prWpItem.totalPrList+2">{{ prWpItem.procedureSet.ppsName }}</td>
<td v-if="prWpItem.procedureSet.ppsName == '玻璃封接零件检验'" :rowspan="prWpItem.printChildCheck != null ? prWpItem.printChildCheck.length+3:2">{{ prWpItem.orders }}</td>
<td v-if="prWpItem.procedureSet.ppsName == '玻璃封接零件检验'" :rowspan="prWpItem.printChildCheck != null ? prWpItem.printChildCheck.length+3:2">{{ prWpItem.procedureSet.ppsName }}</td>
</tr>
<template v-if="prWpItem.procedureSet.ppsName == '玻璃饼压制'">
<tr :key="prWpIndex+Math.floor(Math.random()*100000)+1">
<td colspan="3">玻璃粉牌号</td>
<td colspan="3">玻璃粉检验编号</td>
<td colspan="2">制饼粉重(g)</td>
<td colspan="2">模具编号</td>
<td>设备编号</td>
<td>操作者</td>
</tr>
<tr v-if="prWpItem != null && prWpItem.prList != null" :key="prWpIndex+Math.floor(Math.random()*100000)+1">
<td colspan="3">{{ prWpItem.prList[0] ? prWpItem.prList[0].dataFour:'' }}</td>
<td colspan="3">{{ prWpItem.prList[0] ? prWpItem.prList[0].dataFive:'' }}</td>
<td colspan="2">{{ prWpItem.prList[0] ? prWpItem.prList[0].dataSix:'' }}</td>
<td colspan="2">{{ prWpItem.prList[0] ? prWpItem.prList[0].dataSeven:'' }}</td>
<td>{{ prWpItem.prList[0] ? prWpItem.prList[0].deviceId:"" }}</td>
<td>{{ prWpItem.prList[0] ? prWpItem.prList[0].createMan.userName:"" }}</td>
</tr>
</template>
<template v-else-if="prWpItem.procedureSet.ppsName == '玻璃饼排蜡玻化'">
<tr :key="prWpIndex+Math.floor(Math.random()*100000)+1">
<td>数量</td>
<td colspan="3">玻化温度()</td>
<td colspan="2">入炉时间</td>
<td colspan="2">出炉时间</td>
<td>链速(mm/min)</td>
<td>操作者</td>
<td colspan="2">设备编号</td>
</tr>
<template v-if="prWpItem != null && prWpItem.totalPrList>0 && prWpItem.prList != null">
<tr v-for="(prLItem,prLIndex) in prWpItem.prList" :key="'100'+prWpIndex+prLIndex">
<td>{{ prLItem.dataThree }}</td>
<td colspan="3">{{ prLItem.tempSlot }}</td>
<td colspan="2">{{ prLItem.inDate }}</td>
<td colspan="2">{{ prLItem.outDate }}</td>
<td>{{ prLItem.vSpeed }}</td>
<td>{{ prLItem.createMan.userName }}</td>
<td colspan="2">{{ prLItem.deviceId }}</td>
</tr>
</template>
</template>
<template v-if="prWpItem.procedureSet.ppsName == '玻璃饼振光'">
<tr v-if=" prWpItem != null && prWpItem.prList != null && prWpItem.prList.length>0 && prWpItem.prList[0].workSlot == '振光'" :key="prWpIndex+Math.floor(Math.random()*100000)">
<td>振光</td>
<td>振光针规格</td>
<td colspan="3">{{ prWpItem.prList[0].dataFour }}</td>
<td>操作者</td>
<td>{{ prWpItem.prList[0].createMan.userName }}</td>
<td>设备编码</td>
<td>{{ prWpItem.prList[0].deviceId }}</td>
<td colspan="3" />
</tr>
<tr v-else :key="prWpIndex+Math.floor(Math.random()*100000)">
<td>振光</td>
<td>振光针规格</td>
<td colspan="3" />
<td>操作者</td>
<td />
<td>设备编码</td>
<td />
<td colspan="3" />
</tr>
<tr v-if="(prWpItem != null && prWpItem.prList != null&& prWpItem.prList.length>1 && prWpItem.prList[1].workSlot == '烘干')" :key="prWpIndex+Math.floor(Math.random()*100000)">
<td>烘干</td>
<td>开始时间</td>
<td>{{ prWpItem.prList[1].inDate }}</td>
<td>结束时间</td>
<td>{{ prWpItem.prList[1].outDate }}</td>
<td>烘箱温度()</td>
<td>{{ prWpItem.prList[1].tempSlot }}</td>
<td>操作者</td>
<td>{{ prWpItem.prList[1].createMan.userName }}</td>
<td>设备编号</td>
<td colspan="2">{{ prWpItem.prList[1].deviceId }}</td>
</tr>
<tr v-else :key="prWpIndex+Math.floor(Math.random()*100000)">
<td>烘干</td>
<td>开始时间</td>
<td />
<td>结束时间</td>
<td />
<td>烘箱温度()</td>
<td />
<td>操作者</td>
<td />
<td>设备编号</td>
<td colspan="2" />
</tr>
</template>
<template v-else-if="prWpItem.procedureSet.ppsName == '玻璃饼印字'">
<tr :key="prWpIndex+Math.floor(Math.random()*100000)+1">
<td>油墨物料号</td>
<td colspan="3">印字版编号</td>
<td>操作者</td>
<td colspan="7" />
</tr>
<template v-if="prWpItem != null && prWpItem.totalPrList>0 && prWpItem.prList != null">
<tr v-for="(prLItem,prLIndex) in prWpItem.prList" :key="'100'+prWpIndex+prLIndex">
<td>{{ prLItem.dataFour }}</td>
<td colspan="3">{{ prLItem.dataFive }}</td>
<td>{{ prLItem.createMan.userName }}</td>
<td colspan="7" />
</tr>
</template>
</template>
<!-- // -->
<template v-if="prWpItem.procedureSet.ppsName == '玻璃封接零件检验' && prWpItem.printChildCheck != null && prWpItem.printChildCheck.length>0">
<tr :key="prWpIndex+Math.floor(Math.random()*100000)+1">
<td colspan="12">检验记录</td>
</tr>
<tr :key="prWpIndex+Math.floor(Math.random()*100000)+1">
<td>项目编号</td>
<td colspan="4">检测项目</td>
<td colspan="3">检验结果</td>
<td colspan="2">检验人员</td>
<td colspan="2">检验日期</td>
</tr>
<template v-for="(prCcItem,prCcIndex) in prWpItem.printChildCheck" :key="prCcIndex">
<tr>
<td>{{ prCcItem.testOrders }}</td>
<td colspan="4">{{ prCcItem.testName }}</td>
<td colspan="3">{{ prCcItem.checkResult }}</td>
<td colspan="2">{{ prCcItem.checkName }}</td>
<td colspan="2">{{ prCcItem.checkDate }}</td>
</tr>
</template>
</template>
</template>
</tbody>
</table>
</div>
</el-dialog>
</template>
<script>
export default {
props: {
showPrint: {
type: Boolean,
default: false,
},
planList: {
type: Array,
default: () => [],
},
checkRow: {
type: Object,
default: () => {},
},
},
data() {
return {
printConfig: {
id: 'printMe',
extraCss: 'https://cdn.bootcdn.net/ajax/libs/animate.css/4.1.1/animate.compat.css',
extraHead: '<meta http-equiv="Content-Language" content="zh-cn"/>',
},
loading: false,
dsPart: {},
prWorkOrder: { pjYieldOrder: {} },
prWorkPlanList: [],
};
},
created() {
//
this.prWorkOrder = {
woCode: 'WO-B24051800160-R001',
batchNo: 'Y24051800160',
pjYieldOrder: { poQty: 12 }
};
this.dsPart = {
partName: '13-45-玻璃饼',
formingThickness: '',
powderWeight: ''
};
this.prWorkPlanList = [
{
orders: '0005',
totalPrList: 1,
procedureSet: { ppsName: '玻璃饼压制' },
prList: [{
dataFour: '11',
dataFive: '44',
dataSix: '77',
dataSeven: '111',
deviceId: '9652247',
createMan: { userName: '崔殿龙' }
}]
},
{
orders: '0010',
totalPrList: 0,
procedureSet: { ppsName: '玻璃饼排蜡玻化' },
prList: []
},
{
orders: '0015',
totalPrList: 2,
procedureSet: { ppsName: '玻璃饼振光' },
prList: [
{
workSlot: '振光',
dataFour: '111113333',
createMan: { userName: '崔殿龙' },
deviceId: '9988777'
},
{
workSlot: '烘干',
inDate: '2024-05-31 15:48:45',
outDate: '',
tempSlot: '',
createMan: { userName: '崔殿龙' },
deviceId: '9652247'
}
]
},
{
orders: '0020',
totalPrList: 1,
procedureSet: { ppsName: '玻璃饼印字' },
prList: [{
dataFour: '2',
dataFive: '25',
createMan: { userName: '崔殿龙' }
}]
},
{
orders: '0025',
totalPrList: 0,
procedureSet: { ppsName: '玻璃封接零件检验' },
prList: [],
printChildCheck: [
{
testOrders: '0025-0005',
testName: '外观检测\n参照文件010-02235435《热表分厂表处理零件检验规范》',
checkResult: '合格',
checkName: '李素娟',
checkDate: '2024-05-31 16:29:45.0'
}
]
}
];
},
methods: {
closeDialog() {
this.$emit('closeDialog');
},
},
};
</script>
<style lang="scss" >
.printButton {
float: right;
margin-right: 8px;
margin-top: 16px;
}
.printBox {
width: 100%;
padding: 6px;
text-align: center;
.printTitle {
font-size: 22px;
font-weight: 700;
padding: 8px;
color: #606266;
// margin-bottom: 6px;
}
.tableNo {
text-align: right;
margin-bottom: 10px;
}
table {
width: 100%;
table-layout: fixed;
tr {
width: 100%;
// table-layout: fixed;
page-break-inside: avoid;
// break-inside: avoid;
}
td {
width: 8.33%;
min-width: 80px;
height: 32px;
border: 1px solid #000;
background: transparent;
color: #000;
font-size: 13px;
text-align: center;
padding: 4px 2px;
margin: 0;
word-break: break-all;
}
//
.page-break-tip {
page-break-before: always;
break-before: always;
height: 20px;
border: none !important;
}
}
}
.fixTopLeft {
// position: fixed;
float: left;
top: 1;
left: 0;
font-family: 'SimHei';
font-size: 24px;
color: black;
}
@media print {
/* 隐藏不需要打印的元素:按钮、导航栏、侧边栏等 */
.no-print,
header,
footer,
.sidebar,
button {
display: none !important;
}
@page {
size: auto;
margin: 6mm;
}
}
// @media print { @page { size:21cm 29.7cm } }
</style>
<style lang="scss">
@media print {
.no-print {
display: none !important;
}
.print-btn {
display: none !important;
}
body {
margin: 0;
// padding: 20px;
// font-size: 12pt;
background: white !important;
}
@page {
size: auto;
margin: 6mm;
}
.printBox {
width: 100% !important;
overflow: visible !important;
table {
width: 100% !important;
table-layout: fixed;
border-collapse: collapse;
tr {
page-break-inside: avoid;
td {
width: 8.33%;
font-size: 12px;
padding: 3px 2px;
}
}
}
.print-table,
.print-table td,
.print-table th {
border-collapse: collapse !important;
box-sizing: border-box !important;
page-break-inside: avoid !important;
}
}
}
</style>

@ -0,0 +1,557 @@
<template>
<el-dialog title="打印预览" append-to-body :modelValue="showPrint" fullscreen width="85%"
@close="closeDialog">
<el-button v-print="printConfig" type="primary" class="printButton no-print"> </el-button>
<div id="printMe" ref="printContent" class="printBox">
<div class="fixTopLeft">JONHON受控</div>
<div class="printTitle">热表分厂质量记录卡</div>
<div class="tableNo">表号</div>
<table v-loading="loading" id="cus-table" cellspacing="0" style="width:100%">
<tbody>
<!-- 部件订单信息 -->
<tr>
<td colspan="14" style="font-size:19px">部件订单信息</td>
</tr>
<tr>
<td colspan="3">订单号</td>
<td colspan="2">零件号</td>
<td colspan="2">批次号</td>
<td colspan="2">数量</td>
<td>质量等级</td>
<td colspan="4" />
</tr>
<template v-for="(prWorkOrder, woIndex) in workOrderList" :key="woIndex">
<tr>
<td colspan="3">{{ prWorkOrder.woCode }}</td>
<td colspan="2">{{ prWorkOrder.pjYieldOrder != null ? prWorkOrder.pjYieldOrder.partCode:'' }}</td>
<td colspan="2">{{ prWorkOrder.batchNo }}</td>
<td colspan="2">{{ prWorkOrder.pjYieldOrder.poQty }}</td>
<td>{{ prWorkOrder.pjYieldOrder != null ? prWorkOrder.pjYieldOrder.prodIdent:'' }}</td>
<td colspan="4" />
</tr>
</template>
<!-- 子件订单信息 -->
<tr>
<td colspan="14" style="font-size:19px">子件订单信息</td>
</tr>
<tr>
<td colspan="3">订单号</td>
<td colspan="2">零件号</td>
<td>零件类型</td>
<td colspan="2" style="min-width:140px">批次号</td>
<td>数量</td>
<td colspan="2">材料</td>
<td />
<td />
<td />
</tr>
<tr>
<td colspan="3">{{ prWorkOrder.woCode }}</td>
<td colspan="2">{{ prWorkOrder.pjYieldOrder != null ? prWorkOrder.pjYieldOrder.partCode:'' }}</td>
<td>{{ yieldType == 4 ? "壳体" :'插针' }}</td>
<td colspan="2">{{ prWorkOrder.batchNo }}</td>
<td>{{ prWorkOrder.makeQty }}</td>
<td colspan="2">{{ }}</td>
<td />
<td />
<td />
</tr>
<!-- 生产过程 -->
<tr>
<td colspan="14" style="font-size:19px">生产过程</td>
</tr>
<tr>
<td>序号</td>
<td>工序</td>
<td colspan="12">内容</td>
</tr>
<template v-for="(prWpItem,prWpIndex) in prWorkPlanList" :key="prWpIndex">
<!-- // -->
<tr>
<template v-if="prWpItem.procedureSet.ppsName == '玻璃封接清洗'">
<td :rowspan="prWpItem.totalSlotList+5">{{ prWpItem.orders }}</td>
<td :rowspan="prWpItem.totalSlotList+5">{{ prWpItem.procedureSet.ppsName }}</td>
</template>
<template v-else-if="prWpItem.procedureSet.ppsName == '玻璃封接退火'">
<td :rowspan="prWpItem.totalPrList +prWpItem.totalSlotList +4">{{ prWpItem.orders }}</td>
<td :rowspan="prWpItem.totalPrList +prWpItem.totalSlotList +4">{{ prWpItem.procedureSet.ppsName }}</td>
</template>
<template v-else-if="prWpItem.procedureSet.ppsName == '玻璃封接预氧化箱式炉'">
<td :rowspan="prWpItem.totalPrList +prWpItem.totalSlotList +4">{{ prWpItem.orders }}</td>
<td :rowspan="prWpItem.totalPrList +prWpItem.totalSlotList +4">{{ prWpItem.procedureSet.ppsName }}</td>
</template>
<!-- 玻璃封接预氧化链式炉 -->
<template v-else-if="prWpItem.procedureSet.ppsName == '玻璃封接预氧化链式炉'">
<td :rowspan="prWpItem.totalPrList+2">{{ prWpItem.orders }}</td>
<td :rowspan="prWpItem.totalPrList+2">{{ prWpItem.procedureSet.ppsName }}</td>
</template>
<!-- 玻璃封接零件检验 -->
<template v-else-if="prWpItem.procedureSet.ppsName == '玻璃封接零件检验'">
<td :rowspan="prWpItem.printChildCheck != null ? prWpItem.printChildCheck.length+3:3">{{ prWpItem.orders }}</td>
<td :rowspan="prWpItem.printChildCheck != null ? prWpItem.printChildCheck.length+3:3">{{ prWpItem.procedureSet.ppsName }}</td>
</template>
</tr>
<!-- 如果存在同槽编号 -->
<template v-if="prWpItem.procedureSet.ppsName != '玻璃封接预氧化(链式炉)' && prWpItem.procedureSet.ppsName != '玻璃封接零件检验' && prWpItem.procedureSet.ppsName != '镀金' && prWpItem.procedureSet.ppsName != '钎焊' && prWpItem.procedureSet.ppsName != '检漏'">
<tr>
<td colspan="12">同槽信息</td>
</tr>
<tr>
<td colspan="2">订单号</td>
<td colspan="2">零件号</td>
<td>零件类型</td>
<td colspan="2">批次号</td>
<td>数量</td>
<td colspan="2">材料</td>
<td />
<td />
</tr>
<template v-if="prWpItem.slotList && prWpItem.slotList.length>0">
<template v-for="(slItems,slIndex) in prWpItem.slotList" :key="slIndex">
<tr>
<td colspan="2">{{ slItems.woCode }}</td>
<td colspan="2">{{ slItems.partCode }}</td>
<td>{{ slItems.yieldType == 3? '玻璃饼':slItems.yieldType ==4? '壳体':slItems.yieldType == 5? '插针':slItems.yieldType == 6? '石墨模':'' }}</td>
<td colspan="2">{{ slItems.batchNo }}</td>
<td>{{ slItems.qua }}</td>
<td colspan="2">{{ slItems.material }}</td>
<td />
<td />
</tr>
</template>
</template>
</template>
<!-- // -->
<template v-if="prWpItem.procedureSet.ppsName == '玻璃封接清洗'">
<tr>
<td>清洗</td>
<td>开始时间</td>
<td colspan="3">{{ (prWpItem.prList[0] && prWpItem.prList[0].workSlot == '清洗') ? prWpItem.prList[0].inDate:"" }}</td>
<td>结束时间</td>
<td colspan="2">{{ (prWpItem.prList[0] && prWpItem.prList[0].workSlot == '清洗') ? prWpItem.prList[0].outDate:"" }}</td>
<td>温度()</td>
<td>{{ (prWpItem.prList[0] && prWpItem.prList[0].workSlot == '清洗') ? prWpItem.prList[0].tempSlot:"" }}</td>
<td>操作者</td>
<td>{{ (prWpItem.prList[0] && prWpItem.prList[0].workSlot == '清洗') ? prWpItem.prList[0].createMan?.userName:"" }}</td>
</tr>
<tr>
<td>烘干</td>
<td>开始时间</td>
<td>{{ (prWpItem.prList[1] && prWpItem.prList[1].workSlot == '烘干') ? prWpItem.prList[1].inDate:"" }}</td>
<td>结束时间</td>
<td>{{ (prWpItem.prList[1] && prWpItem.prList[1].workSlot == '烘干') ? prWpItem.prList[1].outDate:"" }}</td>
<td>烘箱温度()</td>
<td>{{ (prWpItem.prList[1] && prWpItem.prList[1].workSlot == '烘干') ? prWpItem.prList[1].tempSlot:"" }}</td>
<td>操作者</td>
<td>{{ (prWpItem.prList[1] && prWpItem.prList[1].workSlot == '烘干') ? prWpItem.prList[1].createMan?.userName:"" }}</td>
<td>设备编号</td>
<td colspan="2">{{ (prWpItem.prList[1] && prWpItem.prList[1].workSlot == '烘干') ? prWpItem.prList[1].deviceId:"" }}</td>
</tr>
</template>
<template v-else-if="prWpItem.procedureSet.ppsName == '玻璃封接退火'">
<tr>
<td>数量</td>
<td>入炉时间</td>
<td colspan="2">保温开始时间</td>
<td>退火温度()</td>
<td>保温结束时间</td>
<td>最小真空度(Pa)</td>
<td colspan="2">出炉时间</td>
<td>操作者</td>
<td colspan="2">设备编号</td>
</tr>
<template v-if="prWpItem.totalPrList>0">
<tr v-for="(prLItem,prLIndex) in prWpItem.prList" :key="'100'+prWpIndex+prLIndex">
<td>{{ prLItem.dataThree }}</td>
<td>{{ prLItem.inDate }}</td>
<td colspan="2">{{ prLItem.dataThirteen }}</td>
<td>{{ prLItem.tempSlot }}</td>
<td>{{ prLItem.dataTwelve }}</td>
<td>{{ prLItem.dataFourteen }}</td>
<td colspan="2">{{ prLItem.outDate }}</td>
<td>{{ prLItem.createMan?.userName }}</td>
<td colspan="2">{{ prLItem.deviceId }}</td>
</tr>
</template>
</template>
<template v-else-if="prWpItem.procedureSet.ppsName == '玻璃封接预氧化箱式炉'">
<tr>
<td>数量</td>
<td colspan="2">入炉时间</td>
<td colspan="2">保温开始时间</td>
<td colspan="2">保温温度()</td>
<td colspan="2">保温结束时间</td>
<td>操作者</td>
<td colspan="2">设备编号</td>
</tr>
<template v-if="prWpItem.totalPrList>0">
<tr v-for="(prLItem,prLIndex) in prWpItem.prList" :key="'100'+prWpIndex+prLIndex">
<td>{{ prLItem.dataThree }}</td>
<td colspan="2">{{ prLItem.inDate }}</td>
<td colspan="2">{{ prLItem.dataThirteen }}</td>
<td colspan="2">{{ prLItem.tempSlot }}</td>
<td colspan="2">{{ prLItem.dataTwelve }}</td>
<td>{{ prLItem.createMan?.userName }}</td>
<td colspan="2">{{ prLItem.deviceId }}</td>
</tr>
</template>
</template>
<!-- // -->
<template v-else-if="prWpItem.procedureSet.ppsName == '玻璃封接预氧化链式炉'">
<tr>
<td>数量</td>
<td colspan="2">湿氮预氧化温度()</td>
<td>露点</td>
<td colspan="2">入炉时间</td>
<td colspan="2">出炉时间</td>
<td>链速(mm/min)</td>
<td>操作者</td>
<td colspan="2">设备编号</td>
</tr>
<template v-if="prWpItem.totalPrList>0">
<tr v-for="(prLItem,prLIndex) in prWpItem.prList" :key="'100'+prWpIndex+prLIndex">
<td>{{ prLItem.dataThree }}</td>
<td colspan="2">{{ prLItem.tempSlot }}</td>
<td>{{ prLItem.dataEleven }}</td>
<td colspan="2">{{ prLItem.inDate }}</td>
<td colspan="2">{{ prLItem.outDate }}</td>
<td>{{ prLItem.vSpeed }}</td>
<td>{{ prLItem.createMan?.userName }}</td>
<td colspan="2">{{ prLItem.deviceId }}</td>
</tr>
</template>
</template>
<!-- // -->
<template v-if="prWpItem.procedureSet.ppsName == '玻璃封接零件检验'">
<tr>
<td colspan="12">检验记录</td>
</tr>
<tr>
<td>项目编号</td>
<td colspan="4">检测项目</td>
<td colspan="3">检验结果</td>
<td colspan="2">检验人员</td>
<td colspan="2">检验日期</td>
</tr>
<template v-for="(prCcItem,prCcIndex) in prWpItem.printChildCheck" :key="prCcIndex">
<tr>
<td>{{ prCcItem.testOrders }}</td>
<td>{{ prCcItem.testName }}</td>
<td colspan="3">{{ prCcItem.trialStandard }}</td>
<td colspan="3">{{ prCcItem.checkResult }}</td>
<td colspan="2">{{ prCcItem.checkName }}</td>
<td colspan="2">{{ prCcItem.checkDate }}</td>
</tr>
</template>
</template>
</template>
</tbody>
</table>
</div>
</el-dialog>
</template>
<script>
export default {
props: {
showPrint: {
type: Boolean,
default: false,
},
planList: {
type: Array,
default: () => [],
},
checkRow: {
type: Object,
default: () => {},
},
},
data() {
return {
printConfig: {
id: 'printMe',
extraCss: 'https://cdn.bootcdn.net/ajax/libs/animate.css/4.1.1/animate.compat.css',
extraHead: '<meta http-equiv="Content-Language" content="zh-cn"/>',
},
loading: false,
dsPart: {},
prWorkOrder: { pjYieldOrder: {} },
workOrderList: [],
yieldType: 4,
prWorkPlanList: [],
};
},
created() {
// -
this.prWorkOrder = {
woCode: 'WO-S2302934-R04',
batchNo: 'L08623045023',
makeQty: 20,
pjYieldOrder: {
partCode: '21E8-304-523-E9',
poQty: 20,
prodIdent: ''
}
};
this.workOrderList = [this.prWorkOrder];
this.yieldType = 4;
//
this.prWorkPlanList = [
{
orders: '0005',
totalSlotList: 1,
totalPrList: 2,
procedureSet: { ppsName: '玻璃封接清洗' },
slotList: [
{
woCode: 'WO-S2302934-R05',
partCode: '21E8-304-523-E10',
yieldType: 5,
batchNo: 'L08623045024',
qua: 20,
material: '4J29'
}
],
prList: [
{
workSlot: '清洗',
inDate: '2024-06-01 08:00:00',
outDate: '2024-06-01 09:30:00',
tempSlot: '85',
createMan: { userName: '张伟' },
deviceId: ''
},
{
workSlot: '烘干',
inDate: '2024-06-01 09:40:00',
outDate: '2024-06-01 10:30:00',
tempSlot: '120',
createMan: { userName: '李娜' },
deviceId: 'DRY-002'
}
]
},
{
orders: '0010',
totalPrList: 1,
totalSlotList: 0,
procedureSet: { ppsName: '玻璃封接退火' },
slotList: [],
prList: [{
dataThree: '20',
inDate: '2024-06-01 11:00:00',
outDate: '2024-06-01 15:30:00',
tempSlot: '550',
dataThirteen: '2024-06-01 11:30:00',
dataTwelve: '2024-06-01 15:00:00',
dataFourteen: '0.8',
createMan: { userName: '王强' },
deviceId: 'ANL-003'
}]
},
{
orders: '0015',
totalPrList: 1,
totalSlotList: 0,
procedureSet: { ppsName: '玻璃封接预氧化(箱式炉)' },
slotList: [],
prList: [{
dataThree: '20',
inDate: '2024-06-01 16:00:00',
tempSlot: '800',
dataThirteen: '2024-06-01 16:30:00',
dataTwelve: '2024-06-01 19:00:00',
createMan: { userName: '赵敏' },
deviceId: 'BOX-003'
}]
},
{
orders: '0020',
totalPrList: 1,
totalSlotList: 0,
procedureSet: { ppsName: '玻璃封接预氧化(链式炉)' },
slotList: [],
prList: [{
dataThree: '20',
tempSlot: '850',
dataEleven: '35',
inDate: '2024-06-02 08:00:00',
outDate: '2024-06-02 08:40:00',
vSpeed: '45',
createMan: { userName: '孙涛' },
deviceId: 'CHAIN-003'
}]
},
{
orders: '0025',
totalPrList: 0,
totalSlotList: 0,
procedureSet: { ppsName: '镀金' },
slotList: [],
prList: []
},
{
orders: '0030',
totalPrList: 0,
totalSlotList: 0,
procedureSet: { ppsName: '钎焊' },
slotList: [],
prList: []
}
];
},
methods: {
closeDialog() {
this.$emit('closeDialog');
},
},
};
</script>
<style lang="scss" >
.printButton {
float: right;
margin-right: 8px;
margin-top: 16px;
}
.printBox {
width: 100%;
padding: 6px;
text-align: center;
.printTitle {
font-size: 22px;
font-weight: 700;
padding: 8px;
color: #606266;
// margin-bottom: 6px;
}
.tableNo {
text-align: right;
margin-bottom: 10px;
}
table {
width: 100%;
table-layout: fixed;
tr {
width: 100%;
// table-layout: fixed;
page-break-inside: avoid;
// break-inside: avoid;
}
td {
width: 8.33%;
min-width: 80px;
height: 32px;
border: 1px solid #000;
background: transparent;
color: #000;
font-size: 13px;
text-align: center;
padding: 4px 2px;
margin: 0;
word-break: break-all;
}
//
.page-break-tip {
page-break-before: always;
break-before: always;
height: 20px;
border: none !important;
}
}
}
.fixTopLeft {
// position: fixed;
float: left;
top: 1;
left: 0;
font-family: 'SimHei';
font-size: 24px;
color: black;
}
@media print {
/* 隐藏不需要打印的元素:按钮、导航栏、侧边栏等 */
.no-print,
header,
footer,
.sidebar,
button {
display: none !important;
}
@page {
size: auto;
margin: 6mm;
}
}
// @media print { @page { size:21cm 29.7cm } }
</style>
<style lang="scss">
@media print {
.no-print {
display: none !important;
}
.print-btn {
display: none !important;
}
body {
margin: 0;
// padding: 20px;
// font-size: 12pt;
background: white !important;
}
@page {
size: auto;
margin: 6mm;
}
.printBox {
width: 100% !important;
overflow: visible !important;
table {
width: 100% !important;
table-layout: fixed;
border-collapse: collapse;
tr {
page-break-inside: avoid;
td {
width: 8.33%;
font-size: 12px;
padding: 3px 2px;
}
}
}
.print-table,
.print-table td,
.print-table th {
border-collapse: collapse !important;
box-sizing: border-box !important;
page-break-inside: avoid !important;
}
}
}
</style>

@ -0,0 +1,389 @@
<template>
<el-dialog title="打印预览" append-to-body :modelValue="showPrint" fullscreen width="85%"
@close="closeDialog">
<el-button v-print="printConfig" type="primary" class="printButton no-print"> </el-button>
<div id="printMe" ref="printContent" class="printBox">
<div class="fixTopLeft">JONHON受控21</div>
<div class="printTitle">热表分厂质量记录卡</div>
<div class="tableNo">表号</div>
<table v-loading="loading" id="cus-table" cellspacing="0" style="width:100%">
<tbody>
<!-- 14 -->
<!-- 部件订单信息 -->
<tr>
<td colspan="14" style="font-size:19px">部件订单信息</td>
</tr>
<tr>
<td colspan="3">订单号</td>
<td colspan="2">零件号</td>
<td colspan="2">批次号</td>
<td colspan="2">数量</td>
<td>质量等级</td>
<td colspan="4" />
</tr>
<template v-for="(prWorkOrder, woIndex) in workOrderList" :key="woIndex">
<tr>
<td colspan="3">{{ prWorkOrder.woCode }}</td>
<td colspan="2">{{ prWorkOrder.pjYieldOrder.partCode }}</td>
<td colspan="2">{{ prWorkOrder.batchNo }}</td>
<td colspan="2">{{ prWorkOrder.pjYieldOrder.poQty }}</td>
<td>{{ prWorkOrder.pjYieldOrder.prodIdent }}</td>
<td colspan="4" />
</tr>
</template>
<!-- 子件订单信息 -->
<tr>
<td colspan="14" style="font-size:19px">子件订单信息</td>
</tr>
<tr>
<td colspan="3">订单号</td>
<td colspan="2">零件号</td>
<td>零件类型</td>
<td colspan="2" style="min-width:140px">批次号</td>
<td>数量</td>
<td colspan="2" />
<td />
<td />
<td />
</tr>
<tr>
<td colspan="3">{{ prWorkOrder.woCode }}</td>
<td colspan="2">{{ prWorkOrder.pjYieldOrder.partCode }}</td>
<td>{{ yieldType == 4 ? "壳体" :'插针' }}</td>
<td colspan="2">{{ prWorkOrder.batchNo }}</td>
<td>{{ prWorkOrder.makeQty }}</td>
<td colspan="2">{{ }}</td>
<td />
<td />
<td />
</tr>
<!-- 生产过程 -->
<tr>
<td colspan="14" style="font-size:19px">生产过程</td>
</tr>
<tr>
<td>序号</td>
<td>工序</td>
<td colspan="12">内容</td>
</tr>
<template v-for="(prWpItem,prWpIndex) in prWorkPlanList" :key="prWpIndex">
<!-- // -->
<tr>
<template v-if="prWpItem.procedureSet.ppsName == '石墨模喷涂' ">
<td>{{ prWpItem.orders }}</td>
<td>{{ prWpItem.procedureSet.ppsName }}</td>
<td>操作者</td>
<td colspan="11">{{ prWpItem.receiveMan != null ? prWpItem.receiveMan.userName :'' }}</td>
</template>
<template v-if="prWpItem.procedureSet.ppsName == '石墨模烘干' ">
<td>{{ prWpItem.orders }}</td>
<td>{{ prWpItem.procedureSet.ppsName }}</td>
<td>温度()</td>
<td colspan="2">{{ prWpItem.prList[0] != null ? prWpItem.prList[0].tempSlot:'' }}</td>
<td>设备编号</td>
<td colspan="2">{{ prWpItem.prList[0] != null ? prWpItem.prList[0].deviceId:'' }}</td>
<td>操作者</td>
<td colspan="5">{{ (prWpItem.prList[0] != null && prWpItem.prList[0].createMan != null) ? prWpItem.prList[0].createMan.userName :'' }}</td>
</template>
<template v-if="prWpItem.procedureSet.ppsName == '石墨模焙烧' ">
<td>{{ prWpItem.orders }}</td>
<td>{{ prWpItem.procedureSet.ppsName }}</td>
<td>温度()</td>
<td colspan="2">{{ prWpItem.prList[0] != null ? prWpItem.prList[0].tempSlot:'' }}</td>
<td>链速(mm/min)</td>
<td colspan="2">{{ prWpItem.prList[0] != null ? prWpItem.prList[0].vSpeed:'' }}</td>
<td>设备编号</td>
<td colspan="2">{{ prWpItem.prList[0] != null ? prWpItem.prList[0].deviceId:'' }}</td>
<td>操作者</td>
<td colspan="2">{{ (prWpItem.prList[0] != null && prWpItem.prList[0].createMan != null) ? prWpItem.prList[0].createMan.userName :'' }}</td>
</template>
<!-- 玻璃封接零件检验 -->
<template v-else-if="prWpItem.procedureSet.ppsName == '玻璃封接零件检验'">
<td :rowspan="prWpItem.printChildCheck != null ? prWpItem.printChildCheck.length+3:3">{{ prWpItem.orders }}</td>
<td :rowspan="prWpItem.printChildCheck != null ? prWpItem.printChildCheck.length+3:3">{{ prWpItem.procedureSet.ppsName }}</td>
</template>
</tr>
<!-- // -->
<template v-if="prWpItem.procedureSet.ppsName == '玻璃封接零件检验'">
<tr>
<td colspan="12">检验记录</td>
</tr>
<tr>
<td>项目编号</td>
<td colspan="4">检测项目</td>
<td colspan="3">检验结果</td>
<td colspan="2">检验人员</td>
<td colspan="2">检验日期</td>
</tr>
<template v-for="(prCcItem,prCcIndex) in prWpItem.printChildCheck" :key="prCcIndex">
<tr>
<td>{{ prCcItem.testOrders }}</td>
<td>{{ prCcItem.testName }}</td>
<td colspan="3">{{ prCcItem.trialStandard }}</td>
<td colspan="3">{{ prCcItem.checkResult }}</td>
<td colspan="2">{{ prCcItem.checkName }}</td>
<td colspan="2">{{ prCcItem.checkDate }}</td>
</tr>
</template>
</template>
</template>
</tbody>
</table>
</div>
</el-dialog>
</template>
<script>
export default {
props: {
showPrint: {
type: Boolean,
default: false,
},
planList: {
type: Array,
default: () => [],
},
checkRow: {
type: Object,
default: () => {},
},
},
data() {
return {
printConfig: {
id: 'printMe',
extraCss: 'https://cdn.bootcdn.net/ajax/libs/animate.css/4.1.1/animate.compat.css',
extraHead: '<meta http-equiv="Content-Language" content="zh-cn"/>',
},
loading: false,
dsPart: {},
prWorkOrder: { pjYieldOrder: {} },
workOrderList: [],
yieldType: 4,
prWorkPlanList: [],
};
},
created() {
// -
this.prWorkOrder = {
woCode: 'WO-S2302934-R04',
batchNo: 'L08623045023',
makeQty: 20,
pjYieldOrder: {
partCode: '21E8-304-523-E9',
poQty: 20,
prodIdent: ''
}
};
this.workOrderList = [this.prWorkOrder];
this.yieldType = 4;
// -
this.prWorkPlanList = [
{
orders: '0005',
totalSlotList: 0,
totalPrList: 0,
procedureSet: { ppsName: '石墨模喷涂' },
slotList: [],
prList: [],
receiveMan: { userName: '张伟' }
},
{
orders: '0010',
totalPrList: 1,
totalSlotList: 0,
procedureSet: { ppsName: '石墨模烘干' },
slotList: [],
prList: [{
tempSlot: '120',
deviceId: 'DRY-002',
createMan: { userName: '李娜' }
}]
},
{
orders: '0015',
totalPrList: 1,
totalSlotList: 0,
procedureSet: { ppsName: '石墨模焙烧' },
slotList: [],
prList: [{
tempSlot: '550',
vSpeed: '50',
deviceId: 'ROAST-001',
createMan: { userName: '王强' }
}]
},
{
orders: '0020',
totalPrList: 0,
totalSlotList: 0,
procedureSet: { ppsName: '玻璃封接零件检验' },
slotList: [],
prList: [],
printChildCheck: [
{
testOrders: '0020-0005',
testName: '外观检测',
trialStandard: '参照文件010-02235435',
checkResult: '合格',
checkName: '李素娟',
checkDate: '2024-06-02 10:00:00'
},
{
testOrders: '0020-0010',
testName: '尺寸检测',
trialStandard: 'GB/T 1800.2-2009',
checkResult: '合格',
checkName: '王芳',
checkDate: '2024-06-02 11:00:00'
}
]
}
];
},
methods: {
closeDialog() {
this.$emit('closeDialog');
},
},
};
</script>
<style lang="scss" >
.printButton {
float: right;
margin-right: 8px;
margin-top: 16px;
}
.printBox {
width: 100%;
padding: 6px;
text-align: center;
.printTitle {
font-size: 22px;
font-weight: 700;
padding: 8px;
color: #606266;
// margin-bottom: 6px;
}
.tableNo {
text-align: right;
margin-bottom: 10px;
}
table {
width: 100%;
table-layout: fixed;
tr {
width: 100%;
// table-layout: fixed;
page-break-inside: avoid;
// break-inside: avoid;
}
td {
width: 8.33%;
min-width: 80px;
height: 32px;
border: 1px solid #000;
background: transparent;
color: #000;
font-size: 13px;
text-align: center;
padding: 4px 2px;
margin: 0;
word-break: break-all;
}
//
.page-break-tip {
page-break-before: always;
break-before: always;
height: 20px;
border: none !important;
}
}
}
.fixTopLeft {
// position: fixed;
float: left;
top: 1;
left: 0;
font-family: 'SimHei';
font-size: 24px;
color: black;
}
@media print {
/* 隐藏不需要打印的元素:按钮、导航栏、侧边栏等 */
.no-print,
header,
footer,
.sidebar,
button {
display: none !important;
}
@page {
size: auto;
margin: 6mm;
}
}
// @media print { @page { size:21cm 29.7cm } }
</style>
<style lang="scss">
@media print {
.no-print {
display: none !important;
}
.print-btn {
display: none !important;
}
body {
margin: 0;
// padding: 20px;
// font-size: 12pt;
background: white !important;
}
@page {
size: auto;
margin: 6mm;
}
.printBox {
width: 100% !important;
overflow: visible !important;
table {
width: 100% !important;
table-layout: fixed;
border-collapse: collapse;
tr {
page-break-inside: avoid;
td {
width: 8.33%;
font-size: 12px;
padding: 3px 2px;
}
}
}
.print-table,
.print-table td,
.print-table th {
border-collapse: collapse !important;
box-sizing: border-box !important;
page-break-inside: avoid !important;
}
}
}
</style>

@ -65,10 +65,10 @@ export default ({ mode, command }) => {
// target: 'http://192.168.0.127:80',//外协本地
// target: 'http://192.168.0.126:80',//举手本地
// target: 'http://192.168.0.115:80',//工作台消息本地
// target: 'http://192.168.1.5:82',
target: 'http://192.168.1.5:82',
// target: "http://192.168.1.4:82",
// target: 'http://49.232.74.228:82',
target: "http://192.168.0.2",
// target: "http://192.168.0.2",
// target: 'https://saber3.bladex.cn/api',
// target: 'http://49.232.74.228:82',
// target: "http:192.168.0.220:80",

Loading…
Cancel
Save