|
@ -2,28 +2,37 @@ |
|
|
<!-- 采购上架对应的采购收货打印页面--> |
|
|
<!-- 采购上架对应的采购收货打印页面--> |
|
|
<view class="content" style="padding:0rpx 20rpx 100rpx;min-height: calc(100vh - 120rpx);"> |
|
|
<view class="content" style="padding:0rpx 20rpx 100rpx;min-height: calc(100vh - 120rpx);"> |
|
|
<view class="tabs-box" v-if="isHaveOn && data1 && data1.inspectDTOList && data1.inspectDTOList.length>0"> |
|
|
<view class="tabs-box" v-if="isHaveOn && data1 && data1.inspectDTOList && data1.inspectDTOList.length>0"> |
|
|
<view @click="tabIndex = 1" :class="tabIndex == 1?'active1' :''" style="padding: 10rpx 0px;">检验指引单</view> |
|
|
<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 @click="tabIndex = 2" :class="tabIndex == 2?'active1' :''" style="padding: 10rpx 0px;">上架指引单</view> |
|
|
</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="box" style="page-break-before:always;" v-if="tabIndex == 1"> |
|
|
<view class=""> |
|
|
<view class="relative" v-for="(item,index) in showTableInspectDTOList" :key='index'> |
|
|
|
|
|
<view class="q">Q</view> |
|
|
<table border='1'> |
|
|
<table border='1'> |
|
|
<thead> |
|
|
<thead> |
|
|
<tr class='top1'> |
|
|
<tr class='top1'> |
|
|
<th>发货单号:</th> |
|
|
<th>物料代码:</th> |
|
|
<th colspan='2'>{{data1.asnNumber}}</th> |
|
|
<th colspan='3'>{{item.itemCode}}</th> |
|
|
</tr> |
|
|
|
|
|
<tr> |
|
|
|
|
|
<th>物料代码</th> |
|
|
|
|
|
<th>供应商批次</th> |
|
|
|
|
|
<th>检验数量</th> |
|
|
|
|
|
</tr> |
|
|
</tr> |
|
|
</thead> |
|
|
</thead> |
|
|
<tbody> |
|
|
<tbody> |
|
|
<tr v-for="(item,index) in showTableInspectDTOList" :key='index'> |
|
|
<tr> |
|
|
<td>{{item.itemCode}}</td> |
|
|
<td>物料名称</td> |
|
|
|
|
|
<td>{{item.itemName}}</td> |
|
|
|
|
|
<td>发货单号</td> |
|
|
|
|
|
<td>{{data1.asnNumber}}</td> |
|
|
|
|
|
</tr> |
|
|
|
|
|
<tr> |
|
|
|
|
|
<td>供应商</td> |
|
|
|
|
|
<td>{{item.supplierCode}}</td> |
|
|
|
|
|
<td>批次</td> |
|
|
<td>{{item.supplierBatch}}</td> |
|
|
<td>{{item.supplierBatch}}</td> |
|
|
|
|
|
</tr> |
|
|
|
|
|
<tr> |
|
|
|
|
|
<td>到货数量</td> |
|
|
|
|
|
<td>{{item.quantityQty}}</td> |
|
|
|
|
|
<td>抽检数量</td> |
|
|
<td>{{item.sampleQty}}</td> |
|
|
<td>{{item.sampleQty}}</td> |
|
|
</tr> |
|
|
</tr> |
|
|
</tbody> |
|
|
</tbody> |
|
@ -34,7 +43,7 @@ |
|
|
<com-empty-view v-if="data.length==0"></com-empty-view> |
|
|
<com-empty-view v-if="data.length==0"></com-empty-view> |
|
|
<!-- 只用于展示页面 --> |
|
|
<!-- 只用于展示页面 --> |
|
|
<view class="" v-if="tabIndex == 2"> |
|
|
<view class="" v-if="tabIndex == 2"> |
|
|
<view class="box" style="margin-bottom: 20rpx;" v-for='(item,index) in showTableSubList' :key='index'> |
|
|
<view class="box1" style="margin-bottom: 20rpx;" v-for='(item,index) in showTableSubList' :key='index'> |
|
|
<view class="top"> |
|
|
<view class="top"> |
|
|
<view class="mb-kw"> |
|
|
<view class="mb-kw"> |
|
|
目标库位:<view>{{item.toLocationCode}}</view> |
|
|
目标库位:<view>{{item.toLocationCode}}</view> |
|
@ -59,7 +68,7 @@ |
|
|
|
|
|
|
|
|
</view> |
|
|
</view> |
|
|
<view class="" style="position: fixed;width: 100%;bottom: 0rpx;left: 0px;"> |
|
|
<view class="" style="position: fixed;width: 100%;bottom: 0rpx;left: 0px;"> |
|
|
<button @click="printImage" v-if="tabIndex == 1 && data1.inspectDTOList && data1.inspectDTOList.length>0" |
|
|
<button @click="printImage" v-if="tabIndex == 1 && data1.inspectDTOList && data1.inspectDTOList.length>0" |
|
|
style='background:rgb(60, 156, 255) !important ;color: white;margin-top: 80rpx;'> 打印检验指引单 |
|
|
style='background:rgb(60, 156, 255) !important ;color: white;margin-top: 80rpx;'> 打印检验指引单 |
|
|
</button> |
|
|
</button> |
|
|
<button @click="printImage" v-if="tabIndex == 2&&isHaveOn && data.sublist && data.sublist.length>0" |
|
|
<button @click="printImage" v-if="tabIndex == 2&&isHaveOn && data.sublist && data.sublist.length>0" |
|
@ -105,11 +114,11 @@ export default { |
|
|
currentPage: 1, |
|
|
currentPage: 1, |
|
|
pageSize: 3, |
|
|
pageSize: 3, |
|
|
showTableSubList: [], |
|
|
showTableSubList: [], |
|
|
showTableInspectDTOList:[], |
|
|
showTableInspectDTOList: [], |
|
|
|
|
|
|
|
|
currentPage1: 1, |
|
|
currentPage1: 1, |
|
|
pageSize1: 20, |
|
|
pageSize1: 20, |
|
|
number:'', |
|
|
number: '', |
|
|
isHaveOn: false,//显示上架指引单 |
|
|
isHaveOn: false,//显示上架指引单 |
|
|
// isHaveInspect:false,//显示检验指引单 |
|
|
// isHaveInspect:false,//显示检验指引单 |
|
|
} |
|
|
} |
|
@ -127,17 +136,17 @@ export default { |
|
|
}, |
|
|
}, |
|
|
// 读取html文件 |
|
|
// 读取html文件 |
|
|
readFile(path, callback) { |
|
|
readFile(path, callback) { |
|
|
plus.io.resolveLocalFileSystemURL(path, function(entry) { |
|
|
plus.io.resolveLocalFileSystemURL(path, function (entry) { |
|
|
entry.file(function(file) { |
|
|
entry.file(function (file) { |
|
|
var reader = new plus.io.FileReader(); |
|
|
var reader = new plus.io.FileReader(); |
|
|
reader.onloadend = function(e) { |
|
|
reader.onloadend = function (e) { |
|
|
callback(e.target.result); |
|
|
callback(e.target.result); |
|
|
}; |
|
|
}; |
|
|
reader.readAsText(file); |
|
|
reader.readAsText(file); |
|
|
}, function(e) { |
|
|
}, function (e) { |
|
|
console.log("读取文件失败:" + e.message); |
|
|
console.log("读取文件失败:" + e.message); |
|
|
}); |
|
|
}); |
|
|
}, function(e) { |
|
|
}, function (e) { |
|
|
console.log("获取图片资源失败:" + e.message); |
|
|
console.log("获取图片资源失败:" + e.message); |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
@ -160,7 +169,7 @@ export default { |
|
|
<div class="mb-bo"> |
|
|
<div class="mb-bo"> |
|
|
<div class="mb-left"> |
|
|
<div class="mb-left"> |
|
|
<div class="mb-text"> |
|
|
<div class="mb-text"> |
|
|
物料号:<div>${item.itemCode}</div> |
|
|
物料号:<div>${item.itemCode}asjkdhfksjahfkljashfklsdh</div> |
|
|
</div> |
|
|
</div> |
|
|
<div class="mb-text"> |
|
|
<div class="mb-text"> |
|
|
托包装号:<div>${item.packingNumber}</div> |
|
|
托包装号:<div>${item.packingNumber}</div> |
|
@ -184,44 +193,48 @@ export default { |
|
|
// 获取采购收货指引单html |
|
|
// 获取采购收货指引单html |
|
|
getPurchaseReceiptJobHtml() { |
|
|
getPurchaseReceiptJobHtml() { |
|
|
this.$nextTick(async () => { |
|
|
this.$nextTick(async () => { |
|
|
let str2 = '' |
|
|
let str = '' |
|
|
this.readFile(htmlFileUrl1, (htmlContent) => { |
|
|
this.readFile(htmlFileUrl1, (htmlContent) => { |
|
|
this.newHtmlContent1 = htmlContent |
|
|
this.newHtmlContent1 = htmlContent |
|
|
str2 = `<div class="box" style="page-break-before:always;" ><br /> |
|
|
|
|
|
<div class=""> |
|
|
|
|
|
<table border='1'> |
|
|
|
|
|
<thead> |
|
|
|
|
|
<tr class='top'> |
|
|
|
|
|
<th>发货单号:</th> |
|
|
|
|
|
<th colspan='2'>${this.data1.asnNumber}</th> |
|
|
|
|
|
</tr> |
|
|
|
|
|
<tr> |
|
|
|
|
|
<th>物料代码</th> |
|
|
|
|
|
<th>供应商批次</th> |
|
|
|
|
|
<th>检验数量</th> |
|
|
|
|
|
</tr> |
|
|
|
|
|
</thead> |
|
|
|
|
|
<tbody> |
|
|
|
|
|
strBody |
|
|
|
|
|
</tbody> |
|
|
|
|
|
</table> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
` |
|
|
|
|
|
let str1 = '' |
|
|
|
|
|
this.data1.inspectDTOList.forEach(item => { |
|
|
this.data1.inspectDTOList.forEach(item => { |
|
|
str1 += ` |
|
|
str += ` |
|
|
<tr> |
|
|
<div class="box" style="page-break-before:always;"><br /> |
|
|
<td>${item.itemCode}</td> |
|
|
<div class="relative" > |
|
|
<td>${item.supplierBatch}</td> |
|
|
<div class="q">Q</div> |
|
|
<td>${item.sampleQty}</td> |
|
|
<table border='1'> |
|
|
</tr> |
|
|
<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> |
|
|
` |
|
|
` |
|
|
}) |
|
|
}) |
|
|
str2 = str2.replace("strBody", str1) |
|
|
|
|
|
console.log(335, str1) |
|
|
|
|
|
this.newHtmlContent1 = this.newHtmlContent1.replace( |
|
|
this.newHtmlContent1 = this.newHtmlContent1.replace( |
|
|
"mainBody", str2); //替换物品代码 |
|
|
"mainBody", str); //替换物品代码 |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
}) |
|
|
}) |
|
@ -232,7 +245,7 @@ export default { |
|
|
(this.currentPage - 1) * this.pageSize, |
|
|
(this.currentPage - 1) * this.pageSize, |
|
|
this.currentPage * this.pageSize |
|
|
this.currentPage * this.pageSize |
|
|
) |
|
|
) |
|
|
if(array.length>0){ |
|
|
if (array.length > 0) { |
|
|
this.showTableSubList = [...this.showTableSubList, ...array] |
|
|
this.showTableSubList = [...this.showTableSubList, ...array] |
|
|
this.currentPage += 1 |
|
|
this.currentPage += 1 |
|
|
} |
|
|
} |
|
@ -247,14 +260,14 @@ export default { |
|
|
(this.currentPage1 - 1) * this.pageSize1, |
|
|
(this.currentPage1 - 1) * this.pageSize1, |
|
|
this.currentPage1 * this.pageSize1 |
|
|
this.currentPage1 * this.pageSize1 |
|
|
) |
|
|
) |
|
|
if(array.length>0){ |
|
|
if (array.length > 0) { |
|
|
this.showTableInspectDTOList = [...this.showTableInspectDTOList, ...array] |
|
|
this.showTableInspectDTOList = [...this.showTableInspectDTOList, ...array] |
|
|
this.currentPage1 += 1 |
|
|
this.currentPage1 += 1 |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
this.showTableInspectDTOList = this.data1.inspectDTOList |
|
|
this.showTableInspectDTOList = this.data1.inspectDTOList |
|
|
} |
|
|
} |
|
|
console.log(233,this.showTableInspectDTOList) |
|
|
console.log(233, this.showTableInspectDTOList) |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
watch: { |
|
|
watch: { |
|
@ -280,7 +293,7 @@ export default { |
|
|
}, |
|
|
}, |
|
|
async onShow() { |
|
|
async onShow() { |
|
|
// 获取上架指引单 |
|
|
// 获取上架指引单 |
|
|
if(this.data.ids){ |
|
|
if (this.data.ids) { |
|
|
await getJimuPutawayJobDetail({ |
|
|
await getJimuPutawayJobDetail({ |
|
|
masterIds: this.data.ids |
|
|
masterIds: this.data.ids |
|
|
}).then(res => { |
|
|
}).then(res => { |
|
@ -289,29 +302,30 @@ export default { |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
// 获取采购收货指引单 |
|
|
// 获取采购收货指引单 |
|
|
if(this.number){ |
|
|
if (this.number) { |
|
|
await queryInspectionFreeFlag({ |
|
|
await queryInspectionFreeFlag({ |
|
|
number: this.number |
|
|
number: this.number |
|
|
}).then(async res1 => { |
|
|
}).then(async 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=[] |
|
|
// 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 |
|
|
} |
|
|
} |
|
|
this.getTableInspectDTOList() |
|
|
this.getTableInspectDTOList() |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
this.getPointPutawayJobHtml() |
|
|
this.getPointPutawayJobHtml() |
|
|
this.getPurchaseReceiptJobHtml() |
|
|
this.getPurchaseReceiptJobHtml() |
|
|
}, |
|
|
}, |
|
|
onReachBottom() { |
|
|
onReachBottom() { |
|
|
if(this.tabIndex == 1){ |
|
|
if (this.tabIndex == 1) { |
|
|
if(this.showTableInspectDTOList.length!=this.data1.inspectDTOList.length){ |
|
|
if (this.showTableInspectDTOList != this.data1.inspectDTOList.length) { |
|
|
this.getTableInspectDTOList() |
|
|
this.getTableInspectDTOList() |
|
|
} |
|
|
} |
|
|
}else{ |
|
|
} else { |
|
|
if(this.showTableSubList.length!=this.data.sublist.length){ |
|
|
if (this.showTableSubList.length != this.data.sublist.length) { |
|
|
this.getTableSubList() |
|
|
this.getTableSubList() |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -322,7 +336,7 @@ export default { |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
<style lang="scss"> |
|
|
<style lang="scss"> |
|
|
.box { |
|
|
.box1 { |
|
|
font-size: 26rpx; |
|
|
font-size: 26rpx; |
|
|
/* display: flex; */ |
|
|
/* display: flex; */ |
|
|
/* padding: 20rpx; */ |
|
|
/* padding: 20rpx; */ |
|
@ -438,7 +452,7 @@ export default { |
|
|
|
|
|
|
|
|
.top1 th { |
|
|
.top1 th { |
|
|
font-weight: bold; |
|
|
font-weight: bold; |
|
|
font-size: 16px; |
|
|
font-size: 13px; |
|
|
padding: 10px; |
|
|
padding: 10px; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -458,6 +472,14 @@ th { |
|
|
td { |
|
|
td { |
|
|
padding: 10px; |
|
|
padding: 10px; |
|
|
|
|
|
|
|
|
|
|
|
&:nth-child(2n) { |
|
|
|
|
|
width: 290rpx; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
&:nth-child(2n+1) { |
|
|
|
|
|
width: 160rpx; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.tabs-box { |
|
|
.tabs-box { |
|
@ -483,4 +505,18 @@ td { |
|
|
border-bottom: 4rpx solid rgb(60, 156, 255); |
|
|
border-bottom: 4rpx solid rgb(60, 156, 255); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.relative { |
|
|
|
|
|
margin-bottom: 20rpx; |
|
|
|
|
|
position: relative; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.q { |
|
|
|
|
|
position: absolute; |
|
|
|
|
|
left: 50%; |
|
|
|
|
|
top: 50%; |
|
|
|
|
|
font-size: 400rpx; |
|
|
|
|
|
transform: translate(-50%, -50%); |
|
|
|
|
|
color: rgba(0, 0, 0, 0.1); |
|
|
|
|
|
} |
|
|
</style> |
|
|
</style> |