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 @Autowired
private MesSaleOrderRelateMapper mesSaleOrderRelateMapper; private MesSaleOrderRelateMapper mesSaleOrderRelateMapper;
@Autowired
private MesRaiseCapitalBomMapper mesRaiseCapitalBomMapper;
@Autowired @Autowired
private MesConfig mesConfig; private MesConfig mesConfig;
@ -1270,9 +1273,9 @@ public class MesBaseBarcodeInfoServiceImpl implements IMesBaseBarcodeInfoService
throw new ServiceException("未找到生产任务"); throw new ServiceException("未找到生产任务");
} }
if (!mesProductOrder.getSaleType().equals(MesConstants.MES_PRODUCT_ORDER_INTERNAL)) { // if (!mesProductOrder.getSaleType().equals(MesConstants.MES_PRODUCT_ORDER_INTERNAL)) {
throw new ServiceException("此生产任务为外部销售,不能直接出库"); // throw new ServiceException("此生产任务为外部销售,不能直接出库");
} // }
return 1; return 1;
@ -1513,14 +1516,30 @@ public class MesBaseBarcodeInfoServiceImpl implements IMesBaseBarcodeInfoService
virtualMaterialBom.setActiveFlag(MesConstants.MES_MATERIAL_ACTIVE_FLAG_NORMAL); virtualMaterialBom.setActiveFlag(MesConstants.MES_MATERIAL_ACTIVE_FLAG_NORMAL);
virtualMaterialBom.setCreateBy(userName); virtualMaterialBom.setCreateBy(userName);
virtualMaterialBom.setCreateTime(currentDate); 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); mesMaterialBomMapper.insertMesMaterialBom(virtualMaterialBom);
toUpdatedMaterialBoms.forEach(umb -> { toUpdatedMaterialBoms.forEach(umb -> {
MesMaterialBom queryChildBom = new MesMaterialBom(); MesMaterialBom queryChildBom = new MesMaterialBom();
queryChildBom.setParentId(umb.getParentId()); queryChildBom.setParentId(umb.getMaterialBomId());
List<MesMaterialBom> childBomList = mesMaterialBomMapper.selectMesMaterialBomList(queryChildBom); List<MesMaterialBom> childBomList = mesMaterialBomMapper.selectMesMaterialBomList(queryChildBom);
for (MesMaterialBom childBom : childBomList) { for (MesMaterialBom childBom : childBomList) {
childBom.setAncestors(childBom.getAncestors() + "," + virtualMaterialBom.getMaterialBomId()); childBom.setAncestors("0," + virtualMaterialBom.getMaterialBomId() + "," + childBom.getParentId());
childBom.setUpdateBy(userName); childBom.setUpdateBy(userName);
childBom.setUpdateTime(currentDate); childBom.setUpdateTime(currentDate);
mesMaterialBomMapper.updateMesMaterialBom(childBom); mesMaterialBomMapper.updateMesMaterialBom(childBom);

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

@ -106,6 +106,7 @@
<if test="printPerson != null and printPerson != ''">and bbi.print_person = #{printPerson}</if> <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="printFlag != null and printFlag != ''">and bbi.print_flag = #{printFlag}</if>
<if test="batchFlag != null and batchFlag != ''">and bbi.batch_flag = #{batchFlag}</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="barcodeType != null and barcodeType != ''">and bbi.barcode_type = #{barcodeType}</if>
<if test="singleFlag != null and singleFlag != ''">and bbi.single_flag = #{singleFlag}</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> <if test="barcodeInfo != null and barcodeInfo != ''">and bbi.barcode_info = #{barcodeInfo}</if>

@ -83,6 +83,7 @@
keyProperty="materialBomId"> keyProperty="materialBomId">
insert into mes_material_bom insert into mes_material_bom
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="materialBomId != null">material_bom_id,</if>
<if test="parentId != null">parent_id,</if> <if test="parentId != null">parent_id,</if>
<if test="ancestors != null">ancestors,</if> <if test="ancestors != null">ancestors,</if>
<if test="materialClassfication != null and materialClassfication != ''">material_classfication,</if> <if test="materialClassfication != null and materialClassfication != ''">material_classfication,</if>
@ -103,6 +104,7 @@
<if test="assembleTime != null">assemble_time,</if> <if test="assembleTime != null">assemble_time,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="materialBomId != null">#{materialBomId},</if>
<if test="parentId != null">#{parentId},</if> <if test="parentId != null">#{parentId},</if>
<if test="ancestors != null">#{ancestors},</if> <if test="ancestors != null">#{ancestors},</if>
<if test="materialClassfication != null and materialClassfication != ''">#{materialClassfication},</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.fentry_id,
mpo.po_no, mpo.po_no,
mpo.document_status, mpo.document_status,
mpo.material_id, mbmi.material_id,
mbmi.material_code, mbmi.material_code,
mbmi.material_name, mbmi.material_name,
mbmi.material_spec, mbmi.material_spec,

@ -6,14 +6,16 @@ public class Main {
public static void main(String[] args) { public static void main(String[] args) {
// Press Alt+Enter with your caret at the highlighted text to see how // Press Alt+Enter with your caret at the highlighted text to see how
// IntelliJ IDEA suggests fixing it. // 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") @GetMapping("/getCheckProjects")
public AjaxResult getCheckProjects(QmsCheckProject checkProject) public AjaxResult getCheckProjects(QmsCheckProject checkProject)
{ {
startPage(); // startPage();
List<QmsCheckProject> checkProjects = qmsCheckProjectService.selectQmsCheckProjectList(checkProject); List<QmsCheckProject> checkProjects = qmsCheckProjectService.selectQmsCheckProjectList(checkProject);
return success(checkProjects); return success(checkProjects);
} }

@ -32,6 +32,10 @@ public class QmsCheckInstanceFile extends BaseEntity
private String filePath; private String filePath;
private String name;
private String url;
public String getFilePath() { public String getFilePath() {
return filePath; return filePath;
} }
@ -77,6 +81,22 @@ public class QmsCheckInstanceFile extends BaseEntity
return faultFile; 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 @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

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

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

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

@ -63,4 +63,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{checkInstanceFileId} #{checkInstanceFileId}
</foreach> </foreach>
</delete> </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> </mapper>

@ -29,6 +29,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateTime" column="update_time" /> <result property="updateTime" column="update_time" />
<result property="materialCode" column="material_code" /> <result property="materialCode" column="material_code" />
<result property="materialName" column="material_name" /> <result property="materialName" column="material_name" />
<result property="materialSpec" column="material_spec" />
</resultMap> </resultMap>
<resultMap id="QmsCheckResultQmsCheckResultDetailResult" type="QmsCheckResult" extends="QmsCheckResultResult"> <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 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, 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 from qms_check_result qcr left join mes_base_material_info mbmi on qcr.material_id=mbmi.material_id
<where> <where>
<if test="checkRuleType != null and checkRuleType != ''"> and check_rule_type = #{checkRuleType}</if> <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(); // WmsProductStock queryProductStock = new WmsProductStock();
// queryProductStock.setSaleorderCode(request.getParameter("salesorderCode")); // queryProductStock.setSaleorderCode(request.getParameter("salesorderCode"));
// queryProductStock.setStockType(WmsConstants.PRODUCT_STOCK_STOCK_TYPE_PRODUCT); // queryProductStock.setStockType(WmsConstants.PRODUCT_STOCK_STOCK_TYPE_PRODUCT);
queryStockTotal.setWarehouseType(WmsConstants.WMS_WAREHOUSE_TYPE_AGV);
List<WmsStockTotal> wmsStockTotals = wmsStockTotalService.selectWmsStockTotalList4ProductApply(queryStockTotal); List<WmsStockTotal> wmsStockTotals = wmsStockTotalService.selectWmsStockTotalList4ProductApply(queryStockTotal);
return getDataTable(wmsStockTotals); return getDataTable(wmsStockTotals);
} }

@ -3,6 +3,10 @@ package com.hw.wms.controller;
import java.util.List; import java.util.List;
import java.io.IOException; import java.io.IOException;
import javax.servlet.http.HttpServletResponse; 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.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
@ -35,6 +39,9 @@ public class WmsProductInstockController extends BaseController
@Autowired @Autowired
private IWmsProductInstockService wmsProductInstockService; private IWmsProductInstockService wmsProductInstockService;
@Autowired
private IWmsBaseWarehouseService wmsBaseWarehouseService;
/** /**
* ; * ;
*/ */
@ -43,7 +50,7 @@ public class WmsProductInstockController extends BaseController
public TableDataInfo list(WmsProductInstock wmsProductInstock) public TableDataInfo list(WmsProductInstock wmsProductInstock)
{ {
startPage(); startPage();
List<WmsProductInstock> list = wmsProductInstockService.selectWmsProductInstockList(wmsProductInstock); List<WmsProductInstock> list = wmsProductInstockService.selectWmsProductInstockJoinList(wmsProductInstock);
return getDataTable(list); return getDataTable(list);
} }
@ -102,4 +109,18 @@ public class WmsProductInstockController extends BaseController
{ {
return toAjax(wmsProductInstockService.deleteWmsProductInstockByProductInstockIds(productInstockIds)); 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) public TableDataInfo list(WmsProductOutstock wmsProductOutstock)
{ {
startPage(); startPage();
List<WmsProductOutstock> list = wmsProductOutstockService.selectWmsProductOutstockList(wmsProductOutstock); List<WmsProductOutstock> list = wmsProductOutstockService.selectWmsProductOutstockJoinList(wmsProductOutstock);
return getDataTable(list); return getDataTable(list);
} }

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

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

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

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

@ -138,6 +138,11 @@ public class WmsStockTotal extends BaseEntity {
private Long materialBomId; private Long materialBomId;
private String virtualFlag;
private String warehouseType;
public String getWarehouseName() { public String getWarehouseName() {
return warehouseName; return warehouseName;
} }
@ -387,6 +392,22 @@ public class WmsStockTotal extends BaseEntity {
this.materialBomId = materialBomId; 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 @Override
public String toString() { public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)

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

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

@ -98,4 +98,12 @@ public interface IWmsProductInstockService {
* @return * @return
*/ */
public int fourthFloorProduceInstock(WmsProduceInstockVo wmsProduceInstockVo); 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 userName = SecurityUtils.getUsername();
String warehouseInstockType = baseWareHouse.getWarehouseInstockType(); String warehouseInstockType = baseWareHouse.getWarehouseInstockType();
String moveWay = "", operationType = ""; String moveWay = "", operationType = "";
BigDecimal planAmount = null;
if (warehouseType.equals(WmsConstants.WMS_WAREHOUSE_TYPE_WORKBIN_AGV)) { if (warehouseType.equals(WmsConstants.WMS_WAREHOUSE_TYPE_WORKBIN_AGV)) {
throw new ServiceException("立库库位移库请在调度页面进行移库"); throw new ServiceException("立库库位移库请在调度页面进行移库");
} else if (warehouseType.equals(WmsConstants.WMS_WAREHOUSE_TYPE_AGV)) { } else if (warehouseType.equals(WmsConstants.WMS_WAREHOUSE_TYPE_AGV)) {
moveWay = WmsConstants.WMS_MOVEMERGE_WAY_AGV; moveWay = WmsConstants.WMS_MOVEMERGE_WAY_AGV;
operationType = WmsConstants.MWS_OPERATION_TYPE_DISPATCHD; operationType = WmsConstants.MWS_OPERATION_TYPE_DISPATCHD;
planAmount = BigDecimal.ONE;
WmsMove queryMove = new WmsMove(); WmsMove queryMove = new WmsMove();
queryMove.setWarehouseId(oriLocation.getWarehouseId()); queryMove.setWarehouseId(oriLocation.getWarehouseId());
@ -232,6 +234,7 @@ public class WmsMoveServiceImpl implements IWmsMoveService {
wmsMove.setMoveType(wmsMoveApplyVo.getMoveType()); wmsMove.setMoveType(wmsMoveApplyVo.getMoveType());
wmsMove.setAuditStatus(WmsConstants.WMS_AUDIT_STATUS_PASS); wmsMove.setAuditStatus(WmsConstants.WMS_AUDIT_STATUS_PASS);
wmsMove.setExecuteStatus(WmsConstants.WMS_EXECUTE_STATUS_TOEXECUTE); wmsMove.setExecuteStatus(WmsConstants.WMS_EXECUTE_STATUS_TOEXECUTE);
wmsMove.setPlanAmount(planAmount);
wmsMove.setApplyBy(userName); wmsMove.setApplyBy(userName);
wmsMove.setApplyDate(currentDate); wmsMove.setApplyDate(currentDate);
wmsMoveMapper.insertWmsMove(wmsMove); wmsMoveMapper.insertWmsMove(wmsMove);
@ -335,24 +338,26 @@ public class WmsMoveServiceImpl implements IWmsMoveService {
} }
WmsBaseLocation frontLocation = baseLocationList.get(0); WmsBaseLocation frontLocation = baseLocationList.get(0);
if (!frontLocation.getLocationStatus().equals(WmsConstants.WMS_BASE_LOCATION_STATUS_NORMAL)) { if (!frontLocation.getLocColumn().equals(baseLocation.getLocColumn())) {
throw new ServiceException(locationName + "的浅库位状态为" + WmsConstants.LOCATION_STATUS_PROMPT_MAP.get(frontLocation.getLocationStatus())); if (!frontLocation.getLocationStatus().equals(WmsConstants.WMS_BASE_LOCATION_STATUS_NORMAL)) {
} throw new ServiceException(locationName + "的浅库位状态为" + WmsConstants.LOCATION_STATUS_PROMPT_MAP.get(frontLocation.getLocationStatus()));
}
if (warehouseInstockType.equals(WmsConstants.WMS_WAREHOUSE_INSTOCK_TYPE_RAW)) {//如果是原材料 if (warehouseInstockType.equals(WmsConstants.WMS_WAREHOUSE_INSTOCK_TYPE_RAW)) {//如果是原材料
WmsRawStock queryRawStock = new WmsRawStock(); WmsRawStock queryRawStock = new WmsRawStock();
queryRawStock.setLocationCode(frontLocation.getLocationCode()); queryRawStock.setLocationCode(frontLocation.getLocationCode());
List<WmsRawStock> wmsRawStocks = wmsRawStockMapper.selectWmsRawStockInList(queryRawStock); List<WmsRawStock> wmsRawStocks = wmsRawStockMapper.selectWmsRawStockInList(queryRawStock);
if (wmsRawStocks != null && !wmsRawStocks.isEmpty()) { if (wmsRawStocks != null && !wmsRawStocks.isEmpty()) {
throw new ServiceException(locationName + "的浅库位有库存,无法申请移库"); throw new ServiceException(locationName + "的浅库位有库存,无法申请移库");
} }
} else { } else {
WmsProductStock queryProductStock = new WmsProductStock(); WmsProductStock queryProductStock = new WmsProductStock();
queryProductStock.setLocationCode(frontLocation.getLocationCode()); queryProductStock.setLocationCode(frontLocation.getLocationCode());
List<WmsProductStock> productStocks = wmsProductStockMapper.selectWmsProductStockInList(queryProductStock); List<WmsProductStock> productStocks = wmsProductStockMapper.selectWmsProductStockInList(queryProductStock);
if (productStocks != null && !productStocks.isEmpty()) { if (productStocks != null && !productStocks.isEmpty()) {
throw new ServiceException(locationName + "的浅库位有库存,无法申请移库"); 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 @Override
public List<WmsProductOutstock> selectWmsProductOutstockJoinList(WmsProductOutstock wmsProductOutstock) { public List<WmsProductOutstock> selectWmsProductOutstockJoinList(WmsProductOutstock wmsProductOutstock) {
wmsProductOutstock.setMaterialSpec(StringUtils.isNotEmpty(wmsProductOutstock.getMaterialSpec())
? wmsProductOutstock.getMaterialSpec().replaceAll("\\s+", "") : "");
return wmsProductOutstockMapper.selectWmsProductOutstockJoinList(wmsProductOutstock); return wmsProductOutstockMapper.selectWmsProductOutstockJoinList(wmsProductOutstock);
} }

@ -157,16 +157,26 @@ public class WmsStockTotalServiceImpl implements IWmsStockTotalService {
String materialClassfication = wmsStockTotal.getMaterialClassfication(); String materialClassfication = wmsStockTotal.getMaterialClassfication();
Long warehouseId = wmsStockTotal.getWarehouseId(); Long warehouseId = wmsStockTotal.getWarehouseId();
//五楼原料周转区仓库ID if(materialClassfication.equals(MesConstants.MES_MATERIAL_CLASSFICATION_VIRTUAL)){
if (warehouseId.equals(wmsConfig.getFifthCabinetWarehouseId()) && materialClassfication.equals(MesConstants.MES_MATERIAL_CLASSFICATION_VIRTUAL)) { //五楼原料周转区仓库ID
wmsStockTotal.setMaterialId(wmsStockTotal.getProductId()); if (warehouseId.equals(wmsConfig.getFifthCabinetWarehouseId())) {
wmsStockTotal.setAccessoriesFlag(null); wmsStockTotal.setMaterialId(wmsStockTotal.getProductId());
} else { 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)) { if (StringUtils.isEmpty(wmsStockTotal.getAccessoriesFlag()) || wmsStockTotal.getAccessoriesFlag().equals(MesConstants.MES_MATERIAL_ACCESSORIES_FLAG_NO)) {
wmsStockTotal.setAncestors("0," + wmsStockTotal.getMaterialBomId()); wmsStockTotal.setAncestors("0," + wmsStockTotal.getMaterialBomId());
wmsStockTotal.setAccessoriesFlag(null); wmsStockTotal.setAccessoriesFlag(null);
} }
} }
return wmsStockTotalMapper.selectWmsStockTotalJoinListBySaleOrder(wmsStockTotal); 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.core.utils.StringUtils;
import com.hw.common.security.utils.SecurityUtils; import com.hw.common.security.utils.SecurityUtils;
import com.hw.wms.config.WmsConfig; import com.hw.wms.config.WmsConfig;
import com.hw.wms.domain.WmsBaseWarehouse;
import com.hw.wms.domain.vo.WmsWarehouseMaterialCheckVo; import com.hw.wms.domain.vo.WmsWarehouseMaterialCheckVo;
import com.hw.wms.mapper.WmsBaseWarehouseMapper;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.hw.wms.mapper.WmsWarehouseMaterialMapper; import com.hw.wms.mapper.WmsWarehouseMaterialMapper;
@ -28,6 +30,9 @@ public class WmsWarehouseMaterialServiceImpl implements IWmsWarehouseMaterialSer
@Autowired @Autowired
private WmsWarehouseMaterialMapper wmsWarehouseMaterialMapper; private WmsWarehouseMaterialMapper wmsWarehouseMaterialMapper;
@Autowired
private WmsBaseWarehouseMapper wmsBaseWarehouseMapper;
@Autowired @Autowired
private WmsConfig wmsConfig; private WmsConfig wmsConfig;
@ -125,7 +130,19 @@ public class WmsWarehouseMaterialServiceImpl implements IWmsWarehouseMaterialSer
Date currentDate = new Date(); Date currentDate = new Date();
// 新增仓库的物料配置信息 // 新增仓库的物料配置信息
List<WmsWarehouseMaterial> list = new ArrayList<WmsWarehouseMaterial>(); List<WmsWarehouseMaterial> list = new ArrayList<WmsWarehouseMaterial>();
// WmsBaseWarehouse baseWarehouse = wmsBaseWarehouseMapper.selectWmsBaseWarehouseByWarehouseId(warehouseId);
// String wareHouseType = baseWarehouse.getWarehouseType();
for (Long materialId : materialIds) { 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(); WmsWarehouseMaterial warehouseMaterial = new WmsWarehouseMaterial();
warehouseMaterial.setWarehouseId(warehouseId); warehouseMaterial.setWarehouseId(warehouseId);
warehouseMaterial.setWarehouseFloor(warehouseFloor); warehouseMaterial.setWarehouseFloor(warehouseFloor);
@ -158,10 +175,10 @@ public class WmsWarehouseMaterialServiceImpl implements IWmsWarehouseMaterialSer
errorMsgBuilder.append("没有配置仓库信息['").append(",物料编码:").append(wmcv.getMaterialCode()) errorMsgBuilder.append("没有配置仓库信息['").append(",物料编码:").append(wmcv.getMaterialCode())
.append(",物料名称:").append(wmcv.getMaterialName()).append(",物料规格:").append(wmcv.getMaterialSpec()) .append(",物料名称:").append(wmcv.getMaterialName()).append(",物料规格:").append(wmcv.getMaterialSpec())
.append("];"); .append("];");
}else{ } else {
WmsWarehouseMaterial wmsWarehouseMaterial = wmsWarehouseMaterials.get(0); WmsWarehouseMaterial wmsWarehouseMaterial = wmsWarehouseMaterials.get(0);
Long warehouseId = wmsWarehouseMaterial.getWarehouseId(); Long warehouseId = wmsWarehouseMaterial.getWarehouseId();
if(!warehouseId.equals(wmsConfig.getFifthCabinetWarehouseId())){ if (!warehouseId.equals(wmsConfig.getFifthCabinetWarehouseId())) {
errorMsgBuilder.append("仓库信息配置不正确['").append(",物料编码:").append(wmcv.getMaterialCode()) errorMsgBuilder.append("仓库信息配置不正确['").append(",物料编码:").append(wmcv.getMaterialCode())
.append(",物料名称:").append(wmcv.getMaterialName()).append(",物料规格:").append(wmcv.getMaterialSpec()) .append(",物料名称:").append(wmcv.getMaterialName()).append(",物料规格:").append(wmcv.getMaterialSpec())
.append("];"); .append("];");

@ -13,6 +13,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="operationType" column="operation_type" /> <result property="operationType" column="operation_type" />
<result property="planCode" column="plan_code" /> <result property="planCode" column="plan_code" />
<result property="planDetailCode" column="plan_detail_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="instockType" column="instock_type" />
<result property="productId" column="product_id" /> <result property="productId" column="product_id" />
<result property="productBatch" column="product_batch" /> <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="price" column="price" />
<result property="specificationParameter" column="specification_parameter" /> <result property="specificationParameter" column="specification_parameter" />
<result property="materialCode" column="material_code" /> <result property="materialCode" column="material_code" />
<result property="materialName" column="material_name" />
<result property="materialSpec" column="material_spec" />
</resultMap> </resultMap>
<resultMap id="WmsProductInstockWmsProductInstockDetailResult" type="WmsProductInstock" extends="WmsProductInstockResult"> <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} and wpi.apply_date between #{beginTime} and #{endTime}
</if> </if>
</select> </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> </mapper>

@ -41,6 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="warehouseName" column="warehouse_name" /> <result property="warehouseName" column="warehouse_name" />
<result property="materialCode" column="material_code" /> <result property="materialCode" column="material_code" />
<result property="materialName" column="material_name" /> <result property="materialName" column="material_name" />
<result property="materialSpec" column="material_spec" />
<result property="specificationParameter" column="specification_parameter" /> <result property="specificationParameter" column="specification_parameter" />
<result property="unitCode" column="unit_code" /> <result property="unitCode" column="unit_code" />
<result property="price" column="price" /> <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="updateDate" column="sub_update_date" />
<result property="beginTime" column="sub_begin_time" /> <result property="beginTime" column="sub_begin_time" />
<result property="endTime" column="sub_end_time" /> <result property="endTime" column="sub_end_time" />
<result property="productBarcode" column="sub_product_barcode" />
</resultMap> </resultMap>
<sql id="selectWmsProductOutstockVo"> <sql id="selectWmsProductOutstockVo">
@ -248,8 +250,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectWmsProductOutstockJoinList" parameterType="WmsProductOutstock" resultMap="WmsProductOutstockResult"> <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, 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, 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 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 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 left join mes_base_material_info mbmi on wpo.product_id = mbmi.material_id
<where> <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="productType != null and productType != ''"> and wpo.product_type = #{productType}</if>
<if test="operationType != null and operationType != ''"> and wpo.operation_type = #{operationType}</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="outstockType != null and outstockType != ''"> and wpo.outstock_type = #{outstockType}</if>
<if test="planCode != null "> and wpo.plan_code = #{planCode}</if> <if test="planCode != null and planCode != ''"> and wpo.plan_code like concat('%', #{planCode}, '%')</if>
<if test="planDetailCode != null "> and wpo.plan_detail_code = #{planDetailCode}</if> <if test="planDetailCode != null and planDetailCode != ''"> and wpo.plan_detail_code like concat('%', #{planDetailCode}, '%')</if>
<if test="applyReason != null and applyReason != ''"> and wpo.apply_reason = #{applyReason}</if> <if test="saleorderCode != null and saleorderCode != ''"> and wpo.saleorder_code like concat('%', #{saleorderCode}, '%')</if>
<if test="auditReason != null and auditReason != ''"> and wpo.audit_reason = #{auditReason}</if>
<if test="auditStatus != null and auditStatus != ''"> and wpo.audit_status = #{auditStatus}</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 = #{executeStatus}</if>
<if test="executeStatus != null and executeStatus != '' and executeStatus == 'notFinish'"> and (wpo.execute_status = '0' or wpo.execute_status = '1')</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> <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="updateDate != null "> and wpo.update_date = #{updateDate}</if>
<if test="beginTime != null "> and wpo.begin_time = #{beginTime}</if> <if test="beginTime != null "> and wpo.begin_time = #{beginTime}</if>
<if test="endTime != null "> and wpo.end_time = #{endTime}</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> </where>
order by wpo.apply_date desc
</select> </select>

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

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

@ -42,3 +42,13 @@ export function delProductInstock(productInstockId) {
method: 'delete' 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' 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) { export function auditListProductoutstock(query) {
return request({ return request({

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

@ -238,7 +238,7 @@
</el-button> </el-button>
<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" type="text"
@click="getMaterials(scope.row) " @click="getMaterials(scope.row) "
> >
@ -842,7 +842,7 @@ export default {
planCode: val.planCode, planCode: val.planCode,
dispatchCode: val.dispatchCode, dispatchCode: val.dispatchCode,
planDetailCode: val.planDetailCode, planDetailCode: val.planDetailCode,
saleOrderId: val.saleOrderId, saleOrderId: this.saleOrderId,
productId: this.productId, productId: this.productId,
materialBomId: this.materialBomId, materialBomId: this.materialBomId,
maxPlanAmount: 100000000, maxPlanAmount: 100000000,

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

@ -390,7 +390,7 @@
</div> </div>
</el-dialog> </el-dialog>
<!-- 添加采购订单对话框 --> <!-- 添加采购订单对话框,包含绑定销售订单信息 -->
<el-dialog title="选择采购订单信息" :visible.sync="purchaseOrderOpen" append-to-body> <el-dialog title="选择采购订单信息" :visible.sync="purchaseOrderOpen" append-to-body>
<select-orderBind ref="purchaseOrderRef" v-if="purchaseOrderOpen" :defineData="barcodeData"></select-orderBind> <select-orderBind ref="purchaseOrderRef" v-if="purchaseOrderOpen" :defineData="barcodeData"></select-orderBind>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
@ -539,12 +539,19 @@
<el-dialog :title="title" :visible.sync="regularOpen" width="500px" append-to-body> <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 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-form-item label="物料ID" prop="materialId" v-if="false">
<el-input v-model="regularForm.materialId" placeholder="请输入物料ID"/> <el-input v-model="regularForm.materialId" placeholder="请输入物料ID"/>
</el-form-item> </el-form-item>
<el-form-item label="物料编码" prop="materialCode"> <el-form-item label="物料编码" prop="materialCode">
<el-input v-model="regularForm.materialCode" suffix-icon="el-icon-search" readonly <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>
<el-form-item label="物料名称" prop="materialName"> <el-form-item label="物料名称" prop="materialName">
<el-input v-model="regularForm.materialName" readonly/> <el-input v-model="regularForm.materialName" readonly/>
@ -667,6 +674,19 @@
</el-dialog> </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> </div>
</template> </template>
@ -682,15 +702,15 @@ import {checkWarehouseMaterials} from "@/api/wms/wmswarehouse";
import selectOrderBind from '@//views/mes/purchaseOrder/selectOrderBind.vue'; import selectOrderBind from '@//views/mes/purchaseOrder/selectOrderBind.vue';
import selectMaterial from '@//views/mes/materialinfo/selectMaterial.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 { export default {
name: "Barcode", name: "Barcode",
dicts: ['bind_status', 'active_flag', 'barcode_type', 'mes_safe_flag', 'mes_print_flag', 'mes_material_batch_flag'], dicts: ['bind_status', 'active_flag', 'barcode_type', 'mes_safe_flag', 'mes_print_flag', 'mes_material_batch_flag'],
components: { components: {
'select-orderBind': selectOrderBind, 'select-orderBind': selectOrderBind,
'select-material': selectMaterial 'select-material': selectMaterial,
'select-purchaseOrder': selectPurchaseOrder,
}, },
data() { data() {
@ -711,8 +731,9 @@ export default {
// //
barcodeList: [], barcodeList: [],
// //
purchaseOrderOpen: false, onlyPurchaseOrderOpen: false,
purchaseOrderOpen: false,
// //
selectMaterialVisible: false, selectMaterialVisible: false,
// //
@ -728,7 +749,7 @@ export default {
printPerson: null, printPerson: null,
printFlag: null, printFlag: null,
batchFlag: null, batchFlag: null,
barcodeType: "1", barcodeTypeStr: "1,9",
barcodeInfo: null, barcodeInfo: null,
batchCode: null, batchCode: null,
palletInfoCode: null, palletInfoCode: null,
@ -1166,7 +1187,7 @@ export default {
// alert(JSON.stringify(selectedRows)); // alert(JSON.stringify(selectedRows));
} else { } else {
this.submitSingleSelectPurchaseOrder(); this.submitSingleSelectPurchaseOrder();
} }
@ -1221,6 +1242,12 @@ export default {
this.purchaseOrderOpen = false; this.purchaseOrderOpen = false;
}, },
handleDeletePurchaseOrder(row) { handleDeletePurchaseOrder(row) {
const mesSaleOrderRelateList = this.materialRelateForm.mesSaleOrderRelateList; 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> </script>

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

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

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

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

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

@ -41,10 +41,19 @@
</el-form> </el-form>
<el-table v-loading="loading" :data="saleOrderList" <el-table v-loading="loading" :data="saleOrderList"
@row-click="handleRowClick" @selection-change="handleSelectionChange"
highlight-current-row :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="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="materialName" v-if="columns[10].visible"/>
<el-table-column label="物料规格" align="center" prop="materialSpec"/> <el-table-column label="物料规格" align="center" prop="materialSpec"/>
@ -88,6 +97,8 @@ export default {
total: 0, total: 0,
// //
saleOrderList: [], saleOrderList: [],
selectedRow: null,
selectedRowId: null,
// //
title: "", title: "",
// //
@ -103,7 +114,7 @@ export default {
documentStatus: null, documentStatus: null,
factoryId: null, factoryId: null,
prodlineId: null, prodlineId: null,
saleOrderClassfication:'1', saleOrderClassfication: '1',
materialId: null, materialId: null,
materialCode: null, materialCode: null,
materialName: null, materialName: null,
@ -191,6 +202,22 @@ export default {
this.selectedRow = selection 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> </script>

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

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

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

@ -11,9 +11,14 @@
</el-col> </el-col>
<el-col :span="8" :offset="2"> <el-col :span="8" :offset="2">
<el-form-item label="工单状态" > <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-form-item>
</el-col> </el-col>
</el-row>
<el-row>
<el-col :span="8" :offset="2"> <el-col :span="8" :offset="2">
<el-form-item label="开始时间" > <el-form-item label="开始时间" >
<el-input v-model="this.qualityInstanceStartTimeUp" disabled /> <el-input v-model="this.qualityInstanceStartTimeUp" disabled />
@ -45,26 +50,32 @@
<!-- 不知道什么原理 加个空格财能正常显示 --> <!-- 不知道什么原理 加个空格财能正常显示 -->
</el-form-item> </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-col :span="24">
<el-form-item label="处理意见" <el-form-item label="处理意见"
> >
<el-input <el-input
v-model="repairInstanceActivity123.processHandleResolution" v-model="repairInstanceActivity123.processHandleResolution"
placeholder="请输入处理意见"
:disabled=true :disabled=true
> >
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <!-- <el-col :span="24">-->
<el-form-item label="处理描述" prop="processHandleDesc"> <!-- <el-form-item label="处理描述" prop="processHandleDesc">-->
<el-input <!-- <el-input-->
v-model="repairInstanceActivity123.processHandleDesc" <!-- v-model="repairInstanceActivity123.processHandleDesc"-->
placeholder="请输入处理描述" <!-- placeholder="请输入处理描述"-->
:disabled=true <!-- :disabled=true-->
/> <!-- />-->
</el-form-item> <!-- </el-form-item>-->
</el-col> <!-- </el-col>-->
</el-form-item> </el-form-item>
</el-form> </el-form>
<!-- 新增审批流程表单显示--> <!-- 新增审批流程表单显示-->
@ -76,20 +87,20 @@
> >
<el-input <el-input
v-model="form1.processHandleResolution" 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-input>
</el-form-item> </el-form-item>
</el-col> </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> <el-button type="primary" @click="submitForm"> </el-button>
</div> </div>
</el-form> </el-form>
@ -187,9 +198,12 @@
import { listQualityinstanceactivity, listQualityinstanceactivitynoStatus,getQualityinstanceactivity, delQualityinstanceactivity, addQualityinstanceactivity, updateQualityinstanceactivity } from "@/api/qms/qualityinstanceactivity"; import { listQualityinstanceactivity, listQualityinstanceactivitynoStatus,getQualityinstanceactivity, delQualityinstanceactivity, addQualityinstanceactivity, updateQualityinstanceactivity } from "@/api/qms/qualityinstanceactivity";
import { listQualityinstance } from '@/api/qms/qualityinstance' import { listQualityinstance } from '@/api/qms/qualityinstance'
import { listWfprocessactivity } from '@/api/system/common/wfprocessactivity' import { listWfprocessactivity } from '@/api/system/common/wfprocessactivity'
import ViewFile from "@/components/viewFile/index.vue";
export default { export default {
name: "Qualityinstanceactivity", name: "Qualityinstanceactivity",
components: {ViewFile},
dicts:['qms_quality_instance_status'],
data() { data() {
return { return {
formIf:true, formIf:true,
@ -255,7 +269,14 @@ export default {
processHandleResolution: [ processHandleResolution: [
{ required: true, message: "处理意见不能为空", trigger: "blur" } { required: true, message: "处理意见不能为空", trigger: "blur" }
], ],
} },
//
showFileDialog: false,
//
thisTitle: "质检图片",
//
fileListData: [],
}; };
}, },
created() { created() {
@ -446,6 +467,17 @@ export default {
this.download('qms/qualityinstanceactivity/export', { this.download('qms/qualityinstanceactivity/export', {
...this.queryParams ...this.queryParams
}, `qualityinstanceactivity_${new Date().getTime()}.xlsx`) }, `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> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="任务编号" prop="taskCode"> <!-- <el-form-item label="任务编号" prop="taskCode">-->
<el-input <!-- <el-input-->
v-model="queryParams.taskCode" <!-- v-model="queryParams.taskCode"-->
placeholder="请输入任务编号" <!-- placeholder="请输入任务编号"-->
clearable <!-- clearable-->
@keyup.enter.native="handleQuery" <!-- @keyup.enter.native="handleQuery"-->
/> <!-- />-->
</el-form-item> <!-- </el-form-item>-->
<el-form-item label="仓库ID" prop="warehouseId"> <el-form-item label="仓库" prop="warehouseId">
<el-input <el-select v-model="queryParams.warehouseId" placeholder="请选择仓库" clearable>
v-model="queryParams.warehouseId" <el-option
placeholder="请输入仓库ID" v-for="(category, index) in productWarehouseList"
clearable :key="index"
@keyup.enter.native="handleQuery" :label="category.warehouseName"
/> :value="category.warehouseId"
</el-form-item> ></el-option>
<el-form-item label="仓库楼层" prop="warehouseFloor"> </el-select>
<el-input
v-model="queryParams.warehouseFloor"
placeholder="请输入仓库楼层"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item> </el-form-item>
<el-form-item label="库位编码" prop="locationCode"> <el-form-item label="库位编码" prop="locationCode">
<el-input <el-input
@ -33,133 +27,76 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="计划编号,关联pd_base_plan_info的plan_code" prop="planCode"> <el-form-item label="生产计划" prop="planCode">
<el-input <el-input
v-model="queryParams.planCode" v-model="queryParams.planCode"
placeholder="请输入计划编号,关联pd_base_plan_info的plan_code" placeholder="请输入生产计划编号"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="计划明细编号,关联pd_base_plan_detail的plan_detail_code" prop="planDetailCode"> <el-form-item label="计划明细" prop="planDetailCode">
<el-input <el-input
v-model="queryParams.planDetailCode" v-model="queryParams.planDetailCode"
placeholder="请输入计划明细编号,关联pd_base_plan_detail的plan_detail_code" placeholder="请输入计划明细编号"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="销售订单ID关联销售订单主键" prop="saleOrderId"> <el-form-item label="销售订单" prop="saleorderCode">
<el-input
v-model="queryParams.saleOrderId"
placeholder="请输入销售订单ID关联销售订单主键"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="销售订单编号" prop="saleorderCode">
<el-input <el-input
v-model="queryParams.saleorderCode" v-model="queryParams.saleorderCode"
placeholder="请输入销售订单号" placeholder="请输入销售订单号"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="成品ID" prop="productId"> <el-form-item label="成品编码" prop="materialCode">
<el-input <el-input
v-model="queryParams.productId" v-model="queryParams.materialCode"
placeholder="请输入成品ID" placeholder="请输入成品编码"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="存成品条码" prop="productBatch"> <el-form-item label="成品名称" prop="materialName">
<el-input <el-input
v-model="queryParams.productBatch" v-model="queryParams.materialName"
placeholder="请输入存成品条码" placeholder="请输入成品名称"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="入库数量" prop="instockAmount"> <el-form-item label="成品规格" prop="materialSpec">
<el-input <el-input
v-model="queryParams.instockAmount" v-model="queryParams.materialSpec"
placeholder="请输入入库数量" placeholder="请输入成品规格"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="托盘RFID代码" prop="palletInfoCode"> <el-form-item label="成品条码" prop="productBatch">
<el-input <el-input
v-model="queryParams.palletInfoCode" v-model="queryParams.productBatch"
placeholder="请输入托盘RFID代码" placeholder="请输入成品条码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="申请人" prop="applyBy">
<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="请输入审核人"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="审核时间" prop="auditDate"> <el-form-item label="同步ERP状态" prop="erpStatus">
<el-date-picker clearable <el-select
v-model="queryParams.auditDate" v-model="queryParams.erpStatus"
type="date" placeholder="请选择同步ERP状态"
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的数量"
clearable clearable
@keyup.enter.native="handleQuery" style="width: 240px"
/> >
</el-form-item> <el-option
<el-form-item label="最后更新时间" prop="updateDate"> v-for="dict in dict.type.wms_erp_status"
<el-date-picker clearable :key="dict.value"
v-model="queryParams.updateDate" :label="dict.label"
type="date" :value="dict.value"
value-format="yyyy-MM-dd" />
placeholder="请选择最后更新时间"> </el-select>
</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-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
@ -167,123 +104,62 @@
</el-form-item> </el-form-item>
</el-form> </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 v-loading="loading" :data="productInstockList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <!-- <el-table-column label="任务编号" align="center" prop="taskCode" />-->
<el-table-column label="成品入库记录ID" align="center" prop="productInstockId" /> <el-table-column label="仓库" align="center" prop="warehouseId" >
<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">
<template slot-scope="scope"> <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> </template>
</el-table-column> </el-table-column>
<el-table-column label="审核人" align="center" prop="auditBy" /> <el-table-column label="库位编码" align="center" prop="locationCode" />
<el-table-column label="审核时间" align="center" prop="auditDate" width="180"> <el-table-column label="操作类型" align="center" prop="operationType" >
<template slot-scope="scope"> <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> </template>
</el-table-column> </el-table-column>
<el-table-column label="同步ERP状态(0:失败,1成功)" align="center" prop="erpStatus" /> <el-table-column label="生产计划" align="center" prop="planCode" />
<el-table-column label="同步给ERP的数量" align="center" prop="erpAmount" /> <el-table-column label="计划明细" align="center" prop="planDetailCode" />
<el-table-column label="最后更新时间" align="center" prop="updateDate" width="180"> <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"> <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> </template>
</el-table-column> </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"> <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> </template>
</el-table-column> </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"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.endTime, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.applyDate, '{y}-{m}-{d}') }}</span>
</template> </template>
</el-table-column> </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"> <template slot-scope="scope">
<el-button <dict-tag :options="dict.type.wms_erp_status" :value="scope.row.erpStatus"/>
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>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="同步ERP的数量" align="center" prop="erpAmount" />
</el-table> </el-table>
<pagination <pagination
v-show="total>0" v-show="total>0"
:total="total" :total="total"
@ -396,10 +272,11 @@
</template> </template>
<script> <script>
import { listProductInstock, getProductInstock, delProductInstock, addProductInstock, updateProductInstock } from "@/api/wms/productInstock"; import { listProductInstock, getProductInstock, delProductInstock, addProductInstock, updateProductInstock,getProductWarehouses } from "@/api/wms/productInstock";
export default { export default {
name: "ProductInstock", name: "ProductInstock",
dicts: ["wms_erp_status","wms_warehouse_instock_type","wms_operation_type","wms_execute_status","wms_product_instock_type"],
data() { data() {
return { return {
// //
@ -455,34 +332,13 @@ export default {
}, },
// //
form: {}, form: {},
// //
rules: { productWarehouseList:[]
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" }
],
}
}; };
}, },
created() { created() {
this.getList(); this.getList();
this.getProductWarehouses();
}, },
methods: { methods: {
/** 查询成品入库记录列表 */ /** 查询成品入库记录列表 */
@ -602,7 +458,15 @@ export default {
this.download('wms/productInstock/export', { this.download('wms/productInstock/export', {
...this.queryParams ...this.queryParams
}, `productInstock_${new Date().getTime()}.xlsx`) }, `productInstock_${new Date().getTime()}.xlsx`)
} },
/** 查询仓库列表 */
getProductWarehouses() {
getProductWarehouses().then(response => {
this.productWarehouseList = response.data;
});
},
} }
}; };
</script> </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