commit
This commit is contained in:
+337
-295
@@ -2,325 +2,367 @@
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.el-descriptions-item__label.is-bordered-label {
|
||||
width: 15% !important;
|
||||
}
|
||||
.el-descriptions-item__label.is-bordered-label {
|
||||
width: 15% !important;
|
||||
}
|
||||
|
||||
.el-descriptions-item__label {
|
||||
width: 15% !important;
|
||||
}
|
||||
.el-descriptions-item__label {
|
||||
width: 15% !important;
|
||||
}
|
||||
</style>
|
||||
<div id="app">
|
||||
<el-card shadow="never">
|
||||
<snaker-start slot="header" label="活动申报" define_key="HDSB"></snaker-start>
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=":" class="flow-task-form">
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="活动名称">
|
||||
<el-form-item prop="activityName">
|
||||
<el-input placeholder="请输入活动名称" style="width: 100%" v-model="formData.activityName">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="活动类型">
|
||||
<el-form-item prop="activityType">
|
||||
<el-select @change="activityTypeChange" placeholder="请选择活动类型"
|
||||
style="width: 100%" v-model="formData.activityType">
|
||||
<el-option
|
||||
:key="item.name"
|
||||
:label="item.typeName"
|
||||
:value="item.name"
|
||||
v-for="item in activityDeclareReimbursementList">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-card shadow="never">
|
||||
<snaker-start slot="header" label="活动申报" define_key="HDSB"></snaker-start>
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=":"
|
||||
class="flow-task-form">
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="活动名称">
|
||||
<el-form-item prop="activityName">
|
||||
<el-input placeholder="请输入活动名称" style="width: 100%" v-model="formData.activityName">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="活动类型">
|
||||
<el-form-item prop="activityType">
|
||||
<el-select @change="activityTypeChange" placeholder="请选择活动类型"
|
||||
style="width: 100%" v-model="formData.activityType">
|
||||
<el-option
|
||||
:key="item.name"
|
||||
:label="item.typeName"
|
||||
:value="item.name"
|
||||
v-for="item in activityDeclareReimbursementList">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="申请人姓名">
|
||||
<el-form-item prop="userName">
|
||||
<el-input disabled type="text" v-model="formData.userName"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="申请人姓名">
|
||||
<el-form-item prop="userName">
|
||||
<el-input disabled type="text" v-model="formData.userName"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<template v-if="formData.activityType == 'CLUB'">
|
||||
<el-descriptions-item label="申请协会">
|
||||
<el-form-item prop="clubId" label="申请协会">
|
||||
<el-select v-model="formData.clubId" placeholder="请选择协会"
|
||||
@change="setDeclareUnitName" style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in clubList"
|
||||
:key="item.id"
|
||||
:label="item.clubName"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-descriptions-item label="申请单位">
|
||||
<el-form-item prop="declareUnitName">
|
||||
<el-input readonly v-model="formData.declareUnitName" type="text" placeholder="请选择项目类型,自动填充"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
</template>
|
||||
<template v-if="formData.activityType == 'CLUB'">
|
||||
<el-descriptions-item label="申请协会">
|
||||
<el-form-item prop="clubId" label="申请协会">
|
||||
<el-select v-model="formData.clubId" placeholder="请选择协会"
|
||||
@change="setDeclareUnitName" style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in clubList"
|
||||
:key="item.id"
|
||||
:label="item.clubName"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-descriptions-item label="申请单位">
|
||||
<el-form-item prop="declareUnitName">
|
||||
<el-input readonly v-model="formData.declareUnitName" type="text"
|
||||
placeholder="请选择活动类型,自动填充"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
</template>
|
||||
|
||||
<el-descriptions-item label="联系方式">
|
||||
<el-form-item prop="mobile">
|
||||
<el-input type="text" v-model="formData.mobile" placeholder="请输入联系方式" maxlength="11"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="申请时间">
|
||||
<el-form-item prop="applyTime">
|
||||
<el-input disabled type="text" v-model="formData.applyTime"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="联系方式">
|
||||
<el-form-item prop="mobile">
|
||||
<el-input type="text" v-model="formData.mobile" placeholder="请输入联系方式"
|
||||
maxlength="11"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="申请时间">
|
||||
<el-form-item prop="applyTime">
|
||||
<el-input disabled type="text" v-model="formData.applyTime"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
<el-descriptions-item label="活动计划时间">
|
||||
<el-form-item prop="planDate">
|
||||
<el-date-picker
|
||||
start-placeholder="开始日期"
|
||||
range-separator="-"
|
||||
end-placeholder="结束日期"
|
||||
style="width: 100%"
|
||||
type="daterange"
|
||||
v-model="formData.planDate"
|
||||
value-format="yyyy-MM-dd">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="活动人数">
|
||||
<el-form-item prop="activityNumber">
|
||||
<el-input-number v-model="formData.activityNumber" placeholder="请输入活动人数"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="活动计划时间">
|
||||
<el-form-item prop="planDate">
|
||||
<el-date-picker
|
||||
start-placeholder="开始日期"
|
||||
range-separator="-"
|
||||
end-placeholder="结束日期"
|
||||
style="width: 100%"
|
||||
type="daterange"
|
||||
v-model="formData.planDate"
|
||||
value-format="yyyy-MM-dd">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="活动人数">
|
||||
<el-form-item prop="activityNumber">
|
||||
<el-input-number v-model="formData.activityNumber"
|
||||
placeholder="请输入活动人数"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="活动地址" :span="2">
|
||||
<el-form-item prop="activityAddress">
|
||||
<el-input maxlength="150" placeholder="请填写活动地址" type="text"
|
||||
v-model="formData.activityAddress"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="活动地址">
|
||||
<el-form-item prop="activityAddress">
|
||||
<el-input maxlength="150" placeholder="请填写活动地址" type="text"
|
||||
v-model="formData.activityAddress"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="扣款预算">
|
||||
<el-form-item prop="deductionBudgetId">
|
||||
<el-select v-model="formData.deductionBudgetId"
|
||||
style="width: 100%;"
|
||||
filterable placeholder="选择扣款预算">
|
||||
<el-option
|
||||
v-for="item in budgetOption"
|
||||
:key="item.id"
|
||||
:label="'预算名称:'+item.activityMatter + ',申报预算:' + item.totalBudgetMoney"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="活动预算费用" :span="2">
|
||||
<el-form-item prop="budgets">
|
||||
<el-table :data="formData.budgets" border max-height="500" size="mini" style="width: 95%">
|
||||
<el-table-column label="序号" sortable type="index" width="100"></el-table-column>
|
||||
<el-table-column label="费用项目名称" prop="name">
|
||||
<template scope="{row,$index}">
|
||||
<el-form-item label-width="0"
|
||||
:prop="'budgets.'+$index+'.name'"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<el-input v-model="row.name" maxlength="50"
|
||||
placeholder="请输入费用项目名称"></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="预算费用" prop="budgetPrice">
|
||||
<template scope="{row,$index}">
|
||||
<el-form-item label-width="0"
|
||||
:prop="'budgets.'+$index+'.budgetPrice'"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<el-input-number placeholder="预算费用" v-model="row.budgetPrice" :precision="2"
|
||||
style="width: 100%" :min="1"></el-input-number>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="操作" width="150px">
|
||||
<template slot="header" slot-scope="scope">
|
||||
<el-button @click="formData.budgets.push({})" icon="el-icon-plus" type="primary"
|
||||
size="mini">添加
|
||||
</el-button>
|
||||
</template>
|
||||
<template slot-scope="scope">
|
||||
<el-button :disabled="formData.budgets.length==1"
|
||||
@click="formData.budgets.splice(scope.$index,1)"
|
||||
size="mini"
|
||||
icon="el-icon-delete"
|
||||
type="danger"></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="活动预算费用" :span="2">
|
||||
<el-form-item prop="budgets">
|
||||
<el-table :data="formData.budgets" border max-height="500" size="mini" style="width: 95%" show-summary>
|
||||
<el-table-column label="序号" sortable type="index" width="100"></el-table-column>
|
||||
<el-table-column label="费用项目名称" prop="name">
|
||||
<template scope="{row,$index}">
|
||||
<el-form-item label-width="0"
|
||||
:prop="'budgets.'+$index+'.name'"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<el-input v-model="row.name" maxlength="50"
|
||||
placeholder="请输入费用项目名称"></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="预算费用(元)" prop="budgetPrice">
|
||||
<template scope="{row,$index}">
|
||||
<el-form-item label-width="0"
|
||||
:prop="'budgets.'+$index+'.budgetPrice'"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<el-input-number placeholder="预算费用" v-model="row.budgetPrice" :precision="2"
|
||||
style="width: 100%" :min="1"></el-input-number>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="操作" width="150px">
|
||||
<template slot="header" slot-scope="scope">
|
||||
<el-button @click="formData.budgets.push({})" icon="el-icon-plus" type="primary"
|
||||
size="mini">添加
|
||||
</el-button>
|
||||
</template>
|
||||
<template slot-scope="scope">
|
||||
<el-button :disabled="formData.budgets.length==1"
|
||||
@click="formData.budgets.splice(scope.$index,1)"
|
||||
size="mini"
|
||||
icon="el-icon-delete"
|
||||
type="danger"></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="活动方案及简介" :span="2">
|
||||
<el-form-item prop="activityContent">
|
||||
<text-editor v-model="formData.activityContent"></text-editor>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="活动方案及简介" :span="2">
|
||||
<el-form-item prop="activityContent">
|
||||
<text-editor v-model="formData.activityContent"></text-editor>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="附件" :span="2">
|
||||
<el-form-item prop="files">
|
||||
<file-upload :value.sync="formData.files"
|
||||
upload_mode="drag"
|
||||
:upload_number="10" upload_result_category="array"
|
||||
accept=".doc, .docx, .xls, .xlsx, .pdf, .ppt, .jpg, .jpeg, .png"
|
||||
complete_result></file-upload>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="附件" :span="2">
|
||||
<el-form-item prop="files">
|
||||
<file-upload :value.sync="formData.files"
|
||||
upload_mode="drag"
|
||||
:upload_number="10" upload_result_category="array"
|
||||
accept=".doc, .docx, .xls, .xlsx, .pdf, .ppt, .jpg, .jpeg, .png"
|
||||
complete_result></file-upload>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="签字" :span="2">
|
||||
<el-form-item prop="sign">
|
||||
<pc-signature v-model="formData.sign"></pc-signature>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-form>
|
||||
<el-descriptions-item label="签字" :span="2">
|
||||
<el-form-item prop="sign">
|
||||
<pc-signature v-model="formData.sign"></pc-signature>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-form>
|
||||
|
||||
<el-row type="flex" justify="end" class="mt20">
|
||||
<el-button type="primary" plain @click="onSave">保存</el-button>
|
||||
<el-button type="primary" @click="onSubmit" v-if="!taskId">提交</el-button>
|
||||
<el-button type="primary" @click="onFinishTask" v-else>提交</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<el-row type="flex" justify="end" class="mt20">
|
||||
<el-button type="primary" plain @click="onSave">保存</el-button>
|
||||
<el-button type="primary" @click="onSubmit" v-if="!taskId">提交</el-button>
|
||||
<el-button type="primary" @click="onFinishTask" v-else>提交</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
new Vue({
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
store,
|
||||
data() {
|
||||
return {
|
||||
bizId: GetQueryString("bizId"),
|
||||
taskId: GetQueryString("taskId"),
|
||||
formData: {
|
||||
id: GetQueryString("businessId"),
|
||||
planDate: []
|
||||
},
|
||||
formRules: {
|
||||
activityName: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
activityType: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
fundsUnitName: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
declareUnitName: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
planDate: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
budgets: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
clubId: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
mobile: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
sign: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
},
|
||||
activityDeclareReimbursementList: [],
|
||||
clubList: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 保存
|
||||
onSave() {
|
||||
this.$confirm("您确定保存吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
if (this.formData.planDate && this.formData.planDate.length > 0) {
|
||||
this.formData.planStartTime = this.formData.planDate[0]
|
||||
this.formData.planEndTime = this.formData.planDate[1]
|
||||
}
|
||||
this.$axios.post('/platform/activityDeclare/apply/save', {data: JSON.stringify(this.formData)}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success("保存成功")
|
||||
new Vue({
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
store,
|
||||
data() {
|
||||
return {
|
||||
bizId: GetQueryString("bizId"),
|
||||
taskId: GetQueryString("taskId"),
|
||||
formData: {
|
||||
id: GetQueryString("businessId"),
|
||||
planDate: []
|
||||
},
|
||||
formRules: {
|
||||
activityName: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
activityType: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
fundsUnitName: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
declareUnitName: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
planDate: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
budgets: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
clubId: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
mobile: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
sign: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
deductionBudgetId: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
},
|
||||
activityDeclareReimbursementList: [],
|
||||
clubList: [],
|
||||
budgetOption: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getBudgetByYear() {
|
||||
this.budgetOption = []
|
||||
this.$set(this.formData, "deductionBudgetId", null)
|
||||
let outlayManageSource = ""
|
||||
if (this.formData.activityType === "SCHOOL_UNION") {
|
||||
outlayManageSource = "ACTIVITY_BUDGET_TYPE_ONE"
|
||||
} else if (this.formData.activityType === "BRANCH_UNION") {
|
||||
outlayManageSource = "ACTIVITY_BUDGET_TYPE_TWO"
|
||||
} else if (this.formData.activityType === "CLUB") {
|
||||
outlayManageSource = "ACTIVITY_BUDGET_TYPE_THREE"
|
||||
}
|
||||
this.$axios.post('/platform/activityReimbursement/apply/getBudgetByYear', {
|
||||
outlayManageSource: outlayManageSource,
|
||||
clubId: this.formData.clubId
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.budgetOption = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
// 保存
|
||||
onSave() {
|
||||
this.$confirm("您确定保存吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
if (this.formData.planDate && this.formData.planDate.length > 0) {
|
||||
this.formData.planStartTime = this.formData.planDate[0]
|
||||
this.formData.planEndTime = this.formData.planDate[1]
|
||||
}
|
||||
this.$axios.post('/platform/activityDeclare/apply/save', {data: JSON.stringify(this.formData)}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success("保存成功")
|
||||
commonUtil.pjaxPush('/platform/activityDeclare/mine')
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
// 提交
|
||||
onSubmit() {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
if (this.formData.planDate && this.formData.planDate.length > 0) {
|
||||
this.formData.planStartTime = this.formData.planDate[0]
|
||||
this.formData.planEndTime = this.formData.planDate[1]
|
||||
}
|
||||
this.$axios.post('/platform/activityDeclare/apply/submit', {
|
||||
data: JSON.stringify(this.formData)
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success("提交成功")
|
||||
// 提交
|
||||
onSubmit() {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
if (this.formData.planDate && this.formData.planDate.length > 0) {
|
||||
this.formData.planStartTime = this.formData.planDate[0]
|
||||
this.formData.planEndTime = this.formData.planDate[1]
|
||||
}
|
||||
this.$axios.post('/platform/activityDeclare/apply/submit', {
|
||||
data: JSON.stringify(this.formData)
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success("提交成功")
|
||||
commonUtil.pjaxPush('/platform/activityDeclare/mine')
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
onFinishTask() {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
if (this.formData.planDate && this.formData.planDate.length > 0) {
|
||||
this.formData.planStartTime = this.formData.planDate[0]
|
||||
this.formData.planEndTime = this.formData.planDate[1]
|
||||
}
|
||||
this.$axios.post('/platform/activityDeclare/apply/submitAgain', {
|
||||
data: JSON.stringify(this.formData),
|
||||
taskId: GetQueryString("taskId")
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success("提交成功")
|
||||
onFinishTask() {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
if (this.formData.planDate && this.formData.planDate.length > 0) {
|
||||
this.formData.planStartTime = this.formData.planDate[0]
|
||||
this.formData.planEndTime = this.formData.planDate[1]
|
||||
}
|
||||
this.$axios.post('/platform/activityDeclare/apply/submitAgain', {
|
||||
data: JSON.stringify(this.formData),
|
||||
taskId: GetQueryString("taskId")
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success("提交成功")
|
||||
commonUtil.pjaxPush('/platform/activityDeclare/mine')
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
// 设置申报主体名称
|
||||
setDeclareUnitName(val){
|
||||
const club = this.clubList.find(v => v.id === val)
|
||||
this.$set(this.formData, "declareUnitName", club ? club.clubName : null)
|
||||
},
|
||||
// 申请类型选中
|
||||
activityTypeChange(val) {
|
||||
if (val === "SCHOOL_UNION") {
|
||||
this.$set(this.formData, "declareUnitName", "校工会")
|
||||
} else if (val === "BRANCH_UNION") {
|
||||
this.$set(this.formData, "declareUnitName", this.$store.state.user.union.name)
|
||||
this.$set(this.formData, "unionId", this.$store.state.user.union.id)
|
||||
}
|
||||
},
|
||||
findOne(id) {
|
||||
this.$axios.post("/platform/activityDeclare/mine/findOne", { id })
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.formData = res.data
|
||||
if (res.data.clubId) {
|
||||
this.setDeclareUnitName(res.data.clubId)
|
||||
}
|
||||
// 设置申报主体名称
|
||||
setDeclareUnitName(val) {
|
||||
const club = this.clubList.find(v => v.id === val)
|
||||
this.$set(this.formData, "declareUnitName", club ? club.clubName : null)
|
||||
this.getBudgetByYear()
|
||||
},
|
||||
// 申请类型选中
|
||||
activityTypeChange(val) {
|
||||
if (val === "SCHOOL_UNION") {
|
||||
this.$set(this.formData, "declareUnitName", "校工会")
|
||||
} else if (val === "BRANCH_UNION") {
|
||||
this.$set(this.formData, "declareUnitName", this.$store.state.user.union.name)
|
||||
this.$set(this.formData, "unionId", this.$store.state.user.union.id)
|
||||
}
|
||||
this.getBudgetByYear()
|
||||
},
|
||||
findOne(id) {
|
||||
this.$axios.post("/platform/activityDeclare/mine/findOne", {id})
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.formData = res.data
|
||||
if (res.data.clubId) {
|
||||
this.setDeclareUnitName(res.data.clubId)
|
||||
}
|
||||
|
||||
if (res.data.planStartTime && res.data.planEndTime) {
|
||||
this.$set(this.formData, "planDate", [res.data.planStartTime, res.data.planEndTime])
|
||||
}
|
||||
} else {
|
||||
this.$message.error(res.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
async init() {
|
||||
this.activityDeclareReimbursementList = await this.$businessTool.getEnumOptions("ActivityDeclareReimbursement")
|
||||
if (this.bizId) {
|
||||
this.findOne(this.bizId)
|
||||
} else {
|
||||
const user = this.$store.state.user
|
||||
this.$set(this.formData, "userId", user.id)
|
||||
this.$set(this.formData, "userName", user.username)
|
||||
this.$set(this.formData, "loginName", user.loginname)
|
||||
this.$set(this.formData, "mobile", user.mobile)
|
||||
this.$set(this.formData, "applyTime", this.$moment().format("YYYY-MM-DD"))
|
||||
this.$set(this.formData, "budgets", [])
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.init()
|
||||
//社团查询
|
||||
this.$businessTool.listCLubByRole().then((res) => (this.clubList = res))
|
||||
}
|
||||
})
|
||||
if (res.data.planStartTime && res.data.planEndTime) {
|
||||
this.$set(this.formData, "planDate", [res.data.planStartTime, res.data.planEndTime])
|
||||
}
|
||||
} else {
|
||||
this.$message.error(res.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
async init() {
|
||||
this.activityDeclareReimbursementList = await this.$businessTool.getEnumOptions("ActivityDeclareReimbursement")
|
||||
if (this.bizId) {
|
||||
this.findOne(this.bizId)
|
||||
} else {
|
||||
const user = this.$store.state.user
|
||||
this.$set(this.formData, "userId", user.id)
|
||||
this.$set(this.formData, "userName", user.username)
|
||||
this.$set(this.formData, "loginName", user.loginname)
|
||||
this.$set(this.formData, "mobile", user.mobile)
|
||||
this.$set(this.formData, "applyTime", this.$moment().format("YYYY-MM-DD"))
|
||||
this.$set(this.formData, "budgets", [])
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.init()
|
||||
//社团查询
|
||||
this.$businessTool.listCLubByRole().then((res) => (this.clubList = res))
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
|
||||
+1
-1
@@ -135,7 +135,7 @@ layout("/layouts/platform.html"){
|
||||
{ prop: "declareUnitName", label: "申报单位/协会", sortable: true },
|
||||
{ prop: "activityNumber", label: "活动人数", sortable: true },
|
||||
{ prop: "applyTime", label: "申报时间", sortable: true },
|
||||
{ prop: "taskName", label: "当前节点"},
|
||||
{ prop: "curTaskName", label: "当前节点"},
|
||||
{ prop: "instanceState", label: "流程状态"}
|
||||
],
|
||||
activityDeclareReimbursementList: [],
|
||||
|
||||
+1
-1
@@ -122,7 +122,7 @@ layout("/layouts/platform.html"){
|
||||
{ prop: "declareUnitName", label: "申报单位/协会", sortable: true },
|
||||
{ prop: "activityNumber", label: "活动人数", sortable: true },
|
||||
{ prop: "applyTime", label: "申报时间", sortable: true },
|
||||
{ prop: "taskName", label: "当前节点"},
|
||||
{ prop: "curTaskName", label: "当前节点"},
|
||||
{ prop: "instanceState", label: "流程状态"}
|
||||
],
|
||||
activityDeclareReimbursementList: [],
|
||||
|
||||
+1
-1
@@ -135,7 +135,7 @@ layout("/layouts/platform.html"){
|
||||
{ prop: "declareUnitName", label: "申报单位/协会", sortable: true },
|
||||
{ prop: "activityNumber", label: "活动人数", sortable: true },
|
||||
{ prop: "applyTime", label: "申报时间", sortable: true },
|
||||
{ prop: "taskName", label: "当前节点"},
|
||||
{ prop: "curTaskName", label: "当前节点"},
|
||||
{ prop: "instanceState", label: "流程状态"}
|
||||
],
|
||||
activityDeclareReimbursementList: [],
|
||||
|
||||
+1
-1
@@ -135,7 +135,7 @@ layout("/layouts/platform.html"){
|
||||
{ prop: "declareUnitName", label: "申报单位/协会", sortable: true },
|
||||
{ prop: "activityNumber", label: "活动人数", sortable: true },
|
||||
{ prop: "applyTime", label: "申报时间", sortable: true },
|
||||
{ prop: "taskName", label: "当前节点"},
|
||||
{ prop: "curTaskName", label: "当前节点"},
|
||||
{ prop: "instanceState", label: "流程状态"}
|
||||
],
|
||||
activityDeclareReimbursementList: [],
|
||||
|
||||
+269
@@ -0,0 +1,269 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<div class="platform" id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch();getApplyMoney()">
|
||||
<search-item label="年度">
|
||||
<el-date-picker
|
||||
@change="doSearch"
|
||||
placeholder="请选择年度"
|
||||
style="width: 100%" type="year"
|
||||
v-model="pageForm.year"
|
||||
:clearable="false"
|
||||
value-format="yyyy">
|
||||
</el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="活动项目">
|
||||
<el-input v-model="pageForm.activityMatter" placeholder="请输入活动项目"
|
||||
clearable></el-input>
|
||||
</search-item>
|
||||
<search-item label="预算条目">
|
||||
<dict-select v-model="pageForm.budgetReimburseType"
|
||||
code="ACTIVITY_BUDGET_REIMBURSE_TYPE"></dict-select>
|
||||
</search-item>
|
||||
<search-item label="所属工会"
|
||||
v-if="!pageForm.outlayManageSource||pageForm.outlayManageSource==='ACTIVITY_BUDGET_TYPE_TWO'">
|
||||
<el-select v-model="pageForm.unionId" filterable
|
||||
clearable
|
||||
placeholder="请选择所属工会" style="width: 100%;">
|
||||
<el-option v-for="item in unionList" :label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="协会"
|
||||
v-if="!pageForm.outlayManageSource||pageForm.outlayManageSource==='ACTIVITY_BUDGET_TYPE_THREE'">
|
||||
<el-select clearable
|
||||
placeholder="请选择协会"
|
||||
style="width: 100%;" v-model="pageForm.clubId">
|
||||
<el-option
|
||||
:key="item.id"
|
||||
:label="item.clubName"
|
||||
:value="item.id"
|
||||
v-for="item in clubOption">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
|
||||
|
||||
</search>
|
||||
|
||||
</el-card>
|
||||
<el-card class="mt10" shadow="never">
|
||||
<table-tool label="综合查询">
|
||||
<el-tag style="font-size: 15px;">
|
||||
申报预算金额:{{declareTotalBudgetMoney}}元,审核预算金额:{{totalBudgetMoney}}元
|
||||
</el-tag>
|
||||
|
||||
|
||||
<el-radio-group @change="budgetTypeCodeChange" size="small"
|
||||
style="margin-left: 10px;"
|
||||
v-model="pageForm.outlayManageSource">
|
||||
<el-radio-button :label="item.code"
|
||||
:key="item.code" v-for="item in budgetTypeOption">
|
||||
{{item.name}}
|
||||
</el-radio-button>
|
||||
</el-radio-group>
|
||||
|
||||
</table-tool>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" row-key="id"
|
||||
style="width: 100%"
|
||||
ref="table"
|
||||
v-loading="tableLoading">
|
||||
<el-table-column :index="indexMethod" align="center" header-align="center"
|
||||
label="序号"
|
||||
fixed
|
||||
type="index"
|
||||
width="80px"></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:key="column.prop"
|
||||
:width="column.width"
|
||||
:fixed="column.fixed"
|
||||
show-overflow-tooltip
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in tableColumns">
|
||||
<template v-slot="{row}" v-if="column.prop==='outlayManageSource'">
|
||||
<dict-tag :options="budgetTypeOption"
|
||||
:value="row.outlayManageSource"></dict-tag>
|
||||
</template>
|
||||
<template v-slot="{row}" v-else-if="column.prop==='budgetReimburseType'">
|
||||
<dict-tag :options="dict.type.ACTIVITY_BUDGET_REIMBURSE_TYPE"
|
||||
:value="row.budgetReimburseType"></dict-tag>
|
||||
</template>
|
||||
<template v-slot="{row}" v-else-if="column.prop==='note'">
|
||||
<span v-if="row.schoolBudgetId">费用使用校工会中的:{{row.activityMatterTwo}}</span>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" fixed="right" header-align="center" label="操作"
|
||||
width="200">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">
|
||||
查看
|
||||
</el-button>
|
||||
<el-button @click="openEdit(row)" size="mini" type="primary"
|
||||
:disabled="!['superadmin'].includes($store.state.user.loginname)">
|
||||
编辑
|
||||
</el-button>
|
||||
<!-- <el-button @click="doDelete(row.id)" size="mini" type="danger"
|
||||
:disabled="!['superadmin'].includes($store.state.user.loginname)">
|
||||
删除
|
||||
</el-button>-->
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
<activity-budget-info ref="activityBudgetInfo">
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">
|
||||
{{formData.taskName}}
|
||||
</div>
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=":"
|
||||
class="flow-task-form">
|
||||
<el-form-item label="预算金额" prop="totalBudgetMoney"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<el-input-number :min="0" :precision="2"
|
||||
placeholder="请输入预算金额"
|
||||
style="width: 100%"
|
||||
v-model="formData.totalBudgetMoney"></el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="审批意见" prop="auditOpinion"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<user-opinion-textarea v-model="formData.auditOpinion"></user-opinion-textarea>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
|
||||
<el-button @click="doSubmit" size="small" type="primary">提交</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</activity-budget-info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include('../info.js'){}#-->
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
store,
|
||||
mixins: [initTableMixins],
|
||||
dicts: ["ACTIVITY_BUDGET_REIMBURSE_TYPE"],
|
||||
data() {
|
||||
return {
|
||||
declareTotalBudgetMoney: 0,
|
||||
totalBudgetMoney: 0,
|
||||
budgetTypeOption: [],
|
||||
clubOption: [],
|
||||
unionList: [],
|
||||
pageForm: {
|
||||
year: new Date().getFullYear() + "",
|
||||
outlayManageSource: "",
|
||||
budgetReimburseType: "",
|
||||
unionId: "",
|
||||
clubId: "",
|
||||
},
|
||||
tableColumns: [
|
||||
{prop: 'year', label: '年度', width: '80', fixed: "left"},
|
||||
{prop: 'userName', label: '申报人姓名', fixed: "left"},
|
||||
{prop: 'loginName', label: '申报人工号', fixed: "left"},
|
||||
{prop: 'mobile', label: '联系方式', width: '120'},
|
||||
{prop: 'outlayManageSource', label: '申报类型'},
|
||||
{prop: 'budgetReimburseType', label: '预算条目'},
|
||||
{prop: 'helpUnitName', label: '申报单位'},
|
||||
{prop: 'activityMatter', label: '活动项目', width: '300'},
|
||||
{prop: 'declareTotalBudgetMoney', label: '申报预算金额'},
|
||||
{prop: 'totalBudgetMoney', label: '审核预算金额'},
|
||||
{prop: 'note', label: '备注'},
|
||||
{prop: 'applyDate', label: '申报时间', width: '120'},
|
||||
],
|
||||
showApprovalForm: false
|
||||
}
|
||||
},
|
||||
components: {
|
||||
"activity-budget-info": ACTIVITY_BUDGET_INFO
|
||||
},
|
||||
methods: {
|
||||
doSubmit() {
|
||||
this.$refs.formRef.validate((valid) => {
|
||||
if (valid) {
|
||||
this.$confirm('确认提交吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$axios.post(loc() + "/doSubmit", this.formData).then(resp => {
|
||||
if (resp.code === 0) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '提交成功!'
|
||||
})
|
||||
this.doSearch()
|
||||
this.$refs.guava.index()
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
openEdit(row) {
|
||||
this.$refs.guava.edit(() => {
|
||||
this.showApprovalForm = true
|
||||
this.formData = {
|
||||
id: row.id,
|
||||
totalBudgetMoney: row.totalBudgetMoney,
|
||||
}
|
||||
this.$refs.activityBudgetInfo.onOpen(row)
|
||||
})
|
||||
},
|
||||
budgetTypeCodeChange() {
|
||||
this.$set(this.pageForm, "unionId", '')
|
||||
this.$set(this.pageForm, "clubId", '')
|
||||
this.doSearch()
|
||||
this.getApplyMoney()
|
||||
},
|
||||
openView(row) {
|
||||
this.$refs.guava.edit(() => {
|
||||
this.showApprovalForm = false
|
||||
this.$refs.activityBudgetInfo.onOpen(row)
|
||||
})
|
||||
},
|
||||
getApplyMoney() {
|
||||
this.$axios.post("/platform/activity/budget/applyStatistics/getApplyMoney", this.pageForm).then(resp => {
|
||||
if (resp.code === 0) {
|
||||
this.declareTotalBudgetMoney = resp.data.declareTotalBudgetMoney
|
||||
this.totalBudgetMoney = resp.data.totalBudgetMoney
|
||||
} else {
|
||||
this.$message.error(resp.message)
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.budgetTypeOption = await this.$businessTool.getDictOptions("ACTIVITY_BUDGET_TYPE")
|
||||
this.budgetTypeOption.unshift({name: "全部类型", code: ""})
|
||||
this.clubOption = await this.$businessTool.listCLubByRole()
|
||||
this.unionList = await this.$businessTool.listUnion()
|
||||
this.getApplyMoney()
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+14
-9
@@ -9,11 +9,19 @@ layout("/layouts/platform.html"){
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="申报人姓名">{{formData.userName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="申报时间">{{formData.applyDate}}</el-descriptions-item>
|
||||
<el-descriptions-item label="经费项目">
|
||||
<el-form-item
|
||||
prop="activityMatter" label="经费项目">
|
||||
<el-input maxlength="50" placeholder="请输入经费项目"
|
||||
v-model="formData.activityMatter"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="联系方式">
|
||||
<el-form-item label="联系方式" prop="mobile">
|
||||
<el-input placeholder="请输入联系方式" v-model="formData.mobile"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="预算类型">
|
||||
<el-form-item label="预算类型" prop="outlayManageSource">
|
||||
<el-select @change="budgetTypeCodeChange"
|
||||
@@ -63,13 +71,7 @@ layout("/layouts/platform.html"){
|
||||
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="经费项目">
|
||||
<el-form-item
|
||||
prop="activityMatter" label="经费项目">
|
||||
<el-input maxlength="50" placeholder="请输入经费项目"
|
||||
v-model="formData.activityMatter"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="活动时间">
|
||||
<el-form-item
|
||||
prop="activityDate" label="活动时间">
|
||||
@@ -178,6 +180,8 @@ layout("/layouts/platform.html"){
|
||||
clubId: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
helpUnitName: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
unionId: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
mobile: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
activityDate: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
},
|
||||
formData: {
|
||||
budgetDetails: []
|
||||
@@ -270,9 +274,10 @@ layout("/layouts/platform.html"){
|
||||
})
|
||||
}
|
||||
this.budgetTypeOption = budgetTypeOption
|
||||
if (this.budgetTypeOption.length === 1){
|
||||
this.$set(this.formData, "outlayManageSource", this.budgetTypeOption[0].code)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
getSchoolBudget() {
|
||||
this.$axios.post("/platform/activity/budget/apply/getSchoolBudget").then((res) => {
|
||||
|
||||
@@ -67,6 +67,35 @@ const ACTIVITY_BUDGET_INFO = {
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template v-if="viewData.allocationEditAuditList&&viewData.allocationEditAuditList.length>0">
|
||||
<div class="task-panel mt10">
|
||||
<div class="task-panel-header">管理员修改预算</div>
|
||||
<div v-for="(item,index) in viewData.allocationEditAuditList" :key="index">
|
||||
<el-descriptions :column="2" border class="table_fixed">
|
||||
<el-descriptions-item label="审核人">
|
||||
{{ item.username }}({{ item.loginname }})
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="审核时间">
|
||||
{{ item.auditTime }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="编辑前金额">
|
||||
{{ item.ext.money }}
|
||||
</el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="编辑前活动项目名称">
|
||||
{{ item.ext.activityMatter }}
|
||||
</el-descriptions-item>-->
|
||||
<el-descriptions-item></el-descriptions-item>
|
||||
<el-descriptions-item label="审核意见" span="2">
|
||||
{{ item.auditOpinion }}
|
||||
</el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="审核附件" span="2">
|
||||
<file-upload :files.sync="item.ext.files" view></file-upload>
|
||||
</el-descriptions-item>-->
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<slot></slot>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user