Browse Source

添加工位列表

agv
李俊城 4 months ago
parent
commit
47163bceda
  1. 7
      fe/PDA/api/index.js
  2. 73
      fe/PDA/pages/request/assembleIssueRequest.vue
  3. 70
      fe/PDA/pages/request/coatingIssueRequest.vue
  4. 84
      fe/PDA/pages/request/injectionIssueRequest.vue
  5. 161
      fe/PDA/pages/request/injectionPlanRequest.vue
  6. 52
      fe/PDA/pages/request/kittingIssueRequest.vue

7
fe/PDA/api/index.js

@ -2238,6 +2238,13 @@ export const getCustomerList = (params) => request(
data: params, data: params,
method: "post" method: "post"
}); });
//获取工位通过库位
export const getWorkStationByLocation = (locationCode) => request(
devUrl + "/api/pda/post-location/get-list-by-location?code="+locationCode, { //
data: {},
method: "post"
});

73
fe/PDA/pages/request/assembleIssueRequest.vue

@ -18,6 +18,26 @@
</view> </view>
</view> </view>
<view class="uni-list" v-if="itemList.length>0">
<view class=""
style="font-size: 40rpx; font-weight: bold; align-items: center; display: flex; justify-content: center; margin-bottom: 20rpx; ">
工位关系
</view>
<view class="uni-flex" style="flex-wrap: wrap;justify-content: space-between; margin: 10rpx;" >
<view style="width: 50%; display: flex; flex-direction: row;" v-for="(item, index) in workStationList" :key="item.value">
<view class="uni-flex" style="flex-direction: row; margin: 12rpx;" @click="checkeClick(item.value)">
<view class="">
<checkbox :value="item.value" :checked="item.checked" />
</view>
<view class="">
{{item.name}}
</view>
</view>
</view>
</view>
</view>
<scroll-view scroll-y="true" @scroll="scroll" class="scroll-detail"> <scroll-view scroll-y="true" @scroll="scroll" class="scroll-detail">
@ -94,14 +114,17 @@
<script> <script>
import { import {
assembleIssueRequest assembleIssueRequest,
getWorkStationByLocation
} from '@/api/index.js'; } from '@/api/index.js';
import { import {
showConfirmMsg, showConfirmMsg,
goHome, goHome,
getRemoveOption, getRemoveOption,
getISODateTime getISODateTime,
scanSuccessAudio,
scanFailedAudio
} from '@/common/basic.js'; } from '@/common/basic.js';
import winBlankView from '@/mycomponents/wincom/winBlankView.vue' import winBlankView from '@/mycomponents/wincom/winBlankView.vue'
@ -122,7 +145,8 @@
data() { data() {
return { return {
itemList: [], itemList: [],
dataContent: {} dataContent: {},
workStationList: [],
}; };
}, },
props: { props: {
@ -145,6 +169,23 @@
}, },
methods: { methods: {
checkeClick(value) {
for (let i = 0; i < this.workStationList.length; i++) {
this.workStationList[i].checked = false
}
for (let i = 0; i < this.workStationList.length; i++) {
if (this.workStationList[i].value === value) {
if (this.workStationList[i].checked == true) {
this.workStationList[i].checked = false
} else {
this.workStationList[i].checked = true
}
}
}
this.$forceUpdate()
},
openScanPopup() { openScanPopup() {
this.$refs.scanPopup.openScanPopup() this.$refs.scanPopup.openScanPopup()
}, },
@ -155,6 +196,27 @@
result.defaultHandleQty=result.qty result.defaultHandleQty=result.qty
this.itemList.push(result) this.itemList.push(result)
this.$forceUpdate() this.$forceUpdate()
getWorkStationByLocation(result.locationCode).then(res => {
if (res && res.length > 0) {
this.workStationList = []
res.forEach(item => {
this.workStationList.push({
value: item.code,
name: item.name,
checked: false
})
})
scanSuccessAudio()
} else {
scanFailedAudio()
this.showMessage("获取工位失败")
}
}).catch(error => {
scanFailedAudio()
this.showMessage("获取工位失败")
})
}, },
@ -188,9 +250,10 @@
}, },
setParams() { setParams() {
var workStation = this.workStationList.find(r => r.checked == true)
var param = { var param = {
worker: localStorage.userName_CN == "" ? localStorage.userName : localStorage.userName_CN, worker: localStorage.userName_CN == "" ? localStorage.userName : localStorage.userName_CN,
remark: "", remark: workStation ? workStation.value : "",
extraProperties: {}, extraProperties: {},
activeDate: getISODateTime(), activeDate: getISODateTime(),
autoSubmit: true, autoSubmit: true,
@ -205,7 +268,7 @@
this.itemList.forEach(res => { this.itemList.forEach(res => {
var data = { var data = {
remark: "", remark: workStation ? workStation.value : "",
qty:res.qty, qty:res.qty,
itemCode: res.partCode, itemCode: res.partCode,
itemName: res.partName, itemName: res.partName,

70
fe/PDA/pages/request/coatingIssueRequest.vue

@ -18,6 +18,26 @@
</view> </view>
</view> </view>
<view class="uni-list" v-if="itemList.length>0">
<view class=""
style="font-size: 40rpx; font-weight: bold; align-items: center; display: flex; justify-content: center; margin-bottom: 20rpx; ">
工位关系
</view>
<view class="uni-flex" style="flex-wrap: wrap;justify-content: space-between; margin: 10rpx;" >
<view style="width: 50%; display: flex; flex-direction: row;" v-for="(item, index) in workStationList" :key="item.value">
<view class="uni-flex" style="flex-direction: row; margin: 12rpx;" @click="checkeClick(item.value)">
<view class="">
<checkbox :value="item.value" :checked="item.checked" />
</view>
<view class="">
{{item.name}}
</view>
</view>
</view>
</view>
</view>
<scroll-view scroll-y="true" @scroll="scroll" class="scroll-detail"> <scroll-view scroll-y="true" @scroll="scroll" class="scroll-detail">
@ -94,7 +114,8 @@
<script> <script>
import { import {
coatingIssueRequest coatingIssueRequest,
getWorkStationByLocation
} from '@/api/index.js'; } from '@/api/index.js';
import { import {
@ -124,7 +145,8 @@
data() { data() {
return { return {
itemList: [], itemList: [],
dataContent: {} dataContent: {},
workStationList: [],
}; };
}, },
props: { props: {
@ -147,6 +169,23 @@
}, },
methods: { methods: {
checkeClick(value) {
for (let i = 0; i < this.workStationList.length; i++) {
this.workStationList[i].checked = false
}
for (let i = 0; i < this.workStationList.length; i++) {
if (this.workStationList[i].value === value) {
if (this.workStationList[i].checked == true) {
this.workStationList[i].checked = false
} else {
this.workStationList[i].checked = true
}
}
}
this.$forceUpdate()
},
openScanPopup() { openScanPopup() {
this.$refs.scanPopup.openScanPopup() this.$refs.scanPopup.openScanPopup()
}, },
@ -157,7 +196,26 @@
result.defaultHandleQty=result.qty result.defaultHandleQty=result.qty
this.itemList.push(result) this.itemList.push(result)
this.$forceUpdate() this.$forceUpdate()
scanSuccessAudio() getWorkStationByLocation(result.locationCode).then(res => {
if (res && res.length > 0) {
this.workStationList = []
res.forEach(item => {
this.workStationList.push({
value: item.code,
name: item.name,
checked: false
})
})
scanSuccessAudio()
} else {
scanFailedAudio()
this.showMessage("获取工位失败")
}
}).catch(error => {
scanFailedAudio()
this.showMessage("获取工位失败")
})
}, },
@ -191,9 +249,11 @@
}, },
setParams() { setParams() {
var workStation = this.workStationList.find(r => r.checked == true)
var param = { var param = {
worker: localStorage.userName_CN == "" ? localStorage.userName : localStorage.userName_CN, worker: localStorage.userName_CN == "" ? localStorage.userName : localStorage.userName_CN,
remark: "", remark: workStation ? workStation.value : "",
extraProperties: {}, extraProperties: {},
activeDate: getISODateTime(), activeDate: getISODateTime(),
autoSubmit: true, autoSubmit: true,
@ -208,7 +268,7 @@
this.itemList.forEach(res => { this.itemList.forEach(res => {
var data = { var data = {
remark: "", remark: workStation ? workStation.value : "",
qty:res.qty, qty:res.qty,
itemCode: res.partCode, itemCode: res.partCode,
itemName: res.partName, itemName: res.partName,

84
fe/PDA/pages/request/injectionIssueRequest.vue

@ -18,6 +18,26 @@
</view> </view>
</view> </view>
<view class="uni-list" v-if="itemList.length>0">
<view class=""
style="font-size: 40rpx; font-weight: bold; align-items: center; display: flex; justify-content: center; margin-bottom: 20rpx; ">
工位关系
</view>
<view class="uni-flex" style="flex-wrap: wrap;justify-content: space-between; margin: 10rpx;" >
<view style="width: 50%; display: flex; flex-direction: row;" v-for="(item, index) in workStationList" :key="item.value">
<view class="uni-flex" style="flex-direction: row; margin: 12rpx;" @click="checkeClick(item.value)">
<view class="">
<checkbox :value="item.value" :checked="item.checked" />
</view>
<view class="">
{{item.name}}
</view>
</view>
</view>
</view>
</view>
<scroll-view scroll-y="true" @scroll="scroll" class="scroll-detail"> <scroll-view scroll-y="true" @scroll="scroll" class="scroll-detail">
@ -94,7 +114,8 @@
<script> <script>
import { import {
injectionIssueRequest injectionIssueRequest,
getWorkStationByLocation
} from '@/api/index.js'; } from '@/api/index.js';
import { import {
@ -124,7 +145,8 @@
data() { data() {
return { return {
itemList: [], itemList: [],
dataContent: {} dataContent: {},
workStationList: [],
}; };
}, },
props: { props: {
@ -147,18 +169,57 @@
}, },
methods: { methods: {
checkeClick(value) {
for (let i = 0; i < this.workStationList.length; i++) {
this.workStationList[i].checked = false
}
for (let i = 0; i < this.workStationList.length; i++) {
if (this.workStationList[i].value === value) {
if (this.workStationList[i].checked == true) {
this.workStationList[i].checked = false
} else {
this.workStationList[i].checked = true
}
}
}
this.$forceUpdate()
},
openScanPopup() { openScanPopup() {
this.$refs.scanPopup.openScanPopup() this.$refs.scanPopup.openScanPopup()
}, },
getScanResult(result) { getScanResult(result) {
this.dataContent = result; this.dataContent = result;
result.qty =result.stdPackQty; result.qty = result.stdPackQty;
result.defaultHandleQty=result.qty result.defaultHandleQty = result.qty
this.itemList.push(result) this.itemList.push(result)
this.$forceUpdate() this.$forceUpdate()
scanSuccessAudio() // result.locationCode APA
getWorkStationByLocation(result.locationCode).then(res => {
if (res && res.length > 0) {
this.workStationList = []
res.forEach(item => {
this.workStationList.push({
value: item.code,
name: item.name,
checked: false
})
})
scanSuccessAudio()
} else {
scanFailedAudio()
this.showMessage("获取工位失败")
}
}).catch(error => {
scanFailedAudio()
this.showMessage("获取工位失败")
})
}, },
clear() { clear() {
@ -191,9 +252,10 @@
}, },
setParams() { setParams() {
var workStation = this.workStationList.find(r => r.checked == true)
var param = { var param = {
worker: localStorage.userName_CN == "" ? localStorage.userName : localStorage.userName_CN, worker: localStorage.userName_CN == "" ? localStorage.userName : localStorage.userName_CN,
remark: "", remark: workStation ? workStation.value : "",
extraProperties: {}, extraProperties: {},
activeDate: getISODateTime(), activeDate: getISODateTime(),
autoSubmit: true, autoSubmit: true,
@ -208,14 +270,14 @@
this.itemList.forEach(res => { this.itemList.forEach(res => {
var data = { var data = {
remark: "", remark: workStation ? workStation.value : "",
qty:res.qty, qty: res.qty,
itemCode: res.partCode, itemCode: res.partCode,
itemName: res.partName, itemName: res.partName,
itemDesc1: res.itemDesc2, itemDesc1: res.itemDesc2,
uom: res.basicUom, uom: res.basicUom,
stdPackQty: res.stdPackQty, stdPackQty: res.stdPackQty,
toLocationCode: res.locationCode, toLocationCode: res.locationCode,
prodLine: null, prodLine: null,
requestStatus: 1, requestStatus: 1,
issuedQty: res.qty, issuedQty: res.qty,
@ -223,7 +285,7 @@
status: 1, status: 1,
positionCode: this.dataContent.code, positionCode: this.dataContent.code,
recommendType: 0, recommendType: 0,
boxQty: res.qty boxQty: res.qty
} }
param.details.push(data) param.details.push(data)

161
fe/PDA/pages/request/injectionPlanRequest.vue

@ -5,10 +5,8 @@
<view class="page-header"> <view class="page-header">
<view class="" style="margin-bottom: 8rpx; margin-top: 8rpx; background-color: #fff"> <view class="" style="margin-bottom: 8rpx; margin-top: 8rpx; background-color: #fff">
<scroll-view scroll-x="true" class="scrollview-box"> <scroll-view scroll-x="true" class="scrollview-box">
<block v-for="(item, index) in tabs" :key="index" > <block v-for="(item, index) in tabs" :key="index">
<view <view :class="tabIndex==index ? 'item_select' : 'item'" :data-current="index" @click="ontabtap">
:class="tabIndex==index ? 'item_select' : 'item'"
:data-current="index" @click="ontabtap">
<text class="name">{{item}}</text> <text class="name">{{item}}</text>
</view> </view>
</block> </block>
@ -18,29 +16,49 @@
</view> </view>
</view> </view>
<view class="uni-list" v-if="showList.length>0">
<view class=""
style="font-size: 40rpx; font-weight: bold; align-items: center; display: flex; justify-content: center; margin-bottom: 20rpx; ">
工位关系
</view>
<view class="uni-flex" style="flex-wrap: wrap;justify-content: space-between; margin: 10rpx;" >
<view style="width: 50%; display: flex; flex-direction: row;" v-for="(item, index) in workStationList" :key="item.value">
<view class="uni-flex" style="flex-direction: row; margin: 12rpx;" @click="checkeClick(item.value)">
<view class="">
<checkbox :value="item.value" :checked="item.checked" />
</view>
<view class="">
{{item.name}}
</view>
</view>
</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="uni-flex uni-row" style="flex-wrap: wrap; margin: 5rpx;"> <view class="uni-flex uni-row" style="flex-wrap: wrap; margin: 5rpx;">
<view class="uni-flex" style=" width: 50%; justify-content: center; margin-top: 40rpx; " <view class="uni-flex" style=" width: 50%; justify-content: center; margin-top: 40rpx; "
v-for="(item, index) in showList" :key="index"> v-for="(item, index) in showList" :key="index">
<view class="uni-flex" style="flex-direction: column; margin-left: 10rpx; border-radius: 10rpx; border: 0.5px solid #000;padding: 5rpx;"> <view class="uni-flex"
style="flex-direction: column; margin-left: 10rpx; border-radius: 10rpx; border: 0.5px solid #000;padding: 5rpx;">
<view class="" style=""> <view class="" style="">
<uni-tag :customStyle="customStyle" style="width: 100%;white-space: normal;" :inverted="!item.checked" :circle="false" <uni-tag :customStyle="customStyle" style="width: 100%;white-space: normal;"
:text="item.code+'\n'+item.desc1" type="primary" @click="setContainerModel(item)" /> :inverted="!item.checked" :circle="false" :text="item.code+'\n'+item.desc1"
type="primary" @click="setContainerModel(item)" />
</view> </view>
<view style="display: flex; flex-direction: row; align-items: center; width: 100%;"> <view style="display: flex; flex-direction: row; align-items: center; width: 100%;">
<view class="" style="font-size: 32rpx;"> <view class="" style="font-size: 32rpx;">
收容数 收容数
</view> </view>
<com-number-box :ref="'comNumberBox_'+index" v-model="item.stdPackQty" <com-number-box :ref="'comNumberBox_'+index" v-model="item.stdPackQty" :max="999999"
:max="999999" :min="0" style='' :min="0" style='' @change="qtyChanged($event,item,index)">
@change="qtyChanged($event,item,index)"> </com-number-box>
</com-number-box>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
@ -67,7 +85,8 @@
getItemCategoryList, getItemCategoryList,
injectionIssuePlanRequestItemCategoryName, injectionIssuePlanRequestItemCategoryName,
injectionIssuePlanRequestItemCategory, injectionIssuePlanRequestItemCategory,
locations locations,
getWorkStationByLocation,
} from '@/api/index.js'; } from '@/api/index.js';
import { import {
@ -102,10 +121,11 @@
loadingType: "nomore", loadingType: "nomore",
showList: [], showList: [],
toLocationInfo: null, toLocationInfo: null,
tabIndex:0, tabIndex: 0,
customStyle:"white-space: normal;word-break:break-all" customStyle: "white-space: normal;word-break:break-all",
workStationList: [],
}; };
}, },
filters: { filters: {
@ -137,45 +157,62 @@
} }
}, },
methods: { methods: {
getCategoryListName(){ checkeClick(value) {
for (let i = 0; i < this.workStationList.length; i++) {
this.workStationList[i].checked = false
}
for (let i = 0; i < this.workStationList.length; i++) {
if (this.workStationList[i].value === value) {
if (this.workStationList[i].checked == true) {
this.workStationList[i].checked = false
} else {
this.workStationList[i].checked = true
}
}
}
this.$forceUpdate()
},
getCategoryListName() {
uni.showLoading({ uni.showLoading({
title: "加载中", title: "加载中",
mask: true mask: true
}) })
injectionIssuePlanRequestItemCategoryName().then(res => { injectionIssuePlanRequestItemCategoryName().then(res => {
uni.hideLoading() uni.hideLoading()
if(res.length==0){ if (res.length == 0) {
this.showMessage("获取分类信息失败,请在字典中维护") this.showMessage("获取分类信息失败,请在字典中维护")
}else { } else {
this.tabs = res; this.tabs = res;
this.getCategoryList(this.tabs[0]) this.getCategoryList(this.tabs[0])
} }
this.tabIndex=0 this.tabIndex = 0
}).catch(error => { }).catch(error => {
uni.hideLoading() uni.hideLoading()
this.showMessage("获取分类信息失败" + error) this.showMessage("获取分类信息失败" + error)
}) })
}, },
getCategoryList(categoryName){ getCategoryList(categoryName) {
injectionIssuePlanRequestItemCategory(categoryName).then(res => { injectionIssuePlanRequestItemCategory(categoryName).then(res => {
uni.hideLoading() uni.hideLoading()
if(res.length==0){ if (res.length == 0) {
this.showMessage("获取["+categoryName+"]信息失败,请在字典中维护") this.showMessage("获取[" + categoryName + "]信息失败,请在字典中维护")
}else { } else {
this.showList = res; this.showList = res;
this.showList.forEach(item=>{ this.showList.forEach(item => {
item.defaultStdPackQty=item.stdPackQty item.defaultStdPackQty = item.stdPackQty
item.checked =false item.checked = false
}) })
} }
}).catch(error => { }).catch(error => {
uni.hideLoading() uni.hideLoading()
this.showMessage("获取["+categoryName+"]信息失败,"+error) this.showMessage("获取[" + categoryName + "]信息失败," + error)
}) })
}, },
clearDefaultLocation() { clearDefaultLocation() {
this.toLocationInfo = null this.toLocationInfo = null
}, },
@ -188,8 +225,27 @@
locations(locationCode).then(res => { locations(locationCode).then(res => {
uni.hideLoading(); uni.hideLoading();
if (res) { if (res) {
scanSuccessAudio()
this.toLocationInfo = res this.toLocationInfo = res
getWorkStationByLocation(res.code).then(res => {
if (res && res.length > 0) {
this.workStationList = []
res.forEach(item => {
this.workStationList.push({
value: item.code,
name: item.name,
checked: false
})
})
scanSuccessAudio()
} else {
scanFailedAudio()
this.showMessage("获取工位失败")
}
}).catch(error => {
scanFailedAudio()
this.showMessage("获取工位失败")
})
} else { } else {
scanFailedAudio() scanFailedAudio()
this.showMessage('目标库位【' + locationCode + '】不存在'); this.showMessage('目标库位【' + locationCode + '】不存在');
@ -204,12 +260,12 @@
}) })
}, },
setContainerModel(item) { setContainerModel(item) {
item.checked=!item.checked item.checked = !item.checked
this.showList.forEach(res => { this.showList.forEach(res => {
if(res.code!=item.code){ if (res.code != item.code) {
res.checked = false res.checked = false
} }
}) })
this.$forceUpdate() this.$forceUpdate()
}, },
@ -222,13 +278,14 @@
this.$refs.comMessage.showCommitSuccess(); this.$refs.comMessage.showCommitSuccess();
}, },
clearData() { clearData() {
this.tabs=[] this.tabs = []
this.current=0 this.current = 0
this.showList= [] this.showList = []
this.toLocationInfo = null, this.toLocationInfo = null,
this.tabIndex = 0 ; this.tabIndex = 0;
this.$refs.comCollapseLocation.clearLocation(); this.$refs.comCollapseLocation.clearLocation();
this.workStationList=[]
}, },
submit(item) { submit(item) {
var checked = this.showList.filter(r => r.checked) var checked = this.showList.filter(r => r.checked)
@ -247,7 +304,9 @@
title: "提交中...", title: "提交中...",
mask: true mask: true
}); });
var workStation = this.workStationList.find(r => r.checked == true)
var params = { var params = {
remark: workStation ? workStation.value : "",
worker: localStorage.userName_CN == "" ? localStorage.userName : localStorage.userName_CN, worker: localStorage.userName_CN == "" ? localStorage.userName : localStorage.userName_CN,
activeDate: getISODateTime(), activeDate: getISODateTime(),
useOnTheWayLocation: false, useOnTheWayLocation: false,
@ -257,7 +316,7 @@
] ]
} }
var item = { var item = {
remark: "", remark: workStation ? workStation.value : "",
itemCode: checked[0].code, itemCode: checked[0].code,
itemName: checked[0].name, itemName: checked[0].name,
itemDesc1: checked[0].desc1, itemDesc1: checked[0].desc1,
@ -292,10 +351,10 @@
uni.hideLoading(); uni.hideLoading();
}); });
}, },
ontabtap(e){ ontabtap(e) {
let index = e.target.dataset.current || e.currentTarget.dataset.current; let index = e.target.dataset.current || e.currentTarget.dataset.current;
if (this.tabIndex == index) { if (this.tabIndex == index) {
return; return;
} }
this.tabIndex = index; this.tabIndex = index;
this.getCategoryList(this.tabs[index]) this.getCategoryList(this.tabs[index])
@ -325,12 +384,12 @@
/* item的外层定义成行内元素才可进行滚动 inline-block / inline-flex 均可 */ /* item的外层定义成行内元素才可进行滚动 inline-block / inline-flex 均可 */
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
background-color: #fff; background-color: #fff;
color: #007AFF; color: #007AFF;
border: 1px solid #007AFF; border: 1px solid #007AFF;
border-radius:8rpx; border-radius: 8rpx;
} }
.item_select { .item_select {
margin: 10rpx; margin: 10rpx;
padding: 15rpx; padding: 15rpx;

52
fe/PDA/pages/request/kittingIssueRequest.vue

@ -18,6 +18,26 @@
</view> </view>
</view> </view>
<view class="uni-list" v-if="itemList.length>0">
<view class=""
style="font-size: 40rpx; font-weight: bold; align-items: center; display: flex; justify-content: center; margin-bottom: 20rpx; ">
工位关系
</view>
<view class="uni-flex" style="flex-wrap: wrap;justify-content: space-between; margin: 10rpx;" >
<view style="width: 50%; display: flex; flex-direction: row;" v-for="(item, index) in workStationList" :key="item.value">
<view class="uni-flex" style="flex-direction: row; margin: 12rpx;" @click="checkeClick(item.value)">
<view class="">
<checkbox :value="item.value" :checked="item.checked" />
</view>
<view class="">
{{item.name}}
</view>
</view>
</view>
</view>
</view>
<scroll-view scroll-y="true" @scroll="scroll" class="scroll-detail"> <scroll-view scroll-y="true" @scroll="scroll" class="scroll-detail">
@ -95,7 +115,8 @@
<script> <script>
import { import {
kittingIssueRequest kittingIssueRequest,
getWorkStationByLocation
} from '@/api/index.js'; } from '@/api/index.js';
import { import {
@ -125,7 +146,8 @@
data() { data() {
return { return {
itemList: [], itemList: [],
dataContent: {} dataContent: {},
workStationList: [],
}; };
}, },
props: { props: {
@ -158,7 +180,26 @@
result.defaultHandleQty = result.qty result.defaultHandleQty = result.qty
this.itemList.push(result) this.itemList.push(result)
this.$forceUpdate() this.$forceUpdate()
scanSuccessAudio() getWorkStationByLocation(result.locationCode).then(res => {
if (res && res.length > 0) {
this.workStationList = []
res.forEach(item => {
this.workStationList.push({
value: item.code,
name: item.name,
checked: false
})
})
scanSuccessAudio()
} else {
scanFailedAudio()
this.showMessage("获取工位失败")
}
}).catch(error => {
scanFailedAudio()
this.showMessage("获取工位失败")
})
}, },
@ -192,9 +233,10 @@
}, },
setParams() { setParams() {
var workStation = this.workStationList.find(r => r.checked == true)
var param = { var param = {
worker: localStorage.userName_CN == "" ? localStorage.userName : localStorage.userName_CN, worker: localStorage.userName_CN == "" ? localStorage.userName : localStorage.userName_CN,
remark: "", remark: workStation ? workStation.value : "",
extraProperties: {}, extraProperties: {},
activeDate: getISODateTime(), activeDate: getISODateTime(),
autoSubmit: true, autoSubmit: true,
@ -209,7 +251,7 @@
this.itemList.forEach(res => { this.itemList.forEach(res => {
var data = { var data = {
remark: "", remark: workStation ? workStation.value : "",
qty: res.qty, qty: res.qty,
itemCode: res.partCode, itemCode: res.partCode,
itemName: res.partName, itemName: res.partName,

Loading…
Cancel
Save