人员管理,财务管理-补贴管理
This commit is contained in:
parent
7cdb38b7c9
commit
a35a2ff6f2
@ -2,6 +2,7 @@ package com.ruoyi.system.fantang.controller;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
@ -91,6 +92,9 @@ public class FtPatientDaoController extends BaseController {
|
|||||||
@Log(title = "病人管理" , businessType = BusinessType.INSERT)
|
@Log(title = "病人管理" , businessType = BusinessType.INSERT)
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@RequestBody FtPatientDao ftPatientDao) {
|
public AjaxResult add(@RequestBody FtPatientDao ftPatientDao) {
|
||||||
|
|
||||||
|
ftPatientDao.setCreateAt(new Date());
|
||||||
|
|
||||||
return toAjax(iFtPatientDaoService.save(ftPatientDao) ? 1 : 0);
|
return toAjax(iFtPatientDaoService.save(ftPatientDao) ? 1 : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,33 +1,42 @@
|
|||||||
package com.ruoyi.system.fantang.controller;
|
package com.ruoyi.system.fantang.controller;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
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.ruoyi.common.annotation.Log;
|
import com.ruoyi.common.annotation.Log;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
|
||||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
|
||||||
import com.ruoyi.system.fantang.domain.FtSubsidyDao;
|
import com.ruoyi.system.fantang.domain.FtSubsidyDao;
|
||||||
import com.ruoyi.system.fantang.service.IFtSubsidyDaoService;
|
import com.ruoyi.system.fantang.service.IFtSubsidyDaoService;
|
||||||
import lombok.RequiredArgsConstructor;
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 补贴管理Controller
|
* 补贴管理Controller
|
||||||
*
|
*
|
||||||
* @author ft
|
* @author ft
|
||||||
* @date 2020-11-19
|
* @date 2020-11-25
|
||||||
*/
|
*/
|
||||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/fantang/subsidy")
|
@RequestMapping("/fantang/subsidy" )
|
||||||
public class FtSubsidyDaoController extends BaseController {
|
public class FtSubsidyDaoController extends BaseController {
|
||||||
|
|
||||||
private final IFtSubsidyDaoService iFtSubsidyDaoService;
|
private final IFtSubsidyDaoService iFtSubsidyDaoService;
|
||||||
@ -37,26 +46,21 @@ public class FtSubsidyDaoController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('fantang:subsidy:list')")
|
@PreAuthorize("@ss.hasPermi('fantang:subsidy:list')")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(FtSubsidyDao ftSubsidyDao) {
|
public TableDataInfo list(FtSubsidyDao ftSubsidyDao)
|
||||||
|
{
|
||||||
startPage();
|
startPage();
|
||||||
LambdaQueryWrapper<FtSubsidyDao> lqw = Wrappers.lambdaQuery(ftSubsidyDao);
|
LambdaQueryWrapper<FtSubsidyDao> lqw = Wrappers.lambdaQuery(ftSubsidyDao);
|
||||||
if (StringUtils.isNotBlank(ftSubsidyDao.getType())) {
|
if (StringUtils.isNotBlank(ftSubsidyDao.getType())){
|
||||||
lqw.eq(FtSubsidyDao::getType, ftSubsidyDao.getType());
|
lqw.eq(FtSubsidyDao::getType ,ftSubsidyDao.getType());
|
||||||
}
|
}
|
||||||
if (ftSubsidyDao.getPrice() != null) {
|
if (ftSubsidyDao.getPrice() != null){
|
||||||
lqw.eq(FtSubsidyDao::getPrice, ftSubsidyDao.getPrice());
|
lqw.eq(FtSubsidyDao::getPrice ,ftSubsidyDao.getPrice());
|
||||||
}
|
}
|
||||||
if (StringUtils.isNotBlank(ftSubsidyDao.getRange())) {
|
if (ftSubsidyDao.getCreateAt() != null){
|
||||||
lqw.eq(FtSubsidyDao::getRange, ftSubsidyDao.getRange());
|
lqw.eq(FtSubsidyDao::getCreateAt ,ftSubsidyDao.getCreateAt());
|
||||||
}
|
}
|
||||||
if (StringUtils.isNotBlank(ftSubsidyDao.getCycle())) {
|
if (StringUtils.isNotBlank(ftSubsidyDao.getCreateBy())){
|
||||||
lqw.eq(FtSubsidyDao::getCycle, ftSubsidyDao.getCycle());
|
lqw.eq(FtSubsidyDao::getCreateBy ,ftSubsidyDao.getCreateBy());
|
||||||
}
|
|
||||||
if (ftSubsidyDao.getCreateAt() != null) {
|
|
||||||
lqw.eq(FtSubsidyDao::getCreateAt, ftSubsidyDao.getCreateAt());
|
|
||||||
}
|
|
||||||
if (StringUtils.isNotBlank(ftSubsidyDao.getCreateBy())) {
|
|
||||||
lqw.eq(FtSubsidyDao::getCreateBy, ftSubsidyDao.getCreateBy());
|
|
||||||
}
|
}
|
||||||
List<FtSubsidyDao> list = iFtSubsidyDaoService.list(lqw);
|
List<FtSubsidyDao> list = iFtSubsidyDaoService.list(lqw);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
@ -65,40 +69,42 @@ public class FtSubsidyDaoController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 导出补贴管理列表
|
* 导出补贴管理列表
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('fantang:subsidy:export')")
|
@PreAuthorize("@ss.hasPermi('fantang:subsidy:export')" )
|
||||||
@Log(title = "补贴管理", businessType = BusinessType.EXPORT)
|
@Log(title = "补贴管理" , businessType = BusinessType.EXPORT)
|
||||||
@GetMapping("/export")
|
@GetMapping("/export" )
|
||||||
public AjaxResult export(FtSubsidyDao ftSubsidyDao) {
|
public AjaxResult export(FtSubsidyDao ftSubsidyDao) {
|
||||||
LambdaQueryWrapper<FtSubsidyDao> lqw = new LambdaQueryWrapper<FtSubsidyDao>(ftSubsidyDao);
|
LambdaQueryWrapper<FtSubsidyDao> lqw = new LambdaQueryWrapper<FtSubsidyDao>(ftSubsidyDao);
|
||||||
List<FtSubsidyDao> list = iFtSubsidyDaoService.list(lqw);
|
List<FtSubsidyDao> list = iFtSubsidyDaoService.list(lqw);
|
||||||
ExcelUtil<FtSubsidyDao> util = new ExcelUtil<FtSubsidyDao>(FtSubsidyDao.class);
|
ExcelUtil<FtSubsidyDao> util = new ExcelUtil<FtSubsidyDao>(FtSubsidyDao. class);
|
||||||
return util.exportExcel(list, "subsidy");
|
return util.exportExcel(list, "subsidy" );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取补贴管理详细信息
|
* 获取补贴管理详细信息
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('fantang:subsidy:query')")
|
@PreAuthorize("@ss.hasPermi('fantang:subsidy:query')" )
|
||||||
@GetMapping(value = "/{subsidyId}")
|
@GetMapping(value = "/{subsidyId}" )
|
||||||
public AjaxResult getInfo(@PathVariable("subsidyId") Long subsidyId) {
|
public AjaxResult getInfo(@PathVariable("subsidyId" ) Long subsidyId) {
|
||||||
return AjaxResult.success(iFtSubsidyDaoService.getById(subsidyId));
|
return AjaxResult.success(iFtSubsidyDaoService.getById(subsidyId));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增补贴管理
|
* 新增补贴管理
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('fantang:subsidy:add')")
|
@PreAuthorize("@ss.hasPermi('fantang:subsidy:add')" )
|
||||||
@Log(title = "补贴管理", businessType = BusinessType.INSERT)
|
@Log(title = "补贴管理" , businessType = BusinessType.INSERT)
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@RequestBody FtSubsidyDao ftSubsidyDao) {
|
public AjaxResult add(@RequestBody FtSubsidyDao ftSubsidyDao) {
|
||||||
|
|
||||||
|
ftSubsidyDao.setCreateAt(new Date());
|
||||||
return toAjax(iFtSubsidyDaoService.save(ftSubsidyDao) ? 1 : 0);
|
return toAjax(iFtSubsidyDaoService.save(ftSubsidyDao) ? 1 : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改补贴管理
|
* 修改补贴管理
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('fantang:subsidy:edit')")
|
@PreAuthorize("@ss.hasPermi('fantang:subsidy:edit')" )
|
||||||
@Log(title = "补贴管理", businessType = BusinessType.UPDATE)
|
@Log(title = "补贴管理" , businessType = BusinessType.UPDATE)
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public AjaxResult edit(@RequestBody FtSubsidyDao ftSubsidyDao) {
|
public AjaxResult edit(@RequestBody FtSubsidyDao ftSubsidyDao) {
|
||||||
return toAjax(iFtSubsidyDaoService.updateById(ftSubsidyDao) ? 1 : 0);
|
return toAjax(iFtSubsidyDaoService.updateById(ftSubsidyDao) ? 1 : 0);
|
||||||
@ -107,9 +113,9 @@ public class FtSubsidyDaoController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 删除补贴管理
|
* 删除补贴管理
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('fantang:subsidy:remove')")
|
@PreAuthorize("@ss.hasPermi('fantang:subsidy:remove')" )
|
||||||
@Log(title = "补贴管理", businessType = BusinessType.DELETE)
|
@Log(title = "补贴管理" , businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{subsidyIds}")
|
@DeleteMapping("/{subsidyIds}" )
|
||||||
public AjaxResult remove(@PathVariable Long[] subsidyIds) {
|
public AjaxResult remove(@PathVariable Long[] subsidyIds) {
|
||||||
return toAjax(iFtSubsidyDaoService.removeByIds(Arrays.asList(subsidyIds)) ? 1 : 0);
|
return toAjax(iFtSubsidyDaoService.removeByIds(Arrays.asList(subsidyIds)) ? 1 : 0);
|
||||||
}
|
}
|
||||||
|
@ -1,24 +1,25 @@
|
|||||||
package com.ruoyi.system.fantang.domain;
|
package com.ruoyi.system.fantang.domain;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.ruoyi.common.annotation.Excel;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
import com.ruoyi.common.annotation.Excel;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 补贴管理对象 ft_subsidy
|
* 补贴管理对象 ft_subsidy
|
||||||
*
|
*
|
||||||
* @author ft
|
* @author ft
|
||||||
* @date 2020-11-19
|
* @date 2020-11-25
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@ToString
|
@ToString
|
||||||
@ -28,54 +29,36 @@ import java.util.Date;
|
|||||||
@TableName("ft_subsidy")
|
@TableName("ft_subsidy")
|
||||||
public class FtSubsidyDao implements Serializable {
|
public class FtSubsidyDao implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID=1L;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/** 补贴 id */
|
||||||
* 补贴 id
|
|
||||||
*/
|
|
||||||
@TableId(value = "subsidy_id")
|
@TableId(value = "subsidy_id")
|
||||||
private Long subsidyId;
|
private Long subsidyId;
|
||||||
|
|
||||||
/**
|
/** 补贴类型 */
|
||||||
* 补贴类型
|
|
||||||
*/
|
|
||||||
@Excel(name = "补贴类型")
|
@Excel(name = "补贴类型")
|
||||||
private String type;
|
private String type;
|
||||||
|
|
||||||
/**
|
/** 金额 */
|
||||||
* 金额
|
|
||||||
*/
|
|
||||||
@Excel(name = "金额")
|
@Excel(name = "金额")
|
||||||
private BigDecimal price;
|
private BigDecimal price;
|
||||||
|
|
||||||
/**
|
/** 范围 */
|
||||||
* 范围
|
private String subsidyRange;
|
||||||
*/
|
|
||||||
@Excel(name = "范围")
|
|
||||||
private String range;
|
|
||||||
|
|
||||||
/**
|
/** 周期 */
|
||||||
* 周期
|
|
||||||
*/
|
|
||||||
@Excel(name = "周期")
|
|
||||||
private String cycle;
|
private String cycle;
|
||||||
|
|
||||||
/**
|
/** 启用标志 */
|
||||||
* 启用标志
|
|
||||||
*/
|
|
||||||
private Integer flag;
|
private Integer flag;
|
||||||
|
|
||||||
/**
|
/** 创建日期 */
|
||||||
* 创建日期
|
@Excel(name = "创建日期" , width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
*/
|
|
||||||
@Excel(name = "创建日期", width = 30, dateFormat = "yyyy-MM-dd")
|
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private Date createAt;
|
private Date createAt;
|
||||||
|
|
||||||
/**
|
/** 创建人 */
|
||||||
* 创建人
|
|
||||||
*/
|
|
||||||
@Excel(name = "创建人")
|
@Excel(name = "创建人")
|
||||||
private String createBy;
|
private String createBy;
|
||||||
}
|
}
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
package com.ruoyi.system.fantang.mapper;
|
package com.ruoyi.system.fantang.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
import com.ruoyi.system.fantang.domain.FtSubsidyDao;
|
import com.ruoyi.system.fantang.domain.FtSubsidyDao;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 补贴管理Mapper接口
|
* 补贴管理Mapper接口
|
||||||
*
|
*
|
||||||
* @author ft
|
* @author ft
|
||||||
* @date 2020-11-19
|
* @date 2020-11-25
|
||||||
*/
|
*/
|
||||||
public interface FtSubsidyDaoMapper extends BaseMapper<FtSubsidyDao> {
|
public interface FtSubsidyDaoMapper extends BaseMapper<FtSubsidyDao> {
|
||||||
|
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
package com.ruoyi.system.fantang.service;
|
package com.ruoyi.system.fantang.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
|
||||||
import com.ruoyi.system.fantang.domain.FtSubsidyDao;
|
import com.ruoyi.system.fantang.domain.FtSubsidyDao;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 补贴管理Service接口
|
* 补贴管理Service接口
|
||||||
*
|
*
|
||||||
* @author ft
|
* @author ft
|
||||||
* @date 2020-11-19
|
* @date 2020-11-25
|
||||||
*/
|
*/
|
||||||
public interface IFtSubsidyDaoService extends IService<FtSubsidyDao> {
|
public interface IFtSubsidyDaoService extends IService<FtSubsidyDao> {
|
||||||
|
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
package com.ruoyi.system.fantang.service.impl;
|
package com.ruoyi.system.fantang.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
||||||
import com.ruoyi.system.fantang.domain.FtSubsidyDao;
|
|
||||||
import com.ruoyi.system.fantang.mapper.FtSubsidyDaoMapper;
|
|
||||||
import com.ruoyi.system.fantang.service.IFtSubsidyDaoService;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.ruoyi.system.fantang.mapper.FtSubsidyDaoMapper;
|
||||||
|
import com.ruoyi.system.fantang.domain.FtSubsidyDao;
|
||||||
|
import com.ruoyi.system.fantang.service.IFtSubsidyDaoService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 补贴管理Service业务层处理
|
* 补贴管理Service业务层处理
|
||||||
*
|
*
|
||||||
* @author ft
|
* @author ft
|
||||||
* @date 2020-11-19
|
* @date 2020-11-25
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class FtSubsidyDaoServiceImpl extends ServiceImpl<FtSubsidyDaoMapper, FtSubsidyDao> implements IFtSubsidyDaoService {
|
public class FtSubsidyDaoServiceImpl extends ServiceImpl<FtSubsidyDaoMapper, FtSubsidyDao> implements IFtSubsidyDaoService {
|
||||||
|
@ -8,7 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<result property="subsidyId" column="subsidy_id" />
|
<result property="subsidyId" column="subsidy_id" />
|
||||||
<result property="type" column="type" />
|
<result property="type" column="type" />
|
||||||
<result property="price" column="price" />
|
<result property="price" column="price" />
|
||||||
<result property="range" column="range" />
|
<result property="subsidy_range" column="subsidyRange" />
|
||||||
<result property="cycle" column="cycle" />
|
<result property="cycle" column="cycle" />
|
||||||
<result property="flag" column="flag" />
|
<result property="flag" column="flag" />
|
||||||
<result property="createAt" column="create_at" />
|
<result property="createAt" column="create_at" />
|
||||||
|
@ -163,7 +163,7 @@
|
|||||||
v-for="item in deptListOptions"
|
v-for="item in deptListOptions"
|
||||||
:key="item.departName"
|
:key="item.departName"
|
||||||
:label="item.departName"
|
:label="item.departName"
|
||||||
:value="item.departName">
|
:value="item.departId">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -123,7 +123,7 @@
|
|||||||
<el-input v-model="form.name" placeholder="请输入姓名"/>
|
<el-input v-model="form.name" placeholder="请输入姓名"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="所属部门" prop="departId">
|
<el-form-item label="所属部门" prop="departId">
|
||||||
<el-select v-model="form.departId" placeholder="请选择科室列表">
|
<el-select v-model="form.departId" placeholder="请选择科室">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in deptListOptions"
|
v-for="item in deptListOptions"
|
||||||
:key="item.departName"
|
:key="item.departName"
|
||||||
|
@ -20,24 +20,6 @@
|
|||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="范围" prop="range">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.range"
|
|
||||||
placeholder="请输入范围"
|
|
||||||
clearable
|
|
||||||
size="small"
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="周期" prop="cycle">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.cycle"
|
|
||||||
placeholder="请输入周期"
|
|
||||||
clearable
|
|
||||||
size="small"
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="创建日期" prop="createAt">
|
<el-form-item label="创建日期" prop="createAt">
|
||||||
<el-date-picker clearable size="small" style="width: 200px"
|
<el-date-picker clearable size="small" style="width: 200px"
|
||||||
v-model="queryParams.createAt"
|
v-model="queryParams.createAt"
|
||||||
@ -112,8 +94,6 @@
|
|||||||
<el-table-column label="补贴 id" align="center" prop="subsidyId" v-if="false"/>
|
<el-table-column label="补贴 id" align="center" prop="subsidyId" v-if="false"/>
|
||||||
<el-table-column label="补贴类型" align="center" prop="type" :formatter="typeFormat"/>
|
<el-table-column label="补贴类型" align="center" prop="type" :formatter="typeFormat"/>
|
||||||
<el-table-column label="金额" align="center" prop="price"/>
|
<el-table-column label="金额" align="center" prop="price"/>
|
||||||
<el-table-column label="范围" align="center" prop="range"/>
|
|
||||||
<el-table-column label="周期" align="center" prop="cycle"/>
|
|
||||||
<el-table-column label="创建日期" align="center" prop="createAt" width="180">
|
<el-table-column label="创建日期" align="center" prop="createAt" width="180">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ parseTime(scope.row.createAt, '{y}-{m}-{d}') }}</span>
|
<span>{{ parseTime(scope.row.createAt, '{y}-{m}-{d}') }}</span>
|
||||||
@ -166,11 +146,14 @@
|
|||||||
<el-form-item label="金额" prop="price">
|
<el-form-item label="金额" prop="price">
|
||||||
<el-input v-model="form.price" placeholder="请输入金额"/>
|
<el-input v-model="form.price" placeholder="请输入金额"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="范围" prop="range">
|
<el-form-item label="启用标志" prop="flag">
|
||||||
<el-input v-model="form.range" placeholder="请输入范围"/>
|
<el-switch
|
||||||
</el-form-item>
|
v-model="form.flag"
|
||||||
<el-form-item label="周期" prop="cycle">
|
active-color="#13ce66"
|
||||||
<el-input v-model="form.cycle" placeholder="请输入周期"/>
|
inactive-color="#ff4949"
|
||||||
|
active-text="启用"
|
||||||
|
inactive-text="禁用">
|
||||||
|
</el-switch>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
@ -215,8 +198,6 @@ export default {
|
|||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
type: null,
|
type: null,
|
||||||
price: null,
|
price: null,
|
||||||
range: null,
|
|
||||||
cycle: null,
|
|
||||||
createAt: null,
|
createAt: null,
|
||||||
createBy: null
|
createBy: null
|
||||||
},
|
},
|
||||||
@ -230,11 +211,8 @@ export default {
|
|||||||
price: [
|
price: [
|
||||||
{required: true, message: "金额不能为空", trigger: "blur"}
|
{required: true, message: "金额不能为空", trigger: "blur"}
|
||||||
],
|
],
|
||||||
range: [
|
flag: [
|
||||||
{required: true, message: "范围不能为空", trigger: "blur"}
|
{required: true, message: "启用标志不能为空", trigger: "blur"}
|
||||||
],
|
|
||||||
cycle: [
|
|
||||||
{required: true, message: "周期不能为空", trigger: "blur"}
|
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -270,11 +248,11 @@ export default {
|
|||||||
subsidyId: null,
|
subsidyId: null,
|
||||||
type: null,
|
type: null,
|
||||||
price: null,
|
price: null,
|
||||||
range: null,
|
subsidyRange: null,
|
||||||
cycle: null,
|
cycle: null,
|
||||||
flag: null,
|
flag: true,
|
||||||
createAt: null,
|
createAt: null,
|
||||||
createBy: null
|
createBy: null,
|
||||||
};
|
};
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
@ -315,12 +293,22 @@ export default {
|
|||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.subsidyId != null) {
|
if (this.form.subsidyId != null) {
|
||||||
|
if (this.form.flag === true) {
|
||||||
|
this.form.flag = 1;
|
||||||
|
} else {
|
||||||
|
this.form.flag = 0;
|
||||||
|
}
|
||||||
updateSubsidy(this.form).then(response => {
|
updateSubsidy(this.form).then(response => {
|
||||||
this.msgSuccess("修改成功");
|
this.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
if (this.form.flag === true) {
|
||||||
|
this.form.flag = 1;
|
||||||
|
} else {
|
||||||
|
this.form.flag = 0;
|
||||||
|
}
|
||||||
addSubsidy(this.form).then(response => {
|
addSubsidy(this.form).then(response => {
|
||||||
this.msgSuccess("新增成功");
|
this.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user