|
@ -1,16 +1,15 @@ |
|
|
<template> |
|
|
<template> |
|
|
<view class="page-wraper"> |
|
|
<view class="page-wraper"> |
|
|
<view class=""> |
|
|
<view class=""> |
|
|
<com-blank-view @goScan='getLocation' v-if="fromLocationCode==''"></com-blank-view> |
|
|
<com-blank-view @goScan='showFromLocationPopup' v-if="fromLocationCode==''"></com-blank-view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="page-wraper" v-if="fromLocationCode!=''"> |
|
|
<view class="page-wraper" v-if="fromLocationCode!=''"> |
|
|
<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"> |
|
|
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> |
|
|
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> |
|
|
<view class=""> |
|
|
<view class=""> |
|
|
<record-com-detail-card :dataContent="item" :index="index" :settingParam="jobContent" |
|
|
<record-com-detail-card :dataContent="item" :index="index" :isShowLocation="true" |
|
|
:isShowLocation="true" @removeItem="removeItem(index,item)" @updateData="updateData" |
|
|
@removeItem="removeItem(index,item)" @updateData="updateData" @removePack="removePack"> |
|
|
@removePack="removePack"> |
|
|
|
|
|
</record-com-detail-card> |
|
|
</record-com-detail-card> |
|
|
</view> |
|
|
</view> |
|
|
<u-line /> |
|
|
<u-line /> |
|
@ -18,8 +17,6 @@ |
|
|
</scroll-view> |
|
|
</scroll-view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<view class="page-footer"> |
|
|
<view class="page-footer"> |
|
|
<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%; "> |
|
@ -44,7 +41,6 @@ |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
|
|
|
|
|
|
import { |
|
|
import { |
|
|
transferIssueRecordSubmit, |
|
|
transferIssueRecordSubmit, |
|
|
transferReceiptRecordSubmit |
|
|
transferReceiptRecordSubmit |
|
@ -99,38 +95,28 @@ |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
id: '', |
|
|
id: '', |
|
|
receiptJob: {}, |
|
|
|
|
|
received: false, |
|
|
|
|
|
isShowPackingCode: true, |
|
|
|
|
|
scanCount: 0, |
|
|
|
|
|
jobContent: {}, //任务内容 |
|
|
|
|
|
subList: [], //接口返回的任务subList |
|
|
subList: [], //接口返回的任务subList |
|
|
detailSource: [], //绑定在页面上的数据源 |
|
|
detailSource: [], //绑定在页面上的数据源 |
|
|
locationTypeList: [], |
|
|
locationTypeList: [], |
|
|
toLocationInfo: {}, |
|
|
|
|
|
businessTypeInfo: {}, |
|
|
|
|
|
fromLocationInfo: {}, |
|
|
|
|
|
fromLocationCode: "", |
|
|
fromLocationCode: "", |
|
|
toLocationInfo: {}, |
|
|
|
|
|
toLocationCode: "", |
|
|
toLocationCode: "", |
|
|
isShowLocation: false, |
|
|
|
|
|
fromlocationTypeList: [], |
|
|
fromlocationTypeList: [], |
|
|
tolocationTypeList: [], |
|
|
tolocationTypeList: [], |
|
|
allowModifyLocation: false, |
|
|
|
|
|
inInventoryStatus: "", //目标入库库存状态 |
|
|
inInventoryStatus: "", //目标入库库存状态 |
|
|
outInventoryStatus: "", //来源出库库存状态 |
|
|
outInventoryStatus: "", //来源出库库存状态 |
|
|
businessType: {}, |
|
|
businessType: {}, |
|
|
managementList:[], |
|
|
managementList: [], |
|
|
dataContent: {} |
|
|
dataContent: {}, |
|
|
|
|
|
toWarehouseCode:'' |
|
|
|
|
|
|
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
mounted(option) { |
|
|
mounted(option) { |
|
|
var typeCode ="" |
|
|
var typeCode = "" |
|
|
if(this.transferType=="Transfer"){ |
|
|
if (this.transferType == "TransferDeliver") { |
|
|
typeCode = "Transfer" |
|
|
typeCode = "TransferDeliver" |
|
|
}else if(this.transferType=="TransferReceipt"){ |
|
|
} else if (this.transferType == "TransferReceipt") { |
|
|
typeCode = "TransferReceipt" |
|
|
typeCode = "TransferReceipt" |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
getBusinessType(typeCode, res => { |
|
|
getBusinessType(typeCode, res => { |
|
@ -140,7 +126,7 @@ |
|
|
this.tolocationTypeList = res.tolocationTypeList; |
|
|
this.tolocationTypeList = res.tolocationTypeList; |
|
|
this.showFromLocationPopup(); |
|
|
this.showFromLocationPopup(); |
|
|
} else { |
|
|
} else { |
|
|
this.$refs.comMessage.showBreakMessage(res.message ); |
|
|
this.showErrorMessage(res.message) |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
@ -254,11 +240,12 @@ |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
commit() { |
|
|
commit() { |
|
|
|
|
|
|
|
|
if (this.toLocationCode == "") { |
|
|
if (this.toLocationCode == "") { |
|
|
this.showMessage("请先选择目标库位") |
|
|
this.showMessage("请先选择目标库位") |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
if(this.detailSource.length > 0 && this.detailSource[0].subList.length > 0){ |
|
|
if (this.detailSource.length > 0 && this.detailSource[0].subList.length > 0) { |
|
|
//查询管理模式 |
|
|
//查询管理模式 |
|
|
uni.showLoading({ |
|
|
uni.showLoading({ |
|
|
title: "提交中....", |
|
|
title: "提交中....", |
|
@ -272,7 +259,7 @@ |
|
|
this.managementList = res.list; |
|
|
this.managementList = res.list; |
|
|
var params = this.setParams() |
|
|
var params = this.setParams() |
|
|
console.log("提交" + JSON.stringify(params)) |
|
|
console.log("提交" + JSON.stringify(params)) |
|
|
if(this.transferType=="Transfer"){ |
|
|
if (this.transferType == "TransferDeliver") { |
|
|
transferIssueRecordSubmit(params).then(res => { |
|
|
transferIssueRecordSubmit(params).then(res => { |
|
|
uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
if (res.data) { |
|
|
if (res.data) { |
|
@ -284,18 +271,18 @@ |
|
|
uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
this.showErrorMessage(error) |
|
|
this.showErrorMessage(error) |
|
|
}) |
|
|
}) |
|
|
}else if(this.transferType=="TransferReceipt"){ |
|
|
} else if (this.transferType == "TransferReceipt") { |
|
|
// transferReceiptRecordSubmit(params).then(res => { |
|
|
transferReceiptRecordSubmit(params).then(res => { |
|
|
// uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
// if (res.data) { |
|
|
if (res.data) { |
|
|
// this.showCommitSuccessMessage("提交成功<br>生成调拨入库记录<br>" + res.data) |
|
|
this.showCommitSuccessMessage("提交成功<br>生成调拨入库记录<br>" + res.data) |
|
|
// } else { |
|
|
} else { |
|
|
// this.showErrorMessage("提交失败[" + res.msg + "]") |
|
|
this.showErrorMessage("提交失败[" + res.msg + "]") |
|
|
// } |
|
|
} |
|
|
// }).catch(error => { |
|
|
}).catch(error => { |
|
|
// uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
// this.showErrorMessage(error) |
|
|
this.showErrorMessage(error) |
|
|
// }) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} else { |
|
|
} else { |
|
@ -305,29 +292,30 @@ |
|
|
|
|
|
|
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
}else { |
|
|
} else { |
|
|
this.showErrorMessage("没有要提交的数据,请先扫描") |
|
|
this.showErrorMessage("没有要提交的数据,请先扫描") |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
setPrecisionStrategParams(){ |
|
|
setPrecisionStrategParams() { |
|
|
var itemList = [] |
|
|
var itemList = [] |
|
|
this.detailSource.forEach(item => { |
|
|
this.detailSource.forEach(item => { |
|
|
item.subList.forEach(detail => { |
|
|
item.subList.forEach(detail => { |
|
|
if (detail.scaned) { |
|
|
if (detail.scaned) { |
|
|
|
|
|
detail.toLocationCode = this.toLocationCode; |
|
|
var filterResult = itemList.filter(res => { |
|
|
var filterResult = itemList.filter(res => { |
|
|
if (res.itemCode == item.itemCode |
|
|
if (res.itemCode == item.itemCode && |
|
|
&&res.locationCode == detail.locationCode) { |
|
|
detail.toLocationCode == res.locationCode) { |
|
|
return res |
|
|
return res |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
//去掉重复元素 |
|
|
//去掉重复元素 |
|
|
if(filterResult.length==0){ |
|
|
if (filterResult.length == 0) { |
|
|
var result = { |
|
|
var result = { |
|
|
itemCode: item.itemCode, |
|
|
itemCode: item.itemCode, |
|
|
locationCode: detail.locationCode |
|
|
locationCode: detail.toLocationCode |
|
|
} |
|
|
} |
|
|
itemList.push(result) |
|
|
itemList.push(result) |
|
|
} |
|
|
} |
|
@ -346,9 +334,12 @@ |
|
|
item.subList.forEach(detail => { |
|
|
item.subList.forEach(detail => { |
|
|
if (detail.scaned) { |
|
|
if (detail.scaned) { |
|
|
var info = getPackingNumberAndBatchByList(this.managementList, detail.itemCode, |
|
|
var info = getPackingNumberAndBatchByList(this.managementList, detail.itemCode, |
|
|
detail.packingNumber, detail.locationCode, detail.batch); |
|
|
detail.packingNumber, detail.toLocationCode, detail.batch); |
|
|
|
|
|
|
|
|
detail.itemCode = detail.itemCode; |
|
|
detail.itemCode = detail.itemCode; |
|
|
|
|
|
detail.itemName = detail.package.itemName; |
|
|
|
|
|
detail.itemDesc1 = detail.package.itemDesc1; |
|
|
|
|
|
detail.itemDesc2 = detail.package.itemDesc2; |
|
|
|
|
|
|
|
|
detail.inventoryStatus = detail.inventoryStatus; |
|
|
detail.inventoryStatus = detail.inventoryStatus; |
|
|
|
|
|
|
|
|
detail.fromPackingNumber = info.packingNumber; |
|
|
detail.fromPackingNumber = info.packingNumber; |
|
@ -357,19 +348,20 @@ |
|
|
detail.fromContainerNumber = detail.containerNumber; |
|
|
detail.fromContainerNumber = detail.containerNumber; |
|
|
detail.toContainerNumber = detail.containerNumber |
|
|
detail.toContainerNumber = detail.containerNumber |
|
|
|
|
|
|
|
|
detail.fromBatch =info.batch; |
|
|
detail.fromBatch = info.batch; |
|
|
detail.toBatch = info.batch; |
|
|
detail.toBatch = info.batch; |
|
|
|
|
|
|
|
|
detail.fromLocationCode = detail.locationCode; |
|
|
detail.fromLocationCode = detail.locationCode; |
|
|
detail.toLocationCode = detail.locationCode; |
|
|
detail.toLocationCode = detail.toLocationCode; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
subList.push(detail) |
|
|
subList.push(detail) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
this.dataContent.subList =subList; |
|
|
this.dataContent.subList = subList; |
|
|
this.dataContent.creator =creator; |
|
|
this.dataContent.creator = creator; |
|
|
|
|
|
this.dataContent.fromWarehouseCode = this.detailSource[0].subList[0].warehouseCode; |
|
|
|
|
|
this.dataContent.toWarehouseCode = this.toWarehouseCode; |
|
|
return this.dataContent; |
|
|
return this.dataContent; |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
@ -402,11 +394,11 @@ |
|
|
this.getFromLocationCode(location, code) |
|
|
this.getFromLocationCode(location, code) |
|
|
}, |
|
|
}, |
|
|
getFromLocationCode(location, code) { |
|
|
getFromLocationCode(location, code) { |
|
|
this.fromLocationInfo = location; |
|
|
|
|
|
this.fromLocationCode = code; |
|
|
this.fromLocationCode = code; |
|
|
this.openScanPopup(); |
|
|
this.openScanPopup(); |
|
|
}, |
|
|
}, |
|
|
getToLocationCode(location, code) { |
|
|
getToLocationCode(location, code) { |
|
|
|
|
|
this.toWarehouseCode =location.warehouseCode |
|
|
// if (this.fromLocationCode == code) { |
|
|
// if (this.fromLocationCode == code) { |
|
|
// uni.showToast({ |
|
|
// uni.showToast({ |
|
|
// title: "来源库位[" + this.fromLocationCode + "]不能与目标库位[" + code + "]一致", |
|
|
// title: "来源库位[" + this.fromLocationCode + "]不能与目标库位[" + code + "]一致", |
|
@ -420,6 +412,11 @@ |
|
|
showCommitSuccessMessage(hint) { |
|
|
showCommitSuccessMessage(hint) { |
|
|
this.$refs.comMessage.showSuccessMessage(hint, res => { |
|
|
this.$refs.comMessage.showSuccessMessage(hint, res => { |
|
|
this.fromLocationCode = ''; |
|
|
this.fromLocationCode = ''; |
|
|
|
|
|
this.subList = []; |
|
|
|
|
|
this.detailSource = []; |
|
|
|
|
|
this.toLocationCode = ''; |
|
|
|
|
|
this.dataContent = {} |
|
|
|
|
|
this.toWarehouseCode = "" |
|
|
|
|
|
|
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|