|
|
@ -5,7 +5,8 @@ |
|
|
|
<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> |
|
|
@ -35,9 +36,15 @@ |
|
|
|
<td>抽检数量</td> |
|
|
|
<td>{{item.sampleQty}}</td> |
|
|
|
</tr> |
|
|
|
<tr v-if="!item.haveInspectionRequest"> |
|
|
|
<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> |
|
|
|
</view> |
|
|
@ -201,8 +208,7 @@ |
|
|
|
this.readFile(htmlFileUrl1, (htmlContent) => { |
|
|
|
this.newHtmlContent1 = htmlContent |
|
|
|
this.data1.inspectDTOList.forEach(item => { |
|
|
|
if(!item.haveInspectionRequest){ |
|
|
|
str += ` |
|
|
|
let str1 = ` |
|
|
|
<div class="box" style="page-break-before:always;"><br /> |
|
|
|
<div class="relative" > |
|
|
|
<div class="q">Q</div> |
|
|
@ -232,52 +238,22 @@ |
|
|
|
<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> |
|
|
|
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); //替换物品代码 |
|
|
@ -359,7 +335,6 @@ |
|
|
|
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) { |
|
|
@ -531,9 +506,11 @@ |
|
|
|
|
|
|
|
td { |
|
|
|
padding: 10px; |
|
|
|
|
|
|
|
&:nth-child(2n) { |
|
|
|
width: 290rpx; |
|
|
|
} |
|
|
|
|
|
|
|
&:nth-child(2n+1) { |
|
|
|
width: 160rpx; |
|
|
|
} |
|
|
@ -563,6 +540,7 @@ |
|
|
|
border-bottom: 4rpx solid rgb(60, 156, 255); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.relative { |
|
|
|
margin-bottom: 20rpx; |
|
|
|
position: relative; |
|
|
|