劳务费

master
hhb 2023-11-07 01:32:54 +08:00
parent ef3ea72c22
commit 5a6d28fd88
3 changed files with 11 additions and 5 deletions

View File

@ -34,7 +34,7 @@ public class ServiceFeeDto implements Serializable {
private Long serviceFeeId; private Long serviceFeeId;
/** 劳务人 */ /** 劳务人 */
private User user; private UserDto user;
/** 应发金额 */ /** 应发金额 */
private BigDecimal payableFee; private BigDecimal payableFee;
@ -49,7 +49,7 @@ public class ServiceFeeDto implements Serializable {
private String feeSource; private String feeSource;
/** 审批人 */ /** 审批人 */
private User approveUser; private UserDto approveUser;
/** 劳务时间 */ /** 劳务时间 */
private Timestamp serviceTime; private Timestamp serviceTime;

View File

@ -72,12 +72,18 @@ public class ServiceFeeServiceImpl implements ServiceFeeService {
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void create(ServiceFee resources) { public void create(ServiceFee resources) {
if (resources.getApproveUser().getId() == null){
resources.setApproveUser(null);
}
serviceFeeRepository.save(resources); serviceFeeRepository.save(resources);
} }
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void update(ServiceFee resources) { public void update(ServiceFee resources) {
if (resources.getApproveUser().getId() == null){
resources.setApproveUser(null);
}
ServiceFee serviceFee = serviceFeeRepository.findById(resources.getServiceFeeId()).orElseGet(ServiceFee::new); ServiceFee serviceFee = serviceFeeRepository.findById(resources.getServiceFeeId()).orElseGet(ServiceFee::new);
ValidationUtil.isNull( serviceFee.getServiceFeeId(),"ServiceFee","id",resources.getServiceFeeId()); ValidationUtil.isNull( serviceFee.getServiceFeeId(),"ServiceFee","id",resources.getServiceFeeId());
serviceFee.copy(resources); serviceFee.copy(resources);

View File

@ -65,7 +65,7 @@
<!--表格渲染--> <!--表格渲染-->
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="small" style="width: 100%;" @selection-change="crud.selectionChangeHandler"> <el-table ref="table" v-loading="crud.loading" :data="crud.data" size="small" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
<el-table-column type="selection" width="55" /> <el-table-column type="selection" width="55" />
<el-table-column prop="userId" label="劳务人" /> <el-table-column prop="user.nickName" label="劳务人" />
<el-table-column prop="payableFee" label="应发金额" /> <el-table-column prop="payableFee" label="应发金额" />
<el-table-column prop="tax" label="个人所得税" /> <el-table-column prop="tax" label="个人所得税" />
<el-table-column prop="paidFee" label="实发金额" /> <el-table-column prop="paidFee" label="实发金额" />
@ -74,9 +74,9 @@
{{ dict.label.fee_source[scope.row.feeSource] }} {{ dict.label.fee_source[scope.row.feeSource] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="approveUserId" label="审批人" /> <!-- <el-table-column prop="approveUserId" label="审批人" />-->
<el-table-column prop="serviceTime" label="劳务时间" /> <el-table-column prop="serviceTime" label="劳务时间" />
<el-table-column prop="applyTime" label="申请时间" /> <!-- <el-table-column prop="applyTime" label="申请时间" />-->
<el-table-column prop="remark" label="备注" /> <el-table-column prop="remark" label="备注" />
<el-table-column v-if="checkPer(['admin','serviceFee:edit','serviceFee:del'])" label="操作" width="150px" align="center"> <el-table-column v-if="checkPer(['admin','serviceFee:edit','serviceFee:del'])" label="操作" width="150px" align="center">
<template slot-scope="scope"> <template slot-scope="scope">