|
|
@ -11,10 +11,9 @@ |
|
|
|
<view class=""> |
|
|
|
<record-com-detail-card :dataContent="item" :index="index" :settingParam="dataContent" |
|
|
|
:isShowStatus="true" :isShowToLocation='false' @removeItem="removeItem(index,item)" |
|
|
|
@updateData="updateData" @removePack="removePack"> |
|
|
|
@updateData="updateData" @removePack="removePack" @editLocation="showScanToLocation"> |
|
|
|
</record-com-detail-card> |
|
|
|
</view> |
|
|
|
<view class='split_line'></view> |
|
|
|
</view> |
|
|
|
</scroll-view> |
|
|
|
</view> |
|
|
@ -23,10 +22,12 @@ |
|
|
|
<view class="uni-flex u-col-center space-between padding_10" |
|
|
|
style="background-color:ghostwhite; width: 100%; "> |
|
|
|
<view class=""> |
|
|
|
<requiredLocation title="目标库位" :locationCode="toLocationCode" @getLocation='getToLocationCode' |
|
|
|
:locationAreaTypeList="tolocationTypeList"></requiredLocation> |
|
|
|
<!-- <requiredLocation title="目标库位" :locationCode="toLocationCode" @getLocation='getToLocationCode' |
|
|
|
:locationAreaTypeList="tolocationTypeList"></requiredLocation> --> |
|
|
|
</view> |
|
|
|
<view class=" uni-flex uni-row"> |
|
|
|
<button class="btn_single_reject" style="margin-right:5px ;" hover-class="btn_commit_after" |
|
|
|
@click="commit">取消</button> |
|
|
|
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -34,13 +35,16 @@ |
|
|
|
<win-scan-button @goScan='openScanPopup'></win-scan-button> |
|
|
|
</view> |
|
|
|
<win-scan-package ref="scanPopup" @getResult='getScanResult'></win-scan-package> |
|
|
|
<win-scan-location ref="scanLocationCode" title="目标库位" @getLocation='getToLocationCode' |
|
|
|
:locationAreaTypeList="toLocationAreaTypeList"></win-scan-location> |
|
|
|
<comMessage ref="comMessage"></comMessage> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import { |
|
|
|
productPutawayRecordSubmit |
|
|
|
productPutawayRecordSubmit, |
|
|
|
getPutawayRecommendLocation |
|
|
|
} from '@/api/request2.js'; |
|
|
|
import { |
|
|
|
goHome, |
|
|
@ -69,12 +73,12 @@ |
|
|
|
import comBlankView from '@/mycomponents/common/comBlankView.vue' |
|
|
|
import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue' |
|
|
|
import winScanPackage from '@/mycomponents/scan/winScanPackage.vue' |
|
|
|
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue" |
|
|
|
|
|
|
|
import { |
|
|
|
updateTitle |
|
|
|
} from '@/common/basic.js'; |
|
|
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
components: { |
|
|
|
winScanButton, |
|
|
@ -82,7 +86,8 @@ |
|
|
|
requiredLocation, |
|
|
|
comBlankView, |
|
|
|
recordComDetailCard, |
|
|
|
winScanPackage |
|
|
|
winScanPackage, |
|
|
|
winScanLocation |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
@ -100,7 +105,8 @@ |
|
|
|
bussinessCode: "ProductPutaway", |
|
|
|
businessType: {}, |
|
|
|
managementList: [], |
|
|
|
type: '' |
|
|
|
type: '', |
|
|
|
editItem: null |
|
|
|
}; |
|
|
|
}, |
|
|
|
onLoad(option) { |
|
|
@ -118,6 +124,7 @@ |
|
|
|
if (res.success) { |
|
|
|
this.businessType = res.businessType; |
|
|
|
this.fromLocationAreaTypeList = res.fromLocationAreaTypeList; |
|
|
|
this.toLocationAreaTypeList = res.toLocationAreaTypeList; |
|
|
|
this.tolocationTypeList = res.tolocationTypeList; |
|
|
|
this.openScanPopup(); |
|
|
|
} else { |
|
|
@ -144,13 +151,18 @@ |
|
|
|
let pack = result.package; |
|
|
|
result.balance.forEach( |
|
|
|
balance => { |
|
|
|
var item = this.detailSource.find(res => { |
|
|
|
if (res.itemCode == balance.itemCode) { |
|
|
|
let item = this.detailSource.find(res => { |
|
|
|
if (res.itemCode == balance.itemCode && res.containerNumber == balance |
|
|
|
.parentPackingNumber) { |
|
|
|
return res |
|
|
|
} |
|
|
|
}) |
|
|
|
if (item == undefined) { |
|
|
|
var itemp = createItemInfo(balance, pack); |
|
|
|
//查询推荐的目标库位 |
|
|
|
this.getRecommendLocation(balance, res => { |
|
|
|
itemp.toLocationCode = res.code; |
|
|
|
}) |
|
|
|
let newDetail = createDetailInfo(balance, pack); // |
|
|
|
newDetail.fromInventoryStatus = balance.inventoryStatus; |
|
|
|
itemp.subList.push(newDetail); |
|
|
@ -180,6 +192,41 @@ |
|
|
|
) |
|
|
|
}, |
|
|
|
|
|
|
|
getRecommendLocation(balance, callback) { |
|
|
|
uni.showLoading({ |
|
|
|
title: '扫描中...', |
|
|
|
mask: true |
|
|
|
}) |
|
|
|
|
|
|
|
let param = { |
|
|
|
itemCode: balance.itemCode, |
|
|
|
batch: balance.batch, |
|
|
|
inventoryStatus: balance.inventoryStatus, |
|
|
|
supplierCode: '', |
|
|
|
businessCode: this.bussinessCode |
|
|
|
}; |
|
|
|
console.log(JSON.stringify(param)) |
|
|
|
getPutawayRecommendLocation(param).then(res => { |
|
|
|
callback(res.data); |
|
|
|
uni.hideLoading(); |
|
|
|
}).catch(error => { |
|
|
|
uni.hideLoading() |
|
|
|
this.showErrorMessage(error); |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
//移除推荐的预占用库位 |
|
|
|
removeRecommendLocation() { |
|
|
|
this.showMessage('移除推荐的预占用库位') |
|
|
|
}, |
|
|
|
|
|
|
|
showScanToLocation(item) { |
|
|
|
this.editItem = item; |
|
|
|
setTimeout(r => { |
|
|
|
this.$refs.scanLocationCode.openScanPopup(); |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
showErrorMessage(message) { |
|
|
|
this.$refs.comMessage.showErrorMessage(message, res => {}); |
|
|
|
}, |
|
|
@ -192,6 +239,7 @@ |
|
|
|
this.calcHandleQty(); |
|
|
|
}, |
|
|
|
removeItem(index, item) { |
|
|
|
this.removeRecommendLocation(); |
|
|
|
this.detailSource.splice(index, 1) |
|
|
|
}, |
|
|
|
removePack() { |
|
|
@ -199,6 +247,7 @@ |
|
|
|
var item = this.detailSource[i]; |
|
|
|
if (item.subList.length == 0) { |
|
|
|
this.detailSource.splice(i, 1) |
|
|
|
this.removeRecommendLocation(item) |
|
|
|
} |
|
|
|
} |
|
|
|
this.updateData(); |
|
|
@ -208,17 +257,9 @@ |
|
|
|
setTimeout(r => { |
|
|
|
this.$refs.scanPopup.openScanPopupByBusinessType(this.businessType); |
|
|
|
}) |
|
|
|
// setTimeout(r => { |
|
|
|
// this.$refs.scanPopup.openScanPopup(this.businessType); |
|
|
|
// this.scanPopupGetFocus(); |
|
|
|
// }) |
|
|
|
|
|
|
|
}, |
|
|
|
// showFromLocationPopup() { |
|
|
|
// this.$nextTick(() => { |
|
|
|
// this.$refs.scanLocationCode.openScanPopup(); |
|
|
|
// }) |
|
|
|
|
|
|
|
// }, |
|
|
|
closeScanPopup() { |
|
|
|
if (this.$refs.scanPopup != undefined) { |
|
|
|
this.$refs.scanPopup.closeScanPopup(); |
|
|
@ -383,20 +424,9 @@ |
|
|
|
closeScanMessage() { |
|
|
|
this.scanPopupGetFocus(); |
|
|
|
}, |
|
|
|
getLocation(location, code) { |
|
|
|
this.getFromLocationCode(location, code) |
|
|
|
}, |
|
|
|
getFromLocationCode(location, code) { |
|
|
|
this.fromLocationCode = code; |
|
|
|
this.openScanPopup(); |
|
|
|
}, |
|
|
|
|
|
|
|
getToLocationCode(location, code) { |
|
|
|
this.toLocationCode = code; |
|
|
|
this.detailSource.forEach(item => { |
|
|
|
item.subList.forEach(detail => { |
|
|
|
detail.toLocationCode = this.toLocationCode |
|
|
|
}) |
|
|
|
}) |
|
|
|
this.editItem.toLocationCode = code; |
|
|
|
}, |
|
|
|
|
|
|
|
showCommitSuccessMessage(hint) { |
|
|
|