费用报销整改
This commit is contained in:
+3
-1
@@ -77,7 +77,9 @@ public class ActivityReimbursementServiceImpl extends BaseServiceImpl<ActivityRe
|
|||||||
ab.isSchoolBudget,
|
ab.isSchoolBudget,
|
||||||
ab.schoolBudgetId,
|
ab.schoolBudgetId,
|
||||||
ab.totalBudgetMoney,
|
ab.totalBudgetMoney,
|
||||||
ab.activityMatter
|
ab.activityMatter,
|
||||||
|
ab.isUnionUse,
|
||||||
|
ab.isClubUse
|
||||||
FROM
|
FROM
|
||||||
activity_budget ab
|
activity_budget ab
|
||||||
LEFT JOIN wf_process_instance ins ON ins.businessNo = ab.id
|
LEFT JOIN wf_process_instance ins ON ins.businessNo = ab.id
|
||||||
|
|||||||
+11
@@ -1,6 +1,7 @@
|
|||||||
package com.budwk.app.zhgh.dayofficework.outlay.activityBudget.conteoller;
|
package com.budwk.app.zhgh.dayofficework.outlay.activityBudget.conteoller;
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import cn.dev33.satoken.annotation.SaMode;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import cn.hutool.json.JSONObject;
|
import cn.hutool.json.JSONObject;
|
||||||
@@ -11,6 +12,7 @@ import com.budwk.app.base.result.Result;
|
|||||||
import com.budwk.app.sys.models.Sys_file;
|
import com.budwk.app.sys.models.Sys_file;
|
||||||
import com.budwk.app.zhgh.dayofficework.outlay.activityBudget.models.ActivityBudget;
|
import com.budwk.app.zhgh.dayofficework.outlay.activityBudget.models.ActivityBudget;
|
||||||
import com.budwk.app.zhgh.dayofficework.outlay.activityBudget.service.ActivityBudgetApplyStatisticsService;
|
import com.budwk.app.zhgh.dayofficework.outlay.activityBudget.service.ActivityBudgetApplyStatisticsService;
|
||||||
|
import com.budwk.app.zhgh.dayofficework.unionReimburse.model.UnionReimburse;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||||
@@ -88,4 +90,13 @@ public class ActivityBudgetAllocationEditController {
|
|||||||
Cnd.where("id", "=", id));
|
Cnd.where("id", "=", id));
|
||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
@SaCheckPermission("activity.budget.allocationEdit")
|
||||||
|
@SLog(tag = "管理员设置预算使用范围")
|
||||||
|
public Result setScope(String id,ActivityBudget budget) {
|
||||||
|
applyStatisticsService.updateIgnoreNull(budget);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+12
@@ -129,6 +129,18 @@ public class ActivityBudget extends BaseModel implements Serializable {
|
|||||||
@ColDefine(type = ColType.BOOLEAN)
|
@ColDefine(type = ColType.BOOLEAN)
|
||||||
private Boolean isRepeatReimburse;
|
private Boolean isRepeatReimburse;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("是否可用于分工会预算")
|
||||||
|
@Default("0")
|
||||||
|
@ColDefine(type = ColType.BOOLEAN)
|
||||||
|
private Boolean isUnionUse;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("是否可用于协会预算")
|
||||||
|
@Default("0")
|
||||||
|
@ColDefine(type = ColType.BOOLEAN)
|
||||||
|
private Boolean isClubUse;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@Comment("校工会预算")
|
@Comment("校工会预算")
|
||||||
@ColDefine(type = ColType.VARCHAR,width = 32)
|
@ColDefine(type = ColType.VARCHAR,width = 32)
|
||||||
|
|||||||
+97
-26
@@ -29,7 +29,8 @@ layout("/layouts/platform.html"){
|
|||||||
<el-form-item prop="activityReimbursementMode" label="报销模式"
|
<el-form-item prop="activityReimbursementMode" label="报销模式"
|
||||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||||
<el-radio-group v-model="formData.activityReimbursementMode"
|
<el-radio-group v-model="formData.activityReimbursementMode"
|
||||||
@change="getActivityReimbursementByUser">
|
@change="getActivityReimbursementByUser"
|
||||||
|
:disabled="isDailyReimbursementFixed">
|
||||||
<el-radio-button label="activity">活动报销</el-radio-button>
|
<el-radio-button label="activity">活动报销</el-radio-button>
|
||||||
<el-radio-button label="daily">日常报销</el-radio-button>
|
<el-radio-button label="daily">日常报销</el-radio-button>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
@@ -93,13 +94,12 @@ layout("/layouts/platform.html"){
|
|||||||
<el-descriptions-item label="扣款预算">
|
<el-descriptions-item label="扣款预算">
|
||||||
<el-form-item prop="deductionBudgetId" label="扣款预算"
|
<el-form-item prop="deductionBudgetId" label="扣款预算"
|
||||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||||
<el-select v-model="formData.deductionBudgetId"
|
<el-select v-model="formData.deductionBudgetId" style="width: 100%;"
|
||||||
style="width: 100%;"
|
|
||||||
filterable placeholder="选择扣款预算">
|
filterable placeholder="选择扣款预算">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in budgetOption"
|
v-for="item in filteredBudgetOption"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="'预算名称:'+item.activityMatter + ',申报预算:' + item.totalBudgetMoney + ',已使用:'+item.usedBudgetMoney"
|
:label="getBudgetLabel(item)"
|
||||||
:value="item.id">
|
:value="item.id">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
@@ -338,7 +338,60 @@ layout("/layouts/platform.html"){
|
|||||||
components: {
|
components: {
|
||||||
"info": INFO,
|
"info": INFO,
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
isDailyReimbursementFixed() {
|
||||||
|
return !this.hasSchoolLevelRole() &&
|
||||||
|
this.formData.outlayManageSource === "ACTIVITY_BUDGET_TYPE_ONE";
|
||||||
|
},
|
||||||
|
|
||||||
|
filteredBudgetOption() {
|
||||||
|
if (this.hasSchoolLevelRole()) {
|
||||||
|
return this.budgetOption;
|
||||||
|
} else if (this.formData.outlayManageSource === "ACTIVITY_BUDGET_TYPE_ONE" &&
|
||||||
|
(this.hasUnionRole() || this.hasClubRole())) {
|
||||||
|
return this.budgetOption.filter(item => {
|
||||||
|
if (this.hasUnionRole() && this.hasClubRole()) {
|
||||||
|
return item.isUnionUse === true || item.isClubUse === true;
|
||||||
|
}
|
||||||
|
else if (this.hasUnionRole()) {
|
||||||
|
return item.isUnionUse === true;
|
||||||
|
}
|
||||||
|
else if (this.hasClubRole()) {
|
||||||
|
return item.isClubUse === true;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return this.budgetOption;
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
hasUnionRole() {
|
||||||
|
return this.$auth.hasRoleOr([
|
||||||
|
"UNION_REIMBURSEMENT_MANAGER",
|
||||||
|
"BRANCH_UNION_CHAIRMAN",
|
||||||
|
"BRANCH_UNION_WENTI_SPORTS",
|
||||||
|
"BRANCH_UNION_ADMIN",
|
||||||
|
"BRANCH_UNION_VICE_CHAIRMAN"
|
||||||
|
]);
|
||||||
|
},
|
||||||
|
|
||||||
|
hasClubRole() {
|
||||||
|
return this.$auth.hasRoleOr([
|
||||||
|
"CLUB_REIMBURSEMENT_MANAGER",
|
||||||
|
"CLUB_PRESIDENT"
|
||||||
|
]);
|
||||||
|
},
|
||||||
|
|
||||||
|
hasSchoolLevelRole() {
|
||||||
|
return this.$auth.hasRoleOr([
|
||||||
|
"SYSADMIN",
|
||||||
|
"SCHOOL_UNION_ADMIN",
|
||||||
|
"SCHOOL_UNION_CHAIRMAN",
|
||||||
|
"SCHOOL_UNION_VICE_CHAIRMAN"
|
||||||
|
]);
|
||||||
|
},
|
||||||
|
|
||||||
clubIdChange() {
|
clubIdChange() {
|
||||||
this.$set(this.formData, 'deductionBudgetId', null)
|
this.$set(this.formData, 'deductionBudgetId', null)
|
||||||
const club = this.clubOption.find(v => v.id === this.formData.clubId)
|
const club = this.clubOption.find(v => v.id === this.formData.clubId)
|
||||||
@@ -352,6 +405,11 @@ layout("/layouts/platform.html"){
|
|||||||
this.$set(this.formData, 'declareId', null)
|
this.$set(this.formData, 'declareId', null)
|
||||||
this.$set(this.formData, 'budgets', [])
|
this.$set(this.formData, 'budgets', [])
|
||||||
this.$set(this.formData, 'activityTime', [])
|
this.$set(this.formData, 'activityTime', [])
|
||||||
|
|
||||||
|
if (val === "ACTIVITY_BUDGET_TYPE_ONE" && !this.hasSchoolLevelRole()) {
|
||||||
|
this.$set(this.formData, 'activityReimbursementMode', 'daily')
|
||||||
|
}
|
||||||
|
|
||||||
if (val === "ACTIVITY_BUDGET_TYPE_ONE") {
|
if (val === "ACTIVITY_BUDGET_TYPE_ONE") {
|
||||||
this.$set(this.formData, "declareUnitName", "校工会")
|
this.$set(this.formData, "declareUnitName", "校工会")
|
||||||
} else if (val === "ACTIVITY_BUDGET_TYPE_TWO") {
|
} else if (val === "ACTIVITY_BUDGET_TYPE_TWO") {
|
||||||
@@ -369,9 +427,20 @@ layout("/layouts/platform.html"){
|
|||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.budgetOption = res.data
|
this.budgetOption = res.data
|
||||||
|
console.log(this.budgetOption)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
getBudgetLabel(item) {
|
||||||
|
if (this.hasSchoolLevelRole()) {
|
||||||
|
return '预算名称:' + item.activityMatter + ',申报预算:' + item.totalBudgetMoney + ',已使用:' + item.usedBudgetMoney
|
||||||
|
} else if (this.formData.outlayManageSource === "ACTIVITY_BUDGET_TYPE_ONE" &&
|
||||||
|
(this.hasUnionRole() || this.hasClubRole())) {
|
||||||
|
return '预算名称:' + item.activityMatter
|
||||||
|
} else {
|
||||||
|
return '预算名称:' + item.activityMatter + ',申报预算:' + item.totalBudgetMoney + ',已使用:' + item.usedBudgetMoney
|
||||||
|
}
|
||||||
|
},
|
||||||
// 保存
|
// 保存
|
||||||
onSave() {
|
onSave() {
|
||||||
this.$confirm("您确定保存吗?", "提示", {
|
this.$confirm("您确定保存吗?", "提示", {
|
||||||
@@ -517,34 +586,36 @@ layout("/layouts/platform.html"){
|
|||||||
this.$businessTool.getDictOptions("ACTIVITY_BUDGET_TYPE").then(resp => {
|
this.$businessTool.getDictOptions("ACTIVITY_BUDGET_TYPE").then(resp => {
|
||||||
this.budgetTypeOption = resp
|
this.budgetTypeOption = resp
|
||||||
const budgetTypeCloseOption = []
|
const budgetTypeCloseOption = []
|
||||||
if (this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])) {
|
const typeOneOption = resp.find(v => v.code === "ACTIVITY_BUDGET_TYPE_ONE")
|
||||||
|
if (typeOneOption) {
|
||||||
|
budgetTypeCloseOption.push(typeOneOption)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN","SCHOOL_UNION_CHAIRMAN","SCHOOL_UNION_VICE_CHAIRMAN"])) {
|
||||||
|
const allCodes = [ "ACTIVITY_BUDGET_TYPE_TWO", "ACTIVITY_BUDGET_TYPE_THREE"]
|
||||||
|
allCodes.forEach(code => {
|
||||||
|
const option = resp.find(v => v.code === code)
|
||||||
|
if (option && !budgetTypeCloseOption.some(existing => existing.code === code)) {
|
||||||
|
budgetTypeCloseOption.push(option)
|
||||||
|
}
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
if (this.$auth.hasRoleOr(["SCHOOL_REIMBURSEMENT_MANAGER"])) {
|
if (this.$auth.hasRoleOr(["UNION_REIMBURSEMENT_MANAGER", "BRANCH_UNION_CHAIRMAN", "BRANCH_UNION_WENTI_SPORTS","BRANCH_UNION_ADMIN","BRANCH_UNION_VICE_CHAIRMAN"])) {
|
||||||
this.budgetTypeOption.map(v => {
|
const typeTwoOption = resp.find(v => v.code === "ACTIVITY_BUDGET_TYPE_TWO")
|
||||||
if (["ACTIVITY_BUDGET_TYPE_ONE"].includes(v.code)) {
|
if (typeTwoOption && !budgetTypeCloseOption.some(existing => existing.code === "ACTIVITY_BUDGET_TYPE_TWO")) {
|
||||||
budgetTypeCloseOption.push(v)
|
budgetTypeCloseOption.push(typeTwoOption)
|
||||||
}
|
}
|
||||||
})
|
|
||||||
}
|
|
||||||
if (this.$auth.hasRoleOr(["UNION_REIMBURSEMENT_MANAGER", "BRANCH_UNION_CHAIRMAN", "BRANCH_UNION_WENTI_SPORTS"])) {
|
|
||||||
this.budgetTypeOption.map(v => {
|
|
||||||
if (["ACTIVITY_BUDGET_TYPE_TWO"].includes(v.code)) {
|
|
||||||
budgetTypeCloseOption.push(v)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
if (this.$auth.hasRoleOr(["CLUB_REIMBURSEMENT_MANAGER", "CLUB_PRESIDENT"])) {
|
if (this.$auth.hasRoleOr(["CLUB_REIMBURSEMENT_MANAGER", "CLUB_PRESIDENT"])) {
|
||||||
this.budgetTypeOption.map(v => {
|
const typeThreeOption = resp.find(v => v.code === "ACTIVITY_BUDGET_TYPE_THREE")
|
||||||
if (["ACTIVITY_BUDGET_TYPE_THREE"].includes(v.code)) {
|
if (typeThreeOption && !budgetTypeCloseOption.some(existing => existing.code === "ACTIVITY_BUDGET_TYPE_THREE")) {
|
||||||
budgetTypeCloseOption.push(v)
|
budgetTypeCloseOption.push(typeThreeOption)
|
||||||
}
|
}
|
||||||
})
|
|
||||||
}
|
}
|
||||||
this.budgetTypeOption = budgetTypeCloseOption
|
|
||||||
}
|
}
|
||||||
})
|
|
||||||
|
|
||||||
|
this.budgetTypeOption = budgetTypeCloseOption
|
||||||
|
})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
async created() {
|
async created() {
|
||||||
|
|||||||
+47
-1
@@ -104,7 +104,7 @@ layout("/layouts/platform.html"){
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" fixed="right" header-align="center" label="操作"
|
<el-table-column align="center" fixed="right" header-align="center" label="操作"
|
||||||
width="200">
|
width="250">
|
||||||
<template slot-scope="{row}">
|
<template slot-scope="{row}">
|
||||||
<el-button @click="openView(row)" size="mini" type="primary">
|
<el-button @click="openView(row)" size="mini" type="primary">
|
||||||
查看
|
查看
|
||||||
@@ -112,6 +112,9 @@ layout("/layouts/platform.html"){
|
|||||||
<el-button @click="openEdit(row)" size="mini" type="primary">
|
<el-button @click="openEdit(row)" size="mini" type="primary">
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button v-if="row.outlayManageSource == 'ACTIVITY_BUDGET_TYPE_ONE'" @click="setScope(row)" size="mini" type="primary">
|
||||||
|
设置范围
|
||||||
|
</el-button>
|
||||||
<!-- <el-button @click="doDelete(row.id)" size="mini" type="danger"
|
<!-- <el-button @click="doDelete(row.id)" size="mini" type="danger"
|
||||||
:disabled="!['superadmin'].includes($store.state.user.loginname)">
|
:disabled="!['superadmin'].includes($store.state.user.loginname)">
|
||||||
删除
|
删除
|
||||||
@@ -152,6 +155,26 @@ layout("/layouts/platform.html"){
|
|||||||
</div>
|
</div>
|
||||||
</activity-budget-info>
|
</activity-budget-info>
|
||||||
</template>
|
</template>
|
||||||
|
<el-dialog title="设置预算使用范围" :visible.sync="scopeDialogVisible" width="400px">
|
||||||
|
<el-form :model="scopeForm" label-width="150px">
|
||||||
|
<el-form-item label="是否用于分工会:">
|
||||||
|
<el-radio-group v-model="scopeForm.isUnionUse">
|
||||||
|
<el-radio :label="true">是</el-radio>
|
||||||
|
<el-radio :label="false">否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="是否用于协会:">
|
||||||
|
<el-radio-group v-model="scopeForm.isClubUse">
|
||||||
|
<el-radio :label="true">是</el-radio>
|
||||||
|
<el-radio :label="false">否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer">
|
||||||
|
<el-button @click="scopeDialogVisible = false">取消</el-button>
|
||||||
|
<el-button type="primary" @click="saveScopeSetting">确定</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
</guava>
|
</guava>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -164,6 +187,8 @@ layout("/layouts/platform.html"){
|
|||||||
dicts: ["ACTIVITY_BUDGET_REIMBURSE_TYPE"],
|
dicts: ["ACTIVITY_BUDGET_REIMBURSE_TYPE"],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
scopeDialogVisible: false,
|
||||||
|
scopeForm: {},
|
||||||
declareTotalBudgetMoney: 0,
|
declareTotalBudgetMoney: 0,
|
||||||
totalBudgetMoney: 0,
|
totalBudgetMoney: 0,
|
||||||
budgetTypeOption: [],
|
budgetTypeOption: [],
|
||||||
@@ -197,6 +222,27 @@ layout("/layouts/platform.html"){
|
|||||||
"activity-budget-info": ACTIVITY_BUDGET_INFO
|
"activity-budget-info": ACTIVITY_BUDGET_INFO
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
setScope(row) {
|
||||||
|
this.scopeForm = {
|
||||||
|
id: row.id,
|
||||||
|
isUnionUse: row.isUnionUse || false,
|
||||||
|
isClubUse: row.isClubUse || false
|
||||||
|
};
|
||||||
|
this.scopeDialogVisible = true;
|
||||||
|
},
|
||||||
|
|
||||||
|
saveScopeSetting() {
|
||||||
|
this.$axios.post(loc() + "/setScope", this.scopeForm)
|
||||||
|
.then(resp => {
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.$message.success('设置成功');
|
||||||
|
this.scopeDialogVisible = false;
|
||||||
|
this.doSearch();
|
||||||
|
} else {
|
||||||
|
this.$message.error(resp.message);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
doSubmit() {
|
doSubmit() {
|
||||||
this.$refs.formRef.validate((valid) => {
|
this.$refs.formRef.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
|||||||
Reference in New Issue
Block a user