mes:新增条码时选择物料优化,增加物料规格搜索
车间MES:四楼激光切割可以按照无图纸开始和结束
master
xs 4 months ago
parent fdb75b7a27
commit e1748dbc80

@ -170,6 +170,9 @@ public class MesBaseBarcodeInfo extends BaseEntity
private String barcodeTypeStr;//物料类型多个string,例如 1,9
private String confirmFlag;//用来二次确认使用
public String getPrintFlag() {
return printFlag;
}
@ -529,6 +532,14 @@ public class MesBaseBarcodeInfo extends BaseEntity
this.barcodeTypeStr = barcodeTypeStr;
}
public String getConfirmFlag() {
return confirmFlag;
}
public void setConfirmFlag(String confirmFlag) {
this.confirmFlag = confirmFlag;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

@ -255,7 +255,17 @@ public class MesBaseBarcodeInfoController extends BaseController
@PostMapping(value="/addNoPurchaseBarcode")
public AjaxResult addNoPurchaseBarcode(@RequestBody MesBaseBarcodeInfo mesBaseBarcodeInfo)
{
return toAjax(mesBaseBarcodeInfoService.generateNoPurchaseRawBarcode(mesBaseBarcodeInfo));
return success(mesBaseBarcodeInfoService.generateNoPurchaseRawBarcode(mesBaseBarcodeInfo));
}
/**
*
*/
@RequiresPermissions("mes:barcode:internalAdd")
@PostMapping(value="/checkBarcode")
public AjaxResult checkBarcode(@RequestBody MesBaseBarcodeInfo mesBaseBarcodeInfo)
{
return success(mesBaseBarcodeInfoService.checkBarcode(mesBaseBarcodeInfo));
}

@ -58,8 +58,8 @@ public class MesBaseAttachInfo extends BaseEntity {
/**附件ID,多个以,隔开*/
private String attachIdStr;
/** 是否已下发图纸下发dispatchFlag为true下发dispatchFlag为true,默认为false*/
private boolean dispatchFlag = false;
/** 图纸状态*/
private String planDetailStatus;
public void setAttachId(Long attachId) {
this.attachId = attachId;
@ -125,12 +125,12 @@ public class MesBaseAttachInfo extends BaseEntity {
this.attachIdStr = attachIdStr;
}
public boolean isDispatchFlag() {
return dispatchFlag;
public String getPlanDetailStatus() {
return planDetailStatus;
}
public void setDispatchFlag(boolean dispatchFlag) {
this.dispatchFlag = dispatchFlag;
public void setPlanDetailStatus(String planDetailStatus) {
this.planDetailStatus = planDetailStatus;
}
@Override

@ -68,4 +68,13 @@ public interface MesBasePalletInfoMapper
* @return
*/
public MesBasePalletInfo selectMesBasePalletInfoByPalletInfoCode(String palletInfoCode);
/**
*
*
* @param materialBarcode
* @return
*/
public MesBasePalletInfo selectMesBasePalletInfoByBarcode(String materialBarcode);
}

@ -47,6 +47,15 @@ public interface IMesBaseBarcodeInfoService
*/
public int insertMesBaseBarcodeInfo(MesBaseBarcodeInfo mesBaseBarcodeInfo);
/**
*
*
* @param mesBaseBarcodeInfo
*/
public int checkBarcode(MesBaseBarcodeInfo mesBaseBarcodeInfo);
/**
*
* @param mesBaseBarcodeInfo

@ -100,6 +100,8 @@ public class MesBaseBarcodeInfoServiceImpl implements IMesBaseBarcodeInfoService
*/
@Override
public List<MesBaseBarcodeInfo> selectMesBaseBarcodeInfoList(MesBaseBarcodeInfo mesBaseBarcodeInfo) {
mesBaseBarcodeInfo.setMaterialSpec(StringUtils.isNotEmpty(mesBaseBarcodeInfo.getMaterialSpec())
? mesBaseBarcodeInfo.getMaterialSpec().replaceAll("\\s+", ""):"");
return mesBaseBarcodeInfoMapper.selectMesBaseBarcodeInfoList(mesBaseBarcodeInfo);
}
@ -193,6 +195,27 @@ public class MesBaseBarcodeInfoServiceImpl implements IMesBaseBarcodeInfoService
}
/**
*
*
* @param mesBaseBarcodeInfo
*/
@Override
public int checkBarcode(MesBaseBarcodeInfo mesBaseBarcodeInfo) {
if (mesBaseBarcodeInfo.getConfirmFlag() == null || !mesBaseBarcodeInfo.getConfirmFlag().equals("1")) {
MesBaseBarcodeInfo queryBarcodeInfo = new MesBaseBarcodeInfo();
queryBarcodeInfo.setMaterialId(mesBaseBarcodeInfo.getMaterialId());
queryBarcodeInfo.setBatchFlag(MesConstants.IS_BATCH);
List<MesBaseBarcodeInfo> mesBaseBarcodeInfos = mesBaseBarcodeInfoMapper.selectMesBaseBarcodeInfoList(queryBarcodeInfo);
if (mesBaseBarcodeInfos != null && !mesBaseBarcodeInfos.isEmpty()) {
return 2;
}
}
return 1;
}
/**
*
*
@ -202,7 +225,6 @@ public class MesBaseBarcodeInfoServiceImpl implements IMesBaseBarcodeInfoService
public int generateNoPurchaseRawBarcode(MesBaseBarcodeInfo mesBaseBarcodeInfo) {
Date currentDate = new Date();
String userName = SecurityUtils.getUsername();
BigDecimal barcodeAmount = mesBaseBarcodeInfo.getBarcodeAmount();
List<MesBaseBarcodeInfo> toInsertedBarcodeInfos = new ArrayList<>();
@ -252,6 +274,7 @@ public class MesBaseBarcodeInfoServiceImpl implements IMesBaseBarcodeInfoService
Long saleOrderId;
String saleOrderCode;
Long materialId;
String barcode = Seq.getId(Seq.mesCompBarcodeSeqType, Seq.mesCompBarcodeCode);
if (mesBaseBarcodeInfo.getSingleFlag().equals(MesConstants.MES_BARCODE_SINGLE_FLAG_YES)) {
String rawMaterialBarcode = mesBaseBarcodeInfo.getProductBarcode();
MesBaseBarcodeInfo rawBarcode = mesBaseBarcodeInfoMapper.selectMesBaseBarcodeInfoByBarcodeInfo(rawMaterialBarcode);
@ -289,6 +312,14 @@ public class MesBaseBarcodeInfoServiceImpl implements IMesBaseBarcodeInfoService
mesBaseBarcodeInfo.setPalletInfoCode(rawBarcode.getPalletInfoCode());
MesBasePalletInfo mesBasePalletInfo = mesBasePalletInfoMapper.selectMesBasePalletInfoByPalletInfoCode(rawBarcode.getPalletInfoCode());
mesBasePalletInfo.setMaterialBarcode(barcode);
mesBasePalletInfo.setMaterialId(materialId);
mesBasePalletInfoMapper.updateMesBasePalletInfo(mesBasePalletInfo);
rawBarcode.setPalletInfoCode("");
mesBaseBarcodeInfoMapper.updateMesBaseBarcodeInfo(rawBarcode);
} else {
planCode = mesBaseBarcodeInfo.getPlanCode();
planDetailCode = mesBaseBarcodeInfo.getPlanDetailCode();
@ -323,7 +354,7 @@ public class MesBaseBarcodeInfoServiceImpl implements IMesBaseBarcodeInfoService
Date currentDate = new Date();
String barcode = Seq.getId(Seq.mesCompBarcodeSeqType, Seq.mesCompBarcodeCode);
mesBaseBarcodeInfo.setBatchCode(barcode);// 成品的批次代码 == 条码内容
mesBaseBarcodeInfo.setBarcodeInfo(barcode);
mesBaseBarcodeInfo.setAmount(new BigDecimal(1));
@ -575,7 +606,7 @@ public class MesBaseBarcodeInfoServiceImpl implements IMesBaseBarcodeInfoService
PrintContentVo printQty = new PrintContentVo();
printQty.setKey(PrintContentVo.RAW_MATERIAL_LABEL_KEY_QTY);
DecimalFormat df = new DecimalFormat("#.##");
String formattedNumber = df.format(mesBaseBarcodeInfo.getAmount());
String formattedNumber = df.format(mesBaseBarcodeInfo.getAmount()==null?BigDecimal.ZERO:mesBaseBarcodeInfo.getAmount());
printQty.setValue(formattedNumber);
printQty.setType(PrintContentVo.TYPE_TEXT);

@ -6,6 +6,7 @@ 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.core.utils.StringUtils;
import com.hw.common.security.utils.SecurityUtils;
import com.hw.mes.api.domain.MesBaseBarcodeInfo;
import com.hw.mes.domain.MesOrderBind;
@ -53,6 +54,8 @@ public class MesBaseMaterialInfoServiceImpl implements IMesBaseMaterialInfoServi
*/
@Override
public List<MesBaseMaterialInfo> selectMesBaseMaterialInfoList(MesBaseMaterialInfo mesBaseMaterialInfo) {
mesBaseMaterialInfo.setMaterialSpec(StringUtils.isNotEmpty(mesBaseMaterialInfo.getMaterialSpec())
? mesBaseMaterialInfo.getMaterialSpec().replaceAll("\\s+", ""):"");
return mesBaseMaterialInfoMapper.selectMesBaseMaterialInfoList(mesBaseMaterialInfo);
}

@ -240,7 +240,8 @@ public class MesProductPlanDetailServiceImpl implements IMesProductPlanDetailSer
}
//如果是五楼拆分,校验是否有绑定条码
if (mesProductPlanDetail.getProcessType().equals(MesConstants.MES_PROCESS_TYPE_FIFTH_SPLIT)) {
if (StringUtils.isNotEmpty(mesProductPlanDetail.getProcessType())
&& mesProductPlanDetail.getProcessType().equals(MesConstants.MES_PROCESS_TYPE_FIFTH_SPLIT)) {
MesBaseBarcodeInfo queryBaseBarcodeInfo = new MesBaseBarcodeInfo();
queryBaseBarcodeInfo.setPlanDetailCode(dbProductPlanDetail.getPlanDetailCode());
List<MesBaseBarcodeInfo> mesBaseBarcodeInfos = mesBaseBarcodeInfoMapper.selectMesBaseBarcodeInfoList(queryBaseBarcodeInfo);
@ -283,7 +284,7 @@ public class MesProductPlanDetailServiceImpl implements IMesProductPlanDetailSer
dbProductPlan.setPlanStatus(MesConstants.MES_PRODUCT_PLAN_STATUS_FINISH);
dbProductPlan.setRealEndTime(currentDate);
//todo更新生产任务状态、结束时间和完成数量根据finalprocessFlag更新生产任务
//todo更新生产任务(生产工单)状态、结束时间和完成数量根据finalprocessFlag更新生产任务
}
dbProductPlan.setCompleteAmount(newComplementAmount);
@ -430,7 +431,7 @@ public class MesProductPlanDetailServiceImpl implements IMesProductPlanDetailSer
mesProductPlanDetail.setIsFlag("1");
mesProductPlanDetail.setUserId(userId);
mesProductPlanDetail.setUserName(userName);
mesProductPlan.setRealBeginTime(currentDate);
mesProductPlanDetail.setRealBeginTime(currentDate);
mesProductPlanDetail.setCreateTime(currentDate);
mesProductPlanDetail.setCreateBy(userName);

@ -131,6 +131,9 @@ public class MesProductPlanServiceImpl implements IMesProductPlanService {
@Override
public int insertMesProductPlan(MesProductPlan mesProductPlan) {
if (mesProductPlan.getDispatchAmount().compareTo(BigDecimal.ZERO) > 0) {
if (mesProductPlan.getSaleOrderId() == null) {
mesProductPlan.setSaleOrderId(0L);
}
mesProductPlan.setPlanAmount(mesProductPlan.getDispatchAmount());
mesProductPlan.setCreateBy(SecurityUtils.getUsername());
mesProductPlan.setCreateTime(DateUtils.getNowDate());
@ -413,8 +416,9 @@ public class MesProductPlanServiceImpl implements IMesProductPlanService {
@Override
public List<MesBaseAttachInfo> getDrawings(MesProductPlan mesProductPlan) {
String attachId = mesProductPlan.getAttachId();
List<MesBaseAttachInfo> baseAttachInfos;
if (attachId != null) {
if (StringUtils.isNotEmpty(attachId)) {
MesBaseAttachInfo queryBaseAttachInfo = new MesBaseAttachInfo();
queryBaseAttachInfo.setAttachIdStr(attachId);
baseAttachInfos = mesBaseAttachInfoMapper.selectMesBaseAttachInfoList(queryBaseAttachInfo);
@ -425,16 +429,31 @@ public class MesProductPlanServiceImpl implements IMesProductPlanService {
productPlanDetails.forEach(productPlanDetail -> {
for (MesBaseAttachInfo baseAttachInfo : baseAttachInfos) {
if (productPlanDetail.getAttachId() != null && productPlanDetail.getAttachId().equals(baseAttachInfo.getAttachId())) {
baseAttachInfo.setDispatchFlag(true);
baseAttachInfo.setPlanDetailStatus(productPlanDetail.getPlanDetailStatus());
}
}
});
}
return baseAttachInfos;
} else {
baseAttachInfos = new ArrayList<>();
MesBaseAttachInfo baseAttachInfo = new MesBaseAttachInfo();
baseAttachInfo.setAttachId(0L);
baseAttachInfo.setAttachName("无图纸");
MesProductPlanDetail queryProductPlanDetail = new MesProductPlanDetail();
queryProductPlanDetail.setPlanId(mesProductPlan.getPlanId());
queryProductPlanDetail.setAttachId(0L);
List<MesProductPlanDetail> mesProductPlanDetails = productPlanDetailMapper.selectMesProductPlanDetailList(queryProductPlanDetail);
if (mesProductPlanDetails != null && !mesProductPlanDetails.isEmpty()) {
MesProductPlanDetail mesProductPlanDetail = mesProductPlanDetails.get(0);
baseAttachInfo.setPlanDetailStatus(mesProductPlanDetail.getPlanDetailStatus());
}
baseAttachInfos.add(baseAttachInfo);
}
return null;
return baseAttachInfos;
}

@ -61,6 +61,7 @@
bbi.material_id,
bmi.material_code,
bmi.material_name,
bmi.material_spec,
bbi.manufacturer_id,
bbi.product_barcode,
bbi.amount,
@ -102,6 +103,14 @@
<if test="batchCode != null and batchCode != ''">and bbi.batch_code = #{batchCode}</if>
<if test="palletInfoCode != null and palletInfoCode != ''">and bbi.pallet_info_code = #{palletInfoCode}</if>
<if test="materialId != null ">and bbi.material_id = #{materialId}</if>
<if test="materialCode != null and materialCode != '' ">and bmi.material_code like concat('%', #{materialCode},
'%')</if>
<if test="materialName != null and materialName != '' ">and bmi.material_name like concat('%', #{materialName},
'%')</if>
<if test="materialSpec != null and materialSpec != '' ">and replace(bmi.material_spec,' ','') like concat('%', #{materialSpec},
'%')</if>
<if test="manufacturerId != null ">and bbi.manufacturer_id = #{manufacturerId}</if>
<if test="amount != null ">and bbi.amount = #{amount}</if>
<if test="machineName != null and machineName != ''">and bbi.machine_name like concat('%', #{machineName},

@ -99,7 +99,8 @@
<if test="materialUnitId != null ">and bmi.material_unit_id = #{materialUnitId}</if>
<if test="materialUnit != null and materialUnit != ''">and bmi.material_unit = #{materialUnit}</if>
<if test="materialMatkl != null and materialMatkl != ''">and bmi.material_matkl = #{materialMatkl}</if>
<if test="materialSpec != null and materialSpec != ''">and bmi.material_spec = #{materialSpec}</if>
<if test="materialSpec != null and materialSpec != ''">and replace(bmi.material_spec,' ','') like concat('%', #{materialSpec},
'%')</if>
<if test="netWeight != null ">and bmi.net_weight = #{netWeight}</if>
<if test="grossWeight != null ">and bmi.gross_weight = #{grossWeight}</if>
<if test="factoryId != null ">and bmi.factory_id = #{factoryId}</if>

@ -105,4 +105,9 @@
<include refid="selectMesBasePalletInfoVo"/>
where pallet_info_code = #{palletInfoCode}
</select>
<select id="selectMesBasePalletInfoByBarcode" parameterType="String" resultMap="MesBasePalletInfoResult">
<include refid="selectMesBasePalletInfoVo"/>
where material_barcode = #{materialBarcode}
</select>
</mapper>

@ -36,6 +36,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="planId != null "> and plan_id = #{planId}</if>
<if test="planCode != null and planCode != ''"> and plan_code = #{planCode}</if>
<if test="userId != null "> and user_id = #{userId}</if>
<if test="attachId != null "> and attach_id = #{attachId}</if>
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
<if test="realBeginTime != null "> and real_begin_time = #{realBeginTime}</if>
<if test="realEndTime != null "> and real_end_time = #{realEndTime}</if>

@ -7,6 +7,7 @@ import com.hw.common.core.utils.DateUtils;
import com.hw.common.core.utils.StringUtils;
import com.hw.common.security.utils.SecurityUtils;
//import com.hw.printer.api.RemotePrinterService;
import com.hw.printer.api.RemotePrinterService;
import com.hw.wms.domain.WmsBaseLocation;
import com.hw.wms.domain.WmsBaseWarehouse;
import com.hw.wms.mapper.WmsBaseLocationMapper;
@ -33,8 +34,8 @@ public class WmsBaseLocationServiceImpl implements IWmsBaseLocationService {
@Autowired
private WmsBaseWarehouseMapper wmsBaseWarehouseMapper;
// @Resource
// private RemotePrinterService remotePrinterService;
@Resource
private RemotePrinterService remotePrinterService;
/**
*
@ -189,7 +190,7 @@ public class WmsBaseLocationServiceImpl implements IWmsBaseLocationService {
params.put("text", qrCode);
params.put("qrCode", qrCode);
//调用的打印接口
// remotePrinterService.printLocationLabel(params, SecurityConstants.INNER);
remotePrinterService.printLocationLabel(params, SecurityConstants.INNER);
} catch (Exception e) {
buffer.append("打印料箱条码报错——[条码内容:").append(qrCode).append("]").append(e.getMessage());
}

@ -8,6 +8,7 @@ import com.hw.common.core.domain.R;
import com.hw.common.core.exception.ServiceException;
import com.hw.common.core.utils.StringUtils;
import com.hw.common.core.utils.uuid.Seq;
import com.hw.common.security.service.TokenService;
import com.hw.common.security.utils.SecurityUtils;
import com.hw.mes.api.RemoteMesService;
import com.hw.mes.api.domain.MesBaseBarcodeInfo;
@ -18,6 +19,8 @@ import com.hw.wms.domain.*;
import com.hw.wms.domain.vo.*;
import com.hw.wms.mapper.*;
import com.hw.wms.service.IWmsRawOutstockService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
@ -39,6 +42,9 @@ import java.util.stream.Collectors;
*/
@Service
public class WmsRawOutstockServiceImpl implements IWmsRawOutstockService {
private static final Logger log = LoggerFactory.getLogger(WmsRawOutstockServiceImpl.class);
@Autowired
private WmsRawOutstockMapper wmsRawOutstockMapper;
@ -624,6 +630,7 @@ public class WmsRawOutstockServiceImpl implements IWmsRawOutstockService {
toInsertedRawOutstock.setApplyBy(userName);
toInsertedRawOutstock.setApplyReason(wmsRawOutstockParam.getApplyReason());
toInsertedRawOutstock.setApplyDate(currentDate);
log.info("taskType:"+wmsRawOutstockParam.getTaskType()+",stationcode:"+wmsConfig.getFifthSplitStationCode());
if (wmsRawOutstockParam.getTaskType().equals(WmsConstants.WMS_RAW_OUTSTOCK_TASK_TYPE_PRODUCTION_PICKING)) {
toInsertedRawOutstock.setEndStationCode(wmsRawOutstockParam.getEndStationCode());

@ -4,6 +4,7 @@ import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import com.hw.common.core.constant.MesConstants;
import com.hw.common.core.constant.SecurityConstants;
import com.hw.common.core.constant.WmsConstants;
import com.hw.common.core.domain.R;
@ -321,8 +322,13 @@ public class WmsTransferServiceImpl implements IWmsTransferService {
throw new ServiceException("请打印成品条码入成品库");
}
if(!mesBaseBarcodeInfo.getPrintFlag().equals(MesConstants.MES_BARCODE_PRINT_FLAG_YES)){
throw new ServiceException("请先打印条码后进行入库操作");
}
//如果是成品条码,则只能入成品库
if (StringUtils.isEmpty(mesBaseBarcodeInfo.getBindBarcode())) {
if (StringUtils.isEmpty(mesBaseBarcodeInfo.getProductBarcode())) {
throw new ServiceException("物料条码有误,没有绑定");
}
if (!targetWarehouse.getWarehouseFloor().equals(5L) ||
@ -330,7 +336,7 @@ public class WmsTransferServiceImpl implements IWmsTransferService {
throw new ServiceException("请入5楼成品库");
}
queryTransfer.setProductBatch(mesBaseBarcodeInfo.getBindBarcode());
queryTransfer.setProductBatch(mesBaseBarcodeInfo.getProductBarcode());
/**判断有没有已出库的转库记录*/
List<WmsTransfer> wmsTransfers = wmsTransferMapper.selectWmsTransferList(queryTransfer);

@ -130,6 +130,16 @@ export function addProductBarcode(data) {
// 无采购订单新增原材料条码信息
export function checkBarcode(data) {
return request({
url: '/mes/barcode/checkBarcode',
method: 'post',
data: data
})
}
// 无采购订单新增原材料条码信息
export function addNoPurchaseBarcode(data) {
return request({

@ -3,7 +3,7 @@
<div class="headTitle">京源环保生产管理系统</div>
<div class="chartBox chartBox1">
<div class="title">计划明细</div>
<div class="title">生产明细</div>
<div class="chart">
<div class="form">
<el-form :model="form" label-position="right" label-width="80px" size="mini">
@ -33,9 +33,12 @@
<!-- </el-form-item>-->
</el-form>
<div style="text-align: center">
<el-button type="success" @click="handleRawOutstock" v-if="this.form.planDetailStatus!=null && this.form.planDetailStatus==='已开始'"></el-button>
<el-button type="warning" @click="handleRawOutstock" v-if="this.form.planDetailStatus!=null && this.form.planDetailStatus==='已开始'"></el-button>
<el-button type="primary" @click="accomplishPlan" v-if="this.form.planDetailStatus!=null && this.form.planDetailStatus==='已开始'"></el-button>
<el-button type="success" @click="handleRawOutstock"
v-if="this.form.planDetailStatus!=null && this.form.planDetailStatus==='已开始'">板材领料
</el-button>
<el-button type="primary" @click="accomplishPlan"
v-if="this.form.planDetailStatus!=null && this.form.planDetailStatus==='已开始'">完成
</el-button>
</div>
</div>
@ -92,11 +95,12 @@
title="确定开始计划吗?"
@confirm="startNextProduction(props.row,i)"
>
<el-button
slot="reference"
:disabled="i.dispatchFlag"
:disabled="i.planDetailStatus"
size="small"
type="text">开始
type="text">{{ !i.planDetailStatus ? "开始" : PLAN_DETAIL_STATUS_STR[i.planDetailStatus]}}
</el-button>
</el-popconfirm>
</div>
@ -126,7 +130,7 @@
width="80"
>
<template slot-scope="scope">
{{ (scope.row.attachId || '').split(',').length }}
{{ (scope.row.attachId && scope.row.attachId !== '') ? scope.row.attachId.split(',').length : "1(无图纸)" }}
</template>
</el-table-column>
<el-table-column
@ -196,12 +200,16 @@
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="wmsForm" :model="wmsForm" :rules="wmsRules" label-width="80px">
<el-form-item label="库位编码" prop="locationCode">
<el-input v-model="wmsForm.locationCode" ref="locationCodeRef" autocomplete="off" placeholder="请扫描或输入库位编码"
@focus="handleLocationCodeFocus" @blur="handleLocationCodeBlur" suffix-icon="el-icon-full-screen"></el-input>
<el-input v-model="wmsForm.locationCode" ref="locationCodeRef" autocomplete="off"
placeholder="请扫描或输入库位编码"
@focus="handleLocationCodeFocus" @blur="handleLocationCodeBlur"
suffix-icon="el-icon-full-screen"></el-input>
</el-form-item>
<el-form-item label="物料条码" prop="materialBarcode">
<el-input v-model="wmsForm.materialBarcode" ref="materialBarcodeRef" autocomplete="off" placeholder="请扫描或输入物料条码"
@focus="handleMaterialBarcodeFocus" @blur="handleMaterialBarcodeBlur" suffix-icon="el-icon-full-screen"></el-input>
<el-input v-model="wmsForm.materialBarcode" ref="materialBarcodeRef" autocomplete="off"
placeholder="请扫描或输入物料条码"
@focus="handleMaterialBarcodeFocus" @blur="handleMaterialBarcodeBlur"
suffix-icon="el-icon-full-screen"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
@ -281,6 +289,19 @@ export default {
cannotOutstockCode: "3"
},
PLAN_DETAIL_STATUS: {
NOT_STARTED: "1",
STARTED: "2",
COMPLETED: "3",
ABNORMAL_COMPLETED: "9"
},
PLAN_DETAIL_STATUS_STR: {
"1": "未开始",
"2": "已开始",
"3": "已完成",
"9": "异常完成"
}
}
},
async mounted() {

@ -1,6 +1,31 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="物料编号" prop="materialCode">
<el-input
v-model="queryParams.materialCode"
placeholder="请输入物料编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="物料名称" prop="poNo">
<el-input
v-model="queryParams.materialName"
placeholder="请输入物料名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="物料规格" prop="poNo">
<el-input
v-model="queryParams.materialSpec"
placeholder="请输入物料规格"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="批次标识" prop="batchFlag">
<el-select v-model="queryParams.batchFlag" placeholder="请选择批次标识" clearable>
<el-option
@ -11,16 +36,6 @@
/>
</el-select>
</el-form-item>
<!-- <el-form-item label="条码类型" prop="barcodeType">-->
<!-- <el-select v-model="queryParams.barcodeType" placeholder="请选择条码类型" clearable>-->
<!-- <el-option-->
<!-- v-for="dict in dict.type.barcode_type"-->
<!-- :key="dict.value"-->
<!-- :label="dict.label"-->
<!-- :value="dict.value"-->
<!-- />-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item label="采购订单号" prop="poNo">
<el-input
v-model="queryParams.poNo"
@ -119,7 +134,9 @@
<el-table-column label="批次代码" align="center" prop="batchCode" v-if="columns[6].visible" width="100"/>
<el-table-column label="条码内容" align="center" prop="barcodeInfo" v-if="columns[5].visible" width="100"/>
<el-table-column label="物料编码" align="center" prop="materialCode" v-if="columns[31].visible" width="100"/>
<el-table-column label="物料名称" align="center" prop="materialName" v-if="columns[8].visible" width="100"/>
<el-table-column label="物料规格" align="center" prop="materialSpec" v-if="columns[32].visible" width="150"/>
<el-table-column label="批次标识" align="center" prop="batchFlag" v-if="columns[3].visible">
<template slot-scope="scope">
<dict-tag :options="dict.type.active_flag" :value="scope.row.batchFlag"/>
@ -429,6 +446,9 @@
<el-form-item label="物料名称" prop="materialName">
<el-input v-model="noPurchaseForm.materialName" readonly/>
</el-form-item>
<el-form-item label="物料规格" prop="materialName">
<el-input v-model="noPurchaseForm.materialSpec" type="textarea" readonly/>
</el-form-item>
<el-form-item label="批次标识" prop="batchFlag">
@ -445,15 +465,15 @@
<!-- <el-form-item label="供应商ID" prop="manufacturerId">-->
<!-- <el-input v-model="form.manufacturerId" placeholder="请输入供应商ID" />-->
<!-- </el-form-item>-->
<el-form-item prop="amount" v-if="noPurchaseForm.batchFlag==='1'">
<!--el-form-item prop="amount" v-if="noPurchaseForm.batchFlag==='1'">
<span slot="label">
<el-tooltip content="每个物料条码中包含的数量一袋螺丝有60个" placement="top">
<i class="el-icon-question"></i>
</el-tooltip>
批次数量
</span>
<el-input v-model="noPurchaseForm.amount" placeholder="请在物料信息中维护"/>
</el-form-item>
<el-input v-model="noPurchaseForm.amount" placeholder="请在物料信息中维护" />
</el-form-item-->
<el-form-item prop="barcodeAmount">
<span slot="label">
@ -557,7 +577,7 @@
import {
listBarcode, getBarcode, delBarcode, addBarcode, updateBarcode,
printBarcodes, getMaterialInfoByErpId, selectProductBarcodeInfoByBarcodeInfo,
addInternalBarcode, regenerateBarcode, addNoPurchaseBarcode, addRegularBarcode
addInternalBarcode, regenerateBarcode, checkBarcode,addNoPurchaseBarcode, addRegularBarcode
} from "@/api/mes/barcode";
import addPurchaseOrder from '@//views/mes/purchaseOrder/addPurchaseOrder.vue';
import selectMaterial from '@//views/mes/materialinfo/selectMaterial.vue';
@ -607,6 +627,9 @@ export default {
batchCode: null,
palletInfoCode: null,
materialId: null,
materialCode: null,
materialName: null,
materialSpec: null,
manufacturerId: null,
amount: null,
machineName: null,
@ -682,6 +705,8 @@ export default {
{key: 28, label: `更新时间`, visible: false},
{key: 29, label: `销售订单号`, visible: true},
{key: 30, label: `安全库存`, visible: true},
{key: 31, label: `物料编码`, visible: true},
{key: 32, label: `物料规格`, visible: true},
],
@ -720,9 +745,6 @@ export default {
batchFlag: [
{required: true, message: "批次标识不能为空", trigger: "blur"}
],
amount: [
{required: true, message: "批次数量不能为空", trigger: "change"}
],
barcodeAmount: [
{required: true, message: "条码数量不能为空", trigger: "change"}
],
@ -1098,7 +1120,8 @@ export default {
bindBy: null,
bindTime: null,
updateBy: null,
updateTime: null
updateTime: null,
confirmFlag:null
};
this.resetForm("noPurchaseForm");
},
@ -1123,6 +1146,7 @@ export default {
this.noPurchaseForm.materialId = selectedRow.materialId;
this.noPurchaseForm.materialCode = selectedRow.materialCode;
this.noPurchaseForm.materialName = selectedRow.materialName;
this.noPurchaseForm.materialSpec = selectedRow.materialSpec;
this.noPurchaseForm.batchFlag = selectedRow.batchFlag;
if (this.noPurchaseForm.batchFlag == null || this.noPurchaseForm.batchFlag === '') {
@ -1151,16 +1175,33 @@ export default {
submitNoPurchaseAddForm() {
this.$refs["noPurchaseForm"].validate(valid => {
if (valid) {
addNoPurchaseBarcode(this.noPurchaseForm).then(response => {
this.$modal.msgSuccess("新增成功");
this.noPurchaseOpen = false;
this.getList();
const noPurchaseForm = this.noPurchaseForm;
checkBarcode(noPurchaseForm).then(response => {
if (response.data === 2) {
this.$modal.confirm('已经有此物料的的条码,请确认是否继续生成?').then(function () {
return addNoPurchaseBarcode(noPurchaseForm)
}).then(() => {
this.$modal.msgSuccess("新增成功");
this.noPurchaseOpen = false;
this.getList();
}).catch(() => {
});
} else {
addNoPurchaseBarcode(this.noPurchaseForm).then(response => {
this.$modal.msgSuccess("新增成功");
this.noPurchaseOpen = false;
this.getList();
});
}
});
}
});
},
//
cancelNoPurchase() {
this.noPurchaseOpen = false;

@ -11,17 +11,18 @@
</el-form-item>
<el-form-item label="物料名称" prop="materialName">
<el-input
v-model="queryParams.materialName"
placeholder="请输入物料名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="物料规格" prop="materialName">
<el-input
v-model="queryParams.materialName"
placeholder="请输入物料名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="物料类型" prop="materialTypeId">
<el-input
v-model="queryParams.materialTypeId"
placeholder="请输入物料类型"
v-model="queryParams.materialSpec"
placeholder="请输入物料规格"
clearable
@keyup.enter.native="handleQuery"
/>
@ -51,12 +52,7 @@
<el-table-column label="物料ID" align="center" prop="materialId" v-if="false"/>
<el-table-column label="物料编码" align="center" prop="materialCode"/>
<el-table-column label="物料名称" align="center" prop="materialName"/>
<el-table-column label="物料大类" align="center" prop="materialCategories">
<template slot-scope="scope">
<dict-tag :options="dict.type.material_categories" :value="scope.row.materialCategories"/>
</template>
</el-table-column>
<el-table-column label="物料类型" align="center" prop="materialTypeName"/>
<el-table-column label="物料规格" align="center" prop="materialSpec"/>
<el-table-column label="常备物料" align="center" prop="bindFlag">
<template slot-scope="scope">
<dict-tag :options="dict.type.mes_material_bind_flag" :value="scope.row.bindFlag"/>
@ -68,7 +64,7 @@
</template>
</el-table-column>
<el-table-column label="批次数量" align="center" prop="batchAmount"/>
<el-table-column label="物料规格" align="center" prop="materialSpec"/>
</el-table>
<pagination

Loading…
Cancel
Save