Browse Source

生产退料合格和隔离

wms3.0_pda
lijuncheng 11 months ago
parent
commit
0057daf4ac
  1. 8
      api/httpRequest3.js
  2. 38
      mycomponents/scan/winScanPackAndPosition.vue
  3. 2
      pages/productPutaway/job/productPutawayDetail.vue
  4. 51
      pages/productionReturn/coms/comReturnRecordTitle.vue
  5. 447
      pages/productionReturn/record/returnToHold.vue
  6. 163
      pages/productionReturn/record/returnToStore.vue
  7. 2
      static/config.json
  8. 2
      uni_modules/vk-uview-ui/components/u-select/u-select.vue

8
api/httpRequest3.js

@ -27,15 +27,15 @@ function service(options = {}) {
if(res.data.code==0){ if(res.data.code==0){
resolve(res.data); resolve(res.data);
}else { }else {
reject("系统:"+res.data.msg) reject("系统异常:"+res.data.msg)
} }
}else { }else {
reject("系统:"+ res.data.msg) reject("系统异常:"+ res.data.msg)
} }
} else { } else {
reject("系统:"+res.data.msg) reject("系统异常:"+res.data.msg)
} }
}; };
options.fail = (error) => { options.fail = (error) => {
@ -47,7 +47,7 @@ function service(options = {}) {
} else if (message.includes('Request failed with status code')) { } else if (message.includes('Request failed with status code')) {
message = '接口' + message.substr(message.length - 3) + '异常' message = '接口' + message.substr(message.length - 3) + '异常'
} }
reject("系统:"+message); reject("系统异常:"+message);
}; };
uni.request(options); uni.request(options);
}); });

38
mycomponents/scan/winScanPackAndPosition.vue

@ -1,6 +1,6 @@
<template> <template>
<view> <view>
<uni-popup ref="popup" @change="change" @maskClick="closeScanPopup()"> <uni-popup ref="popup" @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;">
@ -178,24 +178,24 @@
this.productionLineName = e[1].label this.productionLineName = e[1].label
this.workStationName = e[2].label this.workStationName = e[2].label
let shop = this.positionList.find(shop => shop.value == this.workshopCode); // let shop = this.positionList.find(shop => shop.value == this.workshopCode);
if (shop != undefined && shop.children != undefined) { // if (shop != undefined && shop.children != undefined) {
let prodLine = shop.children.find(line => line.value == this.productionLineCode); // let prodLine = shop.children.find(line => line.value == this.productionLineCode);
if (prodLine != undefined && prodLine.children != undefined) { // if (prodLine != undefined && prodLine.children != undefined) {
let station = prodLine.children.find(r => r.value == this.workStationCode); // let station = prodLine.children.find(r => r.value == this.workStationCode);
if (station.rawLocationCode == '' && station.rawLocationCode == null) { // if (station.rawLocationCode == '' && station.rawLocationCode == null) {
this.showErrorMessage(this.workStationName + "的原材料库位为空,请重新选择") // this.showErrorMessage(this.workStationName + ",")
return; // return;
} else { // } else {
this.rawLocationCode = station.rawLocationCode; // this.rawLocationCode = station.rawLocationCode;
this.fgLocationCode = station.fgLocationCode; // this.fgLocationCode = station.fgLocationCode;
} // }
} else { // } else {
this.showErrorMessage("生产线-工位基础信息维护错误") // this.showErrorMessage("线-")
} // }
} else { // } else {
this.showErrorMessage("车间-生产线基础信息维护错误") // this.showErrorMessage("-线")
} // }
}, },
} }
} }

2
pages/productPutaway/job/productPutawayDetail.vue

@ -39,7 +39,7 @@
</view> </view>
<win-scan-button @goScan='openScanPopup'></win-scan-button> <win-scan-button @goScan='openScanPopup'></win-scan-button>
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult'></win-scan-pack-and-location> <win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' ></win-scan-pack-and-location>
<detail-info-popup ref="detailInfoPopup"></detail-info-popup> <detail-info-popup ref="detailInfoPopup"></detail-info-popup>
<com-message ref="comMessage"></com-message> <com-message ref="comMessage"></com-message>

51
pages/productionReturn/coms/comReturnRecordTitle.vue

@ -0,0 +1,51 @@
<template>
<view class="header_job_top">
<view class="cen_card">
<view class="cell_box uni-flex uni-row">
<view class="cell_info">
<view class="text_lightblue">车间</view>
<view>{{workshopCode}}</view>
</view>
<view class="cell_info">
<view class="text_lightblue">生产线</view>
<view>{{productionLineCode}}</view>
</view>
<view class="cell_info">
<view class="text_lightblue">工位</view>
<view>{{ workStationCode }}</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
};
},
watch: {},
props: {
workshopCode: {
type: String,
default: ""
},
productionLineCode: {
type: String,
default: ""
},
workStationCode: {
type: String,
default: ""
},
},
methods: {}
}
</script>
<style>
</style>

447
pages/productionReturn/record/returnToHold.vue

@ -1,29 +1,464 @@
<template> <template>
<view class="page-wraper"> <view class="page-wraper">
<comReturn businessTypeCode="ReturnToHold" > </comReturn> <view class="">
<com-blank-view @goScan='openScanPopup(true)' v-if="detailSource.length==0"></com-blank-view>
</view>
<view class="page-wraper" v-if="detailSource.length>0">
<view class="page-header">
<comReturnRecordTitle :workshopCode="workshopCode"
:productionLineCode="productionLineCode"
:workStationCode ="workStationCode"
></comReturnRecordTitle>
</view>
<u-line />
<view class="page-main">
<scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<comReturnRecord :dataContent="item" :index="index"
@removeItem="removeItem(index,item)" @updateData="updateData" @removePack="removePack">
</comReturnRecord>
</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="">
</view>
<view class=" uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button>
</view>
</view>
</view>
<win-scan-button @goScan='openScanPopup(false)'></win-scan-button>
</view>
<winScanPackAndPosition ref="scanPopup" @getResult='getScanResult'></winScanPackAndPosition>
<comMessage ref="comMessage"></comMessage>
</view> </view>
</template> </template>
<script> <script>
import comReturn from '@/pages/productionReturn/coms/comReturn.vue' import {
productionReturnRecordSubmit,
} from '@/api/request2.js';
import {
goHome,
getPackingNumberAndBatchByList
} from '@/common/basic.js';
import {
getDirectoryItemArray
} from '@/common/directory.js';
import {
getBusinessType,
} from '@/common/record.js';
import {
getPrecisionStrategyList,
getPrecisionStrategyParams
} from '@/common/balance.js';
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import requiredLocation from '@/mycomponents/location/requiredLocation.vue'
import comReturnRecord from '@/pages/productionReturn/coms/comReturnRecord.vue'
import comBlankView from '@/mycomponents/common/comBlankView.vue'
import comMessage from '@/mycomponents/common/comMessage.vue'
import winScanPack from '@/mycomponents/scan/winScanPack.vue'
import winScanPackAndPosition from "@/mycomponents/scan/winScanPackAndPosition.vue"
import comReturnRecordTitle from '@/pages/productionReturn/coms/comReturnRecordTitle.vue'
export default { export default {
name: 'comReturn',
components: { components: {
comReturn winScanButton,
comReturnRecordTitle,
requiredLocation,
comBlankView,
comMessage,
comReturnRecord,
winScanPack,
winScanPackAndPosition
}, },
data() {
watch: {},
data() {
return { return {
id: '',
dataContent: {}, //
subList: [], //subList
detailSource: [], //
fromLocationCode: '',
fromLocationTypeList: [],
toLocationCode: '',
tolocationTypeList: [],
businessType: {},
inventoryStatus: '',
managementList: [],
show: false,
positionList: [],
productionLineCode: '',
rawLocationCode: "",
fgLocationCode: "",
workshopCode: "",
workStationCode: "",
workShopName: "",
productionLineName: "",
workStationName: "",
businessTypeCode :"ReturnToHold",
positionInfo:"",
recommendLocationList: [], //
};
},
onLoad() {
getBusinessType(this.businessTypeCode, res => {
if (res.success) {
this.businessType = res.businessType;
this.fromlocationTypeList = res.fromlocationTypeList;
this.tolocationTypeList = res.tolocationTypeList;
this.openScanPopup(true);
} else {
this.showErrorMessage(res.message)
}
});
},
mounted() {
},
//
onNavigationBarButtonTap(e) {
if (e.index === 0) {
goHome();
} }
}, },
//
onBackPress(e) {},
onLoad(option) { onPullDownRefresh() {
uni.stopPullDownRefresh();
}, },
methods: { methods: {
openScanPopup(isEditPosition) {
this.$refs.scanPopup.openScanPopup(isEditPosition);
},
getScanResult(result,param) {
this.positionInfo = param.positionInfo;
this.workshopCode = param.workshopCode;
this.productionLineCode = param.productionLineCode;
this.workStationCode = param.workStationCode ;
let label = result.label;
let pack = result.package;
var item = this.detailSource.find(res => {
if (res.itemCode == label.itemCode) {
return res
}
})
if (item == undefined) {
var itemp = this.createItemInfo(label, pack);
let newDetail = this.createDetailInfo(label, pack);
newDetail.toLocationCode = "HOLD";
itemp.subList.push(newDetail);
this.detailSource.push(itemp)
} else {
var detail = item.subList.find(r => {
if (r.packingNumber == label.packingNumber &&
r.batch == label.batch) {
return r;
}
})
if (detail == undefined) {
let newDetail = this.createDetailInfo(label, pack);
newDetail.toLocationCode ="HOLD";
item.subList.push(newDetail);
} else {
if (detail.scaned == true) {
this.showErrorMessage("箱码[" + label.packingNumber + "批次[" + label.batch + "]已经在列表中")
}
}
}
this.calcHandleQty();
},
createItemInfo(label, pack) {
let item = {
itemCode: label.itemCode,
itemName: pack.itemName,
stdPackQty: pack.stdPackQty,
stdPackUnit: pack.stdPackUnit,
qty: Number(label.qty),
handleQty: 0,
uom: pack.uom,
subList: []
}
return item;
},
createDetailInfo(label, pack) {
let detail = {};
Object.assign(detail, label)
detail.scaned = true;
detail.qty = Number(label.qty);
detail.inventoryStatus = "HOLD"
detail.stdPackQty = pack.stdPackQty;
detail.stdPackUnit = pack.stdPackUnit;
detail.package = pack;
detail.label = label;
return detail;
},
calcHandleQty() {
for (let item of this.detailSource) {
item.qty = 0;
for (let detail of item.subList) {
if (detail != undefined) {
item.qty += Number(detail.qty)
}
}
}
this.scanPopupGetFocus();
this.$forceUpdate();
},
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();
},
showSelect() {
this.show = !this.show
},
updateData() {
this.calcHandleQty();
},
removeData(item) {
for (let i = 0; i < this.detailSource.length; i++) {
if (this.detailSource[i].itemCode == item.itemCode) {
this.detailSource.splice(i, 1)
}
}
},
commit() {
if (this.positionInfo == "请选择位置") {
this.showMessage("请先选择位置")
return;
}
if (this.detailSource.length > 0 && this.detailSource[0].subList.length > 0) {
//
uni.showLoading({
title: "提交中....",
mask: true
});
this.managementList = [];
var precisionStrategParams = getPrecisionStrategyParams(this.detailSource)
getPrecisionStrategyList(precisionStrategParams, res => {
if (res.success) {
this.managementList = res.list;
var params = this.setParams()
console.log("提交" + JSON.stringify(params))
productionReturnRecordSubmit(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);
}
})
} else {
this.showErrorMessage("没有要提交的数据,请先扫描")
}
},
setPrecisionStrategParams() {
var itemList = []
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
var filterResult = itemList.filter(res => {
if (res.itemCode == item.itemCode &&
detail.toLocationCode == res.locationCode) {
return res
}
})
//
if (filterResult.length == 0) {
var result = {
itemCode: item.itemCode,
locationCode: detail.toLocationCode
}
itemList.push(result)
}
}
})
})
return itemList;
},
setParams() {
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);
detail.itemCode = detail.itemCode;
detail.itemName = detail.package.itemName;
detail.itemDesc1 = detail.package.itemDesc1;
detail.itemDesc2 = detail.package.itemDesc2;
detail.inventoryStatus = detail.inventoryStatus;
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;
detail.productionlineCode = this.productionLineCode;
detail.workStationCode = this.workStationCode;
subList.push(detail)
}
})
})
this.dataContent.subList = subList;
this.dataContent.creator = creator;
this.dataContent.workshopCode = this.workshopCode;
this.dataContent.businessType = this.businessTypeCode;
return this.dataContent;
},
showMessage(message) {
this.scanPopupLoseFocus();
this.$refs.comMessage.showMessage(message, res => {
if (res) {
this.afterCloseMessage()
}
});
},
showErrorMessage(message) {
this.scanPopupLoseFocus();
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
this.afterCloseMessage()
}
});
},
afterCloseMessage() {
this.scanPopupGetFocus();
},
scanPopupGetFocus() {
this.$refs.scanPopup.getfocus();
},
scanPopupLoseFocus() {
this.$refs.scanPopup.losefocus();
},
showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
this.subList = [];
this.detailSource = [];
this.toLocationCode = '';
this.dataContent = {};
this.positionInfo = "请选择位置";
})
},
} }
} }
</script> </script>
<style> <style scoped lang="scss">
page {
width: 100%;
height: 100%;
background-color: #fff;
}
.page-wraper {
display: flex;
flex-direction: column;
width: 100%;
height: 100%;
}
.page-main {
flex: 1;
position: relative;
}
.page-main-scroll {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
}
.page-main-list {
/* height: 80rpx;
line-height: 80rpx; */
text-align: center;
background: #e0e0e0;
}
</style> </style>

163
pages/productionReturn/record/returnToStore.vue

@ -1,27 +1,20 @@
<template> <template>
<view class="page-wraper"> <view class="page-wraper">
<view class=""> <view class="">
<com-blank-view @goScan='openScanPopup' v-if="detailSource.length==0"></com-blank-view> <com-blank-view @goScan='openScanPopup(true)' v-if="detailSource.length==0"></com-blank-view>
</view> </view>
<view class="page-wraper" v-if="detailSource.length>0"> <view class="page-wraper" v-if="detailSource.length>0">
<view class=""> <view class="page-header">
<view class="uni-flex uni-row u-col-center" style="margin: 10rpx;"> <comReturnRecordTitle :workshopCode="workshopCode" :productionLineCode="productionLineCode"
<text style="font-size: 32rpx;margin-left: 20rpx;">位置 : </text> :workStationCode="workStationCode"></comReturnRecordTitle>
<view class="uni-flex u-col-center uni-row">
<view class="" style="margin-left: 20rpx;font-size: 30rpx;">
{{positionInfo}}
</view>
</view>
</view> </view>
<u-line /> <u-line />
</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="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class=""> <view class="">
<comReturnRecord :dataContent="item" :index="index" <comReturnRecord :dataContent="item" :index="index" @removeItem="removeItem(index,item)"
@removeItem="removeItem(index,item)" @updateData="updateData" @removePack="removePack"> @updateData="updateData" @removePack="removePack">
</comReturnRecord> </comReturnRecord>
</view> </view>
<u-line /> <u-line />
@ -39,7 +32,7 @@
</view> </view>
</view> </view>
</view> </view>
<win-scan-button @goScan='openScanPopup'></win-scan-button> <win-scan-button @goScan='openScanPopup(false)'></win-scan-button>
</view> </view>
<winScanPackAndPosition ref="scanPopup" @getResult='getScanResult'></winScanPackAndPosition> <winScanPackAndPosition ref="scanPopup" @getResult='getScanResult'></winScanPackAndPosition>
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
@ -49,12 +42,12 @@
<script> <script>
import { import {
productionReturnRecordSubmit, productionReturnRecordSubmit,
getWorkShopLineStation getPutawayRecommendLocation
} from '@/api/request2.js'; } from '@/api/request2.js';
import { import {
goHome, goHome,
getPackingNumberAndBatchByList getPackingNumberAndBatchByList,
} from '@/common/basic.js'; } from '@/common/basic.js';
import { import {
@ -63,12 +56,10 @@
import { import {
getBusinessType, getBusinessType,
createItemInfo,
createDetailInfo,
calcHandleQty
} from '@/common/record.js'; } from '@/common/record.js';
import { import {
getPrecisionStrategyList getPrecisionStrategyList,
getPrecisionStrategyParams
} from '@/common/balance.js'; } from '@/common/balance.js';
import winScanButton from '@/mycomponents/scan/winScanButton.vue' import winScanButton from '@/mycomponents/scan/winScanButton.vue'
@ -78,13 +69,15 @@
import comMessage from '@/mycomponents/common/comMessage.vue' import comMessage from '@/mycomponents/common/comMessage.vue'
import winScanPack from '@/mycomponents/scan/winScanPack.vue' import winScanPack from '@/mycomponents/scan/winScanPack.vue'
import winScanPackAndPosition from "@/mycomponents/scan/winScanPackAndPosition.vue" import winScanPackAndPosition from "@/mycomponents/scan/winScanPackAndPosition.vue"
import comReturnRecordTitle from '@/pages/productionReturn/coms/comReturnRecordTitle.vue'
export default { export default {
name: 'comReturn', name: 'comReturn',
components: { components: {
winScanButton, winScanButton,
// comReturnRecord, comReturnRecordTitle,
requiredLocation, requiredLocation,
comBlankView, comBlankView,
comMessage, comMessage,
@ -118,8 +111,10 @@
workShopName: "", workShopName: "",
productionLineName: "", productionLineName: "",
workStationName: "", workStationName: "",
businessTypeCode :"ReturnToStore", businessTypeCode: "ReturnToStore",
positionInfo:"" positionInfo: "",
recommendLocationList: [], //
fromWarehouseCode: '' //
}; };
}, },
@ -129,14 +124,14 @@
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.openScanPopup(); this.openScanPopup(true);
} else { } else {
this.showErrorMessage(res.message) this.showErrorMessage(res.message)
} }
}); });
}, },
mounted() { mounted() {
}, },
@ -154,16 +149,16 @@
}, },
methods: { methods: {
openScanPopup() { openScanPopup(isEditPosition) {
this.$refs.scanPopup.openScanPopup(); this.$refs.scanPopup.openScanPopup(isEditPosition);
}, },
getScanResult(result,param) { getScanResult(result, param) {
this.positionInfo = param.positionInfo; this.positionInfo = param.positionInfo;
this.workshopCode = param.workshopCode; this.workshopCode = param.workshopCode;
this.productionLineCode = param.productionLineCode; this.productionLineCode = param.productionLineCode;
this.workStationCode = param.workStationCode ; this.workStationCode = param.workStationCode;
let label = result.label; let label = result.label;
let pack = result.package; let pack = result.package;
@ -174,10 +169,20 @@
}) })
if (item == undefined) { if (item == undefined) {
var itemp = this.createItemInfo(label, pack);
let newDetail = this.createDetailInfo(label, pack); //
itemp.subList.push(newDetail); this.getRecommendLocation(label, pack, toLocation => {
this.detailSource.push(itemp) var itemp = this.createItemInfo(label, pack);
let newDetail = this.createDetailInfo(label, pack);
newDetail.toLocationCode = toLocation.code;
newDetail.toWarehouseCode = toLocation.warehouseCode;
itemp.subList.push(newDetail);
this.detailSource.push(itemp)
})
} else { } else {
var detail = item.subList.find(r => { var detail = item.subList.find(r => {
if (r.packingNumber == label.packingNumber && if (r.packingNumber == label.packingNumber &&
@ -187,8 +192,13 @@
}) })
if (detail == undefined) { if (detail == undefined) {
let newDetail = this.createDetailInfo(label, pack); this.getRecommendLocation(label, pack, toLocation => {
item.subList.push(newDetail); let newDetail = this.createDetailInfo(label, pack);
newDetail.toLocationCode = toLocation.code;
newDetail.toWarehouseCode = toLocation.warehouseCode;
item.subList.push(newDetail);
});
} else { } else {
if (detail.scaned == true) { if (detail.scaned == true) {
this.showErrorMessage("箱码[" + label.packingNumber + "批次[" + label.batch + "]已经在列表中") this.showErrorMessage("箱码[" + label.packingNumber + "批次[" + label.batch + "]已经在列表中")
@ -258,6 +268,33 @@
this.calcHandleQty(); this.calcHandleQty();
}, },
//
getRecommendLocation(label, pack, callback) {
let recommend = this.recommendLocationList.find(r => r.itemCode == balance.itemCode);
if (recommend == undefined) {
let param = {
itemCode: label.itemCode,
batch: label.batch,
inventoryStatus: label.inventoryStatus,
supplierCode: pack.supplierCode
};
console.log(JSON.stringify(param))
getPutawayRecommendLocation(param).then(res => {
this.recommendLocationList.push({
itemCode: label.itemCode,
locationCode: res.data.code
})
callback(res.data);
}).catch(error => {
uni.hideLoading()
this.showErrorMessage(error)
})
} else {
callback(recommend);
}
},
removeData(item) { removeData(item) {
for (let i = 0; i < this.detailSource.length; i++) { for (let i = 0; i < this.detailSource.length; i++) {
if (this.detailSource[i].itemCode == item.itemCode) { if (this.detailSource[i].itemCode == item.itemCode) {
@ -279,7 +316,7 @@
mask: true mask: true
}); });
this.managementList = []; this.managementList = [];
var precisionStrategParams = this.setPrecisionStrategParams() var precisionStrategParams = getPrecisionStrategyParams(this.detailSource)
getPrecisionStrategyList(precisionStrategParams, res => { getPrecisionStrategyList(precisionStrategParams, res => {
if (res.success) { if (res.success) {
@ -315,7 +352,6 @@
this.detailSource.forEach(item => { this.detailSource.forEach(item => {
item.subList.forEach(detail => { item.subList.forEach(detail => {
if (detail.scaned) { if (detail.scaned) {
detail.toLocationCode = this.fgLocationCode;
var filterResult = itemList.filter(res => { var filterResult = itemList.filter(res => {
if (res.itemCode == item.itemCode && if (res.itemCode == item.itemCode &&
detail.toLocationCode == res.locationCode) { detail.toLocationCode == res.locationCode) {
@ -367,7 +403,7 @@
detail.productionlineCode = this.productionLineCode; detail.productionlineCode = this.productionLineCode;
detail.workStationCode = this.workStationCode; detail.workStationCode = this.workStationCode;
subList.push(detail) subList.push(detail)
} }
@ -377,13 +413,11 @@
this.dataContent.creator = creator; this.dataContent.creator = creator;
this.dataContent.workshopCode = this.workshopCode; this.dataContent.workshopCode = this.workshopCode;
this.dataContent.businessType = this.businessTypeCode; this.dataContent.businessType = this.businessTypeCode;
this.dataContent.toWarehouseCode = this.toWarehouseCode;
return this.dataContent; return this.dataContent;
}, },
showMessage(message) { showMessage(message) {
this.scanPopupLoseFocus(); this.scanPopupLoseFocus();
this.$refs.comMessage.showMessage(message, res => { this.$refs.comMessage.showMessage(message, res => {
@ -408,53 +442,26 @@
}, },
scanPopupGetFocus() { scanPopupGetFocus() {
this.$refs.scanPopup.getfocus(); if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus();
}
}, },
scanPopupLoseFocus() { scanPopupLoseFocus() {
this.$refs.scanPopup.losefocus(); if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.losefocus();
}
}, },
showCommitSuccessMessage(hint) { showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => { this.$refs.comMessage.showSuccessMessage(hint, res => {
this.subList = []; this.subList = [];
this.detailSource = []; this.detailSource = [];
this.toLocationCode = ''; this.toLocationCode = '';
this.dataContent = {}; this.dataContent = {};
this.positionInfo = "请选择位置";
this.fgLocationCode = ""
}) })
}, },
confirmSelect(e) {
this.positionInfo = e[0].label + "-" + e[1].label + "-" + e[2].label
console.log("位置", this.positionInfo)
this.workshopCode = e[0].value
this.productionLineCode = e[1].value
this.workStationCode = e[2].value
this.workShopName = e[0].label
this.productionLineName = e[1].label
this.workStationName = e[2].label
let shop = this.positionList.find(shop => shop.value == this.workshopCode);
if (shop != undefined && shop.children != undefined) {
let prodLine = shop.children.find(line => line.value == this.productionLineCode);
if (prodLine != undefined && prodLine.children != undefined) {
let station = prodLine.children.find(r => r.value == this.workStationCode);
if (station.rawLocationCode == '' && station.rawLocationCode == null) {
this.showErrorMessage(this.workStationName + "的原材料库位为空,请重新选择")
return;
} else {
this.rawLocationCode = station.rawLocationCode;
this.fgLocationCode = station.fgLocationCode;
}
} else {
this.showErrorMessage("生产线-工位基础信息维护错误")
}
} else {
this.showErrorMessage("车间-生产线基础信息维护错误")
}
},
} }
} }
</script> </script>

2
static/config.json

@ -18,7 +18,7 @@
"request_url": { "request_url": {
"name": "request_url", "name": "request_url",
"value": "http://192.168.0.230:12080/admin-api", "value": "http://192.168.0.180:12080/admin-api",
"dev2": "http://192.168.0.157:12080/admin-api", "dev2": "http://192.168.0.157:12080/admin-api",
"chefang": "http://192.168.0.180:12080/admin-api", "chefang": "http://192.168.0.180:12080/admin-api",
"chenxinming": "http://192.168.0.230:12080/admin-api", "chenxinming": "http://192.168.0.230:12080/admin-api",

2
uni_modules/vk-uview-ui/components/u-select/u-select.vue

@ -17,7 +17,7 @@
:style="{ color: cancelColor }" :style="{ color: cancelColor }"
hover-class="u-hover-class" hover-class="u-hover-class"
:hover-stay-time="150" :hover-stay-time="150"
@tap="getResult('cancel')" @tap.stop="getResult('cancel')"
> >
{{cancelText}} {{cancelText}}
</view> </view>

Loading…
Cancel
Save