|
|
@ -15,14 +15,13 @@ |
|
|
|
</scroll-view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<requiredLocation ref='comScanLocation' title="目标库位" :locationCode="toLocationCode" |
|
|
|
@getLocation='scanLocationCode' :isShowEdit="jobContent.allowModifyLocation == 1" |
|
|
|
:locationTypeList="tolocationTypeList"></requiredLocation> |
|
|
|
|
|
|
|
<view class="page-footer"> |
|
|
|
<view class="uni-flex u-col-center space-between padding_10" |
|
|
|
style="background-color:ghostwhite; width: 100%; "> |
|
|
|
<view class=""> |
|
|
|
<requiredLocation ref='comScanLocation' title="目标库位" :locationCode="toLocationCode" |
|
|
|
@getLocation='scanLocationCode' :isShowEdit="jobContent.allowModifyLocation == 1" |
|
|
|
:locationTypeList="tolocationTypeList"></requiredLocation> |
|
|
|
</view> |
|
|
|
<view class=" uni-flex uni-row"> |
|
|
|
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button> |
|
|
@ -39,7 +38,6 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
|
|
|
|
import { |
|
|
|
getManagementPrecisions, |
|
|
|
} from '@/common/balance.js'; |
|
|
@ -324,11 +322,11 @@ |
|
|
|
this.showErrorMessage("扫描数为0,请先扫描") |
|
|
|
return; |
|
|
|
} |
|
|
|
//校验库位、 |
|
|
|
//校验库位、 |
|
|
|
if (!this.checkLocation()) { |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//扫描数量和任务数量相等,直接提交 |
|
|
|
if (this.scanCount == this.subList.length) { |
|
|
|
this.submitJob(); |
|
|
@ -349,19 +347,19 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
checkLocation() { |
|
|
|
var isPass = true; |
|
|
|
if (this.toLocationCode == ""||this.toLocationCode ==null) { |
|
|
|
if (this.toLocationCode == "" || this.toLocationCode == null) { |
|
|
|
this.showMessageHint('请扫描收货库位', callback => { |
|
|
|
this.$refs.comScanLocation.showLocation(); |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
return isPass = false; |
|
|
|
} |
|
|
|
return isPass; |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
showMessageHint(hint, callback) { |
|
|
|
this.$refs.comMessage.showErrorMessage(hint, res => { |
|
|
|
if (res) { |
|
|
@ -370,7 +368,7 @@ |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
submitJob() { |
|
|
|
submitJob() { |
|
|
|
uni.showLoading({ |
|
|
|
title: "提交中....", |
|
|
|
mask: true |
|
|
@ -379,8 +377,8 @@ |
|
|
|
this.detailSource.forEach(item => { |
|
|
|
itemCodes.push(item.itemCode) |
|
|
|
}) |
|
|
|
|
|
|
|
getManagementPrecisions(itemCodes,this.toLocationCode, res => { |
|
|
|
|
|
|
|
getManagementPrecisions(itemCodes, this.toLocationCode, res => { |
|
|
|
if (res.success) { |
|
|
|
this.managementList = res.list; |
|
|
|
var params = this.setParams(); |
|
|
@ -396,7 +394,7 @@ |
|
|
|
// uni.hideLoading() |
|
|
|
// this.showErrorMessage(error) |
|
|
|
// }) |
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
uni.hideLoading(); |
|
|
|
this.showErrorMessage(res.message); |
|
|
@ -407,20 +405,20 @@ |
|
|
|
setParams() { |
|
|
|
var subList = [] |
|
|
|
var creator = this.$store.state.user.id |
|
|
|
|
|
|
|
|
|
|
|
this.detailSource.forEach(item => { |
|
|
|
item.subList.forEach(detail => { |
|
|
|
if (detail.scaned) { |
|
|
|
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode, |
|
|
|
detail.packingNumber, detail.batch); |
|
|
|
detail.toPackingNumber =info.packingNumber; |
|
|
|
detail.toBatch =info.batch; |
|
|
|
detail.toPackingNumber = info.packingNumber; |
|
|
|
detail.toBatch = info.batch; |
|
|
|
subList.push(detail) |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
this.jobContent.subList = subList |
|
|
|
this.jobContent.creator =creator; |
|
|
|
this.jobContent.creator = creator; |
|
|
|
return this.jobContent; |
|
|
|
}, |
|
|
|
|
|
|
|