春风项目四线(合箱线、总装线)
hdy
2024-01-18 2cc5a1afe8296d148f0a32989395d538e5323a8e
Merge remote-tracking branch 'origin/master'
已修改24个文件
已添加8个文件
1767 ■■■■ 文件已修改
jcdm-main/src/main/java/com/jcdm/main/bs/modelNumber/mapper/BsModelNumberMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/Query/PrepareOnlineQuery.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/controller/PrepareOnlineController.java 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/domain/BsOrderScheduling.java 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/mapper/BsOrderSchedulingMapper.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/service/impl/BsOrderSchedulingServiceImpl.java 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/workshop/controller/BsWorkshopInfoController.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/workshop/service/IBsWorkshopInfoService.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/workshop/service/impl/BsWorkshopInfoServiceImpl.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/controller/OmProductionOrdeInfoController.java 65 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/domain/OmProductionOrdeInfo.java 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/service/impl/OmProductionOrdeInfoServiceImpl.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/sc/stationConf/controller/ScStationConfController.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/util/IpInfoUtils.java 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/resources/mapper/bs/modelNumber/BsModelNumberMapper.xml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/resources/mapper/bs/orderScheduling/BsOrderSchedulingMapper.xml 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/resources/mapper/om/productionOrde/OmProductionOrdeInfoMapper.xml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/package.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/api/main/bs/prepareOnline/prepareOnline.js 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/api/main/sc/stationConf.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/assets/logo/jcdm.png 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/assets/logo/jcdm2.png 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/router/index.js 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/bs/formulaChild/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/bs/material/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/bs/modelNumber/index.vue 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/bs/orderScheduling/index.vue 274 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/bs/workshop/index.vue 83 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/cfkb/Instructions/index.vue 99 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/kb/prepareOnline/index.vue 81 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/om/productionOrde/index.vue 112 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/om/productionOrde/planStatistics.vue 657 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/modelNumber/mapper/BsModelNumberMapper.java
@@ -4,7 +4,7 @@
import com.jcdm.main.bs.modelNumber.domain.BsModelNumber;
/**
 * æœºåž‹åºå·Mapper接口
 * Mapper接口
 * 
 * @author jiang
 * @date 2024-01-15
jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/Query/PrepareOnlineQuery.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,17 @@
package com.jcdm.main.bs.orderScheduling.Query;
import lombok.Data;
@Data
public class PrepareOnlineQuery {
    /**
     * å·¥å•ç¼–号
     */
    private String orderNo;
    /**
     * è¿”修发送机号
     */
    private String engineNo;
}
jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/controller/PrepareOnlineController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,32 @@
package com.jcdm.main.bs.orderScheduling.controller;
import com.jcdm.common.core.controller.BaseController;
import com.jcdm.common.core.page.TableDataInfo;
import com.jcdm.main.bs.orderScheduling.Query.PrepareOnlineQuery;
import com.jcdm.main.bs.orderScheduling.domain.BsOrderScheduling;
import com.jcdm.main.bs.orderScheduling.service.impl.BsOrderSchedulingServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@RestController
@RequestMapping("/bs/prepareOnline")
public class PrepareOnlineController extends BaseController {
    @Autowired
    private BsOrderSchedulingServiceImpl bsOrderSchedulingService;
//    @PreAuthorize("@ss.hasPermi('bs:orderScheduling:list')")
    @PostMapping("/list")
    public TableDataInfo list(@RequestBody PrepareOnlineQuery prepareOnlineQuery)
    {
        List<BsOrderScheduling> list = bsOrderSchedulingService.getPrepareOnlineList(prepareOnlineQuery);
        return getDataTable(list);
    }
}
jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/domain/BsOrderScheduling.java
@@ -110,7 +110,49 @@
    @Excel(name = "备注")
    private String remarks;
    public void setId(Long id)
    /** CVT报工 */
    @Excel(name = "CVT报工")
    private String report30;
    private String[] dateConditions;
    private String startTime;
    private String endTime;
    public String[] getDateConditions() {
        return dateConditions;
    }
    public void setDateConditions(String[] dateConditions) {
        this.dateConditions = dateConditions;
    }
    public String getStartTime() {
        return startTime;
    }
    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }
    public String getEndTime() {
        return endTime;
    }
    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }
    public String getReport30() {
        return report30;
    }
    public void setReport30(String report30) {
        this.report30 = report30;
    }
    public void setId(Long id)
    {
        this.id = id;
    }
jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/mapper/BsOrderSchedulingMapper.java
@@ -1,7 +1,9 @@
package com.jcdm.main.bs.orderScheduling.mapper;
import java.util.List;
import com.jcdm.main.bs.orderScheduling.Query.PrepareOnlineQuery;
import com.jcdm.main.bs.orderScheduling.domain.BsOrderScheduling;
import java.util.List;
/**
 * è®¢å•æŽ’产Mapper接口
@@ -28,6 +30,14 @@
    public List<BsOrderScheduling> selectBsOrderSchedulingList(BsOrderScheduling bsOrderScheduling);
    /**
     * æŸ¥è¯¢åˆç®±ä¸Šçº¿åˆ—表
     *
     * @param prepareOnlineQuery è®¢å•æŽ’产
     * @return åˆç®±ä¸Šçº¿åˆ—表
     */
    public List<BsOrderScheduling> getPrepareOnlineList(PrepareOnlineQuery prepareOnlineQuery);
    /**
     * æ–°å¢žè®¢å•æŽ’产
     * 
     * @param bsOrderScheduling è®¢å•æŽ’产
jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/service/impl/BsOrderSchedulingServiceImpl.java
@@ -1,12 +1,14 @@
package com.jcdm.main.bs.orderScheduling.service.impl;
import java.util.List;
import com.jcdm.common.utils.DateUtils;
import com.jcdm.main.bs.orderScheduling.Query.PrepareOnlineQuery;
import com.jcdm.main.bs.orderScheduling.domain.BsOrderScheduling;
import com.jcdm.main.bs.orderScheduling.mapper.BsOrderSchedulingMapper;
import com.jcdm.main.bs.orderScheduling.service.IBsOrderSchedulingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.jcdm.main.bs.orderScheduling.mapper.BsOrderSchedulingMapper;
import com.jcdm.main.bs.orderScheduling.domain.BsOrderScheduling;
import com.jcdm.main.bs.orderScheduling.service.IBsOrderSchedulingService;
import java.util.List;
/**
 * è®¢å•æŽ’产Service业务层处理
@@ -15,7 +17,7 @@
 * @date 2024-01-13
 */
@Service
public class BsOrderSchedulingServiceImpl implements IBsOrderSchedulingService
public class BsOrderSchedulingServiceImpl implements IBsOrderSchedulingService
{
    @Autowired
    private BsOrderSchedulingMapper bsOrderSchedulingMapper;
@@ -41,9 +43,23 @@
    @Override
    public List<BsOrderScheduling> selectBsOrderSchedulingList(BsOrderScheduling bsOrderScheduling)
    {
        if(bsOrderScheduling.getDateConditions()!=null){
            String[] conditions = bsOrderScheduling.getDateConditions();
            bsOrderScheduling.setStartTime(conditions[0]);
            bsOrderScheduling.setEndTime(conditions[1]);
        }
        return bsOrderSchedulingMapper.selectBsOrderSchedulingList(bsOrderScheduling);
    }
    /**
     * æŸ¥è¯¢åˆç®±ä¸Šçº¿åˆ—表
     * @param prepareOnlineQuery
     * @return list
     */
    public List<BsOrderScheduling> getPrepareOnlineList(PrepareOnlineQuery prepareOnlineQuery){
        return bsOrderSchedulingMapper.getPrepareOnlineList(prepareOnlineQuery);
    }
    /**
     * æ–°å¢žè®¢å•æŽ’产
     * 
jcdm-main/src/main/java/com/jcdm/main/bs/workshop/controller/BsWorkshopInfoController.java
@@ -3,6 +3,7 @@
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.jcdm.common.core.domain.entity.SysUser;
import com.jcdm.main.bs.workshop.service.IBsWorkshopInfoService;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
@@ -21,6 +22,7 @@
import com.jcdm.main.bs.workshop.domain.BsWorkshopInfo;
import com.jcdm.common.utils.poi.ExcelUtil;
import com.jcdm.common.core.page.TableDataInfo;
import org.springframework.web.multipart.MultipartFile;
/**
 * è½¦é—´ä¿¡æ¯Controller123
@@ -102,4 +104,21 @@
    {
        return toAjax(bsWorkshopInfoService.deleteBsWorkshopInfoByIds(ids));
    }
    @PostMapping("/importTemplate")
    public void importTemplate(HttpServletResponse response)
    {
        ExcelUtil<BsWorkshopInfo> util = new ExcelUtil<>(BsWorkshopInfo.class);
        util.importTemplateExcel(response, "车间数据");
    }
    @PostMapping("/importData")
    public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception
    {
        ExcelUtil<BsWorkshopInfo> util = new ExcelUtil<BsWorkshopInfo>(BsWorkshopInfo.class);
        List<BsWorkshopInfo> workshopList = util.importExcel(file.getInputStream());
        String operName = getUsername();
        String message = bsWorkshopInfoService.importWrokshop(workshopList, updateSupport, operName);
        return success(message);
    }
}
jcdm-main/src/main/java/com/jcdm/main/bs/workshop/service/IBsWorkshopInfoService.java
@@ -1,6 +1,8 @@
package com.jcdm.main.bs.workshop.service;
import java.util.List;
import com.jcdm.common.core.domain.entity.SysUser;
import com.jcdm.main.bs.workshop.domain.BsWorkshopInfo;
/**
@@ -58,4 +60,7 @@
     * @return ç»“æžœ
     */
    public int deleteBsWorkshopInfoById(Long id);
    public String importWrokshop(List<BsWorkshopInfo> userList, Boolean isUpdateSupport, String operName);
}
jcdm-main/src/main/java/com/jcdm/main/bs/workshop/service/impl/BsWorkshopInfoServiceImpl.java
@@ -1,7 +1,13 @@
package com.jcdm.main.bs.workshop.service.impl;
import java.util.List;
import com.jcdm.common.core.domain.entity.SysUser;
import com.jcdm.common.exception.ServiceException;
import com.jcdm.common.utils.DateUtils;
import com.jcdm.common.utils.SecurityUtils;
import com.jcdm.common.utils.StringUtils;
import com.jcdm.common.utils.bean.BeanValidators;
import com.jcdm.main.bs.workshop.service.IBsWorkshopInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -97,4 +103,16 @@
    {
        return bsWorkshopInfoMapper.deleteBsWorkshopInfoById(id);
    }
    @Override
    public String importWrokshop(List<BsWorkshopInfo> userList, Boolean isUpdateSupport, String operName) {
        StringBuilder successMsg = new StringBuilder();
        for (BsWorkshopInfo info : userList) {
            insertBsWorkshopInfo(info);
            successMsg.append("<br/>" + info.getWorkshopName() + " å¯¼å…¥æˆåŠŸ");
        }
        return successMsg.toString();
    }
}
jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/controller/OmProductionOrdeInfoController.java
@@ -7,6 +7,8 @@
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.jcdm.main.bs.modelNumber.domain.BsModelNumber;
import com.jcdm.main.bs.modelNumber.service.IBsModelNumberService;
import com.jcdm.main.bs.orderScheduling.domain.BsOrderScheduling;
import com.jcdm.main.bs.orderScheduling.service.IBsOrderSchedulingService;
import com.jcdm.main.om.productionOrde.domain.OmProductionOrdeInfo;
@@ -47,6 +49,9 @@
    @Autowired
    private IBsOrderSchedulingService bsOrderSchedulingService;
    @Autowired
    private IBsModelNumberService bsModelNumberService;
    /**
     * æŸ¥è¯¢ç”Ÿäº§å·¥å•åˆ—表
@@ -106,24 +111,43 @@
        DateTimeFormatter formatter= DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
        //将时间转化为对应格式的字符串
        String fomateDate=date.format(formatter).toString();
        Integer startCode = Integer.parseInt(omProductionOrdeInfo.getStartCode());//开始编号
        Integer planQty = Math.toIntExact(omProductionOrdeInfo.getPlanQty());//计划数量
        String dateTimeRule = omProductionOrdeInfo.getDateTimeRule();
        for(int i=0;i<planQty;i++){
            BsOrderScheduling bsOrderScheduling = new BsOrderScheduling();
            bsOrderScheduling.setOrderNo(omProductionOrdeInfo.getWorkOrderNo());
            bsOrderScheduling.setModel(omProductionOrdeInfo.getTypeZ());
            bsOrderScheduling.setEngineNo(omProductionOrdeInfo.getTypeZ() + " "+dateTimeRule+ StringUtils.leftPad(String.valueOf(startCode),3, "0"));
            bsOrderScheduling.setProductionStatus("1");
            bsOrderScheduling.setOperator(getUserName());
            bsOrderScheduling.setOperateTime(fomateDate);
            bsOrderSchedulingService.insertBsOrderScheduling(bsOrderScheduling);
            startCode ++;
        }
        String engineNo = "";
        if(planQty>0) {
            for (int i = 0; i < planQty; i++) {
                engineNo = omProductionOrdeInfo.getTypeZ() + " " + dateTimeRule + StringUtils.leftPad(String.valueOf(startCode), 3, "0");
                BsOrderScheduling bsOrderScheduling = new BsOrderScheduling();
                bsOrderScheduling.setOrderNo(omProductionOrdeInfo.getWorkOrderNo());
                bsOrderScheduling.setModel(omProductionOrdeInfo.getTypeZ());
                bsOrderScheduling.setEngineNo(engineNo);
                bsOrderScheduling.setProductionStatus("1");
                bsOrderScheduling.setOperator(getUserName());
                bsOrderScheduling.setOperateTime(fomateDate);
                bsOrderScheduling.setProductType(omProductionOrdeInfo.getTypeL());//产品类型
                bsOrderScheduling.setWhetherOrPrint("0");
                bsOrderSchedulingService.insertBsOrderScheduling(bsOrderScheduling);
                startCode++;
            }
        omProductionOrdeInfo.setOrderStatus("2");//更新工单状态
            //新增机型序号
            BsModelNumber bsModelNumber = new BsModelNumber();
            bsModelNumber.setModel(omProductionOrdeInfo.getTypeZ());
            bsModelNumber.setModelDate(dateTimeRule);
            bsModelNumber.setMaxnumValue((startCode - 1) + "");
            bsModelNumber.setSaveTime(fomateDate);
            bsModelNumber.setLastNumber((startCode - 1) + "");
            bsModelNumberService.insertBsModelNumber(bsModelNumber);
        }
        //更新工单状态
        omProductionOrdeInfo.setOrderStatus("2");
        return toAjax(omProductionOrdeInfoService.updateOmProductionOrdeInfo(omProductionOrdeInfo));
    }
    /**
@@ -159,12 +183,23 @@
    }
    /**
     * table列上移下移
     * æŽ¥æ”¶å·¥å•
     */
    @PreAuthorize("@ss.hasPermi('om:productionOrde:receive')")
    @GetMapping("/getProductionNotice")
    public AjaxResult getProductionNotice(OmProductionOrdeInfo omProductionOrdeInfo)
    {
        ReceivingServices.insertWebserviceData(omProductionOrdeInfo.getProductionNotice());
        return AjaxResult.success();
        String productionNotice = omProductionOrdeInfo.getProductionNotice();
        List<OmProductionOrdeInfo> omProductionOrdeInfos = omProductionOrdeInfoService.selectOmProductionOrdeInfoList(omProductionOrdeInfo);
        if(omProductionOrdeInfos.size() == 0){
            try {
                ReceivingServices.insertWebserviceData(productionNotice);
            } catch (Exception e) {
                return error("接收失败!请检查通知单号");
            }
        }else {
            return warn("该通知单已经接收完毕,不能重复接收!");
        }
        return AjaxResult.success("接收成功!");
    }
}
jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/domain/OmProductionOrdeInfo.java
@@ -148,6 +148,8 @@
    @Excel(name = "种类")
    private String typeZ;
    private String typeL;
    /** é¢„留字段1 */
    private String spareField1;
@@ -169,6 +171,35 @@
    private String dateTimeRule;
    private String startCode;
    private String[] dateConditions;
    private String startTime;
    private String endTime;
    public String[] getDateConditions() {
        return dateConditions;
    }
    public void setDateConditions(String[] dateConditions) {
        this.dateConditions = dateConditions;
    }
    public String getStartTime() {
        return startTime;
    }
    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }
    public String getEndTime() {
        return endTime;
    }
    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }
    public String getDateTimeRule() {
        return dateTimeRule;
@@ -556,7 +587,13 @@
        return typeZ;
    }
    public String getTypeL() {
        return typeL;
    }
    public void setTypeL(String typeL) {
        this.typeL = typeL;
    }
    @Override
jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/service/impl/OmProductionOrdeInfoServiceImpl.java
@@ -47,6 +47,11 @@
    @Override
    public List<OmProductionOrdeInfo> selectOmProductionOrdeInfoList(OmProductionOrdeInfo omProductionOrdeInfo)
    {
        if(omProductionOrdeInfo.getDateConditions()!=null){
            String[] conditions = omProductionOrdeInfo.getDateConditions();
            omProductionOrdeInfo.setStartTime(conditions[0]);
            omProductionOrdeInfo.setEndTime(conditions[1]);
        }
        return omProductionOrdeInfoMapper.selectOmProductionOrdeInfoList(omProductionOrdeInfo);
    }
@@ -60,8 +65,6 @@
    public int insertOmProductionOrdeInfo(OmProductionOrdeInfo omProductionOrdeInfo)
    {
        omProductionOrdeInfo.setCreateTime(DateUtils.getNowDate());
        Integer streamNumber = omProductionOrdeInfoMapper.getMaxStreamNumber();
        omProductionOrdeInfo.setStreamNumber(String.valueOf(streamNumber+1));
        return omProductionOrdeInfoMapper.insertOmProductionOrdeInfo(omProductionOrdeInfo);
    }
jcdm-main/src/main/java/com/jcdm/main/sc/stationConf/controller/ScStationConfController.java
@@ -1,7 +1,11 @@
package com.jcdm.main.sc.stationConf.controller;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.jcdm.main.util.IpInfoUtils;
import org.aspectj.weaver.loadtime.Aj;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@@ -101,4 +105,13 @@
    {
        return toAjax(scStationConfService.deleteScStationConfByIds(ids));
    }
    /**
     * æŸ¥è¯¢ip
     */
    @GetMapping("/getIp")
    public AjaxResult getIp(HttpServletRequest request)
    {
        return AjaxResult.success(IpInfoUtils.getIpAddr(request));
    }
}
jcdm-main/src/main/java/com/jcdm/main/util/IpInfoUtils.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,63 @@
package com.jcdm.main.util;
import javax.servlet.http.HttpServletRequest;
import java.net.InetAddress;
import java.net.UnknownHostException;
/**
 * ip工具类
 *
 * @author fengshuonan
 * @Date 2018/9/27 ä¸Šåˆ10:47
 */
public class IpInfoUtils {
    /**
     * èŽ·å–客户端IP地址
     */
    public static String getIpAddr(HttpServletRequest request) {
        String ip = request.getHeader("x-forwarded-for");
        if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
            ip = request.getHeader("Proxy-Client-IP");
        }
        if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
            ip = request.getHeader("WL-Proxy-Client-IP");
        }
        if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
            ip = request.getRemoteAddr();
            if (ip.equals("127.0.0.1")) {
                //根据网卡取本机配置的IP
                InetAddress inet = null;
                try {
                    inet = InetAddress.getLocalHost();
                } catch (UnknownHostException e) {
                    e.printStackTrace();
                }
                ip = inet.getHostAddress();
            }
        }
        // å¯¹äºŽé€šè¿‡å¤šä¸ªä»£ç†çš„情况,第一个IP为客户端真实IP,多个IP按照','分割
        if (ip != null && ip.length() > 15) {
            if (ip.indexOf(",") > 0) {
                ip = ip.substring(0, ip.indexOf(","));
            }
        }
        if ("0:0:0:0:0:0:0:1".equals(ip)) {
            ip = "127.0.0.1";
        }
        return ip;
    }
    /**
     * èŽ·å–客户端主机名称
     */
    public static String getHostName() {
        try {
            return InetAddress.getLocalHost().getHostName();
        } catch (UnknownHostException e) {
        }
        return "未知";
    }
}
jcdm-main/src/main/resources/mapper/bs/modelNumber/BsModelNumberMapper.xml
@@ -44,6 +44,7 @@
            <if test="updateUser != null  and updateUser != ''"> and update_user = #{updateUser}</if>
            <if test="remarks != null  and remarks != ''"> and remarks = #{remarks}</if>
        </where>
        ORDER BY save_time DESC
    </select>
    
    <select id="selectBsModelNumberById" parameterType="Long" resultMap="BsModelNumberResult">
jcdm-main/src/main/resources/mapper/bs/orderScheduling/BsOrderSchedulingMapper.xml
@@ -31,10 +31,12 @@
        <result property="updateUser"    column="update_user"    />
        <result property="updateTime"    column="update_time"    />
        <result property="remarks"    column="remarks"    />
        <result property="report30"    column="report_30"    />
    </resultMap>
    <sql id="selectBsOrderSchedulingVo">
        select id, order_no, engine_no, product_type, model, production_status, working_hours, current_workstation, quality_status, whether_or_print, report_10, report_20, combined_box_time, final_assembly_time, operator, operate_time, status, spare_field_1, spare_field_2, spare_field_3, spare_field_4, create_user, create_time, update_user, update_time, remarks from bs_order_scheduling
        select id, order_no, engine_no, product_type, model, production_status, working_hours, current_workstation, quality_status, whether_or_print, report_10, report_20, combined_box_time, final_assembly_time, operator, operate_time, status, spare_field_1, spare_field_2, spare_field_3, spare_field_4, create_user, create_time, update_user, update_time, remarks, report_30 from bs_order_scheduling
    </sql>
    <select id="selectBsOrderSchedulingList" parameterType="BsOrderScheduling" resultMap="BsOrderSchedulingResult">
@@ -63,6 +65,10 @@
            <if test="createUser != null  and createUser != ''"> and create_user = #{createUser}</if>
            <if test="updateUser != null  and updateUser != ''"> and update_user = #{updateUser}</if>
            <if test="remarks != null  and remarks != ''"> and remarks = #{remarks}</if>
            <if test="report30 != null  and report30 != ''"> and report_30 = #{report30}</if>
            <if test="dateConditions != null  and dateConditions != ''"> and operate_time BETWEEN #{startTime} AND #{endTime}</if>
        </where>
    </select>
    
@@ -70,7 +76,19 @@
        <include refid="selectBsOrderSchedulingVo"/>
        where id = #{id}
    </select>
    <select id="getPrepareOnlineList" resultType="com.jcdm.main.bs.orderScheduling.domain.BsOrderScheduling">
        select bos.* from bs_order_scheduling bos
        <where>
            <if test="prepareOnlineQuery.orderNo != null and prepareOnlineQuery.orderNo != '' ">
                and bos.order_no = #{prepareOnlineQuery.orderNo}
            </if>
            <if test="prepareOnlineQuery.engineNo != null and prepareOnlineQuery.engineNo != '' ">
                and bos.engine_no = #{prepareOnlineQuery.engineNo}
            </if>
        </where>
    </select>
    <insert id="insertBsOrderScheduling" parameterType="BsOrderScheduling" useGeneratedKeys="true" keyProperty="id">
        insert into bs_order_scheduling
        <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -99,6 +117,7 @@
            <if test="updateUser != null">update_user,</if>
            <if test="updateTime != null">update_time,</if>
            <if test="remarks != null">remarks,</if>
            <if test="report30 != null">report_30,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="orderNo != null">#{orderNo},</if>
@@ -126,7 +145,9 @@
            <if test="updateUser != null">#{updateUser},</if>
            <if test="updateTime != null">#{updateTime},</if>
            <if test="remarks != null">#{remarks},</if>
         </trim>
            <if test="report30 != null">#{report30},</if>
        </trim>
    </insert>
    <update id="updateBsOrderScheduling" parameterType="BsOrderScheduling">
@@ -157,6 +178,8 @@
            <if test="updateUser != null">update_user = #{updateUser},</if>
            <if test="updateTime != null">update_time = #{updateTime},</if>
            <if test="remarks != null">remarks = #{remarks},</if>
            <if test="report30 != null">report_30 = #{report30},</if>
        </trim>
        where id = #{id}
    </update>
jcdm-main/src/main/resources/mapper/om/productionOrde/OmProductionOrdeInfoMapper.xml
@@ -72,6 +72,7 @@
            <if test="softwareVersionCode != null  and softwareVersionCode != ''"> and software_version_code like concat('%', #{softwareVersionCode}, '%')</if>
            <if test="productCompanyCode != null  and productCompanyCode != ''"> and product_company_code like concat('%', #{productCompanyCode}, '%')</if>
            <if test="productionNotice != null  and productionNotice != ''"> and production_notice like concat('%', #{productionNotice}, '%')</if>
            <if test="dateConditions != null  and dateConditions != ''"> and create_time BETWEEN #{startTime} AND #{endTime}</if>
        </where>
        ORDER BY stream_number DESC
jcdm-ui/package.json
@@ -41,7 +41,7 @@
    "clipboard": "2.0.8",
    "core-js": "3.25.3",
    "echarts": "5.4.0",
    "element-ui": "2.15.13",
    "element-ui": "^2.15.13",
    "file-saver": "2.0.5",
    "fuse.js": "6.4.3",
    "highlight.js": "9.18.5",
jcdm-ui/src/api/main/bs/prepareOnline/prepareOnline.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,10 @@
import request from '@/utils/request'
// æŸ¥è¯¢åˆ—表
export function listTechnologyRoute(query) {
  return request({
    url: '/bs/technologyRoute/list',
    method: 'get',
    params: query
  })
}
jcdm-ui/src/api/main/sc/stationConf.js
@@ -9,6 +9,14 @@
  })
}
// æŸ¥è¯¢Ip
export function getIp() {
  return request({
    url: '/sc/stationConf/getIp',
    method: 'get',
  })
}
// æŸ¥è¯¢å·¥ä½ç»ˆç«¯é…ç½®è¯¦ç»†
export function getStationConf(id) {
  return request({
jcdm-ui/src/assets/logo/jcdm.png
jcdm-ui/src/assets/logo/jcdm2.png
jcdm-ui/src/router/index.js
@@ -218,6 +218,20 @@
      }
    ]
  },
  {
    path: '/main/orderScheduling-data',
    component: Layout,
    hidden: true,
    permissions: ['bs:workReport:list'],
    children: [
      {
        path: 'index',
        component: () => import('@/views/main/bs/orderScheduling/index'),
        name: 'Data',
        meta: { title: '报工记录表', activeMenu: '/main/bs/orderScheduling' }
      }
    ]
  },
]
// é˜²æ­¢è¿žç»­ç‚¹å‡»å¤šæ¬¡è·¯ç”±æŠ¥é”™
jcdm-ui/src/views/main/bs/formulaChild/index.vue
@@ -177,7 +177,7 @@
          </el-table-column>
          <el-table-column label="创建用户" width="130" align="center" prop="createUser">
          </el-table-column>
          <el-table-column label="创建时间" width="150" align="center" prop="createTime">
          <el-table-column label="创建时间" width="160" align="center" prop="createTime">
          </el-table-column>
          <el-table-column label="更改用户" width="130" align="center" prop="updateUser">
          </el-table-column>
jcdm-ui/src/views/main/bs/material/index.vue
@@ -98,7 +98,7 @@
        </template>
      </el-table-column>
      <el-table-column label="产品型号" align="center" prop="typeZ" width="150">
      <el-table-column label="机型" align="center" prop="typeZ" width="150">
      </el-table-column>
      <el-table-column label="特殊代码" align="center" prop="mark" width="120">
      </el-table-column>
jcdm-ui/src/views/main/bs/modelNumber/index.vue
@@ -18,22 +18,22 @@
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="最大值" prop="maxnumValue">
            <el-input
              v-model="queryParams.maxnumValue"
              placeholder="请输入最大值"
              clearable
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="上次的编号" prop="lastNumber">
<!--          <el-form-item label="最大值" prop="maxnumValue">-->
<!--            <el-input-->
<!--              v-model="queryParams.maxnumValue"-->
<!--              placeholder="请输入最大值"-->
<!--              clearable-->
<!--              @keyup.enter.native="handleQuery"-->
<!--            />-->
<!--          </el-form-item>-->
<!--          <el-form-item label-width="100" label="上次的编号" prop="lastNumber">
            <el-input
              v-model="queryParams.lastNumber"
              placeholder="请输入上次的编号"
              clearable
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          </el-form-item>-->
<!--          <el-form-item label="状态" prop="status">-->
<!--            <el-select v-model="queryParams.status" placeholder="请选择状态" clearable>-->
@@ -97,14 +97,14 @@
<!--          </el-form-item>-->
          <el-form-item style="float: right">
            <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
            <el-button type="warning" icon="el-icon-copy-document" size="mini" @click="advancedQuery">高级查询</el-button>
<!--            <el-button type="warning" icon="el-icon-copy-document" size="mini" @click="advancedQuery">高级查询</el-button>-->
            <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
          </el-form-item>
        </el-form>
    </el-card>
    <el-card style="margin-top: 10px" class="box-card">
        <el-row :gutter="10" class="mb8">
<!--        <el-row :gutter="10" class="mb8">
          <el-col :span="1.5">
            <el-button
              type="primary"
@@ -148,11 +148,11 @@
            >导出</el-button>
          </el-col>
          <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
        </el-row>
        </el-row>-->
        <el-table border v-loading="loading" :data="modelNumberList" @selection-change="handleSelectionChange">
          <el-table-column type="selection" width="55" align="center" />
          <el-table-column label="ID" align="center" prop="id" />
<!--          <el-table-column label="ID" align="center" prop="id" />-->
          <el-table-column label="机型" align="center" prop="model">
          </el-table-column>
@@ -192,7 +192,7 @@
<!--          <el-table-column label="备注" align="center" prop="remarks">-->
<!--          </el-table-column>-->
          <el-table-column fixed="right" width="200" label="操作" align="center" class-name="small-padding fixed-width">
<!--          <el-table-column fixed="right" width="200" label="操作" align="center" class-name="small-padding fixed-width">
            <template slot-scope="scope">
              <el-button
                size="mini"
@@ -213,7 +213,7 @@
                v-hasPermi="['bs:modelNumber:remove']"
              >删除</el-button>
            </template>
          </el-table-column>
          </el-table-column>-->
        </el-table>
    </el-card>
jcdm-ui/src/views/main/bs/orderScheduling/index.vue
@@ -10,15 +10,6 @@
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="发动机号" prop="engineNo">
            <el-input
              v-model="queryParams.engineNo"
              placeholder="请输入发动机号"
              clearable
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="机型" prop="model">
            <el-input
              v-model="queryParams.model"
@@ -27,119 +18,87 @@
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="工时" prop="workingHours">
            <el-input
              v-model="queryParams.workingHours"
              placeholder="请输入工时"
              clearable
              @keyup.enter.native="handleQuery"
            />
          <el-form-item label="生产状态" prop="productionStatus">
            <el-select v-model="queryParams.productionStatus" placeholder="请选择工单状态" clearable>
              <el-option
                v-for="dict in dict.type.order_scheduling_produce_status"
                :key="dict.value"
                :label="dict.label"
                :value="dict.value"/>
            </el-select>
          </el-form-item>
          <el-form-item label="当前工位" prop="currentWorkstation">
            <el-input
              v-model="queryParams.currentWorkstation"
              placeholder="请输入当前工位"
              clearable
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="是否打印" prop="whetherOrPrint">
            <el-input
              v-model="queryParams.whetherOrPrint"
              placeholder="请输入是否打印"
              clearable
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="10报工" prop="report10">
            <el-input
              v-model="queryParams.report10"
              placeholder="请输入10报工"
              clearable
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="20报工" prop="report20">
            <el-input
              v-model="queryParams.report20"
              placeholder="请输入20报工"
              clearable
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="操作人" prop="operator">
            <el-input
              v-model="queryParams.operator"
              placeholder="请输入操作人"
              clearable
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
<!--          <el-form-item label="预留字段1" prop="spareField1">-->
<!--            <el-input-->
<!--              v-model="queryParams.spareField1"-->
<!--              placeholder="请输入预留字段1"-->
<!--              clearable-->
<!--              @keyup.enter.native="handleQuery"-->
<!--            />-->
<!--          </el-form-item>-->
<!--          <el-form-item label="预留字段2" prop="spareField2">-->
<!--            <el-input-->
<!--              v-model="queryParams.spareField2"-->
<!--              placeholder="请输入预留字段2"-->
<!--              clearable-->
<!--              @keyup.enter.native="handleQuery"-->
<!--            />-->
<!--          </el-form-item>-->
<!--          <el-form-item label="预留字段3" prop="spareField3">-->
<!--            <el-input-->
<!--              v-model="queryParams.spareField3"-->
<!--              placeholder="请输入预留字段3"-->
<!--              clearable-->
<!--              @keyup.enter.native="handleQuery"-->
<!--            />-->
<!--          </el-form-item>-->
<!--          <el-form-item label="预留字段4" prop="spareField4">-->
<!--            <el-input-->
<!--              v-model="queryParams.spareField4"-->
<!--              placeholder="请输入预留字段4"-->
<!--              clearable-->
<!--              @keyup.enter.native="handleQuery"-->
<!--            />-->
<!--          </el-form-item>-->
<!--          <el-form-item label="创建用户" prop="createUser">-->
<!--            <el-input-->
<!--              v-model="queryParams.createUser"-->
<!--              placeholder="请输入创建用户"-->
<!--              clearable-->
<!--              @keyup.enter.native="handleQuery"-->
<!--            />-->
<!--          </el-form-item>-->
<!--          <el-form-item label="更改用户" prop="updateUser">-->
<!--            <el-input-->
<!--              v-model="queryParams.updateUser"-->
<!--              placeholder="请输入更改用户"-->
<!--              clearable-->
<!--              @keyup.enter.native="handleQuery"-->
<!--            />-->
<!--          </el-form-item>-->
<!--          <el-form-item label="备注" prop="remarks">-->
<!--            <el-input-->
<!--              v-model="queryParams.remarks"-->
<!--              placeholder="请输入备注"-->
<!--              clearable-->
<!--              @keyup.enter.native="handleQuery"-->
<!--            />-->
<!--          </el-form-item>-->
          <el-form-item style="float: right">
            <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
            <el-button type="warning" icon="el-icon-copy-document" size="mini" @click="advancedQuery">高级查询</el-button>
            <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
          </el-form-item>
        </el-form>
      <el-form :model="queryParams" ref="queryParams" size="small" :inline="true" v-show="advancedShowSearch" label-width="68px">
        <el-form-item label="发动机号" prop="engineNo">
          <el-input
            v-model="queryParams.engineNo"
            placeholder="请输入发动机号"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="质量状态" prop="qualityStatus">
          <el-select v-model="queryParams.qualityStatus" placeholder="请选择质量状态" clearable>
            <el-option
              v-for="dict in dict.type.quality_status"
              :key="dict.value"
              :label="dict.label"
              :value="dict.value"/>
          </el-select>
        </el-form-item>
        <el-form-item label="是否打印" prop="whetherOrPrint">
          <el-select v-model="queryParams.whetherOrPrint" placeholder="请选择是否打印" clearable>
            <el-option
              v-for="dict in dict.type.print_status"
              :key="dict.value"
              :label="dict.label"
              :value="dict.value"/>
          </el-select>
        </el-form-item>
        <br/>
        <el-form-item label="合箱报工" prop="report10">
          <el-input
            v-model="queryParams.report10"
            placeholder="请输入合箱报工"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="总装报工" prop="report20">
          <el-input
            v-model="queryParams.report20"
            placeholder="请输入总装报工"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="CVT报工" prop="report30">
          <el-input
            v-model="queryParams.report30"
            placeholder="请输入CVT报工"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <br/>
        <el-form-item label="操作时间" prop="operateTime">
          <el-date-picker
            v-model="queryParams.dateConditions"
            type="datetimerange"
            :picker-options="pickerOptions"
            value-format="yyyy-MM-dd HH:mm:ss"
            range-separator="至"
            start-placeholder="开始日期"
            end-placeholder="结束日期"
            align="right">
          </el-date-picker>
        </el-form-item>
      </el-form>
    </el-card>
    <el-card style="margin-top: 10px" class="box-card">
@@ -191,21 +150,24 @@
        <el-table border v-loading="loading" :data="orderSchedulingList" @selection-change="handleSelectionChange">
          <el-table-column type="selection" width="55" align="center" />
          <el-table-column label="ID" align="center" prop="id" />
          <el-table-column label="订单编号" align="center" prop="orderNo">
          <el-table-column label="生产订单" align="center" prop="orderNo" width="130">
          </el-table-column>
          <el-table-column label="发动机号" align="center" prop="engineNo">
          <el-table-column label="发动机号" align="center" prop="engineNo" width="150">
          </el-table-column>
          <el-table-column label="产品类型" align="center" prop="productType">
            <template slot-scope="scope">
              <dict-tag :options="dict.type.material_type" :value="scope.row.productType"/>
            </template>
          </el-table-column>
          <el-table-column label="机型" align="center" prop="model">
          </el-table-column>
          <el-table-column label="生产状态" align="center" prop="productionStatus">
            <template slot-scope="scope">
              <dict-tag :options="dict.type.order_scheduling_produce_status" :value="scope.row.productionStatus"/>
            </template>
          </el-table-column>
          <el-table-column label="工时" align="center" prop="workingHours">
@@ -214,15 +176,22 @@
          </el-table-column>
          <el-table-column label="质量状态" align="center" prop="qualityStatus">
            <template slot-scope="scope">
              <dict-tag :options="dict.type.quality_status" :value="scope.row.qualityStatus"/>
            </template>
          </el-table-column>
          <el-table-column label="是否打印" align="center" prop="whetherOrPrint">
            <template slot-scope="scope">
              <dict-tag :options="dict.type.print_status" :value="scope.row.whetherOrPrint"/>
            </template>
          </el-table-column>
          <el-table-column label="合箱报工" align="center" prop="report10">
          </el-table-column>
          <el-table-column label="10报工" align="center" prop="report10">
          <el-table-column label="总装报工" align="center" prop="report20">
          </el-table-column>
          <el-table-column label="20报工" align="center" prop="report20">
          <el-table-column label="CVT报工" align="center" prop="report30">
          </el-table-column>
          <el-table-column label="合箱上线" align="center" prop="combinedBoxTime">
@@ -234,7 +203,7 @@
          <el-table-column label="操作人" align="center" prop="operator">
          </el-table-column>
          <el-table-column label="操作时间" align="center" prop="operateTime">
          <el-table-column label="操作时间" align="center" prop="operateTime" width="160">
          </el-table-column>
<!--          <el-table-column label="状态" align="center" prop="status">-->
@@ -347,11 +316,14 @@
        <el-form-item label="是否打印" prop="whetherOrPrint">
          <el-input v-model="form.whetherOrPrint" placeholder="请输入是否打印" />
        </el-form-item>
        <el-form-item label="10报工" prop="report10">
          <el-input v-model="form.report10" placeholder="请输入10报工" />
        <el-form-item label="合箱报工" prop="report10">
          <el-input v-model="form.report10" placeholder="请输入合箱报工" />
        </el-form-item>
        <el-form-item label="20报工" prop="report20">
          <el-input v-model="form.report20" placeholder="请输入20报工" />
        <el-form-item label="总装报工" prop="report20">
          <el-input v-model="form.report20" placeholder="请输入总装报工" />
        </el-form-item>
        <el-form-item label="30报工" prop="report20">
          <el-input v-model="form.report30" placeholder="请输入30报工" />
        </el-form-item>
        <el-form-item label="操作人" prop="operator">
          <el-input v-model="form.operator" placeholder="请输入操作人" />
@@ -400,6 +372,7 @@
export default {
  name: "OrderScheduling",
  dicts: ['order_scheduling_produce_status','quality_status','print_status','material_type'],
  data() {
    return {
      // é®ç½©å±‚
@@ -411,6 +384,7 @@
      single: true,
      // éžå¤šä¸ªç¦ç”¨
      multiple: true,
      advancedShowSearch: false,
      // æ˜¾ç¤ºæœç´¢æ¡ä»¶
      showSearch: true,
      // æ€»æ¡æ•°
@@ -447,7 +421,8 @@
        spareField4: null,
        createUser: null,
        updateUser: null,
        remarks: null
        remarks: null,
        dateConditions: [],
      },
      // è¡¨å•å‚æ•°
      form: {},
@@ -456,16 +431,51 @@
        id: [
          { required: true, message: "ID不能为空", trigger: "blur" }
        ],
      }
      },
      pickerOptions: {
        shortcuts: [{
          text: '最近一周',
          onClick(picker) {
            const end = new Date();
            const start = new Date();
            start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
            picker.$emit('pick', [start, end]);
          }
        }, {
          text: '最近一个月',
          onClick(picker) {
            const end = new Date();
            const start = new Date();
            start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
            picker.$emit('pick', [start, end]);
          }
        }, {
          text: '最近三个月',
          onClick(picker) {
            const end = new Date();
            const start = new Date();
            start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
            picker.$emit('pick', [start, end]);
          }
        }]
      },
      value1: [new Date(2000, 10, 10, 10, 10), new Date(2000, 10, 11, 10, 10)],
      value2: ''
    };
  },
  created() {
    let workOrderNo = this.$route.query.workOrderNo;
    this.queryParams.orderNo = workOrderNo
    this.getList();
  },
  methods: {
    advancedQuery(){
      this.advancedShowSearch = (this.advancedShowSearch) ? this.advancedShowSearch = false : this.advancedShowSearch = true;
    },
    /** æŸ¥è¯¢è®¢å•æŽ’产列表 */
    getList() {
      this.loading = true;
      console.log(this.queryParams)
      listOrderScheduling(this.queryParams).then(response => {
        this.orderSchedulingList = response.rows;
        this.total = response.total;
@@ -505,7 +515,8 @@
        createTime: null,
        updateUser: null,
        updateTime: null,
        remarks: null
        remarks: null,
        report30: null
      };
      this.resetForm("form");
    },
@@ -513,6 +524,7 @@
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
      this.$modal.msgSuccess(this.queryParams.operateTime);
    },
    /** é‡ç½®æŒ‰é’®æ“ä½œ */
    resetQuery() {
jcdm-ui/src/views/main/bs/workshop/index.vue
@@ -64,6 +64,15 @@
        </el-col>
        <el-col :span="1.5">
          <el-button
            type="info"
            plain
            icon="el-icon-upload2"
            size="mini"
            @click="handleImport"
          >导入</el-button>
        </el-col>
        <el-col :span="1.5">
          <el-button
            type="warning"
            plain
            icon="el-icon-download"
@@ -164,11 +173,42 @@
        <el-button @click="cancel">取 æ¶ˆ</el-button>
      </div>
    </el-dialog>
    <!-- ç”¨æˆ·å¯¼å…¥å¯¹è¯æ¡† -->
    <el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
      <el-upload
        ref="upload"
        :limit="1"
        accept=".xlsx, .xls"
        :headers="upload.headers"
        :action="upload.url + '?updateSupport=' + upload.updateSupport"
        :disabled="upload.isUploading"
        :on-progress="handleFileUploadProgress"
        :on-success="handleFileSuccess"
        :auto-upload="false"
        drag
      >
        <i class="el-icon-upload"></i>
        <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
        <div class="el-upload__tip text-center" slot="tip">
          <div class="el-upload__tip" slot="tip">
            <el-checkbox v-model="upload.updateSupport" /> æ˜¯å¦æ›´æ–°å·²ç»å­˜åœ¨çš„车间数据
          </div>
          <span>仅允许导入xls、xlsx格式文件。</span>
          <el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;" @click="importTemplate">下载模板</el-link>
        </div>
      </el-upload>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitFileForm">ç¡® å®š</el-button>
        <el-button @click="upload.open = false">取 æ¶ˆ</el-button>
      </div>
    </el-dialog>
  </div>
</template>
<script>
import { listWorkshop, getWorkshop, delWorkshop, addWorkshop, updateWorkshop } from "@/api/main/bs/workshop/workshop";
import {getToken} from "@/utils/auth";
export default {
  name: "Workshop",
@@ -219,13 +259,54 @@
        workshopName: [
          { required: true, message: "车间名称不能为空", trigger: "blur" }
        ],
      }
      },
      // ç”¨æˆ·å¯¼å…¥å‚æ•°
      upload: {
        // æ˜¯å¦æ˜¾ç¤ºå¼¹å‡ºå±‚(用户导入)
        open: false,
        // å¼¹å‡ºå±‚标题(用户导入)
        title: "",
        // æ˜¯å¦ç¦ç”¨ä¸Šä¼ 
        isUploading: false,
        // æ˜¯å¦æ›´æ–°å·²ç»å­˜åœ¨çš„用户数据
        updateSupport: 0,
        // è®¾ç½®ä¸Šä¼ çš„请求头部
        headers: { Authorization: "Bearer " + getToken() },
        // ä¸Šä¼ çš„地址
        url: process.env.VUE_APP_BASE_API + "/bs/workshop/importData"
      },
    };
  },
  created() {
    this.getList();
  },
  methods: {
    // æäº¤ä¸Šä¼ æ–‡ä»¶
    submitFileForm() {
      this.$refs.upload.submit();
    },
    /** ä¸‹è½½æ¨¡æ¿æ“ä½œ */
    importTemplate() {
      this.download('bs/workshop/importTemplate', {
      }, `车间信息_${new Date().getTime()}.xlsx`)
    },
    // æ–‡ä»¶ä¸Šä¼ æˆåŠŸå¤„理
    handleFileSuccess(response, file, fileList) {
      this.upload.open = false;
      this.upload.isUploading = false;
      this.$refs.upload.clearFiles();
      this.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "导入结果", { dangerouslyUseHTMLString: true });
      this.getList();
    },
    // æ–‡ä»¶ä¸Šä¼ ä¸­å¤„理
    handleFileUploadProgress(event, file, fileList) {
      this.upload.isUploading = true;
    },
    /** å¯¼å…¥æŒ‰é’®æ“ä½œ */
    handleImport() {
      this.upload.title = "车间导入";
      this.upload.open = true;
    },
    advancedQuery(){
       this.advancedShowSearch = (this.advancedShowSearch) ? this.advancedShowSearch = false : this.advancedShowSearch = true;
    },
jcdm-ui/src/views/main/cfkb/Instructions/index.vue
@@ -3,17 +3,18 @@
    <el-row :gutter="3">
      <el-col :span="6">
        <el-card shadow="always">
          CFMOTO
          <img style="width: 200px;height: 50px; margin-left: 40px; margin-top: 0px" src="@/assets/logo/jcdm2.png" alt="dark">
          <span style="margin-left: 66px; font-weight: bold">{{currentTime}}</span>
        </el-card>
      </el-col>
      <el-col :span="3">
        <el-card shadow="always">
          {{productCode}}
          <span class="centerText" style="margin-top: 26px">{{locationCode}}</span>
        </el-card>
      </el-col>
      <el-col :span="15">
        <el-card shadow="always">
          è£…副轴,拨叉
          <span class="centerText">{{locationName}}</span>
        </el-card>
      </el-col>
    </el-row>
@@ -21,7 +22,7 @@
      <el-col :span="6">
        <div style="height: 600px;overflow: auto;">
          <div  class="container" style="height: 50px;background-color: #00afff;margin-bottom: 10px">
            <span class="centered">居中文本</span>
            <span class="centered">作业流程</span>
          </div>
          <div v-for="(item,index) in tableData" :key="item.sort" class="outerDiv" :id="'outerDiv'+index">
            <div class="innerDiv1">
@@ -37,31 +38,31 @@
        <el-col :span="20">
          <el-card style="height: 600px" shadow="always">
            <el-row style="height: 100px">
              {{address}}
              <span style="color: #31b431;font-size: 30px;font-weight: bold">{{address}}</span>
            </el-row>
            <el-row style="height: 400px">
              <el-image style="height: 390px;width: 960px" :src="src"></el-image>
<!--              {{src}}-->
            </el-row>
            <el-row style="height: 100px">
              <el-button type="primary" @click="backClick()" style="float: left" icon="el-icon-arrow-left">上一步</el-button>
              <el-button type="primary" @click="nextStep()" style="float: right">下一步<i class="el-icon-arrow-right el-icon--right"></i></el-button>
              <el-button type="primary" @click="backClick()" style="height: 50px; width: 130px; font-size: 20px; float: left" icon="el-icon-d-arrow-left">上一步</el-button>
              <el-button type="primary" @click="nextStep()" style="height: 50px; width: 130px; font-size: 20px; float: right">下一步<i class="el-icon-d-arrow-right"></i></el-button>
            </el-row>
          </el-card>
        </el-col>
        <el-col :span="4">
          <el-card style="height: 600px" shadow="always">
            <el-row style="height: 100px;margin-top: 100px">
              <el-button type="primary" @click="processDocuments()" style="float: left" icon="el-icon-folder-opened">工艺文件</el-button>
              <el-button type="primary" @click="processDocuments()" style="height: 50px; width: 130px; font-size: 20px; float: left" icon="el-icon-folder-opened">工艺文件</el-button>
            </el-row>
            <el-row style="height: 50px;margin-top: 5px">
              <el-button type="primary" @click="changeProducts('2V91')" style="width: 100px" icon="el-icon-s-unfold">2V91</el-button>
            <el-row style="height: 80px;margin-top: 5px">
              <el-button type="success" @click="changeProducts('2V91')" style="height: 50px; width: 130px; font-size: 20px; float: left" icon="el-icon-s-unfold">2V91</el-button>
            </el-row>
            <el-row style="height: 50px;">
              <el-button type="primary" @click="changeProducts('191')" style="width: 100px" icon="el-icon-s-unfold">191</el-button>
            <el-row style="height: 80px;">
              <el-button type="info" @click="changeProducts('191')" style="height: 50px; width: 130px; font-size: 20px; float: left" icon="el-icon-s-unfold">191</el-button>
            </el-row>
            <el-row style="height: 50px;">
              <el-button type="primary" @click="changeProducts('0JWF')" style="width: 100px" icon="el-icon-s-unfold">0JWF</el-button>
            <el-row style="height: 80px;">
              <el-button type="info" @click="changeProducts('0JWF')" style="height: 50px; width: 130px; font-size: 20px; float: left" icon="el-icon-s-unfold">0JWF</el-button>
            </el-row>
          </el-card>
        </el-col>
@@ -73,16 +74,20 @@
<script>
import {listFormulaChild} from "@/api/main/bs/formulaChild/formulaChild";
import {listStationConf,getIp} from "@/api/main/sc/stationConf";
export default {
  name: "index",
  data() {
    return {
      locationCode: "未配置",
      locationName: "未配置工位",
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        productCode: null,
      },
      currentTime:'',
      productCode: '2V91',
      tableData: [{
        img: 'https://fuss10.elemecdn.com/e/5d/4a731a90594',
@@ -141,16 +146,53 @@
    this.tableData = []
  },
  mounted() {
    this.changeProducts(this.productCode)
    this.getStationConf()
    // this.changeProducts(this.productCode)
    this.changeProducts("2V91")
    this.getNowTime()
    // this.autoShow()
  },
  // computed: {
  //   currentTime:
  // },
  methods: {
    /** æŸ¥è¯¢å·¥ä½ç»ˆç«¯é…ç½®åˆ—表 */
    getStationConf() {
      getIp().then(response => {
        let queryParams = {
          ipAddress: response.msg,
        }
        listStationConf(queryParams).then(response => {
          this.locationName = response.rows[0].processesName
          this.locationCode = response.rows[0].processesCode
        });
      });
    },
    //获取当前时间
    getNowTime () {
      let speed = 1000
      let that = this
      let theNowTime = function () {
        that.currentTime = that.timeNumber()
      }
      setInterval(theNowTime, speed)
    },
    timeNumber () {
      let today = new Date()
      let date = today.getFullYear() + '-' + this.twoDigits(today.getMonth() + 1) + '-' + this.twoDigits(today.getDate())
      let time = this.twoDigits(today.getHours()) + ':' + this.twoDigits(today.getMinutes()) + ':' + this.twoDigits(today.getSeconds())
      return date + '  ' + time
    },
    twoDigits (val) {
      if (val < 10) return '0' + val
      return val
    },
    // å®šæ—¶è§¦å‘
    autoShow() {
      const _this = this
      this.intervalId = setInterval(() => {
        _this.setBg()
      }, 2000)
      }, 10000)
    },
    setImg(index) {
      this.address = this.tableData[index].address
@@ -168,7 +210,7 @@
      for (let i = 0; i < this.tableData.length - 1; i++) {
        if (document.getElementById('outerDiv' + i).style.background === 'yellow') {
          this.setImg(i+1)
          document.getElementById('outerDiv' + i).style.background = 'green'
          document.getElementById('outerDiv' + i).style.background = 'lightgreen'
          document.getElementById('outerDiv' + (i+1)).style.background = 'yellow'
          return;
        }
@@ -178,7 +220,7 @@
      for (let i = 0; i < this.tableData.length; i++) {
        if (document.getElementById('outerDiv' + i).style.background === 'yellow') {
          this.setImg(i + index)
          document.getElementById('outerDiv' + i).style.background = index < 0 ? 'white' : 'green'
          document.getElementById('outerDiv' + i).style.background = index < 0 ? 'white' : 'lightgreen'
          document.getElementById('outerDiv' + (i + index)).style.background = 'yellow'
          return;
        }
@@ -195,6 +237,7 @@
    },
    changeProducts(val){
      console.log("------更换图片",val)
      this.productCode = val
      const _this = this
@@ -207,6 +250,9 @@
        this.$nextTick(() => {
          clearInterval(this.intervalId);
          document.getElementById('outerDiv0').style.background = 'yellow'
          for (let i = 1; i < this.tableData.length; i++){
            document.getElementById('outerDiv' + i).style.background =  'white'
          }
          this.setImg(0)
          this.autoShow()
        })
@@ -221,7 +267,7 @@
<style scoped>
.outerDiv {
  width: fit-content;
  min-width: 100%;
  min-width: 102%;
  /*width: 300px;*/
  height: 50px;
  margin-bottom: 10px;
@@ -262,6 +308,21 @@
.centered {
  text-align: center;
  color: white;
  font-weight: bold;
  font-size: 20px;
}
.centerText{
  color: black;
  font-weight: bold;
  font-size: 40px;
  display: flex;
  justify-content: center;
  margin-top: 20px
}
::v-deep .el-card__body{
  height: 100px;
}
</style>
jcdm-ui/src/views/main/kb/prepareOnline/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,81 @@
<template>
  <div class="app-container">
    <el-card class="box-card">
      <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px">
        <el-form-item label-width="120" label="工艺流程编码" prop="routeCode">
          <el-input
            v-model="queryParams.routeCode"
            placeholder="请输入工艺流程编码"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item style="float: right">
          <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
        </el-form-item>
      </el-form>
    </el-card>
    <el-card style="margin-top: 10px" class="box-card">
      <el-table border v-loading="loading" :data="dataList" v-if="dataList.length > 0">
        <el-table-column type="selection" width="55" align="center" />
        <el-table-column :show-overflow-tooltip='true' label="工单编号" width="130" align="center">
          <template slot-scope="scope">
            <router-link :to="{path: '/main/route-data/index/', query: {routeCode: scope.row.routeCode,routeId: scope.row.id} }" class="link-type">
              <span>{{ scope.row.routeCode }}</span>
            </router-link>
          </template>
        </el-table-column>
        <el-table-column  :show-overflow-tooltip='true' label="产品小系列" width="130" align="center" prop="routeName">
        </el-table-column>
        <el-table-column label="SN流水号" width="130" align="center" prop="productCode">
        </el-table-column>
        <el-table-column label="状态" width="160" align="center" prop="productName">
        </el-table-column>
        <el-table-column label="是否打印" align="center" prop="version">
        </el-table-column>
        <el-table-column label="打印时间" align="center" prop="status">
          <template slot-scope="scope">
            <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
          </template>
        </el-table-column>
      </el-table>
      <el-empty v-else>
        <span slot="description">暂无数据</span>
      </el-empty>
    </el-card>
  </div>
</template>
<script>
export default {
  name: "index",
  dicts: ['sys_normal_disable'],
  data(){
    return{
      // æŸ¥è¯¢å‚æ•°
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        routeCode: null,
        routeName: null,
        productCode: null,
        productName: null,
        status: null,
        dataSource: null,
      },
      dataList: []
    }
  },
  methods:{
    /** æœç´¢æŒ‰é’®æ“ä½œ */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
  }
}
</script>
<style scoped>
</style>
jcdm-ui/src/views/main/om/productionOrde/index.vue
@@ -30,23 +30,20 @@
      <el-form-item style="margin-left: 14px" label="产品编号" prop="productCode">
        <el-input v-model="queryParams.productCode" placeholder="请输入产品编号" clearable @keyup.enter.native="handleQuery"/>
      </el-form-item>
      <el-form-item label="订单编号" prop="salesOrderCode">
        <el-input v-model="queryParams.salesOrderCode" placeholder="请输入订单编号" clearable @keyup.enter.native="handleQuery"/>
      <el-form-item label="机型" prop="typeZ">
        <el-input v-model="queryParams.typeZ" placeholder="请输入机型" clearable @keyup.enter.native="handleQuery"/>
      </el-form-item>
      <el-form-item label="车间编号" prop="workshopCode">
        <el-input v-model="queryParams.workshopCode" placeholder="请输入车间编号" clearable @keyup.enter.native="handleQuery"/>
      </el-form-item>
      <el-form-item label="产线编号" prop="lineCode">
        <el-input v-model="queryParams.lineCode" placeholder="请输入产线编号" clearable @keyup.enter.native="handleQuery"/>
      </el-form-item>
      <el-form-item style="margin-left: 7px" label-width="80" label="产品BOM" prop="bomCode">
        <el-input v-model="queryParams.bomCode" placeholder="请输入产品BOM" clearable @keyup.enter.native="handleQuery"/>
      </el-form-item>
      <el-form-item label="工艺流程" prop="routeCode">
        <el-input v-model="queryParams.routeCode" placeholder="请输入工艺流程" clearable @keyup.enter.native="handleQuery"/>
      </el-form-item>
      <el-form-item label="工艺配方" prop="recipeCode">
        <el-input v-model="queryParams.recipeCode" placeholder="请输入工艺配方" clearable @keyup.enter.native="handleQuery"/>
      <el-form-item label-width="130" label="通知单生成日期" prop="dateConditions">
        <el-date-picker
          v-model="queryParams.dateConditions"
          type="datetimerange"
          :picker-options="pickerOptions"
          value-format="yyyy-MM-dd HH:mm:ss"
          range-separator="至"
          start-placeholder="开始日期"
          end-placeholder="结束日期"
          align="right">
        </el-date-picker>
      </el-form-item>
    </el-form>
    </el-card>
@@ -117,18 +114,19 @@
<!--      </el-col>-->
      <el-col :span="1.5">
        <el-button
          type="warning"
          type="success"
          plain
          icon="el-icon-download"
          icon="el-icon-wind-power"
          size="mini"
          @click="getProductionNotice"
          v-hasPermi="['om:productionOrde:receive']"
        >接收</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="primary"
          plain
          icon="el-icon-createUpdate"
          icon="el-icon-edit"
          size="mini"
          :disabled="single"
          @click="CreatehandleUpdate"
@@ -145,7 +143,7 @@
        </el-table-column>
        <el-table-column label="生产订单" width="160" align="center">
          <template slot-scope="scope">
            <router-link :to="{path: '/main/workReport-data/index/', query: {workOrderNo: scope.row.workOrderNo} }" class="link-type">
            <router-link :to="{path: '/main/orderScheduling-data/index/', query: {workOrderNo: scope.row.workOrderNo} }" class="link-type">
              <span>{{ scope.row.workOrderNo }}</span>
            </router-link>
          </template>
@@ -349,9 +347,9 @@
        <i class="el-icon-s-order"></i>
        {{titleName}}
      </span>
      <el-form ref="form" inline  :model="form" :rules="CreateRules" label-width="80px">
        <el-form-item   label="种类" prop="typeZ">
          <el-input disabled v-model="form.typeZ"  placeholder="请输入种类" />
      <el-form ref="form" inline  :model="form" :rules="CreateRules" label-width="100px">
        <el-form-item   label="机型" prop="typeZ">
          <el-input disabled v-model="form.typeZ"  placeholder="请输入机型" />
        </el-form-item>
        <el-form-item  label="日期" prop="dateTime">
          <el-date-picker clearable
@@ -368,7 +366,7 @@
          <el-input type="number"   :maxlength="3"  :pattern="'[0-9]{3}'" v-model="form.startCode"  placeholder="请输入起始编号" @input="handleCodeChange"/>
        </el-form-item>
        <el-form-item   label="起止编号" prop="startEndCode">
          <el-input disabled v-model="form.startEndCode"/>
          <el-input type="textarea" disabled v-model="form.startEndCode"/>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
@@ -396,6 +394,7 @@
  generateNumbers
} from "@/api/main/bs/orderScheduling/orderScheduling";
import {listMaterial} from "@/api/main/bs/material/material";
import {listModelNumber} from "@/api/main/bs/modelNumber/modelNumber";
export default {
  name: "ProductionOrde",
@@ -459,6 +458,7 @@
        flag: null,
        adds:null,
        productionNotice: null,
        dateConditions: [],
      },
      materialQueryParams: {
        pageNum: 1,
@@ -501,6 +501,33 @@
        year: '',
      },
      markNo: '',
      pickerOptions: {
        shortcuts: [{
          text: '最近一周',
          onClick(picker) {
            const end = new Date();
            const start = new Date();
            start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
            picker.$emit('pick', [start, end]);
          }
        }, {
          text: '最近一个月',
          onClick(picker) {
            const end = new Date();
            const start = new Date();
            start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
            picker.$emit('pick', [start, end]);
          }
        }, {
          text: '最近三个月',
          onClick(picker) {
            const end = new Date();
            const start = new Date();
            start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
            picker.$emit('pick', [start, end]);
          }
        }]
      },
    };
  },
  created() {
@@ -540,15 +567,18 @@
        //日
        dateTimeRule = dateTimeRule + day;
        dateTimeRule = dateTimeRule + this.markNo;
        this.form.dateTimeRule = dateTimeRule;
        this.form.dateTimeRule = dateTimeRule;//此处赋值不加机型
        dateTimeRule = dateTimeRule + this.form.typeZ;//此处加机型,顺序不能颠倒
        //赋值起始编码
        this.form.startEndCode = dateTimeRule +  startCode + "----" + dateTimeRule + String(parseInt(startCode) + parseInt(planQty)-1).padStart(3, '0') ;
        this.form.startEndCode = dateTimeRule +  String(parseInt(startCode)).padStart(3, '0') + "         " + dateTimeRule + String(parseInt(startCode) + parseInt(planQty)-1).padStart(3, '0') ;
      }
    },
    getProductionNotice(){
      getProductionNotice(this.queryParams).then(response => {
        this.$modal.msgSuccess("接收成功");
        this.$modal.msgSuccess(response.msg);
        this.queryParams = {}
        this.getList();
      });
@@ -728,6 +758,7 @@
        this.materialQueryParams.materialCode = response.data.productCode;
        listMaterial(this.materialQueryParams).then(response => {
          this.markNo = response.rows[0].mark
          this.form.typeL = response.rows[0].typeL;
        });
        this.form = response.data;
        this.Createopen = true;
@@ -770,6 +801,33 @@
    /** ç”Ÿæˆç®±ä½“条码提交按钮 */
    submitFormForBoxCode() {
      let startCode = parseInt(this.form.startCode);
      let queryParams = {
        model: this.form.typeZ,
        modelDate: this.form.dateTimeRule,
      }
      if(startCode>999){
        this.$message.error('起始编号超出最大范围,请输入1-999的数字!');
        return;
      }else if(startCode<1){
        this.$message.error('起始编号超出最小范围,请输入1-999的数字!');
        return;
      }
      listModelNumber(queryParams).then(response => {
        if(response.rows.length === 0){
          this.saveBoxCode()
        }else {
          let maxNumValue = response.rows[0].maxnumValue;
          if(startCode<=maxNumValue){
            this.$message.error('箱体条码重复,请重新输入起始编号!');
          }else {
            this.saveBoxCode()
          }
        }
      });
    },
    saveBoxCode(){
      this.$refs["form"].validate(valid => {
        if (valid) {
          if (this.form.id != null) {
jcdm-ui/src/views/main/om/productionOrde/planStatistics.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,657 @@
<template>
  <div class="app-container">
    <el-card class="box-card">
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
      <el-form-item label-width="100" label="生产通知单" prop="productName">
        <el-input v-model="queryParams.productionNotice" placeholder="请输入生产通知单" clearable @keyup.enter.native="handleQuery"/>
      </el-form-item>
      <el-form-item label-width="80" label="生产订单" prop="workOrderNo">
        <el-input v-model="queryParams.workOrderNo" placeholder="请输入生产订单" clearable @keyup.enter.native="handleQuery"/>
      </el-form-item>
      <el-form-item label="机型" prop="typeZ">
        <el-input v-model="queryParams.typeZ" placeholder="请输入机型" clearable @keyup.enter.native="handleQuery"/>
      </el-form-item>
      <el-form-item style="float: right">
        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
        <el-button type="warning" icon="el-icon-copy-document" size="mini" @click="advancedQuery">高级查询</el-button>
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
      </el-form-item>
    </el-form>
    <el-form :model="queryParams" ref="queryParams" size="small" :inline="true" v-show="advancedShowSearch" label-width="68px">
      <el-form-item style="margin-left: 14px" label="产品编号" prop="productCode">
        <el-input v-model="queryParams.productCode" placeholder="请输入产品编号" clearable @keyup.enter.native="handleQuery"/>
      </el-form-item>
    </el-form>
    </el-card>
    <el-card style="margin-top: 10px" class="box-card">
    <el-row :gutter="10" class="mb8">
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>
      <el-table border v-loading="loading" :data="productionOrdeList" @selection-change="handleSelectionChange">
        <el-table-column type="selection" width="55" align="center" />
        <el-table-column label="生产通知单号" width="160" align="center" prop="productionNotice">
        </el-table-column>
        <el-table-column label="生产订单" width="160" align="center" prop="workOrderNo">
        </el-table-column>
        <el-table-column label="机型" width="160" align="center" prop="typeZ">
        </el-table-column>
        <el-table-column label="产品编号" width="150" align="center" prop="productCode">
        </el-table-column>
        <el-table-column label="工单状态" align="center" prop="orderStatus">
          <template slot-scope="scope">
            <dict-tag :options="dict.type.order_state" :value="scope.row.orderStatus"/>
          </template>
        </el-table-column>
        <el-table-column label="需求数量" align="center" prop="planQty">
        </el-table-column>
        <el-table-column label="工作中" align="center">
        </el-table-column>
        <el-table-column label="已完成" width="160" align="center" prop="actualQty">
        </el-table-column>
        <el-table-column label="已报废" width="160" align="center" prop="scrapQty">
        </el-table-column>
        <el-table-column label="完成率" width="160" align="center">
        </el-table-column>
        <el-table-column label="合格率" width="160" align="center">
        </el-table-column>
      </el-table>
    </el-card>
    <pagination
      v-show="total>0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />
    <!-- æ·»åŠ æˆ–修改生产工单对话框 -->
    <el-dialog v-dialogpop-up :title="title" :visible.sync="open" width="1000px" append-to-body>
       <span slot="title">
        <i class="el-icon-s-order"></i>
        {{titleName}}
      </span>
      <el-form ref="form" inline :model="form" :rules="rules" label-width="80px">
        <el-form-item label="工单号" prop="workOrderNo">
          <el-input v-model="form.workOrderNo" placeholder="请输入生产订单" />
        </el-form-item>
        <el-form-item label="订单编号" prop="salesOrderCode">
          <el-input v-model="form.salesOrderCode" placeholder="请输入订单编号" />
        </el-form-item>
        <el-form-item label="产品编号" prop="productCode">
          <el-input v-model="form.productCode" placeholder="请选择产品" >
            <el-button slot="append" @click="handleSelectProduct" icon="el-icon-search"></el-button>
          </el-input>
          <ItemSelect ref="itemSelect" @onSelected="onItemSelected" > </ItemSelect>
        </el-form-item>
        <el-form-item label="产品名称" prop="productName">
          <el-input v-model="form.productName" disabled placeholder="请输入产品名称" />
        </el-form-item>
        <el-form-item label="种类" prop="productName">
          <el-input v-model="form.typeZ" disabled placeholder="请输入种类" />
        </el-form-item>
        <el-form-item label="实际数量" prop="actualQty">
          <el-input v-model="form.actualQty"  placeholder="请输入实际数量" />
        </el-form-item>
        <el-form-item label="车间编号" prop="workshopCode">
          <el-select style="width: 93%" @change="handleSelectChange(form.workshopCode)" v-model="form.workshopCode" placeholder="请选择车间编号">
            <el-option
              v-for="item in options"
              :key="item.workshopCode"
              :label="item.workshopName"
              :value="item.workshopCode">
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item style="margin-left: -15px" label="产线编号" prop="lineCode">
          <el-select style="width: 93%" v-model="form.lineCode" placeholder="请选择产线编号">
            <el-option
              v-for="item in lineOptions"
              :key="item.lineCode"
              :label="item.lineName"
              :value="item.lineCode">
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="工艺流程" prop="routeCode">
          <el-input v-model="form.routeCode" disabled placeholder="请输入工艺流程" />
        </el-form-item>
        <el-form-item label="产品BOM" prop="bomCode">
          <el-input v-model="form.bomCode" disabled placeholder="请输入产品BOM" />
        </el-form-item>
        <el-form-item label="工艺配方" prop="recipeCode">
          <el-input v-model="form.recipeCode" placeholder="请输入工艺配方" />
        </el-form-item>
        <el-form-item label="计划数量" prop="planQty">
          <el-input v-model="form.planQty" placeholder="请输入计划数量" />
        </el-form-item>
        <el-form-item label="需求日期" prop="demandDate">
          <el-date-picker style="width: 88%" clearable
            v-model="form.demandDate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择需求日期">
          </el-date-picker>
        </el-form-item>
        <el-form-item style="margin-left: -30px" label="备注" prop="remarks">
          <el-input v-model="form.remarks" placeholder="请输入备注" />
        </el-form-item>
        <el-row>
          <el-col :span="12">
            <el-form-item style="margin-left: 10px" label-width="120" label="计划开始时间" prop="planStartTime">
              <el-date-picker clearable
                v-model="form.planStartTime"
                type="date"
                value-format="yyyy-MM-dd"
                placeholder="请选择计划开始时间">
              </el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item style="margin-left: 76px" label-width="120" label="计划结束时间" prop="planEndTime">
              <el-date-picker clearable
                v-model="form.planEndTime"
                type="date"
                value-format="yyyy-MM-dd"
                placeholder="请选择计划结束时间">
              </el-date-picker>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">ç¡® å®š</el-button>
        <el-button @click="cancel">取 æ¶ˆ</el-button>
      </div>
    </el-dialog>
    <el-dialog v-dialogpop-up :title="title" :visible.sync="Createopen" width="400px" append-to-body>
       <span slot="title">
        <i class="el-icon-s-order"></i>
        {{titleName}}
      </span>
      <el-form ref="form" inline  :model="form" :rules="CreateRules" label-width="80px">
        <el-form-item   label="种类" prop="typeZ">
          <el-input disabled v-model="form.typeZ"  placeholder="请输入种类" />
        </el-form-item>
        <el-form-item  label="日期" prop="dateTime">
          <el-date-picker clearable
                          v-model="form.dateTime"
                          type="date"
                          value-format="yyyy-MM-dd"
                          placeholder="请选择日期" @input="handleCodeChange">
          </el-date-picker>
        </el-form-item>
        <el-form-item class="hidden-form-item" label="日期规则" prop="dateTimeRule">
          <el-input v-model="form.dateTimeRule"/>
        </el-form-item>
        <el-form-item   label="起始编号" prop="startCode">
          <el-input type="number"   :maxlength="3"  :pattern="'[0-9]{3}'" v-model="form.startCode"  placeholder="请输入起始编号" @input="handleCodeChange"/>
        </el-form-item>
        <el-form-item   label="起止编号" prop="startEndCode">
          <el-input disabled v-model="form.startEndCode"/>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitFormForBoxCode">ç¡® å®š</el-button>
        <el-button @click="cancel">取 æ¶ˆ</el-button>
      </div>
    </el-dialog>
  </div>
</template>
<script>
import { listLineInfo } from "@/api/main/bs/lineInfo/lineInfo";
import { listWorkshop } from "@/api/main/bs/workshop/workshop";
import { listProductBom } from "@/api/main/bs/ProductBom/ProductBom";
import { listTechnologyRoute} from "@/api/main/bs/technologyRoute/technologyRoute";
import ItemSelect  from "@/components/itemSelect/single.vue";
import {  addOrderSchedulingForBoxCode,getProductionNotice, upDownMove, listProductionOrde, getProductionOrde, delProductionOrde, addProductionOrde, updateProductionOrde } from "@/api/main/om/productionOrde/productionOrde";
import {
  listOrderScheduling,
  getOrderScheduling,
  delOrderScheduling,
  addOrderScheduling,
  updateOrderScheduling,
  generateNumbers
} from "@/api/main/bs/orderScheduling/orderScheduling";
import {listMaterial} from "@/api/main/bs/material/material";
import {listModelNumber} from "@/api/main/bs/modelNumber/modelNumber";
export default {
  name: "ProductionOrde",
  dicts: ['order_state','year','month','day'],
  components: {
    ItemSelect ,
  },
  data() {
    return {
      titleName: '',
      options: [],
      lineOptions: [],
      outputArray: [],
      showFlag:false,
      advancedShowSearch: false,
      workOrder: {
        status: 'ss'
      },
      // é®ç½©å±‚
      loading: true,
      // é€‰ä¸­æ•°ç»„
      ids: [],
      // éžå•ä¸ªç¦ç”¨
      single: true,
      // éžå¤šä¸ªç¦ç”¨
      multiple: true,
      move: true,
      selectedRowIndex: -1, // å­˜å‚¨é€‰ä¸­è¡Œçš„索引
      // æ˜¾ç¤ºæœç´¢æ¡ä»¶
      showSearch: true,
      // æ€»æ¡æ•°
      total: 0,
      // ç”Ÿäº§å·¥å•è¡¨æ ¼æ•°æ®
      productionOrdeList: [],
      // å¼¹å‡ºå±‚标题
      title: "",
      // æ˜¯å¦æ˜¾ç¤ºå¼¹å‡ºå±‚
      open: false,
      Createopen: false,
      // æŸ¥è¯¢å‚æ•°
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        workOrderNo: null,
        salesOrderCode: null,
        productCode: null,
        productName: null,
        workshopCode: null,
        lineCode: null,
        routeCode: null,
        bomCode: null,
        recipeCode: null,
        orderStatus: "2",
        custom: null,
        marketAreaCode: null,
        softwareVersionCode: null,
        productCompanyCode: null,
        frontEndId: 0,
        idNums: null,
        typeZ: null,
        flag: null,
        adds:null,
        productionNotice: null,
      },
      materialQueryParams: {
        pageNum: 1,
        pageSize: 10,
        materialCode: null,
      },
      // è¡¨å•å‚æ•°
      form: {},
      updateStatusParameter: {
        id: null,
        orderStatus: null
      },
      // è¡¨å•æ ¡éªŒ
      rules: {
        id: [
          { required: true, message: "ID不能为空", trigger: "blur" }
        ],
      },
      CreateRules: {
        day: [
          { required: true, message: "不能为空", trigger: "blur" }
        ],
        month: [
          { required: true, message: "不能为空", trigger: "blur" }
        ],
        year: [
          { required: true, message: "不能为空", trigger: "blur" }
        ],
        dateTime: [
          { required: true, message: "不能为空", trigger: "blur" }
        ],
        startCode: [
          { required: true, message: "不能为空", trigger: "blur" }
        ],
      },
      change: {
        day: '',
        month: '',
        year: '',
      },
      markNo: '',
    };
  },
  created() {
    this.getList();
    this.initWorkshop();
  },
  methods: {
    //日期或开始编号输入时
    handleCodeChange(data){
      let dateTime = this.form.dateTime;
      let planQty = this.form.planQty;
      let startCode = this.form.startCode
      if(dateTime !== null && dateTime !== undefined
        && startCode !== null && startCode !== undefined) {
        let dateTimes = dateTime.split("-");
        let year = dateTimes[0];
        let month = dateTimes[1];
        let day = dateTimes[2];
        let dictYear = this.dict.type.year;
        let dictMonth = this.dict.type.month;
        let startCode = this.form.startCode
        let dateTimeRule = "";
        //å¹´
        for (let i = 0; i < dictYear.length; i++) {
          if (year === dictYear[i].label) {
            dateTimeRule = dictYear[i].value
            // this.form.startEndCode = startEndCode;
          }
        }
        //月
        for (let i = 0; i < dictMonth.length; i++) {
          if (month === dictMonth[i].label) {
            dateTimeRule = dateTimeRule + dictMonth[i].value;
          }
        }
        //日
        dateTimeRule = dateTimeRule + day;
        dateTimeRule = dateTimeRule + this.markNo;
        this.form.dateTimeRule = dateTimeRule;
        //赋值起始编码
        this.form.startEndCode = dateTimeRule +  startCode + "----" + dateTimeRule + String(parseInt(startCode) + parseInt(planQty)-1).padStart(3, '0') ;
      }
    },
    getProductionNotice(){
      getProductionNotice(this.queryParams).then(response => {
        this.$modal.msgSuccess("接收成功");
        this.queryParams = {}
        this.getList();
      });
    },
    //数组生成
    changeDay(day){
      this.change.day = day;
      let adds =this.form.typeZ+this.change.year+this.change.month+this.change.day+this.form.actualQty;
      this.form.adds = adds
    },
    changeMonth(day){
      this.change.month = day;
      let adds =this.form.typeZ+this.change.year+this.change.month+this.change.day+this.form.actualQty;
      this.form.adds = adds
    },
    changeYear(day){
      this.change.year = day;
      let adds =this.form.typeZ+this.change.year+this.change.month+this.change.day+this.form.actualQty;
      this.form.adds = adds
    },
    moveUp(row, val){
      console.log(val)
      const ids = row.id || this.ids
      let str = JSON.stringify(ids);
      let num = BigInt(str.replace(/[\[\]]/g, ''));
      this.queryParams.frontEndId = num
      this.queryParams.idNums = ids
      this.queryParams.flag = val
      upDownMove(this.queryParams).then(response => {
        this.$modal.msgSuccess("移动成功");
        this.getList();
      });
    },
    initWorkshop(){
      listWorkshop(this.queryParams).then(response => {
        this.options = response.rows;
      });
    },
    // åœ¨è¿™é‡Œç¼–写处理选中事件的逻辑
    //物料选择弹出框
    onItemSelected(obj){
      if(obj !== undefined && obj !== null){
        let productCode = obj.materialCode;
        this.form.productCode = productCode;
        this.form.productName = obj.materialName;
        this.form.typeZ = obj.typeZ;
        this.typeL = obj.typeZ;
        this.queryParams.productCode = productCode;
        this.queryParams.typeZ = typeZ
        listTechnologyRoute(this.queryParams).then(response => {
          this.form.routeCode = response.rows[0].routeCode;
        });
        listProductBom(this.queryParams).then(response => {
          this.form.bomCode = response.rows[0].bomCode;
        });
      }
    },
    handleSelectProduct(){
      this.$refs.itemSelect.showFlag = true;
    },
    advancedQuery(){
      this.advancedShowSearch = (this.advancedShowSearch) ? this.advancedShowSearch = false : this.advancedShowSearch = true;
    },
    handleCommand(status,id) {
      console.log(status)
      this.updateStatusParameter.id = id;
      this.updateStatusParameter.orderStatus = status;
      updateProductionOrde(this.updateStatusParameter).then(response => {
        this.$modal.msgSuccess("修改成功");
        this.open = false;
        this.getList();
      });
    },
    /** æŸ¥è¯¢ç”Ÿäº§å·¥å•åˆ—表 */
    getList() {
      this.loading = true;
      listProductionOrde(this.queryParams).then(response => {
        this.productionOrdeList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    // å–消按钮
    cancel() {
      this.open = false;
      this.Createopen = false;
      this.reset();
    },
    // è¡¨å•é‡ç½®
    reset() {
      this.form = {
        id: null,
        workOrderNo: null,
        salesOrderCode: null,
        productCode: null,
        productName: null,
        workshopCode: null,
        lineCode: null,
        routeCode: null,
        bomCode: null,
        recipeCode: null,
        planQty: null,
        actualQty: null,
        badQty: null,
        scrapQty: null,
        repairQty: null,
        actualOnlineQty: null,
        onlineCompletionMark: null,
        demandDate: null,
        planStartTime: null,
        planEndTime: null,
        actualStartTime: null,
        actualEndTime: null,
        serialNumber: null,
        orderStatus: null,
        createTime: null,
        updateTime: null,
        createUser: null,
        updateUser: null,
        remarks: null,
        streamNumber: null,
        custom: null,
        marketAreaCode: null,
        softwareVersionCode: null,
        productCompanyCode: null,
        spareField1: null,
        spareField2: null,
        spareField3: null,
        typeZ: null,
        spareField4: null,
        adds:null
      };
      this.resetForm("form");
    },
    /** æœç´¢æŒ‰é’®æ“ä½œ */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** é‡ç½®æŒ‰é’®æ“ä½œ */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // å¤šé€‰æ¡†é€‰ä¸­æ•°æ®
    handleSelectionChange(selection) {
      this.ids = selection.map(item => item.id)
      this.move = selection.length!==1
      if(!selection.length){
        this.single = true
        this.multiple = true
      }else {
        if(selection[0].orderStatus === '1' && selection.length === 1){
          this.single = false
          this.multiple = false
        }
      }
    },
    /** æ–°å¢žæŒ‰é’®æ“ä½œ */
    handleAdd() {
      this.initWorkshop();
      this.reset();
      this.open = true;
      this.titleName = "添加生产订单";
    },
    /** åŒæ­¥æŒ‰é’®æ“ä½œ */
    CreatehandleUpdate(Row) {
      this.initWorkshop();
      this.reset();
      const id = Row.id || this.ids
      getProductionOrde(id).then(response => {
        console.log(response.data)
        console.log(response.data.productCode)
        this.materialQueryParams.materialCode = response.data.productCode;
        listMaterial(this.materialQueryParams).then(response => {
          this.markNo = response.rows[0].mark
        });
        this.form = response.data;
        this.Createopen = true;
        this.titleName = "生成箱体条码";
        // return Array.from({ length: parseInt(this.actualQty) }, (_, index) => index + 1);
      });
    },
    /** ä¿®æ”¹æŒ‰é’®æ“ä½œ */
    handleUpdate(row) {
      this.initWorkshop();
      this.reset();
      const id = row.id || this.ids
      getProductionOrde(id).then(response => {
        console.log(response.data)
        this.form = response.data;
        this.open = true;
        this.titleName = "修改生产订单";
      });
    },
    /** æäº¤æŒ‰é’® */
    submitForm() {
      this.$refs["form"].validate(valid => {
        if (valid) {
          if (this.form.id != null) {
            updateProductionOrde(this.form).then(response => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            addProductionOrde(this.form).then(response => {
              this.$modal.msgSuccess("新增成功");
              this.open = false;
              this.getList();
            });
          }
        }
      });
    },
    /** ç”Ÿæˆç®±ä½“条码提交按钮 */
    submitFormForBoxCode() {
      let startCode = parseInt(this.form.startCode);
      let queryParams = {
        model: this.form.typeZ,
        modelDate: this.form.dateTimeRule,
      }
      listModelNumber(queryParams).then(response => {
        if(response.rows.length === 0){
          this.saveBoxCode()
        }else {
          let maxNumValue = response.rows[0].maxnumValue;
          if(startCode<maxNumValue){
            this.$message.error('新建的不能比查询出的小');
            return;
          }else {
            this.saveBoxCode()
          }
        }
      });
    },
    saveBoxCode(){
      this.$refs["form"].validate(valid => {
        if (valid) {
          if (this.form.id != null) {
            addOrderSchedulingForBoxCode(this.form).then(response => {
              this.$modal.msgSuccess("保存成功");
              this.Createopen = false;
              this.getList();
            });
          }
        }
      });
    },
    /** åˆ é™¤æŒ‰é’®æ“ä½œ */
    handleDelete(row) {
      const ids = row.id || this.ids;
      this.$modal.confirm('是否确认删除生产订单编号为"' + ids + '"的数据项?').then(function() {
        return delProductionOrde(ids);
      }).then(() => {
        this.getList();
        this.$modal.msgSuccess("删除成功");
      }).catch(() => {});
    },
    /** å¯¼å‡ºæŒ‰é’®æ“ä½œ */
    handleExport() {
      this.download('om/productionOrde/export', {
        ...this.queryParams
      }, `productionOrde_${new Date().getTime()}.xlsx`)
    },
  }
};
</script>
<style lang="scss" scoped>
.hidden-form-item {
  display: none;
}
</style>