|
@ -5,10 +5,11 @@ |
|
|
</view> |
|
|
</view> |
|
|
<view class="page-wraper" v-if="detailSource.length>0"> |
|
|
<view class="page-wraper" v-if="detailSource.length>0"> |
|
|
<view class="page-header"> |
|
|
<view class="page-header"> |
|
|
|
|
|
<view class="header-view"> |
|
|
<view class="header_item"> |
|
|
<view class="header_item"> |
|
|
来源库位 : {{fromLocationCode}} |
|
|
来源库位 : {{fromLocationCode}} |
|
|
</view> |
|
|
</view> |
|
|
<u-line /> |
|
|
</view> |
|
|
</view> |
|
|
</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"> |
|
@ -16,7 +17,10 @@ |
|
|
<view class=""> |
|
|
<view class=""> |
|
|
<record-com-detail-card :dataContent="item" :index="index" :settingParam="dataContent" |
|
|
<record-com-detail-card :dataContent="item" :index="index" :settingParam="dataContent" |
|
|
:isShowFromLocation="false" @removeItem="removeItem(index,item)" |
|
|
:isShowFromLocation="false" @removeItem="removeItem(index,item)" |
|
|
@updateData="updateData" @removePack="removePack"> |
|
|
:isShowModifedLocation="true" |
|
|
|
|
|
@updateData="updateData" |
|
|
|
|
|
@editLocation="showScanToLocation" |
|
|
|
|
|
@removePack="removePack"> |
|
|
</record-com-detail-card> |
|
|
</record-com-detail-card> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
@ -43,14 +47,17 @@ |
|
|
<comMessage ref="comMessage"></comMessage> |
|
|
<comMessage ref="comMessage"></comMessage> |
|
|
<win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getLocation' |
|
|
<win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getLocation' |
|
|
:locationAreaTypeList="fromLocationAreaTypeList"></win-scan-location> |
|
|
:locationAreaTypeList="fromLocationAreaTypeList"></win-scan-location> |
|
|
|
|
|
<win-scan-location ref="scanToLocationCode" title="目标库位" @getLocation='getToLocationCode' |
|
|
|
|
|
:locationAreaTypeList="toLocationAreaTypeList"></win-scan-location> |
|
|
</view> |
|
|
</view> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import { |
|
|
import { |
|
|
putawayRecordSubmit, |
|
|
putawayRecordSubmit, |
|
|
validateItemAndLocation, |
|
|
getPutawayRecommendLocation, |
|
|
getPutawayRecommendLocation |
|
|
checkItemCodeAndLocation, |
|
|
|
|
|
recommendLocationRemoveExpectin |
|
|
} from '@/api/request2.js'; |
|
|
} from '@/api/request2.js'; |
|
|
|
|
|
|
|
|
import { |
|
|
import { |
|
@ -116,7 +123,8 @@ |
|
|
showToLoaction: true, |
|
|
showToLoaction: true, |
|
|
recommendLocationList: [], //推荐库位列表 |
|
|
recommendLocationList: [], //推荐库位列表 |
|
|
fromWarehouseCode: '', //来源仓库 |
|
|
fromWarehouseCode: '', //来源仓库 |
|
|
businessTypeCode: "PurchasePutaway" |
|
|
businessTypeCode: "PurchasePutaway", |
|
|
|
|
|
editItem:{} |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
onLoad(option) { |
|
|
onLoad(option) { |
|
@ -168,6 +176,7 @@ |
|
|
// 获取推荐库位 |
|
|
// 获取推荐库位 |
|
|
this.getRecommendLocation(balance, pack, toLocation => { |
|
|
this.getRecommendLocation(balance, pack, toLocation => { |
|
|
var itemp = createItemInfo(balance, pack); |
|
|
var itemp = createItemInfo(balance, pack); |
|
|
|
|
|
itemp.toLocationCode = toLocation.locationCode; |
|
|
let newDetail = createDetailInfo(balance, pack); // |
|
|
let newDetail = createDetailInfo(balance, pack); // |
|
|
newDetail.toLocationCode = toLocation.locationCode; |
|
|
newDetail.toLocationCode = toLocation.locationCode; |
|
|
newDetail.toWarehouseCode = toLocation.toWarehouseCode; |
|
|
newDetail.toWarehouseCode = toLocation.toWarehouseCode; |
|
@ -445,6 +454,7 @@ |
|
|
this.openScanPopup(); |
|
|
this.openScanPopup(); |
|
|
}, |
|
|
}, |
|
|
getToLocationCode(location, code) { |
|
|
getToLocationCode(location, code) { |
|
|
|
|
|
console.log( JSON.stringify(this.editItem) ) |
|
|
if (this.fromLocationCode == code) { |
|
|
if (this.fromLocationCode == code) { |
|
|
uni.showToast({ |
|
|
uni.showToast({ |
|
|
title: "来源库位[" + this.fromLocationCode + "]不能与目标库位[" + code + "]一致", |
|
|
title: "来源库位[" + this.fromLocationCode + "]不能与目标库位[" + code + "]一致", |
|
@ -452,7 +462,59 @@ |
|
|
}) |
|
|
}) |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
this.toLocationCode = code; |
|
|
var item = this.editItem.subList[0] |
|
|
|
|
|
if(item){ |
|
|
|
|
|
var param ={ |
|
|
|
|
|
batch:item.batch, |
|
|
|
|
|
inventoryStatus:item.inventoryStatus, |
|
|
|
|
|
itemCode:item.itemCode, |
|
|
|
|
|
toLocationCode:item.toLocationCode, |
|
|
|
|
|
expectinNumber: item.packingNumber + "-" + Date.now(), |
|
|
|
|
|
} |
|
|
|
|
|
checkItemCodeAndLocation(param).then(res=>{ |
|
|
|
|
|
if(res.data.recommendFlag){ |
|
|
|
|
|
this.editItem.toLocationCode = code; |
|
|
|
|
|
}else { |
|
|
|
|
|
if(res.data.errorMsg){ |
|
|
|
|
|
this.showErrorMessage(res.data.errorMsg) |
|
|
|
|
|
}else { |
|
|
|
|
|
if(res.data.balanceMsg){ |
|
|
|
|
|
this.$refs.comMessage.showQuestionMessage('已经有库存余额,是否继续上架?', res => { |
|
|
|
|
|
if (res) { |
|
|
|
|
|
}else { |
|
|
|
|
|
this.removeRecommendLocation(res.data.recommendList) |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
}else { |
|
|
|
|
|
this.editItem.toLocationCode = code; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
}).catch(error=>{ |
|
|
|
|
|
this.showErrorMessage(error) |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
//移除推荐的预占用库位 |
|
|
|
|
|
removeRecommendLocation(lst) { |
|
|
|
|
|
let param = { |
|
|
|
|
|
expectinNumberList: lst, |
|
|
|
|
|
}; |
|
|
|
|
|
recommendLocationRemoveExpectin(param).then(res => { |
|
|
|
|
|
|
|
|
|
|
|
}).catch(err => { |
|
|
|
|
|
this.showErrorMessage('【' + lst.join(',') + '】移除预占用失败,请在PC端的预占用中移除') |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
showScanToLocation(item) { |
|
|
|
|
|
this.editItem = item; |
|
|
|
|
|
setTimeout(r => { |
|
|
|
|
|
this.$refs.scanToLocationCode.openScanPopup(); |
|
|
|
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
showCommitSuccessMessage(hint) { |
|
|
showCommitSuccessMessage(hint) { |
|
@ -461,12 +523,24 @@ |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
showQuestionMessage(hint) { |
|
|
|
|
|
this.$refs.comMessage.showQuestionMessage('已经有库存余额,是否继续上架?', res => { |
|
|
|
|
|
if (res) { |
|
|
|
|
|
}else { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
clear() { |
|
|
clear() { |
|
|
this.fromLocationInfo = {}; |
|
|
this.fromLocationInfo = {}; |
|
|
this.fromLocationCode = ''; |
|
|
this.fromLocationCode = ''; |
|
|
this.fromWarehouseCode = ''; |
|
|
this.fromWarehouseCode = ''; |
|
|
this.toWarehouseCode = ''; |
|
|
this.toWarehouseCode = ''; |
|
|
this.detailSource = []; |
|
|
this.detailSource = []; |
|
|
|
|
|
this.editItem ={} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|