jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/controller/OmProductionOrdeInfoController.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/domain/OmProductionOrdeInfo.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/mapper/OmProductionOrdeInfoMapper.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/service/IOmProductionOrdeInfoService.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/service/impl/OmProductionOrdeInfoServiceImpl.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
jcdm-main/src/main/resources/mapper/om/productionOrde/OmProductionOrdeInfoMapper.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
jcdm-ui/src/api/main/om/productionOrde/productionOrde.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
jcdm-ui/src/views/main/om/productionOrde/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/controller/OmProductionOrdeInfoController.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,105 @@ package com.jcdm.main.om.productionOrde.controller; import java.util.List; import javax.servlet.http.HttpServletResponse; import com.jcdm.main.om.productionOrde.domain.OmProductionOrdeInfo; import com.jcdm.main.om.productionOrde.service.IOmProductionOrdeInfoService; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PutMapping; import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import com.jcdm.common.annotation.Log; import com.jcdm.common.core.controller.BaseController; import com.jcdm.common.core.domain.AjaxResult; import com.jcdm.common.enums.BusinessType; import com.jcdm.common.utils.poi.ExcelUtil; import com.jcdm.common.core.page.TableDataInfo; /** * ç产工åController * * @author ruimin * @date 2023-12-11 */ @RestController @RequestMapping("/om/productionOrde") public class OmProductionOrdeInfoController extends BaseController { @Autowired private IOmProductionOrdeInfoService omProductionOrdeInfoService; /** * æ¥è¯¢ç产工åå表 */ @PreAuthorize("@ss.hasPermi('om:productionOrde:list')") @GetMapping("/list") public TableDataInfo list(OmProductionOrdeInfo omProductionOrdeInfo) { startPage(); List<OmProductionOrdeInfo> list = omProductionOrdeInfoService.selectOmProductionOrdeInfoList(omProductionOrdeInfo); return getDataTable(list); } /** * 导åºç产工åå表 */ @PreAuthorize("@ss.hasPermi('om:productionOrde:export')") @Log(title = "ç产工å", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(HttpServletResponse response, OmProductionOrdeInfo omProductionOrdeInfo) { List<OmProductionOrdeInfo> list = omProductionOrdeInfoService.selectOmProductionOrdeInfoList(omProductionOrdeInfo); ExcelUtil<OmProductionOrdeInfo> util = new ExcelUtil<OmProductionOrdeInfo>(OmProductionOrdeInfo.class); util.exportExcel(response, list, "ç产工åæ°æ®"); } /** * è·åç产工å详ç»ä¿¡æ¯ */ @PreAuthorize("@ss.hasPermi('om:productionOrde:query')") @GetMapping(value = "/{id}") public AjaxResult getInfo(@PathVariable("id") Long id) { return success(omProductionOrdeInfoService.selectOmProductionOrdeInfoById(id)); } /** * æ°å¢ç产工å */ @PreAuthorize("@ss.hasPermi('om:productionOrde:add')") @Log(title = "ç产工å", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@RequestBody OmProductionOrdeInfo omProductionOrdeInfo) { return toAjax(omProductionOrdeInfoService.insertOmProductionOrdeInfo(omProductionOrdeInfo)); } /** * ä¿®æ¹ç产工å */ @PreAuthorize("@ss.hasPermi('om:productionOrde:edit')") @Log(title = "ç产工å", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@RequestBody OmProductionOrdeInfo omProductionOrdeInfo) { return toAjax(omProductionOrdeInfoService.updateOmProductionOrdeInfo(omProductionOrdeInfo)); } /** * å é¤ç产工å */ @PreAuthorize("@ss.hasPermi('om:productionOrde:remove')") @Log(title = "ç产工å", businessType = BusinessType.DELETE) @DeleteMapping("/{ids}") public AjaxResult remove(@PathVariable Long[] ids) { return toAjax(omProductionOrdeInfoService.deleteOmProductionOrdeInfoByIds(ids)); } } jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/domain/OmProductionOrdeInfo.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,527 @@ package com.jcdm.main.om.productionOrde.domain; import java.util.Date; import com.fasterxml.jackson.annotation.JsonFormat; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.jcdm.common.annotation.Excel; import com.jcdm.common.core.domain.BaseEntity; /** * ç产工å对象 om_production_orde_info * * @author ruimin * @date 2023-12-11 */ public class OmProductionOrdeInfo extends BaseEntity { private static final long serialVersionUID = 1L; /** ID */ private Long id; /** ç产工åå· */ @Excel(name = "ç产工åå·") private String workOrderNo; /** 订åç¼å· */ @Excel(name = "订åç¼å·") private String salesOrderCode; /** 产åç¼å· */ @Excel(name = "产åç¼å·") private String productCode; /** 产åå称 */ @Excel(name = "产åå称") private String productName; /** 车é´ç¼å· */ @Excel(name = "车é´ç¼å·") private String workshopCode; /** 产线ç¼å· */ @Excel(name = "产线ç¼å·") private String lineCode; /** å·¥èºæµç¨ */ @Excel(name = "å·¥èºæµç¨") private String routeCode; /** 产åBOM */ @Excel(name = "产åBOM") private String bomCode; /** å·¥èºé æ¹ */ @Excel(name = "å·¥èºé æ¹") private String recipeCode; /** 计åæ°é */ @Excel(name = "计åæ°é") private Long planQty; /** å®é æ°é */ @Excel(name = "å®é æ°é") private Long actualQty; /** ä¸è¯æ°é */ @Excel(name = "ä¸è¯æ°é") private Long badQty; /** æ¥åºæ°é */ @Excel(name = "æ¥åºæ°é") private Long scrapQty; /** è¿ä¿®æ°é */ @Excel(name = "è¿ä¿®æ°é") private Long repairQty; /** å®é ä¸çº¿æ°é */ @Excel(name = "å®é ä¸çº¿æ°é") private Long actualOnlineQty; /** ä¸çº¿å®å·¥æ è®° */ private String onlineCompletionMark; /** éæ±æ¥æ */ @JsonFormat(pattern = "yyyy-MM-dd") @Excel(name = "éæ±æ¥æ", width = 30, dateFormat = "yyyy-MM-dd") private Date demandDate; /** 计åå¼å§æ¶é´ */ @Excel(name = "计åå¼å§æ¶é´") private String planStartTime; /** 计åç»ææ¶é´ */ @Excel(name = "计åç»ææ¶é´") private String planEndTime; /** å®é å¼å§æ¶é´ */ @Excel(name = "å®é å¼å§æ¶é´") private String actualStartTime; /** å®é ç»ææ¶é´ */ @Excel(name = "å®é ç»ææ¶é´") private String actualEndTime; /** 顺åºå· */ @Excel(name = "顺åºå·") private Long serialNumber; /** å·¥åç¶æï¼1å建ã2å·²åå¸ã3ç产ä¸ã4å·²å»ç»ã5å·²å®å·¥ã6å·²å ³éï¼ */ @Excel(name = "å·¥åç¶æ", readConverterExp = "1=å建ã2å·²åå¸ã3ç产ä¸ã4å·²å»ç»ã5å·²å®å·¥ã6å·²å ³é") private String orderStatus; /** å建人 */ @Excel(name = "å建人") private String createUser; /** ä¿®æ¹äºº */ @Excel(name = "ä¿®æ¹äºº") private String updateUser; /** å¤æ³¨ */ @Excel(name = "å¤æ³¨") private String remarks; /** æµæ°´å· */ @Excel(name = "æµæ°´å·") private String streamNumber; /** å®¢æ· */ @Excel(name = "客æ·") private String custom; /** å¸åºåºåç¼ç */ @Excel(name = "å¸åºåºåç¼ç ") private String marketAreaCode; /** 软件çæ¬ç¼ç */ @Excel(name = "软件çæ¬ç¼ç ") private String softwareVersionCode; /** 产åå ¬å¸ç¼ç */ @Excel(name = "产åå ¬å¸ç¼ç ") private String productCompanyCode; /** é¢çå段1 */ private String spareField1; /** é¢çå段2 */ private String spareField2; /** é¢çå段3 */ private String spareField3; /** é¢çå段4 */ private String spareField4; public void setId(Long id) { this.id = id; } public Long getId() { return id; } public void setWorkOrderNo(String workOrderNo) { this.workOrderNo = workOrderNo; } public String getWorkOrderNo() { return workOrderNo; } public void setSalesOrderCode(String salesOrderCode) { this.salesOrderCode = salesOrderCode; } public String getSalesOrderCode() { return salesOrderCode; } public void setProductCode(String productCode) { this.productCode = productCode; } public String getProductCode() { return productCode; } public void setProductName(String productName) { this.productName = productName; } public String getProductName() { return productName; } public void setWorkshopCode(String workshopCode) { this.workshopCode = workshopCode; } public String getWorkshopCode() { return workshopCode; } public void setLineCode(String lineCode) { this.lineCode = lineCode; } public String getLineCode() { return lineCode; } public void setRouteCode(String routeCode) { this.routeCode = routeCode; } public String getRouteCode() { return routeCode; } public void setBomCode(String bomCode) { this.bomCode = bomCode; } public String getBomCode() { return bomCode; } public void setRecipeCode(String recipeCode) { this.recipeCode = recipeCode; } public String getRecipeCode() { return recipeCode; } public void setPlanQty(Long planQty) { this.planQty = planQty; } public Long getPlanQty() { return planQty; } public void setActualQty(Long actualQty) { this.actualQty = actualQty; } public Long getActualQty() { return actualQty; } public void setBadQty(Long badQty) { this.badQty = badQty; } public Long getBadQty() { return badQty; } public void setScrapQty(Long scrapQty) { this.scrapQty = scrapQty; } public Long getScrapQty() { return scrapQty; } public void setRepairQty(Long repairQty) { this.repairQty = repairQty; } public Long getRepairQty() { return repairQty; } public void setActualOnlineQty(Long actualOnlineQty) { this.actualOnlineQty = actualOnlineQty; } public Long getActualOnlineQty() { return actualOnlineQty; } public void setOnlineCompletionMark(String onlineCompletionMark) { this.onlineCompletionMark = onlineCompletionMark; } public String getOnlineCompletionMark() { return onlineCompletionMark; } public void setDemandDate(Date demandDate) { this.demandDate = demandDate; } public Date getDemandDate() { return demandDate; } public void setPlanStartTime(String planStartTime) { this.planStartTime = planStartTime; } public String getPlanStartTime() { return planStartTime; } public void setPlanEndTime(String planEndTime) { this.planEndTime = planEndTime; } public String getPlanEndTime() { return planEndTime; } public void setActualStartTime(String actualStartTime) { this.actualStartTime = actualStartTime; } public String getActualStartTime() { return actualStartTime; } public void setActualEndTime(String actualEndTime) { this.actualEndTime = actualEndTime; } public String getActualEndTime() { return actualEndTime; } public void setSerialNumber(Long serialNumber) { this.serialNumber = serialNumber; } public Long getSerialNumber() { return serialNumber; } public void setOrderStatus(String orderStatus) { this.orderStatus = orderStatus; } public String getOrderStatus() { return orderStatus; } public void setCreateUser(String createUser) { this.createUser = createUser; } public String getCreateUser() { return createUser; } public void setUpdateUser(String updateUser) { this.updateUser = updateUser; } public String getUpdateUser() { return updateUser; } public void setRemarks(String remarks) { this.remarks = remarks; } public String getRemarks() { return remarks; } public void setStreamNumber(String streamNumber) { this.streamNumber = streamNumber; } public String getStreamNumber() { return streamNumber; } public void setCustom(String custom) { this.custom = custom; } public String getCustom() { return custom; } public void setMarketAreaCode(String marketAreaCode) { this.marketAreaCode = marketAreaCode; } public String getMarketAreaCode() { return marketAreaCode; } public void setSoftwareVersionCode(String softwareVersionCode) { this.softwareVersionCode = softwareVersionCode; } public String getSoftwareVersionCode() { return softwareVersionCode; } public void setProductCompanyCode(String productCompanyCode) { this.productCompanyCode = productCompanyCode; } public String getProductCompanyCode() { return productCompanyCode; } public void setSpareField1(String spareField1) { this.spareField1 = spareField1; } public String getSpareField1() { return spareField1; } public void setSpareField2(String spareField2) { this.spareField2 = spareField2; } public String getSpareField2() { return spareField2; } public void setSpareField3(String spareField3) { this.spareField3 = spareField3; } public String getSpareField3() { return spareField3; } public void setSpareField4(String spareField4) { this.spareField4 = spareField4; } public String getSpareField4() { return spareField4; } @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) .append("id", getId()) .append("workOrderNo", getWorkOrderNo()) .append("salesOrderCode", getSalesOrderCode()) .append("productCode", getProductCode()) .append("productName", getProductName()) .append("workshopCode", getWorkshopCode()) .append("lineCode", getLineCode()) .append("routeCode", getRouteCode()) .append("bomCode", getBomCode()) .append("recipeCode", getRecipeCode()) .append("planQty", getPlanQty()) .append("actualQty", getActualQty()) .append("badQty", getBadQty()) .append("scrapQty", getScrapQty()) .append("repairQty", getRepairQty()) .append("actualOnlineQty", getActualOnlineQty()) .append("onlineCompletionMark", getOnlineCompletionMark()) .append("demandDate", getDemandDate()) .append("planStartTime", getPlanStartTime()) .append("planEndTime", getPlanEndTime()) .append("actualStartTime", getActualStartTime()) .append("actualEndTime", getActualEndTime()) .append("serialNumber", getSerialNumber()) .append("orderStatus", getOrderStatus()) .append("createTime", getCreateTime()) .append("updateTime", getUpdateTime()) .append("createUser", getCreateUser()) .append("updateUser", getUpdateUser()) .append("remarks", getRemarks()) .append("streamNumber", getStreamNumber()) .append("custom", getCustom()) .append("marketAreaCode", getMarketAreaCode()) .append("softwareVersionCode", getSoftwareVersionCode()) .append("productCompanyCode", getProductCompanyCode()) .append("spareField1", getSpareField1()) .append("spareField2", getSpareField2()) .append("spareField3", getSpareField3()) .append("spareField4", getSpareField4()) .toString(); } } jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/mapper/OmProductionOrdeInfoMapper.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,62 @@ package com.jcdm.main.om.productionOrde.mapper; import com.jcdm.main.om.productionOrde.domain.OmProductionOrdeInfo; import java.util.List; /** * ç产工åMapperæ¥å£ * * @author ruimin * @date 2023-12-11 */ public interface OmProductionOrdeInfoMapper { /** * æ¥è¯¢ç产工å * * @param id ç产工åä¸»é® * @return ç产工å */ public OmProductionOrdeInfo selectOmProductionOrdeInfoById(Long id); /** * æ¥è¯¢ç产工åå表 * * @param omProductionOrdeInfo ç产工å * @return ç产工åéå */ public List<OmProductionOrdeInfo> selectOmProductionOrdeInfoList(OmProductionOrdeInfo omProductionOrdeInfo); /** * æ°å¢ç产工å * * @param omProductionOrdeInfo ç产工å * @return ç»æ */ public int insertOmProductionOrdeInfo(OmProductionOrdeInfo omProductionOrdeInfo); /** * ä¿®æ¹ç产工å * * @param omProductionOrdeInfo ç产工å * @return ç»æ */ public int updateOmProductionOrdeInfo(OmProductionOrdeInfo omProductionOrdeInfo); /** * å é¤ç产工å * * @param id ç产工åä¸»é® * @return ç»æ */ public int deleteOmProductionOrdeInfoById(Long id); /** * æ¹éå é¤ç产工å * * @param ids éè¦å é¤çæ°æ®ä¸»é®éå * @return ç»æ */ public int deleteOmProductionOrdeInfoByIds(Long[] ids); } jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/service/IOmProductionOrdeInfoService.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,62 @@ package com.jcdm.main.om.productionOrde.service; import com.jcdm.main.om.productionOrde.domain.OmProductionOrdeInfo; import java.util.List; /** * ç产工åServiceæ¥å£ * * @author ruimin * @date 2023-12-11 */ public interface IOmProductionOrdeInfoService { /** * æ¥è¯¢ç产工å * * @param id ç产工åä¸»é® * @return ç产工å */ public OmProductionOrdeInfo selectOmProductionOrdeInfoById(Long id); /** * æ¥è¯¢ç产工åå表 * * @param omProductionOrdeInfo ç产工å * @return ç产工åéå */ public List<OmProductionOrdeInfo> selectOmProductionOrdeInfoList(OmProductionOrdeInfo omProductionOrdeInfo); /** * æ°å¢ç产工å * * @param omProductionOrdeInfo ç产工å * @return ç»æ */ public int insertOmProductionOrdeInfo(OmProductionOrdeInfo omProductionOrdeInfo); /** * ä¿®æ¹ç产工å * * @param omProductionOrdeInfo ç产工å * @return ç»æ */ public int updateOmProductionOrdeInfo(OmProductionOrdeInfo omProductionOrdeInfo); /** * æ¹éå é¤ç产工å * * @param ids éè¦å é¤çç产工å主é®éå * @return ç»æ */ public int deleteOmProductionOrdeInfoByIds(Long[] ids); /** * å é¤ç产工åä¿¡æ¯ * * @param id ç产工åä¸»é® * @return ç»æ */ public int deleteOmProductionOrdeInfoById(Long id); } jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/service/impl/OmProductionOrdeInfoServiceImpl.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,96 @@ package com.jcdm.main.om.productionOrde.service.impl; import java.util.List; import com.jcdm.common.utils.DateUtils; import com.jcdm.main.om.productionOrde.domain.OmProductionOrdeInfo; import com.jcdm.main.om.productionOrde.mapper.OmProductionOrdeInfoMapper; import com.jcdm.main.om.productionOrde.service.IOmProductionOrdeInfoService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; /** * ç产工åServiceä¸å¡å±å¤ç * * @author ruimin * @date 2023-12-11 */ @Service public class OmProductionOrdeInfoServiceImpl implements IOmProductionOrdeInfoService { @Autowired private OmProductionOrdeInfoMapper omProductionOrdeInfoMapper; /** * æ¥è¯¢ç产工å * * @param id ç产工åä¸»é® * @return ç产工å */ @Override public OmProductionOrdeInfo selectOmProductionOrdeInfoById(Long id) { return omProductionOrdeInfoMapper.selectOmProductionOrdeInfoById(id); } /** * æ¥è¯¢ç产工åå表 * * @param omProductionOrdeInfo ç产工å * @return ç产工å */ @Override public List<OmProductionOrdeInfo> selectOmProductionOrdeInfoList(OmProductionOrdeInfo omProductionOrdeInfo) { return omProductionOrdeInfoMapper.selectOmProductionOrdeInfoList(omProductionOrdeInfo); } /** * æ°å¢ç产工å * * @param omProductionOrdeInfo ç产工å * @return ç»æ */ @Override public int insertOmProductionOrdeInfo(OmProductionOrdeInfo omProductionOrdeInfo) { omProductionOrdeInfo.setCreateTime(DateUtils.getNowDate()); return omProductionOrdeInfoMapper.insertOmProductionOrdeInfo(omProductionOrdeInfo); } /** * ä¿®æ¹ç产工å * * @param omProductionOrdeInfo ç产工å * @return ç»æ */ @Override public int updateOmProductionOrdeInfo(OmProductionOrdeInfo omProductionOrdeInfo) { omProductionOrdeInfo.setUpdateTime(DateUtils.getNowDate()); return omProductionOrdeInfoMapper.updateOmProductionOrdeInfo(omProductionOrdeInfo); } /** * æ¹éå é¤ç产工å * * @param ids éè¦å é¤çç产工åä¸»é® * @return ç»æ */ @Override public int deleteOmProductionOrdeInfoByIds(Long[] ids) { return omProductionOrdeInfoMapper.deleteOmProductionOrdeInfoByIds(ids); } /** * å é¤ç产工åä¿¡æ¯ * * @param id ç产工åä¸»é® * @return ç»æ */ @Override public int deleteOmProductionOrdeInfoById(Long id) { return omProductionOrdeInfoMapper.deleteOmProductionOrdeInfoById(id); } } jcdm-main/src/main/resources/mapper/om/productionOrde/OmProductionOrdeInfoMapper.xml
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,215 @@ <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.jcdm.main.om.productionOrde.mapper.OmProductionOrdeInfoMapper"> <resultMap type="OmProductionOrdeInfo" id="OmProductionOrdeInfoResult"> <result property="id" column="id" /> <result property="workOrderNo" column="work_order_no" /> <result property="salesOrderCode" column="sales_order_code" /> <result property="productCode" column="product_code" /> <result property="productName" column="product_name" /> <result property="workshopCode" column="workshop_code" /> <result property="lineCode" column="line_code" /> <result property="routeCode" column="route_code" /> <result property="bomCode" column="bom_code" /> <result property="recipeCode" column="recipe_code" /> <result property="planQty" column="plan_qty" /> <result property="actualQty" column="actual_qty" /> <result property="badQty" column="bad_qty" /> <result property="scrapQty" column="scrap_qty" /> <result property="repairQty" column="repair_qty" /> <result property="actualOnlineQty" column="actual_online_qty" /> <result property="onlineCompletionMark" column="online_completion_mark" /> <result property="demandDate" column="demand_date" /> <result property="planStartTime" column="plan_start_time" /> <result property="planEndTime" column="plan_end_time" /> <result property="actualStartTime" column="actual_start_time" /> <result property="actualEndTime" column="actual_end_time" /> <result property="serialNumber" column="serial_number" /> <result property="orderStatus" column="order_status" /> <result property="createTime" column="create_time" /> <result property="updateTime" column="update_time" /> <result property="createUser" column="create_user" /> <result property="updateUser" column="update_user" /> <result property="remarks" column="remarks" /> <result property="streamNumber" column="stream_number" /> <result property="custom" column="custom" /> <result property="marketAreaCode" column="market_area_code" /> <result property="softwareVersionCode" column="software_version_code" /> <result property="productCompanyCode" column="product_company_code" /> <result property="spareField1" column="spare_field_1" /> <result property="spareField2" column="spare_field_2" /> <result property="spareField3" column="spare_field_3" /> <result property="spareField4" column="spare_field_4" /> </resultMap> <sql id="selectOmProductionOrdeInfoVo"> select id, work_order_no, sales_order_code, product_code, product_name, workshop_code, line_code, route_code, bom_code, recipe_code, plan_qty, actual_qty, bad_qty, scrap_qty, repair_qty, actual_online_qty, online_completion_mark, demand_date, plan_start_time, plan_end_time, actual_start_time, actual_end_time, serial_number, order_status, create_time, update_time, create_user, update_user, remarks, stream_number, custom, market_area_code, software_version_code, product_company_code, spare_field_1, spare_field_2, spare_field_3, spare_field_4 from om_production_orde_info </sql> <select id="selectOmProductionOrdeInfoList" parameterType="OmProductionOrdeInfo" resultMap="OmProductionOrdeInfoResult"> <include refid="selectOmProductionOrdeInfoVo"/> <where> <if test="workOrderNo != null and workOrderNo != ''"> and work_order_no like concat('%', #{workOrderNo}, '%')</if> <if test="salesOrderCode != null and salesOrderCode != ''"> and sales_order_code like concat('%', #{salesOrderCode}, '%')</if> <if test="productCode != null and productCode != ''"> and product_code like concat('%', #{productCode}, '%')</if> <if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if> <if test="workshopCode != null and workshopCode != ''"> and workshop_code like concat('%', #{workshopCode}, '%')</if> <if test="lineCode != null and lineCode != ''"> and line_code like concat('%', #{lineCode}, '%')</if> <if test="routeCode != null and routeCode != ''"> and route_code like concat('%', #{routeCode}, '%')</if> <if test="bomCode != null and bomCode != ''"> and bom_code like concat('%', #{bomCode}, '%')</if> <if test="recipeCode != null and recipeCode != ''"> and recipe_code like concat('%', #{recipeCode}, '%')</if> <if test="orderStatus != null and orderStatus != ''"> and order_status = #{orderStatus}</if> <if test="custom != null and custom != ''"> and custom like concat('%', #{custom}, '%')</if> <if test="marketAreaCode != null and marketAreaCode != ''"> and market_area_code like concat('%', #{marketAreaCode}, '%')</if> <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> </where> </select> <select id="selectOmProductionOrdeInfoById" parameterType="Long" resultMap="OmProductionOrdeInfoResult"> <include refid="selectOmProductionOrdeInfoVo"/> where id = #{id} </select> <insert id="insertOmProductionOrdeInfo" parameterType="OmProductionOrdeInfo"> insert into om_production_orde_info <trim prefix="(" suffix=")" suffixOverrides=","> <if test="id != null">id,</if> <if test="workOrderNo != null">work_order_no,</if> <if test="salesOrderCode != null">sales_order_code,</if> <if test="productCode != null">product_code,</if> <if test="productName != null">product_name,</if> <if test="workshopCode != null">workshop_code,</if> <if test="lineCode != null">line_code,</if> <if test="routeCode != null">route_code,</if> <if test="bomCode != null">bom_code,</if> <if test="recipeCode != null">recipe_code,</if> <if test="planQty != null">plan_qty,</if> <if test="actualQty != null">actual_qty,</if> <if test="badQty != null">bad_qty,</if> <if test="scrapQty != null">scrap_qty,</if> <if test="repairQty != null">repair_qty,</if> <if test="actualOnlineQty != null">actual_online_qty,</if> <if test="onlineCompletionMark != null">online_completion_mark,</if> <if test="demandDate != null">demand_date,</if> <if test="planStartTime != null">plan_start_time,</if> <if test="planEndTime != null">plan_end_time,</if> <if test="actualStartTime != null">actual_start_time,</if> <if test="actualEndTime != null">actual_end_time,</if> <if test="serialNumber != null">serial_number,</if> <if test="orderStatus != null">order_status,</if> <if test="createTime != null">create_time,</if> <if test="updateTime != null">update_time,</if> <if test="createUser != null">create_user,</if> <if test="updateUser != null">update_user,</if> <if test="remarks != null">remarks,</if> <if test="streamNumber != null">stream_number,</if> <if test="custom != null">custom,</if> <if test="marketAreaCode != null">market_area_code,</if> <if test="softwareVersionCode != null">software_version_code,</if> <if test="productCompanyCode != null">product_company_code,</if> <if test="spareField1 != null">spare_field_1,</if> <if test="spareField2 != null">spare_field_2,</if> <if test="spareField3 != null">spare_field_3,</if> <if test="spareField4 != null">spare_field_4,</if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="id != null">#{id},</if> <if test="workOrderNo != null">#{workOrderNo},</if> <if test="salesOrderCode != null">#{salesOrderCode},</if> <if test="productCode != null">#{productCode},</if> <if test="productName != null">#{productName},</if> <if test="workshopCode != null">#{workshopCode},</if> <if test="lineCode != null">#{lineCode},</if> <if test="routeCode != null">#{routeCode},</if> <if test="bomCode != null">#{bomCode},</if> <if test="recipeCode != null">#{recipeCode},</if> <if test="planQty != null">#{planQty},</if> <if test="actualQty != null">#{actualQty},</if> <if test="badQty != null">#{badQty},</if> <if test="scrapQty != null">#{scrapQty},</if> <if test="repairQty != null">#{repairQty},</if> <if test="actualOnlineQty != null">#{actualOnlineQty},</if> <if test="onlineCompletionMark != null">#{onlineCompletionMark},</if> <if test="demandDate != null">#{demandDate},</if> <if test="planStartTime != null">#{planStartTime},</if> <if test="planEndTime != null">#{planEndTime},</if> <if test="actualStartTime != null">#{actualStartTime},</if> <if test="actualEndTime != null">#{actualEndTime},</if> <if test="serialNumber != null">#{serialNumber},</if> <if test="orderStatus != null">#{orderStatus},</if> <if test="createTime != null">#{createTime},</if> <if test="updateTime != null">#{updateTime},</if> <if test="createUser != null">#{createUser},</if> <if test="updateUser != null">#{updateUser},</if> <if test="remarks != null">#{remarks},</if> <if test="streamNumber != null">#{streamNumber},</if> <if test="custom != null">#{custom},</if> <if test="marketAreaCode != null">#{marketAreaCode},</if> <if test="softwareVersionCode != null">#{softwareVersionCode},</if> <if test="productCompanyCode != null">#{productCompanyCode},</if> <if test="spareField1 != null">#{spareField1},</if> <if test="spareField2 != null">#{spareField2},</if> <if test="spareField3 != null">#{spareField3},</if> <if test="spareField4 != null">#{spareField4},</if> </trim> </insert> <update id="updateOmProductionOrdeInfo" parameterType="OmProductionOrdeInfo"> update om_production_orde_info <trim prefix="SET" suffixOverrides=","> <if test="workOrderNo != null">work_order_no = #{workOrderNo},</if> <if test="salesOrderCode != null">sales_order_code = #{salesOrderCode},</if> <if test="productCode != null">product_code = #{productCode},</if> <if test="productName != null">product_name = #{productName},</if> <if test="workshopCode != null">workshop_code = #{workshopCode},</if> <if test="lineCode != null">line_code = #{lineCode},</if> <if test="routeCode != null">route_code = #{routeCode},</if> <if test="bomCode != null">bom_code = #{bomCode},</if> <if test="recipeCode != null">recipe_code = #{recipeCode},</if> <if test="planQty != null">plan_qty = #{planQty},</if> <if test="actualQty != null">actual_qty = #{actualQty},</if> <if test="badQty != null">bad_qty = #{badQty},</if> <if test="scrapQty != null">scrap_qty = #{scrapQty},</if> <if test="repairQty != null">repair_qty = #{repairQty},</if> <if test="actualOnlineQty != null">actual_online_qty = #{actualOnlineQty},</if> <if test="onlineCompletionMark != null">online_completion_mark = #{onlineCompletionMark},</if> <if test="demandDate != null">demand_date = #{demandDate},</if> <if test="planStartTime != null">plan_start_time = #{planStartTime},</if> <if test="planEndTime != null">plan_end_time = #{planEndTime},</if> <if test="actualStartTime != null">actual_start_time = #{actualStartTime},</if> <if test="actualEndTime != null">actual_end_time = #{actualEndTime},</if> <if test="serialNumber != null">serial_number = #{serialNumber},</if> <if test="orderStatus != null">order_status = #{orderStatus},</if> <if test="createTime != null">create_time = #{createTime},</if> <if test="updateTime != null">update_time = #{updateTime},</if> <if test="createUser != null">create_user = #{createUser},</if> <if test="updateUser != null">update_user = #{updateUser},</if> <if test="remarks != null">remarks = #{remarks},</if> <if test="streamNumber != null">stream_number = #{streamNumber},</if> <if test="custom != null">custom = #{custom},</if> <if test="marketAreaCode != null">market_area_code = #{marketAreaCode},</if> <if test="softwareVersionCode != null">software_version_code = #{softwareVersionCode},</if> <if test="productCompanyCode != null">product_company_code = #{productCompanyCode},</if> <if test="spareField1 != null">spare_field_1 = #{spareField1},</if> <if test="spareField2 != null">spare_field_2 = #{spareField2},</if> <if test="spareField3 != null">spare_field_3 = #{spareField3},</if> <if test="spareField4 != null">spare_field_4 = #{spareField4},</if> </trim> where id = #{id} </update> <delete id="deleteOmProductionOrdeInfoById" parameterType="Long"> delete from om_production_orde_info where id = #{id} </delete> <delete id="deleteOmProductionOrdeInfoByIds" parameterType="String"> delete from om_production_orde_info where id in <foreach item="id" collection="array" open="(" separator="," close=")"> #{id} </foreach> </delete> </mapper> jcdm-ui/src/api/main/om/productionOrde/productionOrde.js
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,44 @@ import request from '@/utils/request' // æ¥è¯¢ç产工åå表 export function listProductionOrde(query) { return request({ url: '/om/productionOrde/list', method: 'get', params: query }) } // æ¥è¯¢ç产工åè¯¦ç» export function getProductionOrde(id) { return request({ url: '/om/productionOrde/' + id, method: 'get' }) } // æ°å¢ç产工å export function addProductionOrde(data) { return request({ url: '/om/productionOrde', method: 'post', data: data }) } // ä¿®æ¹ç产工å export function updateProductionOrde(data) { return request({ url: '/om/productionOrde', method: 'put', data: data }) } // å é¤ç产工å export function delProductionOrde(id) { return request({ url: '/om/productionOrde/' + id, method: 'delete' }) } jcdm-ui/src/views/main/om/productionOrde/index.vue
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,543 @@ <template> <div class="app-container"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form-item label="ç产工åå·" prop="workOrderNo"> <el-input v-model="queryParams.workOrderNo" 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> <el-form-item label="产åç¼å·" prop="productCode"> <el-input v-model="queryParams.productCode" placeholder="请è¾å ¥äº§åç¼å·" clearable @keyup.enter.native="handleQuery" /> </el-form-item> <el-form-item label="产åå称" prop="productName"> <el-input v-model="queryParams.productName" 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 label="å·¥èºæµç¨" prop="routeCode"> <el-input v-model="queryParams.routeCode" placeholder="请è¾å ¥å·¥èºæµç¨" clearable @keyup.enter.native="handleQuery" /> </el-form-item> <el-form-item 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="recipeCode"> <el-input v-model="queryParams.recipeCode" placeholder="请è¾å ¥å·¥èºé æ¹" clearable @keyup.enter.native="handleQuery" /> </el-form-item> <!-- <el-form-item label="å·¥åç¶æ" prop="orderStatus">--> <!-- <el-select v-model="queryParams.orderStatus" placeholder="请éæ©å·¥åç¶æ" clearable>--> <!-- <el-option--> <!-- v-for="dict in dict.type.${dictType}"--> <!-- :key="dict.value"--> <!-- :label="dict.label"--> <!-- :value="dict.value"--> <!-- />--> <!-- </el-select>--> <!-- </el-form-item>--> <el-form-item label="客æ·" prop="custom"> <el-input v-model="queryParams.custom" placeholder="请è¾å ¥å®¢æ·" clearable @keyup.enter.native="handleQuery" /> </el-form-item> <el-form-item label="å¸åºåºåç¼ç " prop="marketAreaCode"> <el-input v-model="queryParams.marketAreaCode" placeholder="请è¾å ¥å¸åºåºåç¼ç " clearable @keyup.enter.native="handleQuery" /> </el-form-item> <el-form-item label="软件çæ¬ç¼ç " prop="softwareVersionCode"> <el-input v-model="queryParams.softwareVersionCode" placeholder="请è¾å ¥è½¯ä»¶çæ¬ç¼ç " clearable @keyup.enter.native="handleQuery" /> </el-form-item> <el-form-item label="产åå ¬å¸ç¼ç " prop="productCompanyCode"> <el-input v-model="queryParams.productCompanyCode" placeholder="请è¾å ¥äº§åå ¬å¸ç¼ç " clearable @keyup.enter.native="handleQuery" /> </el-form-item> <el-form-item> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">æç´¢</el-button> <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">éç½®</el-button> </el-form-item> </el-form> <el-row :gutter="10" class="mb8"> <el-col :span="1.5"> <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['om:productionOrde:add']" >æ°å¢</el-button> </el-col> <el-col :span="1.5"> <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate" v-hasPermi="['om:productionOrde:edit']" >ä¿®æ¹</el-button> </el-col> <el-col :span="1.5"> <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete" v-hasPermi="['om:productionOrde:remove']" >å é¤</el-button> </el-col> <el-col :span="1.5"> <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" v-hasPermi="['om:productionOrde:export']" >导åº</el-button> </el-col> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> </el-row> <el-table v-loading="loading" :data="productionOrdeList" @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="workOrderNo"> </el-table-column> <el-table-column label="订åç¼å·" align="center" prop="salesOrderCode"> </el-table-column> <el-table-column label="产åç¼å·" align="center" prop="productCode"> </el-table-column> <el-table-column label="产åå称" align="center" prop="productName"> </el-table-column> <el-table-column label="车é´ç¼å·" align="center" prop="workshopCode"> </el-table-column> <el-table-column label="产线ç¼å·" align="center" prop="lineCode"> </el-table-column> <el-table-column label="å·¥èºæµç¨" align="center" prop="routeCode"> </el-table-column> <el-table-column label="产åBOM" align="center" prop="bomCode"> </el-table-column> <el-table-column label="å·¥èºé æ¹" align="center" prop="recipeCode"> </el-table-column> <el-table-column label="计åæ°é" align="center" prop="planQty"> </el-table-column> <el-table-column label="å®é æ°é" align="center" prop="actualQty"> </el-table-column> <el-table-column label="ä¸è¯æ°é" align="center" prop="badQty"> </el-table-column> <el-table-column label="æ¥åºæ°é" align="center" prop="scrapQty"> </el-table-column> <el-table-column label="è¿ä¿®æ°é" align="center" prop="repairQty"> </el-table-column> <el-table-column label="å®é ä¸çº¿æ°é" align="center" prop="actualOnlineQty"> </el-table-column> <el-table-column label="éæ±æ¥æ" align="center" prop="demandDate" width="180"> </el-table-column> <el-table-column label="计åå¼å§æ¶é´" align="center" prop="planStartTime"> </el-table-column> <el-table-column label="计åç»ææ¶é´" align="center" prop="planEndTime"> </el-table-column> <el-table-column label="å®é å¼å§æ¶é´" align="center" prop="actualStartTime"> </el-table-column> <el-table-column label="å®é ç»ææ¶é´" align="center" prop="actualEndTime"> </el-table-column> <el-table-column label="顺åºå·" align="center" prop="serialNumber"> </el-table-column> <el-table-column label="å·¥åç¶æ" align="center" prop="orderStatus"> </el-table-column> <el-table-column label="å建æ¶é´" align="center" prop="createTime"> </el-table-column> <el-table-column label="æ´æ°æ¶é´" align="center" prop="updateTime"> </el-table-column> <el-table-column label="å建人" align="center" prop="createUser"> </el-table-column> <el-table-column label="ä¿®æ¹äºº" align="center" prop="updateUser"> </el-table-column> <el-table-column label="å¤æ³¨" align="center" prop="remarks"> </el-table-column> <el-table-column label="æµæ°´å·" align="center" prop="streamNumber"> </el-table-column> <el-table-column label="客æ·" align="center" prop="custom"> </el-table-column> <el-table-column label="å¸åºåºåç¼ç " align="center" prop="marketAreaCode"> </el-table-column> <el-table-column label="软件çæ¬ç¼ç " align="center" prop="softwareVersionCode"> </el-table-column> <el-table-column label="产åå ¬å¸ç¼ç " align="center" prop="productCompanyCode"> </el-table-column> <el-table-column label="æä½" align="center" class-name="small-padding fixed-width"> <template slot-scope="scope"> <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['om:productionOrde:edit']" >ä¿®æ¹</el-button> <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['om:productionOrde:remove']" >å é¤</el-button> </template> </el-table-column> </el-table> <pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" /> <!-- æ·»å æä¿®æ¹ç产工å对è¯æ¡ --> <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-form ref="form" :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-form-item> <el-form-item label="产åå称" prop="productName"> <el-input v-model="form.productName" placeholder="请è¾å ¥äº§åå称" /> </el-form-item> <el-form-item label="车é´ç¼å·" prop="workshopCode"> <el-input v-model="form.workshopCode" placeholder="请è¾å ¥è½¦é´ç¼å·" /> </el-form-item> <el-form-item label="产线ç¼å·" prop="lineCode"> <el-input v-model="form.lineCode" placeholder="请è¾å ¥äº§çº¿ç¼å·" /> </el-form-item> <el-form-item label="å·¥èºæµç¨" prop="routeCode"> <el-input v-model="form.routeCode" placeholder="请è¾å ¥å·¥èºæµç¨" /> </el-form-item> <el-form-item label="产åBOM" prop="bomCode"> <el-input v-model="form.bomCode" 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="actualQty"> <el-input v-model="form.actualQty" placeholder="请è¾å ¥å®é æ°é" /> </el-form-item> <el-form-item label="ä¸è¯æ°é" prop="badQty"> <el-input v-model="form.badQty" placeholder="请è¾å ¥ä¸è¯æ°é" /> </el-form-item> <el-form-item label="æ¥åºæ°é" prop="scrapQty"> <el-input v-model="form.scrapQty" placeholder="请è¾å ¥æ¥åºæ°é" /> </el-form-item> <el-form-item label="è¿ä¿®æ°é" prop="repairQty"> <el-input v-model="form.repairQty" placeholder="请è¾å ¥è¿ä¿®æ°é" /> </el-form-item> <el-form-item label="éæ±æ¥æ" prop="demandDate"> <el-date-picker clearable v-model="form.demandDate" type="date" value-format="yyyy-MM-dd" placeholder="请éæ©éæ±æ¥æ"> </el-date-picker> </el-form-item> <el-form-item label="顺åºå·" prop="serialNumber"> <el-input v-model="form.serialNumber" placeholder="请è¾å ¥é¡ºåºå·" /> </el-form-item> <!-- <el-form-item label="å·¥åç¶æ" prop="orderStatus">--> <!-- <el-radio-group v-model="form.orderStatus">--> <!-- <el-radio--> <!-- v-for="dict in dict.type.${dictType}"--> <!-- :key="dict.value"--> <!-- :label="dict.value"--> <!-- >{{dict.label}}</el-radio>--> <!-- </el-radio-group>--> <!-- </el-form-item>--> <el-form-item label="å¤æ³¨" prop="remarks"> <el-input v-model="form.remarks" placeholder="请è¾å ¥å¤æ³¨" /> </el-form-item> <el-form-item label="æµæ°´å·" prop="streamNumber"> <el-input v-model="form.streamNumber" placeholder="请è¾å ¥æµæ°´å·" /> </el-form-item> <el-form-item label="客æ·" prop="custom"> <el-input v-model="form.custom" placeholder="请è¾å ¥å®¢æ·" /> </el-form-item> <el-form-item label="å¸åºåºåç¼ç " prop="marketAreaCode"> <el-input v-model="form.marketAreaCode" placeholder="请è¾å ¥å¸åºåºåç¼ç " /> </el-form-item> <el-form-item label="软件çæ¬ç¼ç " prop="softwareVersionCode"> <el-input v-model="form.softwareVersionCode" placeholder="请è¾å ¥è½¯ä»¶çæ¬ç¼ç " /> </el-form-item> <el-form-item label="产åå ¬å¸ç¼ç " prop="productCompanyCode"> <el-input v-model="form.productCompanyCode" placeholder="请è¾å ¥äº§åå ¬å¸ç¼ç " /> </el-form-item> </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> </div> </template> <script> import { listProductionOrde, getProductionOrde, delProductionOrde, addProductionOrde, updateProductionOrde } from "@/api/main/om/productionOrde/productionOrde"; export default { name: "ProductionOrde", data() { return { // é®ç½©å± loading: true, // éä¸æ°ç» ids: [], // éå个ç¦ç¨ single: true, // éå¤ä¸ªç¦ç¨ multiple: true, // æ¾ç¤ºæç´¢æ¡ä»¶ showSearch: true, // æ»æ¡æ° total: 0, // ç产工åè¡¨æ ¼æ°æ® productionOrdeList: [], // å¼¹åºå±æ é¢ title: "", // æ¯å¦æ¾ç¤ºå¼¹åºå± open: 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: null, custom: null, marketAreaCode: null, softwareVersionCode: null, productCompanyCode: null, }, // 表ååæ° form: {}, // 表åæ ¡éª rules: { id: [ { required: true, message: "IDä¸è½ä¸ºç©º", trigger: "blur" } ], } }; }, created() { this.getList(); }, methods: { /** æ¥è¯¢ç产工åå表 */ 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.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, spareField4: 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.single = selection.length!==1 this.multiple = !selection.length }, /** æ°å¢æé®æä½ */ handleAdd() { this.reset(); this.open = true; this.title = "æ·»å ç产工å"; }, /** ä¿®æ¹æé®æä½ */ handleUpdate(row) { this.reset(); const id = row.id || this.ids getProductionOrde(id).then(response => { this.form = response.data; this.open = true; this.title = "ä¿®æ¹ç产工å"; }); }, /** æ交æé® */ 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(); }); } } }); }, /** å é¤æé®æä½ */ 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>