|
@ -24,7 +24,18 @@ |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="split_line"></view> |
|
|
<view class="split_line"></view> |
|
|
|
|
|
<view class="title" style="display: flex; align-items: center; padding: 10rpx"> |
|
|
|
|
|
<text style="flex-shrink: 0; width: 25%">计划日期:</text> |
|
|
|
|
|
<view class="customerBorder" @click="showSelectDate"> |
|
|
|
|
|
{{ planDate }} |
|
|
|
|
|
</view> |
|
|
|
|
|
<u-select v-model="showDateSelect" mode="mutil-column-auto" :list="planDateList" @confirm="confirmSelectDate"></u-select> |
|
|
|
|
|
|
|
|
|
|
|
<view class=""> |
|
|
|
|
|
<image src="/static/icons/down.svg" mode="" style="width: 40rpx; height: 40rpx; margin-left: 20rpx" @click="showSelectDate"> </image> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="split_line"></view> |
|
|
<view class="title" style="display: flex; align-items: center; padding: 10rpx"> |
|
|
<view class="title" style="display: flex; align-items: center; padding: 10rpx"> |
|
|
<text style="flex-shrink: 0; width: 25%">物料代码:</text> |
|
|
<text style="flex-shrink: 0; width: 25%">物料代码:</text> |
|
|
<view class="customerBorder"> |
|
|
<view class="customerBorder"> |
|
@ -36,15 +47,7 @@ |
|
|
<image src="/static/icons/down.svg" mode="" style="width: 40rpx; height: 40rpx; margin-left: 20rpx" @click="showSelectItemCode"> </image> |
|
|
<image src="/static/icons/down.svg" mode="" style="width: 40rpx; height: 40rpx; margin-left: 20rpx" @click="showSelectItemCode"> </image> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="split_line"></view> |
|
|
|
|
|
|
|
|
|
|
|
<view class="title" style="display: flex; align-items: center; padding: 10rpx"> |
|
|
|
|
|
<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> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
<!-- <view class="title " style="display: flex;align-items: center;padding: 10rpx;"> |
|
|
<!-- <view class="title " style="display: flex;align-items: center;padding: 10rpx;"> |
|
|
<text style=" flex-shrink: 0; width: 25%;">计划数量:</text> |
|
|
<text style=" flex-shrink: 0; width: 25%;">计划数量:</text> |
|
|
<view class="customerBorder"> |
|
|
<view class="customerBorder"> |
|
@ -66,6 +69,15 @@ |
|
|
<image src="/static/icons/down.svg" mode="" style="width: 40rpx; height: 40rpx; margin-left: 20rpx" @click="showSelectPackUnit"> </image> |
|
|
<image src="/static/icons/down.svg" mode="" style="width: 40rpx; height: 40rpx; margin-left: 20rpx" @click="showSelectPackUnit"> </image> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
<view class="split_line"></view> |
|
|
|
|
|
|
|
|
|
|
|
<view class="title" style="display: flex; align-items: center; padding: 10rpx"> |
|
|
|
|
|
<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> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
<view class="split_line"></view> |
|
|
<view class="split_line"></view> |
|
|
</view> |
|
|
</view> |
|
@ -85,7 +97,7 @@ |
|
|
import { getIssueJobByProductionline, getPlaneInfoByproductLine, getPackUnitByItemCode, getProductionlineAndWorkStation } from '@/api/request2.js' |
|
|
import { getIssueJobByProductionline, getPlaneInfoByproductLine, getPackUnitByItemCode, getProductionlineAndWorkStation } from '@/api/request2.js' |
|
|
import { getPackUnitName, getUomInfo } from '@/common/directory.js' |
|
|
import { getPackUnitName, getUomInfo } from '@/common/directory.js' |
|
|
|
|
|
|
|
|
import { getCurrDate, getBatch8, dateFormatData } from '@/common/basic.js' |
|
|
import { getCurrDate, getBatch8, dateFormatData, lastThreeDays } from '@/common/basic.js' |
|
|
|
|
|
|
|
|
import { calc } from '@/common/calc.js' |
|
|
import { calc } from '@/common/calc.js' |
|
|
|
|
|
|
|
@ -123,7 +135,10 @@ export default { |
|
|
showPackUnitSelect: false, |
|
|
showPackUnitSelect: false, |
|
|
itemCodeList: [], |
|
|
itemCodeList: [], |
|
|
showItemCodeSelect: false, |
|
|
showItemCodeSelect: false, |
|
|
workStationCode: '' |
|
|
workStationCode: '', |
|
|
|
|
|
planDate: '', |
|
|
|
|
|
showDateSelect: false, |
|
|
|
|
|
planDateList: [] |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
props: { |
|
|
props: { |
|
@ -139,6 +154,7 @@ export default { |
|
|
methods: { |
|
|
methods: { |
|
|
openRequestPopup() { |
|
|
openRequestPopup() { |
|
|
this.initData() |
|
|
this.initData() |
|
|
|
|
|
this.planDate = getCurrDate() |
|
|
this.batch = getBatch8() |
|
|
this.batch = getBatch8() |
|
|
this.$refs.popup.open('bottom') |
|
|
this.$refs.popup.open('bottom') |
|
|
}, |
|
|
}, |
|
@ -162,6 +178,9 @@ export default { |
|
|
this.itemCodeList = [] |
|
|
this.itemCodeList = [] |
|
|
this.showItemCodeSelect = false |
|
|
this.showItemCodeSelect = false |
|
|
this.workStationCode = '' |
|
|
this.workStationCode = '' |
|
|
|
|
|
this.planDate = '' |
|
|
|
|
|
this.showDateSelect = false |
|
|
|
|
|
this.planDateList = [] |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
closeRequestPopup() { |
|
|
closeRequestPopup() { |
|
@ -172,6 +191,11 @@ export default { |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
confirm() { |
|
|
confirm() { |
|
|
|
|
|
if (!this.planDate) { |
|
|
|
|
|
this.showErrorMessage('请先选择计划日期') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if (this.productionLineName == '请选择生产线') { |
|
|
if (this.productionLineName == '请选择生产线') { |
|
|
this.showErrorMessage('请选择生产线') |
|
|
this.showErrorMessage('请选择生产线') |
|
|
return |
|
|
return |
|
@ -228,6 +252,32 @@ export default { |
|
|
this.productionLineName = `${data[0].label}—${data[1].label}` |
|
|
this.productionLineName = `${data[0].label}—${data[1].label}` |
|
|
this.productionLineCode = data[0].value |
|
|
this.productionLineCode = data[0].value |
|
|
this.workStationCode = data[1].value |
|
|
this.workStationCode = data[1].value |
|
|
|
|
|
this.clearItemCode() |
|
|
|
|
|
this.clearPackUnit() |
|
|
|
|
|
}, |
|
|
|
|
|
clearItemCode() { |
|
|
|
|
|
this.planDate = getCurrDate() |
|
|
|
|
|
this.itemCode = '请选择物料信息' |
|
|
|
|
|
this.uom = '' |
|
|
|
|
|
this.planQty = 0 |
|
|
|
|
|
this.goodQty = 0 |
|
|
|
|
|
this.planNumber = '' |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
confirmSelectDate(data) { |
|
|
|
|
|
this.planDate = data[0].label |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
showSelectDate() { |
|
|
|
|
|
this.showDateSelect = true |
|
|
|
|
|
const list = lastThreeDays(3) |
|
|
|
|
|
this.planDateList = [] |
|
|
|
|
|
list.forEach((res) => { |
|
|
|
|
|
this.planDateList.push({ |
|
|
|
|
|
label: res, |
|
|
|
|
|
value: '' |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
showSelectLine() { |
|
|
showSelectLine() { |
|
@ -255,16 +305,19 @@ export default { |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
showSelectItemCode() { |
|
|
showSelectItemCode() { |
|
|
|
|
|
if (!this.planDate) { |
|
|
|
|
|
this.showErrorMessage('请先选择计划日期') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
if (!this.productionLineCode) { |
|
|
if (!this.productionLineCode) { |
|
|
this.showErrorMessage('请先选择生产线') |
|
|
this.showErrorMessage('请先选择生产线') |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
console.log('当天', getCurrDate()) |
|
|
|
|
|
uni.showLoading({ |
|
|
uni.showLoading({ |
|
|
title: '加载中', |
|
|
title: '加载中', |
|
|
mask: true |
|
|
mask: true |
|
|
}) |
|
|
}) |
|
|
getPlaneInfoByproductLine(this.productionLineCode, getCurrDate()) |
|
|
getPlaneInfoByproductLine(this.productionLineCode, this.planDate) |
|
|
.then((res) => { |
|
|
.then((res) => { |
|
|
uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
if (res.data && res.data.length > 0) { |
|
|
if (res.data && res.data.length > 0) { |
|
@ -290,6 +343,17 @@ export default { |
|
|
this.planQty = productionPlan.planQty |
|
|
this.planQty = productionPlan.planQty |
|
|
this.goodQty = productionPlan.goodQty |
|
|
this.goodQty = productionPlan.goodQty |
|
|
this.planNumber = productionPlan.number |
|
|
this.planNumber = productionPlan.number |
|
|
|
|
|
|
|
|
|
|
|
// 清除其他数据 |
|
|
|
|
|
this.clearPackUnit() |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
clearPackUnit() { |
|
|
|
|
|
this.packUnitName = '请选择包装规格' |
|
|
|
|
|
this.packUnit = '' |
|
|
|
|
|
const pack = this.packUnitList.filter((r) => r.packUnit == this.packUnit) |
|
|
|
|
|
this.packQtyHint = '' |
|
|
|
|
|
this.packQty = 0 |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
showSelectPackUnit() { |
|
|
showSelectPackUnit() { |
|
|