人员管理
This commit is contained in:
parent
78f06ed7e2
commit
64bd494733
@ -8,7 +8,7 @@
|
||||
<version>3.2.1</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<packaging>jar</packaging>
|
||||
<packaging>war</packaging>
|
||||
<artifactId>ruoyi-admin</artifactId>
|
||||
|
||||
<description>
|
||||
|
@ -18,7 +18,7 @@ ruoyi:
|
||||
# 开发环境配置
|
||||
server:
|
||||
# 服务器的HTTP端口,默认为8080
|
||||
port: 8080
|
||||
port: 9000
|
||||
servlet:
|
||||
# 应用的访问路径
|
||||
context-path: /
|
||||
|
@ -1,33 +1,41 @@
|
||||
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.core.page.TableDataInfo;
|
||||
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.FtDepartDao;
|
||||
import com.ruoyi.system.fantang.service.IFtDepartDaoService;
|
||||
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.List;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 科室管理Controller
|
||||
*
|
||||
*
|
||||
* @author ft
|
||||
* @date 2020-11-19
|
||||
* @date 2020-11-24
|
||||
*/
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RestController
|
||||
@RequestMapping("/fantang/depart")
|
||||
@RequestMapping("/fantang/depart" )
|
||||
public class FtDepartDaoController extends BaseController {
|
||||
|
||||
private final IFtDepartDaoService iFtDepartDaoService;
|
||||
@ -37,11 +45,15 @@ public class FtDepartDaoController extends BaseController {
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('fantang:depart:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(FtDepartDao ftDepartDao) {
|
||||
public TableDataInfo list(FtDepartDao ftDepartDao)
|
||||
{
|
||||
startPage();
|
||||
LambdaQueryWrapper<FtDepartDao> lqw = Wrappers.lambdaQuery(ftDepartDao);
|
||||
if (StringUtils.isNotBlank(ftDepartDao.getDepartName())) {
|
||||
lqw.like(FtDepartDao::getDepartName, ftDepartDao.getDepartName());
|
||||
if (StringUtils.isNotBlank(ftDepartDao.getDepartName())){
|
||||
lqw.like(FtDepartDao::getDepartName ,ftDepartDao.getDepartName());
|
||||
}
|
||||
if (StringUtils.isNotBlank(ftDepartDao.getDepartCode())){
|
||||
lqw.eq(FtDepartDao::getDepartCode ,ftDepartDao.getDepartCode());
|
||||
}
|
||||
List<FtDepartDao> list = iFtDepartDaoService.list(lqw);
|
||||
return getDataTable(list);
|
||||
@ -50,30 +62,30 @@ public class FtDepartDaoController extends BaseController {
|
||||
/**
|
||||
* 导出科室管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('fantang:depart:export')")
|
||||
@Log(title = "科室管理", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
@PreAuthorize("@ss.hasPermi('fantang:depart:export')" )
|
||||
@Log(title = "科室管理" , businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export" )
|
||||
public AjaxResult export(FtDepartDao ftDepartDao) {
|
||||
LambdaQueryWrapper<FtDepartDao> lqw = new LambdaQueryWrapper<FtDepartDao>(ftDepartDao);
|
||||
List<FtDepartDao> list = iFtDepartDaoService.list(lqw);
|
||||
ExcelUtil<FtDepartDao> util = new ExcelUtil<FtDepartDao>(FtDepartDao.class);
|
||||
return util.exportExcel(list, "depart");
|
||||
ExcelUtil<FtDepartDao> util = new ExcelUtil<FtDepartDao>(FtDepartDao. class);
|
||||
return util.exportExcel(list, "depart" );
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取科室管理详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('fantang:depart:query')")
|
||||
@GetMapping(value = "/{departId}")
|
||||
public AjaxResult getInfo(@PathVariable("departId") Long departId) {
|
||||
@PreAuthorize("@ss.hasPermi('fantang:depart:query')" )
|
||||
@GetMapping(value = "/{departId}" )
|
||||
public AjaxResult getInfo(@PathVariable("departId" ) Long departId) {
|
||||
return AjaxResult.success(iFtDepartDaoService.getById(departId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增科室管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('fantang:depart:add')")
|
||||
@Log(title = "科室管理", businessType = BusinessType.INSERT)
|
||||
@PreAuthorize("@ss.hasPermi('fantang:depart:add')" )
|
||||
@Log(title = "科室管理" , businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody FtDepartDao ftDepartDao) {
|
||||
return toAjax(iFtDepartDaoService.save(ftDepartDao) ? 1 : 0);
|
||||
@ -82,8 +94,8 @@ public class FtDepartDaoController extends BaseController {
|
||||
/**
|
||||
* 修改科室管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('fantang:depart:edit')")
|
||||
@Log(title = "科室管理", businessType = BusinessType.UPDATE)
|
||||
@PreAuthorize("@ss.hasPermi('fantang:depart:edit')" )
|
||||
@Log(title = "科室管理" , businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody FtDepartDao ftDepartDao) {
|
||||
return toAjax(iFtDepartDaoService.updateById(ftDepartDao) ? 1 : 0);
|
||||
@ -92,9 +104,9 @@ public class FtDepartDaoController extends BaseController {
|
||||
/**
|
||||
* 删除科室管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('fantang:depart:remove')")
|
||||
@Log(title = "科室管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{departIds}")
|
||||
@PreAuthorize("@ss.hasPermi('fantang:depart:remove')" )
|
||||
@Log(title = "科室管理" , businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{departIds}" )
|
||||
public AjaxResult remove(@PathVariable Long[] departIds) {
|
||||
return toAjax(iFtDepartDaoService.removeByIds(Arrays.asList(departIds)) ? 1 : 0);
|
||||
}
|
||||
|
@ -1,33 +1,41 @@
|
||||
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.core.page.TableDataInfo;
|
||||
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.FtFoodDao;
|
||||
import com.ruoyi.system.fantang.service.IFtFoodDaoService;
|
||||
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.List;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 食品管理Controller
|
||||
*
|
||||
*
|
||||
* @author ft
|
||||
* @date 2020-11-19
|
||||
* @date 2020-11-24
|
||||
*/
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RestController
|
||||
@RequestMapping("/fantang/food")
|
||||
@RequestMapping("/fantang/food" )
|
||||
public class FtFoodDaoController extends BaseController {
|
||||
|
||||
private final IFtFoodDaoService iFtFoodDaoService;
|
||||
@ -37,17 +45,18 @@ public class FtFoodDaoController extends BaseController {
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('fantang:food:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(FtFoodDao ftFoodDao) {
|
||||
public TableDataInfo list(FtFoodDao ftFoodDao)
|
||||
{
|
||||
startPage();
|
||||
LambdaQueryWrapper<FtFoodDao> lqw = Wrappers.lambdaQuery(ftFoodDao);
|
||||
if (StringUtils.isNotBlank(ftFoodDao.getName())) {
|
||||
lqw.like(FtFoodDao::getName, ftFoodDao.getName());
|
||||
if (StringUtils.isNotBlank(ftFoodDao.getName())){
|
||||
lqw.like(FtFoodDao::getName ,ftFoodDao.getName());
|
||||
}
|
||||
if (ftFoodDao.getPrice() != null) {
|
||||
lqw.eq(FtFoodDao::getPrice, ftFoodDao.getPrice());
|
||||
if (ftFoodDao.getPrice() != null){
|
||||
lqw.eq(FtFoodDao::getPrice ,ftFoodDao.getPrice());
|
||||
}
|
||||
if (ftFoodDao.getType() != null) {
|
||||
lqw.eq(FtFoodDao::getType, ftFoodDao.getType());
|
||||
if (ftFoodDao.getType() != null){
|
||||
lqw.eq(FtFoodDao::getType ,ftFoodDao.getType());
|
||||
}
|
||||
List<FtFoodDao> list = iFtFoodDaoService.list(lqw);
|
||||
return getDataTable(list);
|
||||
@ -56,30 +65,30 @@ public class FtFoodDaoController extends BaseController {
|
||||
/**
|
||||
* 导出食品管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('fantang:food:export')")
|
||||
@Log(title = "食品管理", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
@PreAuthorize("@ss.hasPermi('fantang:food:export')" )
|
||||
@Log(title = "食品管理" , businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export" )
|
||||
public AjaxResult export(FtFoodDao ftFoodDao) {
|
||||
LambdaQueryWrapper<FtFoodDao> lqw = new LambdaQueryWrapper<FtFoodDao>(ftFoodDao);
|
||||
List<FtFoodDao> list = iFtFoodDaoService.list(lqw);
|
||||
ExcelUtil<FtFoodDao> util = new ExcelUtil<FtFoodDao>(FtFoodDao.class);
|
||||
return util.exportExcel(list, "food");
|
||||
ExcelUtil<FtFoodDao> util = new ExcelUtil<FtFoodDao>(FtFoodDao. class);
|
||||
return util.exportExcel(list, "food" );
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取食品管理详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('fantang:food:query')")
|
||||
@GetMapping(value = "/{foodId}")
|
||||
public AjaxResult getInfo(@PathVariable("foodId") Long foodId) {
|
||||
@PreAuthorize("@ss.hasPermi('fantang:food:query')" )
|
||||
@GetMapping(value = "/{foodId}" )
|
||||
public AjaxResult getInfo(@PathVariable("foodId" ) Long foodId) {
|
||||
return AjaxResult.success(iFtFoodDaoService.getById(foodId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增食品管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('fantang:food:add')")
|
||||
@Log(title = "食品管理", businessType = BusinessType.INSERT)
|
||||
@PreAuthorize("@ss.hasPermi('fantang:food:add')" )
|
||||
@Log(title = "食品管理" , businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody FtFoodDao ftFoodDao) {
|
||||
return toAjax(iFtFoodDaoService.save(ftFoodDao) ? 1 : 0);
|
||||
@ -88,8 +97,8 @@ public class FtFoodDaoController extends BaseController {
|
||||
/**
|
||||
* 修改食品管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('fantang:food:edit')")
|
||||
@Log(title = "食品管理", businessType = BusinessType.UPDATE)
|
||||
@PreAuthorize("@ss.hasPermi('fantang:food:edit')" )
|
||||
@Log(title = "食品管理" , businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody FtFoodDao ftFoodDao) {
|
||||
return toAjax(iFtFoodDaoService.updateById(ftFoodDao) ? 1 : 0);
|
||||
@ -98,9 +107,9 @@ public class FtFoodDaoController extends BaseController {
|
||||
/**
|
||||
* 删除食品管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('fantang:food:remove')")
|
||||
@Log(title = "食品管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{foodIds}")
|
||||
@PreAuthorize("@ss.hasPermi('fantang:food:remove')" )
|
||||
@Log(title = "食品管理" , businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{foodIds}" )
|
||||
public AjaxResult remove(@PathVariable Long[] foodIds) {
|
||||
return toAjax(iFtFoodDaoService.removeByIds(Arrays.asList(foodIds)) ? 1 : 0);
|
||||
}
|
||||
|
@ -1,33 +1,41 @@
|
||||
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.core.page.TableDataInfo;
|
||||
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.FtPatientDao;
|
||||
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.List;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 病人管理Controller
|
||||
*
|
||||
*
|
||||
* @author ft
|
||||
* @date 2020-11-19
|
||||
* @date 2020-11-24
|
||||
*/
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RestController
|
||||
@RequestMapping("/fantang/patient")
|
||||
@RequestMapping("/fantang/patient" )
|
||||
public class FtPatientDaoController extends BaseController {
|
||||
|
||||
private final IFtPatientDaoService iFtPatientDaoService;
|
||||
@ -37,14 +45,18 @@ public class FtPatientDaoController extends BaseController {
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('fantang:patient:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(FtPatientDao ftPatientDao) {
|
||||
public TableDataInfo list(FtPatientDao ftPatientDao)
|
||||
{
|
||||
startPage();
|
||||
LambdaQueryWrapper<FtPatientDao> lqw = Wrappers.lambdaQuery(ftPatientDao);
|
||||
if (StringUtils.isNotBlank(ftPatientDao.getName())) {
|
||||
lqw.like(FtPatientDao::getName, ftPatientDao.getName());
|
||||
if (StringUtils.isNotBlank(ftPatientDao.getName())){
|
||||
lqw.like(FtPatientDao::getName ,ftPatientDao.getName());
|
||||
}
|
||||
if (StringUtils.isNotBlank(ftPatientDao.getBedId())) {
|
||||
lqw.eq(FtPatientDao::getBedId, ftPatientDao.getBedId());
|
||||
if (StringUtils.isNotBlank(ftPatientDao.getBedId())){
|
||||
lqw.eq(FtPatientDao::getBedId ,ftPatientDao.getBedId());
|
||||
}
|
||||
if (StringUtils.isNotBlank(ftPatientDao.getHospitalId())){
|
||||
lqw.eq(FtPatientDao::getHospitalId ,ftPatientDao.getHospitalId());
|
||||
}
|
||||
List<FtPatientDao> list = iFtPatientDaoService.list(lqw);
|
||||
return getDataTable(list);
|
||||
@ -53,30 +65,30 @@ public class FtPatientDaoController extends BaseController {
|
||||
/**
|
||||
* 导出病人管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('fantang:patient:export')")
|
||||
@Log(title = "病人管理", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
@PreAuthorize("@ss.hasPermi('fantang:patient:export')" )
|
||||
@Log(title = "病人管理" , businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export" )
|
||||
public AjaxResult export(FtPatientDao ftPatientDao) {
|
||||
LambdaQueryWrapper<FtPatientDao> lqw = new LambdaQueryWrapper<FtPatientDao>(ftPatientDao);
|
||||
List<FtPatientDao> list = iFtPatientDaoService.list(lqw);
|
||||
ExcelUtil<FtPatientDao> util = new ExcelUtil<FtPatientDao>(FtPatientDao.class);
|
||||
return util.exportExcel(list, "patient");
|
||||
ExcelUtil<FtPatientDao> util = new ExcelUtil<FtPatientDao>(FtPatientDao. class);
|
||||
return util.exportExcel(list, "patient" );
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取病人管理详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('fantang:patient:query')")
|
||||
@GetMapping(value = "/{patientId}")
|
||||
public AjaxResult getInfo(@PathVariable("patientId") Long patientId) {
|
||||
@PreAuthorize("@ss.hasPermi('fantang:patient:query')" )
|
||||
@GetMapping(value = "/{patientId}" )
|
||||
public AjaxResult getInfo(@PathVariable("patientId" ) Long patientId) {
|
||||
return AjaxResult.success(iFtPatientDaoService.getById(patientId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增病人管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('fantang:patient:add')")
|
||||
@Log(title = "病人管理", businessType = BusinessType.INSERT)
|
||||
@PreAuthorize("@ss.hasPermi('fantang:patient:add')" )
|
||||
@Log(title = "病人管理" , businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody FtPatientDao ftPatientDao) {
|
||||
return toAjax(iFtPatientDaoService.save(ftPatientDao) ? 1 : 0);
|
||||
@ -85,8 +97,8 @@ public class FtPatientDaoController extends BaseController {
|
||||
/**
|
||||
* 修改病人管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('fantang:patient:edit')")
|
||||
@Log(title = "病人管理", businessType = BusinessType.UPDATE)
|
||||
@PreAuthorize("@ss.hasPermi('fantang:patient:edit')" )
|
||||
@Log(title = "病人管理" , businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody FtPatientDao ftPatientDao) {
|
||||
return toAjax(iFtPatientDaoService.updateById(ftPatientDao) ? 1 : 0);
|
||||
@ -95,9 +107,9 @@ public class FtPatientDaoController extends BaseController {
|
||||
/**
|
||||
* 删除病人管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('fantang:patient:remove')")
|
||||
@Log(title = "病人管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{patientIds}")
|
||||
@PreAuthorize("@ss.hasPermi('fantang:patient:remove')" )
|
||||
@Log(title = "病人管理" , businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{patientIds}" )
|
||||
public AjaxResult remove(@PathVariable Long[] patientIds) {
|
||||
return toAjax(iFtPatientDaoService.removeByIds(Arrays.asList(patientIds)) ? 1 : 0);
|
||||
}
|
||||
|
@ -11,19 +11,21 @@ import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.system.fantang.domain.FtStaffInfoDao;
|
||||
import com.ruoyi.system.fantang.service.IFtStaffInfoDaoService;
|
||||
import com.ruoyi.system.service.ISysUserService;
|
||||
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
|
||||
*
|
||||
* @author ft
|
||||
* @date 2020-11-19
|
||||
* @date 2020-11-24
|
||||
*/
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RestController
|
||||
@ -32,6 +34,8 @@ public class FtStaffInfoDaoController extends BaseController {
|
||||
|
||||
private final IFtStaffInfoDaoService iFtStaffInfoDaoService;
|
||||
|
||||
private final ISysUserService userService;
|
||||
|
||||
/**
|
||||
* 查询员工管理列表
|
||||
*/
|
||||
@ -49,6 +53,9 @@ public class FtStaffInfoDaoController extends BaseController {
|
||||
if (StringUtils.isNotBlank(ftStaffInfoDao.getRole())) {
|
||||
lqw.eq(FtStaffInfoDao::getRole, ftStaffInfoDao.getRole());
|
||||
}
|
||||
if (ftStaffInfoDao.getFlag() != null) {
|
||||
lqw.eq(FtStaffInfoDao::getFlag, ftStaffInfoDao.getFlag());
|
||||
}
|
||||
List<FtStaffInfoDao> list = iFtStaffInfoDaoService.list(lqw);
|
||||
return getDataTable(list);
|
||||
}
|
||||
@ -82,7 +89,31 @@ public class FtStaffInfoDaoController extends BaseController {
|
||||
@Log(title = "员工管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody FtStaffInfoDao ftStaffInfoDao) {
|
||||
return toAjax(iFtStaffInfoDaoService.save(ftStaffInfoDao) ? 1 : 0);
|
||||
|
||||
List<FtStaffInfoDao> list = iFtStaffInfoDaoService.list(null);
|
||||
for (FtStaffInfoDao staffInfoDao : list) {
|
||||
if (ftStaffInfoDao.getTel().equals(staffInfoDao.getTel())) {
|
||||
return AjaxResult.error("该电话号码已存在");
|
||||
}
|
||||
}
|
||||
|
||||
// 判断是否有所属公司
|
||||
if (ftStaffInfoDao.getCorpName() == null) {
|
||||
ftStaffInfoDao.setStaffType(1L);
|
||||
} else {
|
||||
ftStaffInfoDao.setStaffType(2L);
|
||||
}
|
||||
|
||||
// 判断密码是否为空
|
||||
if (ftStaffInfoDao.getPassword() == null) {
|
||||
ftStaffInfoDao.setPassword("123456");
|
||||
}
|
||||
|
||||
ftStaffInfoDao.setCreateAt(new Date());
|
||||
|
||||
boolean save = iFtStaffInfoDaoService.save(ftStaffInfoDao);
|
||||
|
||||
return AjaxResult.success("添加成功");
|
||||
}
|
||||
|
||||
/**
|
||||
@ -104,4 +135,4 @@ public class FtStaffInfoDaoController extends BaseController {
|
||||
public AjaxResult remove(@PathVariable Long[] staffIds) {
|
||||
return toAjax(iFtStaffInfoDaoService.removeByIds(Arrays.asList(staffIds)) ? 1 : 0);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,21 +1,25 @@
|
||||
package com.ruoyi.system.fantang.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
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_depart
|
||||
*
|
||||
*
|
||||
* @author ft
|
||||
* @date 2020-11-19
|
||||
* @date 2020-11-24
|
||||
*/
|
||||
@Data
|
||||
@ToString
|
||||
@ -25,18 +29,18 @@ import java.io.Serializable;
|
||||
@TableName("ft_depart")
|
||||
public class FtDepartDao implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
|
||||
/**
|
||||
* 科室编号
|
||||
*/
|
||||
/** 科室编号 */
|
||||
@TableId(value = "depart_id")
|
||||
private Long departId;
|
||||
|
||||
/**
|
||||
* 科室名称
|
||||
*/
|
||||
/** 科室名称 */
|
||||
@Excel(name = "科室名称")
|
||||
private String departName;
|
||||
|
||||
/** 科室编号 */
|
||||
@Excel(name = "科室编号")
|
||||
private String departCode;
|
||||
}
|
||||
|
@ -1,22 +1,25 @@
|
||||
package com.ruoyi.system.fantang.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
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_food
|
||||
*
|
||||
*
|
||||
* @author ft
|
||||
* @date 2020-11-19
|
||||
* @date 2020-11-24
|
||||
*/
|
||||
@Data
|
||||
@ToString
|
||||
@ -26,41 +29,28 @@ import java.math.BigDecimal;
|
||||
@TableName("ft_food")
|
||||
public class FtFoodDao implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
|
||||
/**
|
||||
* 食品id
|
||||
*/
|
||||
/** 食品id */
|
||||
@TableId(value = "food_id")
|
||||
private Long foodId;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
/** 名称 */
|
||||
@Excel(name = "名称")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 图片地址
|
||||
*/
|
||||
@Excel(name = "图片地址")
|
||||
/** 图片 */
|
||||
private String pictureUrl;
|
||||
|
||||
/**
|
||||
* 售价
|
||||
*/
|
||||
/** 售价 */
|
||||
@Excel(name = "售价")
|
||||
private BigDecimal price;
|
||||
|
||||
/**
|
||||
* 启用标志
|
||||
*/
|
||||
/** 启用标志 */
|
||||
private Long flag;
|
||||
|
||||
/**
|
||||
* 食品分类
|
||||
*/
|
||||
/** 食品分类 */
|
||||
@Excel(name = "食品分类")
|
||||
private Long type;
|
||||
}
|
||||
|
@ -1,21 +1,25 @@
|
||||
package com.ruoyi.system.fantang.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
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_patient
|
||||
*
|
||||
*
|
||||
* @author ft
|
||||
* @date 2020-11-19
|
||||
* @date 2020-11-24
|
||||
*/
|
||||
@Data
|
||||
@ToString
|
||||
@ -25,29 +29,34 @@ import java.io.Serializable;
|
||||
@TableName("ft_patient")
|
||||
public class FtPatientDao implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
|
||||
/**
|
||||
* 病人id
|
||||
*/
|
||||
/** 病人id */
|
||||
@TableId(value = "patient_id")
|
||||
private Long patientId;
|
||||
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
/** 姓名 */
|
||||
@Excel(name = "姓名")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 所属部门id
|
||||
*/
|
||||
/** 所属部门id */
|
||||
private Long departId;
|
||||
|
||||
/**
|
||||
* 床号
|
||||
*/
|
||||
/** 床号 */
|
||||
@Excel(name = "床号")
|
||||
private String bedId;
|
||||
|
||||
/** 住院号 */
|
||||
@Excel(name = "住院号")
|
||||
private String hospitalId;
|
||||
|
||||
/** 同步标志 */
|
||||
private Integer syncFlag;
|
||||
|
||||
/** 出院标志 */
|
||||
private Integer offFlag;
|
||||
|
||||
/** 创建时间 */
|
||||
private Date createAt;
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ 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.ruoyi.common.annotation.Excel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
@ -17,7 +18,7 @@ import java.util.Date;
|
||||
* 员工管理对象 ft_staff_info
|
||||
*
|
||||
* @author ft
|
||||
* @date 2020-11-19
|
||||
* @date 2020-11-24
|
||||
*/
|
||||
@Data
|
||||
@ToString
|
||||
@ -67,6 +68,8 @@ public class FtStaffInfoDao implements Serializable {
|
||||
/**
|
||||
* 创建日期
|
||||
*/
|
||||
@Excel(name = "创建日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createAt;
|
||||
|
||||
/**
|
||||
@ -77,6 +80,7 @@ public class FtStaffInfoDao implements Serializable {
|
||||
/**
|
||||
* 启用标志
|
||||
*/
|
||||
@Excel(name = "启用标志")
|
||||
private Integer flag;
|
||||
|
||||
/**
|
||||
@ -84,4 +88,39 @@ public class FtStaffInfoDao implements Serializable {
|
||||
*/
|
||||
@Excel(name = "补贴余额")
|
||||
private BigDecimal balance;
|
||||
}
|
||||
|
||||
/**
|
||||
* 员工类别
|
||||
*/
|
||||
private Long staffType;
|
||||
|
||||
/**
|
||||
* 所属公司
|
||||
*/
|
||||
private String corpName;
|
||||
|
||||
/**
|
||||
* 照片
|
||||
*/
|
||||
private String pictureUrl;
|
||||
|
||||
/**
|
||||
* 报餐科室列表
|
||||
*/
|
||||
private String deptList;
|
||||
|
||||
/**
|
||||
* 二维码
|
||||
*/
|
||||
private String qrCode;
|
||||
|
||||
/**
|
||||
* 性别
|
||||
*/
|
||||
private Integer sex;
|
||||
|
||||
/**
|
||||
* 手机号码
|
||||
*/
|
||||
private String tel;
|
||||
}
|
@ -1,13 +1,13 @@
|
||||
package com.ruoyi.system.fantang.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.ruoyi.system.fantang.domain.FtDepartDao;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* 科室管理Mapper接口
|
||||
*
|
||||
* @author ft
|
||||
* @date 2020-11-19
|
||||
* @date 2020-11-24
|
||||
*/
|
||||
public interface FtDepartDaoMapper extends BaseMapper<FtDepartDao> {
|
||||
|
||||
|
@ -1,13 +1,13 @@
|
||||
package com.ruoyi.system.fantang.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.ruoyi.system.fantang.domain.FtFoodDao;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* 食品管理Mapper接口
|
||||
*
|
||||
* @author ft
|
||||
* @date 2020-11-19
|
||||
* @date 2020-11-24
|
||||
*/
|
||||
public interface FtFoodDaoMapper extends BaseMapper<FtFoodDao> {
|
||||
|
||||
|
@ -1,13 +1,13 @@
|
||||
package com.ruoyi.system.fantang.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.ruoyi.system.fantang.domain.FtPatientDao;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* 病人管理Mapper接口
|
||||
*
|
||||
* @author ft
|
||||
* @date 2020-11-19
|
||||
* @date 2020-11-24
|
||||
*/
|
||||
public interface FtPatientDaoMapper extends BaseMapper<FtPatientDao> {
|
||||
|
||||
|
@ -1,13 +1,13 @@
|
||||
package com.ruoyi.system.fantang.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.ruoyi.system.fantang.domain.FtDepartDao;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* 科室管理Service接口
|
||||
*
|
||||
* @author ft
|
||||
* @date 2020-11-19
|
||||
* @date 2020-11-24
|
||||
*/
|
||||
public interface IFtDepartDaoService extends IService<FtDepartDao> {
|
||||
|
||||
|
@ -1,13 +1,13 @@
|
||||
package com.ruoyi.system.fantang.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.ruoyi.system.fantang.domain.FtFoodDao;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* 食品管理Service接口
|
||||
*
|
||||
* @author ft
|
||||
* @date 2020-11-19
|
||||
* @date 2020-11-24
|
||||
*/
|
||||
public interface IFtFoodDaoService extends IService<FtFoodDao> {
|
||||
|
||||
|
@ -1,13 +1,13 @@
|
||||
package com.ruoyi.system.fantang.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.ruoyi.system.fantang.domain.FtPatientDao;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* 病人管理Service接口
|
||||
*
|
||||
* @author ft
|
||||
* @date 2020-11-19
|
||||
* @date 2020-11-24
|
||||
*/
|
||||
public interface IFtPatientDaoService extends IService<FtPatientDao> {
|
||||
|
||||
|
@ -1,16 +1,16 @@
|
||||
package com.ruoyi.system.fantang.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.ruoyi.system.fantang.domain.FtDepartDao;
|
||||
import com.ruoyi.system.fantang.mapper.FtDepartDaoMapper;
|
||||
import com.ruoyi.system.fantang.service.IFtDepartDaoService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.ruoyi.system.fantang.mapper.FtDepartDaoMapper;
|
||||
import com.ruoyi.system.fantang.domain.FtDepartDao;
|
||||
import com.ruoyi.system.fantang.service.IFtDepartDaoService;
|
||||
|
||||
/**
|
||||
* 科室管理Service业务层处理
|
||||
*
|
||||
* @author ft
|
||||
* @date 2020-11-19
|
||||
* @date 2020-11-24
|
||||
*/
|
||||
@Service
|
||||
public class FtDepartDaoServiceImpl extends ServiceImpl<FtDepartDaoMapper, FtDepartDao> implements IFtDepartDaoService {
|
||||
|
@ -1,16 +1,16 @@
|
||||
package com.ruoyi.system.fantang.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.ruoyi.system.fantang.domain.FtFoodDao;
|
||||
import com.ruoyi.system.fantang.mapper.FtFoodDaoMapper;
|
||||
import com.ruoyi.system.fantang.service.IFtFoodDaoService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.ruoyi.system.fantang.mapper.FtFoodDaoMapper;
|
||||
import com.ruoyi.system.fantang.domain.FtFoodDao;
|
||||
import com.ruoyi.system.fantang.service.IFtFoodDaoService;
|
||||
|
||||
/**
|
||||
* 食品管理Service业务层处理
|
||||
*
|
||||
* @author ft
|
||||
* @date 2020-11-19
|
||||
* @date 2020-11-24
|
||||
*/
|
||||
@Service
|
||||
public class FtFoodDaoServiceImpl extends ServiceImpl<FtFoodDaoMapper, FtFoodDao> implements IFtFoodDaoService {
|
||||
|
@ -1,16 +1,16 @@
|
||||
package com.ruoyi.system.fantang.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.ruoyi.system.fantang.domain.FtPatientDao;
|
||||
import com.ruoyi.system.fantang.mapper.FtPatientDaoMapper;
|
||||
import com.ruoyi.system.fantang.service.IFtPatientDaoService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.ruoyi.system.fantang.mapper.FtPatientDaoMapper;
|
||||
import com.ruoyi.system.fantang.domain.FtPatientDao;
|
||||
import com.ruoyi.system.fantang.service.IFtPatientDaoService;
|
||||
|
||||
/**
|
||||
* 病人管理Service业务层处理
|
||||
*
|
||||
* @author ft
|
||||
* @date 2020-11-19
|
||||
* @date 2020-11-24
|
||||
*/
|
||||
@Service
|
||||
public class FtPatientDaoServiceImpl extends ServiceImpl<FtPatientDaoMapper, FtPatientDao> implements IFtPatientDaoService {
|
||||
|
@ -7,6 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<resultMap type="FtDepartDao" id="FtDepartDaoResult">
|
||||
<result property="departId" column="depart_id" />
|
||||
<result property="departName" column="depart_name" />
|
||||
<result property="departCode" column="depart_code" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
|
@ -9,6 +9,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="name" column="name" />
|
||||
<result property="departId" column="depart_id" />
|
||||
<result property="bedId" column="bed_id" />
|
||||
<result property="hospitalId" column="hospital_id" />
|
||||
<result property="syncFlag" column="sync_flag" />
|
||||
<result property="offFlag" column="off_flag" />
|
||||
<result property="createAt" column="create_at" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
|
@ -1,20 +1,27 @@
|
||||
<?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">
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.fantang.mapper.FtStaffInfoDaoMapper">
|
||||
|
||||
|
||||
<resultMap type="FtStaffInfoDao" id="FtStaffInfoDaoResult">
|
||||
<result property="staffId" column="staff_id" />
|
||||
<result property="departId" column="depart_id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="post" column="post" />
|
||||
<result property="role" column="role" />
|
||||
<result property="password" column="password" />
|
||||
<result property="createAt" column="create_at" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="flag" column="flag" />
|
||||
<result property="balance" column="balance" />
|
||||
<result property="staffId" column="staff_id"/>
|
||||
<result property="departId" column="depart_id"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="post" column="post"/>
|
||||
<result property="role" column="role"/>
|
||||
<result property="password" column="password"/>
|
||||
<result property="createAt" column="create_at"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="flag" column="flag"/>
|
||||
<result property="balance" column="balance"/>
|
||||
<result property="staffType" column="staff_type"/>
|
||||
<result property="corpName" column="corp_name"/>
|
||||
<result property="pictureUrl" column="picture_url"/>
|
||||
<result property="deptList" column="dept_list"/>
|
||||
<result property="qrCode" column="qr_code"/>
|
||||
<result property="sex" column="sex"/>
|
||||
<result property="tel" column="tel"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
|
@ -10,23 +10,29 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属公司名称" prop="corpName">
|
||||
<!-- <el-form-item label="员工类别" prop="staffType">-->
|
||||
<!-- <el-select v-model="queryParams.staffType" placeholder="请选择员工类别" clearable size="small">-->
|
||||
<!-- <el-option label="请选择字典生成" value="" />-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="所属公司" prop="corpName">
|
||||
<el-input
|
||||
v-model="queryParams.corpName"
|
||||
placeholder="请输入所属公司名称"
|
||||
placeholder="请输入所属公司"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属科室清单" prop="departList">
|
||||
<el-input
|
||||
v-model="queryParams.departList"
|
||||
placeholder="请输入所属科室清单"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
<el-form-item label="报餐科室" prop="deptList">
|
||||
<el-select v-model="queryParams.deptList" placeholder="请选择报餐科室" clearable size="small">
|
||||
<el-option
|
||||
v-for="item in deptListOptions"
|
||||
:key="item.departName"
|
||||
:label="item.departName"
|
||||
:value="item.departName">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
@ -41,7 +47,7 @@
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['fantang:careStaffInfo:add']"
|
||||
v-hasPermi="['fantang:staffInfo:add']"
|
||||
>新增
|
||||
</el-button>
|
||||
</el-col>
|
||||
@ -52,7 +58,7 @@
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['fantang:careStaffInfo:edit']"
|
||||
v-hasPermi="['fantang:staffInfo:edit']"
|
||||
>修改
|
||||
</el-button>
|
||||
</el-col>
|
||||
@ -63,7 +69,7 @@
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['fantang:careStaffInfo:remove']"
|
||||
v-hasPermi="['fantang:staffInfo:remove']"
|
||||
>删除
|
||||
</el-button>
|
||||
</el-col>
|
||||
@ -73,20 +79,26 @@
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['fantang:careStaffInfo:export']"
|
||||
v-hasPermi="['fantang:staffInfo:export']"
|
||||
>导出
|
||||
</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="careStaffInfoList" @selection-change="handleSelectionChange">
|
||||
<el-table v-loading="loading" :data="staffInfoList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center"/>
|
||||
<el-table-column label="护工 id" align="center" prop="careStaffId" v-if="false"/>
|
||||
<el-table-column label="员工 id" align="center" prop="staffId" v-if="false"/>
|
||||
<el-table-column label="姓名" align="center" prop="name"/>
|
||||
<el-table-column label="所属公司名称" align="center" prop="corpName"/>
|
||||
<el-table-column label="所属科室清单" align="center" prop="departList"/>
|
||||
<el-table-column label="照片" align="center" prop="photo"/>
|
||||
<el-table-column label="所属公司" align="center" prop="corpName"/>
|
||||
<!-- <el-table-column label="员工类别" align="center" prop="staffType"/>-->
|
||||
<el-table-column label="报餐科室" align="center" prop="deptList"/>
|
||||
<el-table-column label="补贴余额" align="center" prop="balance"/>
|
||||
<el-table-column label="创建日期" align="center" prop="createAt" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createAt, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="二维码" align="center" prop="qrCode"/>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
@ -95,7 +107,7 @@
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['fantang:careStaffInfo:edit']"
|
||||
v-hasPermi="['fantang:staffInfo:edit']"
|
||||
>修改
|
||||
</el-button>
|
||||
<el-button
|
||||
@ -103,7 +115,7 @@
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['fantang:careStaffInfo:remove']"
|
||||
v-hasPermi="['fantang:staffInfo:remove']"
|
||||
>删除
|
||||
</el-button>
|
||||
</template>
|
||||
@ -118,23 +130,42 @@
|
||||
@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="name">
|
||||
<el-input v-model="form.name" placeholder="请输入姓名"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属公司名称" prop="corpName">
|
||||
<el-input v-model="form.corpName" placeholder="请输入所属公司名称"/>
|
||||
<el-form-item label="性别" prop="sex">
|
||||
<el-select v-model="form.sex" placeholder="请选性别">
|
||||
<el-option
|
||||
v-for="dict in sexOptions"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictLabel"
|
||||
:value="dict.dictValue"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属科室清单" prop="departList">
|
||||
<el-input v-model="form.departList" placeholder="请输入所属科室清单"/>
|
||||
<!-- <el-form-item label="员工类别" prop="staffType">-->
|
||||
<!-- <el-select v-model="form.staffType" placeholder="请选择员工类别">-->
|
||||
<!-- <el-option label="请选择字典生成" value="" />-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="所属公司" prop="corpName">
|
||||
<el-input v-model="form.corpName" placeholder="请输入所属公司"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="照片" prop="photo">
|
||||
<el-input v-model="form.photo" placeholder="请输入照片"/>
|
||||
<el-form-item label="照片" prop="pictureUrl">
|
||||
<el-input v-model="form.pictureUrl" placeholder="请输入照片"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="二维码" prop="qrCode">
|
||||
<el-input v-model="form.qrCode" placeholder="请输入二维码"/>
|
||||
<el-form-item label="报餐科室" prop="deptList">
|
||||
<el-select v-model="form.deptList" placeholder="请选择报餐科室">
|
||||
<el-option
|
||||
v-for="item in deptListOptions"
|
||||
:key="item.departName"
|
||||
:label="item.departName"
|
||||
:value="item.departName">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
@ -147,19 +178,22 @@
|
||||
|
||||
<script>
|
||||
import {
|
||||
addCareStaffInfo,
|
||||
delCareStaffInfo,
|
||||
exportCareStaffInfo,
|
||||
getCareStaffInfo,
|
||||
listCareStaffInfo,
|
||||
updateCareStaffInfo
|
||||
} from "@/api/fantang/careStaffInfo";
|
||||
addStaffInfo,
|
||||
delStaffInfo,
|
||||
exportStaffInfo,
|
||||
getStaffInfo,
|
||||
listStaffInfo,
|
||||
updateStaffInfo
|
||||
} from "@/api/fantang/staffInfo";
|
||||
import {listDepart} from "@/api/fantang/depart";
|
||||
|
||||
export default {
|
||||
name: "CareStaffInfo",
|
||||
name: "StaffInfo",
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
sexOptions: [],
|
||||
deptListOptions: [],
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
@ -172,8 +206,8 @@ export default {
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 护工信息表格数据
|
||||
careStaffInfoList: [],
|
||||
// 员工管理表格数据
|
||||
staffInfoList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
@ -183,8 +217,9 @@ export default {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
name: null,
|
||||
staffType: null,
|
||||
corpName: null,
|
||||
departList: null,
|
||||
deptList: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
@ -194,26 +229,36 @@ export default {
|
||||
{required: true, message: "姓名不能为空", trigger: "blur"}
|
||||
],
|
||||
corpName: [
|
||||
{required: true, message: "所属公司名称不能为空", trigger: "blur"}
|
||||
{required: true, message: "所属公司不能为空", trigger: "blur"}
|
||||
],
|
||||
departList: [
|
||||
{required: true, message: "所属科室清单不能为空", trigger: "blur"}
|
||||
sex: [
|
||||
{required: true, message: "性别不能为空", trigger: "blur"}
|
||||
],
|
||||
deptList: [
|
||||
{required: true, message: "报餐科室不能为空", trigger: "blur"}
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getDicts("sys_user_sex").then(response => {
|
||||
this.sexOptions = response.data;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
/** 查询护工信息列表 */
|
||||
/** 查询员工管理列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listCareStaffInfo(this.queryParams).then(response => {
|
||||
this.careStaffInfoList = response.rows;
|
||||
listStaffInfo(this.queryParams).then(response => {
|
||||
this.staffInfoList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
listDepart(this.queryParams).then(response => {
|
||||
// console.log("depart", response);
|
||||
this.deptListOptions = response.rows;
|
||||
})
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
@ -223,12 +268,20 @@ export default {
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
careStaffId: null,
|
||||
staffId: null,
|
||||
departId: null,
|
||||
name: null,
|
||||
corpName: null,
|
||||
departList: null,
|
||||
post: null,
|
||||
role: null,
|
||||
password: null,
|
||||
createAt: null,
|
||||
createBy: null,
|
||||
flag: null,
|
||||
photo: null,
|
||||
balance: null,
|
||||
staffType: null,
|
||||
corpName: null,
|
||||
pictureUrl: null,
|
||||
deptList: null,
|
||||
qrCode: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
@ -245,7 +298,7 @@ export default {
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.careStaffId)
|
||||
this.ids = selection.map(item => item.staffId)
|
||||
this.single = selection.length !== 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
@ -253,30 +306,30 @@ export default {
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加护工信息";
|
||||
this.title = "添加员工管理";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const careStaffId = row.careStaffId || this.ids
|
||||
getCareStaffInfo(careStaffId).then(response => {
|
||||
const staffId = row.staffId || this.ids
|
||||
getStaffInfo(staffId).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改护工信息";
|
||||
this.title = "修改员工管理";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.careStaffId != null) {
|
||||
updateCareStaffInfo(this.form).then(response => {
|
||||
if (this.form.staffId != null) {
|
||||
updateStaffInfo(this.form).then(response => {
|
||||
this.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addCareStaffInfo(this.form).then(response => {
|
||||
addStaffInfo(this.form).then(response => {
|
||||
this.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
@ -287,13 +340,13 @@ export default {
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const careStaffIds = row.careStaffId || this.ids;
|
||||
this.$confirm('是否确认删除护工信息编号为"' + careStaffIds + '"的数据项?', "警告", {
|
||||
const staffIds = row.staffId || this.ids;
|
||||
this.$confirm('是否确认删除员工管理编号为"' + staffIds + '"的数据项?', "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(function () {
|
||||
return delCareStaffInfo(careStaffIds);
|
||||
return delStaffInfo(staffIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.msgSuccess("删除成功");
|
||||
@ -302,12 +355,12 @@ export default {
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
const queryParams = this.queryParams;
|
||||
this.$confirm('是否确认导出所有护工信息数据项?', "警告", {
|
||||
this.$confirm('是否确认导出所有员工管理数据项?', "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(function () {
|
||||
return exportCareStaffInfo(queryParams);
|
||||
return exportStaffInfo(queryParams);
|
||||
}).then(response => {
|
||||
this.download(response.msg);
|
||||
})
|
||||
|
@ -10,6 +10,15 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="科室编号" prop="departCode">
|
||||
<el-input
|
||||
v-model="queryParams.departCode"
|
||||
placeholder="请输入科室编号"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
@ -24,8 +33,7 @@
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['fantang:depart:add']"
|
||||
>新增
|
||||
</el-button>
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
@ -35,8 +43,7 @@
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['fantang:depart:edit']"
|
||||
>修改
|
||||
</el-button>
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
@ -46,8 +53,7 @@
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['fantang:depart:remove']"
|
||||
>删除
|
||||
</el-button>
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
@ -56,16 +62,16 @@
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['fantang:depart:export']"
|
||||
>导出
|
||||
</el-button>
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="departList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center"/>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="科室编号" align="center" prop="departId" v-if="false"/>
|
||||
<el-table-column label="科室名称" align="center" prop="departName"/>
|
||||
<el-table-column label="科室名称" align="center" prop="departName" />
|
||||
<el-table-column label="科室编号" align="center" prop="departCode" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
@ -74,20 +80,18 @@
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['fantang:depart:edit']"
|
||||
>修改
|
||||
</el-button>
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['fantang:depart:remove']"
|
||||
>删除
|
||||
</el-button>
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
@ -100,7 +104,10 @@
|
||||
<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="departName">
|
||||
<el-input v-model="form.departName" placeholder="请输入科室名称"/>
|
||||
<el-input v-model="form.departName" placeholder="请输入科室名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="科室编号" prop="departCode">
|
||||
<el-input v-model="form.departCode" placeholder="请输入科室编号" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
@ -112,11 +119,12 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {addDepart, delDepart, exportDepart, getDepart, listDepart, updateDepart} from "@/api/fantang/depart";
|
||||
import { listDepart, getDepart, delDepart, addDepart, updateDepart, exportDepart } from "@/api/fantang/depart";
|
||||
|
||||
export default {
|
||||
name: "Depart",
|
||||
components: {},
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
@ -141,14 +149,18 @@ export default {
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
departName: null
|
||||
departName: null,
|
||||
departCode: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
departName: [
|
||||
{required: true, message: "科室名称不能为空", trigger: "blur"}
|
||||
{ required: true, message: "科室名称不能为空", trigger: "blur" }
|
||||
],
|
||||
departCode: [
|
||||
{ required: true, message: "科室编号不能为空", trigger: "blur" }
|
||||
]
|
||||
}
|
||||
};
|
||||
@ -175,7 +187,8 @@ export default {
|
||||
reset() {
|
||||
this.form = {
|
||||
departId: null,
|
||||
departName: null
|
||||
departName: null,
|
||||
departCode: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
@ -192,7 +205,7 @@ export default {
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.departId)
|
||||
this.single = selection.length !== 1
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
@ -235,28 +248,28 @@ export default {
|
||||
handleDelete(row) {
|
||||
const departIds = row.departId || this.ids;
|
||||
this.$confirm('是否确认删除科室管理编号为"' + departIds + '"的数据项?', "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(function () {
|
||||
return delDepart(departIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.msgSuccess("删除成功");
|
||||
})
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(function() {
|
||||
return delDepart(departIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.msgSuccess("删除成功");
|
||||
})
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
const queryParams = this.queryParams;
|
||||
this.$confirm('是否确认导出所有科室管理数据项?', "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(function () {
|
||||
return exportDepart(queryParams);
|
||||
}).then(response => {
|
||||
this.download(response.msg);
|
||||
})
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(function() {
|
||||
return exportDepart(queryParams);
|
||||
}).then(response => {
|
||||
this.download(response.msg);
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -1,27 +1,32 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="名称" prop="name">
|
||||
<el-form-item label="食品名称" prop="name">
|
||||
<el-input
|
||||
v-model="queryParams.name"
|
||||
placeholder="请输入名称"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="售价" prop="price">
|
||||
<el-input
|
||||
v-model="queryParams.price"
|
||||
placeholder="请输入售价"
|
||||
placeholder="请输入食品名称"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="售价" prop="price">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.price"-->
|
||||
<!-- placeholder="请输入售价"-->
|
||||
<!-- clearable-->
|
||||
<!-- size="small"-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="食品分类" prop="type">
|
||||
<el-select v-model="queryParams.type" placeholder="请选择食品分类" clearable size="small">
|
||||
<el-option label="请选择字典生成" value=""/>
|
||||
<el-option
|
||||
v-for="dict in typeOptions"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictLabel"
|
||||
:value="dict.dictValue"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
@ -38,8 +43,7 @@
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['fantang:food:add']"
|
||||
>新增
|
||||
</el-button>
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
@ -49,8 +53,7 @@
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['fantang:food:edit']"
|
||||
>修改
|
||||
</el-button>
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
@ -60,8 +63,7 @@
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['fantang:food:remove']"
|
||||
>删除
|
||||
</el-button>
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
@ -70,19 +72,17 @@
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['fantang:food:export']"
|
||||
>导出
|
||||
</el-button>
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="foodList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center"/>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="食品id" align="center" prop="foodId" v-if="false"/>
|
||||
<el-table-column label="名称" align="center" prop="name"/>
|
||||
<el-table-column label="图片地址" align="center" prop="pictureUrl"/>
|
||||
<el-table-column label="售价" align="center" prop="price"/>
|
||||
<el-table-column label="食品分类" align="center" prop="type"/>
|
||||
<el-table-column label="食品名称" align="center" prop="name" />
|
||||
<el-table-column label="售价" align="center" prop="price" />
|
||||
<el-table-column label="食品分类" align="center" prop="type" :formatter="typeFormat" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
@ -91,16 +91,14 @@
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['fantang:food:edit']"
|
||||
>修改
|
||||
</el-button>
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['fantang:food:remove']"
|
||||
>删除
|
||||
</el-button>
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -116,18 +114,23 @@
|
||||
<!-- 添加或修改食品管理对话框 -->
|
||||
<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="name">
|
||||
<el-input v-model="form.name" placeholder="请输入名称"/>
|
||||
<el-form-item label="食品名称" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入食品名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="图片地址" prop="pictureUrl">
|
||||
<el-input v-model="form.pictureUrl" placeholder="请输入图片地址"/>
|
||||
<el-form-item label="图片">
|
||||
<uploadImage v-model="form.pictureUrl"/>
|
||||
</el-form-item>
|
||||
<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 label="食品分类" prop="type">
|
||||
<el-select v-model="form.type" placeholder="请选择食品分类">
|
||||
<el-option label="请选择字典生成" value=""/>
|
||||
<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-form>
|
||||
@ -140,11 +143,14 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {addFood, delFood, exportFood, getFood, listFood, updateFood} from "@/api/fantang/food";
|
||||
import { listFood, getFood, delFood, addFood, updateFood, exportFood } from "@/api/fantang/food";
|
||||
import UploadImage from '@/components/UploadImage';
|
||||
|
||||
export default {
|
||||
name: "Food",
|
||||
components: {},
|
||||
components: {
|
||||
UploadImage,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
@ -165,6 +171,8 @@ export default {
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 食品分类字典
|
||||
typeOptions: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
@ -178,19 +186,22 @@ export default {
|
||||
// 表单校验
|
||||
rules: {
|
||||
name: [
|
||||
{required: true, message: "名称不能为空", trigger: "blur"}
|
||||
{ required: true, message: "食品名称不能为空", trigger: "blur" }
|
||||
],
|
||||
price: [
|
||||
{required: true, message: "售价不能为空", trigger: "blur"}
|
||||
{ required: true, message: "售价不能为空", trigger: "blur" }
|
||||
],
|
||||
type: [
|
||||
{required: true, message: "食品分类不能为空", trigger: "change"}
|
||||
{ required: true, message: "食品分类不能为空", trigger: "change" }
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getDicts("ft_food_type").then(response => {
|
||||
this.typeOptions = response.data;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
/** 查询食品管理列表 */
|
||||
@ -202,6 +213,10 @@ export default {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 食品分类字典翻译
|
||||
typeFormat(row, column) {
|
||||
return this.selectDictLabel(this.typeOptions, row.type);
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
@ -232,7 +247,7 @@ export default {
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.foodId)
|
||||
this.single = selection.length !== 1
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
@ -275,28 +290,28 @@ export default {
|
||||
handleDelete(row) {
|
||||
const foodIds = row.foodId || this.ids;
|
||||
this.$confirm('是否确认删除食品管理编号为"' + foodIds + '"的数据项?', "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(function () {
|
||||
return delFood(foodIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.msgSuccess("删除成功");
|
||||
})
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(function() {
|
||||
return delFood(foodIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.msgSuccess("删除成功");
|
||||
})
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
const queryParams = this.queryParams;
|
||||
this.$confirm('是否确认导出所有食品管理数据项?', "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(function () {
|
||||
return exportFood(queryParams);
|
||||
}).then(response => {
|
||||
this.download(response.msg);
|
||||
})
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(function() {
|
||||
return exportFood(queryParams);
|
||||
}).then(response => {
|
||||
this.download(response.msg);
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -19,6 +19,15 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="住院号" prop="hospitalId">
|
||||
<el-input
|
||||
v-model="queryParams.hospitalId"
|
||||
placeholder="请输入住院号"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
@ -76,6 +85,7 @@
|
||||
<el-table-column label="病人id" align="center" prop="patientId" v-if="false"/>
|
||||
<el-table-column label="姓名" align="center" prop="name"/>
|
||||
<el-table-column label="床号" align="center" prop="bedId"/>
|
||||
<el-table-column label="住院号" align="center" prop="hospitalId"/>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
@ -112,9 +122,22 @@
|
||||
<el-form-item label="姓名" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入姓名"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属部门" prop="departId">
|
||||
<el-select v-model="form.departId" placeholder="请选择科室列表">
|
||||
<el-option
|
||||
v-for="item in deptListOptions"
|
||||
:key="item.departName"
|
||||
:label="item.departName"
|
||||
:value="item.departId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="床号" prop="bedId">
|
||||
<el-input v-model="form.bedId" placeholder="请输入床号"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="住院号" prop="hospitalId">
|
||||
<el-input v-model="form.hospitalId" placeholder="请输入住院号"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
@ -126,12 +149,14 @@
|
||||
|
||||
<script>
|
||||
import {addPatient, delPatient, exportPatient, getPatient, listPatient, updatePatient} from "@/api/fantang/patient";
|
||||
import {listDepart} from "@/api/fantang/depart";
|
||||
|
||||
export default {
|
||||
name: "Patient",
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
deptListOptions: [],
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
@ -155,7 +180,8 @@ export default {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
name: null,
|
||||
bedId: null
|
||||
bedId: null,
|
||||
hospitalId: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
@ -164,9 +190,15 @@ export default {
|
||||
name: [
|
||||
{required: true, message: "姓名不能为空", trigger: "blur"}
|
||||
],
|
||||
departId: [
|
||||
{required: true, message: "所属部门不能为空", trigger: "blur"}
|
||||
],
|
||||
bedId: [
|
||||
{required: true, message: "床号不能为空", trigger: "blur"}
|
||||
]
|
||||
],
|
||||
hospitalId: [
|
||||
{required: true, message: "住院号不能为空", trigger: "blur"}
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
@ -182,6 +214,10 @@ export default {
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
listDepart(this.queryParams).then(response => {
|
||||
console.log("depart", response);
|
||||
this.deptListOptions = response.rows;
|
||||
})
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
@ -194,7 +230,11 @@ export default {
|
||||
patientId: null,
|
||||
name: null,
|
||||
departId: null,
|
||||
bedId: null
|
||||
bedId: null,
|
||||
hospitalId: null,
|
||||
syncFlag: null,
|
||||
offFlag: null,
|
||||
createAt: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
|
@ -11,22 +11,29 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="岗位" prop="post">
|
||||
<el-input
|
||||
v-model="queryParams.post"
|
||||
placeholder="请输入岗位"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
<el-select v-model="queryParams.post" placeholder="请选择岗位" clearable size="small">
|
||||
<el-option
|
||||
v-for="dict in postOptions"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictLabel"
|
||||
:value="dict.dictValue"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="角色" prop="role">
|
||||
<el-input
|
||||
v-model="queryParams.role"
|
||||
placeholder="请输入角色"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
<!-- <el-form-item label="角色" prop="role">-->
|
||||
<!-- <el-select v-model="queryParams.role" placeholder="请选择角色" clearable size="small">-->
|
||||
<!-- <el-option label="请选择字典生成" value=""/>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="是否启用" prop="flag">
|
||||
<el-select v-model="queryParams.flag" placeholder="请选择是否启用" clearable size="small">
|
||||
<el-option
|
||||
v-for="item in flagOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
@ -84,9 +91,17 @@
|
||||
<el-table-column type="selection" width="55" align="center"/>
|
||||
<el-table-column label="员工 id" align="center" prop="staffId" v-if="false"/>
|
||||
<el-table-column label="姓名" align="center" prop="name"/>
|
||||
<el-table-column label="性别" align="center" prop="sex"/>
|
||||
<el-table-column label="手机号码" align="center" prop="tel"/>
|
||||
<el-table-column label="岗位" align="center" prop="post"/>
|
||||
<el-table-column label="角色" align="center" prop="role"/>
|
||||
<!-- <el-table-column label="角色" align="center" prop="role"/>-->
|
||||
<el-table-column label="补贴余额" align="center" prop="balance"/>
|
||||
<el-table-column label="创建日期" align="center" prop="createAt" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createAt, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否启用" align="center" prop="flag"/>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
@ -123,17 +138,55 @@
|
||||
<el-form-item label="姓名" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入姓名"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="性别" prop="sex">
|
||||
<el-select v-model="form.sex" placeholder="请选性别">
|
||||
<el-option
|
||||
v-for="dict in sexOptions"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictLabel"
|
||||
:value="dict.dictValue"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号码" prop="tel">
|
||||
<el-input v-model="form.tel" placeholder="请输入手机号码"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="岗位" prop="post">
|
||||
<el-input v-model="form.post" placeholder="请输入岗位"/>
|
||||
<el-select v-model="form.post" placeholder="请选择岗位">
|
||||
<el-option
|
||||
v-for="dict in postOptions"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictLabel"
|
||||
:value="dict.dictValue"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="角色" prop="role">
|
||||
<el-input v-model="form.role" placeholder="请输入角色"/>
|
||||
<el-form-item label="科室" prop="deptList">
|
||||
<el-select v-model="form.deptList" placeholder="请选择科室">
|
||||
<el-option
|
||||
v-for="item in deptListOptions"
|
||||
:key="item.departName"
|
||||
:label="item.departName"
|
||||
:value="item.departName">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="角色" prop="role">-->
|
||||
<!-- <el-select v-model="form.role" placeholder="请选择角色">-->
|
||||
<!-- <el-option label="请选择字典生成" value=""/>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="密码" prop="password">
|
||||
<el-input v-model="form.password" placeholder="请输入密码"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="补贴余额" prop="balance">
|
||||
<el-input v-model="form.balance" placeholder="请输入补贴余额"/>
|
||||
<el-form-item label="启用标志" prop="flag">
|
||||
<el-switch
|
||||
v-model="form.flag"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
active-text="启用"
|
||||
inactive-text="禁用">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
@ -153,12 +206,23 @@ import {
|
||||
listStaffInfo,
|
||||
updateStaffInfo
|
||||
} from "@/api/fantang/staffInfo";
|
||||
import {listDepart} from "@/api/fantang/depart";
|
||||
|
||||
export default {
|
||||
name: "StaffInfo",
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
deptListOptions: [],
|
||||
sexOptions: [],
|
||||
postOptions: [],
|
||||
flagOptions: [{
|
||||
value: 1,
|
||||
label: '启用'
|
||||
}, {
|
||||
value: 0,
|
||||
label: '禁用'
|
||||
}],
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
@ -184,6 +248,7 @@ export default {
|
||||
name: null,
|
||||
post: null,
|
||||
role: null,
|
||||
flag: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
@ -193,22 +258,34 @@ export default {
|
||||
{required: true, message: "姓名不能为空", trigger: "blur"}
|
||||
],
|
||||
post: [
|
||||
{required: true, message: "岗位不能为空", trigger: "blur"}
|
||||
{required: true, message: "岗位不能为空", trigger: "change"}
|
||||
],
|
||||
role: [
|
||||
{required: true, message: "角色不能为空", trigger: "blur"}
|
||||
{required: true, message: "角色不能为空", trigger: "change"}
|
||||
],
|
||||
password: [
|
||||
{required: true, message: "密码不能为空", trigger: "blur"}
|
||||
flag: [
|
||||
{required: true, message: "启用标志不能为空", trigger: "change"}
|
||||
],
|
||||
balance: [
|
||||
{required: true, message: "补贴余额不能为空", trigger: "blur"}
|
||||
sex: [
|
||||
{required: true, message: "性别不能为空", trigger: "change"}
|
||||
],
|
||||
deptList: [
|
||||
{required: true, message: "性别不能为空", trigger: "change"}
|
||||
],
|
||||
tel: [
|
||||
{required: true, message: "手机号码不能为空", trigger: "change"}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getDicts("sys_user_sex").then(response => {
|
||||
this.sexOptions = response.data;
|
||||
});
|
||||
this.getDicts("ft_post").then(response => {
|
||||
this.postOptions = response.data;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
/** 查询员工管理列表 */
|
||||
@ -218,7 +295,11 @@ export default {
|
||||
this.staffInfoList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
console.log("flag-----", response);
|
||||
});
|
||||
listDepart(this.queryParams).then(response => {
|
||||
this.deptListOptions = response.rows;
|
||||
})
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
@ -236,8 +317,15 @@ export default {
|
||||
password: null,
|
||||
createAt: null,
|
||||
createBy: null,
|
||||
flag: null,
|
||||
balance: null
|
||||
flag: true,
|
||||
balance: null,
|
||||
staffType: null,
|
||||
corpName: null,
|
||||
pictureUrl: null,
|
||||
deptList: null,
|
||||
qrCode: null,
|
||||
sex: null,
|
||||
tel: null,
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
@ -278,12 +366,23 @@ export default {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.staffId != null) {
|
||||
if (this.form.flag === true) {
|
||||
this.form.flag = 1;
|
||||
} else {
|
||||
this.form.flag = 0;
|
||||
}
|
||||
updateStaffInfo(this.form).then(response => {
|
||||
this.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
console.log(this.form);
|
||||
if (this.form.flag === true) {
|
||||
this.form.flag = 1;
|
||||
} else {
|
||||
this.form.flag = 0;
|
||||
}
|
||||
addStaffInfo(this.form).then(response => {
|
||||
this.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
|
@ -34,7 +34,7 @@ module.exports = {
|
||||
proxy: {
|
||||
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
||||
[process.env.VUE_APP_BASE_API]: {
|
||||
target: `http://localhost:8080`,
|
||||
target: `http://localhost:9000`,
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
['^' + process.env.VUE_APP_BASE_API]: ''
|
||||
|
Loading…
x
Reference in New Issue
Block a user