|
@ -1,17 +1,12 @@ |
|
|
<template> |
|
|
<template> |
|
|
<view class="page-wraper"> |
|
|
<view class="page-wraper"> |
|
|
<com-blank-view @goScan='showFromLocationPopup' v-if="detailSource.length==0"></com-blank-view> |
|
|
|
|
|
|
|
|
|
|
|
<view class="page-header"> |
|
|
<view class="page-header"> |
|
|
<view class="header_job_top"> |
|
|
<view class="header_job_top"> |
|
|
|
|
|
<job-top :dataContent="jobContent"></job-top> |
|
|
<!-- <scroll-view scroll-y="true" class="page-main-scroll"> --> |
|
|
|
|
|
|
|
|
|
|
|
<uni-collapse ref="collapse"> |
|
|
<uni-collapse ref="collapse"> |
|
|
<uni-collapse-item :open="false"> |
|
|
<uni-collapse-item :open="true"> |
|
|
<template v-slot:title> |
|
|
<template v-slot:title> |
|
|
<view> |
|
|
<view class="card_itemName" style="padding: 3px 5px; font-size: 28rpx;"> |
|
|
<job-top :dataContent="jobContent"></job-top> |
|
|
|
|
|
盘点范围 |
|
|
盘点范围 |
|
|
</view> |
|
|
</view> |
|
|
</template> |
|
|
</template> |
|
@ -20,18 +15,6 @@ |
|
|
<text class="card_packing_code ">{{getCountScopeName(range.type)}}</text> |
|
|
<text class="card_packing_code ">{{getCountScopeName(range.type)}}</text> |
|
|
<text class="card_content ">{{range.value}}</text> |
|
|
<text class="card_content ">{{range.value}}</text> |
|
|
</view> |
|
|
</view> |
|
|
<view class="card_view"> |
|
|
|
|
|
<text class="card_packing_code ">{{getCountScopeName(range.type)}}</text> |
|
|
|
|
|
<text class="card_content ">{{range.value}}</text> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="card_view"> |
|
|
|
|
|
<text class="card_packing_code ">{{getCountScopeName(range.type)}}</text> |
|
|
|
|
|
<text class="card_content ">{{range.value}}</text> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="card_view"> |
|
|
|
|
|
<text class="card_packing_code ">{{getCountScopeName(range.type)}}</text> |
|
|
|
|
|
<text class="card_content ">{{range.value}}</text> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</uni-collapse-item> |
|
|
</uni-collapse-item> |
|
|
</uni-collapse> |
|
|
</uni-collapse> |
|
@ -41,6 +24,7 @@ |
|
|
<text class="card_content ">{{fromLocationCode}}</text> |
|
|
<text class="card_content ">{{fromLocationCode}}</text> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
<com-blank-view @goScan='showFromLocationPopup' v-if="detailSource.length==0"></com-blank-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"> |
|
@ -57,7 +41,7 @@ |
|
|
</scroll-view> |
|
|
</scroll-view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<view class="page-footer"> |
|
|
<view class="page-footer" v-if="detailSource.length>0"> |
|
|
<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%; "> |
|
|
<view class=""> |
|
|
<view class=""> |
|
@ -146,7 +130,8 @@ |
|
|
jobStatus: "", |
|
|
jobStatus: "", |
|
|
fromLocation: {}, |
|
|
fromLocation: {}, |
|
|
fromLocationCode: '', |
|
|
fromLocationCode: '', |
|
|
editRemoveOption: [] |
|
|
editRemoveOption: [], |
|
|
|
|
|
itemRangeValue: "" |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
onLoad(option) { |
|
|
onLoad(option) { |
|
@ -221,11 +206,15 @@ |
|
|
uni.hideLoading(); |
|
|
uni.hideLoading(); |
|
|
that.jobContent = res.data; |
|
|
that.jobContent = res.data; |
|
|
that.jobStatus = res.data.status; |
|
|
that.jobStatus = res.data.status; |
|
|
|
|
|
let range = that.jobContent.countRange.find(r => r.type == "ITEMS_CODE"); |
|
|
|
|
|
if (range != undefined) { |
|
|
|
|
|
that.itemRangeValue = range.value; |
|
|
|
|
|
} |
|
|
callback(); |
|
|
callback(); |
|
|
|
|
|
|
|
|
}).catch(error => { |
|
|
}).catch(error => { |
|
|
uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
this.showErrorMessage(error) |
|
|
that.showErrorMessage(error) |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
@ -325,9 +314,22 @@ |
|
|
getScanResult(result) { |
|
|
getScanResult(result) { |
|
|
let that = this; |
|
|
let that = this; |
|
|
let packInfo = result.package; |
|
|
let packInfo = result.package; |
|
|
|
|
|
if (this.itemRangeValue != '') { |
|
|
|
|
|
let index = this.itemRangeValue.indexOf(packInfo.itemCode) |
|
|
|
|
|
if (index < 0) { |
|
|
|
|
|
this.afterScanLocation("物料代码【" + packInfo.itemCode + "】,不在盘点范围【" + this.itemRangeValue + "】内"); |
|
|
|
|
|
return; |
|
|
|
|
|
} else { |
|
|
|
|
|
this.onScan(packInfo); |
|
|
|
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
this.onScan(packInfo); |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
onScan(packInfo) { |
|
|
let detail = this.detailSource.find(r => r.itemCode == packInfo.itemCode && r.packingNumber == packInfo |
|
|
let detail = this.detailSource.find(r => r.itemCode == packInfo.itemCode && r.packingNumber == packInfo |
|
|
.number && r.batch == packInfo.batch && r.inventoryStatus == "OK"); |
|
|
.number && r.batch == packInfo.batch && r.inventoryStatus == "OK"); |
|
|
|
|
|
|
|
|
if (detail == undefined) { |
|
|
if (detail == undefined) { |
|
|
detail = this.createDetailInfo(packInfo); |
|
|
detail = this.createDetailInfo(packInfo); |
|
|
this.detailSource.unshift(detail) |
|
|
this.detailSource.unshift(detail) |
|
@ -366,7 +368,7 @@ |
|
|
itemDesc2: packInfo.itemDesc2, |
|
|
itemDesc2: packInfo.itemDesc2, |
|
|
projectCode: "", |
|
|
projectCode: "", |
|
|
qty: packInfo.qty, |
|
|
qty: packInfo.qty, |
|
|
countQty: packInfo.qty, |
|
|
packUnit: packInfo.packUnit, |
|
|
packQty: packInfo.packQty, |
|
|
packQty: packInfo.packQty, |
|
|
packUom: packInfo.packUom, |
|
|
packUom: packInfo.packUom, |
|
|
uom: packInfo.uom, |
|
|
uom: packInfo.uom, |
|
@ -376,8 +378,11 @@ |
|
|
warehouseCode: this.fromLocation.warehouseCode, |
|
|
warehouseCode: this.fromLocation.warehouseCode, |
|
|
areaCode: this.fromLocation.areaCode, |
|
|
areaCode: this.fromLocation.areaCode, |
|
|
locationGroupCode: this.fromLocation.locationGroupCode, |
|
|
locationGroupCode: this.fromLocation.locationGroupCode, |
|
|
creationTime: new Date(), |
|
|
createTime: new Date().getTime(), |
|
|
countTime: new Date() |
|
|
countTime: new Date().getTime(), |
|
|
|
|
|
countUser: this.$store.state.user.id, |
|
|
|
|
|
countDescription: 'a', |
|
|
|
|
|
countQty: packInfo.qty |
|
|
} |
|
|
} |
|
|
return detail; |
|
|
return detail; |
|
|
}, |
|
|
}, |
|
@ -429,12 +434,19 @@ |
|
|
this.$refs.detailInfoPopup.openPopup(item); |
|
|
this.$refs.detailInfoPopup.openPopup(item); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
commit() { |
|
|
commit() { |
|
|
// if(this.detailSource.length==0) |
|
|
if (this.detailSource.length == 0) { |
|
|
// { |
|
|
this.$refs.comMessage.showMessage('还未扫描,是否要继续提交', res => { |
|
|
|
|
|
if (res) { |
|
|
|
|
|
this.commitJob(); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
} else { |
|
|
|
|
|
this.commitJob(); |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
// } |
|
|
commitJob() { |
|
|
uni.showLoading({ |
|
|
uni.showLoading({ |
|
|
title: "提交中....", |
|
|
title: "提交中....", |
|
|
mask: true |
|
|
mask: true |
|
@ -452,9 +464,9 @@ |
|
|
uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
this.showErrorMessage(error) |
|
|
this.showErrorMessage(error) |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setParams() { |
|
|
setParams() { |
|
|
var creator = this.$store.state.user.id |
|
|
var creator = this.$store.state.user.id |
|
|
this.jobContent.subList = this.detailSource |
|
|
this.jobContent.subList = this.detailSource |
|
@ -490,10 +502,12 @@ |
|
|
this.scanPopupGetFocus(); |
|
|
this.scanPopupGetFocus(); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
showCommitSuccessMessage(hint) { |
|
|
showCommitSuccessMessage(hint) { |
|
|
this.$refs.comMessage.showSuccessMessage(hint, res => { |
|
|
this.$refs.comMessage.showSuccessMessage(hint, res => { |
|
|
navigateBack(1); |
|
|
this.fromLocationCode = ''; |
|
|
|
|
|
this.fromLocation = {}; |
|
|
|
|
|
this.detailSource = []; |
|
|
|
|
|
this.showFromLocationPopup(); |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
getCountStageName(value) { |
|
|
getCountStageName(value) { |
|
|