|
@ -34,8 +34,8 @@ |
|
|
<view class="customerBorder" @click="showSelectDate"> |
|
|
<view class="customerBorder" @click="showSelectDate"> |
|
|
{{planDate}} |
|
|
{{planDate}} |
|
|
</view> |
|
|
</view> |
|
|
<u-select v-model="showDateSelect" mode="mutil-column-auto" |
|
|
<u-select v-model="showDateSelect" mode="mutil-column-auto" :list="planDateList" |
|
|
:list="planDateList" @confirm="confirmSelectDate"></u-select> |
|
|
@confirm="confirmSelectDate"></u-select> |
|
|
|
|
|
|
|
|
<view class=""> |
|
|
<view class=""> |
|
|
<image src="/static/icons/down.svg" mode="" |
|
|
<image src="/static/icons/down.svg" mode="" |
|
@ -54,8 +54,7 @@ |
|
|
@confirm="confirmSelectItem"></u-select> |
|
|
@confirm="confirmSelectItem"></u-select> |
|
|
<view class=""> |
|
|
<view class=""> |
|
|
<image src="/static/icons/down.svg" mode="" |
|
|
<image src="/static/icons/down.svg" mode="" |
|
|
style=" width: 40rpx;height: 40rpx;margin-left: 20rpx;" |
|
|
style=" width: 40rpx;height: 40rpx;margin-left: 20rpx;" @click="showItemList"> |
|
|
@click="showSelectItemCode"> |
|
|
|
|
|
</image> |
|
|
</image> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
@ -96,8 +95,6 @@ |
|
|
</image> |
|
|
</image> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<view class='split_line'></view> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
@ -187,13 +184,14 @@ |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
|
|
|
openRequestPopup() { |
|
|
openRequestPopup() { |
|
|
this.initData(); |
|
|
this.initData(); |
|
|
this.planDate = getCurrDate() |
|
|
this.planDate = getCurrDate() |
|
|
this.batch = getBatch8() |
|
|
// this.batch = getBatch8() |
|
|
|
|
|
this.batch = this.planDate.replace('-', ''); |
|
|
this.$refs.popup.open('bottom') |
|
|
this.$refs.popup.open('bottom') |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
initData() { |
|
|
initData() { |
|
|
this.itemCode = '请选择物料信息'; |
|
|
this.itemCode = '请选择物料信息'; |
|
|
this.uom = "" |
|
|
this.uom = "" |
|
@ -226,6 +224,7 @@ |
|
|
closeRequestPopup() { |
|
|
closeRequestPopup() { |
|
|
this.$refs.popup.close() |
|
|
this.$refs.popup.close() |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
itemCodeLoseFocus() { |
|
|
itemCodeLoseFocus() { |
|
|
this.itemCodeFocus = false; |
|
|
this.itemCodeFocus = false; |
|
|
}, |
|
|
}, |
|
@ -297,10 +296,13 @@ |
|
|
var parent = this.productLineList.filter(res => res.value == this.productionLineCode) |
|
|
var parent = this.productLineList.filter(res => res.value == this.productionLineCode) |
|
|
var fgLocation = parent[0].children.filter(children => children.value == this.workStationCode) |
|
|
var fgLocation = parent[0].children.filter(children => children.value == this.workStationCode) |
|
|
this.fgLocationCode = fgLocation[0].fgLocationCode; |
|
|
this.fgLocationCode = fgLocation[0].fgLocationCode; |
|
|
this.clearItemCode() |
|
|
// this.clearItemCode() |
|
|
this.clearPackUnit() |
|
|
// this.clearPackUnit() |
|
|
|
|
|
this.showProductLineSelect = false; |
|
|
|
|
|
this.showSelectItemCode(); |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
clearItemCode() { |
|
|
clearItemCode() { |
|
|
this.planDate = getCurrDate() |
|
|
this.planDate = getCurrDate() |
|
|
this.itemCode = "请选择物料信息" |
|
|
this.itemCode = "请选择物料信息" |
|
@ -308,10 +310,15 @@ |
|
|
this.planQty = 0; |
|
|
this.planQty = 0; |
|
|
this.goodQty = 0 |
|
|
this.goodQty = 0 |
|
|
this.planNumber = "" |
|
|
this.planNumber = "" |
|
|
|
|
|
this.packUnit = ""; |
|
|
|
|
|
this.packQty = 0; |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
confirmSelectDate(data) { |
|
|
confirmSelectDate(data) { |
|
|
this.planDate=data[0].label |
|
|
this.planDate = data[0].label; |
|
|
|
|
|
this.batch = this.planDate.replace('-', ''); |
|
|
|
|
|
this.afterSelectPlanData(); |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
showSelectDate() { |
|
|
showSelectDate() { |
|
@ -348,9 +355,28 @@ |
|
|
} else { |
|
|
} else { |
|
|
this.showProductLineSelect = true |
|
|
this.showProductLineSelect = true |
|
|
} |
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
afterSelectPlanData() { |
|
|
|
|
|
this.itemCode = '请选择物料信息'; |
|
|
|
|
|
this.packUnit = ""; |
|
|
|
|
|
this.packQty = 0; |
|
|
|
|
|
this.planQty = 0; |
|
|
|
|
|
this.itemCode = '请选择物料信息'; |
|
|
|
|
|
this.uom = "" |
|
|
|
|
|
this.packUnitName = "请选择包装规格" |
|
|
|
|
|
this.packUnit = "" |
|
|
|
|
|
this.packQtyHint = "" |
|
|
|
|
|
|
|
|
|
|
|
// this.packUnitList = [] |
|
|
|
|
|
this.itemCodeList = []; |
|
|
|
|
|
this.showSelectItemCode(); |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
showItemList() { |
|
|
|
|
|
this.showItemCodeSelect = true; |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
showSelectItemCode() { |
|
|
showSelectItemCode() { |
|
|
if (!this.planDate) { |
|
|
if (!this.planDate) { |
|
|
this.showErrorMessage('请先选择计划日期'); |
|
|
this.showErrorMessage('请先选择计划日期'); |
|
@ -368,13 +394,21 @@ |
|
|
uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
if (res.data && res.data.length > 0) { |
|
|
if (res.data && res.data.length > 0) { |
|
|
res.data.forEach(item => { |
|
|
res.data.forEach(item => { |
|
|
item.label = item.itemCode + "(" + item.planQty + this.getUomInfo(item.uom) + ")" |
|
|
item.label = item.itemCode + "(" + item.planQty + this.getUomInfo(item.uom) + |
|
|
|
|
|
")" |
|
|
item.value = item |
|
|
item.value = item |
|
|
}) |
|
|
}) |
|
|
this.itemCodeList = res.data |
|
|
this.itemCodeList = res.data |
|
|
this.showItemCodeSelect = true |
|
|
this.showItemCodeSelect = true |
|
|
|
|
|
|
|
|
|
|
|
if (this.itemCodeList.length == 1) { |
|
|
|
|
|
this.itemCode = this.itemCodeList[0].itemCode; |
|
|
|
|
|
} else { |
|
|
|
|
|
this.showItemCodeSelect = true; |
|
|
|
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
this.showErrorMessage('未查找到物料信息'); |
|
|
this.showErrorMessage('未查找到该生产线在【' + this.planDate + |
|
|
|
|
|
'】日期的生产计划'); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
}).catch(error => { |
|
|
}).catch(error => { |
|
@ -382,6 +416,7 @@ |
|
|
this.showErrorMessage(error); |
|
|
this.showErrorMessage(error); |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
confirmSelectItem(data) { |
|
|
confirmSelectItem(data) { |
|
|
let productionPlan = data[0].value; |
|
|
let productionPlan = data[0].value; |
|
|
this.itemCode = productionPlan.itemCode; |
|
|
this.itemCode = productionPlan.itemCode; |
|
@ -461,6 +496,7 @@ |
|
|
.getUomInfo(pack[0].uom) + ")"; |
|
|
.getUomInfo(pack[0].uom) + ")"; |
|
|
this.packQty = pack[0].packQty |
|
|
this.packQty = pack[0].packQty |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
getUomInfo(uom) { |
|
|
getUomInfo(uom) { |
|
|
let item = getUomInfo(uom); |
|
|
let item = getUomInfo(uom); |
|
|
if (item == '') { |
|
|
if (item == '') { |
|
@ -469,11 +505,6 @@ |
|
|
return item.label |
|
|
return item.label |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|