Browse Source

检验打印单提示变添加没有检验方案和检验阶段不存在

ljc_0803
zhang_li 3 months ago
parent
commit
1a1c9874a2
  1. 194
      src/pages/pointPutawayJob/index.vue

194
src/pages/pointPutawayJob/index.vue

@ -5,10 +5,11 @@
<view @click="tabIndex = 1" :class="tabIndex == 1?'active1' :''" style="padding: 10rpx 0px;">检验指引单</view>
<view @click="tabIndex = 2" :class="tabIndex == 2?'active1' :''" style="padding: 10rpx 0px;">上架指引单</view>
</view>
<view class="" :style="{'paddingTop':isHaveOn && data1 && data1.inspectDTOList && data1.inspectDTOList.length>0?'100rpx': '30rpx'}">
<view class=""
:style="{'paddingTop':isHaveOn && data1 && data1.inspectDTOList && data1.inspectDTOList.length>0?'100rpx': '30rpx'}">
<view class="box" style="page-break-before:always;" v-if="tabIndex == 1">
<view class="relative" v-for="(item,index) in showTableInspectDTOList" :key='index'>
<view class="q">Q</view>
<view class="relative" v-for="(item,index) in showTableInspectDTOList" :key='index'>
<view class="q">Q</view>
<table border='1'>
<thead>
<tr class='top1'>
@ -35,8 +36,14 @@
<td>抽检数量</td>
<td>{{item.sampleQty}}</td>
</tr>
<tr v-if="!item.haveInspectionRequest">
<td colspan='4' style="color:#ff0000;font-weight: bold;font-size: 15px;">未生成检验申请</td>
<tr v-if="item.haveInspectionRequest==='0'">
<td colspan='4' style="color:#ff0000;font-weight: bold;font-size: 15px;">未生成检验申请</td>
</tr>
<tr v-else-if="item.haveInspectionRequest==='2'">
<td colspan='4' style="color:#ffab01;font-weight: bold;font-size: 15px;">没有检验方案</td>
</tr>
<tr v-else-if="item.haveInspectionRequest==='3'">
<td colspan='4' style="color:#258eff;font-weight: bold;font-size: 15px;">检验阶段不存在</td>
</tr>
</tbody>
</table>
@ -123,7 +130,7 @@
currentPage1: 1,
pageSize1: 20,
number: '',
isHaveOn: false,//
isHaveOn: false, //
// isHaveInspect:false,//
}
},
@ -201,83 +208,52 @@
this.readFile(htmlFileUrl1, (htmlContent) => {
this.newHtmlContent1 = htmlContent
this.data1.inspectDTOList.forEach(item => {
if(!item.haveInspectionRequest){
str += `
<div class="box" style="page-break-before:always;"><br />
<div class="relative" >
<div class="q">Q</div>
<table border='1'>
<thead>
<tr class='top1'>
<th>物料代码:</th>
<th colspan='3'>${item.itemCode}</th>
</tr>
</thead>
<tbody>
<tr>
<td>物料名称</td>
<td>${item.itemName}</td>
<td>发货单号</td>
<td>${this.data1.asnNumber}</td>
</tr>
<tr>
<td>供应商</td>
<td>${item.supplierCode}</td>
<td>供应商批次</td>
<td>${item.supplierBatch}</td>
</tr>
<tr>
<td>到货数量</td>
<td>${item.quantityQty}</td>
<td>抽检数量</td>
<td>${item.sampleQty}</td>
</tr>
<tr>
<td colspan='4' style="color:#ff0000;font-weight: bold;font-size: 15px;">未生成检验申请</td>
</tr>
</tbody>
</table>
</div>
</div>
`
}else{
str += `
<div class="box" style="page-break-before:always;"><br />
<div class="relative" >
<div class="q">Q</div>
<table border='1'>
<thead>
<tr class='top1'>
<th>物料代码:</th>
<th colspan='3'>${item.itemCode}</th>
</tr>
</thead>
<tbody>
<tr>
<td>物料名称</td>
<td>${item.itemName}</td>
<td>发货单号</td>
<td>${this.data1.asnNumber}</td>
</tr>
<tr>
<td>供应商</td>
<td>${item.supplierCode}</td>
<td>供应商批次</td>
<td>${item.supplierBatch}</td>
</tr>
<tr>
<td>到货数量</td>
<td>${item.quantityQty}</td>
<td>抽检数量</td>
<td>${item.sampleQty}</td>
</tr>
</tbody>
</table>
</div>
</div>
`
let str1 = `
<div class="box" style="page-break-before:always;"><br />
<div class="relative" >
<div class="q">Q</div>
<table border='1'>
<thead>
<tr class='top1'>
<th>物料代码:</th>
<th colspan='3'>${item.itemCode}</th>
</tr>
</thead>
<tbody>
<tr>
<td>物料名称</td>
<td>${item.itemName}</td>
<td>发货单号</td>
<td>${this.data1.asnNumber}</td>
</tr>
<tr>
<td>供应商</td>
<td>${item.supplierCode}</td>
<td>供应商批次</td>
<td>${item.supplierBatch}</td>
</tr>
<tr>
<td>到货数量</td>
<td>${item.quantityQty}</td>
<td>抽检数量</td>
<td>${item.sampleQty}</td>
</tr>
`
let str2 = ``
if(item.haveInspectionRequest==='0'){
str2 =`<tr><td colspan='4' style="color:#ff0000;font-weight: bold;font-size: 15px;">未生成检验申请</td></tr>`
}else if(item.haveInspectionRequest==='2'){
str2 =`<tr><td colspan='4' style="color:#ffab01;font-weight: bold;font-size: 15px;">没有检验方案</td></tr>`
}else if(item.haveInspectionRequest==='3'){
str2 =`<tr><td colspan='4' style="color:#258eff;font-weight: bold;font-size: 15px;">检验阶段不存在</td></tr>`
}
let str3 = `
</tbody>
</table>
</div>
</div>
`
str += str1 + str2+ str3
})
this.newHtmlContent1 = this.newHtmlContent1.replace(
"mainBody", str); //
@ -346,7 +322,7 @@
},
async onShow() {
//
if(this.data.ids){
if (this.data.ids) {
await getJimuPutawayJobDetail({
masterIds: this.data.ids
}).then(res => {
@ -355,25 +331,24 @@
})
}
//
if(this.number){
if (this.number) {
await queryInspectionFreeFlag({
number: this.number
}).then(async res1 => {
console.log(444,res1)
this.data1 = res1.data
this.data1.inspectDTOList = this.data1.inspectDTOList.filter(item=>item.sampleQty>0)
if(this.data1&&this.data1.inspectDTOList&&this.data1.inspectDTOList.length == 0){
this.tabIndex =2
}
this.getTableInspectDTOList()
})
.catch(error=>{
this.$refs.comMessage.showMessage(error, res => {
if (res) {
number: this.number
}).then(async res1 => {
this.data1 = res1.data
this.data1.inspectDTOList = this.data1.inspectDTOList.filter(item => item.sampleQty >0)
if (this.data1 && this.data1.inspectDTOList && this.data1.inspectDTOList.length == 0) {
this.tabIndex = 2
}
});
})
this.getTableInspectDTOList()
})
.catch(error => {
this.$refs.comMessage.showMessage(error, res => {
if (res) {
}
});
})
}
this.getPointPutawayJobHtml()
@ -531,11 +506,13 @@
td {
padding: 10px;
&:nth-child(2n){
width:290rpx;
&:nth-child(2n) {
width: 290rpx;
}
&:nth-child(2n+1){
width:160rpx;
&:nth-child(2n+1) {
width: 160rpx;
}
}
@ -563,17 +540,18 @@
border-bottom: 4rpx solid rgb(60, 156, 255);
}
}
.relative{
.relative {
margin-bottom: 20rpx;
position: relative;
}
.q{
.q {
position: absolute;
left: 50%;
top:50%;
top: 50%;
font-size: 400rpx;
transform: translate(-50% ,-50%);
transform: translate(-50%, -50%);
color: rgba(0, 0, 0, 0.1);
}
</style>
Loading…
Cancel
Save