From 2cc5a1afe8296d148f0a32989395d538e5323a8e Mon Sep 17 00:00:00 2001 From: hdy <1105738590@qq.com> Date: 星期四, 18 一月 2024 16:22:55 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- jcdm-main/src/main/java/com/jcdm/main/bs/workshop/service/impl/BsWorkshopInfoServiceImpl.java | 18 jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/Query/PrepareOnlineQuery.java | 17 jcdm-ui/src/views/main/bs/workshop/index.vue | 83 ++ jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/service/impl/OmProductionOrdeInfoServiceImpl.java | 7 jcdm-main/src/main/resources/mapper/bs/modelNumber/BsModelNumberMapper.xml | 1 jcdm-ui/src/views/main/kb/prepareOnline/index.vue | 81 ++ jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/service/impl/BsOrderSchedulingServiceImpl.java | 26 jcdm-main/src/main/java/com/jcdm/main/util/IpInfoUtils.java | 63 ++ jcdm-ui/src/views/main/cfkb/Instructions/index.vue | 99 ++ jcdm-ui/src/views/main/bs/modelNumber/index.vue | 32 jcdm-ui/src/views/main/bs/orderScheduling/index.vue | 274 ++++---- jcdm-ui/src/views/main/om/productionOrde/planStatistics.vue | 657 +++++++++++++++++++++ jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/domain/OmProductionOrdeInfo.java | 37 + jcdm-ui/src/assets/logo/jcdm2.png | 0 jcdm-main/src/main/java/com/jcdm/main/bs/modelNumber/mapper/BsModelNumberMapper.java | 2 jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/controller/OmProductionOrdeInfoController.java | 65 + jcdm-main/src/main/resources/mapper/om/productionOrde/OmProductionOrdeInfoMapper.xml | 1 jcdm-main/src/main/resources/mapper/bs/orderScheduling/BsOrderSchedulingMapper.xml | 29 jcdm-ui/src/views/main/om/productionOrde/index.vue | 112 ++ jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/domain/BsOrderScheduling.java | 44 + jcdm-ui/src/router/index.js | 14 jcdm-main/src/main/java/com/jcdm/main/sc/stationConf/controller/ScStationConfController.java | 13 jcdm-ui/src/assets/logo/jcdm.png | 0 jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/controller/PrepareOnlineController.java | 32 + jcdm-ui/package.json | 2 jcdm-main/src/main/java/com/jcdm/main/bs/workshop/controller/BsWorkshopInfoController.java | 19 jcdm-main/src/main/java/com/jcdm/main/bs/workshop/service/IBsWorkshopInfoService.java | 5 jcdm-ui/src/api/main/sc/stationConf.js | 8 jcdm-ui/src/api/main/bs/prepareOnline/prepareOnline.js | 10 jcdm-ui/src/views/main/bs/material/index.vue | 2 jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/mapper/BsOrderSchedulingMapper.java | 12 jcdm-ui/src/views/main/bs/formulaChild/index.vue | 2 32 files changed, 1,542 insertions(+), 225 deletions(-) diff --git a/jcdm-main/src/main/java/com/jcdm/main/bs/modelNumber/mapper/BsModelNumberMapper.java b/jcdm-main/src/main/java/com/jcdm/main/bs/modelNumber/mapper/BsModelNumberMapper.java index 102d748..e518f1d 100644 --- a/jcdm-main/src/main/java/com/jcdm/main/bs/modelNumber/mapper/BsModelNumberMapper.java +++ b/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 diff --git a/jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/Query/PrepareOnlineQuery.java b/jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/Query/PrepareOnlineQuery.java new file mode 100644 index 0000000..a81f799 --- /dev/null +++ b/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; +} diff --git a/jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/controller/PrepareOnlineController.java b/jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/controller/PrepareOnlineController.java new file mode 100644 index 0000000..05be5aa --- /dev/null +++ b/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); + } +} diff --git a/jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/domain/BsOrderScheduling.java b/jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/domain/BsOrderScheduling.java index 97ed85d..ad4499b 100644 --- a/jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/domain/BsOrderScheduling.java +++ b/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; } diff --git a/jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/mapper/BsOrderSchedulingMapper.java b/jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/mapper/BsOrderSchedulingMapper.java index 3c83ec0..11a711b 100644 --- a/jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/mapper/BsOrderSchedulingMapper.java +++ b/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 璁㈠崟鎺掍骇 diff --git a/jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/service/impl/BsOrderSchedulingServiceImpl.java b/jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/service/impl/BsOrderSchedulingServiceImpl.java index 7439a3b..83b3669 100644 --- a/jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/service/impl/BsOrderSchedulingServiceImpl.java +++ b/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); + } /** * 鏂板璁㈠崟鎺掍骇 * diff --git a/jcdm-main/src/main/java/com/jcdm/main/bs/workshop/controller/BsWorkshopInfoController.java b/jcdm-main/src/main/java/com/jcdm/main/bs/workshop/controller/BsWorkshopInfoController.java index 6b45a55..83492f6 100644 --- a/jcdm-main/src/main/java/com/jcdm/main/bs/workshop/controller/BsWorkshopInfoController.java +++ b/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); + } } diff --git a/jcdm-main/src/main/java/com/jcdm/main/bs/workshop/service/IBsWorkshopInfoService.java b/jcdm-main/src/main/java/com/jcdm/main/bs/workshop/service/IBsWorkshopInfoService.java index 11a57da..5f6d834 100644 --- a/jcdm-main/src/main/java/com/jcdm/main/bs/workshop/service/IBsWorkshopInfoService.java +++ b/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); + } diff --git a/jcdm-main/src/main/java/com/jcdm/main/bs/workshop/service/impl/BsWorkshopInfoServiceImpl.java b/jcdm-main/src/main/java/com/jcdm/main/bs/workshop/service/impl/BsWorkshopInfoServiceImpl.java index 00bc99a..0391f10 100644 --- a/jcdm-main/src/main/java/com/jcdm/main/bs/workshop/service/impl/BsWorkshopInfoServiceImpl.java +++ b/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(); + } + + } diff --git a/jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/controller/OmProductionOrdeInfoController.java b/jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/controller/OmProductionOrdeInfoController.java index 9fd7ff5..3357f1e 100644 --- a/jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/controller/OmProductionOrdeInfoController.java +++ b/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("鎺ユ敹鎴愬姛锛�"); } } diff --git a/jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/domain/OmProductionOrdeInfo.java b/jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/domain/OmProductionOrdeInfo.java index f0307dd..0a7f8fa 100644 --- a/jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/domain/OmProductionOrdeInfo.java +++ b/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 diff --git a/jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/service/impl/OmProductionOrdeInfoServiceImpl.java b/jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/service/impl/OmProductionOrdeInfoServiceImpl.java index d7e1aeb..8a0139e 100644 --- a/jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/service/impl/OmProductionOrdeInfoServiceImpl.java +++ b/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); } diff --git a/jcdm-main/src/main/java/com/jcdm/main/sc/stationConf/controller/ScStationConfController.java b/jcdm-main/src/main/java/com/jcdm/main/sc/stationConf/controller/ScStationConfController.java index fa44622..4cb928b 100644 --- a/jcdm-main/src/main/java/com/jcdm/main/sc/stationConf/controller/ScStationConfController.java +++ b/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)); + } } diff --git a/jcdm-main/src/main/java/com/jcdm/main/util/IpInfoUtils.java b/jcdm-main/src/main/java/com/jcdm/main/util/IpInfoUtils.java new file mode 100644 index 0000000..93c7161 --- /dev/null +++ b/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 { + + /** + * 鑾峰彇瀹㈡埛绔疘P鍦板潃 + */ + 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(); + } + } + // 瀵逛簬閫氳繃澶氫釜浠g悊鐨勬儏鍐碉紝绗竴涓狪P涓哄鎴风鐪熷疄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 "鏈煡"; + } +} diff --git a/jcdm-main/src/main/resources/mapper/bs/modelNumber/BsModelNumberMapper.xml b/jcdm-main/src/main/resources/mapper/bs/modelNumber/BsModelNumberMapper.xml index 3a6e219..d71fdbf 100644 --- a/jcdm-main/src/main/resources/mapper/bs/modelNumber/BsModelNumberMapper.xml +++ b/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"> diff --git a/jcdm-main/src/main/resources/mapper/bs/orderScheduling/BsOrderSchedulingMapper.xml b/jcdm-main/src/main/resources/mapper/bs/orderScheduling/BsOrderSchedulingMapper.xml index f906af9..d64a55c 100644 --- a/jcdm-main/src/main/resources/mapper/bs/orderScheduling/BsOrderSchedulingMapper.xml +++ b/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> diff --git a/jcdm-main/src/main/resources/mapper/om/productionOrde/OmProductionOrdeInfoMapper.xml b/jcdm-main/src/main/resources/mapper/om/productionOrde/OmProductionOrdeInfoMapper.xml index 758eb05..daf203e 100644 --- a/jcdm-main/src/main/resources/mapper/om/productionOrde/OmProductionOrdeInfoMapper.xml +++ b/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 diff --git a/jcdm-ui/package.json b/jcdm-ui/package.json index 0c53b8e..4656fee 100644 --- a/jcdm-ui/package.json +++ b/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", diff --git a/jcdm-ui/src/api/main/bs/prepareOnline/prepareOnline.js b/jcdm-ui/src/api/main/bs/prepareOnline/prepareOnline.js new file mode 100644 index 0000000..d502f42 --- /dev/null +++ b/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 + }) +} diff --git a/jcdm-ui/src/api/main/sc/stationConf.js b/jcdm-ui/src/api/main/sc/stationConf.js index baebb1e..9c51122 100644 --- a/jcdm-ui/src/api/main/sc/stationConf.js +++ b/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({ diff --git a/jcdm-ui/src/assets/logo/jcdm.png b/jcdm-ui/src/assets/logo/jcdm.png new file mode 100644 index 0000000..112e1ed --- /dev/null +++ b/jcdm-ui/src/assets/logo/jcdm.png Binary files differ diff --git a/jcdm-ui/src/assets/logo/jcdm2.png b/jcdm-ui/src/assets/logo/jcdm2.png new file mode 100644 index 0000000..1425c09 --- /dev/null +++ b/jcdm-ui/src/assets/logo/jcdm2.png Binary files differ diff --git a/jcdm-ui/src/router/index.js b/jcdm-ui/src/router/index.js index f1a20fa..dc78142 100644 --- a/jcdm-ui/src/router/index.js +++ b/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' } + } + ] + }, ] // 闃叉杩炵画鐐瑰嚮澶氭璺敱鎶ラ敊 diff --git a/jcdm-ui/src/views/main/bs/formulaChild/index.vue b/jcdm-ui/src/views/main/bs/formulaChild/index.vue index 4134b5e..078864e 100644 --- a/jcdm-ui/src/views/main/bs/formulaChild/index.vue +++ b/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> diff --git a/jcdm-ui/src/views/main/bs/material/index.vue b/jcdm-ui/src/views/main/bs/material/index.vue index 7e35df9..640c5c6 100644 --- a/jcdm-ui/src/views/main/bs/material/index.vue +++ b/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="鐗规畩浠g爜" align="center" prop="mark" width="120"> </el-table-column> diff --git a/jcdm-ui/src/views/main/bs/modelNumber/index.vue b/jcdm-ui/src/views/main/bs/modelNumber/index.vue index 9bbc76a..cf536dc 100644 --- a/jcdm-ui/src/views/main/bs/modelNumber/index.vue +++ b/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> diff --git a/jcdm-ui/src/views/main/bs/orderScheduling/index.vue b/jcdm-ui/src/views/main/bs/orderScheduling/index.vue index fa8bbc9..bffea93 100644 --- a/jcdm-ui/src/views/main/bs/orderScheduling/index.vue +++ b/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="璇疯緭鍏VT鎶ュ伐" + 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() { diff --git a/jcdm-ui/src/views/main/bs/workshop/index.vue b/jcdm-ui/src/views/main/bs/workshop/index.vue index 44c0311..476341a 100644 --- a/jcdm-ui/src/views/main/bs/workshop/index.vue +++ b/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>浠呭厑璁稿鍏ls銆亁lsx鏍煎紡鏂囦欢銆�</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; }, diff --git a/jcdm-ui/src/views/main/cfkb/Instructions/index.vue b/jcdm-ui/src/views/main/cfkb/Instructions/index.vue index c3e001c..26cb331 100644 --- a/jcdm-ui/src/views/main/cfkb/Instructions/index.vue +++ b/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> diff --git a/jcdm-ui/src/views/main/kb/prepareOnline/index.vue b/jcdm-ui/src/views/main/kb/prepareOnline/index.vue new file mode 100644 index 0000000..e6328b4 --- /dev/null +++ b/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> diff --git a/jcdm-ui/src/views/main/om/productionOrde/index.vue b/jcdm-ui/src/views/main/om/productionOrde/index.vue index 5bc4ecd..249fae6 100644 --- a/jcdm-ui/src/views/main/om/productionOrde/index.vue +++ b/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="璇疯緭鍏ヤ骇鍝丅OM" 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) { diff --git a/jcdm-ui/src/views/main/om/productionOrde/planStatistics.vue b/jcdm-ui/src/views/main/om/productionOrde/planStatistics.vue new file mode 100644 index 0000000..3ab59dc --- /dev/null +++ b/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="璇疯緭鍏ヤ骇鍝丅OM" /> + </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> -- Gitblit v1.9.3