Merge remote-tracking branch 'origin/master'

This commit is contained in:
28353131@qq.com 2020-12-05 09:50:09 +08:00
commit 720951dcdb
15 changed files with 231 additions and 86 deletions

View File

@ -17,13 +17,6 @@
<dependencies> <dependencies>
<!-- spring-boot-devtools -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional> <!-- 表示依赖不会传递 -->
</dependency>
<!-- swagger2--> <!-- swagger2-->
<dependency> <dependency>
<groupId>io.springfox</groupId> <groupId>io.springfox</groupId>

View File

@ -27,7 +27,7 @@ import java.util.List;
*/ */
@RequiredArgsConstructor(onConstructor_ = @Autowired) @RequiredArgsConstructor(onConstructor_ = @Autowired)
@RestController @RestController
@RequestMapping("/fantang/foodDemand" ) @RequestMapping("/fantang/foodDemand")
public class FtFoodDemandDaoController extends BaseController { public class FtFoodDemandDaoController extends BaseController {
private final IFtFoodDemandDaoService iFtFoodDemandDaoService; private final IFtFoodDemandDaoService iFtFoodDemandDaoService;
@ -37,12 +37,11 @@ public class FtFoodDemandDaoController extends BaseController {
*/ */
@PreAuthorize("@ss.hasPermi('fantang:foodDemand:list')") @PreAuthorize("@ss.hasPermi('fantang:foodDemand:list')")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(FtFoodDemandDao ftFoodDemandDao) public TableDataInfo list(FtFoodDemandDao ftFoodDemandDao) {
{
startPage(); startPage();
LambdaQueryWrapper<FtFoodDemandDao> lqw = Wrappers.lambdaQuery(ftFoodDemandDao); LambdaQueryWrapper<FtFoodDemandDao> lqw = Wrappers.lambdaQuery(ftFoodDemandDao);
if (ftFoodDemandDao.getFlag() != null){ if (ftFoodDemandDao.getFlag() != null) {
lqw.eq(FtFoodDemandDao::getFlag ,ftFoodDemandDao.getFlag()); lqw.eq(FtFoodDemandDao::getFlag, ftFoodDemandDao.getFlag());
} }
List<FtFoodDemandDao> list = iFtFoodDemandDaoService.list(lqw); List<FtFoodDemandDao> list = iFtFoodDemandDaoService.list(lqw);
return getDataTable(list); return getDataTable(list);
@ -51,40 +50,41 @@ public class FtFoodDemandDaoController extends BaseController {
/** /**
* 导出病人报餐列表 * 导出病人报餐列表
*/ */
@PreAuthorize("@ss.hasPermi('fantang:foodDemand:export')" ) @PreAuthorize("@ss.hasPermi('fantang:foodDemand:export')")
@Log(title = "病人报餐" , businessType = BusinessType.EXPORT) @Log(title = "病人报餐", businessType = BusinessType.EXPORT)
@GetMapping("/export" ) @GetMapping("/export")
public AjaxResult export(FtFoodDemandDao ftFoodDemandDao) { public AjaxResult export(FtFoodDemandDao ftFoodDemandDao) {
LambdaQueryWrapper<FtFoodDemandDao> lqw = new LambdaQueryWrapper<FtFoodDemandDao>(ftFoodDemandDao); LambdaQueryWrapper<FtFoodDemandDao> lqw = new LambdaQueryWrapper<FtFoodDemandDao>(ftFoodDemandDao);
List<FtFoodDemandDao> list = iFtFoodDemandDaoService.list(lqw); List<FtFoodDemandDao> list = iFtFoodDemandDaoService.list(lqw);
ExcelUtil<FtFoodDemandDao> util = new ExcelUtil<FtFoodDemandDao>(FtFoodDemandDao. class); ExcelUtil<FtFoodDemandDao> util = new ExcelUtil<FtFoodDemandDao>(FtFoodDemandDao.class);
return util.exportExcel(list, "foodDemand" ); return util.exportExcel(list, "foodDemand");
} }
/** /**
* 获取病人报餐详细信息 * 获取病人报餐详细信息
*/ */
@PreAuthorize("@ss.hasPermi('fantang:foodDemand:query')" ) @PreAuthorize("@ss.hasPermi('fantang:foodDemand:query')")
@GetMapping(value = "/{id}" ) @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id" ) Long id) { public AjaxResult getInfo(@PathVariable("id") Long id) {
return AjaxResult.success(iFtFoodDemandDaoService.getById(id)); return AjaxResult.success(iFtFoodDemandDaoService.getById(id));
} }
/** /**
* 新增病人报餐 * 新增病人报餐
*/ */
@PreAuthorize("@ss.hasPermi('fantang:foodDemand:add')" ) @PreAuthorize("@ss.hasPermi('fantang:foodDemand:add')")
@Log(title = "病人报餐" , businessType = BusinessType.INSERT) @Log(title = "病人报餐", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@RequestBody FtFoodDemandDao ftFoodDemandDao) { public AjaxResult add(@RequestBody FtFoodDemandDao ftFoodDemandDao) {
ftFoodDemandDao.setFlag(true);
return toAjax(iFtFoodDemandDaoService.save(ftFoodDemandDao) ? 1 : 0); return toAjax(iFtFoodDemandDaoService.save(ftFoodDemandDao) ? 1 : 0);
} }
/** /**
* 修改病人报餐 * 修改病人报餐
*/ */
@PreAuthorize("@ss.hasPermi('fantang:foodDemand:edit')" ) @PreAuthorize("@ss.hasPermi('fantang:foodDemand:edit')")
@Log(title = "病人报餐" , businessType = BusinessType.UPDATE) @Log(title = "病人报餐", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody FtFoodDemandDao ftFoodDemandDao) { public AjaxResult edit(@RequestBody FtFoodDemandDao ftFoodDemandDao) {
ftFoodDemandDao.setUpdateAt(new Date()); ftFoodDemandDao.setUpdateAt(new Date());
@ -94,9 +94,9 @@ public class FtFoodDemandDaoController extends BaseController {
/** /**
* 删除病人报餐 * 删除病人报餐
*/ */
@PreAuthorize("@ss.hasPermi('fantang:foodDemand:remove')" ) @PreAuthorize("@ss.hasPermi('fantang:foodDemand: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(iFtFoodDemandDaoService.removeByIds(Arrays.asList(ids)) ? 1 : 0); return toAjax(iFtFoodDemandDaoService.removeByIds(Arrays.asList(ids)) ? 1 : 0);
} }

View File

@ -57,6 +57,11 @@ public class FtStaffInfoDaoController extends BaseController {
return getDataTable(list); return getDataTable(list);
} }
@GetMapping("/staffListWithDepart")
public AjaxResult staffListWithDepart() {
return AjaxResult.success(iFtStaffInfoDaoService.selectStaffInfoWithDepart());
}
/** /**
* 查询护工管理列表 * 查询护工管理列表
*/ */

View File

@ -74,7 +74,7 @@ public class FtFoodDemandDao implements Serializable {
* 加菜 * 加菜
*/ */
@Excel(name = "加菜") @Excel(name = "加菜")
private Integer vegetables; private Boolean vegetables;
/** /**
* 更新操作人 id * 更新操作人 id
@ -85,7 +85,7 @@ public class FtFoodDemandDao implements Serializable {
* 加肉 * 加肉
*/ */
@Excel(name = "加肉") @Excel(name = "加肉")
private Integer meat; private Boolean meat;
/** /**
* 更新来源 * 更新来源
@ -96,7 +96,7 @@ public class FtFoodDemandDao implements Serializable {
* 加饭 * 加饭
*/ */
@Excel(name = "加饭") @Excel(name = "加饭")
private Integer rice; private Boolean rice;
/** /**
* 加蛋 * 加蛋

View File

@ -1,16 +1,16 @@
package com.ruoyi.system.fantang.domain; package com.ruoyi.system.fantang.domain;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.annotation.Excel;
import com.ruoyi.system.fantang.vo.FtStaffInfoVo;
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 java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
@ -22,11 +22,11 @@ import java.util.Date;
*/ */
@Data @Data
@ToString @ToString
@EqualsAndHashCode @EqualsAndHashCode(callSuper = false)
@NoArgsConstructor @NoArgsConstructor
@Accessors(chain = true) @Accessors(chain = true)
@TableName("ft_staff_info") @TableName("ft_staff_info")
public class FtStaffInfoDao { public class FtStaffInfoDao extends FtStaffInfoVo {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;

View File

@ -2,6 +2,9 @@ package com.ruoyi.system.fantang.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.system.fantang.domain.FtStaffInfoDao; import com.ruoyi.system.fantang.domain.FtStaffInfoDao;
import org.apache.ibatis.annotations.Select;
import java.util.List;
/** /**
* 员工管理Mapper接口 * 员工管理Mapper接口
@ -11,4 +14,6 @@ import com.ruoyi.system.fantang.domain.FtStaffInfoDao;
*/ */
public interface FtStaffInfoDaoMapper extends BaseMapper<FtStaffInfoDao> { public interface FtStaffInfoDaoMapper extends BaseMapper<FtStaffInfoDao> {
@Select("SELECT a.*, b.depart_name from ft_staff_info a LEFT JOIN ft_depart b on a.depart_id = b.depart_id where staff_type = 1")
List<FtStaffInfoDao> selectStaffInfoWithDepart();
} }

View File

@ -3,6 +3,8 @@ package com.ruoyi.system.fantang.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.system.fantang.domain.FtStaffInfoDao; import com.ruoyi.system.fantang.domain.FtStaffInfoDao;
import java.util.List;
/** /**
* 员工管理Service接口 * 员工管理Service接口
* *
@ -11,4 +13,6 @@ import com.ruoyi.system.fantang.domain.FtStaffInfoDao;
*/ */
public interface IFtStaffInfoDaoService extends IService<FtStaffInfoDao> { public interface IFtStaffInfoDaoService extends IService<FtStaffInfoDao> {
List<FtStaffInfoDao> selectStaffInfoWithDepart();
} }

View File

@ -6,6 +6,8 @@ import com.ruoyi.system.fantang.mapper.FtStaffInfoDaoMapper;
import com.ruoyi.system.fantang.service.IFtStaffInfoDaoService; import com.ruoyi.system.fantang.service.IFtStaffInfoDaoService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.List;
/** /**
* 员工管理Service业务层处理 * 员工管理Service业务层处理
* *
@ -15,4 +17,9 @@ import org.springframework.stereotype.Service;
@Service @Service
public class FtStaffInfoDaoServiceImpl extends ServiceImpl<FtStaffInfoDaoMapper, FtStaffInfoDao> implements IFtStaffInfoDaoService { public class FtStaffInfoDaoServiceImpl extends ServiceImpl<FtStaffInfoDaoMapper, FtStaffInfoDao> implements IFtStaffInfoDaoService {
@Override
public List<FtStaffInfoDao> selectStaffInfoWithDepart() {
return this.baseMapper.selectStaffInfoWithDepart();
}
} }

View File

@ -0,0 +1,13 @@
package com.ruoyi.system.fantang.vo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@NoArgsConstructor
@AllArgsConstructor
public class FtStaffInfoVo {
private String departName;
private Boolean giveOutFlag;
}

View File

@ -9,6 +9,13 @@ export function listStaffInfo(query) {
}) })
} }
export function staffListWithDepart() {
return request({
url: '/fantang/staffInfo/staffListWithDepart',
method: 'get',
})
}
// 查询护工管理列表 // 查询护工管理列表
export function careStaffList(query) { export function careStaffList(query) {
return request({ return request({

View File

@ -84,23 +84,23 @@
<el-table v-loading="loading" :data="foodDemandList" @selection-change="handleSelectionChange" border> <el-table v-loading="loading" :data="foodDemandList" @selection-change="handleSelectionChange" border>
<!-- <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="id" v-if="false"/> <el-table-column label="id" align="center" prop="id" v-if="false"/>
<!-- <el-table-column label="住院号" align="center" prop="hospitalId"/>--> <!-- <el-table-column label="住院号" align="center" prop="hospitalId"/>-->
<el-table-column label="姓名" align="center" prop="name" width="100px"/> <el-table-column label="姓名" align="center" prop="name" width="100px"/>
<!-- <el-table-column label="科室" align="center" prop="departName"/>--> <!-- <el-table-column label="科室" align="center" prop="departName"/>-->
<el-table-column label="床号" align="center" prop="bedId" width="100px"/> <el-table-column label="床号" align="center" prop="bedId" width="100px"/>
<el-table-column label="正餐" align="center" prop="type" :formatter="typeFormat" width="100px"/> <el-table-column label="正餐" align="center" prop="type" :formatter="typeFormat" width="100px"/>
<el-table-column label="正餐清单" align="center" prop="foods" :formatter="formatFoods"/> <el-table-column label="正餐清单" align="center" prop="foods" :formatter="formatFoods"/>
<el-table-column label="加菜" align="center" prop="vegetables" width="80px" :formatter="formatVegetables"/> <el-table-column label="加菜" align="center" prop="vegetables" width="80px" :formatter="formatVegetables"/>
<el-table-column label="加肉" align="center" prop="meat" width="80px" :formatter="formatMeat"/> <el-table-column label="加肉" align="center" prop="meat" width="80px" :formatter="formatMeat"/>
<el-table-column label="加饭" align="center" prop="rice" width="80px" :formatter="formatRice"/> <el-table-column label="加饭" align="center" prop="rice" width="80px" :formatter="formatRice"/>
<el-table-column label="加蛋" align="center" prop="egg" width="80px" :formatter="formatEgg"/> <el-table-column label="加蛋" align="center" prop="egg" width="80px" />
<el-table-column label="营养配餐" align="center" prop="nutritionFood" width="120px"/> <el-table-column label="营养配餐" align="center" prop="nutritionFood" width="120px"/>
<!-- <el-table-column label="更新日期" align="center" prop="updateAt" width="180">--> <!-- <el-table-column label="更新日期" align="center" prop="updateAt" width="180">-->
<!-- <template slot-scope="scope">--> <!-- <template slot-scope="scope">-->
<!-- <span>{{ parseTime(scope.row.updateAt, '{y}-{m}-{d}') }}</span>--> <!-- <span>{{ parseTime(scope.row.updateAt, '{y}-{m}-{d}') }}</span>-->
<!-- </template>--> <!-- </template>-->
<!-- </el-table-column>--> <!-- </el-table-column>-->
<el-table-column label="启用状态" align="center" prop="flag" width="80px"/> <el-table-column label="启用状态" align="center" prop="flag" width="80px"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
@ -126,8 +126,52 @@
<!-- 添加或修改病人报餐对话框 --> <!-- 添加或修改病人报餐对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <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 ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="姓名"> <el-form-item label="姓名" prop="name">
<el-input label="姓名"></el-input> <el-input v-model="form.name" :disabled="true"/>
</el-form-item>
<el-form-item label="床号" prop="bedId">
<el-input v-model="form.bedId" :disabled="true"/>
</el-form-item>
<el-form-item label="正餐" prop="type">
<el-input v-model="form.type" :disabled="true"/>
</el-form-item>
<el-form-item label="正餐清单" prop="foods">
<el-select v-model="form.foods"
multiple style="width: 380px">
<el-option
v-for="item in foodList"
:key="item.foodId"
:label="item.name"
:value="item.foodId">
<span style="float: left; width:40px">{{ item.name }}</span>
<el-divider direction="vertical"></el-divider>
<span style="color: #8492a6; font-size: 13px">{{ item.price }} </span>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="加菜" prop="vegetables">
<el-switch
v-model="form.vegetables"
active-text="是"
inactive-text="否">
</el-switch>
</el-form-item>
<el-form-item label="加肉" prop="meat">
<el-switch
v-model="form.meat"
active-text="是"
inactive-text="否">
</el-switch>
</el-form-item>
<el-form-item label="加饭" prop="rice">
<el-switch
v-model="form.rice"
active-text="是"
inactive-text="否">
</el-switch>
</el-form-item>
<el-form-item label="加蛋" prop="egg">
<el-input-number v-model="form.egg" :min="0" :max="5"/>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
@ -141,13 +185,12 @@
<script> <script>
import { import {
addFoodDemand, addFoodDemand,
delFoodDemand,
exportFoodDemand, exportFoodDemand,
getFoodDemand, getFoodDemand,
listFoodDemand, listFoodDemand,
updateFoodDemand updateFoodDemand
} from "@/api/fantang/foodDemand"; } from "@/api/fantang/foodDemand";
import {listFood} from "../../../api/fantang/food"; import {listFood} from "@/api/fantang/food";
export default { export default {
name: "FoodDemand", name: "FoodDemand",
@ -158,7 +201,7 @@ export default {
value: 1, value: 1,
label: '启用' label: '启用'
}, { }, {
value: 2, value: 0,
label: '禁用' label: '禁用'
}], }],
// //
@ -221,29 +264,38 @@ export default {
formatFoods(row) { formatFoods(row) {
const _this = this; const _this = this;
let arr = row.foods.split(",").map(Number); let arr = row.foods.split(",").map(Number);
let ret = arr.map(item =>{ let ret = arr.map(item => {
let obj = _this.foodList.find((value => { let obj = _this.foodList.find((value => {
return value.foodId === item; return value.foodId === item;
})); }));
return obj.name; return obj.name;
}); });
return ret.toString(); let str = ret.toString();
if (row.vegetables > 0)
str += ",加菜";
if (row.rice > 0)
str += ",加饭"
if (row.meat > 0)
str += ",加肉"
if (row.egg > 0)
str += ",加蛋" + row.egg;
return str;
}, },
formatVegetables(row){ formatVegetables(row) {
if (row.vegetables === null || row.vegetables === 0) if (row.vegetables)
return "否"; return "";
return "是"; return "";
}, },
formatMeat(row) { formatMeat(row) {
if (row.meat === null || row.meat === 0) if (row.meat)
return "否"; return "";
return ""; return "";
}, },
formatRice(row) { formatRice(row) {
if (row.rice === null || row.rice === 0) if (row.rice)
return ""; return "";
return ""; return "";
}, },
formatEgg(row) { formatEgg(row) {
if (row.egg === null || row.egg === 0) if (row.egg === null || row.egg === 0)
@ -256,6 +308,7 @@ export default {
listFoodDemand(this.queryParams).then(response => { listFoodDemand(this.queryParams).then(response => {
this.foodDemandList = response.rows; this.foodDemandList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
}); });
}, },
@ -321,6 +374,8 @@ export default {
const id = row.id || this.ids const id = row.id || this.ids
getFoodDemand(id).then(response => { getFoodDemand(id).then(response => {
this.form = response.data; this.form = response.data;
this.form.foods = this.form.foods.split(",").map(Number);
this.open = true; this.open = true;
this.title = "修改病人报餐"; this.title = "修改病人报餐";
}); });
@ -330,6 +385,7 @@ export default {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
if (this.form.id != null) { if (this.form.id != null) {
this.form.foods = this.form.foods.toString();
updateFoodDemand(this.form).then(response => { updateFoodDemand(this.form).then(response => {
this.msgSuccess("修改成功"); this.msgSuccess("修改成功");
this.open = false; this.open = false;

View File

@ -259,10 +259,9 @@
<script> <script>
import {addSettle, delSettle, exportSettle, getSettle, listSettle, updateSettle} from "@/api/fantang/settle"; import {addSettle, delSettle, exportSettle, getSettle, listSettle, updateSettle} from "@/api/fantang/settle";
import {listAll, listNoPay, listPayoff} from "@/api/fantang/meals"; import {listAll, listNoPay, listPayoff} from "@/api/fantang/meals";
import {getUserProfile} from "../../../api/system/user"; import {getUserProfile} from "@/api/system/user";
import {getPrepaymentByPatientId} from "../../../api/fantang/prepayment"; import {getPrepaymentByPatientId} from "@/api/fantang/prepayment";
import {getLastSettlementDate} from "../../../api/fantang/meals"; import {getLastSettlementDate} from "@/api/fantang/meals";
import { dateFormat } from 'vux'
export default { export default {
name: "Settle", name: "Settle",
@ -410,11 +409,11 @@ export default {
methods: { methods: {
// //
changeBillingDate(value) { changeBillingDate(value) {
var dateSpan, iDays; var dateSpan, iDays;
let sDate1 = Date.parse(this.formAddNewSettlement.lastBillingDate); let sDate1 = Date.parse(this.formAddNewSettlement.lastBillingDate);
let sDate2 = Date.parse(value); let sDate2 = Date.parse(value);
dateSpan = sDate2 - sDate1; dateSpan = sDate2 - sDate1;
if(dateSpan <=0){ if (dateSpan <= 0) {
this.msgError("你现在的结算日期小于上一次结算日期!!"); this.msgError("你现在的结算日期小于上一次结算日期!!");
} else { } else {
dateSpan = Math.abs(dateSpan); dateSpan = Math.abs(dateSpan);
@ -433,7 +432,7 @@ export default {
// //
clickAddNewSettlement(row) { clickAddNewSettlement(row) {
getLastSettlementDate(row.patientId).then(response =>{ getLastSettlementDate(row.patientId).then(response => {
console.log("getLastBillingDateByPatientId-->", response); console.log("getLastBillingDateByPatientId-->", response);
this.formAddNewSettlement.lastBillingDate = response.data.settlementAt; this.formAddNewSettlement.lastBillingDate = response.data.settlementAt;
this.formAddNewSettlement.settlementDays = response.data.days; this.formAddNewSettlement.settlementDays = response.data.days;

View File

@ -1,6 +1,6 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px" v-if="false">
<el-form-item label="补贴类型" prop="type"> <el-form-item label="补贴类型" prop="type">
<el-select v-model="queryParams.type" placeholder="请选择补贴类型" clearable size="small"> <el-select v-model="queryParams.type" placeholder="请选择补贴类型" clearable size="small">
<el-option <el-option
@ -54,7 +54,7 @@
>新增 >新增
</el-button> </el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5" v-if="false">
<el-button <el-button
type="success" type="success"
icon="el-icon-edit" icon="el-icon-edit"
@ -65,7 +65,7 @@
>修改 >修改
</el-button> </el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5" v-if="false">
<el-button <el-button
type="danger" type="danger"
icon="el-icon-delete" icon="el-icon-delete"
@ -76,7 +76,7 @@
>删除 >删除
</el-button> </el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5" v-if="false">
<el-button <el-button
type="warning" type="warning"
icon="el-icon-download" icon="el-icon-download"
@ -86,11 +86,11 @@
>导出 >导出
</el-button> </el-button>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" v-if="false"></right-toolbar>
</el-row> </el-row>
<el-table v-loading="loading" :data="subsidyList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="subsidyList" @selection-change="handleSelectionChange" border>
<el-table-column type="selection" width="55" align="center"/> <el-table-column type="selection" width="55" align="center" v-if="false"/>
<el-table-column label="补贴 id" align="center" prop="subsidyId" v-if="false"/> <el-table-column label="补贴 id" align="center" prop="subsidyId" v-if="false"/>
<el-table-column label="补贴类型" align="center" prop="type" :formatter="typeFormat"/> <el-table-column label="补贴类型" align="center" prop="type" :formatter="typeFormat"/>
<el-table-column label="金额" align="center" prop="price"/> <el-table-column label="金额" align="center" prop="price"/>
@ -102,6 +102,14 @@
<el-table-column label="启用标志" align="center" prop="flag" :formatter="formatFlag"/> <el-table-column label="启用标志" align="center" prop="flag" :formatter="formatFlag"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-money"
@click="clickSubsidyGiveOut(scope.row)"
v-hasPermi="['fantang:subsidy:edit']"
>发放
</el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
@ -130,6 +138,34 @@
@pagination="getList" @pagination="getList"
/> />
<!-- 补贴发放弹出层-->
<el-dialog title="选择发放员工" :visible.sync="showPopupSubsidyGiveOut" width="1000px" align="center">
<el-table :data="staffData">
<el-table-column prop="departName" label="科室" width="200" align="center"
:filters="[{ text: '家', value: '家' }, { text: '公司', value: '公司' }]"
:filter-method="filterDepart">
<template slot-scope="scope">
</template>
</el-table-column>
<el-table-column prop="name" label="姓名" width="150" align="center"></el-table-column>
<el-table-column prop="giveOutFlag" label="是否发放补贴" width="300" align="center">
<template slot-scope="scope">
<el-switch
v-model="scope.row.giveOutFlag"
active-color="#13ce66"
inactive-color="#ff4949"
active-text="是"
inactive-text="否">
</el-switch>
</template>
</el-table-column>
</el-table>
<br>
<el-button type="primary">发放补贴</el-button>
</el-dialog>
<!-- 添加或修改补贴管理对话框 --> <!-- 添加或修改补贴管理对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <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 ref="form" :model="form" :rules="rules" label-width="80px">
@ -166,12 +202,16 @@
<script> <script>
import {addSubsidy, delSubsidy, exportSubsidy, getSubsidy, listSubsidy, updateSubsidy} from "@/api/fantang/subsidy"; import {addSubsidy, delSubsidy, exportSubsidy, getSubsidy, listSubsidy, updateSubsidy} from "@/api/fantang/subsidy";
import {staffListWithDepart} from "@/api/fantang/staffInfo";
export default { export default {
name: "Subsidy", name: "Subsidy",
components: {}, components: {},
data() { data() {
return { return {
staffData: [],
//
showPopupSubsidyGiveOut: false,
// //
loading: true, loading: true,
// //
@ -224,6 +264,15 @@ export default {
}); });
}, },
methods: { methods: {
filterDepart() {
return row.tag === value;
},
//
clickSubsidyGiveOut(row) {
this.showPopupSubsidyGiveOut = true;
},
// //
formatFlag(row) { formatFlag(row) {
if (row.flag) if (row.flag)
@ -240,6 +289,13 @@ export default {
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
}); });
staffListWithDepart().then(response => {
this.staffData = response.data;
for (let i = 0; i < this.staffData.length; i++) {
this.staffData[i].giveOutFlag = true;
}
console.log(this.staffData);
})
}, },
// //
typeFormat(row, column) { typeFormat(row, column) {

View File

@ -78,13 +78,13 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <!-- <pagination-->
v-show="total>0" <!-- v-show="total>0"-->
:total="total" <!-- :total="total"-->
:page.sync="queryParams.pageNum" <!-- :page.sync="queryParams.pageNum"-->
:limit.sync="queryParams.pageSize" <!-- :limit.sync="queryParams.pageSize"-->
@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>
@ -214,7 +214,7 @@
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 9, pageSize: 50,
dinnerType: '', dinnerType: '',
weekday: '', weekday: '',
flag: null flag: null

View File

@ -8,7 +8,7 @@ function resolve(dir) {
const name = defaultSettings.title || '食堂管理系统' // 标题 const name = defaultSettings.title || '食堂管理系统' // 标题
const port = process.env.port || process.env.npm_config_port || 80 // 端口 const port = process.env.port || process.env.npm_config_port || 9001 // 端口
// vue.config.js 配置说明 // vue.config.js 配置说明
//官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions //官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions