¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.billion.main.bs.controller; |
| | | |
| | | import com.billion.common.annotation.Log; |
| | | import com.billion.common.core.controller.BaseController; |
| | | import com.billion.common.core.domain.AjaxResult; |
| | | import com.billion.common.core.page.TableDataInfo; |
| | | import com.billion.common.enums.BusinessType; |
| | | import com.billion.common.utils.poi.ExcelUtil; |
| | | import com.billion.main.bs.domain.BsBomChildInfo; |
| | | import com.billion.main.bs.service.IBsBomChildInfoService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * åºç¡BOMåä¿¡æ¯Controller |
| | | * |
| | | * @author HDY |
| | | * @date 2024-11-25 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/bs/bomChildInfo") |
| | | public class BsBomChildInfoController extends BaseController |
| | | { |
| | | @Autowired |
| | | private IBsBomChildInfoService bsBomChildInfoService; |
| | | |
| | | /** |
| | | * æ¥è¯¢åºç¡BOMåä¿¡æ¯å表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('bs:bomChildInfo:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(BsBomChildInfo bsBomChildInfo) |
| | | { |
| | | startPage(); |
| | | List<BsBomChildInfo> list = bsBomChildInfoService.selectBsBomChildInfoList(bsBomChildInfo); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 导åºåºç¡BOMåä¿¡æ¯å表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('bs:bomChildInfo:export')") |
| | | @Log(title = "åºç¡BOMåä¿¡æ¯", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, BsBomChildInfo bsBomChildInfo) |
| | | { |
| | | List<BsBomChildInfo> list = bsBomChildInfoService.selectBsBomChildInfoList(bsBomChildInfo); |
| | | ExcelUtil<BsBomChildInfo> util = new ExcelUtil<BsBomChildInfo>(BsBomChildInfo.class); |
| | | util.exportExcel(response, list, "åºç¡BOMåä¿¡æ¯æ°æ®"); |
| | | } |
| | | |
| | | /** |
| | | * è·ååºç¡BOMåä¿¡æ¯è¯¦ç»ä¿¡æ¯ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('bs:bomChildInfo:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) |
| | | { |
| | | return success(bsBomChildInfoService.selectBsBomChildInfoById(id)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢åºç¡BOMåä¿¡æ¯ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('bs:bomChildInfo:add')") |
| | | @Log(title = "åºç¡BOMåä¿¡æ¯", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody BsBomChildInfo bsBomChildInfo) |
| | | { |
| | | return toAjax(bsBomChildInfoService.insertBsBomChildInfo(bsBomChildInfo)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹åºç¡BOMåä¿¡æ¯ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('bs:bomChildInfo:edit')") |
| | | @Log(title = "åºç¡BOMåä¿¡æ¯", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody BsBomChildInfo bsBomChildInfo) |
| | | { |
| | | return toAjax(bsBomChildInfoService.updateBsBomChildInfo(bsBomChildInfo)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤åºç¡BOMåä¿¡æ¯ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('bs:bomChildInfo:remove')") |
| | | @Log(title = "åºç¡BOMåä¿¡æ¯", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | | { |
| | | return toAjax(bsBomChildInfoService.deleteBsBomChildInfoByIds(ids)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.billion.main.bs.controller; |
| | | |
| | | import com.billion.common.annotation.Log; |
| | | import com.billion.common.core.controller.BaseController; |
| | | import com.billion.common.core.domain.AjaxResult; |
| | | import com.billion.common.core.page.TableDataInfo; |
| | | import com.billion.common.enums.BusinessType; |
| | | import com.billion.common.utils.poi.ExcelUtil; |
| | | import com.billion.main.bs.domain.BsBomInfo; |
| | | import com.billion.main.bs.service.IBsBomInfoService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * åºç¡BOMController |
| | | * |
| | | * @author HDY |
| | | * @date 2024-11-25 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/bs/bomInfo") |
| | | public class BsBomInfoController extends BaseController |
| | | { |
| | | @Autowired |
| | | private IBsBomInfoService bsBomInfoService; |
| | | |
| | | /** |
| | | * æ¥è¯¢åºç¡BOMå表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('bs:bomInfo:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(BsBomInfo bsBomInfo) |
| | | { |
| | | startPage(); |
| | | List<BsBomInfo> list = bsBomInfoService.selectBsBomInfoList(bsBomInfo); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 导åºåºç¡BOMå表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('bs:bomInfo:export')") |
| | | @Log(title = "åºç¡BOM", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, BsBomInfo bsBomInfo) |
| | | { |
| | | List<BsBomInfo> list = bsBomInfoService.selectBsBomInfoList(bsBomInfo); |
| | | ExcelUtil<BsBomInfo> util = new ExcelUtil<BsBomInfo>(BsBomInfo.class); |
| | | util.exportExcel(response, list, "åºç¡BOMæ°æ®"); |
| | | } |
| | | |
| | | /** |
| | | * è·ååºç¡BOM详ç»ä¿¡æ¯ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('bs:bomInfo:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) |
| | | { |
| | | return success(bsBomInfoService.selectBsBomInfoById(id)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢åºç¡BOM |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('bs:bomInfo:add')") |
| | | @Log(title = "åºç¡BOM", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody BsBomInfo bsBomInfo) |
| | | { |
| | | return toAjax(bsBomInfoService.insertBsBomInfo(bsBomInfo)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹åºç¡BOM |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('bs:bomInfo:edit')") |
| | | @Log(title = "åºç¡BOM", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody BsBomInfo bsBomInfo) |
| | | { |
| | | return toAjax(bsBomInfoService.updateBsBomInfo(bsBomInfo)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤åºç¡BOM |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('bs:bomInfo:remove')") |
| | | @Log(title = "åºç¡BOM", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | | { |
| | | return toAjax(bsBomInfoService.deleteBsBomInfoByIds(ids)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.billion.main.bs.domain; |
| | | |
| | | import com.billion.common.annotation.Excel; |
| | | import com.billion.main.common.BaseEntity; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * åºç¡BOMåä¿¡æ¯å¯¹è±¡ bs_bom_child_info |
| | | * |
| | | * @author HDY |
| | | * @date 2024-11-25 |
| | | */ |
| | | @Data |
| | | public class BsBomChildInfo extends BaseEntity |
| | | { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** 主é®id */ |
| | | private Long id; |
| | | |
| | | /** 产åç¼ç */ |
| | | @Excel(name = "产åç¼ç ") |
| | | private String productCode; |
| | | |
| | | /** 产åå称 */ |
| | | @Excel(name = "产åå称") |
| | | private String productName; |
| | | |
| | | /** å·¥ä½ç¼ç */ |
| | | @Excel(name = "å·¥ä½ç¼ç ") |
| | | private String locationCode; |
| | | |
| | | /** å·¥ä½å称 */ |
| | | @Excel(name = "å·¥ä½å称") |
| | | private String locationName; |
| | | |
| | | /** ç©æç¼ç */ |
| | | @Excel(name = "ç©æç¼ç ") |
| | | private String materialCode; |
| | | |
| | | /** ç©æå称 */ |
| | | @Excel(name = "ç©æå称") |
| | | private String materialName; |
| | | |
| | | /** åè */ |
| | | @Excel(name = "åè") |
| | | private BigDecimal costQty; |
| | | |
| | | /** åä½ */ |
| | | @Excel(name = "åä½") |
| | | private String unit; |
| | | |
| | | /** BOMç¼ç */ |
| | | @Excel(name = "BOMç¼ç ") |
| | | private String bomCode; |
| | | |
| | | /** å¤æ³¨ */ |
| | | @Excel(name = "å¤æ³¨") |
| | | private String remark; |
| | | |
| | | /** é»è¾å é¤ */ |
| | | private String delFlag; |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.billion.main.bs.domain; |
| | | |
| | | import com.billion.common.annotation.Excel; |
| | | import com.billion.main.common.BaseEntity; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * åºç¡BOM对象 bs_bom_info |
| | | * |
| | | * @author HDY |
| | | * @date 2024-11-25 |
| | | */ |
| | | @Data |
| | | public class BsBomInfo extends BaseEntity |
| | | { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** 主é®id */ |
| | | private Long id; |
| | | |
| | | /** BOMç¼ç */ |
| | | @Excel(name = "BOMç¼ç ") |
| | | private String bomCode; |
| | | |
| | | /** BOMå称 */ |
| | | @Excel(name = "BOMå称") |
| | | private String bomName; |
| | | |
| | | /** 产åç¼ç */ |
| | | @Excel(name = "产åç¼ç ") |
| | | private String productCode; |
| | | |
| | | /** 产åå称 */ |
| | | @Excel(name = "产åå称") |
| | | private String productName; |
| | | |
| | | /** çæ¬ */ |
| | | @Excel(name = "çæ¬") |
| | | private String version; |
| | | |
| | | /** ç¶æ(åå
¸) */ |
| | | @Excel(name = "ç¶æ(åå
¸)") |
| | | private String status; |
| | | |
| | | /** å建ç¨æ· */ |
| | | @Excel(name = "å建ç¨æ·") |
| | | private String createUser; |
| | | |
| | | /** æ´æ¹ç¨æ· */ |
| | | @Excel(name = "æ´æ¹ç¨æ·") |
| | | private String updateUser; |
| | | |
| | | /** æ°æ®æ¥æº */ |
| | | @Excel(name = "æ°æ®æ¥æº") |
| | | private String dataSource; |
| | | |
| | | /** å¤æ³¨ */ |
| | | @Excel(name = "å¤æ³¨") |
| | | private String remark; |
| | | |
| | | /** é»è¾å é¤ */ |
| | | private String delFlag; |
| | | |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.billion.main.bs.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.billion.main.bs.domain.BsBomChildInfo; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * åºç¡BOMåä¿¡æ¯Mapperæ¥å£ |
| | | * |
| | | * @author HDY |
| | | * @date 2024-11-25 |
| | | */ |
| | | public interface BsBomChildInfoMapper extends BaseMapper<BsBomChildInfo> |
| | | { |
| | | /** |
| | | * æ¥è¯¢åºç¡BOMåä¿¡æ¯ |
| | | * |
| | | * @param id åºç¡BOMåä¿¡æ¯ä¸»é® |
| | | * @return åºç¡BOMåä¿¡æ¯ |
| | | */ |
| | | public BsBomChildInfo selectBsBomChildInfoById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢åºç¡BOMåä¿¡æ¯å表 |
| | | * |
| | | * @param bsBomChildInfo åºç¡BOMåä¿¡æ¯ |
| | | * @return åºç¡BOMåä¿¡æ¯éå |
| | | */ |
| | | public List<BsBomChildInfo> selectBsBomChildInfoList(BsBomChildInfo bsBomChildInfo); |
| | | |
| | | /** |
| | | * æ°å¢åºç¡BOMåä¿¡æ¯ |
| | | * |
| | | * @param bsBomChildInfo åºç¡BOMåä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | public int insertBsBomChildInfo(BsBomChildInfo bsBomChildInfo); |
| | | |
| | | /** |
| | | * ä¿®æ¹åºç¡BOMåä¿¡æ¯ |
| | | * |
| | | * @param bsBomChildInfo åºç¡BOMåä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | public int updateBsBomChildInfo(BsBomChildInfo bsBomChildInfo); |
| | | |
| | | /** |
| | | * å é¤åºç¡BOMåä¿¡æ¯ |
| | | * |
| | | * @param id åºç¡BOMåä¿¡æ¯ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteBsBomChildInfoById(Long id); |
| | | |
| | | /** |
| | | * æ¹éå é¤åºç¡BOMåä¿¡æ¯ |
| | | * |
| | | * @param ids éè¦å é¤çæ°æ®ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteBsBomChildInfoByIds(Long[] ids); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.billion.main.bs.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.billion.main.bs.domain.BsBomInfo; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * åºç¡BOMMapperæ¥å£ |
| | | * |
| | | * @author HDY |
| | | * @date 2024-11-25 |
| | | */ |
| | | public interface BsBomInfoMapper extends BaseMapper<BsBomInfo> |
| | | { |
| | | /** |
| | | * æ¥è¯¢åºç¡BOM |
| | | * |
| | | * @param id åºç¡BOMä¸»é® |
| | | * @return åºç¡BOM |
| | | */ |
| | | public BsBomInfo selectBsBomInfoById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢åºç¡BOMå表 |
| | | * |
| | | * @param bsBomInfo åºç¡BOM |
| | | * @return åºç¡BOMéå |
| | | */ |
| | | public List<BsBomInfo> selectBsBomInfoList(BsBomInfo bsBomInfo); |
| | | |
| | | /** |
| | | * æ°å¢åºç¡BOM |
| | | * |
| | | * @param bsBomInfo åºç¡BOM |
| | | * @return ç»æ |
| | | */ |
| | | public int insertBsBomInfo(BsBomInfo bsBomInfo); |
| | | |
| | | /** |
| | | * ä¿®æ¹åºç¡BOM |
| | | * |
| | | * @param bsBomInfo åºç¡BOM |
| | | * @return ç»æ |
| | | */ |
| | | public int updateBsBomInfo(BsBomInfo bsBomInfo); |
| | | |
| | | /** |
| | | * å é¤åºç¡BOM |
| | | * |
| | | * @param id åºç¡BOMä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteBsBomInfoById(Long id); |
| | | |
| | | /** |
| | | * æ¹éå é¤åºç¡BOM |
| | | * |
| | | * @param ids éè¦å é¤çæ°æ®ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteBsBomInfoByIds(Long[] ids); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.billion.main.bs.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.billion.main.bs.domain.BsBomChildInfo; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * åºç¡BOMåä¿¡æ¯Serviceæ¥å£ |
| | | * |
| | | * @author HDY |
| | | * @date 2024-11-25 |
| | | */ |
| | | public interface IBsBomChildInfoService extends IService<BsBomChildInfo> |
| | | { |
| | | /** |
| | | * æ¥è¯¢åºç¡BOMåä¿¡æ¯ |
| | | * |
| | | * @param id åºç¡BOMåä¿¡æ¯ä¸»é® |
| | | * @return åºç¡BOMåä¿¡æ¯ |
| | | */ |
| | | public BsBomChildInfo selectBsBomChildInfoById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢åºç¡BOMåä¿¡æ¯å表 |
| | | * |
| | | * @param bsBomChildInfo åºç¡BOMåä¿¡æ¯ |
| | | * @return åºç¡BOMåä¿¡æ¯éå |
| | | */ |
| | | public List<BsBomChildInfo> selectBsBomChildInfoList(BsBomChildInfo bsBomChildInfo); |
| | | |
| | | /** |
| | | * æ°å¢åºç¡BOMåä¿¡æ¯ |
| | | * |
| | | * @param bsBomChildInfo åºç¡BOMåä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | public int insertBsBomChildInfo(BsBomChildInfo bsBomChildInfo); |
| | | |
| | | /** |
| | | * ä¿®æ¹åºç¡BOMåä¿¡æ¯ |
| | | * |
| | | * @param bsBomChildInfo åºç¡BOMåä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | public int updateBsBomChildInfo(BsBomChildInfo bsBomChildInfo); |
| | | |
| | | /** |
| | | * æ¹éå é¤åºç¡BOMåä¿¡æ¯ |
| | | * |
| | | * @param ids éè¦å é¤çåºç¡BOMåä¿¡æ¯ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteBsBomChildInfoByIds(Long[] ids); |
| | | |
| | | /** |
| | | * å é¤åºç¡BOMåä¿¡æ¯ä¿¡æ¯ |
| | | * |
| | | * @param id åºç¡BOMåä¿¡æ¯ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteBsBomChildInfoById(Long id); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.billion.main.bs.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.billion.main.bs.domain.BsBomInfo; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * åºç¡BOMServiceæ¥å£ |
| | | * |
| | | * @author HDY |
| | | * @date 2024-11-25 |
| | | */ |
| | | public interface IBsBomInfoService extends IService<BsBomInfo> |
| | | { |
| | | /** |
| | | * æ¥è¯¢åºç¡BOM |
| | | * |
| | | * @param id åºç¡BOMä¸»é® |
| | | * @return åºç¡BOM |
| | | */ |
| | | public BsBomInfo selectBsBomInfoById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢åºç¡BOMå表 |
| | | * |
| | | * @param bsBomInfo åºç¡BOM |
| | | * @return åºç¡BOMéå |
| | | */ |
| | | public List<BsBomInfo> selectBsBomInfoList(BsBomInfo bsBomInfo); |
| | | |
| | | /** |
| | | * æ°å¢åºç¡BOM |
| | | * |
| | | * @param bsBomInfo åºç¡BOM |
| | | * @return ç»æ |
| | | */ |
| | | public int insertBsBomInfo(BsBomInfo bsBomInfo); |
| | | |
| | | /** |
| | | * ä¿®æ¹åºç¡BOM |
| | | * |
| | | * @param bsBomInfo åºç¡BOM |
| | | * @return ç»æ |
| | | */ |
| | | public int updateBsBomInfo(BsBomInfo bsBomInfo); |
| | | |
| | | /** |
| | | * æ¹éå é¤åºç¡BOM |
| | | * |
| | | * @param ids éè¦å é¤çåºç¡BOM主é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteBsBomInfoByIds(Long[] ids); |
| | | |
| | | /** |
| | | * å é¤åºç¡BOMä¿¡æ¯ |
| | | * |
| | | * @param id åºç¡BOMä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteBsBomInfoById(Long id); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.billion.main.bs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.billion.main.bs.domain.BsBomChildInfo; |
| | | import com.billion.main.bs.mapper.BsBomChildInfoMapper; |
| | | import com.billion.main.bs.service.IBsBomChildInfoService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * åºç¡BOMåä¿¡æ¯Serviceä¸å¡å±å¤ç |
| | | * |
| | | * @author HDY |
| | | * @date 2024-11-25 |
| | | */ |
| | | @Service |
| | | public class BsBomChildInfoServiceImpl extends ServiceImpl<BsBomChildInfoMapper, BsBomChildInfo> implements IBsBomChildInfoService |
| | | { |
| | | @Autowired |
| | | private BsBomChildInfoMapper bsBomChildInfoMapper; |
| | | |
| | | /** |
| | | * æ¥è¯¢åºç¡BOMåä¿¡æ¯ |
| | | * |
| | | * @param id åºç¡BOMåä¿¡æ¯ä¸»é® |
| | | * @return åºç¡BOMåä¿¡æ¯ |
| | | */ |
| | | @Override |
| | | public BsBomChildInfo selectBsBomChildInfoById(Long id) |
| | | { |
| | | return bsBomChildInfoMapper.selectBsBomChildInfoById(id); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢åºç¡BOMåä¿¡æ¯å表 |
| | | * |
| | | * @param bsBomChildInfo åºç¡BOMåä¿¡æ¯ |
| | | * @return åºç¡BOMåä¿¡æ¯ |
| | | */ |
| | | @Override |
| | | public List<BsBomChildInfo> selectBsBomChildInfoList(BsBomChildInfo bsBomChildInfo) |
| | | { |
| | | return bsBomChildInfoMapper.selectBsBomChildInfoList(bsBomChildInfo); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢åºç¡BOMåä¿¡æ¯ |
| | | * |
| | | * @param bsBomChildInfo åºç¡BOMåä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int insertBsBomChildInfo(BsBomChildInfo bsBomChildInfo) |
| | | { |
| | | return bsBomChildInfoMapper.insertBsBomChildInfo(bsBomChildInfo); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹åºç¡BOMåä¿¡æ¯ |
| | | * |
| | | * @param bsBomChildInfo åºç¡BOMåä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int updateBsBomChildInfo(BsBomChildInfo bsBomChildInfo) |
| | | { |
| | | return bsBomChildInfoMapper.updateBsBomChildInfo(bsBomChildInfo); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤åºç¡BOMåä¿¡æ¯ |
| | | * |
| | | * @param ids éè¦å é¤çåºç¡BOMåä¿¡æ¯ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteBsBomChildInfoByIds(Long[] ids) |
| | | { |
| | | return bsBomChildInfoMapper.deleteBsBomChildInfoByIds(ids); |
| | | } |
| | | |
| | | /** |
| | | * å é¤åºç¡BOMåä¿¡æ¯ä¿¡æ¯ |
| | | * |
| | | * @param id åºç¡BOMåä¿¡æ¯ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteBsBomChildInfoById(Long id) |
| | | { |
| | | return bsBomChildInfoMapper.deleteBsBomChildInfoById(id); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.billion.main.bs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.billion.common.utils.DateUtils; |
| | | import com.billion.main.bs.domain.BsBomInfo; |
| | | import com.billion.main.bs.mapper.BsBomInfoMapper; |
| | | import com.billion.main.bs.service.IBsBomInfoService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * åºç¡BOMServiceä¸å¡å±å¤ç |
| | | * |
| | | * @author HDY |
| | | * @date 2024-11-25 |
| | | */ |
| | | @Service |
| | | public class BsBomInfoServiceImpl extends ServiceImpl<BsBomInfoMapper, BsBomInfo> implements IBsBomInfoService |
| | | { |
| | | @Autowired |
| | | private BsBomInfoMapper bsBomInfoMapper; |
| | | |
| | | /** |
| | | * æ¥è¯¢åºç¡BOM |
| | | * |
| | | * @param id åºç¡BOMä¸»é® |
| | | * @return åºç¡BOM |
| | | */ |
| | | @Override |
| | | public BsBomInfo selectBsBomInfoById(Long id) |
| | | { |
| | | return bsBomInfoMapper.selectBsBomInfoById(id); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢åºç¡BOMå表 |
| | | * |
| | | * @param bsBomInfo åºç¡BOM |
| | | * @return åºç¡BOM |
| | | */ |
| | | @Override |
| | | public List<BsBomInfo> selectBsBomInfoList(BsBomInfo bsBomInfo) |
| | | { |
| | | return bsBomInfoMapper.selectBsBomInfoList(bsBomInfo); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢åºç¡BOM |
| | | * |
| | | * @param bsBomInfo åºç¡BOM |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int insertBsBomInfo(BsBomInfo bsBomInfo) |
| | | { |
| | | bsBomInfo.setCreateTime(DateUtils.getNowDate()); |
| | | return bsBomInfoMapper.insertBsBomInfo(bsBomInfo); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹åºç¡BOM |
| | | * |
| | | * @param bsBomInfo åºç¡BOM |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int updateBsBomInfo(BsBomInfo bsBomInfo) |
| | | { |
| | | bsBomInfo.setUpdateTime(DateUtils.getNowDate()); |
| | | return bsBomInfoMapper.updateBsBomInfo(bsBomInfo); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤åºç¡BOM |
| | | * |
| | | * @param ids éè¦å é¤çåºç¡BOMä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteBsBomInfoByIds(Long[] ids) |
| | | { |
| | | return bsBomInfoMapper.deleteBsBomInfoByIds(ids); |
| | | } |
| | | |
| | | /** |
| | | * å é¤åºç¡BOMä¿¡æ¯ |
| | | * |
| | | * @param id åºç¡BOMä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteBsBomInfoById(Long id) |
| | | { |
| | | return bsBomInfoMapper.deleteBsBomInfoById(id); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.billion.main.bs.mapper.BsBomChildInfoMapper"> |
| | | |
| | | <resultMap type="BsBomChildInfo" id="BsBomChildInfoResult"> |
| | | <result property="id" column="id" /> |
| | | <result property="productCode" column="product_code" /> |
| | | <result property="productName" column="product_name" /> |
| | | <result property="locationCode" column="location_code" /> |
| | | <result property="locationName" column="location_name" /> |
| | | <result property="materialCode" column="material_code" /> |
| | | <result property="materialName" column="material_name" /> |
| | | <result property="costQty" column="cost_qty" /> |
| | | <result property="unit" column="unit" /> |
| | | <result property="remark" column="remark" /> |
| | | <result property="bomCode" column="bom_code" /> |
| | | <result property="delFlag" column="del_flag" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectBsBomChildInfoVo"> |
| | | select id, product_code, product_name, location_code, location_name, material_code, material_name, cost_qty, unit, remark, bom_code, del_flag from bs_bom_child_info |
| | | </sql> |
| | | |
| | | <select id="selectBsBomChildInfoList" parameterType="BsBomChildInfo" resultMap="BsBomChildInfoResult"> |
| | | <include refid="selectBsBomChildInfoVo"/> |
| | | <where> |
| | | <if test="productCode != null and productCode != ''"> and product_code = #{productCode}</if> |
| | | <if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if> |
| | | <if test="locationCode != null and locationCode != ''"> and location_code = #{locationCode}</if> |
| | | <if test="locationName != null and locationName != ''"> and location_name like concat('%', #{locationName}, '%')</if> |
| | | <if test="materialCode != null and materialCode != ''"> and material_code = #{materialCode}</if> |
| | | <if test="materialName != null and materialName != ''"> and material_name like concat('%', #{materialName}, '%')</if> |
| | | <if test="costQty != null "> and cost_qty = #{costQty}</if> |
| | | <if test="unit != null and unit != ''"> and unit = #{unit}</if> |
| | | <if test="bomCode != null and bomCode != ''"> and bom_code = #{bomCode}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectBsBomChildInfoById" parameterType="Long" resultMap="BsBomChildInfoResult"> |
| | | <include refid="selectBsBomChildInfoVo"/> |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertBsBomChildInfo" parameterType="BsBomChildInfo"> |
| | | insert into bs_bom_child_info |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | | <if test="productCode != null">product_code,</if> |
| | | <if test="productName != null">product_name,</if> |
| | | <if test="locationCode != null">location_code,</if> |
| | | <if test="locationName != null">location_name,</if> |
| | | <if test="materialCode != null">material_code,</if> |
| | | <if test="materialName != null">material_name,</if> |
| | | <if test="costQty != null">cost_qty,</if> |
| | | <if test="unit != null">unit,</if> |
| | | <if test="remark != null">remark,</if> |
| | | <if test="bomCode != null">bom_code,</if> |
| | | <if test="delFlag != null">del_flag,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id},</if> |
| | | <if test="productCode != null">#{productCode},</if> |
| | | <if test="productName != null">#{productName},</if> |
| | | <if test="locationCode != null">#{locationCode},</if> |
| | | <if test="locationName != null">#{locationName},</if> |
| | | <if test="materialCode != null">#{materialCode},</if> |
| | | <if test="materialName != null">#{materialName},</if> |
| | | <if test="costQty != null">#{costQty},</if> |
| | | <if test="unit != null">#{unit},</if> |
| | | <if test="remark != null">#{remark},</if> |
| | | <if test="bomCode != null">#{bomCode},</if> |
| | | <if test="delFlag != null">#{delFlag},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateBsBomChildInfo" parameterType="BsBomChildInfo"> |
| | | update bs_bom_child_info |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="productCode != null">product_code = #{productCode},</if> |
| | | <if test="productName != null">product_name = #{productName},</if> |
| | | <if test="locationCode != null">location_code = #{locationCode},</if> |
| | | <if test="locationName != null">location_name = #{locationName},</if> |
| | | <if test="materialCode != null">material_code = #{materialCode},</if> |
| | | <if test="materialName != null">material_name = #{materialName},</if> |
| | | <if test="costQty != null">cost_qty = #{costQty},</if> |
| | | <if test="unit != null">unit = #{unit},</if> |
| | | <if test="remark != null">remark = #{remark},</if> |
| | | <if test="bomCode != null">bom_code = #{bomCode},</if> |
| | | <if test="delFlag != null">del_flag = #{delFlag},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteBsBomChildInfoById" parameterType="Long"> |
| | | delete from bs_bom_child_info where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteBsBomChildInfoByIds" parameterType="String"> |
| | | delete from bs_bom_child_info where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.billion.main.bs.mapper.BsBomInfoMapper"> |
| | | |
| | | <resultMap type="BsBomInfo" id="BsBomInfoResult"> |
| | | <result property="id" column="id" /> |
| | | <result property="bomCode" column="bom_code" /> |
| | | <result property="bomName" column="bom_name" /> |
| | | <result property="productCode" column="product_code" /> |
| | | <result property="productName" column="product_name" /> |
| | | <result property="version" column="version" /> |
| | | <result property="status" column="status" /> |
| | | <result property="remark" column="remark" /> |
| | | <result property="createUser" column="create_user" /> |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="updateUser" column="update_user" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="dataSource" column="data_source" /> |
| | | <result property="delFlag" column="del_flag" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectBsBomInfoVo"> |
| | | select id, bom_code, bom_name, product_code, product_name, version, status, remark, create_user, create_time, update_user, update_time, data_source, del_flag from bs_bom_info |
| | | </sql> |
| | | |
| | | <select id="selectBsBomInfoList" parameterType="BsBomInfo" resultMap="BsBomInfoResult"> |
| | | <include refid="selectBsBomInfoVo"/> |
| | | <where> |
| | | <if test="bomCode != null and bomCode != ''"> and bom_code = #{bomCode}</if> |
| | | <if test="bomName != null and bomName != ''"> and bom_name like concat('%', #{bomName}, '%')</if> |
| | | <if test="productCode != null and productCode != ''"> and product_code = #{productCode}</if> |
| | | <if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if> |
| | | <if test="version != null and version != ''"> and version = #{version}</if> |
| | | <if test="status != null and status != ''"> and status = #{status}</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="dataSource != null and dataSource != ''"> and data_source = #{dataSource}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectBsBomInfoById" parameterType="Long" resultMap="BsBomInfoResult"> |
| | | <include refid="selectBsBomInfoVo"/> |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertBsBomInfo" parameterType="BsBomInfo"> |
| | | insert into bs_bom_info |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | | <if test="bomCode != null">bom_code,</if> |
| | | <if test="bomName != null">bom_name,</if> |
| | | <if test="productCode != null">product_code,</if> |
| | | <if test="productName != null">product_name,</if> |
| | | <if test="version != null">version,</if> |
| | | <if test="status != null">status,</if> |
| | | <if test="remark != null">remark,</if> |
| | | <if test="createUser != null">create_user,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | | <if test="updateUser != null">update_user,</if> |
| | | <if test="updateTime != null">update_time,</if> |
| | | <if test="dataSource != null">data_source,</if> |
| | | <if test="delFlag != null">del_flag,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id},</if> |
| | | <if test="bomCode != null">#{bomCode},</if> |
| | | <if test="bomName != null">#{bomName},</if> |
| | | <if test="productCode != null">#{productCode},</if> |
| | | <if test="productName != null">#{productName},</if> |
| | | <if test="version != null">#{version},</if> |
| | | <if test="status != null">#{status},</if> |
| | | <if test="remark != null">#{remark},</if> |
| | | <if test="createUser != null">#{createUser},</if> |
| | | <if test="createTime != null">#{createTime},</if> |
| | | <if test="updateUser != null">#{updateUser},</if> |
| | | <if test="updateTime != null">#{updateTime},</if> |
| | | <if test="dataSource != null">#{dataSource},</if> |
| | | <if test="delFlag != null">#{delFlag},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateBsBomInfo" parameterType="BsBomInfo"> |
| | | update bs_bom_info |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="bomCode != null">bom_code = #{bomCode},</if> |
| | | <if test="bomName != null">bom_name = #{bomName},</if> |
| | | <if test="productCode != null">product_code = #{productCode},</if> |
| | | <if test="productName != null">product_name = #{productName},</if> |
| | | <if test="version != null">version = #{version},</if> |
| | | <if test="status != null">status = #{status},</if> |
| | | <if test="remark != null">remark = #{remark},</if> |
| | | <if test="createUser != null">create_user = #{createUser},</if> |
| | | <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="dataSource != null">data_source = #{dataSource},</if> |
| | | <if test="delFlag != null">del_flag = #{delFlag},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteBsBomInfoById" parameterType="Long"> |
| | | delete from bs_bom_info where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteBsBomInfoByIds" parameterType="String"> |
| | | delete from bs_bom_info where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | // æ¥è¯¢åºç¡BOMåä¿¡æ¯å表 |
| | | export function listBomChildInfo(query) { |
| | | return request({ |
| | | url: '/bs/bomChildInfo/list', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | // æ¥è¯¢åºç¡BOMåä¿¡æ¯è¯¦ç» |
| | | export function getBomChildInfo(id) { |
| | | return request({ |
| | | url: '/bs/bomChildInfo/' + id, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | // æ°å¢åºç¡BOMåä¿¡æ¯ |
| | | export function addBomChildInfo(data) { |
| | | return request({ |
| | | url: '/bs/bomChildInfo', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // ä¿®æ¹åºç¡BOMåä¿¡æ¯ |
| | | export function updateBomChildInfo(data) { |
| | | return request({ |
| | | url: '/bs/bomChildInfo', |
| | | method: 'put', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // å é¤åºç¡BOMåä¿¡æ¯ |
| | | export function delBomChildInfo(id) { |
| | | return request({ |
| | | url: '/bs/bomChildInfo/' + id, |
| | | method: 'delete' |
| | | }) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | // æ¥è¯¢åºç¡BOMå表 |
| | | export function listBomInfo(query) { |
| | | return request({ |
| | | url: '/bs/bomInfo/list', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | // æ¥è¯¢åºç¡BOMè¯¦ç» |
| | | export function getBomInfo(id) { |
| | | return request({ |
| | | url: '/bs/bomInfo/' + id, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | // æ°å¢åºç¡BOM |
| | | export function addBomInfo(data) { |
| | | return request({ |
| | | url: '/bs/bomInfo', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // ä¿®æ¹åºç¡BOM |
| | | export function updateBomInfo(data) { |
| | | return request({ |
| | | url: '/bs/bomInfo', |
| | | method: 'put', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // å é¤åºç¡BOM |
| | | export function delBomInfo(id) { |
| | | return request({ |
| | | url: '/bs/bomInfo/' + id, |
| | | method: 'delete' |
| | | }) |
| | | } |
| | |
| | | ] |
| | | }, |
| | | { |
| | | path: '/main/bom-data', |
| | | component: Layout, |
| | | hidden: true, |
| | | permissions: ['bs:bomChildInfo:list'], |
| | | children: [ |
| | | { |
| | | path: 'index', |
| | | component: () => import('@/views/main/bs/bomChildInfo/index'), |
| | | name: 'Data', |
| | | meta: { title: 'BOMå件信æ¯', activeMenu: '/main/bs/bomChildInfo' } |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | path: '/monitor/job-log', |
| | | component: Layout, |
| | | hidden: true, |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <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="locationCode"> |
| | | <el-input |
| | | v-model="queryParams.locationCode" |
| | | placeholder="请è¾å
¥å·¥ä½ç¼ç " |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="å·¥ä½å称" prop="locationName"> |
| | | <el-input |
| | | v-model="queryParams.locationName" |
| | | placeholder="请è¾å
¥å·¥ä½å称" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="ç©æç¼ç " prop="materialCode"> |
| | | <el-input |
| | | v-model="queryParams.materialCode" |
| | | placeholder="请è¾å
¥ç©æç¼ç " |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="ç©æå称" prop="materialName"> |
| | | <el-input |
| | | v-model="queryParams.materialName" |
| | | placeholder="请è¾å
¥ç©æå称" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="åä½" prop="unit"> |
| | | <el-input |
| | | v-model="queryParams.unit" |
| | | 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 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:bomChildInfo: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:bomChildInfo: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:bomChildInfo: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:bomChildInfo:export']" |
| | | >导åº</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="warning" |
| | | plain |
| | | icon="el-icon-close" |
| | | size="mini" |
| | | @click="handleClose" |
| | | >å
³é</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-descriptions class="margin-top" :size="'medium'" border> |
| | | <el-descriptions-item > |
| | | <template slot="label"> |
| | | <i class="el-icon-user"></i> |
| | | BOMç¼ç |
| | | </template> |
| | | {{headerInformationData.bomCode}} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item > |
| | | <template slot="label"> |
| | | <i class="el-icon-location-outline"></i> |
| | | 产åç¼ç |
| | | </template> |
| | | {{headerInformationData.productCode}} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item > |
| | | <template slot="label"> |
| | | <i class="el-icon-tickets"></i> |
| | | 产åå称 |
| | | </template> |
| | | {{headerInformationData.productName}} |
| | | </el-descriptions-item> |
| | | </el-descriptions> |
| | | |
| | | <el-table border v-loading="loading" :data="bomChildInfoList" @selection-change="handleSelectionChange" v-if="bomChildInfoList.length > 0"> |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column show-overflow-tooltip="true" label="å·¥ä½ç¼ç " align="center" prop="locationCode" /> |
| | | <el-table-column show-overflow-tooltip="true" label="å·¥ä½å称" align="center" prop="locationName" /> |
| | | <el-table-column show-overflow-tooltip="true" label="ç©æç¼ç " align="center" prop="materialCode" /> |
| | | <el-table-column show-overflow-tooltip="true" label="ç©æå称" align="center" prop="materialName" /> |
| | | <el-table-column show-overflow-tooltip="true" label="åè" align="center" prop="costQty" /> |
| | | <el-table-column show-overflow-tooltip="true" label="åä½" align="center" prop="unit" /> |
| | | <el-table-column show-overflow-tooltip="true" label="å¤æ³¨" align="center" prop="remark" /> |
| | | </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" |
| | | /> |
| | | |
| | | <!-- æ·»å æä¿®æ¹åºç¡BOMåä¿¡æ¯å¯¹è¯æ¡ --> |
| | | <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="BOMç¼ç " prop="bomCode"> |
| | | <el-input v-model="querybomCode" :disabled="true" /> |
| | | </el-form-item> |
| | | <el-form-item label="å·¥ä½ç¼ç " prop="locationCode"> |
| | | <el-input v-model="form.locationCode" placeholder="请è¾å
¥å·¥ä½ç¼ç " /> |
| | | </el-form-item> |
| | | <el-form-item label="å·¥ä½å称" prop="locationName"> |
| | | <el-input v-model="form.locationName" placeholder="请è¾å
¥å·¥ä½å称" /> |
| | | </el-form-item> |
| | | <el-form-item label="ç©æç¼ç " prop="materialCode"> |
| | | <el-input v-model="form.materialCode" placeholder="请è¾å
¥ç©æç¼ç " /> |
| | | </el-form-item> |
| | | <el-form-item label="ç©æå称" prop="materialName"> |
| | | <el-input v-model="form.materialName" placeholder="请è¾å
¥ç©æå称" /> |
| | | </el-form-item> |
| | | <el-form-item label="åè" prop="costQty"> |
| | | <el-input v-model="form.costQty" placeholder="请è¾å
¥åè" /> |
| | | </el-form-item> |
| | | <el-form-item label="åä½" prop="unit"> |
| | | <el-input v-model="form.unit" placeholder="请è¾å
¥åä½" /> |
| | | </el-form-item> |
| | | <el-form-item label="å¤æ³¨" prop="remark"> |
| | | <el-input v-model="form.remark" 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 { listBomChildInfo, getBomChildInfo, delBomChildInfo, addBomChildInfo, updateBomChildInfo } from "@/api/main/bs/bomChildInfo"; |
| | | import { listBomInfo } from "@/api/main/bs/bomInfo"; |
| | | |
| | | export default { |
| | | name: "BomChildInfo", |
| | | data() { |
| | | return { |
| | | // é®ç½©å± |
| | | loading: true, |
| | | titleName: '', |
| | | // éä¸æ°ç» |
| | | ids: [], |
| | | // éå个ç¦ç¨ |
| | | single: true, |
| | | // éå¤ä¸ªç¦ç¨ |
| | | multiple: true, |
| | | // æ¾ç¤ºæç´¢æ¡ä»¶ |
| | | showSearch: true, |
| | | // æ»æ¡æ° |
| | | total: 0, |
| | | // åºç¡BOMåä¿¡æ¯è¡¨æ ¼æ°æ® |
| | | bomChildInfoList: [], |
| | | // å¼¹åºå±æ é¢ |
| | | title: "", |
| | | querybomCode: "", |
| | | queryproductCode: "", |
| | | queryproductName: "", |
| | | // æ¯å¦æ¾ç¤ºå¼¹åºå± |
| | | open: false, |
| | | // æ¥è¯¢åæ° |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | productCode: null, |
| | | productName: null, |
| | | locationCode: null, |
| | | locationName: null, |
| | | materialCode: null, |
| | | materialName: null, |
| | | costQty: null, |
| | | unit: null, |
| | | bomCode: null, |
| | | }, |
| | | headerInformationData:{ |
| | | bomCode: "", |
| | | productCode: "", |
| | | productName: "" |
| | | }, |
| | | |
| | | // 表ååæ° |
| | | form: {}, |
| | | // 表åæ ¡éª |
| | | rules: { |
| | | id: [ |
| | | { required: true, message: "主é®idä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | let bomCode = this.$route.query.bomCode; |
| | | this.queryParams.bomCode = bomCode |
| | | this.querybomCode = bomCode |
| | | this.getList(); |
| | | this.headerInformation(); |
| | | this.getProcesses(); |
| | | }, |
| | | methods: { |
| | | /** è¿åæé®æä½ */ |
| | | handleClose() { |
| | | const obj = { path: "/main/bs/bomInfo" }; |
| | | this.$tab.closeOpenPage(obj); |
| | | }, |
| | | /** BOMè¡¨å¤´ä¿¡æ¯ */ |
| | | headerInformation() { |
| | | listBomInfo(this.queryParams).then(response => { |
| | | this.headerInformationData = response.rows[0]; |
| | | }); |
| | | }, |
| | | |
| | | getProcesses() { |
| | | listBomChildInfo(null).then(response => { |
| | | this.options = response.rows; |
| | | }); |
| | | }, |
| | | |
| | | /** æ¥è¯¢åºç¡BOMåä¿¡æ¯å表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | listBomChildInfo(this.queryParams).then(response => { |
| | | this.bomChildInfoList = response.rows; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | // åæ¶æé® |
| | | cancel() { |
| | | this.open = false; |
| | | this.reset(); |
| | | }, |
| | | // 表åéç½® |
| | | reset() { |
| | | this.form = { |
| | | id: null, |
| | | productCode: null, |
| | | productName: null, |
| | | locationCode: null, |
| | | locationName: null, |
| | | materialCode: null, |
| | | materialName: null, |
| | | costQty: null, |
| | | unit: null, |
| | | remark: null, |
| | | bomCode: null, |
| | | delFlag: 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 = "æ·»å åºç¡BOMåä¿¡æ¯"; |
| | | }, |
| | | /** ä¿®æ¹æé®æä½ */ |
| | | handleUpdate(row) { |
| | | this.reset(); |
| | | const id = row.id || this.ids |
| | | getBomChildInfo(id).then(response => { |
| | | this.form = response.data; |
| | | this.open = true; |
| | | this.title = "ä¿®æ¹åºç¡BOMåä¿¡æ¯"; |
| | | }); |
| | | }, |
| | | /** æ交æé® */ |
| | | submitForm() { |
| | | this.form.bomCode = this.querybomCode; |
| | | this.$refs["form"].validate(valid => { |
| | | if (valid) { |
| | | if (this.form.id != null) { |
| | | updateBomChildInfo(this.form).then(response => { |
| | | this.$modal.msgSuccess("ä¿®æ¹æå"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } else { |
| | | addBomChildInfo(this.form).then(response => { |
| | | this.$modal.msgSuccess("æ°å¢æå"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | /** å é¤æé®æä½ */ |
| | | handleDelete(row) { |
| | | const ids = row.id || this.ids; |
| | | this.$modal.confirm('æ¯å¦ç¡®è®¤å é¤').then(function() { |
| | | return delBomChildInfo(ids); |
| | | }).then(() => { |
| | | this.getList(); |
| | | this.$modal.msgSuccess("å é¤æå"); |
| | | }).catch(() => {}); |
| | | }, |
| | | /** 导åºæé®æä½ */ |
| | | handleExport() { |
| | | this.download('bs/bomChildInfo/export', { |
| | | ...this.queryParams |
| | | }, `bomChildInfo_${new Date().getTime()}.xlsx`) |
| | | } |
| | | } |
| | | }; |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <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-width="100px" label="BOMç¼ç " prop="bomCode"> |
| | | <el-input |
| | | v-model="queryParams.bomCode" |
| | | placeholder="请è¾å
¥BOMç¼ç " |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label-width="100px" label="BOMå称" prop="bomName"> |
| | | <el-input |
| | | v-model="queryParams.bomName" |
| | | placeholder="请è¾å
¥BOMå称" |
| | | 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 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-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:bomInfo: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:bomInfo: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:bomInfo: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:bomInfo:export']" |
| | | >导åº</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-table border v-loading="loading" :data="bomInfoList" @selection-change="handleSelectionChange" v-if="bomInfoList.length > 0"> |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column label="BOMç¼ç " align="center" prop="bomCode" > |
| | | <template slot-scope="scope"> |
| | | <router-link :to="{path: '/main/bom-data/index/', query: {bomCode: scope.row.bomCode} }" class="link-type"> |
| | | <span>{{ scope.row.bomCode }}</span> |
| | | </router-link> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column show-overflow-tooltip="true" label="BOMå称" align="center" prop="bomName" /> |
| | | <el-table-column show-overflow-tooltip="true" label="产åç¼ç " align="center" prop="productCode"/> |
| | | <el-table-column show-overflow-tooltip="true" label="产åå称" align="center" prop="productName" /> |
| | | <el-table-column show-overflow-tooltip="true" label="çæ¬" align="center" prop="version" /> |
| | | <el-table-column show-overflow-tooltip="true" label="ç¶æ" align="center" prop="status" /> |
| | | <el-table-column show-overflow-tooltip="true" label="å¤æ³¨" align="center" prop="remark" /> |
| | | </el-table> |
| | | |
| | | <pagination |
| | | v-show="total>0" |
| | | :total="total" |
| | | :page.sync="queryParams.pageNum" |
| | | :limit.sync="queryParams.pageSize" |
| | | @pagination="getList" |
| | | /> |
| | | |
| | | <!-- æ·»å æä¿®æ¹åºç¡BOM对è¯æ¡ --> |
| | | <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="BOMç¼ç " prop="bomCode"> |
| | | <el-input v-model="form.bomCode" placeholder="请è¾å
¥BOMç¼ç " /> |
| | | </el-form-item> |
| | | <el-form-item label="BOMå称" prop="bomName"> |
| | | <el-input v-model="form.bomName" placeholder="请è¾å
¥BOMå称" /> |
| | | </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="remark"> |
| | | <el-input v-model="form.remark" type="textarea" 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 { listBomInfo, getBomInfo, delBomInfo, addBomInfo, updateBomInfo } from "@/api/main/bs/bomInfo"; |
| | | |
| | | export default { |
| | | name: "BomInfo", |
| | | data() { |
| | | return { |
| | | // é®ç½©å± |
| | | loading: true, |
| | | // éä¸æ°ç» |
| | | ids: [], |
| | | // éå个ç¦ç¨ |
| | | single: true, |
| | | // éå¤ä¸ªç¦ç¨ |
| | | multiple: true, |
| | | // æ¾ç¤ºæç´¢æ¡ä»¶ |
| | | showSearch: true, |
| | | // æ»æ¡æ° |
| | | total: 0, |
| | | // åºç¡BOMè¡¨æ ¼æ°æ® |
| | | bomInfoList: [], |
| | | // å¼¹åºå±æ é¢ |
| | | title: "", |
| | | // æ¯å¦æ¾ç¤ºå¼¹åºå± |
| | | open: false, |
| | | // æ¥è¯¢åæ° |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | bomCode: null, |
| | | bomName: null, |
| | | productCode: null, |
| | | productName: null, |
| | | version: null, |
| | | status: null, |
| | | createUser: null, |
| | | updateUser: null, |
| | | dataSource: null, |
| | | }, |
| | | // 表ååæ° |
| | | form: {}, |
| | | // 表åæ ¡éª |
| | | rules: { |
| | | id: [ |
| | | { required: true, message: "主é®idä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | }, |
| | | methods: { |
| | | /** æ¥è¯¢åºç¡BOMå表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | listBomInfo(this.queryParams).then(response => { |
| | | this.bomInfoList = response.rows; |
| | | console.log(this.bomInfoList) |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | |
| | | }); |
| | | }, |
| | | // åæ¶æé® |
| | | cancel() { |
| | | this.open = false; |
| | | this.reset(); |
| | | }, |
| | | // 表åéç½® |
| | | reset() { |
| | | this.form = { |
| | | id: null, |
| | | bomCode: null, |
| | | bomName: null, |
| | | productCode: null, |
| | | productName: null, |
| | | version: null, |
| | | status: null, |
| | | remark: null, |
| | | createUser: null, |
| | | createTime: null, |
| | | updateUser: null, |
| | | updateTime: null, |
| | | dataSource: null, |
| | | delFlag: 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 = "æ·»å åºç¡BOM"; |
| | | }, |
| | | /** ä¿®æ¹æé®æä½ */ |
| | | handleUpdate(row) { |
| | | this.reset(); |
| | | const id = row.id || this.ids |
| | | getBomInfo(id).then(response => { |
| | | this.form = response.data; |
| | | this.open = true; |
| | | this.title = "ä¿®æ¹åºç¡BOM"; |
| | | }); |
| | | }, |
| | | /** æ交æé® */ |
| | | submitForm() { |
| | | this.$refs["form"].validate(valid => { |
| | | if (valid) { |
| | | if (this.form.id != null) { |
| | | updateBomInfo(this.form).then(response => { |
| | | this.$modal.msgSuccess("ä¿®æ¹æå"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } else { |
| | | addBomInfo(this.form).then(response => { |
| | | this.$modal.msgSuccess("æ°å¢æå"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | /** å é¤æé®æä½ */ |
| | | handleDelete(row) { |
| | | const ids = row.id || this.ids; |
| | | this.$modal.confirm('æ¯å¦ç¡®è®¤å é¤').then(function() { |
| | | return delBomInfo(ids); |
| | | }).then(() => { |
| | | this.getList(); |
| | | this.$modal.msgSuccess("å é¤æå"); |
| | | }).catch(() => {}); |
| | | }, |
| | | /** 导åºæé®æä½ */ |
| | | handleExport() { |
| | | this.download('bs/bomInfo/export', { |
| | | ...this.queryParams |
| | | }, `bomInfo_${new Date().getTime()}.xlsx`) |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="ééå°å" prop="node"> |
| | | <el-input |
| | | v-model="queryParams.node" |
| | |
| | | <el-table-column label="å·¥ä½ç¼ç " align="center" prop="locationCode" /> |
| | | <el-table-column label="åæ°ç¼ç " align="center" prop="paramCode" /> |
| | | <el-table-column label="åæ°å称" align="center" prop="paramName" /> |
| | | <el-table-column label="åæ°éç¼ç " align="center" prop="paramSetCode" /> |
| | | <el-table-column label="åæ°éå称" align="center" prop="paramSetName" /> |
| | | <el-table-column width="90px" label="åæ°éç¼ç " align="center" prop="paramSetCode" /> |
| | | <el-table-column width="90px" label="åæ°éå称" align="center" prop="paramSetName" /> |
| | | <el-table-column label="ééå°å" align="center" prop="node" /> |
| | | <el-table-column label="ééç±»å" align="center" prop="type" /> |
| | | <el-table-column label="åä½" align="center" prop="unit" /> |
| | |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="ééç±»å" prop="type"> |
| | | <el-input |
| | | v-model="queryParams.node" |
| | | placeholder="请è¾å
¥ééç±»å" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | <el-select v-model="queryParams.type" placeholder="请éæ©è®¢é
ç¶æ" clearable> |
| | | <el-option |
| | | v-for="dict in dict.type.collection_type" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="订é
" prop="subscribe"> |
| | | <el-select v-model="queryParams.subscribe" placeholder="请éæ©è®¢é
ç¶æ" clearable> |
| | | <el-option |
| | | v-for="dict in dict.type.sys_yes_no" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | <el-form-item style="float: right" > |
| | |
| | | v-hasPermi="['sc:opcConf:export']" |
| | | >导åº</el-button> |
| | | </el-col> |
| | | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| | | </el-row> |
| | | |
| | | <el-table v-loading="loading" border :data="opcConfList" @selection-change="handleSelectionChange"> |
| | |
| | | <el-table-column label="å·¥ä½ç¼ç " align="center" prop="locationCode" /> |
| | | <el-table-column label="å·¥ä½å称" align="center" prop="locationName" /> |
| | | <el-table-column label="å°å" align="center" prop="node" /> |
| | | <el-table-column label="ééç±»å" align="center" prop="type" /> |
| | | <el-table-column label="ééç±»å" align="center" prop="type" > |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.collection_type" :value="scope.row.type"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æ¯å¦è®¢é
" align="center" prop="subscribe" > |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.subscribe"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æä½" align="center" class-name="small-padding fixed-width"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="mini" |
| | | style="width: 72px" |
| | | type="success" |
| | | plain |
| | | icon="el-icon-edit" |
| | | @click="handleUpdate(scope.row)" |
| | | v-hasPermi="['sc:opcConf:edit']" |
| | | >ä¿®æ¹</el-button> |
| | | <el-button |
| | | size="mini" |
| | | style="width: 72px" |
| | | type="danger" |
| | | plain |
| | | icon="el-icon-delete" |
| | | @click="handleDelete(scope.row)" |
| | | v-hasPermi="['sc:opcConf:remove']" |
| | | >å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | <el-input v-model="form.node" placeholder="请è¾å
¥å°å" /> |
| | | </el-form-item> |
| | | <el-form-item label="ééç±»å" prop="type"> |
| | | <el-input v-model="form.type" placeholder="请è¾å
¥ééç±»å" /> |
| | | <el-select v-model="form.type" placeholder="请éæ©ééç±»å" > |
| | | <el-option |
| | | v-for="dict in dict.type.collection_type" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="æ¯å¦è®¢é
" prop="subscribe"> |
| | | <el-radio-group v-model="form.subscribe"> |
| | |
| | | |
| | | export default { |
| | | name: "OpcConf", |
| | | dicts: ['sys_yes_no'], |
| | | dicts: ['sys_yes_no','collection_type'], |
| | | data() { |
| | | return { |
| | | advancedSearchVisible: false, |
| | |
| | | locationName: [ |
| | | { required: true, message: "å·¥ä½å称ä¸è½ä¸ºç©º", trigger: "blur" }, |
| | | ], |
| | | subscribe: [ |
| | | { required: true, message: "订é
ä¸è½ä¸ºç©º", trigger: "blur" }, |
| | | ], |
| | | node: [ |
| | | { required: true, message: "å°åä¸è½ä¸ºç©º", trigger: "blur" }, |
| | | { pattern: /^[a-zA-Z0-9]*$/, message: "å°åä¸è½å
å«ä¸æå符", trigger: "blur" } |
| | | ], |
| | | } |
| | | }; |