|
@ -9,6 +9,7 @@ |
|
|
</view> |
|
|
</view> |
|
|
<u-line color="#D8D8D8" style="margin-bottom: 15rpx;margin-top: 10rpx;"></u-line> |
|
|
<u-line color="#D8D8D8" style="margin-bottom: 15rpx;margin-top: 10rpx;"></u-line> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<view class="page-main"> |
|
|
<view class="page-main"> |
|
|
<scroll-view scroll-y="true" class="page-main-scroll"> |
|
|
<scroll-view scroll-y="true" class="page-main-scroll"> |
|
|
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> |
|
|
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> |
|
@ -23,7 +24,6 @@ |
|
|
</scroll-view> |
|
|
</scroll-view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<view class="page-footer"> |
|
|
<view class="page-footer"> |
|
|
<view class="uni-flex u-col-center space-between padding_10" |
|
|
<view class="uni-flex u-col-center space-between padding_10" |
|
|
style="background-color:ghostwhite; width: 100%; "> |
|
|
style="background-color:ghostwhite; width: 100%; "> |
|
@ -39,7 +39,8 @@ |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<win-scan-button @goScan='openScanPopup'></win-scan-button> |
|
|
<win-scan-button @goScan='openScanPopup'></win-scan-button> |
|
|
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult'></win-scan-pack-and-location> |
|
|
<!-- <win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult'></win-scan-pack-and-location> --> |
|
|
|
|
|
<win-scan-pack ref="scanPopup" @getResult='getScanResult'></win-scan-pack> |
|
|
<detail-info-popup ref="detailInfoPopup"></detail-info-popup> |
|
|
<detail-info-popup ref="detailInfoPopup"></detail-info-popup> |
|
|
<com-message ref="comMessage"></com-message> |
|
|
<com-message ref="comMessage"></com-message> |
|
|
</view> |
|
|
</view> |
|
@ -81,13 +82,15 @@ |
|
|
import detailInfoPopup from '@/pages/productionReturn/coms/detailInfoPopup.vue' |
|
|
import detailInfoPopup from '@/pages/productionReturn/coms/detailInfoPopup.vue' |
|
|
import comMessage from '@/mycomponents/common/comMessage.vue' |
|
|
import comMessage from '@/mycomponents/common/comMessage.vue' |
|
|
import jobTop from '@/mycomponents/job/jobTop.vue' |
|
|
import jobTop from '@/mycomponents/job/jobTop.vue' |
|
|
|
|
|
import winScanPack from '@/mycomponents/scan/winScanPack.vue' |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
name: 'receipt_detail', |
|
|
name: 'receipt_detail', |
|
|
components: { |
|
|
components: { |
|
|
winScanButton, |
|
|
winScanButton, |
|
|
requiredLocation, |
|
|
requiredLocation, |
|
|
winScanPackAndLocation, |
|
|
// winScanPackAndLocation, |
|
|
|
|
|
winScanPack, |
|
|
comDetailCard, |
|
|
comDetailCard, |
|
|
detailInfoPopup, |
|
|
detailInfoPopup, |
|
|
comMessage, |
|
|
comMessage, |
|
@ -228,25 +231,28 @@ |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
openScanPopup() { |
|
|
openScanPopup() { |
|
|
let fromlocationCode = ''; |
|
|
this.$refs.scanPopup.openScanPopup(); |
|
|
let fromlocationList = []; |
|
|
// let fromlocationCode = ''; |
|
|
for (var i = 0; i < this.detailSource.length; i++) { |
|
|
// let fromlocationList = []; |
|
|
let item = this.detailSource[i]; |
|
|
// for (var i = 0; i < this.detailSource.length; i++) { |
|
|
item.subList.forEach(l => { |
|
|
// let item = this.detailSource[i]; |
|
|
//重复的库位不往里面插入 |
|
|
// item.subList.forEach(l => { |
|
|
var location = fromlocationList.filter(res => res.fromLocationCode != l.fromLocationCode) |
|
|
// //重复的库位不往里面插入 |
|
|
if (location.length == 0) { |
|
|
// var location = fromlocationList.filter(res => res.fromLocationCode != l.fromLocationCode) |
|
|
fromlocationList.push(l.fromLocationCode); |
|
|
// if (location.length == 0) { |
|
|
} |
|
|
// fromlocationList.push(l.fromLocationCode); |
|
|
//来源库位赋默认值 |
|
|
// } |
|
|
if (fromlocationCode == '') { |
|
|
// //来源库位赋默认值 |
|
|
if (!l.scaned) { |
|
|
// if (fromlocationCode == '') { |
|
|
fromlocationCode = l.fromLocationCode; |
|
|
// if (!l.scaned) { |
|
|
} |
|
|
// fromlocationCode = l.fromLocationCode; |
|
|
} |
|
|
// } |
|
|
}) |
|
|
// } |
|
|
} |
|
|
// }) |
|
|
this.$refs.scanPopup.openScanPopupForJob(fromlocationCode, fromlocationList, this.jobContent); |
|
|
// } |
|
|
|
|
|
// this.$refs.scanPopup.openScanPopupForJob(fromlocationCode, fromlocationList, this.jobContent); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -270,32 +276,40 @@ |
|
|
if (itemDetail.scaned) { |
|
|
if (itemDetail.scaned) { |
|
|
this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]已经扫描") |
|
|
this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]已经扫描") |
|
|
} else { |
|
|
} else { |
|
|
let balanceStatus = getInventoryStatusName(result.balance.inventoryStatus); |
|
|
itemDetail.scaned = true; |
|
|
let itemStatus = getInventoryStatusName(itemDetail.inventoryStatus); |
|
|
itemDetail.handleQty = Number(result.package.qty) |
|
|
if (itemDetail.inventoryStatus != result.balance.inventoryStatus) { |
|
|
itemDetail.stdPackQty = result.package.stdPackQty |
|
|
this.showQuestionMessage('实际库存状态[' + balanceStatus + ']与推荐库存状态[' + itemStatus + |
|
|
itemDetail.stdPackUnit = result.package.stdPackUnit |
|
|
']不一致,是否继续上架?', res => { |
|
|
this.calcHandleQty(); |
|
|
if (res) { |
|
|
|
|
|
itemDetail.scaned = true; |
|
|
|
|
|
itemDetail.handleQty = Number(result.balance.qty) |
|
|
//合格退料时不能查库存余额,因为生产退料时新生成的批次是000000 --nxt |
|
|
itemDetail.balance = result.balance; |
|
|
// let balanceStatus = getInventoryStatusName(result.balance.inventoryStatus); |
|
|
itemDetail.balance.balanceQty = result.balance.qty; |
|
|
// let itemStatus = getInventoryStatusName(itemDetail.inventoryStatus); |
|
|
itemDetail.balance.stdPackQty = result.package.stdPackQty |
|
|
// if (itemDetail.inventoryStatus != result.balance.inventoryStatus) { |
|
|
itemDetail.balance.stdPackUnit = result.package.stdPackUnit |
|
|
// this.showQuestionMessage('实际库存状态[' + balanceStatus + ']与推荐库存状态[' + itemStatus + |
|
|
this.calcHandleQty(); |
|
|
// ']不一致,是否继续上架?', res => { |
|
|
} else { |
|
|
// if (res) { |
|
|
this.scanPopupGetFocus(); |
|
|
// itemDetail.scaned = true; |
|
|
} |
|
|
// itemDetail.handleQty = Number(result.balance.qty) |
|
|
}); |
|
|
// itemDetail.balance = result.balance; |
|
|
} else { |
|
|
// itemDetail.balance.balanceQty = result.balance.qty; |
|
|
itemDetail.scaned = true; |
|
|
// itemDetail.balance.stdPackQty = result.package.stdPackQty |
|
|
itemDetail.handleQty = Number(result.balance.qty) |
|
|
// itemDetail.balance.stdPackUnit = result.package.stdPackUnit |
|
|
itemDetail.balance = result.balance; |
|
|
// this.calcHandleQty(); |
|
|
itemDetail.balance.balanceQty = result.balance.qty; |
|
|
// } else { |
|
|
itemDetail.balance.stdPackQty = result.package.stdPackQty |
|
|
// this.scanPopupGetFocus(); |
|
|
itemDetail.balance.stdPackUnit = result.package.stdPackUnit |
|
|
// } |
|
|
this.calcHandleQty(); |
|
|
// }); |
|
|
} |
|
|
// } else { |
|
|
|
|
|
// itemDetail.scaned = true; |
|
|
|
|
|
// itemDetail.handleQty = Number(result.balance.qty) |
|
|
|
|
|
// itemDetail.balance = result.balance; |
|
|
|
|
|
// itemDetail.balance.balanceQty = result.balance.qty; |
|
|
|
|
|
// itemDetail.balance.stdPackQty = result.package.stdPackQty |
|
|
|
|
|
// itemDetail.balance.stdPackUnit = result.package.stdPackUnit |
|
|
|
|
|
// this.calcHandleQty(); |
|
|
|
|
|
// } |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -346,7 +360,7 @@ |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
submitJob() { |
|
|
submitJob() { |
|
|
uni.showLoading({ |
|
|
uni.showLoading({ |
|
|
title: "提交中....", |
|
|
title: "提交中....", |
|
|
mask: true |
|
|
mask: true |
|
@ -397,7 +411,7 @@ |
|
|
detail.toPackingNumber = detail.packingNumber; |
|
|
detail.toPackingNumber = detail.packingNumber; |
|
|
detail.toContainerNumber = detail.containerNumber; |
|
|
detail.toContainerNumber = detail.containerNumber; |
|
|
detail.toBatch = detail.batch; |
|
|
detail.toBatch = detail.batch; |
|
|
|
|
|
|
|
|
detail.toLocationCode = detail.toLocationCode; |
|
|
detail.toLocationCode = detail.toLocationCode; |
|
|
subList.push(detail) |
|
|
subList.push(detail) |
|
|
} |
|
|
} |
|
@ -451,14 +465,24 @@ |
|
|
this.$refs.scanPopup.closeScanPopup(); |
|
|
this.$refs.scanPopup.closeScanPopup(); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// scanPopupGetFocus() { |
|
|
|
|
|
// this.$refs.scanPopup.getFocus(); |
|
|
|
|
|
// }, |
|
|
|
|
|
|
|
|
|
|
|
// scanPopupLoseFocus() { |
|
|
|
|
|
// this.$refs.scanPopup.loseFocus(); |
|
|
|
|
|
// }, |
|
|
|
|
|
|
|
|
scanPopupGetFocus() { |
|
|
scanPopupGetFocus() { |
|
|
this.$refs.scanPopup.packGetFocus(); |
|
|
this.$refs.scanPopup.getfocus(); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
scanPopupLoseFocus() { |
|
|
scanPopupLoseFocus() { |
|
|
this.$refs.scanPopup.packLoseFocus(); |
|
|
this.$refs.scanPopup.losefocus(); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
showQuestionMessage(message, callback) { |
|
|
showQuestionMessage(message, callback) { |
|
|
setTimeout(r => { |
|
|
setTimeout(r => { |
|
|
this.scanPopupLoseFocus(); |
|
|
this.scanPopupLoseFocus(); |
|
|