|
|
@ -6,9 +6,7 @@ |
|
|
|
<view class="" style="margin-bottom: 8rpx; margin-top: 8rpx; background-color: #fff"> |
|
|
|
<scroll-view scroll-x="true" class="scrollview-box"> |
|
|
|
<block v-for="(item, index) in tabs" :key="index"> |
|
|
|
<view |
|
|
|
:class="tabIndex==index ? 'item_select' : 'item'" |
|
|
|
:data-current="index" @click="ontabtap"> |
|
|
|
<view :class="tabIndex==index ? 'item_select' : 'item'" :data-current="index" @click="ontabtap"> |
|
|
|
<text class="name">{{item}}</text> |
|
|
|
</view> |
|
|
|
</block> |
|
|
@ -18,25 +16,45 @@ |
|
|
|
</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"> |
|
|
|
<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" style=" width: 50%; justify-content: center; margin-top: 40rpx; " |
|
|
|
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=""> |
|
|
|
<uni-tag :customStyle="customStyle" style="width: 100%;white-space: normal;" :inverted="!item.checked" :circle="false" |
|
|
|
:text="item.code+'\n'+item.desc1" type="primary" @click="setContainerModel(item)" /> |
|
|
|
<uni-tag :customStyle="customStyle" style="width: 100%;white-space: normal;" |
|
|
|
:inverted="!item.checked" :circle="false" :text="item.code+'\n'+item.desc1" |
|
|
|
type="primary" @click="setContainerModel(item)" /> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view style="display: flex; flex-direction: row; align-items: center; width: 100%;"> |
|
|
|
<view class="" style="font-size: 32rpx;"> |
|
|
|
收容数 |
|
|
|
</view> |
|
|
|
<com-number-box :ref="'comNumberBox_'+index" v-model="item.stdPackQty" |
|
|
|
:max="999999" :min="0" style='' |
|
|
|
@change="qtyChanged($event,item,index)"> |
|
|
|
<com-number-box :ref="'comNumberBox_'+index" v-model="item.stdPackQty" :max="999999" |
|
|
|
:min="0" style='' @change="qtyChanged($event,item,index)"> |
|
|
|
</com-number-box> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -67,7 +85,8 @@ |
|
|
|
getItemCategoryList, |
|
|
|
injectionIssuePlanRequestItemCategoryName, |
|
|
|
injectionIssuePlanRequestItemCategory, |
|
|
|
locations |
|
|
|
locations, |
|
|
|
getWorkStationByLocation, |
|
|
|
} from '@/api/index.js'; |
|
|
|
|
|
|
|
import { |
|
|
@ -103,7 +122,8 @@ |
|
|
|
showList: [], |
|
|
|
toLocationInfo: null, |
|
|
|
tabIndex: 0, |
|
|
|
customStyle:"white-space: normal;word-break:break-all" |
|
|
|
customStyle: "white-space: normal;word-break:break-all", |
|
|
|
workStationList: [], |
|
|
|
|
|
|
|
|
|
|
|
}; |
|
|
@ -137,6 +157,23 @@ |
|
|
|
} |
|
|
|
}, |
|
|
|
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() |
|
|
|
}, |
|
|
|
getCategoryListName() { |
|
|
|
uni.showLoading({ |
|
|
|
title: "加载中", |
|
|
@ -188,8 +225,27 @@ |
|
|
|
locations(locationCode).then(res => { |
|
|
|
uni.hideLoading(); |
|
|
|
if (res) { |
|
|
|
scanSuccessAudio() |
|
|
|
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 { |
|
|
|
scanFailedAudio() |
|
|
|
this.showMessage('目标库位【' + locationCode + '】不存在'); |
|
|
@ -228,6 +284,7 @@ |
|
|
|
this.toLocationInfo = null, |
|
|
|
this.tabIndex = 0; |
|
|
|
this.$refs.comCollapseLocation.clearLocation(); |
|
|
|
this.workStationList=[] |
|
|
|
|
|
|
|
}, |
|
|
|
submit(item) { |
|
|
@ -247,7 +304,9 @@ |
|
|
|
title: "提交中...", |
|
|
|
mask: true |
|
|
|
}); |
|
|
|
var workStation = this.workStationList.find(r => r.checked == true) |
|
|
|
var params = { |
|
|
|
remark: workStation ? workStation.value : "", |
|
|
|
worker: localStorage.userName_CN == "" ? localStorage.userName : localStorage.userName_CN, |
|
|
|
activeDate: getISODateTime(), |
|
|
|
useOnTheWayLocation: false, |
|
|
@ -257,7 +316,7 @@ |
|
|
|
] |
|
|
|
} |
|
|
|
var item = { |
|
|
|
remark: "", |
|
|
|
remark: workStation ? workStation.value : "", |
|
|
|
itemCode: checked[0].code, |
|
|
|
itemName: checked[0].name, |
|
|
|
itemDesc1: checked[0].desc1, |
|
|
|