MES:web物料信息修改完善,只要修改过常备物料和批次标识就不能再修改
master
xs 5 months ago
parent b31cc4f07c
commit 37ef81255a

@ -4,8 +4,13 @@ import java.math.BigDecimal;
import java.util.List;
import com.hw.common.core.constant.MesConstants;
import com.hw.common.core.exception.ServiceException;
import com.hw.common.core.utils.DateUtils;
import com.hw.common.security.utils.SecurityUtils;
import com.hw.mes.api.domain.MesBaseBarcodeInfo;
import com.hw.mes.domain.MesOrderBind;
import com.hw.mes.mapper.MesBaseBarcodeInfoMapper;
import com.hw.mes.mapper.MesOrderBindMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hw.mes.mapper.MesBaseMaterialInfoMapper;
@ -23,6 +28,12 @@ public class MesBaseMaterialInfoServiceImpl implements IMesBaseMaterialInfoServi
@Autowired
private MesBaseMaterialInfoMapper mesBaseMaterialInfoMapper;
@Autowired
private MesBaseBarcodeInfoMapper mesBaseBarcodeInfoMapper;
@Autowired
private MesOrderBindMapper mesOrderBindMapper;
/**
*
*
@ -65,6 +76,21 @@ public class MesBaseMaterialInfoServiceImpl implements IMesBaseMaterialInfoServi
*/
@Override
public int updateMesBaseMaterialInfo(MesBaseMaterialInfo mesBaseMaterialInfo) {
// MesBaseBarcodeInfo queryBaseBarcodeInfo = new MesBaseBarcodeInfo();
// queryBaseBarcodeInfo.setMaterialId(mesBaseMaterialInfo.getMaterialId());
// int barcodeInfoCount = mesBaseBarcodeInfoMapper.selectMesBaseBarcodeInfoCount(queryBaseBarcodeInfo);
// if (barcodeInfoCount > 0) {
// throw new ServiceException("此物料已经有条码信息,不能修改");
// }
//
// MesOrderBind queryOrderBind = new MesOrderBind();
// queryOrderBind.setMaterialId(mesBaseMaterialInfo.getMaterialId());
// List<MesOrderBind> orderBinds = mesOrderBindMapper.selectMesOrderBindList(queryOrderBind);
// if (orderBinds != null && orderBinds.size() > 0) {
// throw new ServiceException("此物料已经有采购订单和销售订单绑定信息,不能修改");
// }
mesBaseMaterialInfo.setUpdateTime(DateUtils.getNowDate());
mesBaseMaterialInfo.setUpdateBy(SecurityUtils.getUsername());
if (!mesBaseMaterialInfo.getBatchFlag().equals(MesConstants.IS_BATCH)) {

@ -184,7 +184,7 @@
placeholder="请选择物料类型"/>
</el-form-item>
<el-form-item label="常备物料" prop="bindFlag">
<el-radio-group v-model="form.bindFlag">
<el-radio-group v-model="form.bindFlag" :disabled="form.bindFlag!=null">
<el-radio
v-for="dict in dict.type.active_flag"
:key="dict.value"
@ -195,7 +195,7 @@
</el-form-item>
<el-form-item label="批次标识" prop="batchFlag">
<el-radio-group v-model="form.batchFlag">
<el-radio-group v-model="form.batchFlag" :disabled="form.batchFlag!=null">
<el-radio
v-for="dict in dict.type.active_flag"
:key="dict.value"
@ -206,7 +206,7 @@
</el-form-item>
<el-form-item label="批次数量" prop="batchAmount" v-if="form.batchFlag==='1'">
<el-input-number v-model="form.batchAmount" placeholder="请输入批次数量" :min="1" />
<el-input-number v-model="form.batchAmount" placeholder="请输入批次数量" :min="1" :disabled="form.batchFlag!=null"/>
</el-form-item>
<!-- <el-form-item label="计量单位" prop="materialUnitId">-->

Loading…
Cancel
Save