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