Browse Source

修改拆包

wms3.0_pda
lijuncheng 1 year ago
parent
commit
3e350ede00
  1. 10
      pages/package/record/mergePackageRecord.vue
  2. 115
      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"> <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"
@removeItem="removeItem(index,item)" @updateData="updateData" @removePack="removePack"> @removeItem="removeItem(index,item)" @updateData="updateData" @removePack="removePack">
</record-com-detail-card> </record-com-detail-card>
</view> </view>
@ -89,7 +89,6 @@
return { return {
id: '', id: '',
scanCount: 0, scanCount: 0,
jobContent: {}, //
detailSource: [], // detailSource: [], //
locationTypeList: [], locationTypeList: [],
fromLocationCode: "", fromLocationCode: "",
@ -244,7 +243,7 @@
mergePackageRecordSubmit(params).then(res => { mergePackageRecordSubmit(params).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成发料接收记录" + res.data) this.showCommitSuccessMessage("提交成功<br>生成合包记录<br>" + res.data)
} else { } else {
this.showErrorMessage("提交失败[" + res.msg + "]") this.showErrorMessage("提交失败[" + res.msg + "]")
} }
@ -272,8 +271,8 @@
detail.fromInventoryStatus = detail.inventoryStatus; detail.fromInventoryStatus = detail.inventoryStatus;
detail.toInventoryStatus = detail.inventoryStatus; detail.toInventoryStatus = detail.inventoryStatus;
detail.fromQty = detail.qty
detail.fromPackingNumber = detail.fromPackingNumber; detail.fromPackingNumber = detail.packingNumber;
detail.toPackingNumber = this.toPackingNumber; detail.toPackingNumber = this.toPackingNumber;
detail.fromBatch = detail.batch; detail.fromBatch = detail.batch;
@ -325,6 +324,7 @@
showCommitSuccessMessage(hint) { showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => { this.$refs.comMessage.showSuccessMessage(hint, res => {
this.detailSource = []
this.fromLocationCode = ''; this.fromLocationCode = '';
this.toPackingNumber ="" this.toPackingNumber =""
this.toBatch ="" this.toBatch =""

115
pages/package/record/splitPackageRecord.vue

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

2
pages/productPutaway/record/productPutawayRecord.vue

@ -18,8 +18,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%; ">

Loading…
Cancel
Save