jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/controller/BsOrderSchedulingController.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/domain/BsOrderScheduling.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/mapper/BsOrderSchedulingMapper.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/service/IBsOrderSchedulingService.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/service/impl/BsOrderSchedulingServiceImpl.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
jcdm-main/src/main/resources/mapper/bs/orderScheduling/BsOrderSchedulingMapper.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
jcdm-ui/src/api/main/bs/orderScheduling/orderScheduling.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
jcdm-ui/src/views/main/bs/orderScheduling/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/controller/BsOrderSchedulingController.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,104 @@ package com.jcdm.main.bs.orderScheduling.controller; import java.util.List; import javax.servlet.http.HttpServletResponse; 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.main.bs.orderScheduling.domain.BsOrderScheduling; import com.jcdm.main.bs.orderScheduling.service.IBsOrderSchedulingService; import com.jcdm.common.utils.poi.ExcelUtil; import com.jcdm.common.core.page.TableDataInfo; /** * 订åæ产Controller * * @author jiang * @date 2024-01-09 */ @RestController @RequestMapping("/bs/orderScheduling") public class BsOrderSchedulingController extends BaseController { @Autowired private IBsOrderSchedulingService bsOrderSchedulingService; /** * æ¥è¯¢è®¢åæ产å表 */ @PreAuthorize("@ss.hasPermi('bs:orderScheduling:list')") @GetMapping("/list") public TableDataInfo list(BsOrderScheduling bsOrderScheduling) { startPage(); List<BsOrderScheduling> list = bsOrderSchedulingService.selectBsOrderSchedulingList(bsOrderScheduling); return getDataTable(list); } /** * 导åºè®¢åæ产å表 */ @PreAuthorize("@ss.hasPermi('bs:orderScheduling:export')") @Log(title = "订åæ产", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(HttpServletResponse response, BsOrderScheduling bsOrderScheduling) { List<BsOrderScheduling> list = bsOrderSchedulingService.selectBsOrderSchedulingList(bsOrderScheduling); ExcelUtil<BsOrderScheduling> util = new ExcelUtil<BsOrderScheduling>(BsOrderScheduling.class); util.exportExcel(response, list, "订åæ产æ°æ®"); } /** * è·å订åæ产详ç»ä¿¡æ¯ */ @PreAuthorize("@ss.hasPermi('bs:orderScheduling:query')") @GetMapping(value = "/{orderNumber}") public AjaxResult getInfo(@PathVariable("orderNumber") String orderNumber) { return success(bsOrderSchedulingService.selectBsOrderSchedulingByOrderNumber(orderNumber)); } /** * æ°å¢è®¢åæ产 */ @PreAuthorize("@ss.hasPermi('bs:orderScheduling:add')") @Log(title = "订åæ产", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@RequestBody BsOrderScheduling bsOrderScheduling) { return toAjax(bsOrderSchedulingService.insertBsOrderScheduling(bsOrderScheduling)); } /** * ä¿®æ¹è®¢åæ产 */ @PreAuthorize("@ss.hasPermi('bs:orderScheduling:edit')") @Log(title = "订åæ产", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@RequestBody BsOrderScheduling bsOrderScheduling) { return toAjax(bsOrderSchedulingService.updateBsOrderScheduling(bsOrderScheduling)); } /** * å é¤è®¢åæ产 */ @PreAuthorize("@ss.hasPermi('bs:orderScheduling:remove')") @Log(title = "订åæ产", businessType = BusinessType.DELETE) @DeleteMapping("/{orderNumbers}") public AjaxResult remove(@PathVariable String[] orderNumbers) { return toAjax(bsOrderSchedulingService.deleteBsOrderSchedulingByOrderNumbers(orderNumbers)); } } jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/domain/BsOrderScheduling.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,234 @@ package com.jcdm.main.bs.orderScheduling.domain; 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; /** * 订åæ产对象 bs_order_scheduling * * @author jiang * @date 2024-01-09 */ public class BsOrderScheduling extends BaseEntity { private static final long serialVersionUID = 1L; /** 订åç¼å· */ @Excel(name = "订åç¼å·") private String orderNumber; /** åå¨æºå· */ @Excel(name = "åå¨æºå·") private String engineNo; /** 产åç±»å */ @Excel(name = "产åç±»å") private String productType; /** æºå */ @Excel(name = "æºå") private String model; /** ç产ç¶æ */ @Excel(name = "ç产ç¶æ") private String productionStatus; /** å·¥æ¶ */ @Excel(name = "å·¥æ¶") private String workingHours; /** å½åå·¥ä½ */ @Excel(name = "å½åå·¥ä½") private String currentWorkstation; /** è´¨éç¶æ */ @Excel(name = "è´¨éç¶æ") private String qualityStatus; /** æ¯å¦æå° */ @Excel(name = "æ¯å¦æå°") private String whetherOrPrint; /** 10æ¥å·¥ */ @Excel(name = "10æ¥å·¥") private String report10; /** 20æ¥å·¥ */ @Excel(name = "20æ¥å·¥") private String report20; /** åç®±ä¸çº¿ */ @Excel(name = "åç®±ä¸çº¿") private String combinedBoxLaunch; /** æ»è£ ä¸çº¿ */ @Excel(name = "æ»è£ ä¸çº¿") private String finalAssemblyOffline; /** æä½äºº */ @Excel(name = "æä½äºº") private String operator; /** æä½æ¶é´ */ @Excel(name = "æä½æ¶é´") private String operateTime; public void setOrderNumber(String orderNumber) { this.orderNumber = orderNumber; } public String getOrderNumber() { return orderNumber; } public void setEngineNo(String engineNo) { this.engineNo = engineNo; } public String getEngineNo() { return engineNo; } public void setProductType(String productType) { this.productType = productType; } public String getProductType() { return productType; } public void setModel(String model) { this.model = model; } public String getModel() { return model; } public void setProductionStatus(String productionStatus) { this.productionStatus = productionStatus; } public String getProductionStatus() { return productionStatus; } public void setWorkingHours(String workingHours) { this.workingHours = workingHours; } public String getWorkingHours() { return workingHours; } public void setCurrentWorkstation(String currentWorkstation) { this.currentWorkstation = currentWorkstation; } public String getCurrentWorkstation() { return currentWorkstation; } public void setQualityStatus(String qualityStatus) { this.qualityStatus = qualityStatus; } public String getQualityStatus() { return qualityStatus; } public void setWhetherOrPrint(String whetherOrPrint) { this.whetherOrPrint = whetherOrPrint; } public String getWhetherOrPrint() { return whetherOrPrint; } public void setReport10(String report10) { this.report10 = report10; } public String getReport10() { return report10; } public void setReport20(String report20) { this.report20 = report20; } public String getReport20() { return report20; } public void setCombinedBoxLaunch(String combinedBoxLaunch) { this.combinedBoxLaunch = combinedBoxLaunch; } public String getCombinedBoxLaunch() { return combinedBoxLaunch; } public void setFinalAssemblyOffline(String finalAssemblyOffline) { this.finalAssemblyOffline = finalAssemblyOffline; } public String getFinalAssemblyOffline() { return finalAssemblyOffline; } public void setOperator(String operator) { this.operator = operator; } public String getOperator() { return operator; } public void setOperateTime(String operateTime) { this.operateTime = operateTime; } public String getOperateTime() { return operateTime; } @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) .append("orderNumber", getOrderNumber()) .append("engineNo", getEngineNo()) .append("productType", getProductType()) .append("model", getModel()) .append("productionStatus", getProductionStatus()) .append("workingHours", getWorkingHours()) .append("currentWorkstation", getCurrentWorkstation()) .append("qualityStatus", getQualityStatus()) .append("whetherOrPrint", getWhetherOrPrint()) .append("report10", getReport10()) .append("report20", getReport20()) .append("combinedBoxLaunch", getCombinedBoxLaunch()) .append("finalAssemblyOffline", getFinalAssemblyOffline()) .append("operator", getOperator()) .append("operateTime", getOperateTime()) .toString(); } } jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/mapper/BsOrderSchedulingMapper.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,61 @@ package com.jcdm.main.bs.orderScheduling.mapper; import java.util.List; import com.jcdm.main.bs.orderScheduling.domain.BsOrderScheduling; /** * 订åæ产Mapperæ¥å£ * * @author jiang * @date 2024-01-09 */ public interface BsOrderSchedulingMapper { /** * æ¥è¯¢è®¢åæ产 * * @param orderNumber 订åæäº§ä¸»é® * @return 订åæ产 */ public BsOrderScheduling selectBsOrderSchedulingByOrderNumber(String orderNumber); /** * æ¥è¯¢è®¢åæ产å表 * * @param bsOrderScheduling 订åæ产 * @return 订åæ产éå */ public List<BsOrderScheduling> selectBsOrderSchedulingList(BsOrderScheduling bsOrderScheduling); /** * æ°å¢è®¢åæ产 * * @param bsOrderScheduling 订åæ产 * @return ç»æ */ public int insertBsOrderScheduling(BsOrderScheduling bsOrderScheduling); /** * ä¿®æ¹è®¢åæ产 * * @param bsOrderScheduling 订åæ产 * @return ç»æ */ public int updateBsOrderScheduling(BsOrderScheduling bsOrderScheduling); /** * å é¤è®¢åæ产 * * @param orderNumber 订åæäº§ä¸»é® * @return ç»æ */ public int deleteBsOrderSchedulingByOrderNumber(String orderNumber); /** * æ¹éå é¤è®¢åæ产 * * @param orderNumbers éè¦å é¤çæ°æ®ä¸»é®éå * @return ç»æ */ public int deleteBsOrderSchedulingByOrderNumbers(String[] orderNumbers); } jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/service/IBsOrderSchedulingService.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,61 @@ package com.jcdm.main.bs.orderScheduling.service; import java.util.List; import com.jcdm.main.bs.orderScheduling.domain.BsOrderScheduling; /** * 订åæ产Serviceæ¥å£ * * @author jiang * @date 2024-01-09 */ public interface IBsOrderSchedulingService { /** * æ¥è¯¢è®¢åæ产 * * @param orderNumber 订åæäº§ä¸»é® * @return 订åæ产 */ public BsOrderScheduling selectBsOrderSchedulingByOrderNumber(String orderNumber); /** * æ¥è¯¢è®¢åæ产å表 * * @param bsOrderScheduling 订åæ产 * @return 订åæ产éå */ public List<BsOrderScheduling> selectBsOrderSchedulingList(BsOrderScheduling bsOrderScheduling); /** * æ°å¢è®¢åæ产 * * @param bsOrderScheduling 订åæ产 * @return ç»æ */ public int insertBsOrderScheduling(BsOrderScheduling bsOrderScheduling); /** * ä¿®æ¹è®¢åæ产 * * @param bsOrderScheduling 订åæ产 * @return ç»æ */ public int updateBsOrderScheduling(BsOrderScheduling bsOrderScheduling); /** * æ¹éå é¤è®¢åæ产 * * @param orderNumbers éè¦å é¤ç订åæ产主é®éå * @return ç»æ */ public int deleteBsOrderSchedulingByOrderNumbers(String[] orderNumbers); /** * å é¤è®¢åæäº§ä¿¡æ¯ * * @param orderNumber 订åæäº§ä¸»é® * @return ç»æ */ public int deleteBsOrderSchedulingByOrderNumber(String orderNumber); } jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/service/impl/BsOrderSchedulingServiceImpl.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,93 @@ package com.jcdm.main.bs.orderScheduling.service.impl; import java.util.List; 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; /** * 订åæ产Serviceä¸å¡å±å¤ç * * @author jiang * @date 2024-01-09 */ @Service public class BsOrderSchedulingServiceImpl implements IBsOrderSchedulingService { @Autowired private BsOrderSchedulingMapper bsOrderSchedulingMapper; /** * æ¥è¯¢è®¢åæ产 * * @param orderNumber 订åæäº§ä¸»é® * @return 订åæ产 */ @Override public BsOrderScheduling selectBsOrderSchedulingByOrderNumber(String orderNumber) { return bsOrderSchedulingMapper.selectBsOrderSchedulingByOrderNumber(orderNumber); } /** * æ¥è¯¢è®¢åæ产å表 * * @param bsOrderScheduling 订åæ产 * @return 订åæ产 */ @Override public List<BsOrderScheduling> selectBsOrderSchedulingList(BsOrderScheduling bsOrderScheduling) { return bsOrderSchedulingMapper.selectBsOrderSchedulingList(bsOrderScheduling); } /** * æ°å¢è®¢åæ产 * * @param bsOrderScheduling 订åæ产 * @return ç»æ */ @Override public int insertBsOrderScheduling(BsOrderScheduling bsOrderScheduling) { return bsOrderSchedulingMapper.insertBsOrderScheduling(bsOrderScheduling); } /** * ä¿®æ¹è®¢åæ产 * * @param bsOrderScheduling 订åæ产 * @return ç»æ */ @Override public int updateBsOrderScheduling(BsOrderScheduling bsOrderScheduling) { return bsOrderSchedulingMapper.updateBsOrderScheduling(bsOrderScheduling); } /** * æ¹éå é¤è®¢åæ产 * * @param orderNumbers éè¦å é¤ç订åæäº§ä¸»é® * @return ç»æ */ @Override public int deleteBsOrderSchedulingByOrderNumbers(String[] orderNumbers) { return bsOrderSchedulingMapper.deleteBsOrderSchedulingByOrderNumbers(orderNumbers); } /** * å é¤è®¢åæäº§ä¿¡æ¯ * * @param orderNumber 订åæäº§ä¸»é® * @return ç»æ */ @Override public int deleteBsOrderSchedulingByOrderNumber(String orderNumber) { return bsOrderSchedulingMapper.deleteBsOrderSchedulingByOrderNumber(orderNumber); } } jcdm-main/src/main/resources/mapper/bs/orderScheduling/BsOrderSchedulingMapper.xml
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,124 @@ <?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.bs.orderScheduling.mapper.BsOrderSchedulingMapper"> <resultMap type="BsOrderScheduling" id="BsOrderSchedulingResult"> <result property="orderNumber" column="order_number" /> <result property="engineNo" column="engine_no" /> <result property="productType" column="product_type" /> <result property="model" column="model" /> <result property="productionStatus" column="production_status" /> <result property="workingHours" column="working_hours" /> <result property="currentWorkstation" column="current_workstation" /> <result property="qualityStatus" column="quality_status" /> <result property="whetherOrPrint" column="whether_or_print" /> <result property="report10" column="report_10" /> <result property="report20" column="report_20" /> <result property="combinedBoxLaunch" column="combined_box_launch" /> <result property="finalAssemblyOffline" column="final_assembly_offline" /> <result property="operator" column="operator" /> <result property="operateTime" column="operate_time" /> </resultMap> <sql id="selectBsOrderSchedulingVo"> select order_number, engine_no, product_type, model, production_status, working_hours, current_workstation, quality_status, whether_or_print, report_10, report_20, combined_box_launch, final_assembly_offline, operator, operate_time from bs_order_scheduling </sql> <select id="selectBsOrderSchedulingList" parameterType="BsOrderScheduling" resultMap="BsOrderSchedulingResult"> <include refid="selectBsOrderSchedulingVo"/> <where> <if test="orderNumber != null and orderNumber != ''"> and order_number = #{orderNumber}</if> <if test="engineNo != null and engineNo != ''"> and engine_no = #{engineNo}</if> <if test="productType != null and productType != ''"> and product_type = #{productType}</if> <if test="model != null and model != ''"> and model = #{model}</if> <if test="productionStatus != null and productionStatus != ''"> and production_status = #{productionStatus}</if> <if test="workingHours != null and workingHours != ''"> and working_hours = #{workingHours}</if> <if test="currentWorkstation != null and currentWorkstation != ''"> and current_workstation = #{currentWorkstation}</if> <if test="qualityStatus != null and qualityStatus != ''"> and quality_status = #{qualityStatus}</if> <if test="whetherOrPrint != null and whetherOrPrint != ''"> and whether_or_print = #{whetherOrPrint}</if> <if test="report10 != null and report10 != ''"> and report_10 = #{report10}</if> <if test="report20 != null and report20 != ''"> and report_20 = #{report20}</if> <if test="combinedBoxLaunch != null and combinedBoxLaunch != ''"> and combined_box_launch = #{combinedBoxLaunch}</if> <if test="finalAssemblyOffline != null and finalAssemblyOffline != ''"> and final_assembly_offline = #{finalAssemblyOffline}</if> <if test="operator != null and operator != ''"> and operator = #{operator}</if> <if test="operateTime != null and operateTime != ''"> and operate_time = #{operateTime}</if> </where> </select> <select id="selectBsOrderSchedulingByOrderNumber" parameterType="String" resultMap="BsOrderSchedulingResult"> <include refid="selectBsOrderSchedulingVo"/> where order_number = #{orderNumber} </select> <insert id="insertBsOrderScheduling" parameterType="BsOrderScheduling"> insert into bs_order_scheduling <trim prefix="(" suffix=")" suffixOverrides=","> <if test="orderNumber != null">order_number,</if> <if test="engineNo != null">engine_no,</if> <if test="productType != null">product_type,</if> <if test="model != null">model,</if> <if test="productionStatus != null">production_status,</if> <if test="workingHours != null">working_hours,</if> <if test="currentWorkstation != null">current_workstation,</if> <if test="qualityStatus != null">quality_status,</if> <if test="whetherOrPrint != null">whether_or_print,</if> <if test="report10 != null">report_10,</if> <if test="report20 != null">report_20,</if> <if test="combinedBoxLaunch != null">combined_box_launch,</if> <if test="finalAssemblyOffline != null">final_assembly_offline,</if> <if test="operator != null">operator,</if> <if test="operateTime != null">operate_time,</if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="orderNumber != null">#{orderNumber},</if> <if test="engineNo != null">#{engineNo},</if> <if test="productType != null">#{productType},</if> <if test="model != null">#{model},</if> <if test="productionStatus != null">#{productionStatus},</if> <if test="workingHours != null">#{workingHours},</if> <if test="currentWorkstation != null">#{currentWorkstation},</if> <if test="qualityStatus != null">#{qualityStatus},</if> <if test="whetherOrPrint != null">#{whetherOrPrint},</if> <if test="report10 != null">#{report10},</if> <if test="report20 != null">#{report20},</if> <if test="combinedBoxLaunch != null">#{combinedBoxLaunch},</if> <if test="finalAssemblyOffline != null">#{finalAssemblyOffline},</if> <if test="operator != null">#{operator},</if> <if test="operateTime != null">#{operateTime},</if> </trim> </insert> <update id="updateBsOrderScheduling" parameterType="BsOrderScheduling"> update bs_order_scheduling <trim prefix="SET" suffixOverrides=","> <if test="engineNo != null">engine_no = #{engineNo},</if> <if test="productType != null">product_type = #{productType},</if> <if test="model != null">model = #{model},</if> <if test="productionStatus != null">production_status = #{productionStatus},</if> <if test="workingHours != null">working_hours = #{workingHours},</if> <if test="currentWorkstation != null">current_workstation = #{currentWorkstation},</if> <if test="qualityStatus != null">quality_status = #{qualityStatus},</if> <if test="whetherOrPrint != null">whether_or_print = #{whetherOrPrint},</if> <if test="report10 != null">report_10 = #{report10},</if> <if test="report20 != null">report_20 = #{report20},</if> <if test="combinedBoxLaunch != null">combined_box_launch = #{combinedBoxLaunch},</if> <if test="finalAssemblyOffline != null">final_assembly_offline = #{finalAssemblyOffline},</if> <if test="operator != null">operator = #{operator},</if> <if test="operateTime != null">operate_time = #{operateTime},</if> </trim> where order_number = #{orderNumber} </update> <delete id="deleteBsOrderSchedulingByOrderNumber" parameterType="String"> delete from bs_order_scheduling where order_number = #{orderNumber} </delete> <delete id="deleteBsOrderSchedulingByOrderNumbers" parameterType="String"> delete from bs_order_scheduling where order_number in <foreach item="orderNumber" collection="array" open="(" separator="," close=")"> #{orderNumber} </foreach> </delete> </mapper> jcdm-ui/src/api/main/bs/orderScheduling/orderScheduling.js
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,44 @@ import request from '@/utils/request' // æ¥è¯¢è®¢åæ产å表 export function listOrderScheduling(query) { return request({ url: '/bs/orderScheduling/list', method: 'get', params: query }) } // æ¥è¯¢è®¢åæäº§è¯¦ç» export function getOrderScheduling(orderNumber) { return request({ url: '/bs/orderScheduling/' + orderNumber, method: 'get' }) } // æ°å¢è®¢åæ产 export function addOrderScheduling(data) { return request({ url: '/bs/orderScheduling', method: 'post', data: data }) } // ä¿®æ¹è®¢åæ产 export function updateOrderScheduling(data) { return request({ url: '/bs/orderScheduling', method: 'put', data: data }) } // å é¤è®¢åæ产 export function delOrderScheduling(orderNumber) { return request({ url: '/bs/orderScheduling/' + orderNumber, method: 'delete' }) } jcdm-ui/src/views/main/bs/orderScheduling/index.vue
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,409 @@ <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="订åç¼å·" prop="orderNumber"> <el-input v-model="queryParams.orderNumber" placeholder="请è¾å ¥è®¢åç¼å·" clearable @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" placeholder="请è¾å ¥æºå" clearable @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> <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 style="float: right"> <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-card> <el-card style="margin-top: 10px" class="box-card"> <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="['bs:orderScheduling: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="['bs:orderScheduling: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="['bs:orderScheduling: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="['bs:orderScheduling:export']" >导åº</el-button> </el-col> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> </el-row> <el-table border v-loading="loading" :data="orderSchedulingList" @selection-change="handleSelectionChange"> <el-table-column type="selection" width="55" align="center" /> <el-table-column label="订åç¼å·" align="center" prop="orderNumber"> </el-table-column> <el-table-column label="åå¨æºå·" align="center" prop="engineNo"> </el-table-column> <el-table-column label="产åç±»å" align="center" prop="productType"> <!-- <template slot-scope="scope">--> <!-- <dict-tag :options="dict.type.${column.dictType}" :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"> </el-table-column> <el-table-column label="å·¥æ¶" align="center" prop="workingHours"> </el-table-column> <el-table-column label="å½åå·¥ä½" align="center" prop="currentWorkstation"> </el-table-column> <el-table-column label="è´¨éç¶æ" align="center" prop="qualityStatus"> </el-table-column> <el-table-column label="æ¯å¦æå°" align="center" prop="whetherOrPrint"> </el-table-column> <el-table-column label="10æ¥å·¥" align="center" prop="report10"> </el-table-column> <el-table-column label="20æ¥å·¥" align="center" prop="report20"> </el-table-column> <el-table-column label="åç®±ä¸çº¿" align="center" prop="combinedBoxLaunch"> </el-table-column> <el-table-column label="æ»è£ ä¸çº¿" align="center" prop="finalAssemblyOffline"> </el-table-column> <el-table-column label="æä½äºº" align="center" prop="operator"> </el-table-column> <el-table-column label="æä½æ¶é´" align="center" prop="operateTime"> </el-table-column> <el-table-column fixed="right" width="200" label="æä½" align="center" class-name="small-padding fixed-width"> <template slot-scope="scope"> <el-button size="mini" type="success" plain style="width: 72px" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['bs:orderScheduling:edit']" >ä¿®æ¹</el-button> <el-button size="mini" type="danger" plain style="width: 72px" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['bs:orderScheduling:remove']" >å é¤</el-button> </template> </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="500px" append-to-body> <span slot="title"> <i class="el-icon-s-order"></i> {{titleName}} </span> <el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form-item label="订åç¼å·" prop="orderNumber"> <el-input v-model="form.orderNumber" placeholder="请è¾å ¥è®¢åç¼å·" /> </el-form-item> <el-form-item label="åå¨æºå·" prop="engineNo"> <el-input v-model="form.engineNo" placeholder="请è¾å ¥åå¨æºå·" /> </el-form-item> <el-form-item label="æºå" prop="model"> <el-input v-model="form.model" placeholder="请è¾å ¥æºå" /> </el-form-item> <el-form-item label="å·¥æ¶" prop="workingHours"> <el-input v-model="form.workingHours" placeholder="请è¾å ¥å·¥æ¶" /> </el-form-item> <el-form-item label="å½åå·¥ä½" prop="currentWorkstation"> <el-input v-model="form.currentWorkstation" placeholder="请è¾å ¥å½åå·¥ä½" /> </el-form-item> <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> <el-form-item label="20æ¥å·¥" prop="report20"> <el-input v-model="form.report20" placeholder="请è¾å ¥20æ¥å·¥" /> </el-form-item> <el-form-item label="æä½äºº" prop="operator"> <el-input v-model="form.operator" 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 { listOrderScheduling, getOrderScheduling, delOrderScheduling, addOrderScheduling, updateOrderScheduling } from "@/api/main/bs/orderScheduling/orderScheduling"; export default { name: "OrderScheduling", data() { return { // é®ç½©å± loading: true, titleName: "", // éä¸æ°ç» ids: [], // éå个ç¦ç¨ single: true, // éå¤ä¸ªç¦ç¨ multiple: true, // æ¾ç¤ºæç´¢æ¡ä»¶ showSearch: true, // æ»æ¡æ° total: 0, // 订åæäº§è¡¨æ ¼æ°æ® orderSchedulingList: [], // å¼¹åºå±æ é¢ title: "", // æ¯å¦æ¾ç¤ºå¼¹åºå± open: false, // æ¥è¯¢åæ° queryParams: { pageNum: 1, pageSize: 10, orderNumber: null, engineNo: null, productType: null, model: null, productionStatus: null, workingHours: null, currentWorkstation: null, qualityStatus: null, whetherOrPrint: null, report10: null, report20: null, combinedBoxLaunch: null, finalAssemblyOffline: null, operator: null, operateTime: null }, // 表ååæ° form: {}, // 表åæ ¡éª rules: { } }; }, created() { this.getList(); }, methods: { /** æ¥è¯¢è®¢åæ产å表 */ getList() { this.loading = true; listOrderScheduling(this.queryParams).then(response => { this.orderSchedulingList = response.rows; this.total = response.total; this.loading = false; }); }, // åæ¶æé® cancel() { this.open = false; this.reset(); }, // 表åéç½® reset() { this.form = { orderNumber: null, engineNo: null, productType: null, model: null, productionStatus: null, workingHours: null, currentWorkstation: null, qualityStatus: null, whetherOrPrint: null, report10: null, report20: null, combinedBoxLaunch: null, finalAssemblyOffline: null, operator: null, operateTime: 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.orderNumber) this.single = selection.length!==1 this.multiple = !selection.length }, /** æ°å¢æé®æä½ */ handleAdd() { this.reset(); this.open = true; this.titleName = "æ·»å 订åæ产"; }, /** ä¿®æ¹æé®æä½ */ handleUpdate(row) { this.reset(); const orderNumber = row.orderNumber || this.ids getOrderScheduling(orderNumber).then(response => { this.form = response.data; this.open = true; this.titleName = "ä¿®æ¹è®¢åæ产"; }); }, /** æ交æé® */ submitForm() { this.$refs["form"].validate(valid => { if (valid) { if (this.form.orderNumber != null) { updateOrderScheduling(this.form).then(response => { this.$modal.msgSuccess("ä¿®æ¹æå"); this.open = false; this.getList(); }); } else { addOrderScheduling(this.form).then(response => { this.$modal.msgSuccess("æ°å¢æå"); this.open = false; this.getList(); }); } } }); }, /** å é¤æé®æä½ */ handleDelete(row) { const orderNumbers = row.orderNumber || this.ids; this.$modal.confirm('æ¯å¦ç¡®è®¤å é¤è®¢åæ产ç¼å·ä¸º"' + orderNumbers + '"çæ°æ®é¡¹ï¼').then(function() { return delOrderScheduling(orderNumbers); }).then(() => { this.getList(); this.$modal.msgSuccess("å é¤æå"); }).catch(() => {}); }, /** 导åºæé®æä½ */ handleExport() { this.download('bs/orderScheduling/export', { ...this.queryParams }, `orderScheduling_${new Date().getTime()}.xlsx`) } } }; </script>