车间生产:
四楼激光切割:板材入库和板材领料后提示最新库存
五楼自检工序:在生成成品条码前判断有没有半成品出库
master
xs 4 weeks ago
parent bf6f2b2359
commit 57cb7848e0

@ -194,6 +194,8 @@ public class MesBaseBarcodeInfo extends BaseEntity
private Long orderBindId;
private Long materialBomId;
public String getLocationCode() {
return locationCode;
@ -619,6 +621,14 @@ public class MesBaseBarcodeInfo extends BaseEntity
this.orderBindId = orderBindId;
}
public Long getMaterialBomId() {
return materialBomId;
}
public void setMaterialBomId(Long materialBomId) {
this.materialBomId = materialBomId;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

@ -349,7 +349,8 @@ public class MesBaseBarcodeInfoServiceImpl implements IMesBaseBarcodeInfoService
Long saleOrderId = productPlan.getSaleOrderId();
String saleOrderCode = productPlan.getSaleorderCode();
Long materialId = productPlan.getMaterialId();;//在生产计划的materialid是根据saletype保存如果是外部销售则保存productorder中的materialid如果是内部生产则保存prpductorder中的producematerialid
Long materialId = productPlan.getMaterialId();
;//在生产计划的materialid是根据saletype保存如果是外部销售则保存productorder中的materialid如果是内部生产则保存prpductorder中的producematerialid
//五楼自检工序根据原材料条码生成成品条码
if (StringUtils.isNotEmpty(mesBaseBarcodeInfo.getSingleFlag()) &&
@ -369,6 +370,7 @@ public class MesBaseBarcodeInfoServiceImpl implements IMesBaseBarcodeInfoService
barcode = Seq.getId(Seq.mesPurchaseVirtualProductBarcodeSeqType, Seq.mesPurchaseVirtualProductBarcodeCode);
} else if (rawMaterialBarcode.contains(Seq.mesInternalVirtualBarcodeCode)) {//内部生产合并虚拟条码
barcode = Seq.getId(Seq.mesInternalVirtualProductBarcodeSeqType, Seq.mesInternalVirtualProductBarcodeCode);
materialId = rawBarcode.getMaterialId();
}
MesBaseBarcodeInfo productBarcodeInfo = mesBaseBarcodeInfoMapper.selectMesBaseBarcodeInfoByProductBarcode(rawMaterialBarcode);
@ -719,7 +721,9 @@ public class MesBaseBarcodeInfoServiceImpl implements IMesBaseBarcodeInfoService
PrintContentVo printMaterialSpec = new PrintContentVo();
printMaterialSpec.setKey(PrintContentVo.RAW_MATERIAL_LABEL_KEY_MATERIAL_SPEC);
printMaterialSpec.setValue(mesBaseBarcodeInfo.getBarcodeSpec().replaceAll("[\\x00-\\x1F\\x7F-\\x9F]", ""));
if(StringUtils.isNotEmpty(mesBaseBarcodeInfo.getBarcodeSpec())) {
printMaterialSpec.setValue(mesBaseBarcodeInfo.getBarcodeSpec().replaceAll("[\\x00-\\x1F\\x7F-\\x9F]", ""));
}
printMaterialSpec.setType(PrintContentVo.TYPE_TEXT);
PrintContentVo printQty = new PrintContentVo();
@ -1066,6 +1070,7 @@ public class MesBaseBarcodeInfoServiceImpl implements IMesBaseBarcodeInfoService
MesMaterialBom childMaterialBom = childMaterialBomList.get(0);
MesMaterialBom parentBom = mesMaterialBomMapper.selectMesMaterialBomByMaterialBomId(childMaterialBom.getParentId());
//四楼到五楼,主要是多个成品合并到一个托盘后生成原材料条码需要保存以下信息,一个成品的保不保存无所谓
MesSaleOrderRelate saleOrderRelate = new MesSaleOrderRelate();
saleOrderRelate.setBarcodeInfo(barcodeInfo);
saleOrderRelate.setSaleOrderId(mesBaseBarcodeInfo.getSaleOrderId());
@ -1082,9 +1087,8 @@ public class MesBaseBarcodeInfoServiceImpl implements IMesBaseBarcodeInfoService
saleOrderRelate.setRelateSaleOrderAmount(BigDecimal.ONE);
toInsertedSaleOrderRelateList.add(saleOrderRelate);
}
}
}
if (allErrorMsgBuilder.length() > 0) {

@ -94,14 +94,14 @@ public class MesProductOrderServiceImpl implements IMesProductOrderService {
// if(mesProductOrder.getPreOrderId()!=null){
// checkPreTime(mesProductOrder);
// }
if(mesProductOrder.getSaleType().equals(MesConstants.MES_PRODUCT_ORDER_PACKING)){
if (mesProductOrder.getSaleType().equals(MesConstants.MES_PRODUCT_ORDER_PACKING)) {
mesProductOrder.setDispatchId(5L);//包装工艺路线ID
mesProductOrder.setSaleOrderId(0L);
mesProductOrder.setSaleOrderFlag(MesConstants.MES_ORDER_BIND_SAFE_FLAG_NO);
mesProductOrder.setMaterialId(0L);
mesProductOrder.setMaterialBomId(0L);
mesProductOrder.setSaleAmount(mesProductOrder.getPlanAmount());
}else{
} else {
//校验同一工艺路线时间重叠
checkSameProcessTimeClash(mesProductOrder);
//销售订单添加工单:校验是否超出销售数量
@ -119,6 +119,17 @@ public class MesProductOrderServiceImpl implements IMesProductOrderService {
if (mesProductOrder.getProduceMaterialId() == null) {
throw new ServiceException("请选择生产物料");
}
//校验此生产物料是否在销售订单成品物料的生产bom中
MesMaterialBom queryMaterialBom = new MesMaterialBom();
queryMaterialBom.setMaterialId(mesProductOrder.getProduceMaterialId());
queryMaterialBom.setParentId(mesProductOrder.getMaterialBomId());
queryMaterialBom.setActiveFlag(MesConstants.MES_MATERIAL_BOM_ACTIVE_FLAG_NORMAL);
List<MesMaterialBom> mesMaterialBoms = mesMaterialBomMapper.selectMesMaterialBomList(queryMaterialBom);
if (mesMaterialBoms == null || mesMaterialBoms.isEmpty()) {
throw new ServiceException("所选择生产物料不在选择的成品bom中");
}
}
}
@ -180,6 +191,7 @@ public class MesProductOrderServiceImpl implements IMesProductOrderService {
/**
*
*
* @param mesProductOrder
*/
private void checkPreTime(MesProductOrder mesProductOrder) {
@ -188,8 +200,8 @@ public class MesProductOrderServiceImpl implements IMesProductOrderService {
long prePlanEndTimeL = prePlanEndTime.getTime();
Date planBeginTime = mesProductOrder.getPlanBeginTime();
long planBeginTimeL = planBeginTime.getTime();
if(planBeginTimeL < prePlanEndTimeL){
throw new ServiceException("计划开始时间不能小于前置任务的计划结束时间:"+prePlanEndTime);
if (planBeginTimeL < prePlanEndTimeL) {
throw new ServiceException("计划开始时间不能小于前置任务的计划结束时间:" + prePlanEndTime);
}
}
@ -331,8 +343,8 @@ public class MesProductOrderServiceImpl implements IMesProductOrderService {
String productOrderStatus = dbProductOrder.getOrderStatus();
// 工单状态0-待发布1-已发布2-已完成3-已开始4-暂停8-已撤回9-已删除
//已发布和已开始的可以改为暂停
if(!productOrderStatus.equals(MesConstants.PUBLISHED) &&
!productOrderStatus.equals(MesConstants.BEGIN)){
if (!productOrderStatus.equals(MesConstants.PUBLISHED) &&
!productOrderStatus.equals(MesConstants.BEGIN)) {
String orderStatusPrompt = MesConstants.ORDER_STATUS_PROMPT_MAP.get(productOrderStatus);
throw new ServiceException(String.format("此生产任务已经%s,不能暂停!", orderStatusPrompt));
}
@ -357,7 +369,7 @@ public class MesProductOrderServiceImpl implements IMesProductOrderService {
String productOrderStatus = dbProductOrder.getOrderStatus();
// 工单状态0-待发布1-已发布2-已完成3-已开始4-暂停8-已撤回9-已删除
//已暂停的可以改为已开始
if(!productOrderStatus.equals(MesConstants.PAUSE)){
if (!productOrderStatus.equals(MesConstants.PAUSE)) {
String orderStatusPrompt = MesConstants.ORDER_STATUS_PROMPT_MAP.get(productOrderStatus);
throw new ServiceException(String.format("此生产任务已经%s,不能继续开始!", orderStatusPrompt));
}
@ -371,7 +383,6 @@ public class MesProductOrderServiceImpl implements IMesProductOrderService {
}
/**
* BOM
*

@ -347,6 +347,7 @@
<where>
mpo.order_status not in ('9')
<if test="orderCode != null and orderCode != ''">and mpo.order_code like concat('%', #{orderCode},'%')</if>
<if test="saleType != null and saleType != ''">and mpo.sale_type = #{saleType}</if>
<if test="preOrderCode != null and preOrderCode != ''">and mpo.pre_order_code like concat('%', #{preOrderCode},'%')</if>
<if test="saleorderCode != null and saleorderCode != ''">and mpo.saleorder_code like concat('%', #{saleorderCode},'%')</if>
<if test="materialCode != null and materialCode != ''">and bmi.material_code like concat('%', #{materialCode},'%')</if>

@ -359,7 +359,7 @@
<if test="planStatus != null and planStatus != ''">and mpp.plan_status = #{planStatus}</if>
<if test="incompleteFlag != null and incompleteFlag != ''">and mpp.plan_status in ('1','2')</if>
</where>
order by mpp.plan_begin_time
order by mpp.plan_id desc
</select>

@ -49,6 +49,9 @@ public class WmsApiController extends BaseController {
@Autowired
private IWmsProductOutstockService wmsProductOutstockService;
@Autowired
private IWmsTransferService wmsTransferService;
@Autowired
private IWmsErpScheduledTaskService wmsErpScheduledTaskService;
@ -103,7 +106,6 @@ public class WmsApiController extends BaseController {
}
/**
*
*/
@ -111,7 +113,7 @@ public class WmsApiController extends BaseController {
@Log(title = "原材料入库记录", businessType = BusinessType.INSERT)
@PostMapping(("/addRawInstock"))
public AjaxResult addRawInstock(@Validated @RequestBody WmsRawInstockVo wmsRawInstockVo) {
return toAjax(wmsRawInstockService.insertWmsRawInstock(wmsRawInstockVo));
return success(wmsRawInstockService.insertWmsRawInstock(wmsRawInstockVo));
}
/**
@ -130,7 +132,7 @@ public class WmsApiController extends BaseController {
@Log(title = "原材料出库记录", businessType = BusinessType.CONFIRM)
@PostMapping(("/directRawOutstock"))
public AjaxResult directRawOutstock(@RequestBody WmsRawOutstock wmsRawOutstock) {
return toAjax(wmsRawOutstockService.directRawOutstock(wmsRawOutstock));
return success(wmsRawOutstockService.directRawOutstock(wmsRawOutstock));
}
@ -218,10 +220,9 @@ public class WmsApiController extends BaseController {
}
/**
* ERP
*
* @return
*/
@PostMapping(("/synchronizeInventoryInformationToERP"))
@ -231,6 +232,7 @@ public class WmsApiController extends BaseController {
/**
* ERP
*
* @return
*/
@PostMapping(("/synchronizeRawMaterialDeliveryInformationToERP"))
@ -240,6 +242,7 @@ public class WmsApiController extends BaseController {
/**
* ERP
*
* @param days days
* @return
*/
@ -250,6 +253,7 @@ public class WmsApiController extends BaseController {
/**
* ERP
*
* @param days days
* @return
*/
@ -268,4 +272,13 @@ public class WmsApiController extends BaseController {
return toAjax(wmsRawInstockService.continueRawInstock(wmsRawInstockContinueVo));
}
/**
*
*/
@GetMapping(("/checkSemiOutstock"))
public AjaxResult checkSemiOutstock(WmsTransfer wmsTransfer) {
return success(wmsTransferService.checkSemiOutstock(wmsTransfer));
}
}

@ -101,7 +101,8 @@ public class WmsMobileController extends BaseController {
@Log(title = "原材料入库记录", businessType = BusinessType.INSERT)
@PostMapping(("/addRawInstock"))
public AjaxResult addRawInstock(@Validated @RequestBody WmsRawInstockVo wmsRawInstockVo) {
return toAjax(wmsRawInstockService.insertWmsRawInstock(wmsRawInstockVo));
wmsRawInstockService.insertWmsRawInstock(wmsRawInstockVo);
return toAjax(1);
}

@ -1,5 +1,6 @@
package com.hw.wms.service;
import java.math.BigDecimal;
import java.util.List;
import com.hw.wms.domain.WmsRawInstock;
import com.hw.wms.domain.vo.WmsRawBackVo;
@ -72,7 +73,7 @@ public interface IWmsRawInstockService
* @param wmsRawInstockVo
* @return
*/
public int insertWmsRawInstock(WmsRawInstockVo wmsRawInstockVo);
public BigDecimal insertWmsRawInstock(WmsRawInstockVo wmsRawInstockVo);
/**

@ -1,5 +1,6 @@
package com.hw.wms.service;
import java.math.BigDecimal;
import java.util.List;
import com.alibaba.fastjson2.JSONObject;
@ -139,7 +140,7 @@ public interface IWmsRawOutstockService
* @param wmsRawOutstock
* @return
*/
public int directRawOutstock(WmsRawOutstock wmsRawOutstock);
public BigDecimal directRawOutstock(WmsRawOutstock wmsRawOutstock);
/**
* wcswcsagv

@ -94,4 +94,12 @@ public interface IWmsTransferService
* @return
*/
public int transferInstock(WmsTransferDetail wmsTransferDetail);
/**
*
*
* @param wmsTransfer
* @return
*/
public int checkSemiOutstock(WmsTransfer wmsTransfer);
}

@ -146,7 +146,7 @@ public class WmsRawInstockServiceImpl implements IWmsRawInstockService {
*/
@Transactional(rollbackFor = Exception.class)
@Override
public int insertWmsRawInstock(WmsRawInstockVo wmsRawInstockVo) {
public BigDecimal insertWmsRawInstock(WmsRawInstockVo wmsRawInstockVo) {
String materialBarcode = wmsRawInstockVo.getMaterialBarcode();
R<MesBaseBarcodeInfo> baseBarcodeInfoR = remoteMesService.getBarcode(materialBarcode, SecurityConstants.INNER);
if (baseBarcodeInfoR == null) {
@ -206,9 +206,7 @@ public class WmsRawInstockServiceImpl implements IWmsRawInstockService {
int rows = wmsRawInstockMapper.insertWmsRawInstock(wmsRawInstock);
//更新库位库存
updateRawStock(wmsRawInstock, wmsRawInstockVo, baseLocation, baseBarcodeInfo, userName, currentDate);
return rows;
return updateRawStock(wmsRawInstock, wmsRawInstockVo, baseLocation, baseBarcodeInfo, userName, currentDate);
}
@ -221,7 +219,7 @@ public class WmsRawInstockServiceImpl implements IWmsRawInstockService {
* @param userName
* @param currentDate
*/
public void updateRawStock(WmsRawInstock wmsRawInstock, WmsRawInstockVo wmsRawInstockVo, WmsBaseLocation baseLocation
public BigDecimal updateRawStock(WmsRawInstock wmsRawInstock, WmsRawInstockVo wmsRawInstockVo, WmsBaseLocation baseLocation
, MesBaseBarcodeInfo baseBarcodeInfo, String userName, Date currentDate) {
String barcode = baseBarcodeInfo.getBarcodeInfo();
String locationCode = wmsRawInstock.getLocationCode();
@ -239,12 +237,14 @@ public class WmsRawInstockServiceImpl implements IWmsRawInstockService {
String batchFlag = baseBarcodeInfo.getBatchFlag();
//如果是同一库位入同一批次,则更新数量
WmsRawStock wmsRawStock = wmsRawStockMapper.selectRawStockByBarcode(barcode);
BigDecimal newTotalAmount = BigDecimal.ZERO;
if (wmsRawStock != null) {
// wmsRawStock.setQualityStatus(wmsRawInstockVo.getQualityStatus());
if (!batchFlag.equals(MesConstants.IS_BATCH)) {
throw new ServiceException("此物料条码已经入库");
}
wmsRawStock.setTotalAmount(wmsRawStock.getTotalAmount().add(wmsRawInstockVo.getInstockAmount()));
newTotalAmount = wmsRawStock.getTotalAmount().add(wmsRawInstockVo.getInstockAmount());
wmsRawStock.setTotalAmount(newTotalAmount);
wmsRawStock.setUpdateBy(userName);
wmsRawStock.setUpdateDate(currentDate);
wmsRawStockMapper.updateWmsRawStock(wmsRawStock);
@ -258,7 +258,8 @@ public class WmsRawInstockServiceImpl implements IWmsRawInstockService {
wmsRawStock.setWarehouseFloor(baseLocation.getWarehouseFloor());
// wmsRawStock.setLastOutstockTime(baseBarcodeInfo.getLastOutstockDate());
// wmsRawStock.setQualityStatus(wmsRawInstockVo.getQualityStatus());
wmsRawStock.setTotalAmount(wmsRawInstockVo.getInstockAmount());
newTotalAmount = wmsRawInstockVo.getInstockAmount();
wmsRawStock.setTotalAmount(newTotalAmount);
wmsRawStock.setSaleOrderId(baseBarcodeInfo.getSaleOrderId());
wmsRawStock.setSafeFlag(baseBarcodeInfo.getSafeFlag());
wmsRawStock.setInstockDate(baseBarcodeInfo.getAcceptedDate());
@ -267,6 +268,8 @@ public class WmsRawInstockServiceImpl implements IWmsRawInstockService {
wmsRawStock.setCreateDate(currentDate);
wmsRawStockMapper.insertWmsRawStock(wmsRawStock);
}
return newTotalAmount;
}
@ -386,12 +389,12 @@ public class WmsRawInstockServiceImpl implements IWmsRawInstockService {
}
MesBaseBarcodeInfo baseBarcodeInfo = baseBarcodeInfoR.getData();
if (baseBarcodeInfo == null) {
throw new ServiceException("物料条码有误");
throw new ServiceException("物料条码有误");
}
if (StringUtils.isEmpty(baseBarcodeInfo.getProductBarcode())) {
throw new ServiceException("此物料条码信息有误");
}
// if (StringUtils.isEmpty(baseBarcodeInfo.getProductBarcode())) {
// throw new ServiceException("此物料条码信息有误");
// }
String wcsAgvContinueUrl = wmsConfig.getWcsAgvContinueUrl();
RestTemplate restTemplate = new RestTemplate();

@ -1199,7 +1199,7 @@ public class WmsRawOutstockServiceImpl implements IWmsRawOutstockService {
*/
@Transactional(rollbackFor = Exception.class)
@Override
public int directRawOutstock(WmsRawOutstock wmsRawOutstock) {
public BigDecimal directRawOutstock(WmsRawOutstock wmsRawOutstock) {
//出库要求 0申请出库1申请审核出库2直接出库
String materialBarcode = wmsRawOutstock.getMaterialBarcode();
String locationCode = wmsRawOutstock.getLocationCode();
@ -1237,13 +1237,12 @@ public class WmsRawOutstockServiceImpl implements IWmsRawOutstockService {
this.insertRawOutstockDetail(wmsRawOutstock, locationCode, materialBarcode, batchCode,
userName, currentDate);
directOutstockUpdateRawStock(locationCode, materialBarcode, outstockAmount, userName, currentDate);
return directOutstockUpdateRawStock(locationCode, materialBarcode, outstockAmount, userName, currentDate);
return 1;
}
public void directOutstockUpdateRawStock(String locationCode, String materialBarcode, BigDecimal outstockAmount,
public BigDecimal directOutstockUpdateRawStock(String locationCode, String materialBarcode, BigDecimal outstockAmount,
String userName, Date currentDate) {
WmsRawStock wmsRawStock = wmsRawStockMapper.selectRawStockByBarcode(materialBarcode);
if (wmsRawStock == null) {
@ -1266,6 +1265,7 @@ public class WmsRawOutstockServiceImpl implements IWmsRawOutstockService {
wmsRawStockMapper.updateWmsRawStock(wmsRawStock);
}
return updatedTotalAmount;
}
}

@ -154,6 +154,7 @@ public class WmsStockTotalServiceImpl implements IWmsStockTotalService {
String materialClassfication = wmsStockTotal.getMaterialClassfication();
Long warehouseId = wmsStockTotal.getWarehouseId();
//五楼原料周转区仓库ID
if (warehouseId.equals(wmsConfig.getFifthCabinetWarehouseId()) && materialClassfication.equals(MesConstants.MES_MATERIAL_CLASSFICATION_VIRTUAL)) {
wmsStockTotal.setMaterialId(wmsStockTotal.getProductId());
wmsStockTotal.setAccessoriesFlag(null);

@ -425,5 +425,19 @@ public class WmsTransferServiceImpl implements IWmsTransferService {
}
/**
*
*
* @param wmsTransfer
* @return
*/
@Override
public int checkSemiOutstock(WmsTransfer wmsTransfer) {
List<WmsTransfer> wmsTransfers = wmsTransferMapper.selectWmsTransferList(wmsTransfer);
if(wmsTransfers==null || wmsTransfers.isEmpty()){
throw new ServiceException("此物料还未从半成品库出库,不能生成成品条码");
}
return 1;
}
}

@ -64,3 +64,12 @@ export function addInternalBarcode(data) {
data: data
})
}
//根据原材料条码判断是否有半成品出库
export function checkSemiOutstock(query) {
return request({
url: '/wms/api/checkSemiOutstock',
method: 'get',
params: query
})
}

@ -50,3 +50,18 @@ export function delMaterialBom(materialBomId) {
method: 'delete'
})
}
// bom状态修改
export function changeBomStatus(materialBomId, activeFlag) {
const data = {
materialBomId,
activeFlag
}
return request({
url: '/mes/materialBom',
method: 'put',
data: data
})
}

@ -95,7 +95,7 @@
>配对码
</el-button>
<el-button
<!--el-button
size="mini"
type="text"
plain
@ -103,7 +103,7 @@
@click="regenerateBarcode(scope.row)"
v-if="scope.row.printFlag ==='1' && scope.row.barcodeType !== BARCODE_TYPE.BIND_BARCODE"
>重新生成
</el-button>
</el-button-->
&nbsp;&nbsp;&nbsp;&nbsp;
<el-button
size="mini"
@ -217,24 +217,25 @@
<el-dialog :title="internalTitle" :visible.sync="internalOpen" width="500px" append-to-body>
<el-form ref="internalForm" :model="internalForm" :rules="internalRules" label-width="100px">
<el-form-item label="成品条码" prop="productBarcode">
<el-input type="textarea" v-model="internalForm.productBarcode" placeholder="请输入或扫描成品条码,多个以,隔开" class="input-with-select">
<el-input type="textarea" v-model="internalForm.productBarcode" placeholder="请输入或扫描成品条码,多个以,隔开"
class="input-with-select">
<el-button slot="append" icon="el-icon-full-screen"></el-button>
</el-input>
</el-form-item>
<!-- <el-form-item label="物料ID" prop="materialId" v-if="false">-->
<!-- <el-input v-model="internalForm.materialId" placeholder="请输入物料ID"/>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="物料编码" prop="materialCode">-->
<!-- <el-input v-model="internalForm.materialCode" disabled/>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="物料名称" prop="materialName">-->
<!-- <el-input v-model="internalForm.materialName" :disabled="true"/>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="物料ID" prop="materialId" v-if="false">-->
<!-- <el-input v-model="internalForm.materialId" placeholder="请输入物料ID"/>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="物料编码" prop="materialCode">-->
<!-- <el-input v-model="internalForm.materialCode" disabled/>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="物料名称" prop="materialName">-->
<!-- <el-input v-model="internalForm.materialName" :disabled="true"/>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="物料规格" prop="materialSpec">-->
<!-- <el-input v-model="internalForm.materialSpec" :disabled="true"/>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="物料规格" prop="materialSpec">-->
<!-- <el-input v-model="internalForm.materialSpec" :disabled="true"/>-->
<!-- </el-form-item>-->
<el-form-item label="生产日期" prop="productionDate">
<el-date-picker clearable
@ -275,8 +276,10 @@ import {
printProductBarcodes,
printBindBarcodes,
selectProductBarcodeInfoByBarcodeInfo,
addInternalBarcode, regenerateBarcode
addInternalBarcode, regenerateBarcode,
checkSemiOutstock
} from "@/api/board/barcode";
import {getMaterialInfoByMaterialId} from "@/api/board";
export default {
name: "Barcode",
@ -436,9 +439,9 @@ export default {
INTERNAL: "2",//
INTERNAL_PRODUCT: "3",//
},
SAFE_FLAG:{
SAFE_FLAG: {
YES: '1',//
NO:"0"
NO: "0"
},
printNumber: null,
};
@ -512,6 +515,7 @@ export default {
planDetailCode: this.defineData.planDetailCode,
saleOrderId: this.defineData.saleOrderId,
saleorderCode: this.defineData.saleorderCode,
materialBomId: this.defineData.materialBomId,
batchFlag: '0',
amount: 1,
}
@ -712,20 +716,33 @@ export default {
this.$refs["form"].validate(valid => {
if (valid) {
this.submitLoading = true;
if(this.defineData.barcodeType && this.defineData.barcodeType == this.BARCODE_TYPE_PARAM.SPLIT_BIND_BARCODE){
this.form.barcodeAmount = 1;
if (this.defineData.barcodeType && this.defineData.barcodeType === this.BARCODE_TYPE_PARAM.PRODUCT) {
checkSemiOutstock({productBatch: this.form.productBarcode}).then(e => {
this.addProductBarcode();
}).finally(e => {
this.submitLoading = false;
});
} else {
if (this.defineData.barcodeType && this.defineData.barcodeType === this.BARCODE_TYPE_PARAM.SPLIT_BIND_BARCODE) {
this.form.barcodeAmount = 1;
}
this.addProductBarcode();
}
addProductBarcode(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.addProductBarcodeOpen = false;
this.getList();
}).finally(e => {
this.submitLoading = false;
});
}
});
},
addProductBarcode() {
addProductBarcode(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.addProductBarcodeOpen = false;
this.getList();
}).finally(e => {
this.submitLoading = false;
});
},
//
resetInternal() {
this.internalForm = {
@ -871,8 +888,6 @@ export default {
},
}
};
</script>

@ -1078,7 +1078,7 @@ export default {
this.submitLoading = true;
if (this.stockType === this.STOCK_TYPE.INSTOCK) {//
addRawInstock(this.wmsForm).then(response => {
this.$modal.msgSuccess("板材入库成功");
this.$modal.msgSuccess("板材入库成功,当前库存为:"+response.data);
this.cancel();
}).finally(e => {
this.submitLoading = false;
@ -1159,15 +1159,11 @@ export default {
}
});
},
directRawOutstock() {
directRawOutstock(this.wmsForm).then(response => {
this.$modal.msgSuccess("板材领取成功");
this.$modal.msgSuccess("板材领取成功,当前库存:"+response.data);
this.cancel();
}).finally(e => {
this.submitLoading = false;

@ -84,16 +84,6 @@
>展开/折叠
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-upload2"
size="mini"
@click="handleImport"
>BOM导入
</el-button>
</el-col>
<!--right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar-->
</el-row>
@ -135,6 +125,17 @@
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" v-if="columns[10].visible"/>
<el-table-column label="状态" align="center" width="100">
<template slot-scope="scope">
<el-switch
v-model="scope.row.activeFlag"
active-value="1"
inactive-value="0"
@change="handleStatusChange(scope.row)"
></el-switch>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
@ -284,7 +285,8 @@ import {
getMaterialBom,
delMaterialBom,
addMaterialBom,
updateMaterialBom
updateMaterialBom,
changeBomStatus
} from "@/api/mes/materialBom";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
@ -662,7 +664,20 @@ export default {
this.$modal.msgError("该物料BOM已被生产工单选择无法删除");
return;
});
}
},
//
handleStatusChange(row) {
let text = row.status === "0" ? "启用" : "停用";
this.$modal.confirm('确认要"' + text + '""' + row.materialName + '"bom吗').then(function() {
return changeBomStatus(row.materialBomId, row.activeFlag);
}).then(() => {
this.$modal.msgSuccess(text + "成功");
}).catch(function() {
row.activeFlag = row.activeFlag === "0" ? "1" : "0";
});
},
}
};
</script>

@ -139,7 +139,8 @@ export default {
activeFlag: '1',
deletedFlag: null,
approveDate: null,
erpModifyDate: null
erpModifyDate: null,
materialClassfication:'1'
},
};
},

@ -9,6 +9,17 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="销售类型" prop="saleType">
<el-select v-model="queryParams.saleType" placeholder="请选择销售类型" clearable>
<el-option
v-for="dict in dict.type.mes_sale_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="销售订单编号" prop="saleorderCode">
<el-input
v-model="queryParams.saleorderCode"
@ -17,6 +28,8 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="成品编号" prop="materialCode">
<el-input
v-model="queryParams.materialCode"
@ -457,12 +470,12 @@
</el-radio>
</el-radio-group>
</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="请点击右侧检索物料" readonly>
<el-button slot="append" icon="el-icon-search" @click="handleMaterialAdd"></el-button>
</el-input>
</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-option
v-for="item in materialBomList"
@ -478,7 +491,7 @@
<el-button slot="append" icon="el-icon-search" @click="handleProduceMaterialAdd"></el-button>
</el-input>
</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-option
v-for="item in routeList"
@ -488,6 +501,16 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item label="柜体渠道" prop="cabinetChannel" v-if="form.dispatchId===4">
<el-radio-group v-model="form.cabinetChannel">
<el-radio
v-for="dict in dict.type.mes_product_order_canbinet_channel"
:key="dict.value"
:label="dict.value"
>{{ dict.label }}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="计划数量" prop="planAmount">
<el-input-number v-model="form.planAmount" placeholder="请输入计划数量"/>
</el-form-item>
@ -645,6 +668,7 @@ export default {
pageNum: 1,
pageSize: 10,
orderCode: null,
saleType:null,
saleOrderId: null,
saleorderCode: null,
saleorderLinenumber: null,
@ -928,6 +952,7 @@ export default {
pageNum: 1,
pageSize: 10,
orderCode: null,
saleType:null,
saleOrderId: null,
saleorderCode: null,
saleorderLinenumber: null,

Loading…
Cancel
Save