| | |
| | | </template> |
| | | </el-table-column> |
| | | #elseif($column.list && "" != $javaField) |
| | | <el-table-column show-overflow-tooltip="true" label="${comment}" align="center" prop="${javaField}" /> |
| | | <el-table-column :show-overflow-tooltip="true" label="${comment}" align="center" prop="${javaField}" /> |
| | | #end |
| | | #end |
| | | ## <el-table-column label="æä½" align="center" class-name="small-padding fixed-width"> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.billion.main.bs.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.billion.common.annotation.Log; |
| | | import com.billion.common.core.controller.BaseController; |
| | | import com.billion.common.core.domain.AjaxResult; |
| | | import com.billion.common.enums.BusinessType; |
| | | import com.billion.main.bs.domain.BsLocationInfo; |
| | | import com.billion.main.bs.service.IBsLocationInfoService; |
| | | import com.billion.common.utils.poi.ExcelUtil; |
| | | import com.billion.common.core.page.TableDataInfo; |
| | | |
| | | /** |
| | | * å·¥ä½ä¿¡æ¯Controller |
| | | * |
| | | * @author Billion-Yi |
| | | * @date 2024-11-26 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/bs/locationInfo") |
| | | public class BsLocationInfoController extends BaseController |
| | | { |
| | | @Autowired |
| | | private IBsLocationInfoService bsLocationInfoService; |
| | | |
| | | /** |
| | | * æ¥è¯¢å·¥ä½ä¿¡æ¯å表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('bs:locationInfo:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(BsLocationInfo bsLocationInfo) |
| | | { |
| | | startPage(); |
| | | List<BsLocationInfo> list = bsLocationInfoService.selectBsLocationInfoList(bsLocationInfo); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 导åºå·¥ä½ä¿¡æ¯å表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('bs:locationInfo:export')") |
| | | @Log(title = "å·¥ä½ä¿¡æ¯", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, BsLocationInfo bsLocationInfo) |
| | | { |
| | | List<BsLocationInfo> list = bsLocationInfoService.selectBsLocationInfoList(bsLocationInfo); |
| | | ExcelUtil<BsLocationInfo> util = new ExcelUtil<BsLocationInfo>(BsLocationInfo.class); |
| | | util.exportExcel(response, list, "å·¥ä½ä¿¡æ¯æ°æ®"); |
| | | } |
| | | |
| | | /** |
| | | * è·åå·¥ä½ä¿¡æ¯è¯¦ç»ä¿¡æ¯ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('bs:locationInfo:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) |
| | | { |
| | | return success(bsLocationInfoService.selectBsLocationInfoById(id)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢å·¥ä½ä¿¡æ¯ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('bs:locationInfo:add')") |
| | | @Log(title = "å·¥ä½ä¿¡æ¯", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody BsLocationInfo bsLocationInfo) |
| | | { |
| | | return toAjax(bsLocationInfoService.insertBsLocationInfo(bsLocationInfo)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹å·¥ä½ä¿¡æ¯ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('bs:locationInfo:edit')") |
| | | @Log(title = "å·¥ä½ä¿¡æ¯", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody BsLocationInfo bsLocationInfo) |
| | | { |
| | | return toAjax(bsLocationInfoService.updateBsLocationInfo(bsLocationInfo)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤å·¥ä½ä¿¡æ¯ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('bs:locationInfo:remove')") |
| | | @Log(title = "å·¥ä½ä¿¡æ¯", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | | { |
| | | return toAjax(bsLocationInfoService.deleteBsLocationInfoByIds(ids)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.billion.main.bs.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.billion.common.annotation.Log; |
| | | import com.billion.common.core.controller.BaseController; |
| | | import com.billion.common.core.domain.AjaxResult; |
| | | import com.billion.common.enums.BusinessType; |
| | | import com.billion.main.bs.domain.BsMaterialInfo; |
| | | import com.billion.main.bs.service.IBsMaterialInfoService; |
| | | import com.billion.common.utils.poi.ExcelUtil; |
| | | import com.billion.common.core.page.TableDataInfo; |
| | | |
| | | /** |
| | | * ç©æä¿¡æ¯Controller |
| | | * |
| | | * @author Billion-Yi |
| | | * @date 2024-11-26 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/bs/materialInfo") |
| | | public class BsMaterialInfoController extends BaseController |
| | | { |
| | | @Autowired |
| | | private IBsMaterialInfoService bsMaterialInfoService; |
| | | |
| | | /** |
| | | * æ¥è¯¢ç©æä¿¡æ¯å表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('bs:materialInfo:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(BsMaterialInfo bsMaterialInfo) |
| | | { |
| | | startPage(); |
| | | List<BsMaterialInfo> list = bsMaterialInfoService.selectBsMaterialInfoList(bsMaterialInfo); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 导åºç©æä¿¡æ¯å表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('bs:materialInfo:export')") |
| | | @Log(title = "ç©æä¿¡æ¯", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, BsMaterialInfo bsMaterialInfo) |
| | | { |
| | | List<BsMaterialInfo> list = bsMaterialInfoService.selectBsMaterialInfoList(bsMaterialInfo); |
| | | ExcelUtil<BsMaterialInfo> util = new ExcelUtil<BsMaterialInfo>(BsMaterialInfo.class); |
| | | util.exportExcel(response, list, "ç©æä¿¡æ¯æ°æ®"); |
| | | } |
| | | |
| | | /** |
| | | * è·åç©æä¿¡æ¯è¯¦ç»ä¿¡æ¯ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('bs:materialInfo:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) |
| | | { |
| | | return success(bsMaterialInfoService.selectBsMaterialInfoById(id)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢ç©æä¿¡æ¯ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('bs:materialInfo:add')") |
| | | @Log(title = "ç©æä¿¡æ¯", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody BsMaterialInfo bsMaterialInfo) |
| | | { |
| | | return toAjax(bsMaterialInfoService.insertBsMaterialInfo(bsMaterialInfo)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹ç©æä¿¡æ¯ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('bs:materialInfo:edit')") |
| | | @Log(title = "ç©æä¿¡æ¯", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody BsMaterialInfo bsMaterialInfo) |
| | | { |
| | | return toAjax(bsMaterialInfoService.updateBsMaterialInfo(bsMaterialInfo)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤ç©æä¿¡æ¯ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('bs:materialInfo:remove')") |
| | | @Log(title = "ç©æä¿¡æ¯", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | | { |
| | | return toAjax(bsMaterialInfoService.deleteBsMaterialInfoByIds(ids)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.billion.main.bs.domain; |
| | | |
| | | import lombok.Data; |
| | | import org.apache.commons.lang3.builder.ToStringBuilder; |
| | | import org.apache.commons.lang3.builder.ToStringStyle; |
| | | import com.billion.common.annotation.Excel; |
| | | import com.billion.main.common.BaseEntity; |
| | | |
| | | /** |
| | | * å·¥ä½ä¿¡æ¯å¯¹è±¡ bs_location_info |
| | | * |
| | | * @author Billion-Yi |
| | | * @date 2024-11-26 |
| | | */ |
| | | @Data |
| | | public class BsLocationInfo extends BaseEntity |
| | | { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** 主é®id */ |
| | | private Long id; |
| | | |
| | | /** å·¥ä½ç¼å· */ |
| | | @Excel(name = "å·¥ä½ç¼å·") |
| | | private String locationCode; |
| | | |
| | | /** å·¥ä½åç§° */ |
| | | @Excel(name = "å·¥ä½åç§°") |
| | | private String locationName; |
| | | |
| | | /** å·¥ä½ç±»åï¼1èªå¨2åèªå¨3æå¨ï¼ */ |
| | | @Excel(name = "å·¥ä½ç±»å", readConverterExp = "1=èªå¨2åèªå¨3æå¨") |
| | | private String locationType; |
| | | |
| | | /** 产线ç¼å· */ |
| | | @Excel(name = "产线ç¼å·") |
| | | private String lineCode; |
| | | |
| | | /** 夿³¨ */ |
| | | @Excel(name = "夿³¨") |
| | | private String remarks; |
| | | |
| | | /** é»è¾å é¤ */ |
| | | private String delFlag; |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.billion.main.bs.domain; |
| | | |
| | | import lombok.Data; |
| | | import org.apache.commons.lang3.builder.ToStringBuilder; |
| | | import org.apache.commons.lang3.builder.ToStringStyle; |
| | | import com.billion.common.annotation.Excel; |
| | | import com.billion.main.common.BaseEntity; |
| | | |
| | | /** |
| | | * ç©æä¿¡æ¯å¯¹è±¡ bs_material_info |
| | | * |
| | | * @author Billion-Yi |
| | | * @date 2024-11-26 |
| | | */ |
| | | @Data |
| | | public class BsMaterialInfo extends BaseEntity |
| | | { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** 主é®id */ |
| | | private Long id; |
| | | |
| | | /** ç©æç¼å· */ |
| | | @Excel(name = "ç©æç¼å·") |
| | | private String materialCode; |
| | | |
| | | /** ç©æåç§° */ |
| | | @Excel(name = "ç©æåç§°") |
| | | private String materialName; |
| | | |
| | | /** è§å¾ */ |
| | | @Excel(name = "è§å¾") |
| | | private String materialView; |
| | | |
| | | /** ç§ç±» */ |
| | | @Excel(name = "ç§ç±»") |
| | | private String typeZ; |
| | | |
| | | /** ç±»å */ |
| | | @Excel(name = "ç±»å") |
| | | private String typeL; |
| | | |
| | | /** åä½ */ |
| | | @Excel(name = "åä½") |
| | | private String unit; |
| | | |
| | | /** çæ¬ */ |
| | | @Excel(name = "çæ¬") |
| | | private String version; |
| | | |
| | | /** ç¶æ */ |
| | | @Excel(name = "ç¶æ") |
| | | private String status; |
| | | |
| | | /** åå */ |
| | | @Excel(name = "åå") |
| | | private String supplier; |
| | | |
| | | /** æ°æ®æ¥æº */ |
| | | @Excel(name = "æ°æ®æ¥æº") |
| | | private String dataSource; |
| | | |
| | | /** é»è¾å é¤ */ |
| | | private String delFlag; |
| | | |
| | | /** 夿³¨ */ |
| | | @Excel(name = "夿³¨") |
| | | private String remark; |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.billion.main.bs.mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.billion.main.bs.domain.BsLocationInfo; |
| | | |
| | | /** |
| | | * å·¥ä½ä¿¡æ¯Mapperæ¥å£ |
| | | * |
| | | * @author Billion-Yi |
| | | * @date 2024-11-26 |
| | | */ |
| | | public interface BsLocationInfoMapper extends BaseMapper<BsLocationInfo> |
| | | { |
| | | /** |
| | | * æ¥è¯¢å·¥ä½ä¿¡æ¯ |
| | | * |
| | | * @param id å·¥ä½ä¿¡æ¯ä¸»é® |
| | | * @return å·¥ä½ä¿¡æ¯ |
| | | */ |
| | | public BsLocationInfo selectBsLocationInfoById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢å·¥ä½ä¿¡æ¯å表 |
| | | * |
| | | * @param bsLocationInfo å·¥ä½ä¿¡æ¯ |
| | | * @return å·¥ä½ä¿¡æ¯éå |
| | | */ |
| | | public List<BsLocationInfo> selectBsLocationInfoList(BsLocationInfo bsLocationInfo); |
| | | |
| | | /** |
| | | * æ°å¢å·¥ä½ä¿¡æ¯ |
| | | * |
| | | * @param bsLocationInfo å·¥ä½ä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | public int insertBsLocationInfo(BsLocationInfo bsLocationInfo); |
| | | |
| | | /** |
| | | * ä¿®æ¹å·¥ä½ä¿¡æ¯ |
| | | * |
| | | * @param bsLocationInfo å·¥ä½ä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | public int updateBsLocationInfo(BsLocationInfo bsLocationInfo); |
| | | |
| | | /** |
| | | * å é¤å·¥ä½ä¿¡æ¯ |
| | | * |
| | | * @param id å·¥ä½ä¿¡æ¯ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteBsLocationInfoById(Long id); |
| | | |
| | | /** |
| | | * æ¹éå é¤å·¥ä½ä¿¡æ¯ |
| | | * |
| | | * @param ids éè¦å é¤çæ°æ®ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteBsLocationInfoByIds(Long[] ids); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.billion.main.bs.mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.billion.main.bs.domain.BsMaterialInfo; |
| | | |
| | | /** |
| | | * ç©æä¿¡æ¯Mapperæ¥å£ |
| | | * |
| | | * @author Billion-Yi |
| | | * @date 2024-11-26 |
| | | */ |
| | | public interface BsMaterialInfoMapper extends BaseMapper<BsMaterialInfo> |
| | | { |
| | | /** |
| | | * æ¥è¯¢ç©æä¿¡æ¯ |
| | | * |
| | | * @param id ç©æä¿¡æ¯ä¸»é® |
| | | * @return ç©æä¿¡æ¯ |
| | | */ |
| | | public BsMaterialInfo selectBsMaterialInfoById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢ç©æä¿¡æ¯å表 |
| | | * |
| | | * @param bsMaterialInfo ç©æä¿¡æ¯ |
| | | * @return ç©æä¿¡æ¯éå |
| | | */ |
| | | public List<BsMaterialInfo> selectBsMaterialInfoList(BsMaterialInfo bsMaterialInfo); |
| | | |
| | | /** |
| | | * æ°å¢ç©æä¿¡æ¯ |
| | | * |
| | | * @param bsMaterialInfo ç©æä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | public int insertBsMaterialInfo(BsMaterialInfo bsMaterialInfo); |
| | | |
| | | /** |
| | | * ä¿®æ¹ç©æä¿¡æ¯ |
| | | * |
| | | * @param bsMaterialInfo ç©æä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | public int updateBsMaterialInfo(BsMaterialInfo bsMaterialInfo); |
| | | |
| | | /** |
| | | * å é¤ç©æä¿¡æ¯ |
| | | * |
| | | * @param id ç©æä¿¡æ¯ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteBsMaterialInfoById(Long id); |
| | | |
| | | /** |
| | | * æ¹éå é¤ç©æä¿¡æ¯ |
| | | * |
| | | * @param ids éè¦å é¤çæ°æ®ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteBsMaterialInfoByIds(Long[] ids); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.billion.main.bs.service; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.billion.main.bs.domain.BsLocationInfo; |
| | | |
| | | /** |
| | | * å·¥ä½ä¿¡æ¯Serviceæ¥å£ |
| | | * |
| | | * @author Billion-Yi |
| | | * @date 2024-11-26 |
| | | */ |
| | | public interface IBsLocationInfoService extends IService<BsLocationInfo> |
| | | { |
| | | /** |
| | | * æ¥è¯¢å·¥ä½ä¿¡æ¯ |
| | | * |
| | | * @param id å·¥ä½ä¿¡æ¯ä¸»é® |
| | | * @return å·¥ä½ä¿¡æ¯ |
| | | */ |
| | | public BsLocationInfo selectBsLocationInfoById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢å·¥ä½ä¿¡æ¯å表 |
| | | * |
| | | * @param bsLocationInfo å·¥ä½ä¿¡æ¯ |
| | | * @return å·¥ä½ä¿¡æ¯éå |
| | | */ |
| | | public List<BsLocationInfo> selectBsLocationInfoList(BsLocationInfo bsLocationInfo); |
| | | |
| | | /** |
| | | * æ°å¢å·¥ä½ä¿¡æ¯ |
| | | * |
| | | * @param bsLocationInfo å·¥ä½ä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | public int insertBsLocationInfo(BsLocationInfo bsLocationInfo); |
| | | |
| | | /** |
| | | * ä¿®æ¹å·¥ä½ä¿¡æ¯ |
| | | * |
| | | * @param bsLocationInfo å·¥ä½ä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | public int updateBsLocationInfo(BsLocationInfo bsLocationInfo); |
| | | |
| | | /** |
| | | * æ¹éå é¤å·¥ä½ä¿¡æ¯ |
| | | * |
| | | * @param ids éè¦å é¤çå·¥ä½ä¿¡æ¯ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteBsLocationInfoByIds(Long[] ids); |
| | | |
| | | /** |
| | | * å é¤å·¥ä½ä¿¡æ¯ä¿¡æ¯ |
| | | * |
| | | * @param id å·¥ä½ä¿¡æ¯ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteBsLocationInfoById(Long id); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.billion.main.bs.service; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.billion.main.bs.domain.BsMaterialInfo; |
| | | |
| | | /** |
| | | * ç©æä¿¡æ¯Serviceæ¥å£ |
| | | * |
| | | * @author Billion-Yi |
| | | * @date 2024-11-26 |
| | | */ |
| | | public interface IBsMaterialInfoService extends IService<BsMaterialInfo> |
| | | { |
| | | /** |
| | | * æ¥è¯¢ç©æä¿¡æ¯ |
| | | * |
| | | * @param id ç©æä¿¡æ¯ä¸»é® |
| | | * @return ç©æä¿¡æ¯ |
| | | */ |
| | | public BsMaterialInfo selectBsMaterialInfoById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢ç©æä¿¡æ¯å表 |
| | | * |
| | | * @param bsMaterialInfo ç©æä¿¡æ¯ |
| | | * @return ç©æä¿¡æ¯éå |
| | | */ |
| | | public List<BsMaterialInfo> selectBsMaterialInfoList(BsMaterialInfo bsMaterialInfo); |
| | | |
| | | /** |
| | | * æ°å¢ç©æä¿¡æ¯ |
| | | * |
| | | * @param bsMaterialInfo ç©æä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | public int insertBsMaterialInfo(BsMaterialInfo bsMaterialInfo); |
| | | |
| | | /** |
| | | * ä¿®æ¹ç©æä¿¡æ¯ |
| | | * |
| | | * @param bsMaterialInfo ç©æä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | public int updateBsMaterialInfo(BsMaterialInfo bsMaterialInfo); |
| | | |
| | | /** |
| | | * æ¹éå é¤ç©æä¿¡æ¯ |
| | | * |
| | | * @param ids éè¦å é¤çç©æä¿¡æ¯ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteBsMaterialInfoByIds(Long[] ids); |
| | | |
| | | /** |
| | | * å é¤ç©æä¿¡æ¯ä¿¡æ¯ |
| | | * |
| | | * @param id ç©æä¿¡æ¯ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteBsMaterialInfoById(Long id); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.billion.main.bs.service.impl; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.billion.common.utils.DateUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import com.billion.main.bs.mapper.BsLocationInfoMapper; |
| | | import com.billion.main.bs.domain.BsLocationInfo; |
| | | import com.billion.main.bs.service.IBsLocationInfoService; |
| | | |
| | | /** |
| | | * å·¥ä½ä¿¡æ¯Serviceä¸å¡å±å¤ç |
| | | * |
| | | * @author Billion-Yi |
| | | * @date 2024-11-26 |
| | | */ |
| | | @Service |
| | | public class BsLocationInfoServiceImpl extends ServiceImpl<BsLocationInfoMapper, BsLocationInfo> implements IBsLocationInfoService |
| | | { |
| | | @Autowired |
| | | private BsLocationInfoMapper bsLocationInfoMapper; |
| | | |
| | | /** |
| | | * æ¥è¯¢å·¥ä½ä¿¡æ¯ |
| | | * |
| | | * @param id å·¥ä½ä¿¡æ¯ä¸»é® |
| | | * @return å·¥ä½ä¿¡æ¯ |
| | | */ |
| | | @Override |
| | | public BsLocationInfo selectBsLocationInfoById(Long id) |
| | | { |
| | | return bsLocationInfoMapper.selectBsLocationInfoById(id); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢å·¥ä½ä¿¡æ¯å表 |
| | | * |
| | | * @param bsLocationInfo å·¥ä½ä¿¡æ¯ |
| | | * @return å·¥ä½ä¿¡æ¯ |
| | | */ |
| | | @Override |
| | | public List<BsLocationInfo> selectBsLocationInfoList(BsLocationInfo bsLocationInfo) |
| | | { |
| | | return bsLocationInfoMapper.selectBsLocationInfoList(bsLocationInfo); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢å·¥ä½ä¿¡æ¯ |
| | | * |
| | | * @param bsLocationInfo å·¥ä½ä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int insertBsLocationInfo(BsLocationInfo bsLocationInfo) |
| | | { |
| | | bsLocationInfo.setCreateTime(DateUtils.getNowDate()); |
| | | return bsLocationInfoMapper.insertBsLocationInfo(bsLocationInfo); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹å·¥ä½ä¿¡æ¯ |
| | | * |
| | | * @param bsLocationInfo å·¥ä½ä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int updateBsLocationInfo(BsLocationInfo bsLocationInfo) |
| | | { |
| | | bsLocationInfo.setUpdateTime(DateUtils.getNowDate()); |
| | | return bsLocationInfoMapper.updateBsLocationInfo(bsLocationInfo); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤å·¥ä½ä¿¡æ¯ |
| | | * |
| | | * @param ids éè¦å é¤çå·¥ä½ä¿¡æ¯ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteBsLocationInfoByIds(Long[] ids) |
| | | { |
| | | return bsLocationInfoMapper.deleteBsLocationInfoByIds(ids); |
| | | } |
| | | |
| | | /** |
| | | * å é¤å·¥ä½ä¿¡æ¯ä¿¡æ¯ |
| | | * |
| | | * @param id å·¥ä½ä¿¡æ¯ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteBsLocationInfoById(Long id) |
| | | { |
| | | return bsLocationInfoMapper.deleteBsLocationInfoById(id); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.billion.main.bs.service.impl; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.billion.common.utils.DateUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import com.billion.main.bs.mapper.BsMaterialInfoMapper; |
| | | import com.billion.main.bs.domain.BsMaterialInfo; |
| | | import com.billion.main.bs.service.IBsMaterialInfoService; |
| | | |
| | | /** |
| | | * ç©æä¿¡æ¯Serviceä¸å¡å±å¤ç |
| | | * |
| | | * @author Billion-Yi |
| | | * @date 2024-11-26 |
| | | */ |
| | | @Service |
| | | public class BsMaterialInfoServiceImpl extends ServiceImpl<BsMaterialInfoMapper, BsMaterialInfo> implements IBsMaterialInfoService |
| | | { |
| | | @Autowired |
| | | private BsMaterialInfoMapper bsMaterialInfoMapper; |
| | | |
| | | /** |
| | | * æ¥è¯¢ç©æä¿¡æ¯ |
| | | * |
| | | * @param id ç©æä¿¡æ¯ä¸»é® |
| | | * @return ç©æä¿¡æ¯ |
| | | */ |
| | | @Override |
| | | public BsMaterialInfo selectBsMaterialInfoById(Long id) |
| | | { |
| | | return bsMaterialInfoMapper.selectBsMaterialInfoById(id); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢ç©æä¿¡æ¯å表 |
| | | * |
| | | * @param bsMaterialInfo ç©æä¿¡æ¯ |
| | | * @return ç©æä¿¡æ¯ |
| | | */ |
| | | @Override |
| | | public List<BsMaterialInfo> selectBsMaterialInfoList(BsMaterialInfo bsMaterialInfo) |
| | | { |
| | | return bsMaterialInfoMapper.selectBsMaterialInfoList(bsMaterialInfo); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢ç©æä¿¡æ¯ |
| | | * |
| | | * @param bsMaterialInfo ç©æä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int insertBsMaterialInfo(BsMaterialInfo bsMaterialInfo) |
| | | { |
| | | bsMaterialInfo.setCreateTime(DateUtils.getNowDate()); |
| | | return bsMaterialInfoMapper.insertBsMaterialInfo(bsMaterialInfo); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹ç©æä¿¡æ¯ |
| | | * |
| | | * @param bsMaterialInfo ç©æä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int updateBsMaterialInfo(BsMaterialInfo bsMaterialInfo) |
| | | { |
| | | bsMaterialInfo.setUpdateTime(DateUtils.getNowDate()); |
| | | return bsMaterialInfoMapper.updateBsMaterialInfo(bsMaterialInfo); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤ç©æä¿¡æ¯ |
| | | * |
| | | * @param ids éè¦å é¤çç©æä¿¡æ¯ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteBsMaterialInfoByIds(Long[] ids) |
| | | { |
| | | return bsMaterialInfoMapper.deleteBsMaterialInfoByIds(ids); |
| | | } |
| | | |
| | | /** |
| | | * å é¤ç©æä¿¡æ¯ä¿¡æ¯ |
| | | * |
| | | * @param id ç©æä¿¡æ¯ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteBsMaterialInfoById(Long id) |
| | | { |
| | | return bsMaterialInfoMapper.deleteBsMaterialInfoById(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.BsLocationInfoMapper"> |
| | | |
| | | <resultMap type="BsLocationInfo" id="BsLocationInfoResult"> |
| | | <result property="id" column="id" /> |
| | | <result property="locationCode" column="location_code" /> |
| | | <result property="locationName" column="location_name" /> |
| | | <result property="locationType" column="location_type" /> |
| | | <result property="lineCode" column="line_code" /> |
| | | <result property="remarks" column="remarks" /> |
| | | <result property="createBy" column="create_by" /> |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="updateBy" column="update_by" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="delFlag" column="del_flag" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectBsLocationInfoVo"> |
| | | select id, location_code, location_name, location_type, line_code, remarks, create_by, create_time, update_by, update_time, del_flag from bs_location_info |
| | | </sql> |
| | | |
| | | <select id="selectBsLocationInfoList" parameterType="BsLocationInfo" resultMap="BsLocationInfoResult"> |
| | | <include refid="selectBsLocationInfoVo"/> |
| | | <where> |
| | | <if test="locationCode != null and locationCode != ''"> and location_code like concat('%', #{locationCode}, '%')</if> |
| | | <if test="locationName != null and locationName != ''"> and location_name like concat('%', #{locationName}, '%')</if> |
| | | <if test="locationType != null and locationType != ''"> and location_type = #{locationType}</if> |
| | | <if test="lineCode != null and lineCode != ''"> and line_code like concat('%', #{lineCode}, '%')</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectBsLocationInfoById" parameterType="Long" resultMap="BsLocationInfoResult"> |
| | | <include refid="selectBsLocationInfoVo"/> |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertBsLocationInfo" parameterType="BsLocationInfo"> |
| | | insert into bs_location_info |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | | <if test="locationCode != null">location_code,</if> |
| | | <if test="locationName != null">location_name,</if> |
| | | <if test="locationType != null">location_type,</if> |
| | | <if test="lineCode != null">line_code,</if> |
| | | <if test="remarks != null">remarks,</if> |
| | | <if test="createBy != null">create_by,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | | <if test="updateBy != null">update_by,</if> |
| | | <if test="updateTime != null">update_time,</if> |
| | | <if test="delFlag != null">del_flag,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id},</if> |
| | | <if test="locationCode != null">#{locationCode},</if> |
| | | <if test="locationName != null">#{locationName},</if> |
| | | <if test="locationType != null">#{locationType},</if> |
| | | <if test="lineCode != null">#{lineCode},</if> |
| | | <if test="remarks != null">#{remarks},</if> |
| | | <if test="createBy != null">#{createBy},</if> |
| | | <if test="createTime != null">#{createTime},</if> |
| | | <if test="updateBy != null">#{updateBy},</if> |
| | | <if test="updateTime != null">#{updateTime},</if> |
| | | <if test="delFlag != null">#{delFlag},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateBsLocationInfo" parameterType="BsLocationInfo"> |
| | | update bs_location_info |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="locationCode != null">location_code = #{locationCode},</if> |
| | | <if test="locationName != null">location_name = #{locationName},</if> |
| | | <if test="locationType != null">location_type = #{locationType},</if> |
| | | <if test="lineCode != null">line_code = #{lineCode},</if> |
| | | <if test="remarks != null">remarks = #{remarks},</if> |
| | | <if test="createBy != null">create_by = #{createBy},</if> |
| | | <if test="createTime != null">create_time = #{createTime},</if> |
| | | <if test="updateBy != null">update_by = #{updateBy},</if> |
| | | <if test="updateTime != null">update_time = #{updateTime},</if> |
| | | <if test="delFlag != null">del_flag = #{delFlag},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteBsLocationInfoById" parameterType="Long"> |
| | | delete from bs_location_info where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteBsLocationInfoByIds" parameterType="String"> |
| | | delete from bs_location_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.BsMaterialInfoMapper"> |
| | | |
| | | <resultMap type="BsMaterialInfo" id="BsMaterialInfoResult"> |
| | | <result property="id" column="id" /> |
| | | <result property="materialCode" column="material_code" /> |
| | | <result property="materialName" column="material_name" /> |
| | | <result property="materialView" column="material_view" /> |
| | | <result property="typeZ" column="type_z" /> |
| | | <result property="typeL" column="type_l" /> |
| | | <result property="unit" column="unit" /> |
| | | <result property="version" column="version" /> |
| | | <result property="status" column="status" /> |
| | | <result property="supplier" column="supplier" /> |
| | | <result property="remark" column="remark" /> |
| | | <result property="dataSource" column="data_source" /> |
| | | <result property="createBy" column="create_by" /> |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="updateBy" column="update_by" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="delFlag" column="del_flag" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectBsMaterialInfoVo"> |
| | | select id, material_code, material_name, material_view, type_z, type_l, unit, version, status, supplier, remark, data_source, create_by, create_time, update_by, update_time, del_flag from bs_material_info |
| | | </sql> |
| | | |
| | | <select id="selectBsMaterialInfoList" parameterType="BsMaterialInfo" resultMap="BsMaterialInfoResult"> |
| | | <include refid="selectBsMaterialInfoVo"/> |
| | | <where> |
| | | <if test="materialCode != null and materialCode != ''"> and material_code like concat('%', #{materialCode}, '%')</if> |
| | | <if test="materialName != null and materialName != ''"> and material_name like concat('%', #{materialName}, '%')</if> |
| | | <if test="materialView != null and materialView != ''"> and material_view = #{materialView}</if> |
| | | <if test="typeZ != null and typeZ != ''"> and type_z = #{typeZ}</if> |
| | | <if test="typeL != null and typeL != ''"> and type_l = #{typeL}</if> |
| | | <if test="unit != null and unit != ''"> and unit = #{unit}</if> |
| | | <if test="status != null and status != ''"> and status = #{status}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectBsMaterialInfoById" parameterType="Long" resultMap="BsMaterialInfoResult"> |
| | | <include refid="selectBsMaterialInfoVo"/> |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertBsMaterialInfo" parameterType="BsMaterialInfo"> |
| | | insert into bs_material_info |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | | <if test="materialCode != null and materialCode != ''">material_code,</if> |
| | | <if test="materialName != null and materialName != ''">material_name,</if> |
| | | <if test="materialView != null">material_view,</if> |
| | | <if test="typeZ != null">type_z,</if> |
| | | <if test="typeL != null">type_l,</if> |
| | | <if test="unit != null">unit,</if> |
| | | <if test="version != null">version,</if> |
| | | <if test="status != null">status,</if> |
| | | <if test="supplier != null">supplier,</if> |
| | | <if test="remark != null">remark,</if> |
| | | <if test="dataSource != null">data_source,</if> |
| | | <if test="createBy != null">create_by,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | | <if test="updateBy != null">update_by,</if> |
| | | <if test="updateTime != null">update_time,</if> |
| | | <if test="delFlag != null">del_flag,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id},</if> |
| | | <if test="materialCode != null and materialCode != ''">#{materialCode},</if> |
| | | <if test="materialName != null and materialName != ''">#{materialName},</if> |
| | | <if test="materialView != null">#{materialView},</if> |
| | | <if test="typeZ != null">#{typeZ},</if> |
| | | <if test="typeL != null">#{typeL},</if> |
| | | <if test="unit != null">#{unit},</if> |
| | | <if test="version != null">#{version},</if> |
| | | <if test="status != null">#{status},</if> |
| | | <if test="supplier != null">#{supplier},</if> |
| | | <if test="remark != null">#{remark},</if> |
| | | <if test="dataSource != null">#{dataSource},</if> |
| | | <if test="createBy != null">#{createBy},</if> |
| | | <if test="createTime != null">#{createTime},</if> |
| | | <if test="updateBy != null">#{updateBy},</if> |
| | | <if test="updateTime != null">#{updateTime},</if> |
| | | <if test="delFlag != null">#{delFlag},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateBsMaterialInfo" parameterType="BsMaterialInfo"> |
| | | update bs_material_info |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="materialCode != null and materialCode != ''">material_code = #{materialCode},</if> |
| | | <if test="materialName != null and materialName != ''">material_name = #{materialName},</if> |
| | | <if test="materialView != null">material_view = #{materialView},</if> |
| | | <if test="typeZ != null">type_z = #{typeZ},</if> |
| | | <if test="typeL != null">type_l = #{typeL},</if> |
| | | <if test="unit != null">unit = #{unit},</if> |
| | | <if test="version != null">version = #{version},</if> |
| | | <if test="status != null">status = #{status},</if> |
| | | <if test="supplier != null">supplier = #{supplier},</if> |
| | | <if test="remark != null">remark = #{remark},</if> |
| | | <if test="dataSource != null">data_source = #{dataSource},</if> |
| | | <if test="createBy != null">create_by = #{createBy},</if> |
| | | <if test="createTime != null">create_time = #{createTime},</if> |
| | | <if test="updateBy != null">update_by = #{updateBy},</if> |
| | | <if test="updateTime != null">update_time = #{updateTime},</if> |
| | | <if test="delFlag != null">del_flag = #{delFlag},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteBsMaterialInfoById" parameterType="Long"> |
| | | delete from bs_material_info where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteBsMaterialInfoByIds" parameterType="String"> |
| | | delete from bs_material_info where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | // æ¥è¯¢å·¥ä½ä¿¡æ¯å表 |
| | | export function listLocationInfo(query) { |
| | | return request({ |
| | | url: '/bs/locationInfo/list', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | // æ¥è¯¢å·¥ä½ä¿¡æ¯è¯¦ç» |
| | | export function getLocationInfo(id) { |
| | | return request({ |
| | | url: '/bs/locationInfo/' + id, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | // æ°å¢å·¥ä½ä¿¡æ¯ |
| | | export function addLocationInfo(data) { |
| | | return request({ |
| | | url: '/bs/locationInfo', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // ä¿®æ¹å·¥ä½ä¿¡æ¯ |
| | | export function updateLocationInfo(data) { |
| | | return request({ |
| | | url: '/bs/locationInfo', |
| | | method: 'put', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // å é¤å·¥ä½ä¿¡æ¯ |
| | | export function delLocationInfo(id) { |
| | | return request({ |
| | | url: '/bs/locationInfo/' + id, |
| | | method: 'delete' |
| | | }) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | // æ¥è¯¢ç©æä¿¡æ¯å表 |
| | | export function listMaterialInfo(query) { |
| | | return request({ |
| | | url: '/bs/materialInfo/list', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | // æ¥è¯¢ç©æä¿¡æ¯è¯¦ç» |
| | | export function getMaterialInfo(id) { |
| | | return request({ |
| | | url: '/bs/materialInfo/' + id, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | // æ°å¢ç©æä¿¡æ¯ |
| | | export function addMaterialInfo(data) { |
| | | return request({ |
| | | url: '/bs/materialInfo', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // ä¿®æ¹ç©æä¿¡æ¯ |
| | | export function updateMaterialInfo(data) { |
| | | return request({ |
| | | url: '/bs/materialInfo', |
| | | method: 'put', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // å é¤ç©æä¿¡æ¯ |
| | | export function delMaterialInfo(id) { |
| | | return request({ |
| | | url: '/bs/materialInfo/' + id, |
| | | method: 'delete' |
| | | }) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <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="locationType"> |
| | | <el-select v-model="queryParams.locationType" placeholder="è¯·éæ©å·¥ä½ç±»å" clearable> |
| | | <el-option |
| | | v-for="dict in dict.type.location_type" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <!-- <el-form-item label="产线ç¼å·" prop="lineCode">--> |
| | | <!-- <el-input--> |
| | | <!-- v-model="queryParams.lineCode"--> |
| | | <!-- placeholder="请è¾å
¥äº§çº¿ç¼å·"--> |
| | | <!-- clearable--> |
| | | <!-- @keyup.enter.native="handleQuery"--> |
| | | <!-- />--> |
| | | <!-- </el-form-item>--> |
| | | <el-form-item style="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:locationInfo: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:locationInfo: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:locationInfo: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:locationInfo:export']" |
| | | >导åº</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-table border v-loading="loading" :data="locationInfoList" @selection-change="handleSelectionChange"> |
| | | <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 label="å·¥ä½ç±»å" align="center" prop="locationType"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.location_type" :value="scope.row.locationType"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column show-overflow-tooltip="true" label="产线ç¼å·" align="center" prop="lineCode" /> |
| | | <el-table-column show-overflow-tooltip="true" label="夿³¨" align="center" prop="remarks" /> |
| | | <el-table-column show-overflow-tooltip="true" label="åå»ºç¨æ·" align="center" prop="createBy" /> |
| | | <el-table-column label="å建æ¶é´" align="center" prop="createTime" width="180"> |
| | | </el-table-column> |
| | | <el-table-column show-overflow-tooltip="true" label="æ´æ¹ç¨æ·" align="center" prop="updateBy" /> |
| | | <el-table-column label="æ´æ¹æ¶é´" align="center" prop="updateTime" width="180"> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | <pagination |
| | | v-show="total>0" |
| | | :total="total" |
| | | :page.sync="queryParams.pageNum" |
| | | :limit.sync="queryParams.pageSize" |
| | | @pagination="getList" |
| | | /> |
| | | |
| | | <!-- æ·»å æä¿®æ¹å·¥ä½ä¿¡æ¯å¯¹è¯æ¡ --> |
| | | <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
| | | <el-form-item label="å·¥ä½ç¼å·" prop="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="locationType"> |
| | | <el-select style="width: 100%" v-model="form.locationType" placeholder="è¯·éæ©å·¥ä½ç±»å"> |
| | | <el-option |
| | | v-for="dict in dict.type.location_type" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="产线ç¼å·" prop="lineCode"> |
| | | <el-input v-model="form.lineCode" placeholder="请è¾å
¥äº§çº¿ç¼å·" /> |
| | | </el-form-item> |
| | | <el-form-item label="夿³¨" prop="remarks"> |
| | | <el-input v-model="form.remarks" 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 { listLocationInfo, getLocationInfo, delLocationInfo, addLocationInfo, updateLocationInfo } from "@/api/main/bs/locationInfo"; |
| | | |
| | | export default { |
| | | name: "LocationInfo", |
| | | dicts: ['location_type'], |
| | | data() { |
| | | return { |
| | | // é®ç½©å± |
| | | loading: true, |
| | | // é䏿°ç» |
| | | ids: [], |
| | | // éå个ç¦ç¨ |
| | | single: true, |
| | | // éå¤ä¸ªç¦ç¨ |
| | | multiple: true, |
| | | // æ¾ç¤ºæç´¢æ¡ä»¶ |
| | | showSearch: true, |
| | | // æ»æ¡æ° |
| | | total: 0, |
| | | // å·¥ä½ä¿¡æ¯è¡¨æ ¼æ°æ® |
| | | locationInfoList: [], |
| | | // å¼¹åºå±æ é¢ |
| | | title: "", |
| | | // æ¯å¦æ¾ç¤ºå¼¹åºå± |
| | | open: false, |
| | | // æ¥è¯¢åæ° |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | locationCode: null, |
| | | locationName: null, |
| | | locationType: null, |
| | | lineCode: null, |
| | | }, |
| | | // 表ååæ° |
| | | form: {}, |
| | | // è¡¨åæ ¡éª |
| | | rules: { |
| | | id: [ |
| | | { required: true, message: "主é®idä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | }, |
| | | methods: { |
| | | /** æ¥è¯¢å·¥ä½ä¿¡æ¯å表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | listLocationInfo(this.queryParams).then(response => { |
| | | this.locationInfoList = response.rows; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | // åæ¶æé® |
| | | cancel() { |
| | | this.open = false; |
| | | this.reset(); |
| | | }, |
| | | // 表åéç½® |
| | | reset() { |
| | | this.form = { |
| | | id: null, |
| | | locationCode: null, |
| | | locationName: null, |
| | | locationType: null, |
| | | lineCode: null, |
| | | remarks: null, |
| | | createBy: null, |
| | | createTime: null, |
| | | updateBy: null, |
| | | updateTime: 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 = "æ·»å å·¥ä½ä¿¡æ¯"; |
| | | }, |
| | | /** ä¿®æ¹æé®æä½ */ |
| | | handleUpdate(row) { |
| | | this.reset(); |
| | | const id = row.id || this.ids |
| | | getLocationInfo(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) { |
| | | updateLocationInfo(this.form).then(response => { |
| | | this.$modal.msgSuccess("ä¿®æ¹æå"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } else { |
| | | addLocationInfo(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 delLocationInfo(ids); |
| | | }).then(() => { |
| | | this.getList(); |
| | | this.$modal.msgSuccess("å 餿å"); |
| | | }).catch(() => {}); |
| | | }, |
| | | /** å¯¼åºæé®æä½ */ |
| | | handleExport() { |
| | | this.download('bs/locationInfo/export', { |
| | | ...this.queryParams |
| | | }, `locationInfo_${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="ç©æç¼å·" 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 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-button icon="el-icon-setting" size="mini" @click="toggleAdvancedSearch">é«çº§æ¥è¯¢</el-button> |
| | | </el-form-item> |
| | | <transition name="fade"> |
| | | <div v-if="advancedSearchVisible" class="advanced-search"> |
| | | <el-form-item label="è§å¾" prop="materialView"> |
| | | <el-input |
| | | v-model="queryParams.materialView" |
| | | placeholder="请è¾å
¥è§å¾" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="ç§ç±»" prop="typeZ"> |
| | | <el-select v-model="queryParams.typeZ" placeholder="è¯·éæ©ç§ç±»" clearable> |
| | | <el-option |
| | | v-for="dict in dict.type.type_z" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="ç±»å" prop="typeL"> |
| | | <el-select v-model="queryParams.typeL" placeholder="è¯·éæ©ç±»å" clearable> |
| | | <el-option |
| | | v-for="dict in dict.type.type_l" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="åä½" prop="unit"> |
| | | <el-select v-model="queryParams.unit" placeholder="è¯·éæ©åä½" clearable> |
| | | <el-option |
| | | v-for="dict in dict.type.unit" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="ç¶æ" prop="status"> |
| | | <el-select v-model="queryParams.status" placeholder="è¯·éæ©ç¶æ" clearable> |
| | | <el-option |
| | | v-for="dict in dict.type.sys_normal_disable" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </div> |
| | | </transition> |
| | | </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:materialInfo: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:materialInfo: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:materialInfo: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:materialInfo:export']" |
| | | >导åº</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-table border v-loading="loading" :data="materialInfoList" @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <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="materialView" /> |
| | | <el-table-column label="ç§ç±»" align="center" prop="typeZ"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.type_z" :value="scope.row.typeZ"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="ç±»å" align="center" prop="typeL"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.type_l" :value="scope.row.typeL"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="åä½" align="center" prop="unit"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.unit" :value="scope.row.unit"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column :show-overflow-tooltip="true" label="çæ¬" align="center" prop="version" /> |
| | | <el-table-column label="ç¶æ" align="center" prop="status"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column :show-overflow-tooltip="true" label="åå" align="center" prop="supplier" /> |
| | | <el-table-column :show-overflow-tooltip="true" label="夿³¨" align="center" prop="remark" /> |
| | | <el-table-column :show-overflow-tooltip="true" label="æ°æ®æ¥æº" align="center" prop="dataSource" /> |
| | | <el-table-column :show-overflow-tooltip="true" label="åå»ºç¨æ·" align="center" prop="createBy" /> |
| | | <el-table-column label="å建æ¶é´" align="center" prop="createTime" width="180"> |
| | | </el-table-column> |
| | | <el-table-column :show-overflow-tooltip="true" label="æ´æ¹ç¨æ·" align="center" prop="updateBy" /> |
| | | <el-table-column label="æ´æ¹æ¶é´" align="center" prop="updateTime" width="180"> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | <pagination |
| | | v-show="total>0" |
| | | :total="total" |
| | | :page.sync="queryParams.pageNum" |
| | | :limit.sync="queryParams.pageSize" |
| | | @pagination="getList" |
| | | /> |
| | | |
| | | <!-- æ·»å æä¿®æ¹ç©æä¿¡æ¯å¯¹è¯æ¡ --> |
| | | <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
| | | <el-form-item label="ç©æç¼å·" prop="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="materialView"> |
| | | <el-input v-model="form.materialView" placeholder="请è¾å
¥è§å¾" /> |
| | | </el-form-item> |
| | | <el-form-item label="ç§ç±»" prop="typeZ"> |
| | | <el-select style="width: 100%" v-model="form.typeZ" placeholder="è¯·éæ©ç§ç±»"> |
| | | <el-option |
| | | v-for="dict in dict.type.type_z" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="ç±»å" prop="typeL"> |
| | | <el-select style="width: 100%" v-model="form.typeL" placeholder="è¯·éæ©ç±»å"> |
| | | <el-option |
| | | v-for="dict in dict.type.type_l" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="åä½" prop="unit"> |
| | | <el-select style="width: 100%" v-model="form.unit" placeholder="è¯·éæ©åä½"> |
| | | <el-option |
| | | v-for="dict in dict.type.unit" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="çæ¬" prop="version"> |
| | | <el-input v-model="form.version" 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="supplier"> |
| | | <el-input v-model="form.supplier" placeholder="请è¾å
¥åå" /> |
| | | </el-form-item> |
| | | <el-form-item label="夿³¨" prop="remark"> |
| | | <el-input v-model="form.remark" type="textarea" placeholder="请è¾å
¥å
容" /> |
| | | </el-form-item> |
| | | <el-form-item label="æ°æ®æ¥æº" prop="dataSource"> |
| | | <el-input v-model="form.dataSource" 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 { listMaterialInfo, getMaterialInfo, delMaterialInfo, addMaterialInfo, updateMaterialInfo } from "@/api/main/bs/materialInfo"; |
| | | |
| | | export default { |
| | | name: "MaterialInfo", |
| | | dicts: ['sys_normal_disable', 'type_l', 'unit', 'type_z'], |
| | | data() { |
| | | return { |
| | | // é®ç½©å± |
| | | loading: true, |
| | | // é䏿°ç» |
| | | ids: [], |
| | | // éå个ç¦ç¨ |
| | | single: true, |
| | | // éå¤ä¸ªç¦ç¨ |
| | | multiple: true, |
| | | // æ¾ç¤ºæç´¢æ¡ä»¶ |
| | | showSearch: true, |
| | | // æ»æ¡æ° |
| | | total: 0, |
| | | advancedSearchVisible: false, |
| | | // ç©æä¿¡æ¯è¡¨æ ¼æ°æ® |
| | | materialInfoList: [], |
| | | // å¼¹åºå±æ é¢ |
| | | title: "", |
| | | // æ¯å¦æ¾ç¤ºå¼¹åºå± |
| | | open: false, |
| | | // æ¥è¯¢åæ° |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | materialCode: null, |
| | | materialName: null, |
| | | materialView: null, |
| | | typeZ: null, |
| | | typeL: null, |
| | | unit: null, |
| | | status: null, |
| | | }, |
| | | // 表ååæ° |
| | | form: {}, |
| | | // è¡¨åæ ¡éª |
| | | rules: { |
| | | id: [ |
| | | { required: true, message: "主é®idä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | materialCode: [ |
| | | { required: true, message: "ç©æç¼å·ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | materialName: [ |
| | | { required: true, message: "ç©æåç§°ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | }, |
| | | methods: { |
| | | toggleAdvancedSearch() { |
| | | this.advancedSearchVisible = !this.advancedSearchVisible; |
| | | }, |
| | | /** æ¥è¯¢ç©æä¿¡æ¯å表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | listMaterialInfo(this.queryParams).then(response => { |
| | | this.materialInfoList = response.rows; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | // åæ¶æé® |
| | | cancel() { |
| | | this.open = false; |
| | | this.reset(); |
| | | }, |
| | | // 表åéç½® |
| | | reset() { |
| | | this.form = { |
| | | id: null, |
| | | materialCode: null, |
| | | materialName: null, |
| | | materialView: null, |
| | | typeZ: null, |
| | | typeL: null, |
| | | unit: null, |
| | | version: null, |
| | | status: "0", |
| | | supplier: null, |
| | | remark: null, |
| | | dataSource: null, |
| | | createBy: null, |
| | | createTime: null, |
| | | updateBy: null, |
| | | updateTime: 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 = "æ·»å ç©æä¿¡æ¯"; |
| | | }, |
| | | /** ä¿®æ¹æé®æä½ */ |
| | | handleUpdate(row) { |
| | | this.reset(); |
| | | const id = row.id || this.ids |
| | | getMaterialInfo(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) { |
| | | updateMaterialInfo(this.form).then(response => { |
| | | this.$modal.msgSuccess("ä¿®æ¹æå"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } else { |
| | | addMaterialInfo(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 delMaterialInfo(ids); |
| | | }).then(() => { |
| | | this.getList(); |
| | | this.$modal.msgSuccess("å 餿å"); |
| | | }).catch(() => {}); |
| | | }, |
| | | /** å¯¼åºæé®æä½ */ |
| | | handleExport() { |
| | | this.download('bs/materialInfo/export', { |
| | | ...this.queryParams |
| | | }, `materialInfo_${new Date().getTime()}.xlsx`) |
| | | } |
| | | } |
| | | }; |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-dialog :title="title" :visible.sync="visible" @close="handleClose"> |
| | | <el-table :data="gridData" selection="single" ref="multipleTable" @selection-change="productSelectionChange"> |
| | | <el-table-column type="selection" width="55"></el-table-column> |
| | | <el-table-column property="date" label="æ¥æ" width="150"></el-table-column> |
| | | <el-table-column property="name" label="å§å" width="200"></el-table-column> |
| | | <el-table-column property="address" label="å°å"></el-table-column> |
| | | </el-table> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="handleClose">å æ¶</el-button> |
| | | <el-button type="primary" @click="confirmSelection">ç¡® å®</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: "ProductSelector", |
| | | props: { |
| | | visible: Boolean, |
| | | title: { |
| | | type: String, |
| | | default: "ç©æä¿¡æ¯" |
| | | }, |
| | | gridData: Array |
| | | }, |
| | | data() { |
| | | return { |
| | | multipleSelection: [] |
| | | }; |
| | | }, |
| | | methods: { |
| | | handleClose() { |
| | | this.$emit('update:visible', false); |
| | | }, |
| | | productSelectionChange(selection) { |
| | | if (selection.length > 1) { |
| | | this.$refs.multipleTable.clearSelection(); |
| | | this.$refs.multipleTable.toggleRowSelection(selection[selection.length - 1], true); |
| | | this.multipleSelection = [selection[selection.length - 1]]; |
| | | } else { |
| | | this.multipleSelection = selection; |
| | | } |
| | | }, |
| | | confirmSelection() { |
| | | if (this.multipleSelection.length > 0) { |
| | | this.$emit('select-product', this.multipleSelection[0]); |
| | | this.handleClose(); |
| | | } else { |
| | | this.$message({ |
| | | message: 'è¦åå¦ï¼æªéæ©ä»»ä½è¡', |
| | | type: 'warning' |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | </router-link> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column show-overflow-tooltip="true" label="æµç¨åç§°" align="center" prop="routeName" /> |
| | | <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="routeName" /> |
| | | <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 label="ç¶æ" align="center" prop="status"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column show-overflow-tooltip="true" label="æ°æ®æ¥æº" align="center" prop="dataSource" /> |
| | | <el-table-column show-overflow-tooltip="true" label="夿³¨" align="center" prop="remark" /> |
| | | <el-table-column show-overflow-tooltip="true" label="åå»ºç¨æ·" align="center" prop="createBy" /> |
| | | <el-table-column :show-overflow-tooltip="true" label="æ°æ®æ¥æº" align="center" prop="dataSource" /> |
| | | <el-table-column :show-overflow-tooltip="true" label="夿³¨" align="center" prop="remark" /> |
| | | <el-table-column :show-overflow-tooltip="true" label="åå»ºç¨æ·" align="center" prop="createBy" /> |
| | | <el-table-column label="å建æ¶é´" align="center" prop="createTime" width="180"> |
| | | </el-table-column> |
| | | <el-table-column show-overflow-tooltip="true" label="æ´æ¹ç¨æ·" align="center" prop="updateBy" /> |
| | | <el-table-column :show-overflow-tooltip="true" label="æ´æ¹ç¨æ·" align="center" prop="updateBy" /> |
| | | <el-table-column label="æ´æ¹æ¶é´" align="center" prop="updateTime" width="180"> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | <el-input v-model="form.routeName" placeholder="请è¾å
¥æµç¨åç§°" /> |
| | | </el-form-item> |
| | | <el-form-item label="产åç¼ç " prop="productCode"> |
| | | <el-input v-model="form.productCode" placeholder="请è¾å
¥äº§åç¼ç " /> |
| | | <el-input v-model="form.productCode" placeholder="è¯·éæ©äº§åç¼ç " readonly> |
| | | <template #append> |
| | | <el-button @click="dialogTableVisible = true">éæ©</el-button> |
| | | </template> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="产ååç§°" prop="productName"> |
| | | <el-input v-model="form.productName" placeholder="请è¾å
¥äº§ååç§°" /> |
| | |
| | | <el-button @click="cancel">å æ¶</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | <!-- 产åéæ©å¨ç»ä»¶ --> |
| | | <ProductSelector |
| | | :visible="dialogTableVisible" |
| | | :gridData="gridData" |
| | | @select-product="handleSelectProduct" |
| | | @update:visible="dialogTableVisible = $event" |
| | | /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { listRouteInfo, getRouteInfo, delRouteInfo, addRouteInfo, updateRouteInfo } from "@/api/main/bs/routeInfo"; |
| | | |
| | | import ProductSelector from "./ProductSelector.vue"; |
| | | export default { |
| | | components: { |
| | | ProductSelector |
| | | }, |
| | | name: "RouteInfo", |
| | | dicts: ['sys_normal_disable'], |
| | | data() { |
| | | return { |
| | | multipleSelection: [], |
| | | gridData: [{ |
| | | date: '2016-05-02', |
| | | name: 'çä¸è', |
| | | address: '䏿µ·å¸æ®éåºéæ²æ±è·¯ 1518 å¼' |
| | | }, { |
| | | date: '2016-05-04', |
| | | name: 'çäºè', |
| | | address: '䏿µ·å¸æ®éåºéæ²æ±è·¯ 1518 å¼' |
| | | }, { |
| | | date: '2016-05-01', |
| | | name: 'çä¸è', |
| | | address: '䏿µ·å¸æ®éåºéæ²æ±è·¯ 1518 å¼' |
| | | }, { |
| | | date: '2016-05-03', |
| | | name: 'çåè', |
| | | address: '䏿µ·å¸æ®éåºéæ²æ±è·¯ 1518 å¼' |
| | | }], |
| | | dialogTableVisible: false, |
| | | advancedSearchVisible: false, |
| | | // é®ç½©å± |
| | | loading: true, |
| | |
| | | this.getList(); |
| | | }, |
| | | methods: { |
| | | handleSelectProduct(selectedProduct) { |
| | | this.form.productCode = selectedProduct.date; // åè®¾ä½ éè¦çæ¯æ¥æå段 |
| | | this.form.productName = selectedProduct.name; // åè®¾ä½ éè¦çæ¯å§ååæ®µ |
| | | }, |
| | | toggleAdvancedSearch() { |
| | | this.advancedSearchVisible = !this.advancedSearchVisible; |
| | | }, |