|
@ -10,21 +10,21 @@ |
|
|
<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=""> |
|
|
<com-move-record :dataContent="item" :index="index" @removeData="removeData" |
|
|
<com-move-record :dataContent="item" :index="index" @removeData="removeData" |
|
|
:isShowStatus="isShowStatus" @updateData="updateData" @removePack='removePack' |
|
|
:isShowStatus="isShowStatus" @updateData="updateData" @removePack='removePack' |
|
|
:allowEditStatus ="allowEditStatus"> |
|
|
:allowEditStatus="allowEditStatus"> |
|
|
</com-move-record> |
|
|
</com-move-record> |
|
|
</view> |
|
|
</view> |
|
|
<u-line /> |
|
|
<u-line /> |
|
|
</view> |
|
|
</view> |
|
|
</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%; "> |
|
|
<view class=""> |
|
|
<view class=""> |
|
|
<requiredLocation title="目标库位" :locationCode="toLocationCode" @getLocation='getToLocationCode' |
|
|
<requiredLocation title="目标库位" :locationCode="toLocationCode" @getLocation='getToLocationCode' |
|
|
:locationTypeList="toLocationTypeArray"></requiredLocation> |
|
|
:locationTypeList="toLocationTypeArray" :isShowEdit="toLocationCode==''"></requiredLocation> |
|
|
</view> |
|
|
</view> |
|
|
<view class=" uni-flex uni-row"> |
|
|
<view class=" uni-flex uni-row"> |
|
|
<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> |
|
@ -33,7 +33,8 @@ |
|
|
</view> |
|
|
</view> |
|
|
<win-scan-button @goScan='openScanPopup'></win-scan-button> |
|
|
<win-scan-button @goScan='openScanPopup'></win-scan-button> |
|
|
</view> |
|
|
</view> |
|
|
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' :title="'箱码'"></win-scan-pack-and-location> |
|
|
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' :title="'箱码'"> |
|
|
|
|
|
</win-scan-pack-and-location> |
|
|
<win-scan-location ref="scanFromLocationCode" title="来源库位" @getLocation='getLocation' |
|
|
<win-scan-location ref="scanFromLocationCode" title="来源库位" @getLocation='getLocation' |
|
|
:locationTypeList="fromlocationTypeList"></win-scan-location> |
|
|
:locationTypeList="fromlocationTypeList"></win-scan-location> |
|
|
<com-message ref="comMessage"></com-message> |
|
|
<com-message ref="comMessage"></com-message> |
|
@ -56,15 +57,15 @@ |
|
|
import { |
|
|
import { |
|
|
getDirectoryItemArray |
|
|
getDirectoryItemArray |
|
|
} from '@/common/directory.js'; |
|
|
} from '@/common/directory.js'; |
|
|
|
|
|
|
|
|
import { |
|
|
import { |
|
|
getPrecisionStrategyList |
|
|
getPrecisionStrategyList |
|
|
} from '@/common/balance.js'; |
|
|
} from '@/common/balance.js'; |
|
|
|
|
|
|
|
|
import { |
|
|
import { |
|
|
getPackingNumberAndBatchByList |
|
|
getPackingNumberAndBatchByList |
|
|
} from '@/common/basic.js'; |
|
|
} from '@/common/basic.js'; |
|
|
|
|
|
|
|
|
import { |
|
|
import { |
|
|
getBusinessType, |
|
|
getBusinessType, |
|
|
createItemInfo, |
|
|
createItemInfo, |
|
@ -100,24 +101,27 @@ |
|
|
type: Boolean, |
|
|
type: Boolean, |
|
|
default: false |
|
|
default: false |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
businessTypeCode: { |
|
|
businessTypeCode: { |
|
|
type: String, |
|
|
type: String, |
|
|
default: "Move" |
|
|
default: "Move" |
|
|
} //业务类型 |
|
|
}, //业务类型 |
|
|
|
|
|
toLocationCode: { |
|
|
|
|
|
type: String, |
|
|
|
|
|
default: "" |
|
|
|
|
|
}, |
|
|
}, |
|
|
}, |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
fromLocationCode: "", |
|
|
fromLocationCode: "", |
|
|
toLocationCode: "", |
|
|
// toLocationCode: "", |
|
|
toLocationInfo: {}, |
|
|
toLocationInfo: {}, |
|
|
toLocationTypeArray: [], |
|
|
toLocationTypeArray: [], |
|
|
toInventoryStatus: "", |
|
|
toInventoryStatus: "", |
|
|
businessType: {}, //业务类型 |
|
|
businessType: {}, //业务类型 |
|
|
detailSource: [], //绑定在页面上的数据源 |
|
|
detailSource: [], //绑定在页面上的数据源 |
|
|
title:"", |
|
|
title: "", |
|
|
dataContent:{}, |
|
|
dataContent: {}, |
|
|
toWarehouseCode:"", |
|
|
toWarehouseCode: "", |
|
|
fromlocationTypeList: [], |
|
|
fromlocationTypeList: [], |
|
|
tolocationTypeList: [], |
|
|
tolocationTypeList: [], |
|
|
} |
|
|
} |
|
@ -143,27 +147,27 @@ |
|
|
|
|
|
|
|
|
methods: { |
|
|
methods: { |
|
|
updateTitle() { |
|
|
updateTitle() { |
|
|
if(this.businessTypeCode=="InventoryMove"){ |
|
|
if (this.businessTypeCode == "InventoryMove") { |
|
|
this.title = "库存转移记录"; |
|
|
this.title = "库存转移记录"; |
|
|
this.toInventoryStatus = "OK" |
|
|
this.toInventoryStatus = "OK" |
|
|
}else if(this.businessTypeCode=="HoldToOk"){ |
|
|
} else if (this.businessTypeCode == "HoldToOk") { |
|
|
this.title = "隔离转合格记录"; |
|
|
this.title = "隔离转合格记录"; |
|
|
this.toInventoryStatus = "OK" |
|
|
this.toInventoryStatus = "OK" |
|
|
}else if(this.businessTypeCode=="HoldToScrap"){ |
|
|
} else if (this.businessTypeCode == "HoldToScrap") { |
|
|
this.title = "隔离转报废记录"; |
|
|
this.title = "隔离转报废记录"; |
|
|
this.toInventoryStatus = "SCRAP" |
|
|
this.toInventoryStatus = "SCRAP" |
|
|
}else if(this.businessTypeCode=="OkToHold"){ |
|
|
} else if (this.businessTypeCode == "OkToHold") { |
|
|
this.title = "合格转隔离记录"; |
|
|
this.title = "合格转隔离记录"; |
|
|
this.toInventoryStatus ="HOLD" |
|
|
this.toInventoryStatus = "HOLD" |
|
|
}else if(this.businessTypeCode=="OktoScrap"){ |
|
|
} else if (this.businessTypeCode == "OktoScrap") { |
|
|
this.title = "合格转报废记录"; |
|
|
this.title = "合格转报废记录"; |
|
|
this.toInventoryStatus ="SCRAP" |
|
|
this.toInventoryStatus = "SCRAP" |
|
|
}else if(this.businessTypeCode=="ScrapToHold"){ |
|
|
} else if (this.businessTypeCode == "ScrapToHold") { |
|
|
this.title = "报废转隔离记录"; |
|
|
this.title = "报废转隔离记录"; |
|
|
this.toInventoryStatus ="HOLD" |
|
|
this.toInventoryStatus = "HOLD" |
|
|
} |
|
|
} |
|
|
uni.setNavigationBarTitle({ |
|
|
uni.setNavigationBarTitle({ |
|
|
title: this.title |
|
|
title: this.title |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
openScanPopup() { |
|
|
openScanPopup() { |
|
@ -203,10 +207,10 @@ |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
if (item == undefined) { |
|
|
if (item == undefined) { |
|
|
var itemp = createItemInfo(balance,pack); |
|
|
var itemp = createItemInfo(balance, pack); |
|
|
let newDetail = createDetailInfo(balance, pack); // |
|
|
let newDetail = createDetailInfo(balance, pack); // |
|
|
newDetail.inventoryStatus =balance.inventoryStatus; |
|
|
newDetail.inventoryStatus = balance.inventoryStatus; |
|
|
newDetail.toInventoryStatus =this.toInventoryStatus |
|
|
newDetail.toInventoryStatus = this.toInventoryStatus |
|
|
itemp.subList.push(newDetail); |
|
|
itemp.subList.push(newDetail); |
|
|
this.detailSource.push(itemp) |
|
|
this.detailSource.push(itemp) |
|
|
} else { |
|
|
} else { |
|
@ -223,7 +227,7 @@ |
|
|
if (detail == undefined) { |
|
|
if (detail == undefined) { |
|
|
let newDetail = createDetailInfo(balance, pack); |
|
|
let newDetail = createDetailInfo(balance, pack); |
|
|
newDetail.inventoryStatus = balance.inventoryStatus; |
|
|
newDetail.inventoryStatus = balance.inventoryStatus; |
|
|
newDetail.toInventoryStatus =this.toInventoryStatus |
|
|
newDetail.toInventoryStatus = this.toInventoryStatus |
|
|
item.subList.push(newDetail); |
|
|
item.subList.push(newDetail); |
|
|
} else { |
|
|
} else { |
|
|
this.showErrorMessage(balance.packingNumber + "已经在列表中") |
|
|
this.showErrorMessage(balance.packingNumber + "已经在列表中") |
|
@ -274,7 +278,7 @@ |
|
|
this.clearData() |
|
|
this.clearData() |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
clearData(){ |
|
|
clearData() { |
|
|
this.fromLocationCode = ''; |
|
|
this.fromLocationCode = ''; |
|
|
this.subList = []; |
|
|
this.subList = []; |
|
|
this.detailSource = []; |
|
|
this.detailSource = []; |
|
@ -283,7 +287,7 @@ |
|
|
this.toWarehouseCode = "" |
|
|
this.toWarehouseCode = "" |
|
|
}, |
|
|
}, |
|
|
commit() { |
|
|
commit() { |
|
|
|
|
|
|
|
|
if (this.toLocationCode == "") { |
|
|
if (this.toLocationCode == "") { |
|
|
this.showMessage("请先选择目标库位") |
|
|
this.showMessage("请先选择目标库位") |
|
|
return; |
|
|
return; |
|
@ -296,37 +300,38 @@ |
|
|
}); |
|
|
}); |
|
|
this.managementList = []; |
|
|
this.managementList = []; |
|
|
var precisionStrategParams = this.setPrecisionStrategParams() |
|
|
var precisionStrategParams = this.setPrecisionStrategParams() |
|
|
|
|
|
|
|
|
getPrecisionStrategyList(precisionStrategParams, res => { |
|
|
getPrecisionStrategyList(precisionStrategParams, res => { |
|
|
if (res.success) { |
|
|
if (res.success) { |
|
|
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)) |
|
|
inventoryMoveRecordSubmit(params).then(res => { |
|
|
inventoryMoveRecordSubmit(params).then(res => { |
|
|
uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
if (res.data) { |
|
|
if (res.data) { |
|
|
this.showCommitSuccessMessage("提交成功<br>生成"+this.title+"记录<br>" + res.data) |
|
|
this.showCommitSuccessMessage("提交成功<br>生成" + this.title + "记录<br>" + |
|
|
} else { |
|
|
res.data) |
|
|
this.showErrorMessage("提交失败[" + res.msg + "]") |
|
|
} else { |
|
|
} |
|
|
this.showErrorMessage("提交失败[" + res.msg + "]") |
|
|
}).catch(error => { |
|
|
} |
|
|
uni.hideLoading() |
|
|
}).catch(error => { |
|
|
this.showErrorMessage(error) |
|
|
uni.hideLoading() |
|
|
}) |
|
|
this.showErrorMessage(error) |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
} else { |
|
|
} else { |
|
|
uni.hideLoading(); |
|
|
uni.hideLoading(); |
|
|
this.showErrorMessage(res.message); |
|
|
this.showErrorMessage(res.message); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
} else { |
|
|
} else { |
|
|
this.showErrorMessage("没有要提交的数据,请先扫描") |
|
|
this.showErrorMessage("没有要提交的数据,请先扫描") |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
setPrecisionStrategParams() { |
|
|
setPrecisionStrategParams() { |
|
|
var itemList = [] |
|
|
var itemList = [] |
|
|
this.detailSource.forEach(item => { |
|
|
this.detailSource.forEach(item => { |
|
@ -347,14 +352,14 @@ |
|
|
} |
|
|
} |
|
|
itemList.push(result) |
|
|
itemList.push(result) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
return itemList; |
|
|
return itemList; |
|
|
}, |
|
|
}, |
|
|
setParams() { |
|
|
setParams() { |
|
|
|
|
|
|
|
|
var subList = [] |
|
|
var subList = [] |
|
|
var creator = this.$store.state.user.id |
|
|
var creator = this.$store.state.user.id |
|
|
this.detailSource.forEach(item => { |
|
|
this.detailSource.forEach(item => { |
|
@ -366,22 +371,22 @@ |
|
|
detail.itemName = detail.package.itemName; |
|
|
detail.itemName = detail.package.itemName; |
|
|
detail.itemDesc1 = detail.package.itemDesc1; |
|
|
detail.itemDesc1 = detail.package.itemDesc1; |
|
|
detail.itemDesc2 = detail.package.itemDesc2; |
|
|
detail.itemDesc2 = detail.package.itemDesc2; |
|
|
|
|
|
|
|
|
detail.fromInventoryStatus = detail.inventoryStatus; |
|
|
detail.fromInventoryStatus = detail.inventoryStatus; |
|
|
// detail.toInventoryStatus = this.toInventoryStatus; |
|
|
// detail.toInventoryStatus = this.toInventoryStatus; |
|
|
|
|
|
|
|
|
detail.fromPackingNumber = info.packingNumber; |
|
|
detail.fromPackingNumber = info.packingNumber; |
|
|
detail.toPackingNumber = info.packingNumber; |
|
|
detail.toPackingNumber = info.packingNumber; |
|
|
|
|
|
|
|
|
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.toLocationCode; |
|
|
detail.toLocationCode = detail.toLocationCode; |
|
|
|
|
|
|
|
|
subList.push(detail) |
|
|
subList.push(detail) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
@ -393,11 +398,11 @@ |
|
|
this.dataContent.businessType = this.businessTypeCode; |
|
|
this.dataContent.businessType = this.businessTypeCode; |
|
|
return this.dataContent; |
|
|
return this.dataContent; |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|