修复前端补贴发放标志不能修改错误 并 根据发放标志插入记录,显示在职员工,
This commit is contained in:
parent
742ce42f5e
commit
85747dc9a1
@ -125,20 +125,20 @@ public class FtStaffSubsidyDaoController extends BaseController {
|
|||||||
|
|
||||||
List<FtStaffSubsidyDao> ftStaffSubsidyDaoList = new ArrayList<>();
|
List<FtStaffSubsidyDao> ftStaffSubsidyDaoList = new ArrayList<>();
|
||||||
|
|
||||||
|
|
||||||
for (FtStaffInfoDao staffDatum : staffData) {
|
for (FtStaffInfoDao staffDatum : staffData) {
|
||||||
FtStaffSubsidyDao ftStaffSubsidyDao = new FtStaffSubsidyDao();
|
if (staffDatum.getGiveOutFlag()){
|
||||||
ftStaffSubsidyDao.setStaffId(staffDatum.getStaffId());
|
FtStaffSubsidyDao ftStaffSubsidyDao = new FtStaffSubsidyDao();
|
||||||
ftStaffSubsidyDao.setSubsidyType(subsidy.getType());
|
ftStaffSubsidyDao.setStaffId(staffDatum.getStaffId());
|
||||||
ftStaffSubsidyDao.setIncomeType("1");
|
ftStaffSubsidyDao.setSubsidyType(subsidy.getType());
|
||||||
ftStaffSubsidyDao.setPrice(subsidy.getPrice());
|
ftStaffSubsidyDao.setIncomeType("1");
|
||||||
ftStaffSubsidyDao.setConsumAt(giveOutDate);
|
ftStaffSubsidyDao.setPrice(subsidy.getPrice());
|
||||||
ftStaffSubsidyDaoList.add(ftStaffSubsidyDao);
|
ftStaffSubsidyDao.setConsumAt(giveOutDate);
|
||||||
|
ftStaffSubsidyDaoList.add(ftStaffSubsidyDao);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
iFtStaffSubsidyDaoService.insertBatchStaffSubsidy(ftStaffSubsidyDaoList);
|
iFtStaffSubsidyDaoService.insertBatchStaffSubsidy(ftStaffSubsidyDaoList);
|
||||||
|
|
||||||
return null;
|
return AjaxResult.success("发放成功");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
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.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
@ -133,4 +134,7 @@ public class FtStaffInfoDao {
|
|||||||
private Boolean loginFlag;
|
private Boolean loginFlag;
|
||||||
|
|
||||||
private String expired;
|
private String expired;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Boolean giveOutFlag = true;
|
||||||
}
|
}
|
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
<select id="selectStaffInfoWithDepart" parameterType="FtStaffInfoDao"
|
<select id="selectStaffInfoWithDepart" parameterType="FtStaffInfoDao"
|
||||||
resultType="FtStaffInfoDao">
|
resultType="FtStaffInfoDao">
|
||||||
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
|
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 and a.flag = 1
|
||||||
<if test="departId != null">and b.depart_id = #{departId}</if>
|
<if test="departId != null">and b.depart_id = #{departId}</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
@ -142,35 +142,40 @@
|
|||||||
<!-- 补贴发放弹出层-->
|
<!-- 补贴发放弹出层-->
|
||||||
<el-dialog title="选择发放员工" :visible.sync="showPopupSubsidyGiveOut" width="1000px" align="center">
|
<el-dialog title="选择发放员工" :visible.sync="showPopupSubsidyGiveOut" width="1000px" align="center">
|
||||||
<el-form :model="giveOutQueryParams" ref="giveOutQueryForm" :inline="true" v-show="showSearch" label-width="68px">
|
<el-form :model="giveOutQueryParams" ref="giveOutQueryForm" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
<el-form-item label="科室" prop="departId">
|
<el-row :gutter="10">
|
||||||
<el-select v-model="giveOutQueryParams.departId" placeholder="请选择科室" @change="handleGiveOutQueryChange"
|
<el-col :span="4"></el-col>
|
||||||
clearable>
|
<el-col :span="8">
|
||||||
<el-option
|
<el-form-item label="科室" prop="departId">
|
||||||
v-for="item in departOptions"
|
<el-select v-model="giveOutQueryParams.departId" placeholder="请选择科室" @change="handleGiveOutQueryChange"
|
||||||
:key="item.departName"
|
clearable>
|
||||||
:label="item.departName"
|
<el-option
|
||||||
:value="item.departId">
|
v-for="item in departOptions"
|
||||||
</el-option>
|
:key="item.departName"
|
||||||
</el-select>
|
:label="item.departName"
|
||||||
</el-form-item>
|
:value="item.departId">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<span>发放日期 </span>
|
||||||
|
<!-- <el-date-picker-->
|
||||||
|
<!-- v-model="giveOutDate"-->
|
||||||
|
<!-- value-format="yyyy-MM-dd"-->
|
||||||
|
<!-- type="daterange"-->
|
||||||
|
<!-- range-separator="至"-->
|
||||||
|
<!-- start-placeholder="开始日期"-->
|
||||||
|
<!-- end-placeholder="结束日期">-->
|
||||||
|
<!-- </el-date-picker>-->
|
||||||
|
<el-date-picker
|
||||||
|
v-model="giveOutDate"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
type="date"
|
||||||
|
placeholder="请选择发放日期">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div class="block">
|
|
||||||
<span>发放日期 </span>
|
|
||||||
<!-- <el-date-picker-->
|
|
||||||
<!-- v-model="giveOutDate"-->
|
|
||||||
<!-- value-format="yyyy-MM-dd"-->
|
|
||||||
<!-- type="daterange"-->
|
|
||||||
<!-- range-separator="至"-->
|
|
||||||
<!-- start-placeholder="开始日期"-->
|
|
||||||
<!-- end-placeholder="结束日期">-->
|
|
||||||
<!-- </el-date-picker>-->
|
|
||||||
<el-date-picker
|
|
||||||
v-model="giveOutDate"
|
|
||||||
value-format="yyyy-MM-dd"
|
|
||||||
type="date"
|
|
||||||
placeholder="请选择发放日期">
|
|
||||||
</el-date-picker>
|
|
||||||
</div>
|
|
||||||
<br>
|
<br>
|
||||||
<el-table :data="staffData">
|
<el-table :data="staffData">
|
||||||
<el-table-column prop="departName" label="科室" width="150" align="center"></el-table-column>
|
<el-table-column prop="departName" label="科室" width="150" align="center"></el-table-column>
|
||||||
@ -290,6 +295,8 @@ export default {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.getDicts("ft_subsidy").then(response => {
|
this.getDicts("ft_subsidy").then(response => {
|
||||||
@ -304,6 +311,7 @@ export default {
|
|||||||
|
|
||||||
// 响应发放补贴按钮
|
// 响应发放补贴按钮
|
||||||
clickSubsidyGiveOut(row) {
|
clickSubsidyGiveOut(row) {
|
||||||
|
this.getAllStaffList();
|
||||||
this.showPopupSubsidyGiveOut = true;
|
this.showPopupSubsidyGiveOut = true;
|
||||||
const subsidyId = row.subsidyId
|
const subsidyId = row.subsidyId
|
||||||
getSubsidy(subsidyId).then(response => {
|
getSubsidy(subsidyId).then(response => {
|
||||||
@ -326,16 +334,20 @@ export default {
|
|||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
getAllStaffList() {
|
||||||
staffListWithDepart().then(response => {
|
staffListWithDepart().then(response => {
|
||||||
this.staffData = response.data;
|
this.staffData = response.data;
|
||||||
for (let i = 0; i < this.staffData.length; i++) {
|
// for (let i = 0; i < this.staffData.length; i++) {
|
||||||
this.staffData[i].giveOutFlag = true;
|
// this.staffData[i].giveOutFlag = true;
|
||||||
}
|
// }
|
||||||
console.log(this.staffData);
|
console.log('staffData-->', this.staffData);
|
||||||
})
|
})
|
||||||
listDepart().then(response => {
|
listDepart().then(response => {
|
||||||
this.departOptions = response.rows;
|
this.departOptions = response.rows;
|
||||||
})
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
// 补贴类型字典翻译
|
// 补贴类型字典翻译
|
||||||
typeFormat(row, column) {
|
typeFormat(row, column) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user