|
@ -41,8 +41,15 @@ |
|
|
<view class="customerBorder"> |
|
|
<view class="customerBorder"> |
|
|
{{ itemCode }} |
|
|
{{ itemCode }} |
|
|
</view> |
|
|
</view> |
|
|
<view v-if="planQty > 0">{{ planQty }}({{ getUomInfo(uom) }})</view> |
|
|
|
|
|
<u-select v-model="showItemCodeSelect" mode="single-column" :list="itemCodeList" @confirm="confirmSelectItem"></u-select> |
|
|
<u-select v-model="showItemCodeSelect" mode="single-column" :list="itemCodeList" @confirm="confirmSelectItem"></u-select> |
|
|
|
|
|
<view class=""> |
|
|
|
|
|
<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=""> |
|
|
<view class=""> |
|
|
<image src="" mode="" style="width: 40rpx; height: 40rpx; margin-left: 20rpx"> </image> |
|
|
<image src="" mode="" style="width: 40rpx; height: 40rpx; margin-left: 20rpx"> </image> |
|
|
</view> |
|
|
</view> |
|
@ -65,11 +72,9 @@ |
|
|
<text style="flex-shrink: 0; width: 25%">批次:</text> |
|
|
<text style="flex-shrink: 0; width: 25%">批次:</text> |
|
|
<uni-easyinput v-model="batch"></uni-easyinput> |
|
|
<uni-easyinput v-model="batch"></uni-easyinput> |
|
|
<view class=""> |
|
|
<view class=""> |
|
|
<image src="" mode="" style="width: 40rpx; height: 40rpx; margin-left: 20rpx" @click="showSelectLine"> </image> |
|
|
<image src="" mode="" style="width: 40rpx; height: 40rpx; margin-left: 20rpx"> </image> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<view class="split_line"></view> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
@ -84,7 +89,7 @@ |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import { getIssueJobByProductionline, getPlaneInfoByproductLine, getPackUnitByItemCode, getProductionlineAndWorkStation } from '@/api/request2.js' |
|
|
import { getIssueJobByProductionline, getPlaneInfoByproductLine, getPackUnitByItemCode, getProductionlineAndWorkStation, getProductionlineItem } from '@/api/request2.js' |
|
|
import { getPackUnitName, getUomInfo } from '@/common/directory.js' |
|
|
import { getPackUnitName, getUomInfo } from '@/common/directory.js' |
|
|
|
|
|
|
|
|
import { getCurrDate, getBatch8, dateFormatData, lastThreeDays } from '@/common/basic.js' |
|
|
import { getCurrDate, getBatch8, dateFormatData, lastThreeDays } from '@/common/basic.js' |
|
@ -205,6 +210,11 @@ export default { |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (this.planQty <= 0) { |
|
|
|
|
|
this.showErrorMessage('请输入完工数量') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if (this.packUnitName == '请选择包装规格') { |
|
|
if (this.packUnitName == '请选择包装规格') { |
|
|
this.showErrorMessage('请选择包装规格') |
|
|
this.showErrorMessage('请选择包装规格') |
|
|
return |
|
|
return |
|
@ -215,9 +225,10 @@ export default { |
|
|
|
|
|
|
|
|
callback() { |
|
|
callback() { |
|
|
const item = { |
|
|
const item = { |
|
|
productionLineName: this.productionLineName, |
|
|
productionLineName: '', |
|
|
productionLineCode: this.productionLineCode, // 生产线 |
|
|
productionLineCode: '', // 生产线 |
|
|
itemCode: this.itemCode, |
|
|
itemCode: this.itemCode, |
|
|
|
|
|
itemName: this.itemName, |
|
|
uom: this.getUomInfo(this.uom), |
|
|
uom: this.getUomInfo(this.uom), |
|
|
batch: this.batch, |
|
|
batch: this.batch, |
|
|
packUnitName: this.packUnitName, |
|
|
packUnitName: this.packUnitName, |
|
@ -226,7 +237,7 @@ export default { |
|
|
packQty: this.packQty, |
|
|
packQty: this.packQty, |
|
|
planQty: this.planQty, |
|
|
planQty: this.planQty, |
|
|
goodQty: this.goodQty, |
|
|
goodQty: this.goodQty, |
|
|
planNumber: this.planNumber, |
|
|
planNumber: '', |
|
|
workStationCode: this.workStationCode, |
|
|
workStationCode: this.workStationCode, |
|
|
fgLocationCode: this.fgLocationCode, |
|
|
fgLocationCode: this.fgLocationCode, |
|
|
rawLocationCode: this.rawLocationCode |
|
|
rawLocationCode: this.rawLocationCode |
|
@ -308,23 +319,25 @@ export default { |
|
|
this.showErrorMessage('请先选择计划日期') |
|
|
this.showErrorMessage('请先选择计划日期') |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
if (!this.productionLineCode) { |
|
|
|
|
|
this.showErrorMessage('请先选择生产线') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
uni.showLoading({ |
|
|
uni.showLoading({ |
|
|
title: '加载中', |
|
|
title: '加载中', |
|
|
mask: true |
|
|
mask: true |
|
|
}) |
|
|
}) |
|
|
getPlaneInfoByproductLine(this.productionLineCode, this.planDate) |
|
|
const param = { |
|
|
|
|
|
pageSize: 20, |
|
|
|
|
|
pageNo: 1, |
|
|
|
|
|
productionLineCode: this.productionLineCode |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
getProductionlineItem(param) |
|
|
.then((res) => { |
|
|
.then((res) => { |
|
|
uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
if (res.data && res.data.length > 0) { |
|
|
if (res.data.list && res.data.list.length > 0) { |
|
|
res.data.forEach((item) => { |
|
|
res.data.list.forEach((item) => { |
|
|
item.label = `${item.itemCode}(${item.planQty}${this.getUomInfo(item.uom)})` |
|
|
item.label = item.itemCode |
|
|
item.value = item |
|
|
item.value = item |
|
|
}) |
|
|
}) |
|
|
this.itemCodeList = res.data |
|
|
this.itemCodeList = res.data.list |
|
|
this.showItemCodeSelect = true |
|
|
this.showItemCodeSelect = true |
|
|
} else { |
|
|
} else { |
|
|
this.showErrorMessage('未查找到物料信息') |
|
|
this.showErrorMessage('未查找到物料信息') |
|
@ -336,12 +349,9 @@ export default { |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
confirmSelectItem(data) { |
|
|
confirmSelectItem(data) { |
|
|
const productionPlan = data[0].value |
|
|
const itemInfo = data[0].value |
|
|
this.itemCode = productionPlan.itemCode |
|
|
this.itemCode = itemInfo.itemCode |
|
|
this.uom = productionPlan.uom |
|
|
this.uom = itemInfo.uom |
|
|
this.planQty = productionPlan.planQty |
|
|
|
|
|
this.goodQty = productionPlan.goodQty |
|
|
|
|
|
this.planNumber = productionPlan.number |
|
|
|
|
|
|
|
|
|
|
|
// 清除其他数据 |
|
|
// 清除其他数据 |
|
|
this.clearPackUnit() |
|
|
this.clearPackUnit() |
|
|