车间生产:
增加一楼包装制作工序和包装工序的登录和页面逻辑
MES:
生产任务:增加包装工序的生产任务管理和派工
master
xs 4 weeks ago
parent a249a7f207
commit bf6f2b2359

@ -172,6 +172,7 @@ public class MesConstants {
public static final String MES_PRODUCT_ORDER_SALE = "1";//外部销售 public static final String MES_PRODUCT_ORDER_SALE = "1";//外部销售
public static final String MES_PRODUCT_ORDER_INTERNAL = "2";//对内生产 public static final String MES_PRODUCT_ORDER_INTERNAL = "2";//对内生产
public static final String MES_PRODUCT_ORDER_PACKING= "3";//包装
/** /**
* *

@ -94,27 +94,35 @@ public class MesProductOrderServiceImpl implements IMesProductOrderService {
// if(mesProductOrder.getPreOrderId()!=null){ // if(mesProductOrder.getPreOrderId()!=null){
// checkPreTime(mesProductOrder); // checkPreTime(mesProductOrder);
// } // }
if(mesProductOrder.getSaleType().equals(MesConstants.MES_PRODUCT_ORDER_PACKING)){
mesProductOrder.setDispatchId(5L);//包装工艺路线ID
//校验同一工艺路线时间重叠
checkSameProcessTimeClash(mesProductOrder);
//销售订单添加工单:校验是否超出销售数量
if (mesProductOrder.getSaleOrderFlag().equals("1") && StringUtils.isNotNull(mesProductOrder.getSaleOrderId())) {
checkSalesQuantity(mesProductOrder);
} else {
mesProductOrder.setSaleAmount(mesProductOrder.getPlanAmount());
}
if (mesProductOrder.getSaleOrderId() == null) {
mesProductOrder.setSaleOrderId(0L); mesProductOrder.setSaleOrderId(0L);
} mesProductOrder.setSaleOrderFlag(MesConstants.MES_ORDER_BIND_SAFE_FLAG_NO);
if (mesProductOrder.getSaleType().equals(MesConstants.MES_PRODUCT_ORDER_SALE)) { mesProductOrder.setMaterialId(0L);
mesProductOrder.setProduceMaterialId(null); mesProductOrder.setMaterialBomId(0L);
} else { mesProductOrder.setSaleAmount(mesProductOrder.getPlanAmount());
if (mesProductOrder.getProduceMaterialId() == null) { }else{
throw new ServiceException("请选择生产物料"); //校验同一工艺路线时间重叠
checkSameProcessTimeClash(mesProductOrder);
//销售订单添加工单:校验是否超出销售数量
if (mesProductOrder.getSaleOrderFlag().equals("1") && StringUtils.isNotNull(mesProductOrder.getSaleOrderId())) {
checkSalesQuantity(mesProductOrder);
} else {
mesProductOrder.setSaleAmount(mesProductOrder.getPlanAmount());
}
if (mesProductOrder.getSaleOrderId() == null) {
mesProductOrder.setSaleOrderId(0L);
}
if (mesProductOrder.getSaleType().equals(MesConstants.MES_PRODUCT_ORDER_SALE)) {
mesProductOrder.setProduceMaterialId(null);
} else {
if (mesProductOrder.getProduceMaterialId() == null) {
throw new ServiceException("请选择生产物料");
}
} }
} }
return mesProductOrderMapper.insertMesProductOrder(mesProductOrder); return mesProductOrderMapper.insertMesProductOrder(mesProductOrder);
} }

@ -212,7 +212,6 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
v-if="scope.row.planDetailStatus !== '3' && scope.row.planDetailStatus !== '9'" v-if="scope.row.planDetailStatus !== '3' && scope.row.planDetailStatus !== '9'"
size="small"
type="text" type="text"
:loading="submitLoading" :loading="submitLoading"
@click="planExecute(scope.row)" @click="planExecute(scope.row)"
@ -221,7 +220,6 @@
</el-button> </el-button>
<el-button <el-button
size="small"
type="text" type="text"
@click="submitProductPlanDetailPause(scope.row)" @click="submitProductPlanDetailPause(scope.row)"
:loading="submitLoading" :loading="submitLoading"
@ -231,7 +229,6 @@
</el-button> </el-button>
<el-button <el-button
size="small"
type="text" type="text"
@click="submitProductPlanDetailContinue(scope.row)" @click="submitProductPlanDetailContinue(scope.row)"
:loading="submitLoading" :loading="submitLoading"
@ -241,15 +238,14 @@
</el-button> </el-button>
<el-button <el-button
v-if="scope.row.planDetailStatus === PLAN_DETAIL_STATUS.STARTED" size="small" v-if="!$route.query && scope.row.planDetailStatus === PLAN_DETAIL_STATUS.STARTED"
type="text" type="text"
@click="getMaterials(scope.row) " @click="getMaterials(scope.row) "
> >
领料 领料
</el-button> </el-button>
<el-button <el-button
v-if="scope.row.planDetailStatus === PLAN_DETAIL_STATUS.STARTED" v-if="!$route.query && scope.row.planDetailStatus === PLAN_DETAIL_STATUS.STARTED"
size="small"
type="text" type="text"
@click="handleMaterialConfirmForm(scope)" @click="handleMaterialConfirmForm(scope)"
> >
@ -259,16 +255,15 @@
size="small" size="small"
type="text" type="text"
@click="handleApplyRawReturn(scope.row)" @click="handleApplyRawReturn(scope.row)"
v-if="scope.row.planDetailStatus !== PLAN_DETAIL_STATUS.TO_START" v-if="!$route.query && scope.row.planDetailStatus !== PLAN_DETAIL_STATUS.TO_START"
> >
退库 退库
</el-button> </el-button>
<el-button <el-button
size="small"
type="text" type="text"
@click="print(scope.row)" @click="print(scope.row)"
v-if="(scope.row.planDetailStatus === PLAN_DETAIL_STATUS.FINISHED || scope.row.planDetailStatus === PLAN_DETAIL_STATUS.ABNORMAL_FINISHED) v-if="(scope.row.planDetailStatus === PLAN_DETAIL_STATUS.FINISHED || scope.row.planDetailStatus === PLAN_DETAIL_STATUS.ABNORMAL_FINISHED)
&& finalProcessFlag ==='1'" && finalProcessFlag ==='1' && !$route.query "
> >
条码 条码
</el-button> </el-button>
@ -335,8 +330,7 @@
<div class="bottom"> <div class="bottom">
<el-row> <el-row>
<el-button type="primary">首页</el-button> <el-button type="success" v-if="!$route.query" @click="handleProductInstock"></el-button>
<el-button type="success" @click="handleProductInstock"></el-button>
<el-button type="danger" @click="logout">退</el-button> <el-button type="danger" @click="logout">退</el-button>
</el-row> </el-row>
</div> </div>
@ -599,7 +593,10 @@ export default {
} }
}, },
mounted() { mounted() {
this.firstConnectSerial(); if(!this.$route.query){
this.firstConnectSerial();
}
// setInterval(() => { // setInterval(() => {
// this.$notify.info({ // this.$notify.info({
// title: '', // title: '',

@ -155,6 +155,16 @@ export default {
floor: 5, floor: 5,
processId: 54, processId: 54,
route: '/board/fifthFloor?id=3'// route: '/board/fifthFloor?id=3'//
},
{
floor: 1,
processId: 511,
route: '/board/firstFloor?id=2'//
},
{
floor: 1,
processId: 512,
route: '/board/firstFloor?id=3'//
} }
] ]
}; };

@ -333,7 +333,7 @@
<!-- <el-form-item label="销售订单ID" prop="saleOrderId">--> <!-- <el-form-item label="销售订单ID" prop="saleOrderId">-->
<!-- <el-input v-model="form.saleOrderId" placeholder="请输入销售订单ID" />--> <!-- <el-input v-model="form.saleOrderId" placeholder="请输入销售订单ID" />-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<el-form-item label="销售订单编号" prop="saleorderCode"> <el-form-item label="销售订单编号" prop="saleorderCode" v-if="form.saleType !== MES_SALE_TYPE.MES_SALE_TYPE_PACKING">
<el-input v-model="form.saleorderCode" placeholder="请点击右侧检索销售订单编号" :disabled="saleOrderDisabled" <el-input v-model="form.saleorderCode" placeholder="请点击右侧检索销售订单编号" :disabled="saleOrderDisabled"
readonly> readonly>
<el-button slot="append" icon="el-icon-search" @click="handleSaleOrderAdd"></el-button> <el-button slot="append" icon="el-icon-search" @click="handleSaleOrderAdd"></el-button>
@ -346,13 +346,13 @@
<!-- <el-input v-model="form.materialId" placeholder="请输入物料ID" :disabled="true"/>--> <!-- <el-input v-model="form.materialId" placeholder="请输入物料ID" :disabled="true"/>-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<el-form-item label="成品名称" prop="materialName"> <el-form-item label="成品名称" prop="materialName" v-if="form.saleType !== MES_SALE_TYPE.MES_SALE_TYPE_PACKING">
<el-input v-model="form.materialName" placeholder="请点击右侧检索物料" :disabled="materialDisabled" readonly> <el-input v-model="form.materialName" placeholder="请点击右侧检索物料" :disabled="materialDisabled" readonly>
<el-button slot="append" icon="el-icon-search" v-if="!materialDisabled" @click="handleMaterialAdd"></el-button> <el-button slot="append" icon="el-icon-search" v-if="!materialDisabled" @click="handleMaterialAdd"></el-button>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="成品BOM" prop="materialBomId"> <el-form-item label="成品BOM" prop="materialBomId" v-if="form.saleType !== MES_SALE_TYPE.MES_SALE_TYPE_PACKING">
<el-select v-model="form.materialBomId" placeholder="请选择物料BOM"> <el-select v-model="form.materialBomId" placeholder="请选择物料BOM">
<el-option <el-option
v-for="item in materialBomList" v-for="item in materialBomList"
@ -371,8 +371,8 @@
</el-form-item> </el-form-item>
<el-form-item label="工艺路线" prop="dispatchId"> <el-form-item label="工艺路线" prop="dispatchId" v-if="form.saleType !== MES_SALE_TYPE.MES_SALE_TYPE_PACKING">
<el-select v-model="form.dispatchId" filterable placeholder="请选择工艺路线" clearable> <el-select v-model="form.dispatchId" filterable placeholder="请选择工艺路线" clearable>
<el-option <el-option
v-for="item in routeList" v-for="item in routeList"
:key="item.routeId" :key="item.routeId"
@ -395,7 +395,7 @@
</el-form-item> </el-form-item>
<el-form-item label="销售数量" prop="saleAmount"> <el-form-item label="销售数量" prop="saleAmount" v-if="form.saleType !== MES_SALE_TYPE.MES_SALE_TYPE_PACKING">
<el-input-number v-model="form.saleAmount" placeholder="请输入销售数量" :disabled="true"/> <el-input-number v-model="form.saleAmount" placeholder="请输入销售数量" :disabled="true"/>
</el-form-item> </el-form-item>
<el-form-item label="计划数量" prop="planAmount"> <el-form-item label="计划数量" prop="planAmount">
@ -732,6 +732,7 @@ export default {
trigger: "blur" trigger: "blur"
} }
], ],
}, },
@ -830,6 +831,7 @@ export default {
MES_SALE_TYPE: { MES_SALE_TYPE: {
MES_SALE_TYPE_EXTERNAL: '1',// MES_SALE_TYPE_EXTERNAL: '1',//
MES_SALE_TYPE_INTERNAL: '2',// MES_SALE_TYPE_INTERNAL: '2',//
MES_SALE_TYPE_PACKING: '3',//
}, },
MATERIAL_TYPE: { MATERIAL_TYPE: {

Loading…
Cancel
Save