mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-09-19 01:48:47 +08:00
配餐功能列表显示,查询
This commit is contained in:
parent
dea15c69de
commit
10e70120e8
@ -1,31 +1,24 @@
|
|||||||
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.List;
|
|
||||||
import java.util.Arrays;
|
|
||||||
|
|
||||||
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.poi.ExcelUtil;
|
||||||
import com.ruoyi.system.fantang.domain.FtCateringDao;
|
import com.ruoyi.system.fantang.domain.FtCateringDao;
|
||||||
import com.ruoyi.system.fantang.service.IFtCateringDaoService;
|
import com.ruoyi.system.fantang.service.IFtCateringDaoService;
|
||||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
import com.ruoyi.system.fantang.service.IFtDepartDaoService;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.system.fantang.service.IFtPatientDaoService;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 配餐功能Controller
|
* 配餐功能Controller
|
||||||
@ -35,64 +28,91 @@ import com.ruoyi.common.core.page.TableDataInfo;
|
|||||||
*/
|
*/
|
||||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/fantang/catering" )
|
@RequestMapping("/fantang/catering")
|
||||||
public class FtCateringDaoController extends BaseController {
|
public class FtCateringDaoController extends BaseController {
|
||||||
|
|
||||||
private final IFtCateringDaoService iFtCateringDaoService;
|
private final IFtCateringDaoService iFtCateringDaoService;
|
||||||
|
|
||||||
|
private final IFtDepartDaoService departDaoService;
|
||||||
|
|
||||||
|
private final IFtPatientDaoService patientDaoService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询配餐功能列表
|
* 查询配餐功能列表
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('fantang:catering:list')")
|
@PreAuthorize("@ss.hasPermi('fantang:catering:list')")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(FtCateringDao ftCateringDao)
|
public TableDataInfo list(FtCateringDao ftCateringDao) {
|
||||||
{
|
|
||||||
startPage();
|
startPage();
|
||||||
LambdaQueryWrapper<FtCateringDao> lqw = Wrappers.lambdaQuery(ftCateringDao);
|
// LambdaQueryWrapper<FtCateringDao> lqw = Wrappers.lambdaQuery(ftCateringDao);
|
||||||
if (ftCateringDao.getFlag() != null){
|
// if (ftCateringDao.getFlag() != null) {
|
||||||
lqw.eq(FtCateringDao::getFlag ,ftCateringDao.getFlag());
|
// lqw.eq(FtCateringDao::getFlag, ftCateringDao.getFlag());
|
||||||
}
|
// }
|
||||||
List<FtCateringDao> list = iFtCateringDaoService.list(lqw);
|
// List<FtCateringDao> list = iFtCateringDaoService.list(lqw);
|
||||||
|
// List<FtCateringDao> listWithDepart = iFtCateringDaoService.list(lqw);
|
||||||
|
// for (FtCateringDao cateringDao : list) {
|
||||||
|
// FtPatientDao Patient = patientDaoService.getById(cateringDao.getPatientId());
|
||||||
|
// Long departId = Patient.getDepartId();
|
||||||
|
// String departName = departDaoService.getById(departId).getDepartName();
|
||||||
|
// cateringDao.setDepartName(departName);
|
||||||
|
// cateringDao.setName(Patient.getName());
|
||||||
|
// cateringDao.setBedId(Patient.getBedId());
|
||||||
|
// listWithDepart.add(cateringDao);
|
||||||
|
// }
|
||||||
|
List<FtCateringDao> list = iFtCateringDaoService.listNewFormatter(ftCateringDao);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出配餐功能列表
|
* 导出配餐功能列表
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('fantang:catering:export')" )
|
@PreAuthorize("@ss.hasPermi('fantang:catering:export')")
|
||||||
@Log(title = "配餐功能" , businessType = BusinessType.EXPORT)
|
@Log(title = "配餐功能", businessType = BusinessType.EXPORT)
|
||||||
@GetMapping("/export" )
|
@GetMapping("/export")
|
||||||
public AjaxResult export(FtCateringDao ftCateringDao) {
|
public AjaxResult export(FtCateringDao ftCateringDao) {
|
||||||
LambdaQueryWrapper<FtCateringDao> lqw = new LambdaQueryWrapper<FtCateringDao>(ftCateringDao);
|
LambdaQueryWrapper<FtCateringDao> lqw = new LambdaQueryWrapper<FtCateringDao>(ftCateringDao);
|
||||||
List<FtCateringDao> list = iFtCateringDaoService.list(lqw);
|
List<FtCateringDao> list = iFtCateringDaoService.list(lqw);
|
||||||
ExcelUtil<FtCateringDao> util = new ExcelUtil<FtCateringDao>(FtCateringDao. class);
|
ExcelUtil<FtCateringDao> util = new ExcelUtil<FtCateringDao>(FtCateringDao.class);
|
||||||
return util.exportExcel(list, "catering" );
|
return util.exportExcel(list, "catering");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取配餐功能详细信息
|
* 获取配餐功能详细信息
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('fantang:catering:query')" )
|
@PreAuthorize("@ss.hasPermi('fantang:catering:query')")
|
||||||
@GetMapping(value = "/{id}" )
|
@GetMapping(value = "/{id}")
|
||||||
public AjaxResult getInfo(@PathVariable("id" ) Long id) {
|
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||||
return AjaxResult.success(iFtCateringDaoService.getById(id));
|
return AjaxResult.success(iFtCateringDaoService.getById(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增配餐功能
|
* 新增配餐功能
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('fantang:catering:add')" )
|
@PreAuthorize("@ss.hasPermi('fantang:catering:add')")
|
||||||
@Log(title = "配餐功能" , businessType = BusinessType.INSERT)
|
@Log(title = "配餐功能", businessType = BusinessType.INSERT)
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@RequestBody FtCateringDao ftCateringDao) {
|
public AjaxResult add(@RequestBody FtCateringDao ftCateringDao) {
|
||||||
return toAjax(iFtCateringDaoService.save(ftCateringDao) ? 1 : 0);
|
List<Integer> types = ftCateringDao.getTypes();
|
||||||
|
for (Integer type : types) {
|
||||||
|
FtCateringDao ftCatering = new FtCateringDao();
|
||||||
|
ftCatering.setPatientId(ftCateringDao.getPatientId());
|
||||||
|
ftCatering.setNumber(ftCateringDao.getNumber());
|
||||||
|
ftCatering.setFrequency(ftCateringDao.getFrequency());
|
||||||
|
ftCatering.setCateringUsage(ftCateringDao.getCateringUsage());
|
||||||
|
ftCatering.setFlag(true);
|
||||||
|
ftCatering.setCreateAt(new Date());
|
||||||
|
ftCatering.setType(type);
|
||||||
|
iFtCateringDaoService.save(ftCatering);
|
||||||
|
}
|
||||||
|
|
||||||
|
return AjaxResult.success("新增成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改配餐功能
|
* 修改配餐功能
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('fantang:catering:edit')" )
|
@PreAuthorize("@ss.hasPermi('fantang:catering:edit')")
|
||||||
@Log(title = "配餐功能" , businessType = BusinessType.UPDATE)
|
@Log(title = "配餐功能", businessType = BusinessType.UPDATE)
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public AjaxResult edit(@RequestBody FtCateringDao ftCateringDao) {
|
public AjaxResult edit(@RequestBody FtCateringDao ftCateringDao) {
|
||||||
return toAjax(iFtCateringDaoService.updateById(ftCateringDao) ? 1 : 0);
|
return toAjax(iFtCateringDaoService.updateById(ftCateringDao) ? 1 : 0);
|
||||||
@ -101,9 +121,9 @@ public class FtCateringDaoController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 删除配餐功能
|
* 删除配餐功能
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('fantang:catering:remove')" )
|
@PreAuthorize("@ss.hasPermi('fantang:catering:remove')")
|
||||||
@Log(title = "配餐功能" , businessType = BusinessType.DELETE)
|
@Log(title = "配餐功能", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{ids}" )
|
@DeleteMapping("/{ids}")
|
||||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||||
return toAjax(iFtCateringDaoService.removeByIds(Arrays.asList(ids)) ? 1 : 0);
|
return toAjax(iFtCateringDaoService.removeByIds(Arrays.asList(ids)) ? 1 : 0);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,119 @@
|
|||||||
|
package com.ruoyi.system.fantang.controller;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
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.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.system.fantang.domain.FtConfigDao;
|
||||||
|
import com.ruoyi.system.fantang.service.IFtConfigDaoService;
|
||||||
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 饭堂参数Controller
|
||||||
|
*
|
||||||
|
* @author ft
|
||||||
|
* @date 2020-12-07
|
||||||
|
*/
|
||||||
|
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/fantang/fantangConfig" )
|
||||||
|
public class FtConfigDaoController extends BaseController {
|
||||||
|
|
||||||
|
private final IFtConfigDaoService iFtConfigDaoService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询饭堂参数列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('fantang:fantangConfig:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(FtConfigDao ftConfigDao)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
LambdaQueryWrapper<FtConfigDao> lqw = Wrappers.lambdaQuery(ftConfigDao);
|
||||||
|
if (ftConfigDao.getCorpId() != null){
|
||||||
|
lqw.eq(FtConfigDao::getCorpId ,ftConfigDao.getCorpId());
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(ftConfigDao.getConfigKey())){
|
||||||
|
lqw.eq(FtConfigDao::getConfigKey ,ftConfigDao.getConfigKey());
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(ftConfigDao.getConfigValue())){
|
||||||
|
lqw.eq(FtConfigDao::getConfigValue ,ftConfigDao.getConfigValue());
|
||||||
|
}
|
||||||
|
if (ftConfigDao.getFlag() != null){
|
||||||
|
lqw.eq(FtConfigDao::getFlag ,ftConfigDao.getFlag());
|
||||||
|
}
|
||||||
|
List<FtConfigDao> list = iFtConfigDaoService.list(lqw);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出饭堂参数列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('fantang:fantangConfig:export')" )
|
||||||
|
@Log(title = "饭堂参数" , businessType = BusinessType.EXPORT)
|
||||||
|
@GetMapping("/export" )
|
||||||
|
public AjaxResult export(FtConfigDao ftConfigDao) {
|
||||||
|
LambdaQueryWrapper<FtConfigDao> lqw = new LambdaQueryWrapper<FtConfigDao>(ftConfigDao);
|
||||||
|
List<FtConfigDao> list = iFtConfigDaoService.list(lqw);
|
||||||
|
ExcelUtil<FtConfigDao> util = new ExcelUtil<FtConfigDao>(FtConfigDao. class);
|
||||||
|
return util.exportExcel(list, "fantangConfig" );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取饭堂参数详细信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('fantang:fantangConfig:query')" )
|
||||||
|
@GetMapping(value = "/{id}" )
|
||||||
|
public AjaxResult getInfo(@PathVariable("id" ) Long id) {
|
||||||
|
return AjaxResult.success(iFtConfigDaoService.getById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增饭堂参数
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('fantang:fantangConfig:add')" )
|
||||||
|
@Log(title = "饭堂参数" , businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody FtConfigDao ftConfigDao) {
|
||||||
|
return toAjax(iFtConfigDaoService.save(ftConfigDao) ? 1 : 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改饭堂参数
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('fantang:fantangConfig:edit')" )
|
||||||
|
@Log(title = "饭堂参数" , businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody FtConfigDao ftConfigDao) {
|
||||||
|
return toAjax(iFtConfigDaoService.updateById(ftConfigDao) ? 1 : 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除饭堂参数
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('fantang:fantangConfig:remove')" )
|
||||||
|
@Log(title = "饭堂参数" , businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}" )
|
||||||
|
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||||
|
return toAjax(iFtConfigDaoService.removeByIds(Arrays.asList(ids)) ? 1 : 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,19 +1,17 @@
|
|||||||
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 com.ruoyi.system.fantang.vo.FtCateringVo;
|
||||||
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.util.Date;
|
import java.util.Date;
|
||||||
import java.math.BigDecimal;
|
|
||||||
import com.ruoyi.common.core.domain.BaseEntity;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 配餐功能对象 ft_catering
|
* 配餐功能对象 ft_catering
|
||||||
@ -23,60 +21,88 @@ import com.ruoyi.common.core.domain.BaseEntity;
|
|||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@ToString
|
@ToString
|
||||||
@EqualsAndHashCode
|
@EqualsAndHashCode(callSuper = false)
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@TableName("ft_catering")
|
@TableName("ft_catering")
|
||||||
public class FtCateringDao implements Serializable {
|
public class FtCateringDao extends FtCateringVo {
|
||||||
|
|
||||||
private static final long serialVersionUID=1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
||||||
/** id */
|
/**
|
||||||
|
* id
|
||||||
|
*/
|
||||||
@TableId(value = "id")
|
@TableId(value = "id")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/** 病人 id */
|
/**
|
||||||
|
* 病人 id
|
||||||
|
*/
|
||||||
private Long patientId;
|
private Long patientId;
|
||||||
|
|
||||||
/** 正餐类型 */
|
/**
|
||||||
|
* 正餐类型
|
||||||
|
*/
|
||||||
@Excel(name = "正餐类型")
|
@Excel(name = "正餐类型")
|
||||||
private Integer type;
|
private Integer type;
|
||||||
|
|
||||||
/** 配餐号 */
|
/**
|
||||||
|
* 配餐号
|
||||||
|
*/
|
||||||
@Excel(name = "配餐号")
|
@Excel(name = "配餐号")
|
||||||
private Long number;
|
private Long number;
|
||||||
|
|
||||||
/** 配餐频次 */
|
/**
|
||||||
|
* 配餐频次
|
||||||
|
*/
|
||||||
@Excel(name = "配餐频次")
|
@Excel(name = "配餐频次")
|
||||||
private String frequency;
|
private String frequency;
|
||||||
|
|
||||||
/** 用法 */
|
/**
|
||||||
|
* 用法
|
||||||
|
*/
|
||||||
@Excel(name = "用法")
|
@Excel(name = "用法")
|
||||||
private Integer usage;
|
private Integer cateringUsage;
|
||||||
|
|
||||||
/** 是否代替正餐 */
|
/**
|
||||||
|
* 是否代替正餐
|
||||||
|
*/
|
||||||
private Integer isReplace;
|
private Integer isReplace;
|
||||||
|
|
||||||
/** 作废标志 */
|
/**
|
||||||
private Integer flag;
|
* 作废标志
|
||||||
|
*/
|
||||||
|
private Boolean flag;
|
||||||
|
|
||||||
/** 更新日期 */
|
/**
|
||||||
|
* 更新日期
|
||||||
|
*/
|
||||||
private Date updateAt;
|
private Date updateAt;
|
||||||
|
|
||||||
/** 更新人 */
|
/**
|
||||||
|
* 更新人
|
||||||
|
*/
|
||||||
@Excel(name = "更新人")
|
@Excel(name = "更新人")
|
||||||
private String updateBy;
|
private String updateBy;
|
||||||
|
|
||||||
/** 创建时间 */
|
/**
|
||||||
@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;
|
||||||
|
|
||||||
/** 创建人 */
|
/**
|
||||||
|
* 创建人
|
||||||
|
*/
|
||||||
private String createBy;
|
private String createBy;
|
||||||
|
|
||||||
/** 描述 */
|
/**
|
||||||
|
* 描述
|
||||||
|
*/
|
||||||
@Excel(name = "描述")
|
@Excel(name = "描述")
|
||||||
private String describe;
|
private String cateringDescribe;
|
||||||
|
|
||||||
|
private String hospitalId;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,54 @@
|
|||||||
|
package com.ruoyi.system.fantang.domain;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.ToString;
|
||||||
|
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.util.Date;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 饭堂参数对象 ft_config
|
||||||
|
*
|
||||||
|
* @author ft
|
||||||
|
* @date 2020-12-07
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ToString
|
||||||
|
@EqualsAndHashCode
|
||||||
|
@NoArgsConstructor
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TableName("ft_config")
|
||||||
|
public class FtConfigDao implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID=1L;
|
||||||
|
|
||||||
|
|
||||||
|
/** $column.columnComment */
|
||||||
|
@TableId(value = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** $column.columnComment */
|
||||||
|
@Excel(name = "${comment}" , readConverterExp = "$column.readConverterExp()")
|
||||||
|
private Long corpId;
|
||||||
|
|
||||||
|
/** $column.columnComment */
|
||||||
|
@Excel(name = "${comment}" , readConverterExp = "$column.readConverterExp()")
|
||||||
|
private String configKey;
|
||||||
|
|
||||||
|
/** $column.columnComment */
|
||||||
|
@Excel(name = "${comment}" , readConverterExp = "$column.readConverterExp()")
|
||||||
|
private String configValue;
|
||||||
|
|
||||||
|
/** $column.columnComment */
|
||||||
|
@Excel(name = "${comment}" , readConverterExp = "$column.readConverterExp()")
|
||||||
|
private Long flag;
|
||||||
|
}
|
||||||
@ -3,6 +3,8 @@ package com.ruoyi.system.fantang.mapper;
|
|||||||
import com.ruoyi.system.fantang.domain.FtCateringDao;
|
import com.ruoyi.system.fantang.domain.FtCateringDao;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 配餐功能Mapper接口
|
* 配餐功能Mapper接口
|
||||||
*
|
*
|
||||||
@ -11,4 +13,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||||||
*/
|
*/
|
||||||
public interface FtCateringDaoMapper extends BaseMapper<FtCateringDao> {
|
public interface FtCateringDaoMapper extends BaseMapper<FtCateringDao> {
|
||||||
|
|
||||||
|
List<FtCateringDao> listNewFormatter(FtCateringDao ftCateringDao);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,9 @@
|
|||||||
package com.ruoyi.system.fantang.service;
|
package com.ruoyi.system.fantang.service;
|
||||||
|
|
||||||
import com.ruoyi.system.fantang.domain.FtCateringDao;
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.ruoyi.system.fantang.domain.FtCateringDao;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 配餐功能Service接口
|
* 配餐功能Service接口
|
||||||
@ -11,4 +13,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
|||||||
*/
|
*/
|
||||||
public interface IFtCateringDaoService extends IService<FtCateringDao> {
|
public interface IFtCateringDaoService extends IService<FtCateringDao> {
|
||||||
|
|
||||||
|
List<FtCateringDao> listNewFormatter(FtCateringDao ftCateringDao);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,10 +1,12 @@
|
|||||||
package com.ruoyi.system.fantang.service.impl;
|
package com.ruoyi.system.fantang.service.impl;
|
||||||
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.ruoyi.system.fantang.mapper.FtCateringDaoMapper;
|
|
||||||
import com.ruoyi.system.fantang.domain.FtCateringDao;
|
import com.ruoyi.system.fantang.domain.FtCateringDao;
|
||||||
|
import com.ruoyi.system.fantang.mapper.FtCateringDaoMapper;
|
||||||
import com.ruoyi.system.fantang.service.IFtCateringDaoService;
|
import com.ruoyi.system.fantang.service.IFtCateringDaoService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 配餐功能Service业务层处理
|
* 配餐功能Service业务层处理
|
||||||
@ -15,4 +17,8 @@ import com.ruoyi.system.fantang.service.IFtCateringDaoService;
|
|||||||
@Service
|
@Service
|
||||||
public class FtCateringDaoServiceImpl extends ServiceImpl<FtCateringDaoMapper, FtCateringDao> implements IFtCateringDaoService {
|
public class FtCateringDaoServiceImpl extends ServiceImpl<FtCateringDaoMapper, FtCateringDao> implements IFtCateringDaoService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<FtCateringDao> listNewFormatter(FtCateringDao ftCateringDao) {
|
||||||
|
return this.baseMapper.listNewFormatter(ftCateringDao);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,30 @@
|
|||||||
|
package com.ruoyi.system.fantang.vo;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class FtCateringVo {
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String bedId;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Long departId;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private List<Integer> types;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String departName;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,24 +1,32 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<!DOCTYPE mapper
|
<!DOCTYPE mapper
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.ruoyi.system.fantang.mapper.FtCateringDaoMapper">
|
<mapper namespace="com.ruoyi.system.fantang.mapper.FtCateringDaoMapper">
|
||||||
|
|
||||||
<resultMap type="FtCateringDao" id="FtCateringDaoResult">
|
<resultMap type="FtCateringDao" id="FtCateringDaoResult">
|
||||||
<result property="id" column="id" />
|
<result property="id" column="id"/>
|
||||||
<result property="patientId" column="patient_id" />
|
<result property="patientId" column="patient_id"/>
|
||||||
<result property="type" column="type" />
|
<result property="type" column="type"/>
|
||||||
<result property="number" column="number" />
|
<result property="number" column="number"/>
|
||||||
<result property="frequency" column="frequency" />
|
<result property="frequency" column="frequency"/>
|
||||||
<result property="usage" column="usage" />
|
<result property="cateringUsage" column="catering_usage"/>
|
||||||
<result property="isReplace" column="is_replace" />
|
<result property="isReplace" column="is_replace"/>
|
||||||
<result property="flag" column="flag" />
|
<result property="flag" column="flag"/>
|
||||||
<result property="updateAt" column="update_at" />
|
<result property="updateAt" column="update_at"/>
|
||||||
<result property="updateBy" column="update_by" />
|
<result property="updateBy" column="update_by"/>
|
||||||
<result property="createAt" column="create_at" />
|
<result property="createAt" column="create_at"/>
|
||||||
<result property="createBy" column="create_by" />
|
<result property="createBy" column="create_by"/>
|
||||||
<result property="describe" column="describe" />
|
<result property="cateringDescribe" column="catering_describe"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
<select id="listNewFormatter" resultType="com.ruoyi.system.fantang.domain.FtCateringDao">
|
||||||
|
select a.*, b.name, b.bed_id, c.depart_name, b.hospital_id from ft_catering a LEFT JOIN ft_patient b LEFT
|
||||||
|
JOIN ft_depart c on b.depart_id = c.depart_id on a.patient_id = b.patient_id where b.off_flag = 0
|
||||||
|
<if test="name != null and name !=''">and b.name = #{name}</if>
|
||||||
|
<if test="bedId != null">and b.bed_id = #{bedId}</if>
|
||||||
|
<if test="departId != null">and b.depart_id = #{departId}</if>
|
||||||
|
<if test="hospitalId != null">and b.hospital_id = #{hospitalId}</if>
|
||||||
|
<if test="flag != null">and a.flag = #{flag}</if>
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@ -184,8 +184,8 @@
|
|||||||
<el-table-column label="正餐类型" align="center" prop="type" :formatter="typeFormat" v-if="false"/>
|
<el-table-column label="正餐类型" align="center" prop="type" :formatter="typeFormat" v-if="false"/>
|
||||||
<el-table-column label="配餐号" align="center" prop="number"/>
|
<el-table-column label="配餐号" align="center" prop="number"/>
|
||||||
<el-table-column label="配餐频次" align="center" prop="frequency"/>
|
<el-table-column label="配餐频次" align="center" prop="frequency"/>
|
||||||
<el-table-column label="用法" align="center" prop="usage"/>
|
<el-table-column label="用法" align="center" prop="cateringUsage"/>
|
||||||
<el-table-column label="描述" align="center" prop="describe"/>
|
<el-table-column label="描述" align="center" prop="cateringDescribe"/>
|
||||||
<el-table-column label="启用标示" align="center" prop="flag"/>
|
<el-table-column label="启用标示" align="center" prop="flag"/>
|
||||||
<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">
|
||||||
@ -223,7 +223,7 @@
|
|||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 添加或修改配餐功能对话框 -->
|
<!-- 添加配餐功能对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
<el-form-item label="科室" prop="departId">
|
<el-form-item label="科室" prop="departId">
|
||||||
@ -254,17 +254,24 @@
|
|||||||
<el-row :gutter="10">
|
<el-row :gutter="10">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="配餐号" prop="number">
|
<el-form-item label="配餐号" prop="number">
|
||||||
<el-input v-model="form.number" placeholder="请输入配餐号"/>
|
<el-select v-model="form.number" placeholder="请选择配餐号">
|
||||||
|
<el-option
|
||||||
|
v-for="item in numberOptions"
|
||||||
|
:key="item.label"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="用法" prop="usage">
|
<el-form-item label="用法" prop="cateringUsage">
|
||||||
<el-select v-model="form.usage" placeholder="请选择用法">
|
<el-select v-model="form.cateringUsage" placeholder="请选择用法">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in usageOptions"
|
v-for="item in cateringUsageOptions"
|
||||||
:key="item.label"
|
:key="item.label"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.label"
|
:value="item.value"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -272,8 +279,8 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="10">
|
<el-row :gutter="10">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="正餐类型" prop="type">
|
<el-form-item label="正餐类型" prop="types">
|
||||||
<el-select v-model="form.type"
|
<el-select v-model="form.types"
|
||||||
multiple
|
multiple
|
||||||
@change="changeDinnerType"
|
@change="changeDinnerType"
|
||||||
placeholder="请选择正餐类型">
|
placeholder="请选择正餐类型">
|
||||||
@ -288,16 +295,108 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="配餐频次" prop="frequency">
|
<el-form-item label="配餐频次" prop="frequency">
|
||||||
<el-select v-model="form.frequency" placeholder="请选择频次">
|
<!-- <el-select v-model="form.frequency" placeholder="频次" :disabled="true">-->
|
||||||
|
<!-- <el-option-->
|
||||||
|
<!-- v-for="item in frequencyOptions"-->
|
||||||
|
<!-- :key="item.label"-->
|
||||||
|
<!-- :label="item.label"-->
|
||||||
|
<!-- :value="item.label"-->
|
||||||
|
<!-- ></el-option>-->
|
||||||
|
<!-- </el-select>-->
|
||||||
|
<el-input v-model="form.frequency" placeholder="频次" :disabled="true"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</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>
|
||||||
|
|
||||||
|
<!-- 修改配餐功能对话框 -->
|
||||||
|
<el-dialog :title="title" :visible.sync="modifyItem" width="600px" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<el-form-item label="科室" prop="departId">
|
||||||
|
<el-select v-model="form.departId"
|
||||||
|
placeholder="请选择科室"
|
||||||
|
@change="changeDepart">
|
||||||
|
<el-option
|
||||||
|
v-for="item in departOptions"
|
||||||
|
:key="item.departName"
|
||||||
|
:label="item.departName"
|
||||||
|
:value="item.departId"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="病人" prop="patientId">
|
||||||
|
<el-select v-model="form.patientId" placeholder="请选择病人" @change="changePatient">
|
||||||
|
<el-option
|
||||||
|
v-for="item in patientOptions"
|
||||||
|
:key="item.name"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.patientId"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="床号" prop="bedId">
|
||||||
|
<el-input v-model="form.bedId" placeholder="床号" :disabled="true"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-row :gutter="10">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="配餐号" prop="number">
|
||||||
|
<el-select v-model="form.number" placeholder="请选择配餐号">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in frequencyOptions"
|
v-for="item in numberOptions"
|
||||||
:key="item.label"
|
:key="item.label"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.label"
|
:value="item.value"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="用法" prop="cateringUsage">
|
||||||
|
<el-select v-model="form.cateringUsage" placeholder="请选择用法">
|
||||||
|
<el-option
|
||||||
|
v-for="item in cateringUsageOptions"
|
||||||
|
:key="item.label"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="10">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="正餐类型" prop="types">
|
||||||
|
<el-select v-model="form.types"
|
||||||
|
multiple
|
||||||
|
@change="changeDinnerType"
|
||||||
|
placeholder="请选择正餐类型">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in typeOptions"
|
||||||
|
:key="dict.dictValue"
|
||||||
|
:label="dict.dictLabel"
|
||||||
|
:value="parseInt(dict.dictValue)"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="配餐频次" prop="frequency">
|
||||||
|
<!-- <el-select v-model="form.frequency" placeholder="频次" :disabled="true">-->
|
||||||
|
<!-- <el-option-->
|
||||||
|
<!-- v-for="item in frequencyOptions"-->
|
||||||
|
<!-- :key="item.label"-->
|
||||||
|
<!-- :label="item.label"-->
|
||||||
|
<!-- :value="item.label"-->
|
||||||
|
<!-- ></el-option>-->
|
||||||
|
<!-- </el-select>-->
|
||||||
|
<el-input v-model="form.frequency" placeholder="频次" :disabled="true"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
@ -325,23 +424,19 @@ export default {
|
|||||||
components: {},
|
components: {},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// 频次列表
|
// 配餐列表
|
||||||
frequencyOptions:[{
|
numberOptions: [{
|
||||||
value: 'qd',
|
value: 1,
|
||||||
label: 'qd'
|
label: '配餐 1'
|
||||||
}, {
|
}, {
|
||||||
value: 'bid',
|
value: 2,
|
||||||
label: 'bid'
|
label: '配餐 2'
|
||||||
}, {
|
}, {
|
||||||
value: 'tid',
|
value: 3,
|
||||||
label: 'tid'
|
label: '配餐 3'
|
||||||
}, {
|
}],
|
||||||
value: 'qn',
|
|
||||||
label: 'qn'
|
|
||||||
}
|
|
||||||
],
|
|
||||||
// 用法列表
|
// 用法列表
|
||||||
usageOptions: [{
|
cateringUsageOptions: [{
|
||||||
value: 1,
|
value: 1,
|
||||||
label: '鼻饲'
|
label: '鼻饲'
|
||||||
}, {
|
}, {
|
||||||
@ -378,6 +473,8 @@ export default {
|
|||||||
title: "",
|
title: "",
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
open: false,
|
open: false,
|
||||||
|
// 修改弹出层
|
||||||
|
modifyItem: false,
|
||||||
// 正餐类型字典
|
// 正餐类型字典
|
||||||
typeOptions: [],
|
typeOptions: [],
|
||||||
// 查询参数
|
// 查询参数
|
||||||
@ -438,6 +535,7 @@ export default {
|
|||||||
this.loading = true;
|
this.loading = true;
|
||||||
listCatering(this.queryParams).then(response => {
|
listCatering(this.queryParams).then(response => {
|
||||||
this.cateringList = response.rows;
|
this.cateringList = response.rows;
|
||||||
|
console.log(response);
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
@ -449,6 +547,7 @@ export default {
|
|||||||
// 取消按钮
|
// 取消按钮
|
||||||
cancel() {
|
cancel() {
|
||||||
this.open = false;
|
this.open = false;
|
||||||
|
this.modifyItem = false;
|
||||||
this.reset();
|
this.reset();
|
||||||
},
|
},
|
||||||
// 表单重置
|
// 表单重置
|
||||||
@ -459,14 +558,14 @@ export default {
|
|||||||
type: null,
|
type: null,
|
||||||
number: null,
|
number: null,
|
||||||
frequency: null,
|
frequency: null,
|
||||||
usage: null,
|
cateringUsage: null,
|
||||||
isReplace: null,
|
isReplace: null,
|
||||||
flag: null,
|
flag: null,
|
||||||
updateAt: null,
|
updateAt: null,
|
||||||
updateBy: null,
|
updateBy: null,
|
||||||
createAt: null,
|
createAt: null,
|
||||||
createBy: null,
|
createBy: null,
|
||||||
describe: null
|
cateringDescribe: null
|
||||||
};
|
};
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
@ -498,8 +597,8 @@ export default {
|
|||||||
const id = row.id || this.ids
|
const id = row.id || this.ids
|
||||||
getCatering(id).then(response => {
|
getCatering(id).then(response => {
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
this.open = true;
|
this.modifyItem = true;
|
||||||
this.title = "修改配餐功能";
|
this.title = "修改配餐";
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
@ -513,6 +612,7 @@ export default {
|
|||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
console.log(this.form);
|
||||||
addCatering(this.form).then(response => {
|
addCatering(this.form).then(response => {
|
||||||
this.msgSuccess("新增成功");
|
this.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user