1、固定条码增加采购订单的选择
2、成品入库记录查询
3、合并新增原材料条码生成bom主键问题修改(从提资单bom获取主键)
4、检验规则增加检验项目问题
5、质检工单查询完善
6、质检结果完善
7、一楼工序增加领料
8、成品出库记录查询
master
xs 3 weeks ago
parent 4dbcd896a4
commit 105e2a0780

@ -82,6 +82,9 @@ public class MesBaseBarcodeInfoServiceImpl implements IMesBaseBarcodeInfoService
@Autowired
private MesSaleOrderRelateMapper mesSaleOrderRelateMapper;
@Autowired
private MesRaiseCapitalBomMapper mesRaiseCapitalBomMapper;
@Autowired
private MesConfig mesConfig;
@ -1270,9 +1273,9 @@ public class MesBaseBarcodeInfoServiceImpl implements IMesBaseBarcodeInfoService
throw new ServiceException("未找到生产任务");
}
if (!mesProductOrder.getSaleType().equals(MesConstants.MES_PRODUCT_ORDER_INTERNAL)) {
throw new ServiceException("此生产任务为外部销售,不能直接出库");
}
// if (!mesProductOrder.getSaleType().equals(MesConstants.MES_PRODUCT_ORDER_INTERNAL)) {
// throw new ServiceException("此生产任务为外部销售,不能直接出库");
// }
return 1;
@ -1513,14 +1516,30 @@ public class MesBaseBarcodeInfoServiceImpl implements IMesBaseBarcodeInfoService
virtualMaterialBom.setActiveFlag(MesConstants.MES_MATERIAL_ACTIVE_FLAG_NORMAL);
virtualMaterialBom.setCreateBy(userName);
virtualMaterialBom.setCreateTime(currentDate);
//用来获取主键使用
MesRaiseCapitalBom mesRaiseCapitalBom = new MesRaiseCapitalBom();
mesRaiseCapitalBom.setTaskCode("delete");
mesRaiseCapitalBom.setParentId(0L);
mesRaiseCapitalBom.setMaterialId(materialId);
mesRaiseCapitalBom.setStandardAmount(BigDecimal.ONE);
mesRaiseCapitalBom.setActiveFlag("0");
mesRaiseCapitalBom.setErpMaterialId(materialId);
mesRaiseCapitalBomMapper.insertMesRaiseCapitalBom(mesRaiseCapitalBom);
Long raiseCaptialId = mesRaiseCapitalBom.getRaiseCapitalId();
mesRaiseCapitalBomMapper.deleteMesRaiseCapitalBomByRaiseCapitalId(raiseCaptialId);
virtualMaterialBom.setMaterialBomId(raiseCaptialId);
mesMaterialBomMapper.insertMesMaterialBom(virtualMaterialBom);
toUpdatedMaterialBoms.forEach(umb -> {
MesMaterialBom queryChildBom = new MesMaterialBom();
queryChildBom.setParentId(umb.getParentId());
queryChildBom.setParentId(umb.getMaterialBomId());
List<MesMaterialBom> childBomList = mesMaterialBomMapper.selectMesMaterialBomList(queryChildBom);
for (MesMaterialBom childBom : childBomList) {
childBom.setAncestors(childBom.getAncestors() + "," + virtualMaterialBom.getMaterialBomId());
childBom.setAncestors("0," + virtualMaterialBom.getMaterialBomId() + "," + childBom.getParentId());
childBom.setUpdateBy(userName);
childBom.setUpdateTime(currentDate);
mesMaterialBomMapper.updateMesMaterialBom(childBom);

@ -525,6 +525,10 @@ public class MesPurchaseOrderServiceImpl implements IMesPurchaseOrderService {
dateStr = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, new Date());
}
//查询采购订单 采购订单号不在原材料入库记录中当前日期入库的并且同一物料的采购订单,并且采购订单是采购入库完成的。
List<MesPurchaseOrder> mesPurchaseOrderList = mesPurchaseOrderMapper.selectNotRawInstockPurchaseOrderList(dateStr);
List<MesPurchaseOrder> autoStockPurchaseOrderList = new ArrayList<>();
if (mesPurchaseOrderList != null && !mesPurchaseOrderList.isEmpty()) {

@ -106,6 +106,7 @@
<if test="printPerson != null and printPerson != ''">and bbi.print_person = #{printPerson}</if>
<if test="printFlag != null and printFlag != ''">and bbi.print_flag = #{printFlag}</if>
<if test="batchFlag != null and batchFlag != ''">and bbi.batch_flag = #{batchFlag}</if>
<if test="barcodeTypeStr != null and barcodeTypeStr != ''">and bbi.barcode_type in (${barcodeTypeStr})</if>
<if test="barcodeType != null and barcodeType != ''">and bbi.barcode_type = #{barcodeType}</if>
<if test="singleFlag != null and singleFlag != ''">and bbi.single_flag = #{singleFlag}</if>
<if test="barcodeInfo != null and barcodeInfo != ''">and bbi.barcode_info = #{barcodeInfo}</if>

@ -83,6 +83,7 @@
keyProperty="materialBomId">
insert into mes_material_bom
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="materialBomId != null">material_bom_id,</if>
<if test="parentId != null">parent_id,</if>
<if test="ancestors != null">ancestors,</if>
<if test="materialClassfication != null and materialClassfication != ''">material_classfication,</if>
@ -103,6 +104,7 @@
<if test="assembleTime != null">assemble_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="materialBomId != null">#{materialBomId},</if>
<if test="parentId != null">#{parentId},</if>
<if test="ancestors != null">#{ancestors},</if>
<if test="materialClassfication != null and materialClassfication != ''">#{materialClassfication},</if>

@ -376,7 +376,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
mpo.fentry_id,
mpo.po_no,
mpo.document_status,
mpo.material_id,
mbmi.material_id,
mbmi.material_code,
mbmi.material_name,
mbmi.material_spec,

@ -6,14 +6,16 @@ public class Main {
public static void main(String[] args) {
// Press Alt+Enter with your caret at the highlighted text to see how
// IntelliJ IDEA suggests fixing it.
System.out.printf("Hello and welcome!");
// System.out.printf("Hello and welcome!");
//
// // Press Shift+F10 or click the green arrow button in the gutter to run the code.
// for (int i = 1; i <= 5; i++) {
//
// // Press Shift+F9 to start debugging your code. We have set one breakpoint
// // for you, but you can always add more by pressing Ctrl+F8.
// System.out.println("i = " + i);
// }
// Press Shift+F10 or click the green arrow button in the gutter to run the code.
for (int i = 1; i <= 5; i++) {
// Press Shift+F9 to start debugging your code. We have set one breakpoint
// for you, but you can always add more by pressing Ctrl+F8.
System.out.println("i = " + i);
}
}
}

@ -128,7 +128,7 @@ public class QmsCheckRuleController extends BaseController
@GetMapping("/getCheckProjects")
public AjaxResult getCheckProjects(QmsCheckProject checkProject)
{
startPage();
// startPage();
List<QmsCheckProject> checkProjects = qmsCheckProjectService.selectQmsCheckProjectList(checkProject);
return success(checkProjects);
}

@ -32,6 +32,10 @@ public class QmsCheckInstanceFile extends BaseEntity
private String filePath;
private String name;
private String url;
public String getFilePath() {
return filePath;
}
@ -77,6 +81,22 @@ public class QmsCheckInstanceFile extends BaseEntity
return faultFile;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

@ -85,6 +85,8 @@ public class QmsCheckResult extends BaseEntity
private String materialName;
private String materialSpec;
/** 质检结果详情信息 */
private List<QmsCheckResultDetail> qmsCheckResultDetailList;
@ -266,6 +268,14 @@ public class QmsCheckResult extends BaseEntity
this.materialName = materialName;
}
public String getMaterialSpec() {
return materialSpec;
}
public void setMaterialSpec(String materialSpec) {
this.materialSpec = materialSpec;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

@ -58,4 +58,13 @@ public interface QmsCheckInstanceFileMapper
* @return
*/
public int deleteQmsCheckInstanceFileByCheckInstanceFileIds(Long[] checkInstanceFileIds);
/**
* ,
*
* @param qmsCheckInstanceFile
* @return
*/
public List<QmsCheckInstanceFile> selectQmsCheckInstanceFileConvertList(QmsCheckInstanceFile qmsCheckInstanceFile);
}

@ -1,13 +1,17 @@
package com.hw.qms.service.impl;
import java.util.List;
import com.hw.common.core.utils.DateUtils;
import com.hw.common.security.utils.SecurityUtils;
import com.hw.qms.domain.QmsQualityInstance;
import com.hw.qms.mapper.QmsCheckInstanceFileMapper;
import com.hw.qms.mapper.QmsQualityInstanceMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import com.hw.common.core.utils.StringUtils;
import org.springframework.transaction.annotation.Transactional;
import com.hw.qms.domain.QmsCheckInstanceFile;
@ -22,12 +26,13 @@ import com.hw.qms.service.IQmsQualityInstanceActivityService;
* @date 2024-04-22
*/
@Service
public class QmsQualityInstanceActivityServiceImpl implements IQmsQualityInstanceActivityService
{
public class QmsQualityInstanceActivityServiceImpl implements IQmsQualityInstanceActivityService {
@Autowired
private QmsQualityInstanceActivityMapper qmsQualityInstanceActivityMapper;
@Autowired
private QmsQualityInstanceMapper qmsQualityInstanceMapper;
@Autowired
private QmsCheckInstanceFileMapper qmsCheckInstanceFileMapper;
/**
*
@ -36,8 +41,7 @@ public class QmsQualityInstanceActivityServiceImpl implements IQmsQualityInstanc
* @return
*/
@Override
public QmsQualityInstanceActivity selectQmsQualityInstanceActivityByInstanceActivityId(Long instanceActivityId)
{
public QmsQualityInstanceActivity selectQmsQualityInstanceActivityByInstanceActivityId(Long instanceActivityId) {
return qmsQualityInstanceActivityMapper.selectQmsQualityInstanceActivityByInstanceActivityId(instanceActivityId);
}
@ -48,15 +52,25 @@ public class QmsQualityInstanceActivityServiceImpl implements IQmsQualityInstanc
* @return
*/
@Override
public List<QmsQualityInstanceActivity> selectQmsQualityInstanceActivityList(QmsQualityInstanceActivity qmsQualityInstanceActivity)
{
public List<QmsQualityInstanceActivity> selectQmsQualityInstanceActivityList(QmsQualityInstanceActivity qmsQualityInstanceActivity) {
return qmsQualityInstanceActivityMapper.selectQmsQualityInstanceActivityList(qmsQualityInstanceActivity);
}
@Override
public List<QmsQualityInstanceActivity> selectQmsQualityInstanceActivitynoStatus(QmsQualityInstanceActivity qmsQualityInstanceActivity) {
return qmsQualityInstanceActivityMapper.selectQmsQualityInstanceActivitynoStatus(qmsQualityInstanceActivity);
List<QmsQualityInstanceActivity> qmsQualityInstanceActivities = qmsQualityInstanceActivityMapper.selectQmsQualityInstanceActivitynoStatus(qmsQualityInstanceActivity);
if (qmsQualityInstanceActivities != null) {
for (QmsQualityInstanceActivity qmsQualityInstanceActivity1 : qmsQualityInstanceActivities) {
QmsCheckInstanceFile queryCheckInstanceFile = new QmsCheckInstanceFile();
queryCheckInstanceFile.setTargetType("1");
queryCheckInstanceFile.setTargetId(qmsQualityInstanceActivity1.getInstanceActivityId());
List<QmsCheckInstanceFile> qmsCheckInstanceFileList = qmsCheckInstanceFileMapper.selectQmsCheckInstanceFileConvertList(queryCheckInstanceFile);
qmsQualityInstanceActivity1.setQmsCheckInstanceFileList(qmsCheckInstanceFileList);
}
}
return qmsQualityInstanceActivities;
}
/**
@ -67,8 +81,7 @@ public class QmsQualityInstanceActivityServiceImpl implements IQmsQualityInstanc
*/
@Transactional
@Override
public int insertQmsQualityInstanceActivity(QmsQualityInstanceActivity qmsQualityInstanceActivity)
{
public int insertQmsQualityInstanceActivity(QmsQualityInstanceActivity qmsQualityInstanceActivity) {
QmsQualityInstanceActivity qms = new QmsQualityInstanceActivity();
qms.setProcessHandleStatus("2");
@ -91,7 +104,7 @@ public class QmsQualityInstanceActivityServiceImpl implements IQmsQualityInstanc
insertQmsCheckInstanceFile(activity);
qms.setProcessHandleStatus("1");
List<QmsQualityInstanceActivity> qmsQualityInstanceActivities1 = qmsQualityInstanceActivityMapper.selectQmsQualityInstanceActivityList(qms);
for (QmsQualityInstanceActivity q:qmsQualityInstanceActivities1){
for (QmsQualityInstanceActivity q : qmsQualityInstanceActivities1) {
q.setProcessHandleStatus("3");
q.setEndTime(DateUtils.getNowDate());
qmsQualityInstanceActivityMapper.updateQmsQualityInstanceActivity(q);
@ -109,8 +122,7 @@ public class QmsQualityInstanceActivityServiceImpl implements IQmsQualityInstanc
*/
@Transactional
@Override
public int updateQmsQualityInstanceActivity(QmsQualityInstanceActivity qmsQualityInstanceActivity)
{
public int updateQmsQualityInstanceActivity(QmsQualityInstanceActivity qmsQualityInstanceActivity) {
qmsQualityInstanceActivityMapper.deleteQmsCheckInstanceFileByTargetId(qmsQualityInstanceActivity.getInstanceActivityId());
insertQmsCheckInstanceFile(qmsQualityInstanceActivity);
return qmsQualityInstanceActivityMapper.updateQmsQualityInstanceActivity(qmsQualityInstanceActivity);
@ -124,8 +136,7 @@ public class QmsQualityInstanceActivityServiceImpl implements IQmsQualityInstanc
*/
@Transactional
@Override
public int deleteQmsQualityInstanceActivityByInstanceActivityIds(Long[] instanceActivityIds)
{
public int deleteQmsQualityInstanceActivityByInstanceActivityIds(Long[] instanceActivityIds) {
qmsQualityInstanceActivityMapper.deleteQmsCheckInstanceFileByTargetIds(instanceActivityIds);
return qmsQualityInstanceActivityMapper.deleteQmsQualityInstanceActivityByInstanceActivityIds(instanceActivityIds);
}
@ -138,8 +149,7 @@ public class QmsQualityInstanceActivityServiceImpl implements IQmsQualityInstanc
*/
@Transactional
@Override
public int deleteQmsQualityInstanceActivityByInstanceActivityId(Long instanceActivityId)
{
public int deleteQmsQualityInstanceActivityByInstanceActivityId(Long instanceActivityId) {
qmsQualityInstanceActivityMapper.deleteQmsCheckInstanceFileByTargetId(instanceActivityId);
return qmsQualityInstanceActivityMapper.deleteQmsQualityInstanceActivityByInstanceActivityId(instanceActivityId);
}
@ -149,20 +159,16 @@ public class QmsQualityInstanceActivityServiceImpl implements IQmsQualityInstanc
*
* @param qmsQualityInstanceActivity
*/
public void insertQmsCheckInstanceFile(QmsQualityInstanceActivity qmsQualityInstanceActivity)
{
public void insertQmsCheckInstanceFile(QmsQualityInstanceActivity qmsQualityInstanceActivity) {
List<QmsCheckInstanceFile> qmsCheckInstanceFileList = qmsQualityInstanceActivity.getQmsCheckInstanceFileList();
Long instanceActivityId = qmsQualityInstanceActivity.getInstanceActivityId();
if (StringUtils.isNotNull(qmsCheckInstanceFileList))
{
if (StringUtils.isNotNull(qmsCheckInstanceFileList)) {
List<QmsCheckInstanceFile> list = new ArrayList<QmsCheckInstanceFile>();
for (QmsCheckInstanceFile qmsCheckInstanceFile : qmsCheckInstanceFileList)
{
for (QmsCheckInstanceFile qmsCheckInstanceFile : qmsCheckInstanceFileList) {
qmsCheckInstanceFile.setTargetId(instanceActivityId);
list.add(qmsCheckInstanceFile);
}
if (list.size() > 0)
{
if (list.size() > 0) {
qmsQualityInstanceActivityMapper.batchQmsCheckInstanceFile(list);
}
}

@ -63,4 +63,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{checkInstanceFileId}
</foreach>
</delete>
<select id="selectQmsCheckInstanceFileConvertList" parameterType="QmsCheckInstanceFile" resultMap="QmsCheckInstanceFileResult">
select check_instance_file_id, target_type, target_id, fault_file as name,fault_file as url from qms_check_instance_file
<where>
<if test="targetType != null and targetType != ''"> and target_type = #{targetType}</if>
<if test="targetId != null "> and target_id = #{targetId}</if>
<if test="faultFile != null and faultFile != ''"> and fault_file = #{faultFile}</if>
</where>
</select>
</mapper>

@ -29,6 +29,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateTime" column="update_time" />
<result property="materialCode" column="material_code" />
<result property="materialName" column="material_name" />
<result property="materialSpec" column="material_spec" />
</resultMap>
<resultMap id="QmsCheckResultQmsCheckResultDetailResult" type="QmsCheckResult" extends="QmsCheckResultResult">
@ -199,7 +200,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectQmsCheckResultJoinList" parameterType="QmsCheckResult" resultMap="QmsCheckResultResult">
select qcr.check_result_id, qcr.material_type, qcr.material_id, qcr.material_batch, qcr.check_mode, qcr.check_sample, qcr.plan_code, qcr.plan_detail_code, qcr.saleorder_code,
qcr.po_no, qcr.check_status, qcr.check_rule_name,qcr.check_rule_type,mbmi.material_code,mbmi.material_name
qcr.po_no, qcr.check_status, qcr.check_rule_name,qcr.check_rule_type,mbmi.material_code,mbmi.material_name,mbmi.material_spec
from qms_check_result qcr left join mes_base_material_info mbmi on qcr.material_id=mbmi.material_id
<where>
<if test="checkRuleType != null and checkRuleType != ''"> and check_rule_type = #{checkRuleType}</if>

@ -332,6 +332,7 @@ public class WmsMobileController extends BaseController {
// WmsProductStock queryProductStock = new WmsProductStock();
// queryProductStock.setSaleorderCode(request.getParameter("salesorderCode"));
// queryProductStock.setStockType(WmsConstants.PRODUCT_STOCK_STOCK_TYPE_PRODUCT);
queryStockTotal.setWarehouseType(WmsConstants.WMS_WAREHOUSE_TYPE_AGV);
List<WmsStockTotal> wmsStockTotals = wmsStockTotalService.selectWmsStockTotalList4ProductApply(queryStockTotal);
return getDataTable(wmsStockTotals);
}

@ -3,6 +3,10 @@ package com.hw.wms.controller;
import java.util.List;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
import com.hw.common.core.constant.WmsConstants;
import com.hw.wms.domain.WmsBaseWarehouse;
import com.hw.wms.service.IWmsBaseWarehouseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
@ -35,6 +39,9 @@ public class WmsProductInstockController extends BaseController
@Autowired
private IWmsProductInstockService wmsProductInstockService;
@Autowired
private IWmsBaseWarehouseService wmsBaseWarehouseService;
/**
* ;
*/
@ -43,7 +50,7 @@ public class WmsProductInstockController extends BaseController
public TableDataInfo list(WmsProductInstock wmsProductInstock)
{
startPage();
List<WmsProductInstock> list = wmsProductInstockService.selectWmsProductInstockList(wmsProductInstock);
List<WmsProductInstock> list = wmsProductInstockService.selectWmsProductInstockJoinList(wmsProductInstock);
return getDataTable(list);
}
@ -102,4 +109,18 @@ public class WmsProductInstockController extends BaseController
{
return toAjax(wmsProductInstockService.deleteWmsProductInstockByProductInstockIds(productInstockIds));
}
/**
*
*/
// @RequiresPermissions("wms:productInstock:query")
@GetMapping(value = "/getProductWarehouses")
public AjaxResult getProductWarehouses(WmsBaseWarehouse wmsBaseWarehouse)
{
wmsBaseWarehouse.setWarehouseInstockTypeStr(WmsConstants.WMS_WAREHOUSE_INSTOCK_TYPE_PRODUCT+","+WmsConstants.WMS_WAREHOUSE_INSTOCK_TYPE_SEMI);
return success(wmsBaseWarehouseService.selectWmsBaseWarehouseList(wmsBaseWarehouse));
}
}

@ -48,7 +48,7 @@ public class WmsProductOutstockController extends BaseController
public TableDataInfo list(WmsProductOutstock wmsProductOutstock)
{
startPage();
List<WmsProductOutstock> list = wmsProductOutstockService.selectWmsProductOutstockList(wmsProductOutstock);
List<WmsProductOutstock> list = wmsProductOutstockService.selectWmsProductOutstockJoinList(wmsProductOutstock);
return getDataTable(list);
}

@ -113,7 +113,7 @@ public class WmsRawInstockController extends BaseController
/**
*
*
*/
@RequiresPermissions("wms:rawinstock:query")
@GetMapping(value = "/getRawWarehouses")

@ -66,6 +66,11 @@ public class WmsProductInstock extends BaseEntity {
@Excel(name = "计划明细编号,关联pd_base_plan_detail的plan_detail_code")
private String planDetailCode;
private Long saleOrderId;
private String saleorderCode;
/**
* (1,2,3,4,9)
*/
@ -180,6 +185,11 @@ public class WmsProductInstock extends BaseEntity {
private String materialCode;
private String materialName;
private String materialSpec;
public BigDecimal getPrice() {
return price;
}
@ -212,6 +222,22 @@ public class WmsProductInstock extends BaseEntity {
this.materialCode = materialCode;
}
public String getMaterialName() {
return materialName;
}
public void setMaterialName(String materialName) {
this.materialName = materialName;
}
public String getMaterialSpec() {
return materialSpec;
}
public void setMaterialSpec(String materialSpec) {
this.materialSpec = materialSpec;
}
public void setProductInstockId(Long productInstockId) {
this.productInstockId = productInstockId;
}
@ -276,6 +302,22 @@ public class WmsProductInstock extends BaseEntity {
this.planDetailCode = planDetailCode;
}
public Long getSaleOrderId() {
return saleOrderId;
}
public void setSaleOrderId(Long saleOrderId) {
this.saleOrderId = saleOrderId;
}
public String getSaleorderCode() {
return saleorderCode;
}
public void setSaleorderCode(String saleorderCode) {
this.saleorderCode = saleorderCode;
}
public void setInstockType(String instockType) {
this.instockType = instockType;
}

@ -111,7 +111,7 @@ public class WmsProductOutstock extends BaseEntity {
private String applyBy;
/** 申请时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "申请时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date applyDate;
@ -120,22 +120,22 @@ public class WmsProductOutstock extends BaseEntity {
private String auditBy;
/** 审核时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date auditDate;
/** 最后更新时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "最后更新时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date updateDate;
/** 执行开始时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "执行开始时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date beginTime;
/** 执行结束时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "执行结束时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date endTime;
@ -153,6 +153,8 @@ public class WmsProductOutstock extends BaseEntity {
private String materialName;
private String materialSpec;
private BigDecimal price;
private String specificationParameter;
@ -468,6 +470,14 @@ public class WmsProductOutstock extends BaseEntity {
this.materialName = materialName;
}
public String getMaterialSpec() {
return materialSpec;
}
public void setMaterialSpec(String materialSpec) {
this.materialSpec = materialSpec;
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)

@ -66,17 +66,17 @@ public class WmsProductOutstockDetail extends BaseEntity
private String erpStatus;
/** 最后更新时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "最后更新时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date updateDate;
/** 执行开始时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "执行开始时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date beginTime;
/** 执行结束时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "执行结束时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date endTime;

@ -138,6 +138,11 @@ public class WmsStockTotal extends BaseEntity {
private Long materialBomId;
private String virtualFlag;
private String warehouseType;
public String getWarehouseName() {
return warehouseName;
}
@ -387,6 +392,22 @@ public class WmsStockTotal extends BaseEntity {
this.materialBomId = materialBomId;
}
public String getVirtualFlag() {
return virtualFlag;
}
public void setVirtualFlag(String virtualFlag) {
this.virtualFlag = virtualFlag;
}
public String getWarehouseType() {
return warehouseType;
}
public void setWarehouseType(String warehouseType) {
this.warehouseType = warehouseType;
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)

@ -17,5 +17,4 @@ public class WmsProduceInstockVo {
@NotBlank(message="物料条码必须输入")
private String materialBarcode;
}

@ -91,4 +91,12 @@ public interface WmsProductInstockMapper
* @return
*/
List<WmsProductInstock> selectWmsProductInstockERPNotSynchronized(WmsProductInstock wmsProductInstock);
/**
* join material
* @param wmsProductInstock
* @return
*/
List<WmsProductInstock> selectWmsProductInstockJoinList(WmsProductInstock wmsProductInstock);
}

@ -98,4 +98,12 @@ public interface IWmsProductInstockService {
* @return
*/
public int fourthFloorProduceInstock(WmsProduceInstockVo wmsProduceInstockVo);
/**
* ;,join material
*
* @param wmsProductInstock ;
* @return ;
*/
public List<WmsProductInstock> selectWmsProductInstockJoinList(WmsProductInstock wmsProductInstock);
}

@ -189,11 +189,13 @@ public class WmsMoveServiceImpl implements IWmsMoveService {
String userName = SecurityUtils.getUsername();
String warehouseInstockType = baseWareHouse.getWarehouseInstockType();
String moveWay = "", operationType = "";
BigDecimal planAmount = null;
if (warehouseType.equals(WmsConstants.WMS_WAREHOUSE_TYPE_WORKBIN_AGV)) {
throw new ServiceException("立库库位移库请在调度页面进行移库");
} else if (warehouseType.equals(WmsConstants.WMS_WAREHOUSE_TYPE_AGV)) {
moveWay = WmsConstants.WMS_MOVEMERGE_WAY_AGV;
operationType = WmsConstants.MWS_OPERATION_TYPE_DISPATCHD;
planAmount = BigDecimal.ONE;
WmsMove queryMove = new WmsMove();
queryMove.setWarehouseId(oriLocation.getWarehouseId());
@ -232,6 +234,7 @@ public class WmsMoveServiceImpl implements IWmsMoveService {
wmsMove.setMoveType(wmsMoveApplyVo.getMoveType());
wmsMove.setAuditStatus(WmsConstants.WMS_AUDIT_STATUS_PASS);
wmsMove.setExecuteStatus(WmsConstants.WMS_EXECUTE_STATUS_TOEXECUTE);
wmsMove.setPlanAmount(planAmount);
wmsMove.setApplyBy(userName);
wmsMove.setApplyDate(currentDate);
wmsMoveMapper.insertWmsMove(wmsMove);
@ -335,6 +338,7 @@ public class WmsMoveServiceImpl implements IWmsMoveService {
}
WmsBaseLocation frontLocation = baseLocationList.get(0);
if (!frontLocation.getLocColumn().equals(baseLocation.getLocColumn())) {
if (!frontLocation.getLocationStatus().equals(WmsConstants.WMS_BASE_LOCATION_STATUS_NORMAL)) {
throw new ServiceException(locationName + "的浅库位状态为" + WmsConstants.LOCATION_STATUS_PROMPT_MAP.get(frontLocation.getLocationStatus()));
}
@ -355,6 +359,7 @@ public class WmsMoveServiceImpl implements IWmsMoveService {
throw new ServiceException(locationName + "的浅库位有库存,无法申请移库");
}
}
}
}
}

@ -501,4 +501,18 @@ public class WmsProductInstockServiceImpl implements IWmsProductInstockService {
}
/**
* ;,join material
*
* @param wmsProductInstock ;
* @return ;
*/
@Override
public List<WmsProductInstock> selectWmsProductInstockJoinList(WmsProductInstock wmsProductInstock) {
wmsProductInstock.setMaterialSpec(StringUtils.isNotEmpty(wmsProductInstock.getMaterialSpec())
? wmsProductInstock.getMaterialSpec().replaceAll("\\s+", "") : "");
return wmsProductInstockMapper.selectWmsProductInstockJoinList(wmsProductInstock);
}
}

@ -236,6 +236,8 @@ public class WmsProductOutstockServiceImpl implements IWmsProductOutstockService
*/
@Override
public List<WmsProductOutstock> selectWmsProductOutstockJoinList(WmsProductOutstock wmsProductOutstock) {
wmsProductOutstock.setMaterialSpec(StringUtils.isNotEmpty(wmsProductOutstock.getMaterialSpec())
? wmsProductOutstock.getMaterialSpec().replaceAll("\\s+", "") : "");
return wmsProductOutstockMapper.selectWmsProductOutstockJoinList(wmsProductOutstock);
}

@ -157,16 +157,26 @@ public class WmsStockTotalServiceImpl implements IWmsStockTotalService {
String materialClassfication = wmsStockTotal.getMaterialClassfication();
Long warehouseId = wmsStockTotal.getWarehouseId();
if(materialClassfication.equals(MesConstants.MES_MATERIAL_CLASSFICATION_VIRTUAL)){
//五楼原料周转区仓库ID
if (warehouseId.equals(wmsConfig.getFifthCabinetWarehouseId()) && materialClassfication.equals(MesConstants.MES_MATERIAL_CLASSFICATION_VIRTUAL)) {
if (warehouseId.equals(wmsConfig.getFifthCabinetWarehouseId())) {
wmsStockTotal.setMaterialId(wmsStockTotal.getProductId());
wmsStockTotal.setAccessoriesFlag(null);
} else {
if (StringUtils.isEmpty(wmsStockTotal.getAccessoriesFlag())
|| wmsStockTotal.getAccessoriesFlag().equals(MesConstants.MES_MATERIAL_ACCESSORIES_FLAG_NO)) {
wmsStockTotal.setAncestors("0," + wmsStockTotal.getMaterialBomId());
wmsStockTotal.setAccessoriesFlag(null);
wmsStockTotal.setVirtualFlag("1");
}
}
}else{
if (StringUtils.isEmpty(wmsStockTotal.getAccessoriesFlag()) || wmsStockTotal.getAccessoriesFlag().equals(MesConstants.MES_MATERIAL_ACCESSORIES_FLAG_NO)) {
wmsStockTotal.setAncestors("0," + wmsStockTotal.getMaterialBomId());
wmsStockTotal.setAccessoriesFlag(null);
}
}
return wmsStockTotalMapper.selectWmsStockTotalJoinListBySaleOrder(wmsStockTotal);
}

@ -10,7 +10,9 @@ import com.hw.common.core.utils.DateUtils;
import com.hw.common.core.utils.StringUtils;
import com.hw.common.security.utils.SecurityUtils;
import com.hw.wms.config.WmsConfig;
import com.hw.wms.domain.WmsBaseWarehouse;
import com.hw.wms.domain.vo.WmsWarehouseMaterialCheckVo;
import com.hw.wms.mapper.WmsBaseWarehouseMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hw.wms.mapper.WmsWarehouseMaterialMapper;
@ -28,6 +30,9 @@ public class WmsWarehouseMaterialServiceImpl implements IWmsWarehouseMaterialSer
@Autowired
private WmsWarehouseMaterialMapper wmsWarehouseMaterialMapper;
@Autowired
private WmsBaseWarehouseMapper wmsBaseWarehouseMapper;
@Autowired
private WmsConfig wmsConfig;
@ -125,7 +130,19 @@ public class WmsWarehouseMaterialServiceImpl implements IWmsWarehouseMaterialSer
Date currentDate = new Date();
// 新增仓库的物料配置信息
List<WmsWarehouseMaterial> list = new ArrayList<WmsWarehouseMaterial>();
// WmsBaseWarehouse baseWarehouse = wmsBaseWarehouseMapper.selectWmsBaseWarehouseByWarehouseId(warehouseId);
// String wareHouseType = baseWarehouse.getWarehouseType();
for (Long materialId : materialIds) {
// if (wareHouseType.equals(WmsConstants.WMS_WAREHOUSE_TYPE_AGV)) {
WmsWarehouseMaterial queryWarehouseMaterial = new WmsWarehouseMaterial();
queryWarehouseMaterial.setStorageType(WmsConstants.WMS_WAREHOUSE_MATERIAL_STORAGE_TYPE_MATERIAL);
queryWarehouseMaterial.setStorageId(materialId);
List<WmsWarehouseMaterial> wmsWarehouseMaterials = wmsWarehouseMaterialMapper.selectWmsWarehouseMaterialList(queryWarehouseMaterial);
if (wmsWarehouseMaterials != null && !wmsWarehouseMaterials.isEmpty()) {
throw new ServiceException("此物料已经在其他仓库配置过");
}
// }
WmsWarehouseMaterial warehouseMaterial = new WmsWarehouseMaterial();
warehouseMaterial.setWarehouseId(warehouseId);
warehouseMaterial.setWarehouseFloor(warehouseFloor);
@ -158,10 +175,10 @@ public class WmsWarehouseMaterialServiceImpl implements IWmsWarehouseMaterialSer
errorMsgBuilder.append("没有配置仓库信息['").append(",物料编码:").append(wmcv.getMaterialCode())
.append(",物料名称:").append(wmcv.getMaterialName()).append(",物料规格:").append(wmcv.getMaterialSpec())
.append("];");
}else{
} else {
WmsWarehouseMaterial wmsWarehouseMaterial = wmsWarehouseMaterials.get(0);
Long warehouseId = wmsWarehouseMaterial.getWarehouseId();
if(!warehouseId.equals(wmsConfig.getFifthCabinetWarehouseId())){
if (!warehouseId.equals(wmsConfig.getFifthCabinetWarehouseId())) {
errorMsgBuilder.append("仓库信息配置不正确['").append(",物料编码:").append(wmcv.getMaterialCode())
.append(",物料名称:").append(wmcv.getMaterialName()).append(",物料规格:").append(wmcv.getMaterialSpec())
.append("];");

@ -13,6 +13,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="operationType" column="operation_type" />
<result property="planCode" column="plan_code" />
<result property="planDetailCode" column="plan_detail_code" />
<result property="saleOrderId" column="sale_order_id" />
<result property="saleorderCode" column="saleorder_code" />
<result property="instockType" column="instock_type" />
<result property="productId" column="product_id" />
<result property="productBatch" column="product_batch" />
@ -36,6 +38,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="price" column="price" />
<result property="specificationParameter" column="specification_parameter" />
<result property="materialCode" column="material_code" />
<result property="materialName" column="material_name" />
<result property="materialSpec" column="material_spec" />
</resultMap>
<resultMap id="WmsProductInstockWmsProductInstockDetailResult" type="WmsProductInstock" extends="WmsProductInstockResult">
@ -253,4 +257,39 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and wpi.apply_date between #{beginTime} and #{endTime}
</if>
</select>
<select id="selectWmsProductInstockJoinList" parameterType="WmsProductInstock" resultMap="WmsProductInstockResult">
select wpi.product_instock_id, wpi.task_code, wpi.warehouse_id, wpi.location_code, wpi.product_type,
wpi.operation_type, wpi.plan_code, wpi.plan_detail_code, wpi.instock_type, wpi.product_id,wpi.saleorder_code,
wpi.product_batch, wpi.instock_amount, wpi.pallet_info_code, wpi.execute_status, wpi.apply_by, wpi.apply_date,
wpi.erp_status, wpi.erp_amount,mbmi.material_code,mbmi.material_name,mbmi.material_spec from wms_product_instock wpi left join mes_base_material_info mbmi on wpi.product_id=mbmi.material_id
<where>
<if test="taskCode != null and taskCode != ''"> and wpi.task_code = #{taskCode}</if>
<if test="warehouseId != null "> and wpi.warehouse_id = #{warehouseId}</if>
<if test="locationCode != null and locationCode != ''"> and wpi.location_code like concat('%', #{locationCode}, '%')</if>
<if test="saleorderCode != null and saleorderCode != ''"> and wpi.saleorder_code like concat('%', #{saleorderCode}, '%')</if>
<if test="productType != null and productType != ''"> and wpi.product_type = #{productType}</if>
<if test="operationType != null and operationType != ''"> and wpi.operation_type = #{operationType}</if>
<if test="erpStatus != null and erpStatus != ''"> and wpi.erp_status = #{erpStatus}</if>
<if test="productBatch != null and productBatch != ''"> and wpi.product_batch like concat('%', #{productBatch}, '%')</if>
<if test="planCode != null "> and wpi.plan_code like concat('%', #{planCode}, '%')</if>
<if test="planDetailCode != null "> and wpi.plan_detail_code like concat('%', #{planDetailCode}, '%')</if>
<if test="instockType != null and instockType != ''"> and wpi.instock_type = #{instockType}</if>
<if test="executeStatus != null and executeStatus != ''"> and wpi.execute_status = #{executeStatus}</if>
<if test="applyBy != null and applyBy != ''"> and wpi.apply_by = #{applyBy}</if>
<if test="applyDate != null "> and wpi.apply_date = #{applyDate}</if>
<if test="materialCode != null and materialCode != ''"> and mbmi.material_code like concat('%', #{materialCode}, '%')</if>
<if test="materialName != null and materialName != ''"> and mbmi.material_name like concat('%', #{materialName}, '%')</if>
<if test="materialSpec != null and materialSpec != ''">and replace(mbmi.material_spec,' ','') like concat('%', #{materialSpec},
'%')</if>
</where>
order by wpi.apply_date desc
</select>
</mapper>

@ -41,6 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="warehouseName" column="warehouse_name" />
<result property="materialCode" column="material_code" />
<result property="materialName" column="material_name" />
<result property="materialSpec" column="material_spec" />
<result property="specificationParameter" column="specification_parameter" />
<result property="unitCode" column="unit_code" />
<result property="price" column="price" />
@ -63,6 +64,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateDate" column="sub_update_date" />
<result property="beginTime" column="sub_begin_time" />
<result property="endTime" column="sub_end_time" />
<result property="productBarcode" column="sub_product_barcode" />
</resultMap>
<sql id="selectWmsProductOutstockVo">
@ -248,8 +250,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectWmsProductOutstockJoinList" parameterType="WmsProductOutstock" resultMap="WmsProductOutstockResult">
select wpo.product_outstock_id, wpo.task_code, wpo.warehouse_id, wpo.location_code, wpo.product_type,wpo.operation_type, wpo.outstock_type,
wpo.plan_code, wpo.plan_detail_code,wpo.saleorder_code, wpo.product_id,wpo.apply_qty,wpo.outstock_qty,wpo.apply_reason, wpo.execute_status,wpo.apply_by, wpo.apply_date,
wbw.warehouse_name,mbmi.material_code,mbmi.material_name
wpo.plan_code, wpo.plan_detail_code,wpo.saleorder_code, wpo.product_id,wpo.apply_qty,wpo.outstock_qty,wpo.apply_reason, wpo.audit_status,wpo.execute_status,wpo.apply_by, wpo.apply_date,wpo.audit_by, wpo.audit_date,wpo.erp_status,wpo.erp_amount,wpo.begin_time,wpo.end_time,
wbw.warehouse_name,mbmi.material_code,mbmi.material_name,mbmi.material_spec
from wms_product_outstock wpo left join wms_base_warehouse wbw on wpo.warehouse_id =wbw.warehouse_id
left join mes_base_material_info mbmi on wpo.product_id = mbmi.material_id
<where>
@ -259,11 +261,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="productType != null and productType != ''"> and wpo.product_type = #{productType}</if>
<if test="operationType != null and operationType != ''"> and wpo.operation_type = #{operationType}</if>
<if test="outstockType != null and outstockType != ''"> and wpo.outstock_type = #{outstockType}</if>
<if test="planCode != null "> and wpo.plan_code = #{planCode}</if>
<if test="planDetailCode != null "> and wpo.plan_detail_code = #{planDetailCode}</if>
<if test="applyReason != null and applyReason != ''"> and wpo.apply_reason = #{applyReason}</if>
<if test="auditReason != null and auditReason != ''"> and wpo.audit_reason = #{auditReason}</if>
<if test="planCode != null and planCode != ''"> and wpo.plan_code like concat('%', #{planCode}, '%')</if>
<if test="planDetailCode != null and planDetailCode != ''"> and wpo.plan_detail_code like concat('%', #{planDetailCode}, '%')</if>
<if test="saleorderCode != null and saleorderCode != ''"> and wpo.saleorder_code like concat('%', #{saleorderCode}, '%')</if>
<if test="auditStatus != null and auditStatus != ''"> and wpo.audit_status = #{auditStatus}</if>
<if test="erpStatus != null and erpStatus != ''"> and wpo.erp_status = #{erpStatus}</if>
<if test="executeStatus != null and executeStatus != '' and executeStatus != 'notFinish'"> and wpo.execute_status = #{executeStatus}</if>
<if test="executeStatus != null and executeStatus != '' and executeStatus == 'notFinish'"> and (wpo.execute_status = '0' or wpo.execute_status = '1')</if>
<if test="applyBy != null and applyBy != ''"> and wpo.apply_by = #{applyBy}</if>
@ -273,7 +275,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateDate != null "> and wpo.update_date = #{updateDate}</if>
<if test="beginTime != null "> and wpo.begin_time = #{beginTime}</if>
<if test="endTime != null "> and wpo.end_time = #{endTime}</if>
<if test="materialCode != null and materialCode != ''"> and mbmi.material_code like concat('%', #{materialCode}, '%')</if>
<if test="materialName != null and materialName != ''"> and mbmi.material_name like concat('%', #{materialName}, '%')</if>
<if test="materialSpec != null and materialSpec != ''">and replace(mbmi.material_spec,' ','') like concat('%', #{materialSpec},
'%')</if>
</where>
order by wpo.apply_date desc
</select>

@ -229,7 +229,7 @@
<if test="updateDate != null ">and wps.update_date = #{updateDate}</if>
<if test="activeFlag != null and activeFlag != ''">and wps.active_flag = #{activeFlag}</if>
<if test="instockDate != null ">and wps.instock_date = #{instockDate}</if>
and wps.totalAmount>0
and wps.total_amount>0
</where>
</select>

@ -56,6 +56,7 @@
<result property="orderAmount" column="order_amount"/>
<result property="applyAmount" column="apply_amount"/>
<result property="materialClassfication" column="material_classfication"/>
<result property="warehouseType" column="warehouse_type"/>
</resultMap>
@ -186,7 +187,8 @@
#{materialName},
'%')
</if>
<if test="saleOrderId != null ">and (wst.sale_order_id = #{saleOrderId} or wst.safe_flag='1')</if>
<if test="saleOrderId != null and virtualFlag==null and virtualFlag==''">and (wst.sale_order_id = #{saleOrderId} or wst.safe_flag='1')</if>
<if test="saleOrderId != null and virtualFlag!=null and virtualFlag!=''">and (exists (select 1 from mes_sale_order_relate msor where wst.sale_order_id=msor.relate_sale_order_id and msor.sale_order_id=#{saleOrderId}) or wst.safe_flag='1')</if>
<if test="saleOrderId == null ">and wst.safe_flag='1'</if>
<if test="materialCodeNameSpec != null and materialCodeNameSpec != ''">and (mbmi.material_code like concat('%',
#{materialCodeNameSpec},'%') or mbmi.material_name like concat('%',#{materialCodeNameSpec},'%')
@ -300,6 +302,7 @@
wst.update_date,
wst.active_flag,
mso.order_amount,mso.saleorder_code,
wbw.warehouse_type,
(select sum(wpo.apply_qty) from wms_product_outstock wpo where wpo.sale_order_id=wst.sale_order_id and
wpo.warehouse_id=wst.warehouse_id and wpo.product_id=wst.material_id and (wpo.execute_status='0' or
wpo.execute_status='1')) apply_amount
@ -310,6 +313,7 @@
<where>
<if test="warehouseId != null ">and wst.warehouse_id = #{warehouseId}</if>
<if test="warehouseFloor != null ">and wst.warehouse_floor = #{warehouseFloor}</if>
<if test="warehouseType != null and warehouseType != ''">and wbw.warehouse_type = #{warehouseType}</if>
<if test="stockType != null and stockType != ''">and wst.stock_type = #{stockType}</if>
<if test="materialId != null ">and wst.material_id = #{materialId}</if>
<if test="saleOrderId != null ">and wst.sale_order_id = #{saleOrderId}</if>

@ -42,3 +42,13 @@ export function delProductInstock(productInstockId) {
method: 'delete'
})
}
// 查询成品仓库列表
export function getProductWarehouses(query) {
return request({
url: '/wms/productInstock/getProductWarehouses',
method: 'get',
params: query
})
}

@ -1,5 +1,49 @@
import request from '@/utils/request'
// 查询成品出库记录列表
export function listProductoutstock(query) {
return request({
url: '/wms/productoutstock/list',
method: 'get',
params: query
})
}
// 查询成品出库记录详细
export function getProductoutstock(productOutstockId) {
return request({
url: '/wms/productoutstock/' + productOutstockId,
method: 'get'
})
}
// 新增成品出库记录
export function addProductoutstock(data) {
return request({
url: '/wms/productoutstock',
method: 'post',
data: data
})
}
// 修改成品出库记录
export function updateProductoutstock(data) {
return request({
url: '/wms/productoutstock',
method: 'put',
data: data
})
}
// 删除成品出库记录
export function delProductoutstock(productOutstockId) {
return request({
url: '/wms/productoutstock/' + productOutstockId,
method: 'delete'
})
}
// 查询成品出库记录列表,提供审核使用
export function auditListProductoutstock(query) {
return request({

@ -625,7 +625,7 @@ export const dynamicRoutes = [
permissions: ["tool:gen:edit"],
children: [
{
path: "index/:checkResultId(\\d+)",
path: "index/:checkResultId/:materialCode/:materialName/:materialSpec/:checkRuleName/:checkStatus/:checkMode",
component: () => import("@/views/qms/base/checkresultdetail/index"),
name: "checkResultDetail",
meta: { title: "质检结果详细", activeMenu: "/qms/base/checkresultdetail" },

@ -238,7 +238,7 @@
</el-button>
<el-button
v-if="!$route.query && scope.row.planDetailStatus === PLAN_DETAIL_STATUS.STARTED"
v-if=" scope.row.planDetailStatus === PLAN_DETAIL_STATUS.STARTED"
type="text"
@click="getMaterials(scope.row) "
>
@ -842,7 +842,7 @@ export default {
planCode: val.planCode,
dispatchCode: val.dispatchCode,
planDetailCode: val.planDetailCode,
saleOrderId: val.saleOrderId,
saleOrderId: this.saleOrderId,
productId: this.productId,
materialBomId: this.materialBomId,
maxPlanAmount: 100000000,

@ -101,17 +101,16 @@
v-hasPermi="['dms:shutDown:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['dms:shutDown:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="warning"-->
<!-- plain-->
<!-- icon="el-icon-download"-->
<!-- size="mini"-->
<!-- @click="handleExport"-->
<!-- v-hasPermi="['dms:shutDown:export']"-->
<!-- >导出</el-button>-->
<!-- </el-col>-->
</el-row>
<el-table v-loading="loading" :data="shutDownList" @selection-change="handleSelectionChange">

@ -390,7 +390,7 @@
</div>
</el-dialog>
<!-- 添加采购订单对话框 -->
<!-- 添加采购订单对话框,包含绑定销售订单信息 -->
<el-dialog title="选择采购订单信息" :visible.sync="purchaseOrderOpen" append-to-body>
<select-orderBind ref="purchaseOrderRef" v-if="purchaseOrderOpen" :defineData="barcodeData"></select-orderBind>
<div slot="footer" class="dialog-footer">
@ -539,12 +539,19 @@
<el-dialog :title="title" :visible.sync="regularOpen" width="500px" append-to-body>
<el-form ref="regularForm" :model="regularForm" :rules="regularRules" label-width="100px">
<el-form-item label="采购订单号" prop="poNo">
<el-input v-model="regularForm.poNo" placeholder="请点击右侧检索采购订单" disabled>
<el-button slot="append" icon="el-icon-search" @click="handleOnlyPurchaseOrderAdd"
v-if="!regularForm.barcodeId || regularForm.barcodeId===''"></el-button>
</el-input>
</el-form-item>
<el-form-item label="物料ID" prop="materialId" v-if="false">
<el-input v-model="regularForm.materialId" placeholder="请输入物料ID"/>
</el-form-item>
<el-form-item label="物料编码" prop="materialCode">
<el-input v-model="regularForm.materialCode" suffix-icon="el-icon-search" readonly
@click.native="handleSelectMaterial"/>
@click.native="handleSelectMaterial" :disabled="regularForm.purchaseOrderId!==null && regularForm.purchaseOrderId!==''"/>
</el-form-item>
<el-form-item label="物料名称" prop="materialName">
<el-input v-model="regularForm.materialName" readonly/>
@ -667,6 +674,19 @@
</el-dialog>
<!-- 添加采购订单对话框 -->
<el-dialog title="选择采购订单信息" :visible.sync="onlyPurchaseOrderOpen" append-to-body>
<select-purchaseOrder ref="purchaseOrderRef" v-if="onlyPurchaseOrderOpen" :defineData="barcodeData"></select-purchaseOrder>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitOnlyPurchaseOrderForm"> </el-button>
<el-button @click="onlyPurchaseOrderOpen = false"> </el-button>
</div>
</el-dialog>
</div>
</template>
@ -682,15 +702,15 @@ import {checkWarehouseMaterials} from "@/api/wms/wmswarehouse";
import selectOrderBind from '@//views/mes/purchaseOrder/selectOrderBind.vue';
import selectMaterial from '@//views/mes/materialinfo/selectMaterial.vue';
import {getMaterialinfo} from "@/api/mes/materialinfo";
import selectPurchaseOrder from '@//views/mes/purchaseOrder/addPurchaseOrder.vue';
export default {
name: "Barcode",
dicts: ['bind_status', 'active_flag', 'barcode_type', 'mes_safe_flag', 'mes_print_flag', 'mes_material_batch_flag'],
components: {
'select-orderBind': selectOrderBind,
'select-material': selectMaterial
'select-material': selectMaterial,
'select-purchaseOrder': selectPurchaseOrder,
},
data() {
@ -711,8 +731,9 @@ export default {
//
barcodeList: [],
//
purchaseOrderOpen: false,
onlyPurchaseOrderOpen: false,
purchaseOrderOpen: false,
//
selectMaterialVisible: false,
//
@ -728,7 +749,7 @@ export default {
printPerson: null,
printFlag: null,
batchFlag: null,
barcodeType: "1",
barcodeTypeStr: "1,9",
barcodeInfo: null,
batchCode: null,
palletInfoCode: null,
@ -1221,6 +1242,12 @@ export default {
this.purchaseOrderOpen = false;
},
handleDeletePurchaseOrder(row) {
const mesSaleOrderRelateList = this.materialRelateForm.mesSaleOrderRelateList;
@ -1816,6 +1843,30 @@ export default {
});
},
handleOnlyPurchaseOrderAdd() {
this.onlyPurchaseOrderOpen = true;
},
//
submitOnlyPurchaseOrderForm() {
let selectedRow = this.$refs.purchaseOrderRef.selectedRow;
this.regularForm.materialId = null;
this.regularForm.materialCode = null;
this.regularForm.materialName = null;
this.regularForm.materialSpec = null;
this.$set(this.regularForm, "poNo", selectedRow.poNo);
this.regularForm.purchaseOrderId = selectedRow.purchaseOrderId;
this.regularForm.materialId = selectedRow.materialId;//ID
this.regularForm.materialCode = selectedRow.materialCode;
this.regularForm.materialName = selectedRow.materialName;
this.regularForm.materialSpec = selectedRow.materialSpec;
this.regularForm.orderBindId = selectedRow.orderBindId;
this.onlyPurchaseOrderOpen = false;
},
}
};
</script>

@ -52,7 +52,6 @@
<el-table v-loading="loading" :data="materialinfoList"
:highlight-current-row="true"
@selection-change="handleSelectionChange"
:current-row-key="selectedRowId"
ref="selectMaterialRef">

@ -99,7 +99,6 @@
</el-row>
<el-table v-loading="loading" :data="saleOrderList"
:highlight-current-row="true"
@selection-change="handleSelectionChange"
:current-row-key="selectedRowId"
ref="selectSaleOrderRef"
@ -355,6 +354,7 @@ export default {
//
saleOrderList: [],
selectedRowId:null,
selectedRow:null,
relateTotal:0,
//
relateSaleOrderList:[],

@ -1059,6 +1059,7 @@ export default {
obj.saleorderCode = this.form.saleorderCode;
obj.newFlag = "1";//
obj.addFlag = "1";
// e.mesBaseProcessUserList.forEach((mesBaseProcessUser, index) => {
// mesBaseProcessUser.id = this.id + 1;

@ -53,11 +53,19 @@
<el-table v-loading="loading"
:data="purchaseOrderList"
:highlight-current-row="true"
@selection-change="handleSelectionChange"
@row-click="handleRowClick"
highlight-current-row
:current-row-key="selectedRowId"
ref="purchaseOrderRef"
>
<el-table-column type="selection" align="center" v-if="selectionVisible"/>
<el-table-column label="选择" width="50">
<template slot-scope="scope">
<el-radio v-model="selectedRowId" :label="scope.row.purchaseOrderId" @change="handleSelect(scope.row)">
{{scope.row.i}}
</el-radio>
</template>
</el-table-column>
<el-table-column label="ERP主键信息" align="center" prop="erpId" v-if="columns[1].visible"/>
<el-table-column label="金蝶ERP订单明细ID" align="center" prop="fentryId" v-if="columns[2].visible"/>
<el-table-column label="采购订单编号" align="center" prop="poNo" v-if="columns[3].visible" width="120"/>
@ -72,11 +80,11 @@
</template>
</el-table-column>
<el-table-column label="订单数量" align="center" prop="orderAmount" v-if="columns[8].visible" width="100"/>
<el-table-column label="订单绑定数量" align="center" prop="orderBindAmount" width="100"/>
<el-table-column label="订单条码数量" align="center" prop="orderBarcodeAmount" width="100"/>
<el-table-column label="安全库存绑定数量" align="center" prop="safeBindAmount" width="100"/>
<el-table-column label="安全库存条码数量" align="center" prop="safeBarcodeAmount" width="100"/>
<el-table-column label="完成采购数量" align="center" prop="completeAmount" v-if="columns[9].visible" width="100"/>
<!-- <el-table-column label="订单绑定数量" align="center" prop="orderBindAmount" width="100"/>-->
<!-- <el-table-column label="订单条码数量" align="center" prop="orderBarcodeAmount" width="100"/>-->
<!-- <el-table-column label="安全库存绑定数量" align="center" prop="safeBindAmount" width="100"/>-->
<!-- <el-table-column label="安全库存条码数量" align="center" prop="safeBarcodeAmount" width="100"/>-->
<!-- <el-table-column label="完成采购数量" align="center" prop="completeAmount" v-if="columns[9].visible" width="100"/>-->
<el-table-column label="审核日期" align="center" prop="approveDate" width="180" v-if="columns[10].visible">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.approveDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
@ -167,6 +175,7 @@ export default {
total: 0,
//
purchaseOrderList: [],
selectedRowId:null,
//
title: "",
//
@ -376,7 +385,16 @@ export default {
this.download('mes/purchaseOrder/export', {
...this.queryParams
}, `purchaseOrder_${new Date().getTime()}.xlsx`)
}
},
handleSelect(row){
this.selectedRow = row;
this.selectedRowId = row.purchaseOrderId;
//
this.$nextTick(() => {
this.$refs.purchaseOrderRef.setCurrentRow(row);
});
},
}
};
</script>

@ -89,14 +89,13 @@
<el-table v-loading="loading"
:data="orderBindList"
:highlight-current-row="true"
@selection-change="handleSelectionChange"
:current-row-key="selectedRowId"
ref="purchaseOrderRef"
>
<el-table-column label="选择" width="50" v-if="isSingleSelect">
<template slot-scope="scope">
<el-radio v-model="selectedRowId" :label="scope.row.purchaseOrderId" @change="handleSelect(scope.row)">
<el-radio v-model="selectedRowId" :label="scope.row.orderBindId" @change="handleSelect(scope.row)">
{{scope.row.i}}
</el-radio>
</template>
@ -339,7 +338,7 @@ export default {
},
handleSelect(row){
this.selectedRow = row;
this.selectedRowId = row.purchaseOrderId;
this.selectedRowId = row.orderBindId;
//
this.$nextTick(() => {
this.$refs.purchaseOrderRef.setCurrentRow(row);
@ -348,7 +347,6 @@ export default {
//
handleSelectionChange(selection) {
alert(JSON.stringify(selection))
this.ids = selection.map(item => item.purchaseOrderId)
this.selectedRows = selection.map(item => item)
this.single = selection.length !== 1

@ -41,10 +41,19 @@
</el-form>
<el-table v-loading="loading" :data="saleOrderList"
@row-click="handleRowClick"
highlight-current-row
@selection-change="handleSelectionChange"
:current-row-key="selectedRowId"
ref="saleOrderRef"
>
<el-table-column label="销售订单编号" align="center" prop="saleorderCode" v-if="columns[3].visible"/>
<el-table-column>
<template slot-scope="scope">
<el-radio v-model="selectedRowId" :label="scope.row.saleOrderId" @change="handleSelect(scope.row)">
{{ scope.row.i }}
</el-radio>
</template>
</el-table-column>
<el-table-column label="销售订单号" align="center" prop="saleorderCode" v-if="columns[3].visible"/>
<el-table-column label="物料编码" align="center" prop="materialCode" v-if="columns[9].visible"/>
<el-table-column label="物料名称" align="center" prop="materialName" v-if="columns[10].visible"/>
<el-table-column label="物料规格" align="center" prop="materialSpec"/>
@ -88,6 +97,8 @@ export default {
total: 0,
//
saleOrderList: [],
selectedRow: null,
selectedRowId: null,
//
title: "",
//
@ -103,7 +114,7 @@ export default {
documentStatus: null,
factoryId: null,
prodlineId: null,
saleOrderClassfication:'1',
saleOrderClassfication: '1',
materialId: null,
materialCode: null,
materialName: null,
@ -191,6 +202,22 @@ export default {
this.selectedRow = selection
},
handleSelect(row) {
this.selectedRow = row;
this.selectedRowId = row.saleOrderId;
//
this.$nextTick(() => {
this.$refs.saleOrderRef.setCurrentRow(row);
});
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.purchaseOrderId)
this.selectedRows = selection.map(item => item)
this.single = selection.length !== 1
this.multiple = !selection.length
},
}
};
</script>

@ -39,7 +39,7 @@
<el-form-item label="检验状态" prop="checkStatus">
<el-select
v-model="queryParams.checkStatus"
placeholder="检验方式"
placeholder="检验状态"
clearable
style="width: 240px"
>
@ -101,29 +101,11 @@
<dict-tag :options="dict.type.qms_material_type" :value="scope.row.materialType"/>
</template>
</el-table-column>
<el-table-column label="物料编码" align="center" prop="materialId" >
<template slot-scope="scope">
<span
v-for="(item, index) in materialinfoList"
:key="index"
:value="item.materialinfoList"
v-if="scope.row.materialId == item.materialId"
>
{{ item.materialCode }}
</span>
</template>
<el-table-column label="物料编码" align="center" prop="materialCode" >
</el-table-column>
<el-table-column label="物料名称" align="center" prop="materialId" >
<template slot-scope="scope">
<span
v-for="(item, index) in materialinfoList"
:key="index"
:value="item.materialinfoList"
v-if="scope.row.materialId == item.materialId"
>
{{ item.materialName }}
</span>
</template>
<el-table-column label="物料名称" align="center" prop="materialName" >
</el-table-column>
<el-table-column label="物料规格" align="center" prop="materialSpec" >
</el-table-column>
<el-table-column label="检验批次" align="center" prop="materialBatch" />
<el-table-column label="检验方式" align="center" prop="checkMode">
@ -157,7 +139,7 @@
icon="el-icon-edit"
@click="getJump(scope.row)"
v-hasPermi="['qms:checkresult:edit']"
>结果详</el-button>
>质检明</el-button>
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
@ -300,12 +282,12 @@ export default {
},
created() {
this.getList();
this.getMaterialInfo();
this.getCheckRule();
// this.getMaterialInfo();
// this.getCheckRule();
},
methods: {
getJump(row){
this.$router.push('/qms/base/checkresultdetail/index/'+row.checkResultId)
this.$router.push('/qms/base/checkresultdetail/index/'+row.checkResultId+'/'+row.materialCode+'/'+row.materialName+'/'+row.materialSpec+'/'+row.checkRuleName+'/'+row.checkStatus+'/'+row.checkMode)
},
/** 查询条码信息集合 */
@ -317,13 +299,13 @@ export default {
});
},
/** 查询物料信息集合 */
getMaterialInfo(){
this.loading = true;
listMaterialinfo(this.queryParams).then(response => {
this.materialinfoList = response.rows;
this.loading = false;
});
},
// getMaterialInfo(){
// this.loading = true;
// listMaterialinfo(this.queryParams).then(response => {
// this.materialinfoList = response.rows;
// this.loading = false;
// });
// },
/** 查询质检结果列表 */
getList() {
this.loading = true;

@ -3,42 +3,67 @@
<h4 class="form-header h4">质检结果信息</h4>
<el-form label-width="120px">
<el-row>
<!-- <el-col :span="8" :offset="2">-->
<!-- <el-form-item label="检验结果ID" >-->
<!-- <el-input v-model="this.checkResultIdUp" disabled />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="8" :offset="2">
<el-form-item label="检验规则ID" >
<el-input v-model="this.checkRuleIdUp" disabled />
<el-form-item label="检验名称" >
<el-input v-model="this.checkRuleNameUp" disabled />
</el-form-item>
</el-col>
<el-col :span="8" :offset="2">
<el-form-item label="检验名称" >
<el-input v-model="this.checkRuleNameUp" disabled />
<el-form-item label="检验状态" >
<template slot-scope="scope">
<dict-tag :options="dict.type.qms_check_status" :value="checkStatusUp"/>
</template>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8" :offset="2">
<el-form-item label="检验方式" >
<el-input v-model="this.checkModeUp" disabled />
<el-form-item label="检验方式" prop="checkModeUp">
<template slot-scope="scope">
<dict-tag :options="dict.type.qms_check_mode" :value="checkModeUp"/>
</template>
</el-form-item>
</el-col>
<el-col :span="8" :offset="2">
<el-form-item label="抽检比例" v-if=isIf>
<el-input v-model="this.checkSampleUp+'%'" disabled />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8" :offset="2">
<el-form-item label="检验状态" >
<el-input v-model="this.checkStatusUp" disabled />
<el-form-item label="规则检验类型" >
<el-input v-model="this.checkRuleTypeUp" disabled />
</el-form-item>
</el-col>
<el-col :span="8" :offset="2">
<el-form-item label="规则检验类型" >
<el-input v-model="this.checkRuleTypeUp" disabled />
<el-form-item label="物料编码" >
<el-input v-model="this.materialCode" disabled />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8" :offset="2">
<el-form-item label="物料名称" >
<el-input v-model="this.materialIdUpId" disabled />
<el-input v-model="this.materialName" disabled />
</el-form-item>
</el-col>
<el-col :span="8" :offset="2">
<el-form-item label="物料规格" >
<el-input v-model="this.materialSpec" disabled />
</el-form-item>
</el-col>
@ -197,6 +222,9 @@ export default {
checkModeUp:"",
checkRuleNameUp:"",
checkRuleIdUp:"",
materialCode:"",
materialName:"",
materialSpec:"",
//
checkprojectList:[],
//
@ -276,6 +304,19 @@ export default {
const checkResultIdFather =this.$route.params && this.$route.params.checkResultId;
this.queryParams.checkResultId = checkResultIdFather;
this.queryParamsFather.checkResultId = checkResultIdFather;
this.checkResultIdUp = this.$route.params.checkResultId;
this.checkRuleNameUp = this.$route.params.checkRuleName;
this.materialCode = this.$route.params.materialCode;
this.materialName = this.$route.params.materialName;
this.materialSpec = this.$route.params.materialSpec;
this.checkStatusUp = this.$route.params.checkStatus;
this.checkModeUp = this.$route.params.checkMode;
if (this.checkMode !== "2"){
this.isIf = false;
}
this.getCheckRusult();
this.getList();
@ -298,27 +339,24 @@ export default {
listCheckresult(this.queryParamsFather).then(response => {
// console.log(response)
this.checkresultList = response.rows;
this.checkRuleIdUp = this.checkresultList[0].checkRuleId;
this.checkRuleNameUp = this.checkresultList[0].checkRuleName;
this.checkSampleUp = this.checkresultList[0].checkSample;
this.materialIdUpId = this.checkresultList[0].materialId;
this.queryParamsMaterials.materialId = this.checkresultList[0].materialId;
this.getMaterialInfo();
if (this.checkresultList[0].checkMode != "2"){
this.isIf = false;
}
//label
for (let i = 0; i < this.dict.type.qms_check_mode.length;i++ ){
if (this.dict.type.qms_check_mode[i].value ==this.checkresultList[0].checkMode){
this.checkModeUp = this.dict.type.qms_check_mode[i].label;
}
}
for (let j = 0; j < this.dict.type.qms_check_status.length;j++){
if (this.dict.type.qms_check_status[j].value == this.checkresultList[0].checkStatus){
this.checkStatusUp = this.dict.type.qms_check_status[j].label;
}
}
this.queryParamsMaterials.materialId = this.checkresultList[0].materialId;
// this.getMaterialInfo();
// if (this.checkresultList[0].checkMode != "2"){
// this.isIf = false;
// }
// //label
// for (let i = 0; i < this.dict.type.qms_check_mode.length;i++ ){
// if (this.dict.type.qms_check_mode[i].value ==this.checkresultList[0].checkMode){
// this.checkModeUp = this.dict.type.qms_check_mode[i].label;
// }
// }
//
// for (let j = 0; j < this.dict.type.qms_check_status.length;j++){
// if (this.dict.type.qms_check_status[j].value == this.checkresultList[0].checkStatus){
// this.checkStatusUp = this.dict.type.qms_check_status[j].label;
// }
// }
this.loading = false;
});

@ -57,13 +57,13 @@
v-hasPermi="['qms:checkrule:add']"
>查看工单
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['qms:ualityinstance:edit']"
>修改</el-button>
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-edit"-->
<!-- @click="handleUpdate(scope.row)"-->
<!-- v-hasPermi="['qms:ualityinstance:edit']"-->
<!-- >修改</el-button>-->
</template>
</el-table-column>
</el-table>

@ -11,9 +11,14 @@
</el-col>
<el-col :span="8" :offset="2">
<el-form-item label="工单状态" >
<el-input v-model="this.qualityinstanceStatusUp" disabled />
<template slot-scope="scope">
<dict-tag :options="dict.type.qms_quality_instance_status" :value="qualityinstanceStatusUp"/>
</template>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8" :offset="2">
<el-form-item label="开始时间" >
<el-input v-model="this.qualityInstanceStartTimeUp" disabled />
@ -45,26 +50,32 @@
<!-- 不知道什么原理 加个空格财能正常显示 -->
</el-form-item>
<div>
<el-button type="primary" @click="handleViewFile(repairInstanceActivity123.qmsCheckInstanceFileList)"> </el-button>
</div>
<div id="viewFile">
<ViewFile :showFileDialog.sync="showFileDialog" :fileListData="fileListData" :thisTitle="thisTitle"></ViewFile>
</div>
<el-col :span="24">
<el-form-item label="处理意见"
>
<el-input
v-model="repairInstanceActivity123.processHandleResolution"
placeholder="请输入处理意见"
:disabled=true
>
</el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="处理描述" prop="processHandleDesc">
<el-input
v-model="repairInstanceActivity123.processHandleDesc"
placeholder="请输入处理描述"
:disabled=true
/>
</el-form-item>
</el-col>
<!-- <el-col :span="24">-->
<!-- <el-form-item label="处理描述" prop="processHandleDesc">-->
<!-- <el-input-->
<!-- v-model="repairInstanceActivity123.processHandleDesc"-->
<!-- placeholder="请输入处理描述"-->
<!-- :disabled=true-->
<!-- />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
</el-form-item>
</el-form>
<!-- 新增审批流程表单显示-->
@ -76,20 +87,20 @@
>
<el-input
v-model="form1.processHandleResolution"
placeholder="处理意见">
</el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="处理描述"
>
<el-input
v-model="form1.processHandleDesc"
placeholder="处理描述">
</el-input>
</el-form-item>
</el-col>
<div >
<!-- <el-col :span="24">-->
<!-- <el-form-item label="处理描述"-->
<!-- >-->
<!-- <el-input-->
<!-- v-model="form1.processHandleDesc"-->
<!-- placeholder="处理描述">-->
<!-- </el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<div>
<el-button type="primary" @click="submitForm"> </el-button>
</div>
</el-form>
@ -187,9 +198,12 @@
import { listQualityinstanceactivity, listQualityinstanceactivitynoStatus,getQualityinstanceactivity, delQualityinstanceactivity, addQualityinstanceactivity, updateQualityinstanceactivity } from "@/api/qms/qualityinstanceactivity";
import { listQualityinstance } from '@/api/qms/qualityinstance'
import { listWfprocessactivity } from '@/api/system/common/wfprocessactivity'
import ViewFile from "@/components/viewFile/index.vue";
export default {
name: "Qualityinstanceactivity",
components: {ViewFile},
dicts:['qms_quality_instance_status'],
data() {
return {
formIf:true,
@ -255,7 +269,14 @@ export default {
processHandleResolution: [
{ required: true, message: "处理意见不能为空", trigger: "blur" }
],
}
},
//
showFileDialog: false,
//
thisTitle: "质检图片",
//
fileListData: [],
};
},
created() {
@ -446,6 +467,17 @@ export default {
this.download('qms/qualityinstanceactivity/export', {
...this.queryParams
}, `qualityinstanceactivity_${new Date().getTime()}.xlsx`)
},
handleViewFile(fileList){
// let file = {'name':'dd.jpg','url':'http://172.16.12.100:7309/statics/2024/11/05/output_imgage20241105_152542_20241105152632A001.jpg'};
if(fileList==null || fileList.length<=0){
this.$modal.msgWarning("无图片");
return;
}
this.fileListData = fileList;
// this.fileListData = fileList;
this.showFileDialog = true;
}
}
};

@ -1,29 +1,23 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="任务编号" prop="taskCode">
<el-input
v-model="queryParams.taskCode"
placeholder="请输入任务编号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="仓库ID" prop="warehouseId">
<el-input
v-model="queryParams.warehouseId"
placeholder="请输入仓库ID"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="仓库楼层" prop="warehouseFloor">
<el-input
v-model="queryParams.warehouseFloor"
placeholder="请输入仓库楼层"
clearable
@keyup.enter.native="handleQuery"
/>
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<!-- <el-form-item label="任务编号" prop="taskCode">-->
<!-- <el-input-->
<!-- v-model="queryParams.taskCode"-->
<!-- placeholder="请输入任务编号"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item label="仓库" prop="warehouseId">
<el-select v-model="queryParams.warehouseId" placeholder="请选择仓库" clearable>
<el-option
v-for="(category, index) in productWarehouseList"
:key="index"
:label="category.warehouseName"
:value="category.warehouseId"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="库位编码" prop="locationCode">
<el-input
@ -33,133 +27,76 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="计划编号,关联pd_base_plan_info的plan_code" prop="planCode">
<el-form-item label="生产计划" prop="planCode">
<el-input
v-model="queryParams.planCode"
placeholder="请输入计划编号,关联pd_base_plan_info的plan_code"
placeholder="请输入生产计划编号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="计划明细编号,关联pd_base_plan_detail的plan_detail_code" prop="planDetailCode">
<el-form-item label="计划明细" prop="planDetailCode">
<el-input
v-model="queryParams.planDetailCode"
placeholder="请输入计划明细编号,关联pd_base_plan_detail的plan_detail_code"
placeholder="请输入计划明细编号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="销售订单ID关联销售订单主键" prop="saleOrderId">
<el-input
v-model="queryParams.saleOrderId"
placeholder="请输入销售订单ID关联销售订单主键"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="销售订单编号" prop="saleorderCode">
<el-form-item label="销售订单" prop="saleorderCode">
<el-input
v-model="queryParams.saleorderCode"
placeholder="请输入销售订单编号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="成品ID" prop="productId">
<el-input
v-model="queryParams.productId"
placeholder="请输入成品ID"
placeholder="请输入销售订单号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="存成品条码" prop="productBatch">
<el-form-item label="成品编码" prop="materialCode">
<el-input
v-model="queryParams.productBatch"
placeholder="请输入存成品条码"
v-model="queryParams.materialCode"
placeholder="请输入成品编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="入库数量" prop="instockAmount">
<el-form-item label="成品名称" prop="materialName">
<el-input
v-model="queryParams.instockAmount"
placeholder="请输入入库数量"
v-model="queryParams.materialName"
placeholder="请输入成品名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="托盘RFID代码" prop="palletInfoCode">
<el-form-item label="成品规格" prop="materialSpec">
<el-input
v-model="queryParams.palletInfoCode"
placeholder="请输入托盘RFID代码"
v-model="queryParams.materialSpec"
placeholder="请输入成品规格"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="申请人" prop="applyBy">
<el-form-item label="成品条码" prop="productBatch">
<el-input
v-model="queryParams.applyBy"
placeholder="请输入申请人"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="申请时间" prop="applyDate">
<el-date-picker clearable
v-model="queryParams.applyDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择申请时间">
</el-date-picker>
</el-form-item>
<el-form-item label="审核人" prop="auditBy">
<el-input
v-model="queryParams.auditBy"
placeholder="请输入审核人"
v-model="queryParams.productBatch"
placeholder="请输入成品条码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="审核时间" prop="auditDate">
<el-date-picker clearable
v-model="queryParams.auditDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择审核时间">
</el-date-picker>
</el-form-item>
<el-form-item label="同步给ERP的数量" prop="erpAmount">
<el-input
v-model="queryParams.erpAmount"
placeholder="请输入同步给ERP的数量"
<el-form-item label="同步ERP状态" prop="erpStatus">
<el-select
v-model="queryParams.erpStatus"
placeholder="请选择同步ERP状态"
clearable
@keyup.enter.native="handleQuery"
style="width: 240px"
>
<el-option
v-for="dict in dict.type.wms_erp_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-form-item>
<el-form-item label="最后更新时间" prop="updateDate">
<el-date-picker clearable
v-model="queryParams.updateDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择最后更新时间">
</el-date-picker>
</el-form-item>
<el-form-item label="开始时间;AGV处理开始时间" prop="beginTime">
<el-date-picker clearable
v-model="queryParams.beginTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择开始时间;AGV处理开始时间">
</el-date-picker>
</el-form-item>
<el-form-item label="结束时间;agv处理结束时间" prop="endTime">
<el-date-picker clearable
v-model="queryParams.endTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择结束时间;agv处理结束时间">
</el-date-picker>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
@ -167,121 +104,60 @@
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['wms:productInstock:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['wms:productInstock:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['wms:productInstock:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['wms:productInstock:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="productInstockList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="成品入库记录ID" align="center" prop="productInstockId" />
<el-table-column label="任务编号" align="center" prop="taskCode" />
<el-table-column label="仓库ID" align="center" prop="warehouseId" />
<el-table-column label="仓库楼层" align="center" prop="warehouseFloor" />
<el-table-column label="库位编码" align="center" prop="locationCode" />
<el-table-column label="成品类型" align="center" prop="productType" />
<el-table-column label="操作类型(0自动,1人工,2强制,3调度);调度,适合双排库自动移库时" align="center" prop="operationType" />
<el-table-column label="计划编号,关联pd_base_plan_info的plan_code" align="center" prop="planCode" />
<el-table-column label="计划明细编号,关联pd_base_plan_detail的plan_detail_code" align="center" prop="planDetailCode" />
<el-table-column label="销售订单ID关联销售订单主键" align="center" prop="saleOrderId" />
<el-table-column label="销售订单编号" align="center" prop="saleorderCode" />
<el-table-column label="入库类型(1生产入库,2出半成品库,9其他入库)" align="center" prop="instockType" />
<el-table-column label="成品ID" align="center" prop="productId" />
<el-table-column label="存成品条码" align="center" prop="productBatch" />
<el-table-column label="入库数量" align="center" prop="instockAmount" />
<el-table-column label="托盘RFID代码" align="center" prop="palletInfoCode" />
<el-table-column label="申请原因" align="center" prop="applyReason" />
<el-table-column label="审核原因" align="center" prop="auditReason" />
<el-table-column label="审核状态(0待审核,1审核通过,2审核未通过)" align="center" prop="auditStatus" />
<el-table-column label="执行状态(0待执行,1执行中,2执行完成)" align="center" prop="executeStatus" />
<el-table-column label="申请人" align="center" prop="applyBy" />
<el-table-column label="申请时间" align="center" prop="applyDate" width="180">
<!-- <el-table-column label="任务编号" align="center" prop="taskCode" />-->
<el-table-column label="仓库" align="center" prop="warehouseId" >
<template slot-scope="scope">
<span>{{ parseTime(scope.row.applyDate, '{y}-{m}-{d}') }}</span>
<span
v-for="(item, index) in productWarehouseList"
:key="index"
:value="item.warehouseOptions"
v-if="scope.row.warehouseId == item.warehouseId"
>
{{ item.warehouseName }}
</span>
</template>
</el-table-column>
<el-table-column label="审核人" align="center" prop="auditBy" />
<el-table-column label="审核时间" align="center" prop="auditDate" width="180">
<el-table-column label="库位编码" align="center" prop="locationCode" />
<el-table-column label="操作类型" align="center" prop="operationType" >
<template slot-scope="scope">
<span>{{ parseTime(scope.row.auditDate, '{y}-{m}-{d}') }}</span>
<dict-tag :options="dict.type.wms_operation_type" :value="scope.row.operationType"/>
</template>
</el-table-column>
<el-table-column label="同步ERP状态(0:失败,1成功)" align="center" prop="erpStatus" />
<el-table-column label="同步给ERP的数量" align="center" prop="erpAmount" />
<el-table-column label="最后更新时间" align="center" prop="updateDate" width="180">
<el-table-column label="生产计划" align="center" prop="planCode" />
<el-table-column label="计划明细" align="center" prop="planDetailCode" />
<el-table-column label="销售订单" align="center" prop="saleorderCode" />
<el-table-column label="成品编码" align="center" prop="materialCode" />
<el-table-column label="成品名称" align="center" prop="materialName" />
<el-table-column label="成品规格" align="center" prop="materialSpec" />
<el-table-column label="入库类型" align="center" prop="instockType" >
<template slot-scope="scope">
<span>{{ parseTime(scope.row.updateDate, '{y}-{m}-{d}') }}</span>
<dict-tag :options="dict.type.wms_product_instock_type" :value="scope.row.instockType"/>
</template>
</el-table-column>
<el-table-column label="开始时间;AGV处理开始时间" align="center" prop="beginTime" width="180">
<el-table-column label="成品条码" align="center" prop="productBatch" />
<el-table-column label="入库数量" align="center" prop="instockAmount" />
<el-table-column label="托盘码" align="center" prop="palletInfoCode" />
<el-table-column label="执行状态" align="center" prop="executeStatus" >
<template slot-scope="scope">
<span>{{ parseTime(scope.row.beginTime, '{y}-{m}-{d}') }}</span>
<dict-tag :options="dict.type.wms_execute_status" :value="scope.row.executeStatus"/>
</template>
</el-table-column>
<el-table-column label="结束时间;agv处理结束时间" align="center" prop="endTime" width="180">
<el-table-column label="入库人" align="center" prop="applyBy" />
<el-table-column label="入库时间" align="center" prop="applyDate" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.endTime, '{y}-{m}-{d}') }}</span>
<span>{{ parseTime(scope.row.applyDate, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<el-table-column label="同步ERP状态" align="center" prop="erpStatus" >
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['wms:productInstock:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['wms:productInstock:remove']"
>删除</el-button>
<dict-tag :options="dict.type.wms_erp_status" :value="scope.row.erpStatus"/>
</template>
</el-table-column>
<el-table-column label="同步ERP的数量" align="center" prop="erpAmount" />
</el-table>
<pagination
@ -396,10 +272,11 @@
</template>
<script>
import { listProductInstock, getProductInstock, delProductInstock, addProductInstock, updateProductInstock } from "@/api/wms/productInstock";
import { listProductInstock, getProductInstock, delProductInstock, addProductInstock, updateProductInstock,getProductWarehouses } from "@/api/wms/productInstock";
export default {
name: "ProductInstock",
dicts: ["wms_erp_status","wms_warehouse_instock_type","wms_operation_type","wms_execute_status","wms_product_instock_type"],
data() {
return {
//
@ -455,34 +332,13 @@ export default {
},
//
form: {},
//
rules: {
warehouseId: [
{ required: true, message: "仓库ID不能为空", trigger: "blur" }
],
productType: [
{ required: true, message: "成品类型不能为空", trigger: "change" }
],
operationType: [
{ required: true, message: "操作类型(0自动,1人工,2强制,3调度);调度,适合双排库自动移库时不能为空", trigger: "change" }
],
planCode: [
{ required: true, message: "计划编号,关联pd_base_plan_info的plan_code不能为空", trigger: "blur" }
],
instockType: [
{ required: true, message: "入库类型(1生产入库,2出半成品库,9其他入库)不能为空", trigger: "change" }
],
auditStatus: [
{ required: true, message: "审核状态(0待审核,1审核通过,2审核未通过)不能为空", trigger: "change" }
],
executeStatus: [
{ required: true, message: "执行状态(0待执行,1执行中,2执行完成)不能为空", trigger: "change" }
],
}
//
productWarehouseList:[]
};
},
created() {
this.getList();
this.getProductWarehouses();
},
methods: {
/** 查询成品入库记录列表 */
@ -602,7 +458,15 @@ export default {
this.download('wms/productInstock/export', {
...this.queryParams
}, `productInstock_${new Date().getTime()}.xlsx`)
}
},
/** 查询仓库列表 */
getProductWarehouses() {
getProductWarehouses().then(response => {
this.productWarehouseList = response.data;
});
},
}
};
</script>

@ -0,0 +1,575 @@
<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="warehouseId">
<el-select v-model="queryParams.warehouseId" placeholder="请选择仓库" clearable>
<el-option
v-for="(category, index) in productWarehouseList"
:key="index"
:label="category.warehouseName"
:value="category.warehouseId"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="生产计划" prop="planCode">
<el-input
v-model="queryParams.planCode"
placeholder="请输入生产计划编号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="生产计划明细" prop="planDetailCode">
<el-input
v-model="queryParams.planDetailCode"
placeholder="请输入生产计划明细编号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="销售订单" prop="saleorderCode">
<el-input
v-model="queryParams.saleorderCode"
placeholder="请输入销售订单号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<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="materialName">
<el-input
v-model="queryParams.materialName"
placeholder="请输入成品名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="成品规格" prop="materialSpec">
<el-input
v-model="queryParams.materialSpec"
placeholder="请输入成品规格"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="审核状态" prop="auditStatus">
<el-select
v-model="queryParams.auditStatus"
placeholder="请选择审核状态"
clearable
style="width: 240px"
>
<el-option
v-for="dict in dict.type.wms_audit_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="执行状态" prop="executeStatus">
<el-select
v-model="queryParams.executeStatus"
placeholder="请选择执行状态"
clearable
style="width: 240px"
>
<el-option
v-for="dict in dict.type.wms_execute_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="同步ERP状态" prop="erpStatus">
<el-select
v-model="queryParams.erpStatus"
placeholder="请选择同步ERP状态"
clearable
style="width: 240px"
>
<el-option
v-for="dict in dict.type.wms_erp_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="productoutstockList" @selection-change="handleSelectionChange">
<!-- <el-table-column label="成品出库记录ID" align="center" prop="productOutstockId" />-->
<el-table-column label="任务编号" align="center" prop="taskCode" />
<el-table-column label="仓库" align="center" prop="warehouseId" >
<template slot-scope="scope">
<span
v-for="(item, index) in productWarehouseList"
:key="index"
:value="item.warehouseOptions"
v-if="scope.row.warehouseId == item.warehouseId"
>
{{ item.warehouseName }}
</span>
</template>
</el-table-column>
<!-- <el-table-column label="库位编码" align="center" prop="locationCode" />-->
<!-- <el-table-column label="成品类型" align="center" prop="productType" />-->
<el-table-column label="操作类型" align="center" prop="operationType" >
<template slot-scope="scope">
<dict-tag :options="dict.type.wms_operation_type" :value="scope.row.operationType"/>
</template>
</el-table-column>
<el-table-column label="出库类型" align="center" prop="outstockType" >
<template slot-scope="scope">
<dict-tag :options="dict.type.wms_product_outstock_task_type" :value="scope.row.outstockType"/>
</template>
</el-table-column>
<el-table-column label="生产计划" align="center" prop="planCode" />
<el-table-column label="生产计划明细" align="center" prop="planDetailCode" />
<!-- <el-table-column label="销售订单ID主键" align="center" prop="saleOrderId" />-->
<el-table-column label="销售订单" align="center" prop="saleorderCode" />
<!-- <el-table-column label="项目号" align="center" prop="projectNo" />-->
<!-- <el-table-column label="原材料ID关联物料信息主键" align="center" prop="productId" />-->
<el-table-column label="成品编码" align="center" prop="materialCode" />
<el-table-column label="成品名称" align="center" prop="materialName" />
<el-table-column label="成品规格" align="center" prop="materialSpec" />
<!-- <el-table-column label="出库目的地" align="center" prop="endStationCode" />-->
<el-table-column label="申请数量" align="center" prop="applyQty" />
<el-table-column label="已出数量" align="center" prop="outstockQty" />
<!-- <el-table-column label="申请原因" align="center" prop="applyReason" />-->
<!-- <el-table-column label="审核原因" align="center" prop="auditReason" />-->
<el-table-column label="审核状态" align="center" prop="auditStatus" >
<template slot-scope="scope">
<dict-tag :options="dict.type.wms_audit_status" :value="scope.row.auditStatus"/>
</template>
</el-table-column>
<el-table-column label="执行状态" align="center" prop="executeStatus" >
<template slot-scope="scope">
<dict-tag :options="dict.type.wms_execute_status" :value="scope.row.executeStatus"/>
</template>
</el-table-column>
<el-table-column label="申请人" align="center" prop="applyBy" />
<el-table-column label="申请时间" align="center" prop="applyDate" width="180">
</el-table-column>
<el-table-column label="审核人" align="center" prop="auditBy" />
<el-table-column label="审核时间" align="center" prop="auditDate" width="180">
</el-table-column>
<el-table-column label="同步ERP状态" align="center" prop="erpStatus" >
<template slot-scope="scope">
<dict-tag :options="dict.type.wms_erp_status" :value="scope.row.erpStatus"/>
</template>
</el-table-column>
<el-table-column label="同步ERP数量" align="center" prop="erpAmount" />
<!-- <el-table-column label="最后更新时间" align="center" prop="updateDate" width="180">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ parseTime(scope.row.updateDate, '{y}-{m}-{d}') }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="执行开始时间" align="center" prop="beginTime" width="180">
</el-table-column>
<el-table-column label="执行结束时间" align="center" prop="endTime" width="180">
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['wms:productoutstock:edit']"
>明细</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改成品出库记录对话框 -->
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
<el-form ref="form" :model="form" label-width="80px">
<el-form-item label="任务编号" prop="taskCode">
<el-input v-model="form.taskCode" disabled/>
</el-form-item>
<!-- <el-form-item label="仓库ID;领料时需要保存" prop="warehouseId">-->
<!-- <el-input v-model="form.warehouseId" disabled />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="库位编码" prop="locationCode">-->
<!-- <el-input v-model="form.locationCode" disabled />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="计划编号,关联pd_base_plan_info的plan_code" prop="planCode">-->
<!-- <el-input v-model="form.planCode" disabled />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="计划明细编号,关联pd_base_plan_detail的plan_detail_code" prop="planDetailCode">-->
<!-- <el-input v-model="form.planDetailCode" disabled />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="销售订单ID主键" prop="saleOrderId">-->
<!-- <el-input v-model="form.saleOrderId" disabled />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="销售订单编号" prop="saleorderCode">-->
<!-- <el-input v-model="form.saleorderCode" disabled />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="项目号" prop="projectNo">-->
<!-- <el-input v-model="form.projectNo" disabled />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="原材料ID关联物料信息主键" prop="productId">-->
<!-- <el-input v-model="form.productId" disabled />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="存成品条码" prop="productBatch">-->
<!-- <el-input v-model="form.productBatch" disabled />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="托盘RFID代码" prop="palletInfoCode">-->
<!-- <el-input v-model="form.palletInfoCode" disabled />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="出库目的地" prop="endStationCode">-->
<!-- <el-input v-model="form.endStationCode" disabled />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="申请数量" prop="applyQty">-->
<!-- <el-input v-model="form.applyQty" disabled />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="已出数量" prop="outstockQty">-->
<!-- <el-input v-model="form.outstockQty" disabled />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="申请原因" prop="applyReason">-->
<!-- <el-input v-model="form.applyReason" type="textarea" disabled />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="审核原因" prop="auditReason">-->
<!-- <el-input v-model="form.auditReason" type="textarea" disabled />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="申请人" prop="applyBy">-->
<!-- <el-input v-model="form.applyBy" disabled />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="申请时间" prop="applyDate">-->
<!-- <el-input v-model="form.applyDate" disabled />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="审核人" prop="auditBy">-->
<!-- <el-input v-model="form.auditBy" disabled />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="审核时间" prop="auditDate">-->
<!-- <el-input v-model="form.auditDate" disabled />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="同步ERP数量" prop="erpAmount">-->
<!-- <el-input v-model="form.erpAmount" disabled />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="最后更新时间" prop="updateDate">-->
<!-- <el-input v-model="form.updateDate" disabled />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="执行开始时间" prop="beginTime">-->
<!-- <el-input v-model="form.beginTime" disabled />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="执行结束时间" prop="endTime">-->
<!-- <el-input v-model="form.endTime" disabled />-->
<!-- </el-form-item>-->
<el-divider content-position="center">成品出库记录明细</el-divider>
<el-table :data="wmsProductOutstockDetailList" :row-class-name="rowWmsProductOutstockDetailIndex" @selection-change="handleWmsProductOutstockDetailSelectionChange" ref="wmsProductOutstockDetail">
<!-- <el-table-column type="selection" width="50" align="center" />-->
<!-- <el-table-column label="序号" align="center" prop="index" width="50"/>-->
<el-table-column label="库位编码" prop="locationCode" width="150">
</el-table-column>
<el-table-column label="成品条码" prop="productBarcode" width="150">
</el-table-column>
<!-- <el-table-column label="计划数量" prop="planAmount" width="150">-->
<!-- <template slot-scope="scope">-->
<!-- <el-input v-model="scope.row.planAmount" placeholder="请输入计划数量" />-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="出库数量" prop="outstockAmount" width="150">
</el-table-column>
<el-table-column label="执行状态" prop="executeStatus" width="150">
<template slot-scope="scope">
<dict-tag :options="dict.type.wms_execute_status" :value="scope.row.executeStatus"/>
</template>
</el-table-column>
<el-table-column label="执行开始时间" prop="beginTime" width="240">
</el-table-column>
<el-table-column label="执行结束时间" prop="endTime" width="240">
</el-table-column>
</el-table>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listProductoutstock, getProductoutstock, delProductoutstock, addProductoutstock, updateProductoutstock } from "@/api/wms/productoutstock";
import { getProductWarehouses } from "@/api/wms/productInstock";
export default {
name: "Productoutstock",
dicts: ["wms_erp_status","wms_warehouse_instock_type","wms_operation_type","wms_execute_status","wms_audit_status","wms_product_outstock_task_type"],
data() {
return {
//
loading: true,
//
ids: [],
//
checkedWmsProductOutstockDetail: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
productoutstockList: [],
// ;1
wmsProductOutstockDetailList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
taskCode: null,
warehouseId: null,
locationCode: null,
productType: null,
operationType: null,
outstockType: null,
planCode: null,
planDetailCode: null,
saleOrderId: null,
saleorderCode: null,
projectNo: null,
productId: null,
productBatch: null,
palletInfoCode: null,
endStationCode: null,
applyQty: null,
outstockQty: null,
applyReason: null,
auditReason: null,
auditStatus: null,
executeStatus: null,
applyBy: null,
applyDate: null,
auditBy: null,
auditDate: null,
erpStatus: null,
erpAmount: null,
updateDate: null,
beginTime: null,
endTime: null
},
//
form: {},
productWarehouseList:[]
};
},
created() {
this.getList();
this.getProductWarehouses();
},
methods: {
/** 查询成品出库记录列表 */
getList() {
this.loading = true;
listProductoutstock(this.queryParams).then(response => {
this.productoutstockList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
productOutstockId: null,
taskCode: null,
warehouseId: null,
locationCode: null,
productType: null,
operationType: null,
outstockType: null,
planCode: null,
planDetailCode: null,
saleOrderId: null,
saleorderCode: null,
projectNo: null,
productId: null,
productBatch: null,
palletInfoCode: null,
endStationCode: null,
applyQty: null,
outstockQty: null,
applyReason: null,
auditReason: null,
auditStatus: null,
executeStatus: null,
applyBy: null,
applyDate: null,
auditBy: null,
auditDate: null,
erpStatus: null,
erpAmount: null,
updateBy: null,
updateDate: null,
beginTime: null,
endTime: null
};
this.wmsProductOutstockDetailList = [];
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.productOutstockId)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加成品出库记录";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const productOutstockId = row.productOutstockId || this.ids
getProductoutstock(productOutstockId).then(response => {
this.form = response.data;
this.wmsProductOutstockDetailList = response.data.wmsProductOutstockDetailList;
this.open = true;
this.title = "修改成品出库记录";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
this.form.wmsProductOutstockDetailList = this.wmsProductOutstockDetailList;
if (this.form.productOutstockId != null) {
updateProductoutstock(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addProductoutstock(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const productOutstockIds = row.productOutstockId || this.ids;
this.$modal.confirm('是否确认删除成品出库记录编号为"' + productOutstockIds + '"的数据项?').then(function() {
return delProductoutstock(productOutstockIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 成品出库记录明细;成品出库记录对应的明细信息一个一个的明细数量是1序号 */
rowWmsProductOutstockDetailIndex({ row, rowIndex }) {
row.index = rowIndex + 1;
},
/** 成品出库记录明细;成品出库记录对应的明细信息一个一个的明细数量是1添加按钮操作 */
handleAddWmsProductOutstockDetail() {
let obj = {};
obj.warehouseId = "";
obj.locationCode = "";
obj.productBarcode = "";
obj.productBatch = "";
obj.productId = "";
obj.planAmount = "";
obj.outstockAmount = "";
obj.confirmAmount = "";
obj.executeStatus = "";
obj.erpStatus = "";
obj.erpAmount = "";
obj.updateDate = "";
obj.beginTime = "";
obj.endTime = "";
this.wmsProductOutstockDetailList.push(obj);
},
/** 成品出库记录明细;成品出库记录对应的明细信息一个一个的明细数量是1删除按钮操作 */
handleDeleteWmsProductOutstockDetail() {
if (this.checkedWmsProductOutstockDetail.length == 0) {
this.$modal.msgError("请先选择要删除的成品出库记录明细;成品出库记录对应的明细信息一个一个的明细数量是1数据");
} else {
const wmsProductOutstockDetailList = this.wmsProductOutstockDetailList;
const checkedWmsProductOutstockDetail = this.checkedWmsProductOutstockDetail;
this.wmsProductOutstockDetailList = wmsProductOutstockDetailList.filter(function(item) {
return checkedWmsProductOutstockDetail.indexOf(item.index) == -1
});
}
},
/** 复选框选中数据 */
handleWmsProductOutstockDetailSelectionChange(selection) {
this.checkedWmsProductOutstockDetail = selection.map(item => item.index)
},
/** 导出按钮操作 */
handleExport() {
this.download('wms/productoutstock/export', {
...this.queryParams
}, `productoutstock_${new Date().getTime()}.xlsx`)
},
/** 查询仓库列表 */
getProductWarehouses() {
getProductWarehouses().then(response => {
this.productWarehouseList = response.data;
});
},
}
};
</script>
Loading…
Cancel
Save