Browse Source

检验申请单提示检验申请问题

lijuncheng0816
zhang_li 1 month ago
parent
commit
6e36f0d4c1
  1. 121
      src/pages/pointPutawayJob/index.vue

121
src/pages/pointPutawayJob/index.vue

@ -35,6 +35,15 @@
<td>抽检数量</td> <td>抽检数量</td>
<td>{{item.sampleQty}}</td> <td>{{item.sampleQty}}</td>
</tr> </tr>
<tr>
<td>到货数量</td>
<td>{{item.quantityQty}}</td>
<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>
</tbody> </tbody>
</table> </table>
</view> </view>
@ -197,41 +206,83 @@
this.readFile(htmlFileUrl1, (htmlContent) => { this.readFile(htmlFileUrl1, (htmlContent) => {
this.newHtmlContent1 = htmlContent this.newHtmlContent1 = htmlContent
this.data1.inspectDTOList.forEach(item => { this.data1.inspectDTOList.forEach(item => {
str += ` if(!item.haveInspectionRequest){
<div class="box" style="page-break-before:always;"><br /> str += `
<div class="relative" > <div class="box" style="page-break-before:always;"><br />
<div class="q">Q</div> <div class="relative" >
<table border='1'> <div class="q">Q</div>
<thead> <table border='1'>
<tr class='top1'> <thead>
<th>物料代码:</th> <tr class='top1'>
<th colspan='3'>${item.itemCode}</th> <th>物料代码:</th>
</tr> <th colspan='3'>${item.itemCode}</th>
</thead> </tr>
<tbody> </thead>
<tr> <tbody>
<td>物料名称</td> <tr>
<td>${item.itemName}</td> <td>物料名称</td>
<td>发货单号</td> <td>${item.itemName}</td>
<td>${this.data1.asnNumber}</td> <td>发货单号</td>
</tr> <td>${this.data1.asnNumber}</td>
<tr> </tr>
<td>供应商</td> <tr>
<td>${item.supplierCode}</td> <td>供应商</td>
<td>供应商批次</td> <td>${item.supplierCode}</td>
<td>${item.supplierBatch}</td> <td>供应商批次</td>
</tr> <td>${item.supplierBatch}</td>
<tr> </tr>
<td>到货数量</td> <tr>
<td>${item.quantityQty}</td> <td>到货数量</td>
<td>抽检数量</td> <td>${item.quantityQty}</td>
<td>${item.sampleQty}</td> <td>抽检数量</td>
</tr> <td>${item.sampleQty}</td>
</tbody> </tr>
</table> <tr>
<td colspan='4' style="color:#ff0000;font-weight: bold;font-size: 15px;">未生成检验申请</td>
</tr>
</tbody>
</table>
</div>
</div> </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>
`
}
}) })
this.newHtmlContent1 = this.newHtmlContent1.replace( this.newHtmlContent1 = this.newHtmlContent1.replace(
"mainBody", str); // "mainBody", str); //
@ -306,9 +357,9 @@
await queryInspectionFreeFlag({ await queryInspectionFreeFlag({
number: this.number number: this.number
}).then(async res1 => { }).then(async res1 => {
console.log(444,res1)
this.data1 = res1.data this.data1 = res1.data
this.data1.inspectDTOList = this.data1.inspectDTOList.filter(item=>item.sampleQty>0) this.data1.inspectDTOList = this.data1.inspectDTOList.filter(item=>item.sampleQty>0)
// this.data1.inspectDTOList=[]
if(this.data1&&this.data1.inspectDTOList&&this.data1.inspectDTOList.length == 0){ if(this.data1&&this.data1.inspectDTOList&&this.data1.inspectDTOList.length == 0){
this.tabIndex =2 this.tabIndex =2
} }

Loading…
Cancel
Save