lijuncheng 11 months ago
parent
commit
28822e4351
  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
  6. 5
      static/menus/production_receipt.svg

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 {*器具代码} * @param {*器具代码}

2
mycomponents/balance/moveStatus.vue

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

7
pages/inventoryMove/coms/comMovebalance.vue

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

2
pages/inventoryMove/record/okToHoldRecord.vue

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

5
static/menus/production_receipt.svg

@ -0,0 +1,5 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg t="1703487001565" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="21325" xmlns:xlink="http://www.w3.org/1999/xlink" width="128" height="128">
<path d="M664 240h-400a24 24 0 0 0 0 48h400a24 24 0 0 0 0-48zM664 384h-400a24 24 0 0 0 0 48h400a24 24 0 0 0 0-48zM504 528h-240a24 24 0 0 0 0 48h240a24 24 0 0 0 0-48z" fill="#3c9cff" p-id="21326"></path>
<path d="M800 128v392a24 24 0 0 1-48 0V128a16 16 0 0 0-16-16H192a16 16 0 0 0-16 16v704a16 16 0 0 0 16 16h328a24 24 0 0 1 0 48h-432a24 24 0 0 1 0-48h42.08A58.56 58.56 0 0 1 128 832V128a64 64 0 0 1 64-64h544a64 64 0 0 1 64 64z" fill="#3c9cff" p-id="21327"></path><path d="M768 925.12a160 160 0 1 1 160-160 160 160 0 0 1-160 160m0 32a192 192 0 1 0-192-192 192 192 0 0 0 192 192z" fill="#3c9cff" p-id="21328"></path><path d="M864 736.8H672a16 16 0 0 0-11.2 4.64 16 16 0 0 0-3.36 5.12 16 16 0 0 0 0 12.32 16 16 0 0 0 3.36 5.12l57.44 57.44a16 16 0 0 0 22.56 0 16 16 0 0 0 0-22.72l-30.08-30.08H864a16 16 0 0 0 0-32z" fill="#3c9cff" p-id="21329"></path></svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

Loading…
Cancel
Save