MES:
四楼装配工位申请领料根据采购订单绑定销售订单逻辑修改
master
xins 6 months ago
parent a7ea6ce762
commit 39e3c34ecd

@ -252,6 +252,14 @@
prop="materialName" prop="materialName"
> >
</el-table-column> </el-table-column>
<el-table-column
label="安全库存"
prop="safeFlag"
>
<template slot-scope="scope">
<dict-tag :options="dict.type.mes_safe_flag" :value="scope.row.safeFlag"/>
</template>
</el-table-column>
<el-table-column <el-table-column
label="可用库存数量" label="可用库存数量"
prop="availableAmount" prop="availableAmount"
@ -405,7 +413,7 @@ import {
const vw = (document.documentElement.clientWidth || document.body.clientWidth) / 100 const vw = (document.documentElement.clientWidth || document.body.clientWidth) / 100
export default { export default {
name: 'Board1', name: 'Board1',
dicts: ['mes_plan_detail_status','wms_raw_return_task_type'], dicts: ['mes_plan_detail_status','wms_raw_return_task_type','mes_safe_flag'],
components: { components: {
Chart, Chart,
PrintPage PrintPage
@ -477,6 +485,7 @@ export default {
this.tableData = e.rows this.tableData = e.rows
this.totalNum1 = Math.ceil(e.total / 5) this.totalNum1 = Math.ceil(e.total / 5)
this.materialBomId = e.rows?.[0]?.materialBomId this.materialBomId = e.rows?.[0]?.materialBomId
this.saleOrderId = e.rows?.[0]?.saleOrderId
getProductPlanDetails({pageNum: 1, pageSize: 5, planId: e.rows?.[0]?.planId}).then(res => { getProductPlanDetails({pageNum: 1, pageSize: 5, planId: e.rows?.[0]?.planId}).then(res => {
this.tableData1 = res.rows this.tableData1 = res.rows
this.totalNum2 = Math.ceil(res.total / 5) this.totalNum2 = Math.ceil(res.total / 5)
@ -741,6 +750,7 @@ export default {
getDetail(e) { getDetail(e) {
this.planId = e.row.planId this.planId = e.row.planId
this.materialBomId = e.row.materialBomId this.materialBomId = e.row.materialBomId
this.saleOrderId = e.row.saleOrderId
this.nowNum2 = 1 this.nowNum2 = 1
getProductPlanDetails({pageNum: 1, pageSize: 5, planId: e.row.planId}).then(res => { getProductPlanDetails({pageNum: 1, pageSize: 5, planId: e.row.planId}).then(res => {
if (res.rows.length === 0) { if (res.rows.length === 0) {
@ -785,12 +795,13 @@ export default {
planId: val.row.planId, planId: val.row.planId,
planCode: val.row.planCode, planCode: val.row.planCode,
planDetailCode: val.row.planDetailCode, planDetailCode: val.row.planDetailCode,
saleOrderId : this.saleOrderId,
applyReason: '', applyReason: '',
taskType: '1', taskType: '1',
wmsRawOutstockDetailList: [] wmsRawOutstockDetailList: []
} }
// //
getWarehouses({"warehouseFloor": 1}).then(e => { getWarehouses({"warehouseFloor": 4}).then(e => {
this.warehouseList = e.data this.warehouseList = e.data
this.form.warehouseId = e.data[0]?.warehouseId this.form.warehouseId = e.data[0]?.warehouseId
this.searchMaterial(""); this.searchMaterial("");
@ -815,13 +826,16 @@ export default {
searchMaterial(val) { searchMaterial(val) {
getStockTotal({ getStockTotal({
warehouseId: this.form.warehouseId, warehouseId: this.form.warehouseId,
saleOrderId: this.saleOrderId,
materialName: val materialName: val
}).then(e => { }).then(e => {
this.form.wmsRawOutstockDetailList = e.data.map(r => { this.form.wmsRawOutstockDetailList = e.data.map(r => {
return { return {
stockTotalId: r.stockTotalId,
materialId: r.materialId, materialId: r.materialId,
materialCode: r.materialCode, materialCode: r.materialCode,
materialName: r.materialName, materialName: r.materialName,
safeFlag: r.safeFlag,
availableAmount: r.totalAmount - r.occupyAmount - r.frozenAmount, availableAmount: r.totalAmount - r.occupyAmount - r.frozenAmount,
unavailableAmount: r.occupyAmount + r.frozenAmount, unavailableAmount: r.occupyAmount + r.frozenAmount,
planAmount: r.planAmount planAmount: r.planAmount

Loading…
Cancel
Save