11 changed files with 1593 additions and 4 deletions
-
14chenhai-admin/src/main/java/com/chenhai/web/controller/muhu/MuhuUserController.java
-
104chenhai-admin/src/main/java/com/chenhai/web/controller/system/SysVacCategoryController.java
-
389chenhai-system/src/main/java/com/chenhai/system/domain/SysVacCategory.java
-
61chenhai-system/src/main/java/com/chenhai/system/mapper/SysVacCategoryMapper.java
-
61chenhai-system/src/main/java/com/chenhai/system/service/ISysVacCategoryService.java
-
93chenhai-system/src/main/java/com/chenhai/system/service/impl/SysVacCategoryServiceImpl.java
-
6chenhai-system/src/main/resources/mapper/system/SysUserMapper.xml
-
170chenhai-system/src/main/resources/mapper/system/SysVacCategoryMapper.xml
-
44chenhai-ui/src/api/system/vacCategory.js
-
1chenhai-ui/src/assets/icons/svg/livestockVaccines.svg
-
654chenhai-ui/src/views/system/vacCategory/index.vue
@ -0,0 +1,104 @@ |
|||||
|
package com.chenhai.web.controller.system; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import jakarta.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.chenhai.common.annotation.Log; |
||||
|
import com.chenhai.common.core.controller.BaseController; |
||||
|
import com.chenhai.common.core.domain.AjaxResult; |
||||
|
import com.chenhai.common.enums.BusinessType; |
||||
|
import com.chenhai.system.domain.SysVacCategory; |
||||
|
import com.chenhai.system.service.ISysVacCategoryService; |
||||
|
import com.chenhai.common.utils.poi.ExcelUtil; |
||||
|
import com.chenhai.common.core.page.TableDataInfo; |
||||
|
|
||||
|
/** |
||||
|
* 疫苗类别Controller |
||||
|
* |
||||
|
* @author ruoyi |
||||
|
* @date 2026-01-29 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("/system/vacCategory") |
||||
|
public class SysVacCategoryController extends BaseController |
||||
|
{ |
||||
|
@Autowired |
||||
|
private ISysVacCategoryService sysVacCategoryService; |
||||
|
|
||||
|
/** |
||||
|
* 查询疫苗类别列表 |
||||
|
*/ |
||||
|
@PreAuthorize("@ss.hasPermi('system:vacCategory:list')") |
||||
|
@GetMapping("/list") |
||||
|
public TableDataInfo list(SysVacCategory sysVacCategory) |
||||
|
{ |
||||
|
startPage(); |
||||
|
List<SysVacCategory> list = sysVacCategoryService.selectSysVacCategoryList(sysVacCategory); |
||||
|
return getDataTable(list); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 导出疫苗类别列表 |
||||
|
*/ |
||||
|
@PreAuthorize("@ss.hasPermi('system:vacCategory:export')") |
||||
|
@Log(title = "疫苗类别", businessType = BusinessType.EXPORT) |
||||
|
@PostMapping("/export") |
||||
|
public void export(HttpServletResponse response, SysVacCategory sysVacCategory) |
||||
|
{ |
||||
|
List<SysVacCategory> list = sysVacCategoryService.selectSysVacCategoryList(sysVacCategory); |
||||
|
ExcelUtil<SysVacCategory> util = new ExcelUtil<SysVacCategory>(SysVacCategory.class); |
||||
|
util.exportExcel(response, list, "疫苗类别数据"); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取疫苗类别详细信息 |
||||
|
*/ |
||||
|
@PreAuthorize("@ss.hasPermi('system:vacCategory:query')") |
||||
|
@GetMapping(value = "/{id}") |
||||
|
public AjaxResult getInfo(@PathVariable("id") Long id) |
||||
|
{ |
||||
|
return success(sysVacCategoryService.selectSysVacCategoryById(id)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 新增疫苗类别 |
||||
|
*/ |
||||
|
@PreAuthorize("@ss.hasPermi('system:vacCategory:add')") |
||||
|
@Log(title = "疫苗类别", businessType = BusinessType.INSERT) |
||||
|
@PostMapping |
||||
|
public AjaxResult add(@RequestBody SysVacCategory sysVacCategory) |
||||
|
{ |
||||
|
return toAjax(sysVacCategoryService.insertSysVacCategory(sysVacCategory)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 修改疫苗类别 |
||||
|
*/ |
||||
|
@PreAuthorize("@ss.hasPermi('system:vacCategory:edit')") |
||||
|
@Log(title = "疫苗类别", businessType = BusinessType.UPDATE) |
||||
|
@PutMapping |
||||
|
public AjaxResult edit(@RequestBody SysVacCategory sysVacCategory) |
||||
|
{ |
||||
|
return toAjax(sysVacCategoryService.updateSysVacCategory(sysVacCategory)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除疫苗类别 |
||||
|
*/ |
||||
|
@PreAuthorize("@ss.hasPermi('system:vacCategory:remove')") |
||||
|
@Log(title = "疫苗类别", businessType = BusinessType.DELETE) |
||||
|
@DeleteMapping("/{ids}") |
||||
|
public AjaxResult remove(@PathVariable Long[] ids) |
||||
|
{ |
||||
|
return toAjax(sysVacCategoryService.deleteSysVacCategoryByIds(ids)); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,389 @@ |
|||||
|
package com.chenhai.system.domain; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import org.apache.commons.lang3.builder.ToStringBuilder; |
||||
|
import org.apache.commons.lang3.builder.ToStringStyle; |
||||
|
import com.chenhai.common.annotation.Excel; |
||||
|
import com.chenhai.common.core.domain.BaseEntity; |
||||
|
|
||||
|
/** |
||||
|
* 疫苗类别对象 sys_vac_category |
||||
|
* |
||||
|
* @author ruoyi |
||||
|
* @date 2026-01-29 |
||||
|
*/ |
||||
|
public class SysVacCategory extends BaseEntity |
||||
|
{ |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** 疫苗ID */ |
||||
|
private Long id; |
||||
|
|
||||
|
/** 兽药批准文号 */ |
||||
|
@Excel(name = "兽药批准文号") |
||||
|
private String approvalNumber; |
||||
|
|
||||
|
/** 产品批号 */ |
||||
|
@Excel(name = "产品批号") |
||||
|
private String batchNumber; |
||||
|
|
||||
|
/** 通用名称(国家标准名称) */ |
||||
|
@Excel(name = "通用名称", readConverterExp = "国=家标准名称") |
||||
|
private String genericName; |
||||
|
|
||||
|
/** 商品名称(品牌名称) */ |
||||
|
@Excel(name = "商品名称", readConverterExp = "品=牌名称") |
||||
|
private String tradeName; |
||||
|
|
||||
|
/** 规格,如:100ml/瓶 */ |
||||
|
@Excel(name = "规格,如:100ml/瓶") |
||||
|
private String specification; |
||||
|
|
||||
|
/** 生产厂家 */ |
||||
|
@Excel(name = "生产厂家") |
||||
|
private String manufacturer; |
||||
|
|
||||
|
/** 生产日期 */ |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd") |
||||
|
@Excel(name = "生产日期", width = 30, dateFormat = "yyyy-MM-dd") |
||||
|
private Date manufactureDate; |
||||
|
|
||||
|
/** 有效期至 */ |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd") |
||||
|
@Excel(name = "有效期至", width = 30, dateFormat = "yyyy-MM-dd") |
||||
|
private Date expiryDate; |
||||
|
|
||||
|
/** 适用动物(逗号分隔字典值) */ |
||||
|
@Excel(name = "适用动物", readConverterExp = "逗=号分隔字典值") |
||||
|
private String livestockTypes; |
||||
|
|
||||
|
/** 预防疫病 */ |
||||
|
@Excel(name = "预防疫病") |
||||
|
private String preventDisease; |
||||
|
|
||||
|
/** 是否强制免疫:0-否 1-是 */ |
||||
|
@Excel(name = "是否强制免疫:0-否 1-是") |
||||
|
private String isMandatory; |
||||
|
|
||||
|
/** 免疫期(天) */ |
||||
|
@Excel(name = "免疫期", readConverterExp = "天=") |
||||
|
private Long immunePeriod; |
||||
|
|
||||
|
/** 用法用量 */ |
||||
|
@Excel(name = "用法用量") |
||||
|
private String dosage; |
||||
|
|
||||
|
/** 接种途径(字典) */ |
||||
|
@Excel(name = "接种途径", readConverterExp = "字=典") |
||||
|
private String administrationRoute; |
||||
|
|
||||
|
/** 贮藏条件 */ |
||||
|
@Excel(name = "贮藏条件") |
||||
|
private String storageCondition; |
||||
|
|
||||
|
/** 注意事项 */ |
||||
|
@Excel(name = "注意事项") |
||||
|
private String precautions; |
||||
|
|
||||
|
/** 状态:1-可用 0-停用 */ |
||||
|
@Excel(name = "状态:1-可用 0-停用") |
||||
|
private String status; |
||||
|
|
||||
|
/** 库存数量 */ |
||||
|
@Excel(name = "库存数量") |
||||
|
private Long stockQuantity; |
||||
|
|
||||
|
/** 已使用数量 */ |
||||
|
@Excel(name = "已使用数量") |
||||
|
private Long usedQuantity; |
||||
|
|
||||
|
/** 创建者 */ |
||||
|
@Excel(name = "创建者") |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** 创建时间 */ |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd") |
||||
|
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd") |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** 更新者 */ |
||||
|
@Excel(name = "更新者") |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** 更新时间 */ |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd") |
||||
|
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd") |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
public void setId(Long id) |
||||
|
{ |
||||
|
this.id = id; |
||||
|
} |
||||
|
|
||||
|
public Long getId() |
||||
|
{ |
||||
|
return id; |
||||
|
} |
||||
|
|
||||
|
public void setApprovalNumber(String approvalNumber) |
||||
|
{ |
||||
|
this.approvalNumber = approvalNumber; |
||||
|
} |
||||
|
|
||||
|
public String getApprovalNumber() |
||||
|
{ |
||||
|
return approvalNumber; |
||||
|
} |
||||
|
|
||||
|
public void setBatchNumber(String batchNumber) |
||||
|
{ |
||||
|
this.batchNumber = batchNumber; |
||||
|
} |
||||
|
|
||||
|
public String getBatchNumber() |
||||
|
{ |
||||
|
return batchNumber; |
||||
|
} |
||||
|
|
||||
|
public void setGenericName(String genericName) |
||||
|
{ |
||||
|
this.genericName = genericName; |
||||
|
} |
||||
|
|
||||
|
public String getGenericName() |
||||
|
{ |
||||
|
return genericName; |
||||
|
} |
||||
|
|
||||
|
public void setTradeName(String tradeName) |
||||
|
{ |
||||
|
this.tradeName = tradeName; |
||||
|
} |
||||
|
|
||||
|
public String getTradeName() |
||||
|
{ |
||||
|
return tradeName; |
||||
|
} |
||||
|
|
||||
|
public void setSpecification(String specification) |
||||
|
{ |
||||
|
this.specification = specification; |
||||
|
} |
||||
|
|
||||
|
public String getSpecification() |
||||
|
{ |
||||
|
return specification; |
||||
|
} |
||||
|
|
||||
|
public void setManufacturer(String manufacturer) |
||||
|
{ |
||||
|
this.manufacturer = manufacturer; |
||||
|
} |
||||
|
|
||||
|
public String getManufacturer() |
||||
|
{ |
||||
|
return manufacturer; |
||||
|
} |
||||
|
|
||||
|
public void setManufactureDate(Date manufactureDate) |
||||
|
{ |
||||
|
this.manufactureDate = manufactureDate; |
||||
|
} |
||||
|
|
||||
|
public Date getManufactureDate() |
||||
|
{ |
||||
|
return manufactureDate; |
||||
|
} |
||||
|
|
||||
|
public void setExpiryDate(Date expiryDate) |
||||
|
{ |
||||
|
this.expiryDate = expiryDate; |
||||
|
} |
||||
|
|
||||
|
public Date getExpiryDate() |
||||
|
{ |
||||
|
return expiryDate; |
||||
|
} |
||||
|
|
||||
|
public void setLivestockTypes(String livestockTypes) |
||||
|
{ |
||||
|
this.livestockTypes = livestockTypes; |
||||
|
} |
||||
|
|
||||
|
public String getLivestockTypes() |
||||
|
{ |
||||
|
return livestockTypes; |
||||
|
} |
||||
|
|
||||
|
public void setPreventDisease(String preventDisease) |
||||
|
{ |
||||
|
this.preventDisease = preventDisease; |
||||
|
} |
||||
|
|
||||
|
public String getPreventDisease() |
||||
|
{ |
||||
|
return preventDisease; |
||||
|
} |
||||
|
|
||||
|
public void setIsMandatory(String isMandatory) |
||||
|
{ |
||||
|
this.isMandatory = isMandatory; |
||||
|
} |
||||
|
|
||||
|
public String getIsMandatory() |
||||
|
{ |
||||
|
return isMandatory; |
||||
|
} |
||||
|
|
||||
|
public void setImmunePeriod(Long immunePeriod) |
||||
|
{ |
||||
|
this.immunePeriod = immunePeriod; |
||||
|
} |
||||
|
|
||||
|
public Long getImmunePeriod() |
||||
|
{ |
||||
|
return immunePeriod; |
||||
|
} |
||||
|
|
||||
|
public void setDosage(String dosage) |
||||
|
{ |
||||
|
this.dosage = dosage; |
||||
|
} |
||||
|
|
||||
|
public String getDosage() |
||||
|
{ |
||||
|
return dosage; |
||||
|
} |
||||
|
|
||||
|
public void setAdministrationRoute(String administrationRoute) |
||||
|
{ |
||||
|
this.administrationRoute = administrationRoute; |
||||
|
} |
||||
|
|
||||
|
public String getAdministrationRoute() |
||||
|
{ |
||||
|
return administrationRoute; |
||||
|
} |
||||
|
|
||||
|
public void setStorageCondition(String storageCondition) |
||||
|
{ |
||||
|
this.storageCondition = storageCondition; |
||||
|
} |
||||
|
|
||||
|
public String getStorageCondition() |
||||
|
{ |
||||
|
return storageCondition; |
||||
|
} |
||||
|
|
||||
|
public void setPrecautions(String precautions) |
||||
|
{ |
||||
|
this.precautions = precautions; |
||||
|
} |
||||
|
|
||||
|
public String getPrecautions() |
||||
|
{ |
||||
|
return precautions; |
||||
|
} |
||||
|
|
||||
|
public void setStatus(String status) |
||||
|
{ |
||||
|
this.status = status; |
||||
|
} |
||||
|
|
||||
|
public String getStatus() |
||||
|
{ |
||||
|
return status; |
||||
|
} |
||||
|
|
||||
|
public void setStockQuantity(Long stockQuantity) |
||||
|
{ |
||||
|
this.stockQuantity = stockQuantity; |
||||
|
} |
||||
|
|
||||
|
public Long getStockQuantity() |
||||
|
{ |
||||
|
return stockQuantity; |
||||
|
} |
||||
|
|
||||
|
public void setUsedQuantity(Long usedQuantity) |
||||
|
{ |
||||
|
this.usedQuantity = usedQuantity; |
||||
|
} |
||||
|
|
||||
|
public Long getUsedQuantity() |
||||
|
{ |
||||
|
return usedQuantity; |
||||
|
} |
||||
|
|
||||
|
public void setCreatedBy(String createdBy) |
||||
|
{ |
||||
|
this.createdBy = createdBy; |
||||
|
} |
||||
|
|
||||
|
public String getCreatedBy() |
||||
|
{ |
||||
|
return createdBy; |
||||
|
} |
||||
|
|
||||
|
public void setCreatedTime(Date createdTime) |
||||
|
{ |
||||
|
this.createdTime = createdTime; |
||||
|
} |
||||
|
|
||||
|
public Date getCreatedTime() |
||||
|
{ |
||||
|
return createdTime; |
||||
|
} |
||||
|
|
||||
|
public void setUpdatedBy(String updatedBy) |
||||
|
{ |
||||
|
this.updatedBy = updatedBy; |
||||
|
} |
||||
|
|
||||
|
public String getUpdatedBy() |
||||
|
{ |
||||
|
return updatedBy; |
||||
|
} |
||||
|
|
||||
|
public void setUpdatedTime(Date updatedTime) |
||||
|
{ |
||||
|
this.updatedTime = updatedTime; |
||||
|
} |
||||
|
|
||||
|
public Date getUpdatedTime() |
||||
|
{ |
||||
|
return updatedTime; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public String toString() { |
||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
||||
|
.append("id", getId()) |
||||
|
.append("approvalNumber", getApprovalNumber()) |
||||
|
.append("batchNumber", getBatchNumber()) |
||||
|
.append("genericName", getGenericName()) |
||||
|
.append("tradeName", getTradeName()) |
||||
|
.append("specification", getSpecification()) |
||||
|
.append("manufacturer", getManufacturer()) |
||||
|
.append("manufactureDate", getManufactureDate()) |
||||
|
.append("expiryDate", getExpiryDate()) |
||||
|
.append("livestockTypes", getLivestockTypes()) |
||||
|
.append("preventDisease", getPreventDisease()) |
||||
|
.append("isMandatory", getIsMandatory()) |
||||
|
.append("immunePeriod", getImmunePeriod()) |
||||
|
.append("dosage", getDosage()) |
||||
|
.append("administrationRoute", getAdministrationRoute()) |
||||
|
.append("storageCondition", getStorageCondition()) |
||||
|
.append("precautions", getPrecautions()) |
||||
|
.append("status", getStatus()) |
||||
|
.append("stockQuantity", getStockQuantity()) |
||||
|
.append("usedQuantity", getUsedQuantity()) |
||||
|
.append("createdBy", getCreatedBy()) |
||||
|
.append("createdTime", getCreatedTime()) |
||||
|
.append("updatedBy", getUpdatedBy()) |
||||
|
.append("updatedTime", getUpdatedTime()) |
||||
|
.append("remark", getRemark()) |
||||
|
.toString(); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,61 @@ |
|||||
|
package com.chenhai.system.mapper; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import com.chenhai.system.domain.SysVacCategory; |
||||
|
|
||||
|
/** |
||||
|
* 疫苗类别Mapper接口 |
||||
|
* |
||||
|
* @author ruoyi |
||||
|
* @date 2026-01-29 |
||||
|
*/ |
||||
|
public interface SysVacCategoryMapper |
||||
|
{ |
||||
|
/** |
||||
|
* 查询疫苗类别 |
||||
|
* |
||||
|
* @param id 疫苗类别主键 |
||||
|
* @return 疫苗类别 |
||||
|
*/ |
||||
|
public SysVacCategory selectSysVacCategoryById(Long id); |
||||
|
|
||||
|
/** |
||||
|
* 查询疫苗类别列表 |
||||
|
* |
||||
|
* @param sysVacCategory 疫苗类别 |
||||
|
* @return 疫苗类别集合 |
||||
|
*/ |
||||
|
public List<SysVacCategory> selectSysVacCategoryList(SysVacCategory sysVacCategory); |
||||
|
|
||||
|
/** |
||||
|
* 新增疫苗类别 |
||||
|
* |
||||
|
* @param sysVacCategory 疫苗类别 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int insertSysVacCategory(SysVacCategory sysVacCategory); |
||||
|
|
||||
|
/** |
||||
|
* 修改疫苗类别 |
||||
|
* |
||||
|
* @param sysVacCategory 疫苗类别 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int updateSysVacCategory(SysVacCategory sysVacCategory); |
||||
|
|
||||
|
/** |
||||
|
* 删除疫苗类别 |
||||
|
* |
||||
|
* @param id 疫苗类别主键 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int deleteSysVacCategoryById(Long id); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除疫苗类别 |
||||
|
* |
||||
|
* @param ids 需要删除的数据主键集合 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int deleteSysVacCategoryByIds(Long[] ids); |
||||
|
} |
||||
@ -0,0 +1,61 @@ |
|||||
|
package com.chenhai.system.service; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import com.chenhai.system.domain.SysVacCategory; |
||||
|
|
||||
|
/** |
||||
|
* 疫苗类别Service接口 |
||||
|
* |
||||
|
* @author ruoyi |
||||
|
* @date 2026-01-29 |
||||
|
*/ |
||||
|
public interface ISysVacCategoryService |
||||
|
{ |
||||
|
/** |
||||
|
* 查询疫苗类别 |
||||
|
* |
||||
|
* @param id 疫苗类别主键 |
||||
|
* @return 疫苗类别 |
||||
|
*/ |
||||
|
public SysVacCategory selectSysVacCategoryById(Long id); |
||||
|
|
||||
|
/** |
||||
|
* 查询疫苗类别列表 |
||||
|
* |
||||
|
* @param sysVacCategory 疫苗类别 |
||||
|
* @return 疫苗类别集合 |
||||
|
*/ |
||||
|
public List<SysVacCategory> selectSysVacCategoryList(SysVacCategory sysVacCategory); |
||||
|
|
||||
|
/** |
||||
|
* 新增疫苗类别 |
||||
|
* |
||||
|
* @param sysVacCategory 疫苗类别 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int insertSysVacCategory(SysVacCategory sysVacCategory); |
||||
|
|
||||
|
/** |
||||
|
* 修改疫苗类别 |
||||
|
* |
||||
|
* @param sysVacCategory 疫苗类别 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int updateSysVacCategory(SysVacCategory sysVacCategory); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除疫苗类别 |
||||
|
* |
||||
|
* @param ids 需要删除的疫苗类别主键集合 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int deleteSysVacCategoryByIds(Long[] ids); |
||||
|
|
||||
|
/** |
||||
|
* 删除疫苗类别信息 |
||||
|
* |
||||
|
* @param id 疫苗类别主键 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int deleteSysVacCategoryById(Long id); |
||||
|
} |
||||
@ -0,0 +1,93 @@ |
|||||
|
package com.chenhai.system.service.impl; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import com.chenhai.system.mapper.SysVacCategoryMapper; |
||||
|
import com.chenhai.system.domain.SysVacCategory; |
||||
|
import com.chenhai.system.service.ISysVacCategoryService; |
||||
|
|
||||
|
/** |
||||
|
* 疫苗类别Service业务层处理 |
||||
|
* |
||||
|
* @author ruoyi |
||||
|
* @date 2026-01-29 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class SysVacCategoryServiceImpl implements ISysVacCategoryService |
||||
|
{ |
||||
|
@Autowired |
||||
|
private SysVacCategoryMapper sysVacCategoryMapper; |
||||
|
|
||||
|
/** |
||||
|
* 查询疫苗类别 |
||||
|
* |
||||
|
* @param id 疫苗类别主键 |
||||
|
* @return 疫苗类别 |
||||
|
*/ |
||||
|
@Override |
||||
|
public SysVacCategory selectSysVacCategoryById(Long id) |
||||
|
{ |
||||
|
return sysVacCategoryMapper.selectSysVacCategoryById(id); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 查询疫苗类别列表 |
||||
|
* |
||||
|
* @param sysVacCategory 疫苗类别 |
||||
|
* @return 疫苗类别 |
||||
|
*/ |
||||
|
@Override |
||||
|
public List<SysVacCategory> selectSysVacCategoryList(SysVacCategory sysVacCategory) |
||||
|
{ |
||||
|
return sysVacCategoryMapper.selectSysVacCategoryList(sysVacCategory); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 新增疫苗类别 |
||||
|
* |
||||
|
* @param sysVacCategory 疫苗类别 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
@Override |
||||
|
public int insertSysVacCategory(SysVacCategory sysVacCategory) |
||||
|
{ |
||||
|
return sysVacCategoryMapper.insertSysVacCategory(sysVacCategory); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 修改疫苗类别 |
||||
|
* |
||||
|
* @param sysVacCategory 疫苗类别 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
@Override |
||||
|
public int updateSysVacCategory(SysVacCategory sysVacCategory) |
||||
|
{ |
||||
|
return sysVacCategoryMapper.updateSysVacCategory(sysVacCategory); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 批量删除疫苗类别 |
||||
|
* |
||||
|
* @param ids 需要删除的疫苗类别主键 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
@Override |
||||
|
public int deleteSysVacCategoryByIds(Long[] ids) |
||||
|
{ |
||||
|
return sysVacCategoryMapper.deleteSysVacCategoryByIds(ids); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除疫苗类别信息 |
||||
|
* |
||||
|
* @param id 疫苗类别主键 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
@Override |
||||
|
public int deleteSysVacCategoryById(Long id) |
||||
|
{ |
||||
|
return sysVacCategoryMapper.deleteSysVacCategoryById(id); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,170 @@ |
|||||
|
<?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.chenhai.system.mapper.SysVacCategoryMapper"> |
||||
|
|
||||
|
<resultMap type="SysVacCategory" id="SysVacCategoryResult"> |
||||
|
<result property="id" column="id" /> |
||||
|
<result property="approvalNumber" column="approval_number" /> |
||||
|
<result property="batchNumber" column="batch_number" /> |
||||
|
<result property="genericName" column="generic_name" /> |
||||
|
<result property="tradeName" column="trade_name" /> |
||||
|
<result property="specification" column="specification" /> |
||||
|
<result property="manufacturer" column="manufacturer" /> |
||||
|
<result property="manufactureDate" column="manufacture_date" /> |
||||
|
<result property="expiryDate" column="expiry_date" /> |
||||
|
<result property="livestockTypes" column="livestock_types" /> |
||||
|
<result property="preventDisease" column="prevent_disease" /> |
||||
|
<result property="isMandatory" column="is_mandatory" /> |
||||
|
<result property="immunePeriod" column="immune_period" /> |
||||
|
<result property="dosage" column="dosage" /> |
||||
|
<result property="administrationRoute" column="administration_route" /> |
||||
|
<result property="storageCondition" column="storage_condition" /> |
||||
|
<result property="precautions" column="precautions" /> |
||||
|
<result property="status" column="status" /> |
||||
|
<result property="stockQuantity" column="stock_quantity" /> |
||||
|
<result property="usedQuantity" column="used_quantity" /> |
||||
|
<result property="createdBy" column="created_by" /> |
||||
|
<result property="createdTime" column="created_time" /> |
||||
|
<result property="updatedBy" column="updated_by" /> |
||||
|
<result property="updatedTime" column="updated_time" /> |
||||
|
<result property="remark" column="remark" /> |
||||
|
</resultMap> |
||||
|
|
||||
|
<sql id="selectSysVacCategoryVo"> |
||||
|
select id, approval_number, batch_number, generic_name, trade_name, specification, manufacturer, manufacture_date, expiry_date, livestock_types, prevent_disease, is_mandatory, immune_period, dosage, administration_route, storage_condition, precautions, status, stock_quantity, used_quantity, created_by, created_time, updated_by, updated_time, remark from sys_vac_category |
||||
|
</sql> |
||||
|
|
||||
|
<select id="selectSysVacCategoryList" parameterType="SysVacCategory" resultMap="SysVacCategoryResult"> |
||||
|
<include refid="selectSysVacCategoryVo"/> |
||||
|
<where> |
||||
|
<if test="approvalNumber != null and approvalNumber != ''"> and approval_number = #{approvalNumber}</if> |
||||
|
<if test="batchNumber != null and batchNumber != ''"> and batch_number = #{batchNumber}</if> |
||||
|
<if test="genericName != null and genericName != ''"> and generic_name like concat('%', #{genericName}, '%')</if> |
||||
|
<if test="tradeName != null and tradeName != ''"> and trade_name like concat('%', #{tradeName}, '%')</if> |
||||
|
<if test="specification != null and specification != ''"> and specification = #{specification}</if> |
||||
|
<if test="manufacturer != null and manufacturer != ''"> and manufacturer = #{manufacturer}</if> |
||||
|
<if test="manufactureDate != null "> and manufacture_date = #{manufactureDate}</if> |
||||
|
<if test="expiryDate != null "> and expiry_date = #{expiryDate}</if> |
||||
|
<if test="livestockTypes != null and livestockTypes != ''"> and livestock_types = #{livestockTypes}</if> |
||||
|
<if test="preventDisease != null and preventDisease != ''"> and prevent_disease = #{preventDisease}</if> |
||||
|
<if test="isMandatory != null and isMandatory != ''"> and is_mandatory = #{isMandatory}</if> |
||||
|
<if test="immunePeriod != null "> and immune_period = #{immunePeriod}</if> |
||||
|
<if test="dosage != null and dosage != ''"> and dosage = #{dosage}</if> |
||||
|
<if test="administrationRoute != null and administrationRoute != ''"> and administration_route = #{administrationRoute}</if> |
||||
|
<if test="storageCondition != null and storageCondition != ''"> and storage_condition = #{storageCondition}</if> |
||||
|
<if test="precautions != null and precautions != ''"> and precautions = #{precautions}</if> |
||||
|
<if test="status != null and status != ''"> and status = #{status}</if> |
||||
|
<if test="stockQuantity != null "> and stock_quantity = #{stockQuantity}</if> |
||||
|
<if test="usedQuantity != null "> and used_quantity = #{usedQuantity}</if> |
||||
|
<if test="createdBy != null and createdBy != ''"> and created_by = #{createdBy}</if> |
||||
|
<if test="createdTime != null "> and created_time = #{createdTime}</if> |
||||
|
<if test="updatedBy != null and updatedBy != ''"> and updated_by = #{updatedBy}</if> |
||||
|
<if test="updatedTime != null "> and updated_time = #{updatedTime}</if> |
||||
|
</where> |
||||
|
</select> |
||||
|
|
||||
|
<select id="selectSysVacCategoryById" parameterType="Long" resultMap="SysVacCategoryResult"> |
||||
|
<include refid="selectSysVacCategoryVo"/> |
||||
|
where id = #{id} |
||||
|
</select> |
||||
|
|
||||
|
<insert id="insertSysVacCategory" parameterType="SysVacCategory" useGeneratedKeys="true" keyProperty="id"> |
||||
|
insert into sys_vac_category |
||||
|
<trim prefix="(" suffix=")" suffixOverrides=","> |
||||
|
<if test="approvalNumber != null and approvalNumber != ''">approval_number,</if> |
||||
|
<if test="batchNumber != null and batchNumber != ''">batch_number,</if> |
||||
|
<if test="genericName != null and genericName != ''">generic_name,</if> |
||||
|
<if test="tradeName != null">trade_name,</if> |
||||
|
<if test="specification != null">specification,</if> |
||||
|
<if test="manufacturer != null and manufacturer != ''">manufacturer,</if> |
||||
|
<if test="manufactureDate != null">manufacture_date,</if> |
||||
|
<if test="expiryDate != null">expiry_date,</if> |
||||
|
<if test="livestockTypes != null and livestockTypes != ''">livestock_types,</if> |
||||
|
<if test="preventDisease != null and preventDisease != ''">prevent_disease,</if> |
||||
|
<if test="isMandatory != null">is_mandatory,</if> |
||||
|
<if test="immunePeriod != null">immune_period,</if> |
||||
|
<if test="dosage != null">dosage,</if> |
||||
|
<if test="administrationRoute != null">administration_route,</if> |
||||
|
<if test="storageCondition != null">storage_condition,</if> |
||||
|
<if test="precautions != null">precautions,</if> |
||||
|
<if test="status != null">status,</if> |
||||
|
<if test="stockQuantity != null">stock_quantity,</if> |
||||
|
<if test="usedQuantity != null">used_quantity,</if> |
||||
|
<if test="createdBy != null">created_by,</if> |
||||
|
<if test="createdTime != null">created_time,</if> |
||||
|
<if test="updatedBy != null">updated_by,</if> |
||||
|
<if test="updatedTime != null">updated_time,</if> |
||||
|
<if test="remark != null">remark,</if> |
||||
|
</trim> |
||||
|
<trim prefix="values (" suffix=")" suffixOverrides=","> |
||||
|
<if test="approvalNumber != null and approvalNumber != ''">#{approvalNumber},</if> |
||||
|
<if test="batchNumber != null and batchNumber != ''">#{batchNumber},</if> |
||||
|
<if test="genericName != null and genericName != ''">#{genericName},</if> |
||||
|
<if test="tradeName != null">#{tradeName},</if> |
||||
|
<if test="specification != null">#{specification},</if> |
||||
|
<if test="manufacturer != null and manufacturer != ''">#{manufacturer},</if> |
||||
|
<if test="manufactureDate != null">#{manufactureDate},</if> |
||||
|
<if test="expiryDate != null">#{expiryDate},</if> |
||||
|
<if test="livestockTypes != null and livestockTypes != ''">#{livestockTypes},</if> |
||||
|
<if test="preventDisease != null and preventDisease != ''">#{preventDisease},</if> |
||||
|
<if test="isMandatory != null">#{isMandatory},</if> |
||||
|
<if test="immunePeriod != null">#{immunePeriod},</if> |
||||
|
<if test="dosage != null">#{dosage},</if> |
||||
|
<if test="administrationRoute != null">#{administrationRoute},</if> |
||||
|
<if test="storageCondition != null">#{storageCondition},</if> |
||||
|
<if test="precautions != null">#{precautions},</if> |
||||
|
<if test="status != null">#{status},</if> |
||||
|
<if test="stockQuantity != null">#{stockQuantity},</if> |
||||
|
<if test="usedQuantity != null">#{usedQuantity},</if> |
||||
|
<if test="createdBy != null">#{createdBy},</if> |
||||
|
<if test="createdTime != null">#{createdTime},</if> |
||||
|
<if test="updatedBy != null">#{updatedBy},</if> |
||||
|
<if test="updatedTime != null">#{updatedTime},</if> |
||||
|
<if test="remark != null">#{remark},</if> |
||||
|
</trim> |
||||
|
</insert> |
||||
|
|
||||
|
<update id="updateSysVacCategory" parameterType="SysVacCategory"> |
||||
|
update sys_vac_category |
||||
|
<trim prefix="SET" suffixOverrides=","> |
||||
|
<if test="approvalNumber != null and approvalNumber != ''">approval_number = #{approvalNumber},</if> |
||||
|
<if test="batchNumber != null and batchNumber != ''">batch_number = #{batchNumber},</if> |
||||
|
<if test="genericName != null and genericName != ''">generic_name = #{genericName},</if> |
||||
|
<if test="tradeName != null">trade_name = #{tradeName},</if> |
||||
|
<if test="specification != null">specification = #{specification},</if> |
||||
|
<if test="manufacturer != null and manufacturer != ''">manufacturer = #{manufacturer},</if> |
||||
|
<if test="manufactureDate != null">manufacture_date = #{manufactureDate},</if> |
||||
|
<if test="expiryDate != null">expiry_date = #{expiryDate},</if> |
||||
|
<if test="livestockTypes != null and livestockTypes != ''">livestock_types = #{livestockTypes},</if> |
||||
|
<if test="preventDisease != null and preventDisease != ''">prevent_disease = #{preventDisease},</if> |
||||
|
<if test="isMandatory != null">is_mandatory = #{isMandatory},</if> |
||||
|
<if test="immunePeriod != null">immune_period = #{immunePeriod},</if> |
||||
|
<if test="dosage != null">dosage = #{dosage},</if> |
||||
|
<if test="administrationRoute != null">administration_route = #{administrationRoute},</if> |
||||
|
<if test="storageCondition != null">storage_condition = #{storageCondition},</if> |
||||
|
<if test="precautions != null">precautions = #{precautions},</if> |
||||
|
<if test="status != null">status = #{status},</if> |
||||
|
<if test="stockQuantity != null">stock_quantity = #{stockQuantity},</if> |
||||
|
<if test="usedQuantity != null">used_quantity = #{usedQuantity},</if> |
||||
|
<if test="createdBy != null">created_by = #{createdBy},</if> |
||||
|
<if test="createdTime != null">created_time = #{createdTime},</if> |
||||
|
<if test="updatedBy != null">updated_by = #{updatedBy},</if> |
||||
|
<if test="updatedTime != null">updated_time = #{updatedTime},</if> |
||||
|
<if test="remark != null">remark = #{remark},</if> |
||||
|
</trim> |
||||
|
where id = #{id} |
||||
|
</update> |
||||
|
|
||||
|
<delete id="deleteSysVacCategoryById" parameterType="Long"> |
||||
|
delete from sys_vac_category where id = #{id} |
||||
|
</delete> |
||||
|
|
||||
|
<delete id="deleteSysVacCategoryByIds" parameterType="String"> |
||||
|
delete from sys_vac_category where id in |
||||
|
<foreach item="id" collection="array" open="(" separator="," close=")"> |
||||
|
#{id} |
||||
|
</foreach> |
||||
|
</delete> |
||||
|
</mapper> |
||||
@ -0,0 +1,44 @@ |
|||||
|
import request from '@/utils/request' |
||||
|
|
||||
|
// 查询疫苗类别列表
|
||||
|
export function listVacCategory(query) { |
||||
|
return request({ |
||||
|
url: '/system/vacCategory/list', |
||||
|
method: 'get', |
||||
|
params: query |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 查询疫苗类别详细
|
||||
|
export function getVacCategory(id) { |
||||
|
return request({ |
||||
|
url: '/system/vacCategory/' + id, |
||||
|
method: 'get' |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 新增疫苗类别
|
||||
|
export function addVacCategory(data) { |
||||
|
return request({ |
||||
|
url: '/system/vacCategory', |
||||
|
method: 'post', |
||||
|
data: data |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 修改疫苗类别
|
||||
|
export function updateVacCategory(data) { |
||||
|
return request({ |
||||
|
url: '/system/vacCategory', |
||||
|
method: 'put', |
||||
|
data: data |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 删除疫苗类别
|
||||
|
export function delVacCategory(id) { |
||||
|
return request({ |
||||
|
url: '/system/vacCategory/' + id, |
||||
|
method: 'delete' |
||||
|
}) |
||||
|
} |
||||
@ -0,0 +1 @@ |
|||||
|
<svg t="1769679595455" class="icon" viewBox="0 0 1293 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6622" width="200" height="200"><path d="M137.062965 32.556333a474.871453 474.871453 0 0 1 204.947925 77.582811 68.208221 68.208221 0 0 0 52.691659 8.404804 1043.812064 1043.812064 0 0 1 230.485599-43.64033 750.613692 750.613692 0 0 1 133.183825 11.314159 99.887869 99.887869 0 0 0-6.465234 133.183825l6.788496 7.43502 7.435019 7.435019-161.630855 161.630855-2.586094-2.586093-50.105565 55.924275a137.386227 137.386227 0 0 0-15.1933 154.519098l5.81871 9.37459-117.344 140.295582a82.431736 82.431736 0 0 0 109.262458 121.223142l7.435019-5.172188 141.265368-118.313786a137.062965 137.062965 0 0 0 164.863472-9.051328l8.728066-7.758281 205.271187-204.624663 5.495449 5.172188a99.564607 99.564607 0 0 0 109.262458 21.335273c1.93957 23.598105 2.262832 47.842733 1.93957 73.380408 20.042226 39.437929 55.277753 100.21113 89.220232 120.576618 7.111758 4.202402 6.788496 6.465234 0 6.141973A205.91771 205.91771 0 0 1 1163.742158 716.578113a561.18233 561.18233 0 0 1-64.652342 146.437555c-16.486347 26.830722-88.89697 149.023649-130.920993 160.014547h-167.449566a26.50746 26.50746 0 0 1-26.50746-25.537675v-4.525664l1.616309-40.730976a23.274843 23.274843 0 0 0-22.305058-24.891151 21.335273 21.335273 0 0 0-6.465235 0 850.178299 850.178299 0 0 1-122.83945 12.607206 745.764766 745.764766 0 0 1-74.673455-4.525664 34.589003 34.589003 0 0 0-34.265741 20.365488v5.172187l-9.697852 33.94248a45.256639 45.256639 0 0 1-32.326171 28.447031h-140.942105a27.477245 27.477245 0 0 1-27.153984-25.214414v-5.172187l-1.93957-111.848552c-4.525664-43.317069-42.670546-54.631229-71.440838-82.431736-55.277753-53.984706-91.806326-112.495075-181.026558-112.818337-27.477245 0-39.76119-32.326171-39.761191-32.326171A206.564233 206.564233 0 0 1 0 608.931964V477.687709A193.957026 193.957026 0 0 1 10.990898 420.470386s12.283945-32.326171 40.084452-32.326171c81.785213 0 73.70367-55.601014 117.344001-113.141599a428.645028 428.645028 0 0 1 53.338183-54.95449A33.94248 33.94248 0 0 0 226.283197 177.054318S152.902789 71.024477 131.567516 43.870493C126.395329 37.405259 129.304684 32.556333 137.062965 32.556333z m466.789911 607.085493l51.721873 51.721874-154.842359 129.304684a19.072441 19.072441 0 0 1-26.830722-26.50746z m209.79685-362.053116l205.594448 204.947925-207.534019 206.887494a73.380408 73.380408 0 0 1-103.443747 0l-103.120486-102.473962a73.057147 73.057147 0 0 1-4.848925-96.978513l5.495449-5.818711 51.07535 51.07535a36.205312 36.205312 0 0 0 46.226425 4.202403l5.172187-4.202403a35.88205 35.88205 0 0 0 4.202402-46.226424l-3.87914-3.879141-51.075351-51.07535L711.175763 381.032457l51.075351 50.752089a36.528573 36.528573 0 0 0 47.196209 3.879141l4.525664-3.555879a36.205312 36.205312 0 0 0 3.879141-46.872948l-3.879141-4.525664-51.07535-50.752089 52.045136-51.721873zM855.673748 129.534847L1163.742158 438.573042a35.88205 35.88205 0 0 1 0 51.07535 36.851835 36.851835 0 0 1-51.721873 0l-308.068411-307.098625a35.88205 35.88205 0 0 1 0-51.07535 36.851835 36.851835 0 0 1 51.721874 0zM277.358548 252.374297a47.19621 47.19621 0 0 0-40.407714 28.44703A117.020739 117.020739 0 0 0 226.283197 334.159509a122.192927 122.192927 0 0 0 8.728067 50.105566 39.437929 39.437929 0 0 0 37.175096 25.214413 56.570799 56.570799 0 0 0 44.286855-25.214413 87.603924 87.603924 0 0 0 14.870038-50.105566 117.020739 117.020739 0 0 0-11.960683-53.338182 47.19621 47.19621 0 0 0-42.024022-28.44703zM1076.784758 10.897799l205.594448 204.947924a35.88205 35.88205 0 0 1 0 51.075351 36.528573 36.528573 0 0 1-51.721874 0 36.205312 36.205312 0 0 0-51.398612 0l-52.691658 52.691658-154.195836-153.549312 52.045135-52.045136a36.205312 36.205312 0 0 0 0-51.398612 36.528573 36.528573 0 0 1 0-51.398611 36.528573 36.528573 0 0 1 52.368397-0.323262z" p-id="6623" fill="#6CAB86"></path></svg> |
||||
@ -0,0 +1,654 @@ |
|||||
|
<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="approvalNumber"> |
||||
|
<el-input |
||||
|
v-model="queryParams.approvalNumber" |
||||
|
placeholder="请输入兽药批准文号" |
||||
|
clearable |
||||
|
@keyup.enter.native="handleQuery" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="产品批号" prop="batchNumber"> |
||||
|
<el-input |
||||
|
v-model="queryParams.batchNumber" |
||||
|
placeholder="请输入产品批号" |
||||
|
clearable |
||||
|
@keyup.enter.native="handleQuery" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="通用名称" prop="genericName"> |
||||
|
<el-input |
||||
|
v-model="queryParams.genericName" |
||||
|
placeholder="请输入通用名称" |
||||
|
clearable |
||||
|
@keyup.enter.native="handleQuery" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="商品名称" prop="tradeName"> |
||||
|
<el-input |
||||
|
v-model="queryParams.tradeName" |
||||
|
placeholder="请输入商品名称" |
||||
|
clearable |
||||
|
@keyup.enter.native="handleQuery" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="规格" prop="specification"> |
||||
|
<el-input |
||||
|
v-model="queryParams.specification" |
||||
|
placeholder="请输入规格,如:100ml/瓶" |
||||
|
clearable |
||||
|
@keyup.enter.native="handleQuery" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="生产厂家" prop="manufacturer"> |
||||
|
<el-input |
||||
|
v-model="queryParams.manufacturer" |
||||
|
placeholder="请输入生产厂家" |
||||
|
clearable |
||||
|
@keyup.enter.native="handleQuery" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<!-- <el-form-item label="生产日期" prop="manufactureDate">--> |
||||
|
<!-- <el-date-picker clearable--> |
||||
|
<!-- v-model="queryParams.manufactureDate"--> |
||||
|
<!-- type="date"--> |
||||
|
<!-- value-format="yyyy-MM-dd"--> |
||||
|
<!-- placeholder="请选择生产日期">--> |
||||
|
<!-- </el-date-picker>--> |
||||
|
<!-- </el-form-item>--> |
||||
|
<!-- <el-form-item label="有效期至" prop="expiryDate">--> |
||||
|
<!-- <el-date-picker clearable--> |
||||
|
<!-- v-model="queryParams.expiryDate"--> |
||||
|
<!-- type="date"--> |
||||
|
<!-- value-format="yyyy-MM-dd"--> |
||||
|
<!-- placeholder="请选择有效期至">--> |
||||
|
<!-- </el-date-picker>--> |
||||
|
<!-- </el-form-item>--> |
||||
|
<!-- <el-form-item label="预防疫病" prop="preventDisease">--> |
||||
|
<!-- <el-input--> |
||||
|
<!-- v-model="queryParams.preventDisease"--> |
||||
|
<!-- placeholder="请输入预防疫病"--> |
||||
|
<!-- clearable--> |
||||
|
<!-- @keyup.enter.native="handleQuery"--> |
||||
|
<!-- />--> |
||||
|
<!-- </el-form-item>--> |
||||
|
<el-form-item label="是否强制免疫" prop="isMandatory"> |
||||
|
<el-select v-model="queryParams.isMandatory" placeholder="请选择是否强制免疫" clearable> |
||||
|
<el-option |
||||
|
v-for="dict in dict.type.is_compulsory_immunity" |
||||
|
:key="dict.value" |
||||
|
:label="dict.label" |
||||
|
:value="dict.value" |
||||
|
/> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<!-- <el-form-item label="免疫期" prop="immunePeriod">--> |
||||
|
<!-- <el-input--> |
||||
|
<!-- v-model="queryParams.immunePeriod"--> |
||||
|
<!-- placeholder="请输入免疫期"--> |
||||
|
<!-- clearable--> |
||||
|
<!-- @keyup.enter.native="handleQuery"--> |
||||
|
<!-- />--> |
||||
|
<!-- </el-form-item>--> |
||||
|
<!-- <el-form-item label="用法用量" prop="dosage">--> |
||||
|
<!-- <el-input--> |
||||
|
<!-- v-model="queryParams.dosage"--> |
||||
|
<!-- placeholder="请输入用法用量"--> |
||||
|
<!-- clearable--> |
||||
|
<!-- @keyup.enter.native="handleQuery"--> |
||||
|
<!-- />--> |
||||
|
<!-- </el-form-item>--> |
||||
|
<el-form-item label="接种途径" prop="administrationRoute"> |
||||
|
<el-select v-model="queryParams.administrationRoute" placeholder="请选择接种途径" clearable> |
||||
|
<el-option |
||||
|
v-for="dict in dict.type.vac_route" |
||||
|
:key="dict.value" |
||||
|
:label="dict.label" |
||||
|
:value="dict.value" |
||||
|
/> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<!-- <el-form-item label="贮藏条件" prop="storageCondition">--> |
||||
|
<!-- <el-input--> |
||||
|
<!-- v-model="queryParams.storageCondition"--> |
||||
|
<!-- placeholder="请输入贮藏条件"--> |
||||
|
<!-- clearable--> |
||||
|
<!-- @keyup.enter.native="handleQuery"--> |
||||
|
<!-- />--> |
||||
|
<!-- </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.vac_category_status" |
||||
|
:key="dict.value" |
||||
|
:label="dict.label" |
||||
|
:value="dict.value" |
||||
|
/> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<!-- <el-form-item label="库存数量" prop="stockQuantity">--> |
||||
|
<!-- <el-input--> |
||||
|
<!-- v-model="queryParams.stockQuantity"--> |
||||
|
<!-- placeholder="请输入库存数量"--> |
||||
|
<!-- clearable--> |
||||
|
<!-- @keyup.enter.native="handleQuery"--> |
||||
|
<!-- />--> |
||||
|
<!-- </el-form-item>--> |
||||
|
<!-- <el-form-item label="已使用数量" prop="usedQuantity">--> |
||||
|
<!-- <el-input--> |
||||
|
<!-- v-model="queryParams.usedQuantity"--> |
||||
|
<!-- placeholder="请输入已使用数量"--> |
||||
|
<!-- clearable--> |
||||
|
<!-- @keyup.enter.native="handleQuery"--> |
||||
|
<!-- />--> |
||||
|
<!-- </el-form-item>--> |
||||
|
<!-- <el-form-item label="创建者" prop="createdBy">--> |
||||
|
<!-- <el-input--> |
||||
|
<!-- v-model="queryParams.createdBy"--> |
||||
|
<!-- placeholder="请输入创建者"--> |
||||
|
<!-- clearable--> |
||||
|
<!-- @keyup.enter.native="handleQuery"--> |
||||
|
<!-- />--> |
||||
|
<!-- </el-form-item>--> |
||||
|
<!-- <el-form-item label="创建时间" prop="createdTime">--> |
||||
|
<!-- <el-date-picker clearable--> |
||||
|
<!-- v-model="queryParams.createdTime"--> |
||||
|
<!-- type="date"--> |
||||
|
<!-- value-format="yyyy-MM-dd"--> |
||||
|
<!-- placeholder="请选择创建时间">--> |
||||
|
<!-- </el-date-picker>--> |
||||
|
<!-- </el-form-item>--> |
||||
|
<!-- <el-form-item label="更新者" prop="updatedBy">--> |
||||
|
<!-- <el-input--> |
||||
|
<!-- v-model="queryParams.updatedBy"--> |
||||
|
<!-- placeholder="请输入更新者"--> |
||||
|
<!-- clearable--> |
||||
|
<!-- @keyup.enter.native="handleQuery"--> |
||||
|
<!-- />--> |
||||
|
<!-- </el-form-item>--> |
||||
|
<!-- <el-form-item label="更新时间" prop="updatedTime">--> |
||||
|
<!-- <el-date-picker clearable--> |
||||
|
<!-- v-model="queryParams.updatedTime"--> |
||||
|
<!-- type="date"--> |
||||
|
<!-- value-format="yyyy-MM-dd"--> |
||||
|
<!-- placeholder="请选择更新时间">--> |
||||
|
<!-- </el-date-picker>--> |
||||
|
<!-- </el-form-item>--> |
||||
|
<el-form-item> |
||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> |
||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
|
||||
|
<el-row :gutter="10" class="mb8"> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="primary" |
||||
|
plain |
||||
|
icon="el-icon-plus" |
||||
|
size="mini" |
||||
|
@click="handleAdd" |
||||
|
v-hasPermi="['system:vacCategory: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="['system:vacCategory: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="['system:vacCategory: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="['system:vacCategory:export']" |
||||
|
>导出</el-button> |
||||
|
</el-col> |
||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
||||
|
</el-row> |
||||
|
|
||||
|
<el-table v-loading="loading" :data="vacCategoryList" @selection-change="handleSelectionChange"> |
||||
|
<el-table-column type="selection" width="55" align="center" /> |
||||
|
<el-table-column label="疫苗ID" align="center" prop="id" /> |
||||
|
<el-table-column label="兽药批准文号" align="center" prop="approvalNumber" /> |
||||
|
<el-table-column label="产品批号" align="center" prop="batchNumber" /> |
||||
|
<el-table-column label="通用名称" align="center" prop="genericName" /> |
||||
|
<el-table-column label="商品名称" align="center" prop="tradeName" /> |
||||
|
<el-table-column label="规格" align="center" prop="specification" /> |
||||
|
<el-table-column label="生产厂家" align="center" prop="manufacturer" /> |
||||
|
<el-table-column label="生产日期" align="center" prop="manufactureDate" width="180"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ parseTime(scope.row.manufactureDate, '{y}-{m}-{d}') }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="有效期至" align="center" prop="expiryDate" width="180"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ parseTime(scope.row.expiryDate, '{y}-{m}-{d}') }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="适用动物" align="center" prop="livestockTypes"> |
||||
|
<template slot-scope="scope"> |
||||
|
<dict-tag :options="dict.type.livestock_type" :value="scope.row.livestockTypes ? scope.row.livestockTypes.split(',') : []"/> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="预防疫病" align="center" prop="preventDisease" /> |
||||
|
<el-table-column label="是否强制免疫" align="center" prop="isMandatory"> |
||||
|
<template slot-scope="scope"> |
||||
|
<dict-tag :options="dict.type.is_compulsory_immunity" :value="scope.row.isMandatory"/> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<!-- <el-table-column label="免疫期" align="center" prop="immunePeriod" />--> |
||||
|
<el-table-column label="用法用量" align="center" prop="dosage" /> |
||||
|
<el-table-column label="接种途径" align="center" prop="administrationRoute"> |
||||
|
<template slot-scope="scope"> |
||||
|
<dict-tag :options="dict.type.vac_route" :value="scope.row.administrationRoute"/> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<!-- <el-table-column label="贮藏条件" align="center" prop="storageCondition" />--> |
||||
|
<!-- <el-table-column label="注意事项" align="center" prop="precautions" />--> |
||||
|
<!-- <el-table-column label="状态" align="center" prop="status">--> |
||||
|
<!-- <template slot-scope="scope">--> |
||||
|
<!-- <dict-tag :options="dict.type.vac_category_status" :value="scope.row.status"/>--> |
||||
|
<!-- </template>--> |
||||
|
<!-- </el-table-column>--> |
||||
|
<!-- <el-table-column label="库存数量" align="center" prop="stockQuantity" />--> |
||||
|
<!-- <el-table-column label="已使用数量" align="center" prop="usedQuantity" />--> |
||||
|
<!-- <el-table-column label="创建者" align="center" prop="createdBy" />--> |
||||
|
<!-- <el-table-column label="创建时间" align="center" prop="createdTime" width="180">--> |
||||
|
<!-- <template slot-scope="scope">--> |
||||
|
<!-- <span>{{ parseTime(scope.row.createdTime, '{y}-{m}-{d}') }}</span>--> |
||||
|
<!-- </template>--> |
||||
|
<!-- </el-table-column>--> |
||||
|
<!-- <el-table-column label="更新者" align="center" prop="updatedBy" />--> |
||||
|
<!-- <el-table-column label="更新时间" align="center" prop="updatedTime" width="180">--> |
||||
|
<!-- <template slot-scope="scope">--> |
||||
|
<!-- <span>{{ parseTime(scope.row.updatedTime, '{y}-{m}-{d}') }}</span>--> |
||||
|
<!-- </template>--> |
||||
|
<!-- </el-table-column>--> |
||||
|
<!-- <el-table-column label="备注" align="center" prop="remark" />--> |
||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button |
||||
|
size="mini" |
||||
|
type="text" |
||||
|
icon="el-icon-edit" |
||||
|
@click="handleUpdate(scope.row)" |
||||
|
v-hasPermi="['system:vacCategory:edit']" |
||||
|
>修改</el-button> |
||||
|
<el-button |
||||
|
size="mini" |
||||
|
type="text" |
||||
|
icon="el-icon-delete" |
||||
|
@click="handleDelete(scope.row)" |
||||
|
v-hasPermi="['system:vacCategory:remove']" |
||||
|
>删除</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
|
||||
|
<pagination |
||||
|
v-show="total>0" |
||||
|
:total="total" |
||||
|
:page.sync="queryParams.pageNum" |
||||
|
:limit.sync="queryParams.pageSize" |
||||
|
@pagination="getList" |
||||
|
/> |
||||
|
|
||||
|
<!-- 添加或修改疫苗类别对话框 --> |
||||
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> |
||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
||||
|
<el-form-item label="兽药批准文号" prop="approvalNumber"> |
||||
|
<el-input v-model="form.approvalNumber" placeholder="请输入兽药批准文号" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="产品批号" prop="batchNumber"> |
||||
|
<el-input v-model="form.batchNumber" placeholder="请输入产品批号" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="通用名称" prop="genericName"> |
||||
|
<el-input v-model="form.genericName" placeholder="请输入通用名称" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="商品名称" prop="tradeName"> |
||||
|
<el-input v-model="form.tradeName" placeholder="请输入商品名称" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="规格" prop="specification"> |
||||
|
<el-input v-model="form.specification" placeholder="请输入规格,如:100ml/瓶" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="生产厂家" prop="manufacturer"> |
||||
|
<el-input v-model="form.manufacturer" placeholder="请输入生产厂家" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="生产日期" prop="manufactureDate"> |
||||
|
<el-date-picker clearable |
||||
|
v-model="form.manufactureDate" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="请选择生产日期"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="有效期至" prop="expiryDate"> |
||||
|
<el-date-picker clearable |
||||
|
v-model="form.expiryDate" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="请选择有效期至"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="适用动物" prop="livestockTypes"> |
||||
|
<el-checkbox-group v-model="form.livestockTypes"> |
||||
|
<el-checkbox |
||||
|
v-for="dict in dict.type.livestock_type" |
||||
|
:key="dict.value" |
||||
|
:label="dict.value"> |
||||
|
{{dict.label}} |
||||
|
</el-checkbox> |
||||
|
</el-checkbox-group> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="预防疫病" prop="preventDisease"> |
||||
|
<el-input v-model="form.preventDisease" placeholder="请输入预防疫病" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="是否强制免疫" prop="isMandatory"> |
||||
|
<el-select v-model="form.isMandatory" placeholder="请选择是否强制免疫:0-否 1-是"> |
||||
|
<el-option |
||||
|
v-for="dict in dict.type.is_compulsory_immunity" |
||||
|
:key="dict.value" |
||||
|
:label="dict.label" |
||||
|
:value="dict.value" |
||||
|
></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="免疫期" prop="immunePeriod"> |
||||
|
<el-input v-model="form.immunePeriod" placeholder="请输入免疫期" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="用法用量" prop="dosage"> |
||||
|
<el-input v-model="form.dosage" placeholder="请输入用法用量" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="接种途径" prop="administrationRoute"> |
||||
|
<el-select v-model="form.administrationRoute" placeholder="请选择接种途径"> |
||||
|
<el-option |
||||
|
v-for="dict in dict.type.vac_route" |
||||
|
:key="dict.value" |
||||
|
:label="dict.label" |
||||
|
:value="dict.value" |
||||
|
></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="贮藏条件" prop="storageCondition"> |
||||
|
<el-input v-model="form.storageCondition" placeholder="请输入贮藏条件" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="注意事项" prop="precautions"> |
||||
|
<el-input v-model="form.precautions" type="textarea" 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.vac_category_status" |
||||
|
:key="dict.value" |
||||
|
:label="dict.value" |
||||
|
>{{dict.label}}</el-radio> |
||||
|
</el-radio-group> |
||||
|
</el-form-item> |
||||
|
<!-- <el-form-item label="库存数量" prop="stockQuantity">--> |
||||
|
<!-- <el-input v-model="form.stockQuantity" placeholder="请输入库存数量" />--> |
||||
|
<!-- </el-form-item>--> |
||||
|
<!-- <el-form-item label="已使用数量" prop="usedQuantity">--> |
||||
|
<!-- <el-input v-model="form.usedQuantity" placeholder="请输入已使用数量" />--> |
||||
|
<!-- </el-form-item>--> |
||||
|
<!-- <el-form-item label="创建者" prop="createdBy">--> |
||||
|
<!-- <el-input v-model="form.createdBy" placeholder="请输入创建者" />--> |
||||
|
<!-- </el-form-item>--> |
||||
|
<!-- <el-form-item label="创建时间" prop="createdTime">--> |
||||
|
<!-- <el-date-picker clearable--> |
||||
|
<!-- v-model="form.createdTime"--> |
||||
|
<!-- type="date"--> |
||||
|
<!-- value-format="yyyy-MM-dd"--> |
||||
|
<!-- placeholder="请选择创建时间">--> |
||||
|
<!-- </el-date-picker>--> |
||||
|
<!-- </el-form-item>--> |
||||
|
<!-- <el-form-item label="更新者" prop="updatedBy">--> |
||||
|
<!-- <el-input v-model="form.updatedBy" placeholder="请输入更新者" />--> |
||||
|
<!-- </el-form-item>--> |
||||
|
<!-- <el-form-item label="更新时间" prop="updatedTime">--> |
||||
|
<!-- <el-date-picker clearable--> |
||||
|
<!-- v-model="form.updatedTime"--> |
||||
|
<!-- type="date"--> |
||||
|
<!-- value-format="yyyy-MM-dd"--> |
||||
|
<!-- placeholder="请选择更新时间">--> |
||||
|
<!-- </el-date-picker>--> |
||||
|
<!-- </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 { listVacCategory, getVacCategory, delVacCategory, addVacCategory, updateVacCategory } from "@/api/system/vacCategory" |
||||
|
|
||||
|
export default { |
||||
|
name: "VacCategory", |
||||
|
dicts: ['livestock_type', 'is_compulsory_immunity', 'vac_route', 'vac_category_status'], |
||||
|
data() { |
||||
|
return { |
||||
|
// 遮罩层 |
||||
|
loading: true, |
||||
|
// 选中数组 |
||||
|
ids: [], |
||||
|
// 非单个禁用 |
||||
|
single: true, |
||||
|
// 非多个禁用 |
||||
|
multiple: true, |
||||
|
// 显示搜索条件 |
||||
|
showSearch: true, |
||||
|
// 总条数 |
||||
|
total: 0, |
||||
|
// 疫苗类别表格数据 |
||||
|
vacCategoryList: [], |
||||
|
// 弹出层标题 |
||||
|
title: "", |
||||
|
// 是否显示弹出层 |
||||
|
open: false, |
||||
|
// 查询参数 |
||||
|
queryParams: { |
||||
|
pageNum: 1, |
||||
|
pageSize: 10, |
||||
|
approvalNumber: null, |
||||
|
batchNumber: null, |
||||
|
genericName: null, |
||||
|
tradeName: null, |
||||
|
specification: null, |
||||
|
manufacturer: null, |
||||
|
manufactureDate: null, |
||||
|
expiryDate: null, |
||||
|
livestockTypes: null, |
||||
|
preventDisease: null, |
||||
|
isMandatory: null, |
||||
|
immunePeriod: null, |
||||
|
dosage: null, |
||||
|
administrationRoute: null, |
||||
|
storageCondition: null, |
||||
|
precautions: null, |
||||
|
status: null, |
||||
|
stockQuantity: null, |
||||
|
usedQuantity: null, |
||||
|
createdBy: null, |
||||
|
createdTime: null, |
||||
|
updatedBy: null, |
||||
|
updatedTime: null, |
||||
|
}, |
||||
|
// 表单参数 |
||||
|
form: {}, |
||||
|
// 表单校验 |
||||
|
rules: { |
||||
|
approvalNumber: [ |
||||
|
{ required: true, message: "兽药批准文号不能为空", trigger: "blur" } |
||||
|
], |
||||
|
batchNumber: [ |
||||
|
{ required: true, message: "产品批号不能为空", trigger: "blur" } |
||||
|
], |
||||
|
genericName: [ |
||||
|
{ required: true, message: "通用名称不能为空", trigger: "blur" } |
||||
|
], |
||||
|
manufacturer: [ |
||||
|
{ required: true, message: "生产厂家不能为空", trigger: "blur" } |
||||
|
], |
||||
|
manufactureDate: [ |
||||
|
{ required: true, message: "生产日期不能为空", trigger: "blur" } |
||||
|
], |
||||
|
expiryDate: [ |
||||
|
{ required: true, message: "有效期至不能为空", trigger: "blur" } |
||||
|
], |
||||
|
livestockTypes: [ |
||||
|
{ required: true, message: "适用动物不能为空", trigger: "blur" } |
||||
|
], |
||||
|
preventDisease: [ |
||||
|
{ required: true, message: "预防疫病不能为空", trigger: "blur" } |
||||
|
], |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
created() { |
||||
|
this.getList() |
||||
|
}, |
||||
|
methods: { |
||||
|
/** 查询疫苗类别列表 */ |
||||
|
getList() { |
||||
|
this.loading = true |
||||
|
listVacCategory(this.queryParams).then(response => { |
||||
|
this.vacCategoryList = response.rows |
||||
|
this.total = response.total |
||||
|
this.loading = false |
||||
|
}) |
||||
|
}, |
||||
|
// 取消按钮 |
||||
|
cancel() { |
||||
|
this.open = false |
||||
|
this.reset() |
||||
|
}, |
||||
|
// 表单重置 |
||||
|
reset() { |
||||
|
this.form = { |
||||
|
id: null, |
||||
|
approvalNumber: null, |
||||
|
batchNumber: null, |
||||
|
genericName: null, |
||||
|
tradeName: null, |
||||
|
specification: null, |
||||
|
manufacturer: null, |
||||
|
manufactureDate: null, |
||||
|
expiryDate: null, |
||||
|
livestockTypes: [], |
||||
|
preventDisease: null, |
||||
|
isMandatory: null, |
||||
|
immunePeriod: null, |
||||
|
dosage: null, |
||||
|
administrationRoute: null, |
||||
|
storageCondition: null, |
||||
|
precautions: null, |
||||
|
status: null, |
||||
|
stockQuantity: null, |
||||
|
usedQuantity: null, |
||||
|
createdBy: null, |
||||
|
createdTime: null, |
||||
|
updatedBy: null, |
||||
|
updatedTime: null, |
||||
|
remark: 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 |
||||
|
getVacCategory(id).then(response => { |
||||
|
this.form = response.data |
||||
|
this.form.livestockTypes = this.form.livestockTypes.split(",") |
||||
|
this.open = true |
||||
|
this.title = "修改疫苗类别" |
||||
|
}) |
||||
|
}, |
||||
|
/** 提交按钮 */ |
||||
|
submitForm() { |
||||
|
this.$refs["form"].validate(valid => { |
||||
|
if (valid) { |
||||
|
this.form.livestockTypes = this.form.livestockTypes.join(",") |
||||
|
if (this.form.id != null) { |
||||
|
updateVacCategory(this.form).then(response => { |
||||
|
this.$modal.msgSuccess("修改成功") |
||||
|
this.open = false |
||||
|
this.getList() |
||||
|
}) |
||||
|
} else { |
||||
|
addVacCategory(this.form).then(response => { |
||||
|
this.$modal.msgSuccess("新增成功") |
||||
|
this.open = false |
||||
|
this.getList() |
||||
|
}) |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
/** 删除按钮操作 */ |
||||
|
handleDelete(row) { |
||||
|
const ids = row.id || this.ids |
||||
|
this.$modal.confirm('是否确认删除疫苗类别编号为"' + ids + '"的数据项?').then(function() { |
||||
|
return delVacCategory(ids) |
||||
|
}).then(() => { |
||||
|
this.getList() |
||||
|
this.$modal.msgSuccess("删除成功") |
||||
|
}).catch(() => {}) |
||||
|
}, |
||||
|
/** 导出按钮操作 */ |
||||
|
handleExport() { |
||||
|
this.download('system/vacCategory/export', { |
||||
|
...this.queryParams |
||||
|
}, `vacCategory_${new Date().getTime()}.xlsx`) |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue