Browse Source

修改库存转移

wms3.0_pda
niexiting 11 months ago
parent
commit
3d2dd4bd1f
  1. 15
      api/request2.js
  2. 2
      mycomponents/balance/moveStatus.vue
  3. 141
      pages/inventoryMove/coms/comMove.vue
  4. 7
      pages/inventoryMove/coms/comMovebalance.vue
  5. 2
      pages/inventoryMove/record/okToHoldRecord.vue

15
api/request2.js

@ -223,6 +223,21 @@ export function getContainerByNumber(number) {
});
}
/**
* 查询器具信息接口
* @param {*} number 器具代码
*/
export function getContainerDetailByNumber(number) {
return request({
url: baseApi + "/wms/container-main/getContainerByNumber?number=" + number,
method: "get",
data: {},
});
}
/**
* 按器具查询库存明细
* @param {*器具代码}

2
mycomponents/balance/moveStatus.vue

@ -4,7 +4,7 @@
{{statusDesc(fromInventoryStatus)}}
</view>
->
>
<view :class="statusStyle(toInventoryStatus)">
{{statusDesc(toInventoryStatus)}}

141
pages/inventoryMove/coms/comMove.vue

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

7
pages/inventoryMove/coms/comMovebalance.vue

@ -18,6 +18,9 @@
<moveStatus v-if="dataContent.inventoryStatus!=dataContent.toInventoryStatus"
:fromInventoryStatus="fromInventoryStatus" :toInventoryStatus="toInventoryStatus">
</moveStatus>
<status :status='fromInventoryStatus'></status>
</view>
<!-- <view class="" v-if="isDevlement()">
<view class="" style="font-size: 40rpx;">
@ -44,6 +47,7 @@
import compareQty from '@/mycomponents/qty/compareQty.vue'
import moveStatus from '@/mycomponents/balance/moveStatus.vue'
import purchaseInfo from '@/mycomponents/purchase/purchaseInfo.vue'
import status from '@/mycomponents/status/status.vue'
export default {
components: {
@ -54,7 +58,8 @@
recommendQty,
compareQty,
moveStatus,
purchaseInfo
purchaseInfo,
status
},
data() {

2
pages/inventoryMove/record/okToHoldRecord.vue

@ -1,6 +1,6 @@
<template>
<view class="page-wraper">
<comMove businessTypeCode='OkToHold' > </comMove>
<comMove businessTypeCode='OkToHold' toLocationCode="HOLD" > </comMove>
</view>
</template>

Loading…
Cancel
Save