|
|
@ -1,17 +1,12 @@ |
|
|
|
<template> |
|
|
|
<view class="page-wraper"> |
|
|
|
<com-blank-view @goScan='showFromLocationPopup' v-if="detailSource.length==0"></com-blank-view> |
|
|
|
|
|
|
|
<view class="page-header"> |
|
|
|
<view class="header_job_top"> |
|
|
|
|
|
|
|
<!-- <scroll-view scroll-y="true" class="page-main-scroll"> --> |
|
|
|
|
|
|
|
<job-top :dataContent="jobContent"></job-top> |
|
|
|
<uni-collapse ref="collapse"> |
|
|
|
<uni-collapse-item :open="false"> |
|
|
|
<uni-collapse-item :open="true"> |
|
|
|
<template v-slot:title> |
|
|
|
<view> |
|
|
|
<job-top :dataContent="jobContent"></job-top> |
|
|
|
<view class="card_itemName" style="padding: 3px 5px; font-size: 28rpx;"> |
|
|
|
盘点范围 |
|
|
|
</view> |
|
|
|
</template> |
|
|
@ -20,18 +15,6 @@ |
|
|
|
<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 class="card_view"> |
|
|
|
<text class="card_packing_code ">{{getCountScopeName(range.type)}}</text> |
|
|
|
<text class="card_content ">{{range.value}}</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</uni-collapse-item> |
|
|
|
</uni-collapse> |
|
|
@ -41,6 +24,7 @@ |
|
|
|
<text class="card_content ">{{fromLocationCode}}</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<com-blank-view @goScan='showFromLocationPopup' v-if="detailSource.length==0"></com-blank-view> |
|
|
|
<view class="page-main"> |
|
|
|
|
|
|
|
<scroll-view scroll-y="true" class="page-main-scroll"> |
|
|
@ -57,12 +41,22 @@ |
|
|
|
</scroll-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" |
|
|
|
style="background-color:ghostwhite; width: 100%; "> |
|
|
|
<view class=""> |
|
|
|
<view class="uni-flex u-col-center space-between padding_10"> |
|
|
|
<view> |
|
|
|
已扫描: |
|
|
|
</view> |
|
|
|
<view class="card_packing_code" style="padding: 5px; font-weight: bold ; font-size: 40rpx;"> |
|
|
|
{{detailSource.length}} |
|
|
|
</view> |
|
|
|
<view class=" uni-flex uni-row"> |
|
|
|
<view > |
|
|
|
(箱) |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class=" uni-flex uni-row space-between"> |
|
|
|
|
|
|
|
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -146,7 +140,8 @@ |
|
|
|
jobStatus: "", |
|
|
|
fromLocation: {}, |
|
|
|
fromLocationCode: '', |
|
|
|
editRemoveOption: [] |
|
|
|
editRemoveOption: [], |
|
|
|
itemRangeValue: "" |
|
|
|
}; |
|
|
|
}, |
|
|
|
onLoad(option) { |
|
|
@ -221,11 +216,15 @@ |
|
|
|
uni.hideLoading(); |
|
|
|
that.jobContent = res.data; |
|
|
|
that.jobStatus = res.data.status; |
|
|
|
let range = that.jobContent.countRange.find(r => r.type == "ITEMS_CODE"); |
|
|
|
if (range != undefined) { |
|
|
|
that.itemRangeValue = range.value; |
|
|
|
} |
|
|
|
callback(); |
|
|
|
|
|
|
|
}).catch(error => { |
|
|
|
uni.hideLoading() |
|
|
|
this.showErrorMessage(error) |
|
|
|
that.showErrorMessage(error) |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
@ -325,9 +324,26 @@ |
|
|
|
getScanResult(result) { |
|
|
|
let that = this; |
|
|
|
let packInfo = result.package; |
|
|
|
let detail = this.createDetailInfo(packInfo); |
|
|
|
this.detailSource.unshift(detail); |
|
|
|
this.scanPopupGetFocus(); |
|
|
|
return; |
|
|
|
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 |
|
|
|
.number && r.batch == packInfo.batch && r.inventoryStatus == "OK"); |
|
|
|
|
|
|
|
if (detail == undefined) { |
|
|
|
detail = this.createDetailInfo(packInfo); |
|
|
|
this.detailSource.unshift(detail) |
|
|
@ -366,7 +382,7 @@ |
|
|
|
itemDesc2: packInfo.itemDesc2, |
|
|
|
projectCode: "", |
|
|
|
qty: packInfo.qty, |
|
|
|
countQty: packInfo.qty, |
|
|
|
packUnit: packInfo.packUnit, |
|
|
|
packQty: packInfo.packQty, |
|
|
|
packUom: packInfo.packUom, |
|
|
|
uom: packInfo.uom, |
|
|
@ -376,8 +392,11 @@ |
|
|
|
warehouseCode: this.fromLocation.warehouseCode, |
|
|
|
areaCode: this.fromLocation.areaCode, |
|
|
|
locationGroupCode: this.fromLocation.locationGroupCode, |
|
|
|
creationTime: new Date(), |
|
|
|
countTime: new Date() |
|
|
|
createTime: new Date().getTime(), |
|
|
|
countTime: new Date().getTime(), |
|
|
|
countUser: this.$store.state.user.id, |
|
|
|
countDescription: 'a', |
|
|
|
countQty: packInfo.qty |
|
|
|
} |
|
|
|
return detail; |
|
|
|
}, |
|
|
@ -429,12 +448,19 @@ |
|
|
|
this.$refs.detailInfoPopup.openPopup(item); |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
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({ |
|
|
|
title: "提交中....", |
|
|
|
mask: true |
|
|
@ -452,9 +478,9 @@ |
|
|
|
uni.hideLoading() |
|
|
|
this.showErrorMessage(error) |
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
setParams() { |
|
|
|
var creator = this.$store.state.user.id |
|
|
|
this.jobContent.subList = this.detailSource |
|
|
@ -490,10 +516,12 @@ |
|
|
|
this.scanPopupGetFocus(); |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
showCommitSuccessMessage(hint) { |
|
|
|
this.$refs.comMessage.showSuccessMessage(hint, res => { |
|
|
|
navigateBack(1); |
|
|
|
this.fromLocationCode = ''; |
|
|
|
this.fromLocation = {}; |
|
|
|
this.detailSource = []; |
|
|
|
this.showFromLocationPopup(); |
|
|
|
}) |
|
|
|
}, |
|
|
|
getCountStageName(value) { |
|
|
|