|
|
@ -34,8 +34,8 @@ |
|
|
|
<view class="customerBorder" @click="showSelectDate"> |
|
|
|
{{planDate}} |
|
|
|
</view> |
|
|
|
<u-select v-model="showDateSelect" mode="mutil-column-auto" |
|
|
|
:list="planDateList" @confirm="confirmSelectDate"></u-select> |
|
|
|
<u-select v-model="showDateSelect" mode="mutil-column-auto" :list="planDateList" |
|
|
|
@confirm="confirmSelectDate"></u-select> |
|
|
|
|
|
|
|
<view class=""> |
|
|
|
<image src="/static/icons/down.svg" mode="" |
|
|
@ -49,14 +49,21 @@ |
|
|
|
<view class="customerBorder"> |
|
|
|
{{itemCode}} |
|
|
|
</view> |
|
|
|
<view v-if="planQty>0">{{planQty}}({{getUomInfo(uom)}})</view> |
|
|
|
<u-select v-model="showItemCodeSelect" mode="single-column" :list="itemCodeList" |
|
|
|
@confirm="confirmSelectItem"></u-select> |
|
|
|
<view class=""> |
|
|
|
|
|
|
|
<image src="" mode="" |
|
|
|
<image src="/static/icons/down.svg" mode="" |
|
|
|
style=" width: 40rpx;height: 40rpx;margin-left: 20rpx;" |
|
|
|
> |
|
|
|
@click="showSelectItemCode"> |
|
|
|
</image> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="title " style="display: flex;align-items: center;padding: 10rpx;"> |
|
|
|
<text style=" flex-shrink: 0; width: 25%;">数量:</text> |
|
|
|
<uni-easyinput v-model="planQty"></uni-easyinput><view v-if="uom">({{getUomInfo(uom)}})</view> |
|
|
|
<view class=""> |
|
|
|
<image src="" mode="" style=" width: 40rpx;height: 40rpx;margin-left: 20rpx;"> |
|
|
|
</image> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -82,13 +89,10 @@ |
|
|
|
<text style=" flex-shrink: 0; width: 25%;">批次:</text> |
|
|
|
<uni-easyinput v-model="batch"></uni-easyinput> |
|
|
|
<view class=""> |
|
|
|
<image src="" mode="" style=" width: 40rpx;height: 40rpx;margin-left: 20rpx;" |
|
|
|
@click="showSelectLine"> |
|
|
|
<image src="" mode="" style=" width: 40rpx;height: 40rpx;margin-left: 20rpx;"> |
|
|
|
</image> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class='split_line'></view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -107,7 +111,8 @@ |
|
|
|
getIssueJobByProductionline, |
|
|
|
getPlaneInfoByproductLine, |
|
|
|
getPackUnitByItemCode, |
|
|
|
getProductionlineAndWorkStation |
|
|
|
getProductionlineAndWorkStation, |
|
|
|
getProductionlineItem |
|
|
|
} from '@/api/request2.js'; |
|
|
|
import { |
|
|
|
getPackUnitName, |
|
|
@ -242,6 +247,11 @@ |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
if (this.planQty <= 0) { |
|
|
|
this.showErrorMessage("请输入完工数量") |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
if (this.packUnitName == "请选择包装规格") { |
|
|
|
this.showErrorMessage("请选择包装规格") |
|
|
|
return |
|
|
@ -252,9 +262,10 @@ |
|
|
|
|
|
|
|
callback() { |
|
|
|
let item = { |
|
|
|
productionLineName: this.productionLineName, |
|
|
|
productionLineCode: this.productionLineCode, //生产线 |
|
|
|
productionLineName: "", |
|
|
|
productionLineCode: "", //生产线 |
|
|
|
itemCode: this.itemCode, |
|
|
|
itemName:this.itemName, |
|
|
|
uom: this.getUomInfo(this.uom), |
|
|
|
batch: this.batch, |
|
|
|
packUnitName: this.packUnitName, |
|
|
@ -263,7 +274,7 @@ |
|
|
|
packQty: this.packQty, |
|
|
|
planQty: this.planQty, |
|
|
|
goodQty: this.goodQty, |
|
|
|
planNumber: this.planNumber, |
|
|
|
planNumber: "", |
|
|
|
workStationCode: this.workStationCode, |
|
|
|
fgLocationCode: this.fgLocationCode, |
|
|
|
rawLocationCode: this.rawLocationCode |
|
|
@ -347,39 +358,37 @@ |
|
|
|
this.showErrorMessage('请先选择计划日期'); |
|
|
|
return; |
|
|
|
} |
|
|
|
if (!this.productionLineCode) { |
|
|
|
this.showErrorMessage('请先选择生产线'); |
|
|
|
return; |
|
|
|
} |
|
|
|
uni.showLoading({ |
|
|
|
title: "加载中", |
|
|
|
mask: true |
|
|
|
}) |
|
|
|
getPlaneInfoByproductLine(this.productionLineCode, this.planDate).then(res => { |
|
|
|
let param = { |
|
|
|
pageSize: 20, |
|
|
|
pageNo: 1, |
|
|
|
productionLineCode: this.productionLineCode |
|
|
|
}; |
|
|
|
|
|
|
|
getProductionlineItem(param).then(res => { |
|
|
|
uni.hideLoading() |
|
|
|
if (res.data && res.data.length > 0) { |
|
|
|
res.data.forEach(item => { |
|
|
|
item.label = item.itemCode + "(" + item.planQty + this.getUomInfo(item.uom) + ")" |
|
|
|
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 |
|
|
|
this.itemCodeList = res.data.list |
|
|
|
this.showItemCodeSelect = true |
|
|
|
} else { |
|
|
|
this.showErrorMessage('未查找到物料信息'); |
|
|
|
} |
|
|
|
|
|
|
|
}).catch(error => { |
|
|
|
uni.hideLoading() |
|
|
|
this.showErrorMessage(error); |
|
|
|
}) |
|
|
|
}, |
|
|
|
confirmSelectItem(data) { |
|
|
|
let productionPlan = data[0].value; |
|
|
|
this.itemCode = productionPlan.itemCode; |
|
|
|
this.uom = productionPlan.uom |
|
|
|
this.planQty = productionPlan.planQty; |
|
|
|
this.goodQty = productionPlan.goodQty |
|
|
|
this.planNumber = productionPlan.number |
|
|
|
let itemInfo = data[0].value; |
|
|
|
this.itemCode = itemInfo.itemCode; |
|
|
|
this.uom = itemInfo.uom |
|
|
|
|
|
|
|
//清除其他数据 |
|
|
|
this.clearPackUnit(); |
|
|
|