Browse Source

page/pointPutawayJob 文件迁移 8/8-10/25

pull/1/head
test 4 months ago
parent
commit
212472f628
  1. 359
      src/pages/pointPutawayJob/index.vue

359
src/pages/pointPutawayJob/index.vue

@ -5,38 +5,50 @@
<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="relative" v-for="(item,index) in showTableInspectDTOList" :key='index'>
<view class="q">Q</view>
<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>{{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>
<view class="left">
<view class="left-item">
<view class="label">发货单号</view>
<view>{{ data1.asnNumber }}</view>
</view>
<view class="left-item">
<view class="label">物料代码</view>
<view>{{ item.itemCode }}</view>
</view>
<view class="left-item">
<view class="label">物料名称</view>
<view>{{ item.itemName }}</view>
</view>
<view class="left-item">
<view class="label">供应商</view>
<view>{{ item.supplierCode }}</view>
</view>
<view class="left-item">
<view class="label">供应商批次</view>
<view>{{ item.supplierBatch }}</view>
</view>
<view class="left-item">
<view class="label">到货数量</view>
<view>{{ item.quantityQty }}</view>
</view>
<view class="left-item">
<view class="label">抽检数量</view>
<view>{{ item.sampleQty }}</view>
</view>
<view class="left-item" v-if="item.haveInspectionRequest==='0'">
<view style="color:#ff0000;font-weight: bold;font-size: 15px;">未生成检验申请</view>
</view>
<view class="left-item" v-else-if="item.haveInspectionRequest==='2'">
<view style="color:#ffab01;font-weight: bold;font-size: 15px;">没有检验方案</view>
</view>
<view class="left-item" v-else-if="item.haveInspectionRequest==='3'">
<view style="color:#258eff;font-weight: bold;font-size: 15px;">检验阶段不存在</view>
</view>
</view>
</view>
</view>
</view>
@ -46,20 +58,24 @@
<view class="box1" style="margin-bottom: 20rpx;" v-for='(item,index) in showTableSubList' :key='index'>
<view class="top">
<view class="mb-kw">
目标库位<view>{{item.toLocationCode}}</view>
目标库位
<view>{{ item.toLocationCode }}</view>
</view>
<view class="mb-bo">
<view class="mb-left">
<view class="mb-text">
物料号<view>{{item.itemCode}}</view>
物料号
<view>{{ item.itemCode }}</view>
</view>
<view class="mb-text">
托包装号<view>{{item.packingNumber}}</view>
托包装号
<view>{{ item.packingNumber }}</view>
</view>
</view>
<view class="mb-right">
<view class="mb-text">
数量<view>{{item.qty}}{{item.uom}}</view>
数量
<view>{{ item.qty }}{{ item.uom }}</view>
</view>
</view>
</view>
@ -75,7 +91,9 @@
style='background:rgb(60, 156, 255) !important ;color: white;margin-top: 80rpx;'> 打印上架指引单
</button>
</view>
<u-empty text="无打印数据" mode="list"
v-if="(tabIndex == 1 &&(!data1.inspectDTOList || data1.inspectDTOList && data1.inspectDTOList.length==0))||(tabIndex == 2&&isHaveOn && (!data.sublist || data.sublist.length==0))"></u-empty>
<comMessage ref="comMessage"></comMessage>
</view>
</template>
@ -119,23 +137,25 @@ export default {
currentPage1: 1,
pageSize1: 20,
number: '',
isHaveOn: false,//
isHaveOn: false, //
// isHaveInspect:false,//
}
},
methods: {
// #ifdef APP
//
printImage() {
// #ifdef APP
if (this.tabIndex == 1) {
testModule.doHTMLPrint(this.newHtmlContent1)
} else {
testModule.doHTMLPrint(this.newHtmlContent)
}
// #endif
},
// html
readFile(path, callback) {
// #ifdef APP
plus.io.resolveLocalFileSystemURL(path, function (entry) {
entry.file(function (file) {
var reader = new plus.io.FileReader();
@ -149,8 +169,8 @@ export default {
}, function (e) {
console.log("获取图片资源失败:" + e.message);
});
// #endif
},
// #endif
formatDate(val) {
return dateFormat(val)
},
@ -158,6 +178,7 @@ export default {
getPointPutawayJobHtml() {
this.$nextTick(async () => {
let str = ''
// #ifdef APP-PLUS
this.readFile(htmlFileUrl, (htmlContent) => {
this.newHtmlContent = htmlContent
this.data.sublist.forEach(item => {
@ -187,56 +208,79 @@ export default {
this.newHtmlContent = this.newHtmlContent.replace(
"mainBody", str); //
});
// #endif
})
},
// html
getPurchaseReceiptJobHtml() {
this.$nextTick(async () => {
let str = ''
// #ifdef APP-PLUS
this.readFile(htmlFileUrl1, (htmlContent) => {
this.newHtmlContent1 = htmlContent
this.data1.inspectDTOList.forEach(item => {
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>
let str1 = `
<div class="box" style="page-break-before:always;"><br />
<div class="relative" >
<div class="q">Q</div>
<div class="left">
<div class="left-item">
<div class="label">发货单号</div>
<div>${this.data1.asnNumber}</div>
</div>
<div class="left-item">
<div class="label">物料代码</div>
<div>${item.itemCode}</div>
</div>
<div class="left-item">
<div class="label">物料名称</div>
<div>${item.itemName}</div>
</div>
<div class="left-item">
<div class="label">供应商</div>
<div>${item.supplierCode}</div>
</div>
<div class="left-item">
<div class="label">供应商批次</div>
<div>${item.supplierBatch}</div>
</div>
<div class="left-item">
<div class="label">到货数量</div>
<div>${item.quantityQty}</div>
</div>
<div class="left-item">
<div class="label">抽检数量</div>
<div>${item.sampleQty}</div>
</div>
`
let str2 = ``
if (item.haveInspectionRequest === '0') {
str2 = `
<div class="left-item">
<div style="color:#ff0000;font-weight: bold;font-size: 15px;">未生成检验申请</div>
</div>`
} else if (item.haveInspectionRequest === '2') {
str2 = `
<div class="left-item">
<div style="color:#ffab01;font-weight: bold;font-size: 15px;">没有检验方案</div>
</div>`
} else if (item.haveInspectionRequest === '3') {
str2 = `
<div class="left-item">
<div style="color:#258eff;font-weight: bold;font-size: 15px;">检验阶段不存在</div>
</div>`
}
let str3 = `
</div>
`
</div>
</div>
`
str += str1 + str2 + str3
})
this.newHtmlContent1 = this.newHtmlContent1.replace(
"mainBody", str); //
});
// #endif
})
},
getTableSubList() {
@ -252,7 +296,6 @@ export default {
} else {
this.showTableSubList = this.data.sublist
}
// console.log(233,this.showTableSubList)
},
getTableInspectDTOList() {
if (this.data1.inspectDTOList.length > this.pageSize1) {
@ -267,8 +310,14 @@ export default {
} else {
this.showTableInspectDTOList = this.data1.inspectDTOList
}
console.log(233, this.showTableInspectDTOList)
}
},
showMessage(message) {
this.$refs.comMessage.showMessage(message, res => {
if (res) {
}
});
},
},
watch: {
isLoadFinish: {
@ -301,19 +350,30 @@ export default {
this.getTableSubList()
})
}
//
if (this.data.ids && !this.number) {
this.tabIndex = 2
}
//
if (this.number) {
await queryInspectionFreeFlag({
number: this.number
}).then(async res1 => {
this.data1 = res1.data
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) {
this.data1.inspectDTOList = this.data1.inspectDTOList.filter(item => item.sampleQty >
0)
if (this.data1 && this.data1.inspectDTOList && this.data1.inspectDTOList.length == 0 && this.data.ids) {
this.tabIndex = 2
}
this.getTableInspectDTOList()
})
.catch(error => {
this.$refs.comMessage.showMessage(error, res => {
if (res) {
}
});
})
}
this.getPointPutawayJobHtml()
@ -338,61 +398,51 @@ export default {
<style lang="scss">
.box1 {
font-size: 26rpx;
/* display: flex; */
/* padding: 20rpx; */
border: 1px solid #dedede;
}
.left {
border-top: 1px solid #b1b1b1;
border-left: 1px solid #b1b1b1;
flex: 1;
border-bottom: 1px solid #b1b1b1;
}
.left-item {
display: flex;
}
.label {
border-bottom: 1px solid #b1b1b1;
border-top: 1px solid #b1b1b1;
border-left: 1px solid #b1b1b1;
border-right: 1px solid #b1b1b1;
width: 140rpx;
padding: 0px 10rpx;
height: 60rpx;
line-height: 60rpx;
}
min-height: 30px;
line-height: 30px;
.value {
border-bottom: 1px solid #b1b1b1;
border-right: 1px solid #b1b1b1;
padding: 0px 5px;
height: 60rpx;
flex: 1;
width: 0px;
display: flex;
align-items: center;
word-wrap: break-word;
}
.right {
width: 50%;
view {
padding: 4px 10px;
}
border-top: 1px solid #b1b1b1;
.label {
width: 100px;
padding: 4px 10px;
border-right: 1px solid #b1b1b1;
}
}
.image {
width: 100%;
height: 301rpx;
border-bottom: 1px solid #b1b1b1;
border-top: 1px solid #b1b1b1;
border-right: 1px solid #b1b1b1;
.relative {
margin-bottom: 20rpx;
position: relative;
}
.image img {
width: calc(100% - 4px);
height: calc(100% - 4px);
margin: 4rpx;
.q {
position: absolute;
font-size: 12.5rem;
color: rgba(0, 0, 0, 0.1);
width: calc(100% - 100px);
right: 0px;
top: 0px;
text-align: center;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.mb-kw {
@ -439,7 +489,6 @@ export default {
}
.mb-bo .mb-right .mb-text {
width: 100%;
}
@ -449,74 +498,4 @@ export default {
text-align: center;
width: 100%;
}
.top1 th {
font-weight: bold;
font-size: 13px;
padding: 10px;
}
table {
border-collapse: collapse;
border: 1px solid #dedede;
/* 设置表格的边框 */
width: 100%
}
th {
text-align: left;
padding: 10px;
}
td {
padding: 10px;
&:nth-child(2n) {
width: 290rpx;
}
&:nth-child(2n+1) {
width: 160rpx;
}
}
.tabs-box {
display: flex;
align-items: center;
margin-bottom: 20rpx;
border-bottom: 2rpx solid rgb(188, 188, 188);
position: fixed;
background: white;
width: 100%;
left: 0px;
view {
flex: 1;
text-align: center;
line-height: 60rpx;
font-size: 30rpx;
}
.active1 {
color: rgb(60, 156, 255) !important;
font-weight: bold;
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>
Loading…
Cancel
Save