Browse Source

修改拆包

wms3.0_pda
lijuncheng 1 year ago
parent
commit
3e350ede00
  1. 10
      pages/package/record/mergePackageRecord.vue
  2. 125
      pages/package/record/splitPackageRecord.vue
  3. 2
      pages/productPutaway/record/productPutawayRecord.vue

10
pages/package/record/mergePackageRecord.vue

@ -9,7 +9,7 @@
<scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<record-com-detail-card :dataContent="item" :index="index" :settingParam="jobContent"
<record-com-detail-card :dataContent="item" :index="index"
@removeItem="removeItem(index,item)" @updateData="updateData" @removePack="removePack">
</record-com-detail-card>
</view>
@ -89,7 +89,6 @@
return {
id: '',
scanCount: 0,
jobContent: {}, //
detailSource: [], //
locationTypeList: [],
fromLocationCode: "",
@ -244,7 +243,7 @@
mergePackageRecordSubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成发料接收记录" + res.data)
this.showCommitSuccessMessage("提交成功<br>生成合包记录<br>" + res.data)
} else {
this.showErrorMessage("提交失败[" + res.msg + "]")
}
@ -272,8 +271,8 @@
detail.fromInventoryStatus = detail.inventoryStatus;
detail.toInventoryStatus = detail.inventoryStatus;
detail.fromPackingNumber = detail.fromPackingNumber;
detail.fromQty = detail.qty
detail.fromPackingNumber = detail.packingNumber;
detail.toPackingNumber = this.toPackingNumber;
detail.fromBatch = detail.batch;
@ -325,6 +324,7 @@
showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
this.detailSource = []
this.fromLocationCode = '';
this.toPackingNumber =""
this.toBatch =""

125
pages/package/record/splitPackageRecord.vue

@ -27,13 +27,14 @@
</view>
</view>
</view>
<win-scan-button @goScan='showScanPopupPack'></win-scan-button>
</view>
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' allowModifyLocation="false">
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' :allowModifyLocation="false">
</win-scan-pack-and-location>
<win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getLocation'
:locationTypeList="fromlocationTypeList"></win-scan-location>
<win-scan-button @goScan='showScanPopupPack'></win-scan-button>
<win-scan-pack title="拆分标签" ref="scanPopupPack" @getResult='getScanPackResult'></win-scan-pack>
<com-message ref="comMessage"></com-message>
</view>
@ -43,6 +44,9 @@
import {
goHome,
} from '@/common/basic.js';
import {
splitPackageRecordSubmit
} from '@/api/request2.js';
import {
getInventoryStatusDesc,
@ -87,27 +91,28 @@
locationTypeList: [],
fromLocationCode: "",
toLocationCode: "",
isShowLocation: false,
fromlocationTypeList: [],
tolocationTypeList: [],
allowModifyLocation: false,
inInventoryStatus: "", //
outInventoryStatus: "", //
businessType: {}
businessType: {},
dataContent: {},
currentItemCode: "",
toPackingNumber: ""
};
},
onLoad(option) {
// var typeCode = "SplitPackage"
// getBusinessType(typeCode, res => {
// if (res.success) {
// this.businessType = res.businessType;
// this.fromlocationTypeList = res.fromlocationTypeList;
// this.tolocationTypeList = res.tolocationTypeList;
// this.showFromLocationPopup();
// } else {
// this.$refs.comMessage.showBreakMessage(res.message);
// }
// });
var typeCode = "SplitPackage"
getBusinessType(typeCode, res => {
if (res.success) {
this.businessType = res.businessType;
this.fromlocationTypeList = res.fromlocationTypeList;
this.tolocationTypeList = res.tolocationTypeList;
this.showFromLocationPopup();
} else {
this.showErrorMessage(res.message)
}
});
},
//
onNavigationBarButtonTap(e) {
@ -121,7 +126,7 @@
onPullDownRefresh() {},
mounted() {
this.showFromLocationPopup();
// this.showFromLocationPopup();
},
methods: {
showScanPopupPack() {
@ -160,7 +165,7 @@
var uom = result.package.uom;
var item = this.detailSource.find(r => r.itemCode == itemCode);
if (item == undefined) {
this.showMessage("物料号【" + itemCode + "】不在列表中")
this.showErrorMessage("物料号【" + itemCode + "】不在列表中")
} else {
var temp = {
scaned: true,
@ -248,32 +253,67 @@
},
commit() {
if (this.toLocationCode == "") {
this.showMessage("请先选择目标库位")
return;
if (this.detailSource.length > 0 && this.detailSource[0].subList.length > 0) {
uni.showLoading({
title: "提交中....",
mask: true
});
var params = this.setParams();
console.log("提交" + JSON.stringify(params))
splitPackageRecordSubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成拆包记录<br>" + res.data)
} else {
this.showErrorMessage("提交失败[" + res.msg + "]")
}
}).catch(error => {
uni.hideLoading()
this.showErrorMessage(error)
})
} else {
this.showErrorMessage("没有要提交的数据")
}
//
uni.showLoading({
title: "提交中....",
mask: true
});
var params = this.setParams();
console.log("提交" + JSON.stringify(params))
// (this.id, params).then(res => {
// uni.hideLoading()
// if (res.data) {
// var hint = res.data.Number;
// this.showCommitSuccessMessage("" + hint, )
// } else {
// this.showErrorMessage("[" + res.msg + "]")
// }
// }).catch(error => {
// uni.hideLoading()
// this.showErrorMessage(error)
// })
},
setParams() {
var subList = []
var creator = this.$store.state.user.id
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
detail.Records.forEach(record => {
if (record.scaned) {
var subItem = {};
Object.assign(subItem, detail)
subItem.itemCode = subItem.itemCode;
subItem.itemName = detail.package.itemName;
subItem.itemDesc1 = detail.package.itemDesc1;
subItem.itemDesc2 = detail.package.itemDesc2;
subItem.fromInventoryStatus = subItem.inventoryStatus;
subItem.toInventoryStatus = subItem.inventoryStatus;
subItem.fromQty = subItem.qty
subItem.fromPackingNumber = subItem.packingNumber;
subItem.toPackingNumber = record.packingNumber;
subItem.fromBatch = subItem.batch;
subItem.toBatch = record.batch;
subItem.fromLocationCode = subItem.fromLocationCode;
subItem.package = ""
subItem.Records=""
subList.push(subItem)
}
})
})
})
this.dataContent.subList = subList;
this.dataContent.creator = creator;
return this.dataContent;
},
showMessage(message) {
@ -320,7 +360,10 @@
showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
this.detailSource = []
this.fromLocationCode = '';
this.currentItemCode = ""
this.dataContent = {}
})
},

2
pages/productPutaway/record/productPutawayRecord.vue

@ -18,8 +18,6 @@
</scroll-view>
</view>
<view class="page-footer">
<view class="uni-flex u-col-center space-between padding_10"
style="background-color:ghostwhite; width: 100%; ">

Loading…
Cancel
Save