Browse Source

需求:PDA制品发货时,厂内标签与客户标签的校验

hella_online_20240829
yufei0306 4 months ago
parent
commit
15e435e691
  1. 510
      src/mycomponents/scan/winCheckFgLabel.vue
  2. 8
      src/mycomponents/scan/winComScanCustomerLabel.vue
  3. 386
      src/pages/check/checkFgLabel.vue

510
src/mycomponents/scan/winCheckFgLabel.vue

@ -1,243 +1,271 @@
<template> <template>
<view> <view>
<uni-popup ref="popup" @change="change" @maskClick="closeScanPopup()"> <uni-popup ref="popup" @change="change" @maskClick="closeScanPopup()">
<view class="popup_box"> <view class="popup_box">
<view class="pop_title uni-flex space-between"> <view class="pop_title uni-flex space-between">
<view class="" style="font-size: 35rpx;"> <view class="" style="font-size: 35rpx;">
校验客户标签 校验客户标签
</view> </view>
<view class=""> <view class="">
<image class="fr icons_scan_close" src="/static/icons/icons_scan_close.svg" <image class="fr icons_scan_close" src="/static/icons/icons_scan_close.svg"
@click="closeScanPopup()"></image> @click="closeScanPopup()"></image>
</view> </view>
</view> </view>
<view class=""> <view class="">
<view class="" style="position: relative"> <view class="" style="position: relative">
<win-com-scan ref="comscanFgLabel" placeholder="WMS制品标签" @getResult="getScanFgResult" <win-com-scan ref="comscanFgLabel" placeholder="WMS制品标签" @getResult="getScanFgResult"
:isShowHistory="false" :clearResult="false" :headerType="headerType"></win-com-scan> :isShowHistory="false" :clearResult="false" :headerType="headerType"></win-com-scan>
<view class="uni-flex" <view class="uni-flex"
style="position: absolute; color: #3C9CFF; font-weight: bold; font-size: 15px; left: 10px;bottom:10px; z-index: 999;"> style="position: absolute; color: #3C9CFF; font-weight: bold; font-size: 15px; left: 10px;bottom:10px; z-index: 999;">
{{itemCode}} {{itemCode}}
</view> </view>
</view> </view>
<view class=""> <view class="">
<win-com-scan-customer-label ref="comscanCustomerLabel" placeholder="客户标签" <win-com-scan-customer-label ref="comscanCustomerLabel" placeholder="客户标签"
@getResult="getScanCustomerResult" :isShowHistory="false" :clearResult="false" @getResult="getScanCustomerResult" :isShowHistory="false" :clearResult="false"
:headerType="headerType"></win-com-scan-customer-label> :headerType="headerType"></win-com-scan-customer-label>
</view> </view>
</view> </view>
</view> </view>
</uni-popup> </uni-popup>
</view> </view>
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
</template> </template>
<script> <script>
import winComScan from '@/mycomponents/scan/winComScan.vue' import winComScan from '@/mycomponents/scan/winComScan.vue'
import winComScanCustomerLabel from '@/mycomponents/scan/winComScanCustomerLabel.vue' import winComScanCustomerLabel from '@/mycomponents/scan/winComScanCustomerLabel.vue'
import balanceSelect from '@/mycomponents/balance/balanceSelect.vue' import balanceSelect from '@/mycomponents/balance/balanceSelect.vue'
import { import {
getBalanceByManagementPrecision, getBalanceByManagementPrecision,
} from '@/common/balance.js'; } from '@/common/balance.js';
import { import {
getBasicLocationByCode, getBasicLocationByCode,
} from '@/api/request2.js'; getCustomerItemList
} from '@/api/request2.js';
import {
getListLocationAreaTypeDesc, import {
checkDirectoryItemExist, getListLocationAreaTypeDesc,
getDirectoryItemArray, checkDirectoryItemExist,
getLocationAreaTypeName, getDirectoryItemArray,
getInventoryStatusDesc getLocationAreaTypeName,
} from '@/common/directory.js'; getInventoryStatusDesc
export default { } from '@/common/directory.js';
name: 'winScanPack', export default {
emits: ["getResult", "close", "getCountScanResult"], name: 'winScanPack',
components: { emits: ["getResult", "close", "getCountScanResult"],
winComScan, components: {
winComScanCustomerLabel winComScan,
}, winComScanCustomerLabel
props: { },
title: { props: {
type: String, title: {
default: '箱标签' type: String,
}, default: '箱标签'
headerType: { },
type: String, headerType: {
default: "HPQ,HMQ" type: String,
}, default: "HPQ,HMQ"
}, },
data() { },
return { data() {
return {
scanResult: {},
show: false, scanResult: {},
scanList: [], show: false,
expand: false, scanList: [],
showScanResult: {}, expand: false,
expendIcon: 'arrow-down', showScanResult: {},
fromLocationCode: '', expendIcon: 'arrow-down',
fromLocation: '', fromLocationCode: '',
fromLocationList: [], fromLocation: '',
fromLocationAreaTypeList: [], fromLocationList: [],
locationOnFocus: false, fromLocationAreaTypeList: [],
businessType: {}, locationOnFocus: false,
inventoryStatus: [], businessType: {},
managementPrecision: '', inventoryStatus: [],
fromInventoryStatuses: "", managementPrecision: '',
isCheck: false, fromInventoryStatuses: "",
itemCode: '', isCheck: false,
customerItem: null itemCode: '',
} customerItem: null,
}, customerCode: '',//
created() { packingNumber:''//
}
}, },
methods: { created() {
//
openScanPopupForType(fromLocationCode, businessType) { },
this.businessType = businessType; methods: {
this.fromLocationCode = fromLocationCode; //
if (fromLocationCode != '') { openScanPopupForType(customerCode) {
this.packGetFocus();
} else { this.customerCode = customerCode;
this.locationGetFocus(); if (this.fromLocationCode != '') {
} this.packGetFocus();
this.fromInventoryStatuses = this.businessType.outInventoryStatuses } else {
this.inventoryStatus = getDirectoryItemArray(this.businessType.outInventoryStatuses); // this.locationGetFocus();
this.fromLocationAreaTypeList = getDirectoryItemArray(this.businessType.fromLocationAreaTypeList); // }
setTimeout(res => { this.fromInventoryStatuses = this.businessType.outInventoryStatuses
this.$refs.popup.open('bottom') this.inventoryStatus = getDirectoryItemArray(this.businessType.outInventoryStatuses); //
}, 500) this.fromLocationAreaTypeList = getDirectoryItemArray(this.businessType.fromLocationAreaTypeList); //
}, setTimeout(res => {
this.$refs.popup.open('bottom')
// }, 500)
openScanPopupForJob(fromLocationCode, fromLocationList, jobContent) { },
this.fromLocationCode = fromLocationCode;
this.fromLocationList = fromLocationList; //
if (fromLocationCode != '') { openScanPopupForJob(fromLocationCode, fromLocationList, jobContent) {
this.packGetFocus(); this.fromLocationCode = fromLocationCode;
} else { this.fromLocationList = fromLocationList;
if (this.fromLocationList.length == 0) { if (fromLocationCode != '') {
this.locationGetFocus(); this.packGetFocus();
} else { } else {
this.fromLocationCode = this.fromLocationList[0]; if (this.fromLocationList.length == 0) {
} this.locationGetFocus();
} } else {
setTimeout(res => { this.fromLocationCode = this.fromLocationList[0];
this.$refs.popup.open('bottom') }
}, 500) }
this.fromInventoryStatuses = jobContent.outInventoryStatuses setTimeout(res => {
this.inventoryStatus = getDirectoryItemArray(jobContent.outInventoryStatuses); //; // this.$refs.popup.open('bottom')
this.fromLocationAreaTypeList = getDirectoryItemArray(jobContent.fromAreaTypes); // }, 500)
}, this.fromInventoryStatuses = jobContent.outInventoryStatuses
this.inventoryStatus = getDirectoryItemArray(jobContent.outInventoryStatuses); //; //
closeScanPopup(content) { this.fromLocationAreaTypeList = getDirectoryItemArray(jobContent.fromAreaTypes); //
this.$refs.popup.close(); },
this.$emit("close", '');
}, closeScanPopup(content) {
this.$refs.popup.close();
this.$emit("close", '');
},
getScanFgResult(result) { getScanFgResult(result) {
this.itemCode = result.label.itemCode; console.log('getScanFgResult',result)
this.itemCode = result.label.itemCode;
var filters = [] this.packingNumber = result.package.number; //
filters.push({
column: "customerCode", var filters = []
action: "==", filters.push({
value: '20001004' column: "customerCode",
}) action: "==",
filters.push({ value: this.customerCode
column: "itemCode", })
action: "==", filters.push({
value: this.itemCode column: "itemCode",
}) action: "==",
value: this.itemCode
var params = { })
filters: filters,
pageNo: this.pageCurrent, var params = {
pageSize: this.pageSize, filters: filters,
} pageNo: 1,
getCustomerItemList(params).then(res => { pageSize: 10,
if (res.data != null && res.data.list.length > 0) { }
this.customerItem = res.data.list[0];
} else {
this.showErrorMessage('未查找到客户物料代码'); getCustomerItemList(params).then(res => {
} console.log('getCustomerItemList', res)
}).catch(error => {
this.showErrorMessage(error); if (res.data != null && res.data.list.length > 0) {
}) this.customerItem = res.data.list[0];
} else {
this.showErrorMessage('未查找到客户物料代码');
this.customerGetFocus(); }
}, }).catch(error => {
this.showErrorMessage(error);
getScanCustomerResult(result) { })
if (this.customerItem != null) {
// if(this.customerItem
// ) this.customerGetFocus();
},
}
}, getScanCustomerResult(result) {
console.log('getScanCustomerResult', result)
afterCheck() { if (this.customerItem != null) {
//
}, if (this.customerItem.customerItemCode == result) {
//
packGetFocus() { this.$emit("checkResult", {
if (this.$refs.comscanFgLabel != undefined) { packingNumber:this.packingNumber ,//
this.$refs.comscanFgLabel.getfocus(); customerItemCode:this.customerItem.customerItemCode,//
} customerItemCode_reality:result, //
}, itemCode:this.itemCode,//
pass:true
packLoseFocus() { });
if (this.$refs.comscanFgLabel != undefined) {
this.$refs.comscanFgLabel.losefocus(); }else{
} //
}, this.$emit("checkResult", {
packingNumber:this.packingNumber ,//
customerGetFocus() { customerItemCode:this.customerItem.customerItemCode,//
if (this.$refs.comscanCustomerLabel != undefined) { customerItemCode_reality:result, //
this.$refs.comscanCustomerLabel.getfocus(); itemCode:this.itemCode,//
} pass:false
}, });
}
customerLoseFocus() { }
if (this.$refs.comscanCustomerLabel != undefined) { },
this.$refs.comscanCustomerLabel.losefocus();
} afterCheck() {
},
},
locationGetFocus() {
this.fromLocationCode = ''; packGetFocus() {
this.locationOnFocus = true; if (this.$refs.comscanFgLabel != undefined) {
}, this.$refs.comscanFgLabel.getfocus();
}
},
showMessage(message, callback) {
setTimeout(r => { packLoseFocus() {
this.packLoseFocus(); if (this.$refs.comscanFgLabel != undefined) {
this.$refs.comMessage.showMessage(message, callback); this.$refs.comscanFgLabel.losefocus();
}) }
}, },
showErrorMessage(message, callback) { customerGetFocus() {
setTimeout(r => { if (this.$refs.comscanCustomerLabel != undefined) {
this.packLoseFocus(); this.$refs.comscanCustomerLabel.getfocus();
this.$refs.comMessage.showErrorMessage(message, callback) }
}) },
}
} customerLoseFocus() {
} if (this.$refs.comscanCustomerLabel != undefined) {
</script> this.$refs.comscanCustomerLabel.losefocus();
}
<style lang="scss"> },
.scroll-view {
overflow-y: scroll; locationGetFocus() {
height: auto; this.fromLocationCode = '';
max-height: 300rpx; this.locationOnFocus = true;
} },
showMessage(message, callback) {
setTimeout(r => {
this.packLoseFocus();
this.$refs.comMessage.showMessage(message, callback);
})
},
showErrorMessage(message, callback) {
setTimeout(r => {
this.packLoseFocus();
this.$refs.comMessage.showErrorMessage(message, callback)
})
}
}
}
</script>
<style lang="scss">
.scroll-view {
overflow-y: scroll;
height: auto;
max-height: 300rpx;
}
</style> </style>

8
src/mycomponents/scan/winComScanCustomerLabel.vue

@ -139,9 +139,13 @@
this.handelScanMsg(); this.handelScanMsg();
}, },
handelScanMsg() { handelScanMsg() {
console.log('handelScanMsg',this.scanMsg)
let that = this; let that = this;
that.scanMsg.replace('\n','')
let index = that.scanMsg.indexOf('\n'); let index = that.scanMsg.indexOf('\n');
if (index >= 0) { console.log('index',index)
// if (index >= 0) {
setTimeout(() => { setTimeout(() => {
that.losefocus(); that.losefocus();
let content = uni.$u.trim(that.scanMsg) let content = uni.$u.trim(that.scanMsg)
@ -159,7 +163,7 @@
this.customerItemCode = items[1]; this.customerItemCode = items[1];
that.$emit("getResult", this.customerItemCode); that.$emit("getResult", this.customerItemCode);
}, 500); }, 500);
} // }
}, },
getfocus() { getfocus() {
let that = this; let that = this;

386
src/pages/check/checkFgLabel.vue

@ -3,36 +3,43 @@
<view class=""> <view class="">
<com-blank-view @goScan='showFromLocationPopup' v-if="customerCode==''" title='选择用户'></com-blank-view> <com-blank-view @goScan='showFromLocationPopup' v-if="customerCode==''" title='选择用户'></com-blank-view>
</view> </view>
<view class="page-wraper" v-if="customerCode!=''"> <view class="page-wraper" v-if="customerCode!=''">
<view class="page-header"> <view class="page-header">
<view class="header_item"> <view class="header_item">
客户代码 : {{customerCode}} 客户代码 : {{customerCode}}
</view> </view>
<view class='split_line'></view> <!-- <view class='split_line'></view> -->
</view> </view>
<view class="page-main"> <view class="page-main">
<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="[item.pass?'scan_view':'refuse_view']" v-for="(item, index) in list" :key="index">
<view class=""> <view class="card_view">
<recordDetailCard :dataContent="item" :index="index" :settingParam="dataContent" <text class="card_packing_code card_content ">箱码</text>
:isShowFromLocation="false" @removeItem="removeItem(index,item)" <text class="card_content ">{{item.packingNumber}}</text>
@updateData="updateData" @removePack="removePack">
</recordDetailCard>
</view> </view>
</view> --> <view class="card_view ">
<text class="card_batch card_content " style="padding-left: 30px;">WMS 物料</text>
<text class="card_content ">{{item.itemCode}}</text>
</view>
<view class="card_view ">
<text class="card_order card_content " style="padding-left: 30px;">客户 物料</text>
<text class="card_content ">{{item.customerItemCode}}</text>
</view>
<view class="card_view ">
<text class="card_order card_content " style="padding-left: 30px;">实际校验 物料</text>
<text class="card_content ">{{item.customerItemCode_reality}}</text>
</view>
<view class='line'></view>
</view>
</scroll-view> </scroll-view>
</view> </view>
<win-scan-button @goScan='openScanPopup'></win-scan-button> <win-scan-button @goScan='openScanPopup'></win-scan-button>
</view> </view>
<u-select v-model="show" mode="mutil-column-auto" :list="customerList" <u-select v-model="show" mode="mutil-column-auto" :list="customerList"
style="height: 50%; background-color: white; " @confirm="confirmSelect"></u-select> @confirm="confirmSelect"></u-select>
<win-check-fg-label ref="scanPopup"></win-check-fg-label> <win-check-fg-label ref="scanPopup" @checkResult="checkResult"></win-check-fg-label>
<!-- <win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' :allowModifyLocation='false'>
</win-scan-pack-and-location> -->
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
<win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getLocation'
:locationAreaTypeList="fromLocationAreaTypeList"></win-scan-location>
</view> </view>
</template> </template>
@ -79,7 +86,6 @@
import winCheckFgLabel from "@/mycomponents/scan/winCheckFgLabel.vue" import winCheckFgLabel from "@/mycomponents/scan/winCheckFgLabel.vue"
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue" import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue"
import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue' import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue'
import recordDetailCard from '@/mycomponents/record/recordDetailCard.vue'
export default { export default {
components: { components: {
@ -90,46 +96,22 @@
winScanLocation, winScanLocation,
winCheckFgLabel, winCheckFgLabel,
recordComDetailCard, recordComDetailCard,
recordDetailCard
}, },
data() { data() {
return { return {
id: '',
dataContent: {}, //
detailSource: [], //
fromLocationInfo: {},
fromLocationCode: "",
fromLocationAreaTypeList: [],
toLocationAreaTypeList: [],
inInventoryStatus: "", //
outInventoryStatus: "", //
businessType: {},
showToLoaction: true, showToLoaction: true,
recommendLocationList: [], // recommendLocationList: [], //
fromWarehouseCode: '', // fromWarehouseCode: '', //
businessTypeCode: "Issue",
positionList: [], positionList: [],
show: false, show: false,
positionInfo: "请选择生产线", positionInfo: "请选择生产线",
customerList: [], customerList: [],
show: true,
customerCode: '', customerCode: '',
customerName: '', customerName: '',
list:[]
}; };
}, },
onLoad(option) { onLoad(option) {
this.clearData();
// getBusinessType(this.businessTypeCode, res => {
// if (res.success) {
// this.businessType = res.businessType;
// this.fromLocationAreaTypeList = res.fromLocationAreaTypeList;
// this.toLocationAreaTypeList = res.toLocationAreaTypeList;
// // this.showFromLocationPopup();
// } else {
// this.showErrorMessage(res.message)
// }
// });
getBasicCustomerList().then(res => { getBasicCustomerList().then(res => {
if (res.data.length > 0) { if (res.data.length > 0) {
var list = res.data; var list = res.data;
@ -159,104 +141,37 @@
mounted() {}, mounted() {},
methods: { methods: {
getScanResult(result) { //
let balance = result.balance; checkResult(result){
let label = result.label; console.log('checkResult',result)
let pack = result.package; let flag = true
var item = this.detailSource.find(res => { for(let i=0;i<this.list.length;i++){
if (res.itemCode == balance.itemCode) { if(this.list[i].packingNumber==result.packingNumber&&this.list[i].customerItemCode==result.customerItemCode&&this.list[i].customerItemCode_reality==result.customerItemCode_reality&&this.list[i].itemCode==result.itemCode&&this.list[i].pass==result.pass){
return res flag = false
} }
})
if (this.fromWarehouseCode == '') {
this.fromWarehouseCode = balance.warehouseCode;
} }
if (item == undefined) { if(flag){
// this.list.unshift(result)
// this.getRecommendLocation(balance, pack, toLocation => {
var itemp = createItemInfo(balance, pack);
let newDetail = createDetailInfo(balance, pack); //
// newDetail.toLocationCode = toLocation.code;
// newDetail.toWarehouseCode = toLocation.warehouseCode;
itemp.subList.push(newDetail);
var dataList = pack.subList
this.detailSource.push(itemp)
this.detailSource.forEach(res => {
res.subList.forEach(pack => {
pack.packList = dataList.filter(c => c.parentNumber == pack
.packingNumber)
pack.packList.forEach(pac => {
pac.parentPackingNumber = pac.parentNumber;
pac.packingNumber = pac.number;
pac.inventoryStatus = "OK";
pac.scaned = true;
})
})
})
// })
} else {
var itemDetail = item.subList.find(r => r.packingNumber == balance.packingNumber && r.batch ==
balance.batch);
if (itemDetail != undefined) {
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]已经在列表中")
}
} }
// calcTreeHandleQty(this.detailSource); if(result.pass){
}, //
this.showMessage('校验通过')
// }else{
getRecommendLocation(balance, pack, callback) { this.showErrorMessage('校验未通过')
uni.showLoading({
title: '扫描中...',
mask: true
})
let recommend = this.recommendLocationList.find(r => r.itemCode == balance.itemCode);
if (recommend == undefined) {
let param = {
itemCode: balance.itemCode,
batch: balance.batch,
inventoryStatus: balance.inventoryStatus,
supplierCode: pack.supplierCode,
businessCode: this.businessTypeCode
};
console.log(JSON.stringify(param))
getPutawayRecommendLocation(param).then(res => {
this.recommendLocationList.push({
itemCode: balance.itemCode,
locationCode: res.data.code
})
callback(res.data);
uni.hideLoading();
}).catch(error => {
uni.hideLoading()
this.showErrorMessage(error);
uni.hideLoading();
})
} else {
callback(recommend);
} }
this.$refs.scanPopup.closeScanPopup();
}, },
//
openScanPopup() {
this.$refs.scanPopup.openScanPopupForType(this.customerCode);
},
showErrorMessage(message) { showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => { this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {} if (res) {}
}); });
}, },
calcTreeHandleQty() {
for (let item of this.detailSource) {
item.qty = 0;
for (let detail of item.subList) {
if (detail != undefined) {
item.qty = calc.add(item.qty, detail.qty)
}
}
}
this.$forceUpdate();
},
showSelect() { showSelect() {
this.show = true this.show = true
}, },
@ -267,48 +182,11 @@
this.customerName = e[0].label this.customerName = e[0].label
} }
}, },
updateData() {
this.calcTreeHandleQty();
},
removeItem(index, item) {
this.detailSource.splice(index, 1)
},
removePack() {
for (var i = 0; i < this.detailSource.length; i++) {
var item = this.detailSource[i];
if (item.subList.length == 0) {
this.detailSource.splice(i, 1)
}
}
this.updateData();
},
openScanPopup() {
// if (this.fromLocationCode == "") {
// this.showFromLocationPopup();
// return
// }
this.$refs.scanPopup.openScanPopupForType(this.fromLocationCode, this.businessType);
},
showFromLocationPopup() { showFromLocationPopup() {
this.show = true; this.show = true;
// this.$nextTick(() => {
// this.$refs.scanLocationCode.openScanPopup();
// })
},
showCustomerList() {
this.$nextTick(() => {
this.$refs.scanLocationCode.openScanPopup();
})
}, },
closeScanPopup() { closeScanPopup() {
if (this.$refs.scanPopup != undefined) { if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.closeScanPopup(); this.$refs.scanPopup.closeScanPopup();
@ -320,139 +198,11 @@
this.$refs.scanPopup.getfocus(); this.$refs.scanPopup.getfocus();
} }
}, },
// scanLocationCode(location, code) {
// this.toLocationCode = code
// this.toLocationCode = location;
// },
commit() {
uni.showLoading({
title: "提交中....",
mask: true
});
//
let precisionStrategyParams = getPrecisionStrategyParams(this.detailSource);
//2:
getPrecisionStrategyList(precisionStrategyParams, res => {
if (res.success) {
this.managementList = res.list;
var params = {
...this.setRecordParams()
}
console.log("提交参数", JSON.stringify(params));
issueRecordSubmit(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 {
uni.hideLoading();
this.showErrorMessage(res.message);
}
});
},
getItemAndLocationRelations() {
var itemList = []
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
detail.toLocationCode = this.toLocationCode;
var filterResult = itemList.filter(res => {
if (res.itemCode == item.itemCode &&
res.locationCode == detail.toLocationCode &&
res.batch == detail.batch &&
res.inventoryStatus == detail.inventoryStatus) {
return res
}
})
//
if (filterResult.length == 0) {
var result = {
itemCode: item.itemCode,
locationCode: detail.toLocationCode,
batch: detail.batch,
inventoryStatus: detail.inventoryStatus,
}
itemList.push(result)
}
}
})
})
return itemList;
},
setRecordParams() {
var subList = []
var creator = this.$store.state.user.id
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
var info = getPackingNumberAndBatchByList(this.managementList, detail.itemCode,
detail.packingNumber, detail.toLocationCode, detail.batch);
var submitItem = deepCopyData(detail)
submitItem.toPackingNumber = info.packingNumber;
submitItem.toBatch = info.batch;
submitItem.toContainerNumber = detail.containerNumber;
submitItem.fromPackingNumber = info.packingNumber;
submitItem.fromBatch = info.batch;
submitItem.fromContainerNumber = detail.containerNumber;
submitItem.fromLocationCode = detail.locationCode;
submitItem.toLocationCode = detail.toLocationCode;
// detail.toInventoryStatus = detail.inventoryStatus
// detail.toLocationCode = detail.toLocationCode
submitItem.qty = detail.handleQty;
submitItem.package = "";
submitItem.recordList = [{
toInventoryStatus: detail.inventoryStatus,
fromPackingNumber: info.packingNumber,
fromBatch: info.batch,
toPackingNumber: info.packingNumber,
toBatch: info.batch,
fromLocationCode: detail.locationCode,
toLocationCode: detail.toLocationCode,
handleQty: detail.handleQty
}]
subList.push(submitItem)
}
})
})
if (subList.length > 0) {
this.dataContent.toWarehouseCode = subList[0].toWarehouseCode;
}
this.dataContent.subList = subList
this.dataContent.creator = creator;
this.dataContent.fromWarehouseCode = this.fromWarehouseCode;
return this.dataContent;
},
showMessage(message) { showMessage(message) {
this.$refs.comMessage.showMessage(message, res => { this.$refs.comMessage.showMessage(message, res => {
if (res) {} if (res) {}
}); });
}, },
showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
}
});
},
showScanMessage(message) { showScanMessage(message) {
this.$refs.comMessage.showScanMessage(message); this.$refs.comMessage.showScanMessage(message);
@ -465,48 +215,11 @@
closeScanMessage() { closeScanMessage() {
this.scanPopupGetFocus(); this.scanPopupGetFocus();
}, },
getLocation(location, code) {
this.getFromLocationCode(location, code)
},
getFromLocationCode(location, code) {
this.fromLocationInfo = location;
this.fromLocationCode = code;
this.openScanPopup();
},
getToLocationCode(location, code) {
if (this.fromLocationCode == code) {
uni.showToast({
title: "来源库位[" + this.fromLocationCode + "]不能与目标库位[" + code + "]一致",
duration: 2000
})
return
}
this.toLocationCode = code;
},
showCommitSuccessMessage(hint) { showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => { this.$refs.comMessage.showSuccessMessage(hint, res => {
this.clearData();
}) })
}, },
updateData() {
// this.calcTreeHandleQty();
for (var i = 0; i < this.detailSource.length; i++) {
let item = this.detailSource[i];
if (item.qty == 0) {
this.detailSource.splice(i, 1)
}
}
},
clearData() {
this.fromLocationInfo = {};
this.fromLocationCode = '';
this.fromWarehouseCode = '';
this.toWarehouseCode = '';
this.detailSource = [];
}
} }
} }
</script> </script>
@ -516,4 +229,11 @@
height: 500rpx; height: 500rpx;
background-color: bisque; background-color: bisque;
} }
.refuse_view {
background: linear-gradient(90deg, rgba(255, 160, 161, 1) 0%, rgba(255, 160, 161, 0) 100%)
}
.line {
background-color: #e0e0e0;
height: 1px;
}
</style> </style>
Loading…
Cancel
Save