| | |
| | | @Excel(name = "æ´æ¹ç¨æ·") |
| | | private String updateUser; |
| | | |
| | | @Excel(name = "车é´å称") |
| | | private String workshopName; |
| | | @Excel(name = "ç¶æ") |
| | | private String status; |
| | | |
| | | public void setId(Long id) |
| | | { |
| | | this.id = id; |
| | |
| | | { |
| | | return lineName; |
| | | } |
| | | public void setWorkshopName(String workshopName) |
| | | { |
| | | this.workshopName = workshopName; |
| | | } |
| | | |
| | | public String getWorkshopName() |
| | | { |
| | | return workshopName; |
| | | } |
| | | public void setWorkshopCode(String workshopCode) |
| | | { |
| | | this.workshopCode = workshopCode; |
| | |
| | | public String getWorkCalendar() |
| | | { |
| | | return workCalendar; |
| | | } |
| | | public void setStatus(String status) |
| | | { |
| | | this.status = status; |
| | | } |
| | | |
| | | public String getStatus() |
| | | { |
| | | return status; |
| | | } |
| | | public void setSpareField1(String spareField1) |
| | | { |
| | |
| | | .append("createTime", getCreateTime()) |
| | | .append("updateUser", getUpdateUser()) |
| | | .append("updateTime", getUpdateTime()) |
| | | .append("workshopName", getWorkshopName()) |
| | | .append("status", getStatus()) |
| | | .toString(); |
| | | } |
| | | } |
| | |
| | | @Excel(name = "æ´æ°äºº") |
| | | private String updateUser; |
| | | |
| | | @Excel(name = "ç¶æ") |
| | | private String status; |
| | | |
| | | public void setId(Long id) |
| | | { |
| | | this.id = id; |
| | |
| | | { |
| | | return spareField2; |
| | | } |
| | | public void setStatus(String status) |
| | | { |
| | | this.status = status; |
| | | } |
| | | public String getStatus() {return status;} |
| | | public void setRemarks(String remarks) |
| | | { |
| | | this.remarks = remarks; |
| | |
| | | .append("createTime", getCreateTime()) |
| | | .append("updateUser", getUpdateUser()) |
| | | .append("updateTime", getUpdateTime()) |
| | | .append("status", getStatus()) |
| | | .toString(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.rm.repairRecord.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.rm.repairRecord.domain.RmRepairRecord; |
| | | import com.jcdm.main.rm.repairRecord.service.IRmRepairRecordService; |
| | | import com.jcdm.common.utils.poi.ExcelUtil; |
| | | import com.jcdm.common.core.page.TableDataInfo; |
| | | |
| | | /** |
| | | * è¿ä¿®è®°å½Controller |
| | | * |
| | | * @author Yi |
| | | * @date 2023-12-22 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/rm/repairRecord") |
| | | public class RmRepairRecordController extends BaseController |
| | | { |
| | | @Autowired |
| | | private IRmRepairRecordService rmRepairRecordService; |
| | | |
| | | /** |
| | | * æ¥è¯¢è¿ä¿®è®°å½å表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('rm:repairRecord:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(RmRepairRecord rmRepairRecord) |
| | | { |
| | | startPage(); |
| | | List<RmRepairRecord> list = rmRepairRecordService.selectRmRepairRecordList(rmRepairRecord); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 导åºè¿ä¿®è®°å½å表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('rm:repairRecord:export')") |
| | | @Log(title = "è¿ä¿®è®°å½", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, RmRepairRecord rmRepairRecord) |
| | | { |
| | | List<RmRepairRecord> list = rmRepairRecordService.selectRmRepairRecordList(rmRepairRecord); |
| | | ExcelUtil<RmRepairRecord> util = new ExcelUtil<RmRepairRecord>(RmRepairRecord.class); |
| | | util.exportExcel(response, list, "è¿ä¿®è®°å½æ°æ®"); |
| | | } |
| | | |
| | | /** |
| | | * è·åè¿ä¿®è®°å½è¯¦ç»ä¿¡æ¯ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('rm:repairRecord:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) |
| | | { |
| | | return success(rmRepairRecordService.selectRmRepairRecordById(id)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢è¿ä¿®è®°å½ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('rm:repairRecord:add')") |
| | | @Log(title = "è¿ä¿®è®°å½", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody RmRepairRecord rmRepairRecord) |
| | | { |
| | | return toAjax(rmRepairRecordService.insertRmRepairRecord(rmRepairRecord)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹è¿ä¿®è®°å½ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('rm:repairRecord:edit')") |
| | | @Log(title = "è¿ä¿®è®°å½", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody RmRepairRecord rmRepairRecord) |
| | | { |
| | | return toAjax(rmRepairRecordService.updateRmRepairRecord(rmRepairRecord)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤è¿ä¿®è®°å½ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('rm:repairRecord:remove')") |
| | | @Log(title = "è¿ä¿®è®°å½", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | | { |
| | | return toAjax(rmRepairRecordService.deleteRmRepairRecordByIds(ids)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.rm.repairRecord.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; |
| | | |
| | | /** |
| | | * è¿ä¿®è®°å½å¯¹è±¡ rm_repair_record |
| | | * |
| | | * @author Yi |
| | | * @date 2023-12-22 |
| | | */ |
| | | public class RmRepairRecord extends BaseEntity |
| | | { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** 主é®id */ |
| | | private Long id; |
| | | |
| | | /** æ»æç¼ç */ |
| | | @Excel(name = "æ»æç¼ç ") |
| | | private String snCode; |
| | | |
| | | /** è¿ä¿®æ è¯ */ |
| | | @Excel(name = "è¿ä¿®æ è¯") |
| | | private String repairIdentification; |
| | | |
| | | /** ç®±ä½ç¼ç */ |
| | | @Excel(name = "ç®±ä½ç¼ç ") |
| | | private String boxCode; |
| | | |
| | | /** å·¥åºç¼ç */ |
| | | @Excel(name = "å·¥åºç¼ç ") |
| | | private String processesCode; |
| | | |
| | | /** åç»æ */ |
| | | @Excel(name = "åç»æ") |
| | | private String originalResult; |
| | | |
| | | /** å建ç¨æ· */ |
| | | @Excel(name = "å建ç¨æ·") |
| | | private String createUser; |
| | | |
| | | /** æ´æ°ç¨æ· */ |
| | | @Excel(name = "æ´æ°ç¨æ·") |
| | | private String updateUser; |
| | | |
| | | /** è¿ä¿®ç»æ */ |
| | | @Excel(name = "è¿ä¿®ç»æ") |
| | | private String repairResults; |
| | | |
| | | /** ç¶æ */ |
| | | @Excel(name = "ç¶æ") |
| | | private String status; |
| | | |
| | | /** å¤æ³¨ */ |
| | | @Excel(name = "å¤æ³¨") |
| | | private String remarks; |
| | | |
| | | /** é¢çå段1 */ |
| | | @Excel(name = "é¢çå段1") |
| | | private String spareField1; |
| | | |
| | | /** é¢çå段2 */ |
| | | @Excel(name = "é¢çå段2") |
| | | private String spareField2; |
| | | |
| | | public void setId(Long id) |
| | | { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Long getId() |
| | | { |
| | | return id; |
| | | } |
| | | public void setSnCode(String snCode) |
| | | { |
| | | this.snCode = snCode; |
| | | } |
| | | |
| | | public String getSnCode() |
| | | { |
| | | return snCode; |
| | | } |
| | | public void setRepairIdentification(String repairIdentification) |
| | | { |
| | | this.repairIdentification = repairIdentification; |
| | | } |
| | | |
| | | public String getRepairIdentification() |
| | | { |
| | | return repairIdentification; |
| | | } |
| | | public void setBoxCode(String boxCode) |
| | | { |
| | | this.boxCode = boxCode; |
| | | } |
| | | |
| | | public String getBoxCode() |
| | | { |
| | | return boxCode; |
| | | } |
| | | public void setProcessesCode(String processesCode) |
| | | { |
| | | this.processesCode = processesCode; |
| | | } |
| | | |
| | | public String getProcessesCode() |
| | | { |
| | | return processesCode; |
| | | } |
| | | public void setOriginalResult(String originalResult) |
| | | { |
| | | this.originalResult = originalResult; |
| | | } |
| | | |
| | | public String getOriginalResult() |
| | | { |
| | | return originalResult; |
| | | } |
| | | 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 setRepairResults(String repairResults) |
| | | { |
| | | this.repairResults = repairResults; |
| | | } |
| | | |
| | | public String getRepairResults() |
| | | { |
| | | return repairResults; |
| | | } |
| | | public void setStatus(String status) |
| | | { |
| | | this.status = status; |
| | | } |
| | | |
| | | public String getStatus() |
| | | { |
| | | return status; |
| | | } |
| | | public void setRemarks(String remarks) |
| | | { |
| | | this.remarks = remarks; |
| | | } |
| | | |
| | | public String getRemarks() |
| | | { |
| | | return remarks; |
| | | } |
| | | 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; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
| | | .append("id", getId()) |
| | | .append("snCode", getSnCode()) |
| | | .append("repairIdentification", getRepairIdentification()) |
| | | .append("boxCode", getBoxCode()) |
| | | .append("processesCode", getProcessesCode()) |
| | | .append("originalResult", getOriginalResult()) |
| | | .append("createUser", getCreateUser()) |
| | | .append("createTime", getCreateTime()) |
| | | .append("updateTime", getUpdateTime()) |
| | | .append("updateUser", getUpdateUser()) |
| | | .append("repairResults", getRepairResults()) |
| | | .append("status", getStatus()) |
| | | .append("remarks", getRemarks()) |
| | | .append("spareField1", getSpareField1()) |
| | | .append("spareField2", getSpareField2()) |
| | | .toString(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.rm.repairRecord.mapper; |
| | | |
| | | import java.util.List; |
| | | import com.jcdm.main.rm.repairRecord.domain.RmRepairRecord; |
| | | |
| | | /** |
| | | * è¿ä¿®è®°å½Mapperæ¥å£ |
| | | * |
| | | * @author Yi |
| | | * @date 2023-12-22 |
| | | */ |
| | | public interface RmRepairRecordMapper |
| | | { |
| | | /** |
| | | * æ¥è¯¢è¿ä¿®è®°å½ |
| | | * |
| | | * @param id è¿ä¿®è®°å½ä¸»é® |
| | | * @return è¿ä¿®è®°å½ |
| | | */ |
| | | public RmRepairRecord selectRmRepairRecordById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢è¿ä¿®è®°å½å表 |
| | | * |
| | | * @param rmRepairRecord è¿ä¿®è®°å½ |
| | | * @return è¿ä¿®è®°å½éå |
| | | */ |
| | | public List<RmRepairRecord> selectRmRepairRecordList(RmRepairRecord rmRepairRecord); |
| | | |
| | | /** |
| | | * æ°å¢è¿ä¿®è®°å½ |
| | | * |
| | | * @param rmRepairRecord è¿ä¿®è®°å½ |
| | | * @return ç»æ |
| | | */ |
| | | public int insertRmRepairRecord(RmRepairRecord rmRepairRecord); |
| | | |
| | | /** |
| | | * ä¿®æ¹è¿ä¿®è®°å½ |
| | | * |
| | | * @param rmRepairRecord è¿ä¿®è®°å½ |
| | | * @return ç»æ |
| | | */ |
| | | public int updateRmRepairRecord(RmRepairRecord rmRepairRecord); |
| | | |
| | | /** |
| | | * å é¤è¿ä¿®è®°å½ |
| | | * |
| | | * @param id è¿ä¿®è®°å½ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteRmRepairRecordById(Long id); |
| | | |
| | | /** |
| | | * æ¹éå é¤è¿ä¿®è®°å½ |
| | | * |
| | | * @param ids éè¦å é¤çæ°æ®ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteRmRepairRecordByIds(Long[] ids); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.rm.repairRecord.service; |
| | | |
| | | import java.util.List; |
| | | import com.jcdm.main.rm.repairRecord.domain.RmRepairRecord; |
| | | |
| | | /** |
| | | * è¿ä¿®è®°å½Serviceæ¥å£ |
| | | * |
| | | * @author Yi |
| | | * @date 2023-12-22 |
| | | */ |
| | | public interface IRmRepairRecordService |
| | | { |
| | | /** |
| | | * æ¥è¯¢è¿ä¿®è®°å½ |
| | | * |
| | | * @param id è¿ä¿®è®°å½ä¸»é® |
| | | * @return è¿ä¿®è®°å½ |
| | | */ |
| | | public RmRepairRecord selectRmRepairRecordById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢è¿ä¿®è®°å½å表 |
| | | * |
| | | * @param rmRepairRecord è¿ä¿®è®°å½ |
| | | * @return è¿ä¿®è®°å½éå |
| | | */ |
| | | public List<RmRepairRecord> selectRmRepairRecordList(RmRepairRecord rmRepairRecord); |
| | | |
| | | /** |
| | | * æ°å¢è¿ä¿®è®°å½ |
| | | * |
| | | * @param rmRepairRecord è¿ä¿®è®°å½ |
| | | * @return ç»æ |
| | | */ |
| | | public int insertRmRepairRecord(RmRepairRecord rmRepairRecord); |
| | | |
| | | /** |
| | | * ä¿®æ¹è¿ä¿®è®°å½ |
| | | * |
| | | * @param rmRepairRecord è¿ä¿®è®°å½ |
| | | * @return ç»æ |
| | | */ |
| | | public int updateRmRepairRecord(RmRepairRecord rmRepairRecord); |
| | | |
| | | /** |
| | | * æ¹éå é¤è¿ä¿®è®°å½ |
| | | * |
| | | * @param ids éè¦å é¤çè¿ä¿®è®°å½ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteRmRepairRecordByIds(Long[] ids); |
| | | |
| | | /** |
| | | * å é¤è¿ä¿®è®°å½ä¿¡æ¯ |
| | | * |
| | | * @param id è¿ä¿®è®°å½ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteRmRepairRecordById(Long id); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.rm.repairRecord.service.impl; |
| | | |
| | | import java.util.List; |
| | | import com.jcdm.common.utils.DateUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import com.jcdm.main.rm.repairRecord.mapper.RmRepairRecordMapper; |
| | | import com.jcdm.main.rm.repairRecord.domain.RmRepairRecord; |
| | | import com.jcdm.main.rm.repairRecord.service.IRmRepairRecordService; |
| | | |
| | | /** |
| | | * è¿ä¿®è®°å½Serviceä¸å¡å±å¤ç |
| | | * |
| | | * @author Yi |
| | | * @date 2023-12-22 |
| | | */ |
| | | @Service |
| | | public class RmRepairRecordServiceImpl implements IRmRepairRecordService |
| | | { |
| | | @Autowired |
| | | private RmRepairRecordMapper rmRepairRecordMapper; |
| | | |
| | | /** |
| | | * æ¥è¯¢è¿ä¿®è®°å½ |
| | | * |
| | | * @param id è¿ä¿®è®°å½ä¸»é® |
| | | * @return è¿ä¿®è®°å½ |
| | | */ |
| | | @Override |
| | | public RmRepairRecord selectRmRepairRecordById(Long id) |
| | | { |
| | | return rmRepairRecordMapper.selectRmRepairRecordById(id); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢è¿ä¿®è®°å½å表 |
| | | * |
| | | * @param rmRepairRecord è¿ä¿®è®°å½ |
| | | * @return è¿ä¿®è®°å½ |
| | | */ |
| | | @Override |
| | | public List<RmRepairRecord> selectRmRepairRecordList(RmRepairRecord rmRepairRecord) |
| | | { |
| | | return rmRepairRecordMapper.selectRmRepairRecordList(rmRepairRecord); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢è¿ä¿®è®°å½ |
| | | * |
| | | * @param rmRepairRecord è¿ä¿®è®°å½ |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int insertRmRepairRecord(RmRepairRecord rmRepairRecord) |
| | | { |
| | | rmRepairRecord.setCreateTime(DateUtils.getNowDate()); |
| | | return rmRepairRecordMapper.insertRmRepairRecord(rmRepairRecord); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹è¿ä¿®è®°å½ |
| | | * |
| | | * @param rmRepairRecord è¿ä¿®è®°å½ |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int updateRmRepairRecord(RmRepairRecord rmRepairRecord) |
| | | { |
| | | rmRepairRecord.setUpdateTime(DateUtils.getNowDate()); |
| | | return rmRepairRecordMapper.updateRmRepairRecord(rmRepairRecord); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤è¿ä¿®è®°å½ |
| | | * |
| | | * @param ids éè¦å é¤çè¿ä¿®è®°å½ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteRmRepairRecordByIds(Long[] ids) |
| | | { |
| | | return rmRepairRecordMapper.deleteRmRepairRecordByIds(ids); |
| | | } |
| | | |
| | | /** |
| | | * å é¤è¿ä¿®è®°å½ä¿¡æ¯ |
| | | * |
| | | * @param id è¿ä¿®è®°å½ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteRmRepairRecordById(Long id) |
| | | { |
| | | return rmRepairRecordMapper.deleteRmRepairRecordById(id); |
| | | } |
| | | } |
| | |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="updateUser" column="update_user" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="workshopName" column="workshop_name" /> |
| | | <result property="status" column="status" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectBsLineInfoVo"> |
| | | select id, line_code, line_name, workshop_code, work_calendar, spare_field_1, spare_field_2, remarks, create_user, create_time, update_user, update_time from bs_line_info |
| | | select id, line_code, line_name, workshop_code, work_calendar, spare_field_1, spare_field_2, remarks, create_user, create_time, update_user, update_time,workshop_name,status from bs_line_info |
| | | </sql> |
| | | |
| | | <select id="selectBsLineInfoList" parameterType="BsLineInfo" resultMap="BsLineInfoResult"> |
| | |
| | | <if test="createTime != null">create_time,</if> |
| | | <if test="updateUser != null">update_user,</if> |
| | | <if test="updateTime != null">update_time,</if> |
| | | <if test="workshopName != null">workshop_name,</if> |
| | | <if test="status != null">status,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="lineCode != null and lineCode != ''">#{lineCode},</if> |
| | |
| | | <if test="createTime != null">#{createTime},</if> |
| | | <if test="updateUser != null">#{updateUser},</if> |
| | | <if test="updateTime != null">#{updateTime},</if> |
| | | <if test="workshopName != null">#{workshopName},</if> |
| | | <if test="status != null">#{status},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <if test="createTime != null">create_time = #{createTime},</if> |
| | | <if test="updateUser != null">update_user = #{updateUser},</if> |
| | | <if test="updateTime != null">update_time = #{updateTime},</if> |
| | | <if test="workshopName != null">workshop_name = #{workshopName},</if> |
| | | <if test="status != null">status = #{status},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="updateUser" column="update_user" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="status" column="status" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectBsWorkshopInfoVo"> |
| | | select id, workshop_code, workshop_name, spare_field_1, spare_field_2, remarks, create_user, create_time, update_user, update_time from bs_workshop_info |
| | | select id, workshop_code, workshop_name, spare_field_1, spare_field_2, remarks, create_user, create_time, update_user, update_time,status from bs_workshop_info |
| | | </sql> |
| | | |
| | | <select id="selectBsWorkshopInfoList" parameterType="BsWorkshopInfo" resultMap="BsWorkshopInfoResult"> |
| | |
| | | <if test="createTime != null">create_time,</if> |
| | | <if test="updateUser != null">update_user,</if> |
| | | <if test="updateTime != null">update_time,</if> |
| | | <if test="status != null">status,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id},</if> |
| | |
| | | <if test="createTime != null">#{createTime},</if> |
| | | <if test="updateUser != null">#{updateUser},</if> |
| | | <if test="updateTime != null">#{updateTime},</if> |
| | | <if test="status != null">#{status},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <if test="createTime != null">create_time = #{createTime},</if> |
| | | <if test="updateUser != null">update_user = #{updateUser},</if> |
| | | <if test="updateTime != null">update_time = #{updateTime},</if> |
| | | <if test="status != null">status = #{status},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.rm.repairRecord.mapper.RmRepairRecordMapper"> |
| | | |
| | | <resultMap type="RmRepairRecord" id="RmRepairRecordResult"> |
| | | <result property="id" column="id" /> |
| | | <result property="snCode" column="sn_code" /> |
| | | <result property="repairIdentification" column="repair_identification" /> |
| | | <result property="boxCode" column="box_code" /> |
| | | <result property="processesCode" column="processes_code" /> |
| | | <result property="originalResult" column="original_result" /> |
| | | <result property="createUser" column="create_user" /> |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="updateUser" column="update_user" /> |
| | | <result property="repairResults" column="repair_results" /> |
| | | <result property="status" column="status" /> |
| | | <result property="remarks" column="remarks" /> |
| | | <result property="spareField1" column="spare_field_1" /> |
| | | <result property="spareField2" column="spare_field_2" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectRmRepairRecordVo"> |
| | | select id, sn_code, repair_identification, box_code, processes_code, original_result, create_user, create_time, update_time, update_user, repair_results, status, remarks, spare_field_1, spare_field_2,repair_time from rm_repair_record |
| | | </sql> |
| | | |
| | | <select id="selectRmRepairRecordList" parameterType="RmRepairRecord" resultMap="RmRepairRecordResult"> |
| | | <include refid="selectRmRepairRecordVo"/> |
| | | <where> |
| | | <if test="snCode != null and snCode != ''"> and sn_code = #{snCode}</if> |
| | | <if test="repairIdentification != null and repairIdentification != ''"> and repair_identification = #{repairIdentification}</if> |
| | | <if test="boxCode != null and boxCode != ''"> and box_code = #{boxCode}</if> |
| | | <if test="processesCode != null and processesCode != ''"> and processes_code = #{processesCode}</if> |
| | | <if test="originalResult != null and originalResult != ''"> and original_result = #{originalResult}</if> |
| | | <if test="createUser != null and createUser != ''"> and create_user = #{createUser}</if> |
| | | <if test="updateUser != null and updateUser != ''"> and update_user = #{updateUser}</if> |
| | | <if test="repairResults != null and repairResults != ''"> and repair_results = #{repairResults}</if> |
| | | <if test="status != null and status != ''"> and status = #{status}</if> |
| | | <if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if> |
| | | <if test="spareField1 != null and spareField1 != ''"> and spare_field_1 = #{spareField1}</if> |
| | | <if test="spareField2 != null and spareField2 != ''"> and spare_field_2 = #{spareField2}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectRmRepairRecordById" parameterType="Long" resultMap="RmRepairRecordResult"> |
| | | <include refid="selectRmRepairRecordVo"/> |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertRmRepairRecord" parameterType="RmRepairRecord" useGeneratedKeys="true" keyProperty="id"> |
| | | insert into rm_repair_record |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="snCode != null">sn_code,</if> |
| | | <if test="repairIdentification != null">repair_identification,</if> |
| | | <if test="boxCode != null">box_code,</if> |
| | | <if test="processesCode != null">processes_code,</if> |
| | | <if test="originalResult != null">original_result,</if> |
| | | <if test="createUser != null">create_user,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | | <if test="updateTime != null">update_time,</if> |
| | | <if test="updateUser != null">update_user,</if> |
| | | <if test="repairResults != null">repair_results,</if> |
| | | <if test="status != null">status,</if> |
| | | <if test="remarks != null">remarks,</if> |
| | | <if test="spareField1 != null">spare_field_1,</if> |
| | | <if test="spareField2 != null">spare_field_2,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="snCode != null">#{snCode},</if> |
| | | <if test="repairIdentification != null">#{repairIdentification},</if> |
| | | <if test="boxCode != null">#{boxCode},</if> |
| | | <if test="processesCode != null">#{processesCode},</if> |
| | | <if test="originalResult != null">#{originalResult},</if> |
| | | <if test="createUser != null">#{createUser},</if> |
| | | <if test="createTime != null">#{createTime},</if> |
| | | <if test="updateTime != null">#{updateTime},</if> |
| | | <if test="updateUser != null">#{updateUser},</if> |
| | | <if test="repairResults != null">#{repairResults},</if> |
| | | <if test="status != null">#{status},</if> |
| | | <if test="remarks != null">#{remarks},</if> |
| | | <if test="spareField1 != null">#{spareField1},</if> |
| | | <if test="spareField2 != null">#{spareField2},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateRmRepairRecord" parameterType="RmRepairRecord"> |
| | | update rm_repair_record |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="snCode != null">sn_code = #{snCode},</if> |
| | | <if test="repairIdentification != null">repair_identification = #{repairIdentification},</if> |
| | | <if test="boxCode != null">box_code = #{boxCode},</if> |
| | | <if test="processesCode != null">processes_code = #{processesCode},</if> |
| | | <if test="originalResult != null">original_result = #{originalResult},</if> |
| | | <if test="createUser != null">create_user = #{createUser},</if> |
| | | <if test="createTime != null">create_time = #{createTime},</if> |
| | | <if test="updateTime != null">update_time = #{updateTime},</if> |
| | | <if test="updateUser != null">update_user = #{updateUser},</if> |
| | | <if test="repairResults != null">repair_results = #{repairResults},</if> |
| | | <if test="status != null">status = #{status},</if> |
| | | <if test="remarks != null">remarks = #{remarks},</if> |
| | | <if test="spareField1 != null">spare_field_1 = #{spareField1},</if> |
| | | <if test="spareField2 != null">spare_field_2 = #{spareField2},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteRmRepairRecordById" parameterType="Long"> |
| | | delete from rm_repair_record where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteRmRepairRecordByIds" parameterType="String"> |
| | | delete from rm_repair_record where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | // æ¥è¯¢è¿ä¿®è®°å½å表 |
| | | export function listRepairRecord(query) { |
| | | return request({ |
| | | url: '/rm/repairRecord/list', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | // æ¥è¯¢è¿ä¿®è®°å½è¯¦ç» |
| | | export function getRepairRecord(id) { |
| | | return request({ |
| | | url: '/rm/repairRecord/' + id, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | // æ°å¢è¿ä¿®è®°å½ |
| | | export function addRepairRecord(data) { |
| | | return request({ |
| | | url: '/rm/repairRecord', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // ä¿®æ¹è¿ä¿®è®°å½ |
| | | export function updateRepairRecord(data) { |
| | | return request({ |
| | | url: '/rm/repairRecord', |
| | | method: 'put', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // å é¤è¿ä¿®è®°å½ |
| | | export function delRepairRecord(id) { |
| | | return request({ |
| | | url: '/rm/repairRecord/' + id, |
| | | method: 'delete' |
| | | }) |
| | | } |
| | |
| | | </el-table-column> |
| | | <el-table-column label="车é´å称" align="center" prop="workshopName"> |
| | | </el-table-column> |
| | | <el-table-column label="ç¶æ" align="center" prop="status" width="80"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="å¤æ³¨" align="center" prop="remarks"> |
| | | </el-table-column> |
| | | <el-table-column label="å建人" align="center" prop="createUser" width="80"> |
| | |
| | | <el-form-item label="车é´ç¼å·" prop="workshopCode"> |
| | | <el-input v-model="form.workshopCode" placeholder="请è¾å
¥è½¦é´ç¼å·" /> |
| | | </el-form-item> |
| | | <el-form-item style="margin-left: -15px" label="车é´ç¼å·" prop="workshopCode"> |
| | | <el-select style="width: 93%" v-model="form.workshopCode" 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="workshopName"> |
| | | <el-input v-model="form.workshopName" placeholder="请è¾å
¥è½¦é´å称" /> |
| | | </el-form-item> |
| | | <el-form-item label="ç¶æ" prop="status"> |
| | | <el-radio-group v-model="form.status"> |
| | | <el-radio |
| | | v-for="dict in dict.type.sys_normal_disable" |
| | | :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="请è¾å
¥å¤æ³¨" /> |
| | |
| | | |
| | | export default { |
| | | name: "LineInfo", |
| | | dicts: ['sys_normal_disable'], |
| | | data() { |
| | | return { |
| | | // é®ç½©å± |
| | |
| | | id: null, |
| | | lineCode: null, |
| | | lineName: null, |
| | | workshopName: null, |
| | | workshopCode: null, |
| | | workCalendar: null, |
| | | spareField1: null, |
| | |
| | | createUser: null, |
| | | createTime: null, |
| | | updateUser: null, |
| | | status: "0", |
| | | updateTime: null |
| | | }; |
| | | this.resetForm("form"); |
| | |
| | | </el-table-column> |
| | | <el-table-column label="å·¥åºå称" align="center" prop="processesName"> |
| | | </el-table-column> |
| | | <el-table-column label="å·¥åºç±»å" align="center" prop="processesType"> |
| | | </el-table-column> |
| | | <!-- <el-table-column label="å·¥åºç±»å" align="center" prop="processesType">--> |
| | | <!-- </el-table-column>--> |
| | | <el-table-column label="ç¶æ" align="center" prop="status" width="80"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/> |
| | |
| | | </el-table-column> |
| | | <el-table-column :show-overflow-tooltip='true' label="车é´å称" align="center" prop="workshopName"> |
| | | </el-table-column> |
| | | <el-table-column label="ç¶æ" align="center" prop="status" width="80"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="å¤æ³¨" align="center" prop="remarks"> |
| | | </el-table-column> |
| | | <el-table-column label="å建人" align="center" prop="createUser" width="80"> |
| | |
| | | <el-form-item label="车é´å称" prop="workshopName"> |
| | | <el-input v-model="form.workshopName" placeholder="请è¾å
¥è½¦é´å称" /> |
| | | </el-form-item> |
| | | <el-form-item label="ç¶æ" prop="status"> |
| | | <el-radio-group v-model="form.status"> |
| | | <el-radio |
| | | v-for="dict in dict.type.sys_normal_disable" |
| | | :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> |
| | |
| | | |
| | | export default { |
| | | name: "Workshop", |
| | | dicts: ['sys_normal_disable'], |
| | | data() { |
| | | return { |
| | | select: '', |
| | |
| | | createUser: null, |
| | | createTime: null, |
| | | updateUser: null, |
| | | status: "0", |
| | | updateTime: null |
| | | }; |
| | | this.resetForm("form"); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <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="repairIdentification"> |
| | | <el-input |
| | | v-model="queryParams.repairIdentification" |
| | | placeholder="请è¾å
¥è¿ä¿®æ è¯" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="ç®±ä½ç¼ç " prop="boxCode"> |
| | | <el-input |
| | | v-model="queryParams.boxCode" |
| | | 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="['rm:repairRecord: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="['rm:repairRecord: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="['rm:repairRecord: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="['rm:repairRecord:export']" |
| | | >导åº</el-button> |
| | | </el-col> |
| | | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| | | </el-row> |
| | | |
| | | <el-table v-loading="loading" border :data="repairRecordList" @selection-change="handleSelectionChange" v-if="repairRecordList.length > 0"> |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column label="è¿ä¿®æ è¯" align="center" prop="repairIdentification" /> |
| | | <el-table-column label="ç®±ä½ç¼ç " align="center" prop="boxCode" /> |
| | | <el-table-column label="å·¥åºç¼ç " align="center" prop="processesCode" /> |
| | | <el-table-column label="åç»æ" align="center" prop="originalResult" /> |
| | | <el-table-column label="è¿ä¿®ç»æ" align="center" prop="repairResults" /> |
| | | <el-table-column label="å建ç¨æ·" align="center" prop="createUser" /> |
| | | <el-table-column label="å建æ¶é´" align="center" prop="createTime" /> |
| | | <el-table-column label="è¿ä¿®æ¶é´" align="center" prop="repairTime" /> |
| | | <el-table-column label="ç¶æ" align="center" prop="status" width="80"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/> |
| | | </template> |
| | | </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="['rm:repairRecord:edit']"--> |
| | | <!-- >ä¿®æ¹</el-button>--> |
| | | <!-- <el-button--> |
| | | <!-- size="mini"--> |
| | | <!-- type="text"--> |
| | | <!-- icon="el-icon-delete"--> |
| | | <!-- @click="handleDelete(scope.row)"--> |
| | | <!-- v-hasPermi="['rm:repairRecord:remove']"--> |
| | | <!-- >å é¤</el-button>--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | </el-table> |
| | | <el-empty v-else> |
| | | <span slot="description">ææ æ°æ®</span> |
| | | </el-empty> |
| | | </el-card> |
| | | <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="snCode"> |
| | | <el-input v-model="form.snCode" placeholder="请è¾å
¥æ»æç¼ç " /> |
| | | </el-form-item> |
| | | <el-form-item label="è¿ä¿®æ è¯" prop="repairIdentification"> |
| | | <el-input v-model="form.repairIdentification" placeholder="请è¾å
¥è¿ä¿®æ è¯" /> |
| | | </el-form-item> |
| | | <el-form-item label="ç®±ä½ç¼ç " prop="boxCode"> |
| | | <el-input v-model="form.boxCode" placeholder="请è¾å
¥ç®±ä½ç¼ç " /> |
| | | </el-form-item> |
| | | <el-form-item label="å·¥åºç¼ç " prop="processesCode"> |
| | | <el-input v-model="form.processesCode" placeholder="请è¾å
¥å·¥åºç¼ç " /> |
| | | </el-form-item> |
| | | <el-form-item label="åç»æ" prop="originalResult"> |
| | | <el-input v-model="form.originalResult" placeholder="请è¾å
¥åç»æ" /> |
| | | </el-form-item> |
| | | <el-form-item label="å建ç¨æ·" prop="createUser"> |
| | | <el-input v-model="form.createUser" placeholder="请è¾å
¥å建ç¨æ·" /> |
| | | </el-form-item> |
| | | <el-form-item label="æ´æ°ç¨æ·" prop="updateUser"> |
| | | <el-input v-model="form.updateUser" placeholder="请è¾å
¥æ´æ°ç¨æ·" /> |
| | | </el-form-item> |
| | | <el-form-item label="è¿ä¿®ç»æ" prop="repairResults"> |
| | | <el-input v-model="form.repairResults" placeholder="请è¾å
¥è¿ä¿®ç»æ" /> |
| | | </el-form-item> |
| | | <el-form-item label="å¤æ³¨" prop="remarks"> |
| | | <el-input v-model="form.remarks" placeholder="请è¾å
¥å¤æ³¨" /> |
| | | </el-form-item> |
| | | <el-form-item label="é¢çå段1" prop="spareField1"> |
| | | <el-input v-model="form.spareField1" placeholder="请è¾å
¥é¢çå段1" /> |
| | | </el-form-item> |
| | | <el-form-item label="é¢çå段2" prop="spareField2"> |
| | | <el-input v-model="form.spareField2" placeholder="请è¾å
¥é¢çå段2" /> |
| | | </el-form-item> |
| | | <el-form-item label="ç¶æ" prop="status"> |
| | | <el-radio-group v-model="form.status"> |
| | | <el-radio |
| | | v-for="dict in dict.type.sys_normal_disable" |
| | | :key="dict.value" |
| | | :label="dict.value" |
| | | >{{dict.label}}</el-radio> |
| | | </el-radio-group> |
| | | </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 { listRepairRecord, getRepairRecord, delRepairRecord, addRepairRecord, updateRepairRecord } from "@/api/main/rm/repairRecord/repairRecord"; |
| | | |
| | | export default { |
| | | name: "RepairRecord", |
| | | dicts: ['sys_normal_disable'], |
| | | data() { |
| | | return { |
| | | // é®ç½©å± |
| | | loading: true, |
| | | // éä¸æ°ç» |
| | | ids: [], |
| | | // éå个ç¦ç¨ |
| | | single: true, |
| | | // éå¤ä¸ªç¦ç¨ |
| | | multiple: true, |
| | | // æ¾ç¤ºæç´¢æ¡ä»¶ |
| | | showSearch: true, |
| | | // æ»æ¡æ° |
| | | total: 0, |
| | | // è¿ä¿®è®°å½è¡¨æ ¼æ°æ® |
| | | repairRecordList: [], |
| | | // å¼¹åºå±æ é¢ |
| | | title: "", |
| | | // æ¯å¦æ¾ç¤ºå¼¹åºå± |
| | | open: false, |
| | | // æ¥è¯¢åæ° |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | snCode: null, |
| | | repairIdentification: null, |
| | | boxCode: null, |
| | | processesCode: null, |
| | | originalResult: null, |
| | | createUser: null, |
| | | updateUser: null, |
| | | repairResults: null, |
| | | status: null, |
| | | remarks: null, |
| | | spareField1: null, |
| | | spareField2: null |
| | | }, |
| | | // 表ååæ° |
| | | form: {}, |
| | | // 表åæ ¡éª |
| | | rules: { |
| | | id: [ |
| | | { required: true, message: "主é®idä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | }, |
| | | methods: { |
| | | /** æ¥è¯¢è¿ä¿®è®°å½å表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | listRepairRecord(this.queryParams).then(response => { |
| | | this.repairRecordList = response.rows; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | // åæ¶æé® |
| | | cancel() { |
| | | this.open = false; |
| | | this.reset(); |
| | | }, |
| | | // 表åéç½® |
| | | reset() { |
| | | this.form = { |
| | | id: null, |
| | | snCode: null, |
| | | repairIdentification: null, |
| | | boxCode: null, |
| | | processesCode: null, |
| | | originalResult: null, |
| | | createUser: null, |
| | | createTime: null, |
| | | updateTime: null, |
| | | updateUser: null, |
| | | repairResults: null, |
| | | status: "0", |
| | | remarks: null, |
| | | spareField1: null, |
| | | repairTime: null, |
| | | spareField2: 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 |
| | | getRepairRecord(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) { |
| | | updateRepairRecord(this.form).then(response => { |
| | | this.$modal.msgSuccess("ä¿®æ¹æå"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } else { |
| | | addRepairRecord(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 delRepairRecord(ids); |
| | | }).then(() => { |
| | | this.getList(); |
| | | this.$modal.msgSuccess("å é¤æå"); |
| | | }).catch(() => {}); |
| | | }, |
| | | /** 导åºæé®æä½ */ |
| | | handleExport() { |
| | | this.download('rm/repairRecord/export', { |
| | | ...this.queryParams |
| | | }, `repairRecord_${new Date().getTime()}.xlsx`) |
| | | } |
| | | } |
| | | }; |
| | | </script> |