|
|
@ -13,14 +13,13 @@ |
|
|
|
<view class='split_line'></view> |
|
|
|
<view class="uni-flex uni-column" style="background-color: white; "> |
|
|
|
<view class="uni-flex uni-column"> |
|
|
|
|
|
|
|
<view class="title " style="display: flex; align-items: center;padding: 10rpx;"> |
|
|
|
<text style=" flex-shrink: 0;width: 25%;">生产线:</text> |
|
|
|
<view class="customerBorder" @click="showSelectLine"> |
|
|
|
{{productionLineName}} |
|
|
|
</view> |
|
|
|
<u-select v-model="showProductLineSelect" mode="mutil-column-auto" title="请选择生产线和工位" |
|
|
|
:list="productLineList" @confirm="confirmSelectLine"></u-select> |
|
|
|
<u-select v-model="showProductLineSelect" mode="mutil-column-auto" |
|
|
|
:list="productLineList" @confirm="confirmSelectLine" title="生产线-工位"></u-select> |
|
|
|
|
|
|
|
<view class=""> |
|
|
|
<image src="/static/icons/down.svg" mode="" |
|
|
@ -49,8 +48,11 @@ |
|
|
|
<view class="customerBorder"> |
|
|
|
{{itemCode}} |
|
|
|
</view> |
|
|
|
<u-select v-model="showItemCodeSelect" mode="single-column" :list="itemCodeList" |
|
|
|
@confirm="confirmSelectItem"></u-select> |
|
|
|
<view v-if="bomVersion" class=""> |
|
|
|
Bom版本{{bomVersion}} |
|
|
|
</view> |
|
|
|
<u-select v-model="showItemCodeSelect" mode="mutil-column-auto" :list="itemCodeList" |
|
|
|
@confirm="confirmSelectItem" title="物料代码-Bom版本"></u-select> |
|
|
|
<view class=""> |
|
|
|
<image src="/static/icons/down.svg" mode="" |
|
|
|
style=" width: 40rpx;height: 40rpx;margin-left: 20rpx;" |
|
|
@ -113,7 +115,7 @@ |
|
|
|
getPlaneInfoByproductLine, |
|
|
|
getPackUnitByItemCode, |
|
|
|
getProductionlineAndWorkStation, |
|
|
|
getProductionlineItem |
|
|
|
getBomVersionByProductionline |
|
|
|
} from '@/api/request2.js'; |
|
|
|
import { |
|
|
|
getPackUnitName, |
|
|
@ -145,7 +147,8 @@ |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
itemCode: '请选择物料信息', |
|
|
|
itemCode: '', |
|
|
|
itemName: '请选择物料信息', |
|
|
|
uom: "", |
|
|
|
qty: null, |
|
|
|
planQty: 0, |
|
|
@ -170,7 +173,10 @@ |
|
|
|
showDateSelect: false, |
|
|
|
planDateList: [], |
|
|
|
fgLocationCode: "", |
|
|
|
rawLocationCode: "" |
|
|
|
rawLocationCode: "", |
|
|
|
workshop: "", |
|
|
|
bomVersion: "", |
|
|
|
uom:"" |
|
|
|
} |
|
|
|
}, |
|
|
|
props: { |
|
|
@ -217,6 +223,7 @@ |
|
|
|
this.planDateList = [] |
|
|
|
this.fgLocationCode = "" |
|
|
|
this.rawLocationCode = "" |
|
|
|
this.workshop="" |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
@ -264,7 +271,7 @@ |
|
|
|
callback() { |
|
|
|
let item = { |
|
|
|
productionLineName: "", |
|
|
|
productionLineCode: "", //生产线 |
|
|
|
productionLineCode: this.productLineCode, //生产线 |
|
|
|
itemCode: this.itemCode, |
|
|
|
itemName: this.itemName, |
|
|
|
uom: this.getUomInfo(this.uom), |
|
|
@ -278,7 +285,8 @@ |
|
|
|
planNumber: "", |
|
|
|
workStationCode: this.workStationCode, |
|
|
|
fgLocationCode: this.fgLocationCode, |
|
|
|
rawLocationCode: this.rawLocationCode |
|
|
|
rawLocationCode: this.rawLocationCode, |
|
|
|
workshop:this.workshop |
|
|
|
}; |
|
|
|
this.closeRequestPopup(); |
|
|
|
this.$emit("confirm", item); |
|
|
@ -300,6 +308,8 @@ |
|
|
|
var parent = this.productLineList.filter(res => res.value == this.productionLineCode) |
|
|
|
var fgLocation = parent[0].children.filter(children => children.value == this.workStationCode) |
|
|
|
this.fgLocationCode = fgLocation[0].fgLocationCode; |
|
|
|
this.workshop = parent[0].workshop; |
|
|
|
|
|
|
|
this.clearItemCode() |
|
|
|
this.clearPackUnit() |
|
|
|
|
|
|
@ -363,20 +373,10 @@ |
|
|
|
title: "加载中", |
|
|
|
mask: true |
|
|
|
}) |
|
|
|
let param = { |
|
|
|
pageSize: 20, |
|
|
|
pageNo: 1, |
|
|
|
productionLineCode: this.productionLineCode |
|
|
|
}; |
|
|
|
|
|
|
|
getProductionlineItem(param).then(res => { |
|
|
|
getBomVersionByProductionline(this.productionLineCode).then(res => { |
|
|
|
uni.hideLoading() |
|
|
|
if (res.data.list && res.data.list.length > 0) { |
|
|
|
res.data.list.forEach(item => { |
|
|
|
item.label = item.itemCode |
|
|
|
item.value = item |
|
|
|
}) |
|
|
|
this.itemCodeList = res.data.list |
|
|
|
if (res.data && res.data.length > 0) { |
|
|
|
this.itemCodeList = res.data |
|
|
|
this.showItemCodeSelect = true |
|
|
|
} else { |
|
|
|
this.showErrorMessage('未查找到物料信息'); |
|
|
@ -387,9 +387,10 @@ |
|
|
|
}) |
|
|
|
}, |
|
|
|
confirmSelectItem(data) { |
|
|
|
let itemInfo = data[0].value; |
|
|
|
this.itemCode = itemInfo.itemCode; |
|
|
|
this.uom = itemInfo.uom |
|
|
|
this.itemCode = data[0].label; |
|
|
|
this.bomVersion = data[1].value; |
|
|
|
this.uom=data[0].uom; |
|
|
|
// this.uom = itemInfo.uom |
|
|
|
|
|
|
|
//清除其他数据 |
|
|
|
this.clearPackUnit(); |
|
|
@ -470,11 +471,6 @@ |
|
|
|
return item.label |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|