Merge branch 'main' of https://dd3skj.picp.vip/JyuHsin/zhgh_jshvc
This commit is contained in:
+3
@@ -189,6 +189,9 @@ public class ActivityDeclareMineController {
|
|||||||
sql.setCallback(Sqls.callback.map());
|
sql.setCallback(Sqls.callback.map());
|
||||||
dao.execute(sql);
|
dao.execute(sql);
|
||||||
NutMap info = (NutMap) sql.getResult();
|
NutMap info = (NutMap) sql.getResult();
|
||||||
|
if (Lang.isEmpty(info)) {
|
||||||
|
throw new RuntimeException("暂时无法导出!");
|
||||||
|
}
|
||||||
|
|
||||||
String activityContent = info.getString("activityContent");
|
String activityContent = info.getString("activityContent");
|
||||||
info.put("activityContent", sysOfficeTemplateUtil.convertRichTextToDocText(activityContent));
|
info.put("activityContent", sysOfficeTemplateUtil.convertRichTextToDocText(activityContent));
|
||||||
|
|||||||
+1
@@ -144,6 +144,7 @@ public class ActivityReimbursementApplyController {
|
|||||||
args.set(FlowConst.FORM_DATA, activityReimbursementInfo);
|
args.set(FlowConst.FORM_DATA, activityReimbursementInfo);
|
||||||
args.set("outlayManageSource", activityReimbursementInfo.getOutlayManageSource());
|
args.set("outlayManageSource", activityReimbursementInfo.getOutlayManageSource());
|
||||||
args.set("actualMoney", activityReimbursementInfo.getActualMoney());
|
args.set("actualMoney", activityReimbursementInfo.getActualMoney());
|
||||||
|
args.set("next", activityReimbursementInfo.getReimbursementIdentity());
|
||||||
ProcessInstance instance = flowEngine.startProcessInstanceByKey("HDBX", activityReimbursementInfo.getId(), SecurityUtil.getUserId(), args);
|
ProcessInstance instance = flowEngine.startProcessInstanceByKey("HDBX", activityReimbursementInfo.getId(), SecurityUtil.getUserId(), args);
|
||||||
|
|
||||||
// 自动完成第一个申请任务
|
// 自动完成第一个申请任务
|
||||||
|
|||||||
+24
-7
@@ -35,9 +35,11 @@ import org.nutz.dao.Cnd;
|
|||||||
import org.nutz.dao.Dao;
|
import org.nutz.dao.Dao;
|
||||||
import org.nutz.dao.Sqls;
|
import org.nutz.dao.Sqls;
|
||||||
import org.nutz.dao.sql.Sql;
|
import org.nutz.dao.sql.Sql;
|
||||||
|
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||||
import org.nutz.ioc.aop.Aop;
|
import org.nutz.ioc.aop.Aop;
|
||||||
import org.nutz.ioc.loader.annotation.Inject;
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
import org.nutz.lang.Lang;
|
||||||
import org.nutz.lang.util.NutMap;
|
import org.nutz.lang.util.NutMap;
|
||||||
import org.nutz.mvc.annotation.At;
|
import org.nutz.mvc.annotation.At;
|
||||||
import org.nutz.mvc.annotation.Ok;
|
import org.nutz.mvc.annotation.Ok;
|
||||||
@@ -126,14 +128,29 @@ public class ActivityReimbursementMineController {
|
|||||||
$condition
|
$condition
|
||||||
""");
|
""");
|
||||||
Cnd cnd = Cnd.NEW();
|
Cnd cnd = Cnd.NEW();
|
||||||
pageParam.buildSearch(cnd, "info.");
|
SqlExpressionGroup group = new SqlExpressionGroup();
|
||||||
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_MEMBER_ADMIN.name())) {
|
if (AuthUtil.hasPermission("activityReimbursement.apply.schoolHas")){
|
||||||
if (AuthUtil.hasRole(RoleConstant.BRANCH_UNION_CHAIRMAN.name())) {
|
group.or("info.reimbursementIdentity","=","school");
|
||||||
cnd.and("info.unionId", "=", SecurityUtil.getUnionId());
|
|
||||||
} else {
|
|
||||||
cnd.and("info.userId", "=", SecurityUtil.getUserId());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
if (AuthUtil.hasPermission("activityReimbursement.apply.unionHas")){
|
||||||
|
SqlExpressionGroup unionGroup = new SqlExpressionGroup();
|
||||||
|
unionGroup.and("info.unionId", "=", SecurityUtil.getUnionId());
|
||||||
|
unionGroup.and("info.reimbursementIdentity","=","union");
|
||||||
|
group.or(unionGroup);
|
||||||
|
}
|
||||||
|
if (AuthUtil.hasPermission("activityReimbursement.apply.clubHas")){
|
||||||
|
SqlExpressionGroup clubGroup = new SqlExpressionGroup();
|
||||||
|
clubGroup.and("info.clubId", "in", SecurityUtil.getClubIds());
|
||||||
|
clubGroup.and("info.reimbursementIdentity","=","club");
|
||||||
|
group.or(clubGroup);
|
||||||
|
}
|
||||||
|
if (Lang.isNotEmpty(group)){
|
||||||
|
cnd.and(group);
|
||||||
|
}else{
|
||||||
|
cnd.and("info.userId", "=", SecurityUtil.getUserId());
|
||||||
|
}
|
||||||
|
|
||||||
|
cnd.andEX("info.clubId", "=", pageParam.getClubId());
|
||||||
cnd.andEX("YEAR(info.applyTime)", "=", pageParam.getYear());
|
cnd.andEX("YEAR(info.applyTime)", "=", pageParam.getYear());
|
||||||
if (StrUtil.isAllBlank(pageParam.getPageOrderName(), pageParam.getPageOrderBy())) {
|
if (StrUtil.isAllBlank(pageParam.getPageOrderName(), pageParam.getPageOrderBy())) {
|
||||||
cnd.desc("info.applyTime");
|
cnd.desc("info.applyTime");
|
||||||
|
|||||||
+5
@@ -36,6 +36,11 @@ public class ActivityReimbursementInfo extends ActivityDeclareInfo {
|
|||||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
private String declareId;
|
private String declareId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("报销身份(school/union/club)")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 30)
|
||||||
|
private String reimbursementIdentity;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@Comment("报销模式")
|
@Comment("报销模式")
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 30)
|
@ColDefine(type = ColType.VARCHAR, width = 30)
|
||||||
|
|||||||
+73
-34
@@ -13,8 +13,18 @@ layout("/layouts/platform.html"){
|
|||||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=":"
|
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=":"
|
||||||
class="flow-task-form">
|
class="flow-task-form">
|
||||||
<el-descriptions :column="2" border>
|
<el-descriptions :column="2" border>
|
||||||
|
<el-descriptions-item label="报销身份" :span="2">
|
||||||
<el-descriptions-item label="经费类型">
|
<el-form-item label="报销身份" prop="reimbursementIdentity"
|
||||||
|
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||||
|
<el-radio-group v-model="formData.reimbursementIdentity"
|
||||||
|
@change="reimbursementIdentityChange" :disabled="taskId">
|
||||||
|
<el-radio border :label="i.code" :key="i.code" v-for="i in reimbursementIdentityOption">
|
||||||
|
{{i.name}}
|
||||||
|
</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="经费类型" :span="2">
|
||||||
<el-form-item label="经费类型" prop="outlayManageSource"
|
<el-form-item label="经费类型" prop="outlayManageSource"
|
||||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||||
<el-radio-group v-model="formData.outlayManageSource" @change="outlayManageSourceChange">
|
<el-radio-group v-model="formData.outlayManageSource" @change="outlayManageSourceChange">
|
||||||
@@ -37,7 +47,8 @@ layout("/layouts/platform.html"){
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="所属协会"
|
<el-descriptions-item label="所属协会"
|
||||||
v-if="['ACTIVITY_BUDGET_TYPE_THREE'].includes(formData.outlayManageSource)">
|
v-if="['ACTIVITY_BUDGET_TYPE_THREE'].includes(formData.outlayManageSource)
|
||||||
|
||formData.reimbursementIdentity==='club'">
|
||||||
<el-form-item label="所属协会" prop="clubId"
|
<el-form-item label="所属协会" prop="clubId"
|
||||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||||
<el-select
|
<el-select
|
||||||
@@ -94,7 +105,7 @@ 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" style="width: 100%;"
|
<el-select v-model="formData.deductionBudgetId" style="width: 100%;"
|
||||||
filterable placeholder="选择扣款预算">
|
filterable placeholder="选择扣款预算">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in filteredBudgetOption"
|
v-for="item in filteredBudgetOption"
|
||||||
@@ -105,11 +116,11 @@ layout("/layouts/platform.html"){
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item
|
|
||||||
v-if="formData.activityReimbursementMode!=='activity'
|
|
||||||
&&
|
|
||||||
['ACTIVITY_BUDGET_TYPE_THREE'].includes(formData.outlayManageSource)"></el-descriptions-item>
|
|
||||||
|
|
||||||
|
<el-descriptions-item v-if="formData.activityReimbursementMode!=='activity'
|
||||||
|
&&
|
||||||
|
!['ACTIVITY_BUDGET_TYPE_THREE'].includes(formData.outlayManageSource)
|
||||||
|
&&formData.reimbursementIdentity!=='club'"></el-descriptions-item>
|
||||||
|
|
||||||
<template v-if="formData.activityReimbursementMode==='activity'">
|
<template v-if="formData.activityReimbursementMode==='activity'">
|
||||||
<el-descriptions-item label="实际活动时间">
|
<el-descriptions-item label="实际活动时间">
|
||||||
@@ -143,10 +154,6 @@ layout("/layouts/platform.html"){
|
|||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item
|
|
||||||
v-if="formData.activityReimbursementMode==='activity'
|
|
||||||
&&
|
|
||||||
['ACTIVITY_BUDGET_TYPE_THREE'].includes(formData.outlayManageSource)"></el-descriptions-item>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<el-descriptions-item label="费用" :span="2">
|
<el-descriptions-item label="费用" :span="2">
|
||||||
@@ -327,6 +334,7 @@ layout("/layouts/platform.html"){
|
|||||||
},
|
},
|
||||||
|
|
||||||
activityOptions: [],
|
activityOptions: [],
|
||||||
|
reimbursementIdentityOption: [],
|
||||||
|
|
||||||
declareDialogVisible: false,
|
declareDialogVisible: false,
|
||||||
|
|
||||||
@@ -347,20 +355,21 @@ layout("/layouts/platform.html"){
|
|||||||
filteredBudgetOption() {
|
filteredBudgetOption() {
|
||||||
if (this.hasSchoolLevelRole()) {
|
if (this.hasSchoolLevelRole()) {
|
||||||
return this.budgetOption;
|
return this.budgetOption;
|
||||||
} else if (this.formData.outlayManageSource === "ACTIVITY_BUDGET_TYPE_ONE" &&
|
} else if (this.formData.outlayManageSource === "ACTIVITY_BUDGET_TYPE_ONE") {
|
||||||
(this.hasUnionRole() || this.hasClubRole())) {
|
if (this.hasUnionRole() || this.hasClubRole()) {
|
||||||
return this.budgetOption.filter(item => {
|
return this.budgetOption.filter(item => {
|
||||||
if (this.hasUnionRole() && this.hasClubRole()) {
|
if (this.hasUnionRole() && this.hasClubRole()) {
|
||||||
return item.isUnionUse === true || item.isClubUse === true;
|
return item.isUnionUse === true || item.isClubUse === true;
|
||||||
}
|
} else if (this.hasUnionRole()) {
|
||||||
else if (this.hasUnionRole()) {
|
return item.isUnionUse === true;
|
||||||
return item.isUnionUse === true;
|
} else if (this.hasClubRole()) {
|
||||||
}
|
return item.isClubUse === true;
|
||||||
else if (this.hasClubRole()) {
|
}
|
||||||
return item.isClubUse === true;
|
return true;
|
||||||
}
|
});
|
||||||
return true;
|
}
|
||||||
});
|
}else{
|
||||||
|
return this.budgetOption;
|
||||||
}
|
}
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
@@ -385,6 +394,14 @@ layout("/layouts/platform.html"){
|
|||||||
this.getBudgetByYear()
|
this.getBudgetByYear()
|
||||||
this.getActivityReimbursementByUser()
|
this.getActivityReimbursementByUser()
|
||||||
},
|
},
|
||||||
|
reimbursementIdentityChange(val) {
|
||||||
|
this.$set(this.formData, "unionId", this.$store.state.user.union.id)
|
||||||
|
if (val === "school") {
|
||||||
|
this.$set(this.formData, "declareUnitName", "校工会")
|
||||||
|
} else if (val === "union") {
|
||||||
|
this.$set(this.formData, "declareUnitName", this.$store.state.user.union.name)
|
||||||
|
}
|
||||||
|
},
|
||||||
outlayManageSourceChange(val) {
|
outlayManageSourceChange(val) {
|
||||||
this.$set(this.formData, 'clubId', null)
|
this.$set(this.formData, 'clubId', null)
|
||||||
this.$set(this.formData, 'deductionBudgetId', null)
|
this.$set(this.formData, 'deductionBudgetId', null)
|
||||||
@@ -395,13 +412,6 @@ layout("/layouts/platform.html"){
|
|||||||
if (val === "ACTIVITY_BUDGET_TYPE_ONE" && !this.hasSchoolLevelRole()) {
|
if (val === "ACTIVITY_BUDGET_TYPE_ONE" && !this.hasSchoolLevelRole()) {
|
||||||
this.$set(this.formData, 'activityReimbursementMode', 'daily')
|
this.$set(this.formData, 'activityReimbursementMode', 'daily')
|
||||||
}
|
}
|
||||||
|
|
||||||
if (val === "ACTIVITY_BUDGET_TYPE_ONE") {
|
|
||||||
this.$set(this.formData, "declareUnitName", "校工会")
|
|
||||||
} else if (val === "ACTIVITY_BUDGET_TYPE_TWO") {
|
|
||||||
this.$set(this.formData, "unionId", this.$store.state.user.union.id)
|
|
||||||
this.$set(this.formData, "declareUnitName", this.$store.state.user.union.name)
|
|
||||||
}
|
|
||||||
this.getBudgetByYear()
|
this.getBudgetByYear()
|
||||||
this.getActivityReimbursementByUser()
|
this.getActivityReimbursementByUser()
|
||||||
},
|
},
|
||||||
@@ -429,6 +439,14 @@ layout("/layouts/platform.html"){
|
|||||||
},
|
},
|
||||||
// 保存
|
// 保存
|
||||||
onSave() {
|
onSave() {
|
||||||
|
if (this.formData.reimbursementIdentity === 'union' && this.formData.outlayManageSource === "ACTIVITY_BUDGET_TYPE_THREE") {
|
||||||
|
this.$message.error("报销身份如果是分工会,不能报销协会经费!")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (this.formData.reimbursementIdentity === 'club' && this.formData.outlayManageSource === "ACTIVITY_BUDGET_TYPE_TWO") {
|
||||||
|
this.$message.error("报销身份如果是协会,不能报销分工会经费!")
|
||||||
|
return
|
||||||
|
}
|
||||||
this.$confirm("您确定保存吗?", "提示", {
|
this.$confirm("您确定保存吗?", "提示", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
@@ -455,6 +473,15 @@ layout("/layouts/platform.html"){
|
|||||||
this.$message.error("请填写费用!")
|
this.$message.error("请填写费用!")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if (this.formData.reimbursementIdentity === 'union' && this.formData.outlayManageSource === "ACTIVITY_BUDGET_TYPE_THREE") {
|
||||||
|
this.$message.error("报销身份如果是分工会,不能报销协会经费!")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (this.formData.reimbursementIdentity === 'club' && this.formData.outlayManageSource === "ACTIVITY_BUDGET_TYPE_TWO") {
|
||||||
|
this.$message.error("报销身份如果是协会,不能报销分工会经费!")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
this.$confirm("您确定要提交吗?", "提示", {
|
this.$confirm("您确定要提交吗?", "提示", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
@@ -578,7 +605,7 @@ layout("/layouts/platform.html"){
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (this.$auth.hasPermission('activityReimbursement.apply.schoolHas')) {
|
if (this.$auth.hasPermission('activityReimbursement.apply.schoolHas')) {
|
||||||
const allCodes = [ "ACTIVITY_BUDGET_TYPE_TWO", "ACTIVITY_BUDGET_TYPE_THREE"]
|
const allCodes = ["ACTIVITY_BUDGET_TYPE_TWO", "ACTIVITY_BUDGET_TYPE_THREE"]
|
||||||
allCodes.forEach(code => {
|
allCodes.forEach(code => {
|
||||||
const option = resp.find(v => v.code === code)
|
const option = resp.find(v => v.code === code)
|
||||||
if (option && !budgetTypeCloseOption.some(existing => existing.code === code)) {
|
if (option && !budgetTypeCloseOption.some(existing => existing.code === code)) {
|
||||||
@@ -603,10 +630,22 @@ layout("/layouts/platform.html"){
|
|||||||
this.budgetTypeOption = budgetTypeCloseOption
|
this.budgetTypeOption = budgetTypeCloseOption
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
initReimbursementIdentity() {
|
||||||
|
if (this.$auth.hasPermission('activityReimbursement.apply.schoolHas')) {
|
||||||
|
this.reimbursementIdentityOption.push({name: "校工会", code: "school"})
|
||||||
|
}
|
||||||
|
if (this.$auth.hasPermission('activityReimbursement.apply.unionHas')) {
|
||||||
|
this.reimbursementIdentityOption.push({name: "分工会", code: "union"})
|
||||||
|
}
|
||||||
|
if (this.$auth.hasPermission('activityReimbursement.apply.clubHas')) {
|
||||||
|
this.reimbursementIdentityOption.push({name: "协会", code: "club"})
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
async created() {
|
async created() {
|
||||||
this.clubOption = await this.$businessTool.listCLubByRole()
|
this.clubOption = await this.$businessTool.listCLubByRole()
|
||||||
this.initBudgetType()
|
this.initBudgetType()
|
||||||
|
this.initReimbursementIdentity()
|
||||||
if (this.bizId) {
|
if (this.bizId) {
|
||||||
this.findOne()
|
this.findOne()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user