This commit is contained in:
2026-09-09 16:16:22 +08:00
parent ebffbab428
commit ba3a985c40
3749 changed files with 29 additions and 608551 deletions
@@ -1,360 +0,0 @@
<div id="app" v-cloak>
<guava ref="guava">
<template>
<search :page_form.sync="pageForm" @search="doSearch" :has_sh="true">
<template #column>
<div class="btn-group tool-button">
<el-select placeholder="所属工会" v-model="pageForm.unionId" style="width: 100%;"
clearable="true"
@change="flushUnits" @clear="flushUnits"
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}"
filterable="true">
<el-option v-for="item in unions" :label="item.unionname" :value="item.id"></el-option>
</el-select>
</div>
<div class="btn-group tool-button">
<el-select placeholder="所属单位" v-model="pageForm.unitId" style="width: 100%;"
clearable="true"
filterable="true">
<el-option v-for="item in units" :label="item.name" :value="item.id"></el-option>
</el-select>
</div>
</template>
</search>
<el-card shadow="never" class="mt20">
<el-table :data="tableData" style="width: 100%" row-key="id" @sort-change="pageOrder"
v-loading="tabLoading">
<el-table-column align="center" header-align="center" label="序号" width="120px">
<template scope="scope">
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
</template>
</el-table-column>
<el-table-column label="活动名称" prop="activity_name" header-align="center"
align="center">
<template scope="scope">
<el-link type="primary" @click="openView(scope.row)">
{{scope.row.activity_name}}
</el-link>
</template>
</el-table-column>
<el-table-column label="申请人姓名" prop="user_name" header-align="center"
align="center"></el-table-column>
<el-table-column label="工号" prop="bxr_loginname" header-align="center"
align="center"></el-table-column>
<el-table-column label="所属工会" prop="bxr_unionname" header-align="center" sortable
align="center"></el-table-column>
<el-table-column label="活动主体类型" prop="activity_type" header-align="center" align="center" sortable>
<template scope="{row}">
{{ row.activity_type == 40002 ? "分工会活动" : row.activity_type == 40003 ? "社团活动" :
"校工会活动"}}
</template>
</el-table-column>
<el-table-column label="活动项目类型" prop="absName" header-align="center"
align="center" sortable>
<template slot-scope="{row}">
{{row.absName}}({{row.projectTypeCode}})
</template>
</el-table-column>
<el-table-column label="申请类型" prop="apply_type" header-align="center" sortable
align="center">
<template scope="{row}">
{{ row.apply_type == 1 ? "经费申报" : "报销申请" }}
</template>
</el-table-column>
<el-table-column label="申请时间" prop="apply_time" header-align="center" sortable
align="center"></el-table-column>
<el-table-column align="center" prop="state_id" header-align="center" label="申请状态" sortable>
<template scope="scope">
<span :style="'color:'+scope.row.state_color">{{scope.row.state_name}}</span>
</template>
</el-table-column>
<!--下拉操作按钮-->
<el-table-column align="center" header-align="center" label="操作" fixed="right"
width="120px">
<template slot-scope="{row}">
<el-dropdown @command="dropdownCommand">
<el-button plain size="mini">
<i class="ti-settings"></i>
<span class="ti-angle-down"></span>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="{type:'view',data:row}">
查看
</el-dropdown-item>
<el-dropdown-item v-if="[1020].includes(row.state_id)"
:command="{type:'primary',data:row}">
审核
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<template #edit>
<activity-bx-info ref="act_info2" :handle="true" label="校工会负责人审核" :panes="[2,3]">
<template #handle>
<el-form :model="formData" ref="form" :rules="formRules" label-position="right"
style="padding: 20px 0"
label-width="120px">
<el-form-item label="审核信息&emsp;" label-width="135px" class="view-header">
</el-form-item>
<el-row gutter="20">
<el-col :span="8">
<el-form-item prop="username" label="审核人">
<el-input v-model="formData.username"
disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="time" label="审核时间">
<el-input v-model="formData.time" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="time" label="实际总费用">
<el-input v-model="formData.activity_money" disabled
placeholder="根据实际物品费用自动计算"></el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="购置物品及价格">
<el-table :data="formData.goods" border size="mini" style="width: 100%">
<el-table-column sortable type="index" width="100" label="序号"
align="center" header-align="center">
</el-table-column>
<el-table-column prop="name" label="物品名称" align="center"
header-align="center">
<template slot-scope="{row}">
<el-input maxlength="50" placeholder="物品名称" disabled v-model="row.name"
type="text"></el-input>
</template>
</el-table-column>
<el-table-column prop="price" label="预算费用" align="center"
header-align="center">
<template slot-scope="{row}">
<el-input maxlength="50" placeholder="预算费用" disabled v-model="row.price"
type="number"></el-input>
</template>
</el-table-column>
<el-table-column prop="actualPrice" label="实际费用" align="center"
header-align="center">
<template slot-scope="{row}">
<el-input maxlength="50" placeholder="实际费用"
v-model="row.actualPrice"
:disabled="formData.apply_type==2"
type="number" @input="blur"></el-input>
</template>
</el-table-column>
<el-table-column prop="notes" label="说明" align="center"
header-align="center">
<template slot-scope="{row}">
<el-input maxlength="50" placeholder="说明"
v-model="row.notes"></el-input>
</template>
</el-table-column>
</el-table>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item prop="idea" label="审核意见">
<el-input type="textarea" v-model="formData.idea" rows="4" maxlength="500"
placeholder="请填写您的审核意见"></el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item prop="sign" label="签&emsp;&emsp;字">
<sign prefix="medicalAid" :qz.sync="formData.sign"></sign>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div style="float: right;margin: 20px 0">
<el-button type="danger" @click="doReview(false)" :disabled="subDis" :loading="subLoading1">
</el-button>
<el-button type="success" @click="doReview(true)" :disabled="subDis" :loading="subLoading2">
</el-button>
</div>
</template>
</activity-bx-info>
</template>
<template #view>
<activity-bx-info ref="act_info"></activity-bx-info>
</template>
</guava>
</div>
<script>
var vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
unions: [],
units: [],
tabLoading: false,
tableData: [],
formData: {},
subDis: false,
subLoading1: false,
subLoading2: false,
pageForm: {
isAudit: 3,
searchName: "username",
year: new Date().getFullYear() + "",
apply_type: apply_type
},
formRules: {
idea: [{required: true, message: '请填写意见', trigger: ['blur', 'change']}],
},
}
},
components: {
'search': httpVueLoader('/components/activityBx/ActivityBxSearch.vue'),
'guava': httpVueLoader('/components/plugins/Guava.vue'),
'activity-bx-info': httpVueLoader('/components/activityBx/ActivityBxInfo.vue'),
'sign': httpVueLoader('/components/sign/sign.vue?v=2.0.0')
},
methods: {
//下拉菜单操作
dropdownCommand(command) {
const {type, data} = command
if (type == 'view') {
this.openView(data)
} else if (type == 'primary') {
this.openReview(data)
}
},
blur() {
let num = 0
this.formData.goods.forEach(v => {
num += parseFloat(v.actualPrice == undefined ? 0 : v.actualPrice)
})
this.$set(this.formData, "activity_money", num)
},
async doReview(flag) {
this.$refs["form"].validate(async (valid) => {
if (valid) {
this.formData.flag = flag
this.subDis = true
flag ? this.subLoading2 = true : this.subLoading1 = true
const resp = await $.post("/platform/jf/activity_bx/accounting/doReview", {data: JSON.stringify(this.formData)})
if (resp.code === 0){
this.subDis = false
this.subLoading1 = false
this.subLoading2 = false
this.pageData1()
this.$refs.guava.index()
}
}
})
},
async openReview(row) {
const {id, activity_id, apply_type} = row
this.formData = {
goods: []
}
this.$set(row, "reviewLoading", true)
this.formData = {
id,
username: "${@shiro.getPrincipalProperty('username')}",
time: moment().format('YYYY-MM-DD'),
sign: '',
}
this.$set(row, "reviewLoading", false)
this.$refs.act_info2.getActInfo(id)
const goods = await $.get("/platform/jf/activity_bx/accounting/getGoods", {activity_id: activity_id})
if (apply_type == 2) {
let a = 0
goods.data.forEach(v => {
v.actualPrice = v.price
a += v.price
})
this.$set(this.formData, "activity_money", a)
}
this.$set(this.formData, "goods", goods.data)
this.$refs.guava.edit()
},
openView(row) {
const {id} = row
this.$refs.act_info.getActInfo(id)
this.$refs.guava.view()
},
async flushUnits() {
this.$set(this.pageForm, "unitId", "")
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
this.units = await getUnits(this.pageForm.unionId)
} else {
this.units = await getUnits("${@shiro.getPrincipalProperty('unit').getUnionid()}")
}
},
pageData1() {
this.pageData("/platform/jf/activity_bx/accounting/pageData")
},
doSearch() {
this.tableKey = new Date().getTime()
this.pageForm.pageNumber = 1
this.pageData1()
},
pageOrder(column) {
this.pageForm.pageOrderName = column.prop;
this.pageForm.pageOrderBy = column.order;
this.pageData1();
},
pageNumberChange(val) {
this.pageForm.pageNumber = val;
this.pageData1();
},
pageSizeChange(val) {
this.pageForm.pageSize = val;
this.pageData1();
},
},
async created() {
this.pageData1();
this.unions = await getUnions()
this.flushUnits()
}
})
</script>
@@ -1,294 +0,0 @@
<div id="app" v-cloak>
<guava ref="guava">
<template>
<search :page_form.sync="pageForm" @search="doSearch" :has_sh="true">
<template #column>
<div class="btn-group tool-button mt5">
<el-select placeholder="所属工会" v-model="pageForm.unionId" style="width: 100%;"
clearable="true"
@change="flushUnits" @clear="flushUnits"
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}"
filterable="true">
<el-option v-for="item in unions" :label="item.unionname" :value="item.id"></el-option>
</el-select>
</div>
<div class="btn-group tool-button mt5">
<el-select placeholder="所属单位" v-model="pageForm.unitId" style="width: 100%;"
clearable="true"
filterable="true">
<el-option v-for="item in units" :label="item.name" :value="item.id"></el-option>
</el-select>
</div>
</template>
</search>
<el-card shadow="never" class="mt20">
<el-table :data="tableData" style="width: 100%" row-key="id" @sort-change="pageOrder"
v-loading="tabLoading">
<el-table-column align="center" header-align="center" label="序号" width="120px">
<template scope="scope">
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
</template>
</el-table-column>
<el-table-column label="活动名称" prop="activity_name" header-align="center"
align="center">
<template scope="scope">
<el-link type="primary" @click="openView(scope.row)">
{{scope.row.activity_name}}
</el-link>
</template>
</el-table-column>
<el-table-column label="申请人姓名" prop="user_name" header-align="center"
align="center"></el-table-column>
<el-table-column label="工号" prop="bxr_loginname" header-align="center"
align="center"></el-table-column>
<el-table-column label="所属工会" prop="bxr_unionname" header-align="center" sortable
align="center"></el-table-column>
<el-table-column label="活动主体类型" prop="activity_type" header-align="center" align="center" sortable>
<template scope="{row}">
{{ row.activity_type == 40002 ? "分工会活动" : row.activity_type == 40003 ? "社团活动" :
"校工会活动"}}
</template>
</el-table-column>
<el-table-column label="活动项目类型" prop="absName" header-align="center"
align="center" sortable>
<template slot-scope="{row}">
{{row.absName}}({{row.projectTypeCode}})
</template>
</el-table-column>
<el-table-column label="申请类型" prop="apply_type" header-align="center" sortable
align="center">
<template scope="{row}">
{{ row.apply_type == 1 ? "经费申报" : "报销申请" }}
</template>
</el-table-column>
<el-table-column label="申请时间" prop="apply_time" header-align="center" sortable
align="center"></el-table-column>
<el-table-column align="center" prop="state_id" header-align="center" label="申请状态" sortable>
<template scope="scope">
<span :style="'color:'+scope.row.state_color">{{scope.row.state_name}}</span>
</template>
</el-table-column>
<!--下拉操作按钮-->
<el-table-column align="center" header-align="center" label="操作" fixed="right"
width="120px">
<template slot-scope="{row}">
<el-dropdown @command="dropdownCommand">
<el-button plain size="mini">
<i class="ti-settings"></i>
<span class="ti-angle-down"></span>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="{type:'view',data:row}">
查看
</el-dropdown-item>
<el-dropdown-item v-if="[1000].includes(row.state_id)"
:command="{type:'primary',data:row}">
审核
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<template #edit>
<activity-bx-info ref="act_info2" :handle="true" label="社团负责人审核" :panes="[2]">
<template #handle>
<el-form :model="formData" ref="form" :rules="formRules" label-position="right"
style="padding: 20px 0"
label-width="120px">
<el-form-item label="审核信息&emsp;" label-width="135px" class="view-header">
</el-form-item>
<el-row gutter="20">
<el-col :span="12">
<el-form-item prop="username" label="审核人">
<el-input v-model="formData.username"
disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="time" label="审核时间">
<el-input v-model="formData.time" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item prop="idea" label="审核意见">
<el-input type="textarea" v-model="formData.idea" rows="4" maxlength="500"
placeholder="请填写您的审核意见"></el-input>
</el-form-item>
<el-form-item prop="sign" label="签&emsp;&emsp;字">
<sign prefix="medicalAid" :qz.sync="formData.sign"></sign>
</el-form-item>
</el-form>
<div style="float: right;margin: 20px 0">
<el-button type="danger" @click="doReview(false)" :disabled="subDis" :loading="subLoading1">
</el-button>
<el-button type="success" @click="doReview(true)" :disabled="subDis" :loading="subLoading2">
</el-button>
</div>
</template>
</activity-bx-info>
</template>
<template #view>
<activity-bx-info ref="act_info"></activity-bx-info>
</template>
</guava>
</div>
<script>
var vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
unions: [],
units: [],
tabLoading: false,
tableData: [],
formData: {},
subDis: false,
subLoading1: false,
subLoading2: false,
pageForm: {
isAudit: 3,
searchName: "username",
year: new Date().getFullYear() + "",
apply_type: apply_type
},
formRules: {
idea: [{required: true, message: '请填写意见', trigger: ['blur', 'change']}],
},
}
},
components: {
'search': httpVueLoader('/components/activityBx/ActivityBxSearch.vue'),
'guava': httpVueLoader('/components/plugins/Guava.vue'),
'activity-bx-info': httpVueLoader('/components/activityBx/ActivityBxInfo.vue'),
'sign': httpVueLoader('/components/sign/sign.vue?v=2.0.0')
},
methods: {
//下拉菜单操作
dropdownCommand(command) {
const {type, data} = command
if (type == 'view') {
this.openView(data)
} else if (type == 'primary') {
this.openReview(data)
}
},
async doReview(flag) {
this.$refs["form"].validate(async (valid) => {
if (valid) {
this.formData.flag = flag
this.subDis = true
flag ? this.subLoading2 = true : this.subLoading1 = true
const resp = await $.post("/platform/jf/activity_bx/association/doReview", this.formData)
if (resp.code === 0){
this.subDis = false
this.subLoading1 = false
this.subLoading2 = false
this.pageData1()
this.$refs.guava.index()
}
}
})
},
async openReview(row) {
const {id} = row
this.$set(row, "reviewLoading", true)
this.formData = {
id,
username: "${@shiro.getPrincipalProperty('username')}",
time: moment().format('YYYY-MM-DD'),
sign: '',
}
this.$set(row, "reviewLoading", false)
this.$refs.act_info2.getActInfo(id)
this.$refs.guava.edit()
},
openView(row) {
const {id} = row
this.$refs.act_info.getActInfo(id)
this.$refs.guava.view()
},
async flushUnits() {
this.$set(this.pageForm, "unitId", "")
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
this.units = await getUnits(this.pageForm.unionId)
} else {
this.units = await getUnits("${@shiro.getPrincipalProperty('unit').getUnionid()}")
}
},
pageData1() {
this.pageData("/platform/jf/activity_bx/association/pageData")
},
doSearch() {
this.tableKey = new Date().getTime()
this.pageForm.pageNumber = 1
this.pageData1()
},
pageOrder(column) {
this.pageForm.pageOrderName = column.prop;
this.pageForm.pageOrderBy = column.order;
this.pageData1();
},
pageNumberChange(val) {
this.pageForm.pageNumber = val;
this.pageData1();
},
pageSizeChange(val) {
this.pageForm.pageSize = val;
this.pageData1();
},
},
async created() {
this.pageData1();
this.unions = await getUnions()
this.flushUnits()
}
})
</script>
@@ -1,292 +0,0 @@
<style>
</style>
<div id="app" v-cloak>
<guava ref="guava">
<template>
<search :page_form.sync="pageForm" @search="doSearch" :has_sh="true">
<template #column>
<div class="btn-group tool-button">
<el-select placeholder="所属工会" v-model="pageForm.unionId" style="width: 100%;"
clearable="true"
@change="flushUnits" @clear="flushUnits"
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}"
filterable="true">
<el-option v-for="item in unions" :label="item.unionname" :value="item.id"></el-option>
</el-select>
</div>
<div class="btn-group tool-button">
<el-select placeholder="所属单位" v-model="pageForm.unitId" style="width: 100%;"
clearable="true"
filterable="true">
<el-option v-for="item in units" :label="item.name" :value="item.id"></el-option>
</el-select>
</div>
</template>
</search>
<el-card shadow="never" class="mt20">
<el-table :data="tableData" style="width: 100%" row-key="id" @sort-change="pageOrder"
v-loading="tabLoading">
<el-table-column align="center" header-align="center" label="序号" width="120px">
<template scope="scope">
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
</template>
</el-table-column>
<el-table-column label="活动名称" prop="activity_name" header-align="center"
align="center">
<template scope="scope">
<el-link type="primary" @click="openView(scope.row)">
{{scope.row.activity_name}}
</el-link>
</template>
</el-table-column>
<el-table-column label="申请人姓名" prop="user_name" header-align="center"
align="center"></el-table-column>
<el-table-column label="工号" prop="bxr_loginname" header-align="center"
align="center"></el-table-column>
<el-table-column label="所属工会" prop="bxr_unionname" header-align="center" sortable
align="center"></el-table-column>
<el-table-column label="活动主体类型" prop="activity_type" header-align="center" align="center" sortable>
<template scope="{row}">
{{ row.activity_type == 40002 ? "分工会活动" : row.activity_type == 40003 ? "社团活动" :
"校工会活动"}}
</template>
</el-table-column>
<el-table-column label="活动项目类型" prop="absName" header-align="center"
align="center" sortable>
<template slot-scope="{row}">
{{row.absName}}({{row.projectTypeCode}})
</template>
</el-table-column>
<el-table-column label="申请类型" prop="apply_type" header-align="center" sortable
align="center">
<template scope="{row}">
{{ row.apply_type == 1 ? "经费申报" : "报销申请" }}
</template>
</el-table-column>
<el-table-column label="申请时间" prop="apply_time" header-align="center" sortable
align="center"></el-table-column>
<el-table-column align="center" prop="state_id" header-align="center" label="申请状态" sortable>
<template scope="scope">
<span :style="'color:'+scope.row.state_color">{{scope.row.state_name}}</span>
</template>
</el-table-column>
<!--下拉菜单操作-->
<el-table-column align="center" header-align="center" label="操作" fixed="right"
width="120px">
<template slot-scope="{row}">
<el-dropdown @command="dropdownCommand">
<el-button plain size="mini">
<i class="ti-settings"></i>
<span class="ti-angle-down"></span>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="{type:'view',data:row}">
查看
</el-dropdown-item>
<el-dropdown-item v-if="[1010].includes(row.state_id)"
:command="{type:'primary',data:row}">
审核
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<template #edit>
<activity-bx-info ref="act_info2" :handle="true" label="院级工会审核" :panes="[2]">
<template #handle>
<el-form :model="formData" ref="form" :rules="formRules" label-position="right"
style="padding: 20px 0"
label-width="120px">
<el-form-item label="审核信息&emsp;" label-width="135px" class="view-header">
</el-form-item>
<el-row gutter="20">
<el-col :span="12">
<el-form-item prop="username" label="审核人">
<el-input v-model="formData.username"
disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="time" label="审核时间">
<el-input v-model="formData.time" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item prop="idea" label="审核意见">
<el-input type="textarea" v-model="formData.idea" rows="4" maxlength="500"
placeholder="请填写您的审核意见"></el-input>
</el-form-item>
<el-form-item prop="sign" label="签&emsp;&emsp;字">
<sign prefix="medicalAid" :qz.sync="formData.sign"></sign>
</el-form-item>
</el-form>
<div style="float: right;margin: 20px 0">
<el-button type="danger" @click="doReview(false)" :disabled="subDis" :loading="subLoading1">
</el-button>
<el-button type="success" @click="doReview(true)" :disabled="subDis" :loading="subLoading2">
</el-button>
</div>
</template>
</activity-bx-info>
</template>
<template #view>
<activity-bx-info ref="act_info"></activity-bx-info>
</template>
</guava>
</div>
<script>
var vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
unions: [],
units: [],
tabLoading: false,
tableData: [],
formData: {},
subDis: false,
subLoading1: false,
subLoading2: false,
pageForm: {
isAudit: 3,
searchName: "username",
year: new Date().getFullYear() + "",
apply_type: apply_type
},
formRules: {
idea: [{required: true, message: '请填写意见', trigger: ['blur', 'change']}],
},
}
},
components: {
'search': httpVueLoader('/components/activityBx/ActivityBxSearch.vue'),
'guava': httpVueLoader('/components/plugins/Guava.vue'),
'activity-bx-info': httpVueLoader('/components/activityBx/ActivityBxInfo.vue'),
'sign': httpVueLoader('/components/sign/sign.vue?v=2.0.0')
},
methods: {
//下拉菜单操作
dropdownCommand(command) {
const {type, data} = command
if (type == 'view') {
this.openView(data)
} else if (type == 'primary') {
this.openReview(data)
}
},
async doReview(flag) {
this.$refs["form"].validate(async (valid) => {
if (valid) {
this.formData.flag = flag
this.subDis = true
flag ? this.subLoading2 = true : this.subLoading1 = true
const resp = await $.post("/platform/jf/activity_bx/division/doReview", this.formData)
if (resp.code === 0){
this.subDis = false
this.subLoading1 = false
this.subLoading2 = false
this.pageData1()
this.$refs.guava.index()
}
}
})
},
async openReview(row) {
const {id} = row
this.$set(row, "reviewLoading", true)
this.formData = {
id,
username: "${@shiro.getPrincipalProperty('username')}",
time: moment().format('YYYY-MM-DD'),
sign: '',
}
this.$set(row, "reviewLoading", false)
this.$refs.act_info2.getActInfo(id)
this.$refs.guava.edit()
},
openView(row) {
const {id} = row
this.$refs.act_info.getActInfo(id)
this.$refs.guava.view()
},
async flushUnits() {
this.$set(this.pageForm, "unitId", "")
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
this.units = await getUnits(this.pageForm.unionId)
} else {
this.units = await getUnits("${@shiro.getPrincipalProperty('unit').getUnionid()}")
}
},
pageData1() {
this.pageData("/platform/jf/activity_bx/division/pageData")
},
doSearch() {
this.tableKey = new Date().getTime()
this.pageForm.pageNumber = 1
this.pageData1()
},
pageOrder(column) {
this.pageForm.pageOrderName = column.prop;
this.pageForm.pageOrderBy = column.order;
this.pageData1();
},
pageNumberChange(val) {
this.pageForm.pageNumber = val;
this.pageData1();
},
pageSizeChange(val) {
this.pageForm.pageSize = val;
this.pageData1();
},
},
async created() {
this.pageData1();
this.unions = await getUnions()
this.flushUnits()
}
})
</script>
@@ -1,654 +0,0 @@
<style>
.el-divider--horizontal {
margin-top: 80px;
margin-bottom: 40px;
}
.el-divider__text {
color: #409EFF !important;
}
.el-divider {
background-color: #409EFF !important;
}
</style>
<div id="app" v-cloak>
<guava ref="guava">
<template name="el-zoom-in-center">
<search :page_form.sync="pageForm" @search="doSearch">
<template #column>
<div class="btn-group tool-button">
<el-select placeholder="所属工会" v-model="pageForm.unionId" style="width: 100%;"
clearable="true"
@change="flushUnits" @clear="flushUnits"
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}"
filterable="true">
<el-option v-for="item in unions" :label="item.unionname" :value="item.id"></el-option>
</el-select>
</div>
<div class="btn-group tool-button">
<el-select placeholder="所属单位" v-model="pageForm.unitId" style="width: 100%;"
clearable="true"
filterable="true">
<el-option v-for="item in units" :label="item.name" :value="item.id"></el-option>
</el-select>
</div>
</template>
</search>
<!--申请记录展示-->
<el-card shadow="never" class="mt20">
<el-table :data="tableData" style="width: 100%" row-key="id" @sort-change="pageOrder"
v-loading="tabLoading">
<el-table-column align="center" header-align="center" label="序号" width="120px">
<template scope="scope">
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
</template>
</el-table-column>
<el-table-column label="活动名称" prop="activity_name" header-align="center"
align="center">
<template scope="scope">
<el-link type="primary" @click="openView(scope.row)">
{{scope.row.activity_name}}
</el-link>
</template>
</el-table-column>
<el-table-column label="申请人姓名" prop="user_name" header-align="center"
align="center"></el-table-column>
<el-table-column label="工号" prop="bxr_loginname" header-align="center"
align="center"></el-table-column>
<el-table-column label="所属工会" prop="bxr_unionname" header-align="center" sortable
align="center"></el-table-column>
<el-table-column label="活动主体类型" prop="activity_type" header-align="center" align="center" sortable>
<template scope="{row}">
{{ row.activity_type == 40002 ? "分工会活动" : row.activity_type == 40003 ? "社团活动" :
"校工会活动"}}
</template>
</el-table-column>
<el-table-column label="活动项目类型" prop="absName" header-align="center"
align="center" sortable>
<template slot-scope="{row}">
{{row.absName}}({{row.projectTypeCode}})
</template>
</el-table-column>
<el-table-column label="申请类型" prop="apply_type" header-align="center" sortable
align="center">
<template scope="{row}">
{{ row.apply_type == 1 ? "经费申报" : "报销申请" }}
</template>
</el-table-column>
<el-table-column label="申请时间" prop="apply_time" header-align="center" sortable
align="center"></el-table-column>
<!-- <el-table-column label="审核人" prop="shrname" header-align="center"
align="center">
<template slot-scope="{row:{shrname}}">
{{shrname?shrname:'暂无'}}
</template>
</el-table-column>
-->
<el-table-column align="center" prop="state_id" header-align="center" label="申请状态" sortable>
<template scope="scope">
<span :style="'color:'+scope.row.state_color">{{scope.row.state_name}}</span>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="操作" fixed="right"
width="120px">
<template slot-scope="{row}">
<el-dropdown @command="dropdownCommand">
<el-button plain size="mini">
<i class="ti-settings"></i>
<span class="ti-angle-down"></span>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="{type:'view',data:row}">
查看
</el-dropdown-item>
<el-dropdown-item v-if="[1010].includes(row.state_id)"
:command="{type:'edit',data:row}">
编辑
</el-dropdown-item>
<el-dropdown-item
v-if="${@shiro.hasRole('sysadmin')}"
:command="{type:'delete',data:row}">
删除
</el-dropdown-item>
<el-dropdown-item
v-if="[1010,1000].includes(row.state_id)&&${!@shiro.hasRole('sysadmin')}"
:command="{type:'delete',data:row}">
删除
</el-dropdown-item>
<el-dropdown-item v-if="row.state_id==1060&&row.apply_type!=2"
:command="{type:'exportWwj',data:row,apply_type:1}">
导出申请表
</el-dropdown-item>
<el-dropdown-item v-if="[1060].includes(row.state_id)"
:command="{type:'exportWwj',data:row,apply_type:2}">
导出报销表
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<template #edit>
<el-form label-width="100px">
<el-form-item label="填写申请信息&emsp;" label-width="135px" class="view-header" label-position="top">
</el-form-item>
</el-form>
<el-form :model="formData" ref="form" :rules="formRules" label-width="120px">
<el-row gutter="20">
<el-col :span="12">
<el-form-item prop="user_name" label="申请人姓名">
<el-input disabled v-model="formData.user_name" type="text"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="mobile" label="联系方式">
<el-input v-model="formData.mobile" type="text"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row gutter="20">
<el-col :span="12">
<el-form-item prop="activity_name" label="活动名称">
<el-input v-model="formData.activity_name" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="activity_type" label="活动类型">
<el-select v-model="formData.activity_type" placeholder="请选择活动主体类型" style="width: 100%">
<el-option
v-for="item in activityType"
:key="item.id"
:label="item.name+' ('+item.code+')'"
:value="item.code">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row gutter="20" v-if="formData.apply_type==2">
<el-col :span="12">
<el-form-item prop="venue" label="活动人数">
<el-input v-model="formData.activity_number" placeholder="请输入活动人数" type="number"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="venue" label="活动地点">
<el-input v-model="formData.venue" placeholder="请输入活动地点" type="text"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="activity_money" label="报销金额">
<el-input disabled v-model="formData.activity_money" placeholder="输入物品单价自动计算"
type="number"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="activity_card_number" label="报销卡号">
<el-input v-model="formData.activity_card_number" type="number"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="activity_time" label="活动时间">
<el-date-picker style="width: 100%"
v-model="formData.activity_time"
type="date" value-format="yyyy-MM-dd"
placeholder="活动时间" disabled>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row gutter="20" v-if="formData.apply_type==1">
<el-col :span="12">
<el-form-item prop="projectCode" label="项目编号">
<el-input disabled v-model="formData.projectCode" placeholder="选择活动类型自动生成"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="fundsUnitName" label="申报(承办)单位">
<el-input v-model="formData.fundsUnitName" type="text" placeholder="请输入申报(承办)单位"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="plannedDate" label="活动计划时间">
<el-input disabled v-model="formData.plannedDate"></el-input>
<!-- <el-date-picker style="width: 100%"
v-model="formData.plannedDate"
type="date" value-format="yyyy-MM-dd"
placeholder="活动计划时间" disabled>
</el-date-picker>-->
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="funds_money" label="申报金额">
<el-input disabled v-model="formData.funds_money" placeholder="输入物品单价自动计算"
type="number"></el-input>
</el-form-item>
</el-col>
</el-row>
<div style="display: flex;margin: 20px 0">
<el-divider content-position="left">购置物品及价格</el-divider>
<div style="padding-left: 10px;padding-top:60px">
<el-tooltip class="item" effect="dark" content="点击添加购置物品及价格" placement="top">
<el-button icon="el-icon-plus" circle @click="formData.goods.push({})"
type="primary"></el-button>
</el-tooltip>
</div>
</div>
<el-form-item label-width="0">
<el-table :data="formData.goods" border size="mini" style="width: 100%">
<el-table-column sortable type="index" width="100" label="序号"
align="center" header-align="center">
</el-table-column>
<el-table-column prop="name" label="物品名称" align="center"
header-align="center">
<template slot-scope="{row}">
<el-input maxlength="50" placeholder="物品名称" v-model="row.name"
type="text"></el-input>
</template>
</el-table-column>
<el-table-column prop="price" label="预算费用" align="center"
header-align="center">
<template slot-scope="{row}">
<el-input maxlength="50" placeholder="预算费用" v-model="row.price"
type="number" @input="blur"></el-input>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" align="center" header-align="center"
width="80px"
fixed="right">
<template slot-scope="scope">
<el-button type="danger" icon="el-icon-delete" circle
:disabled="formData.goods.length==0"
@click="delNotesItem(scope)"></el-button>
</template>
</el-table-column>
</el-table>
</el-form-item>
<el-divider content-position="left" class="dia"><span style="color: #3ea1ec;">{{formData.apply_type==1?'活动方案及简介':'活动内容'}}</span>
</el-divider>
<el-form-item prop="activity_content" class="is-required" label-width="auto">
<div id="acEditor"></div>
</el-form-item>
<el-divider content-position="left" class="dia"><span style="color: #3ea1ec;">&emsp;&emsp;</span>
</el-divider>
<el-form-item prop="files" label-width="auto">
<file-upload :files.sync="formData.files" card></file-upload>
</el-form-item>
<el-divider content-position="left" class="dia"><span style="color: #3ea1ec;">&emsp;&emsp;</span>
</el-divider>
<el-form-item prop="sign" label-width="auto">
<sign prefix="medicalAid" :qz.sync="formData.sign"></sign>
</el-form-item>
</el-form>
<div style="float: right;margin: 20px 0">
<el-button type="primary" @click="formData.id?doEdit():doAdd()">确 定</el-button>
</div>
</template>
<template #view>
<activity-bx-info ref="act_info"></activity-bx-info>
</template>
</guava>
</div>
<script>
let E = window.wangEditor
let acEditor = null
var vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
let validAc = (rule, value, callback) => {
if (!this.formData.activity_content || !dd3s.html2txt(this.formData.activity_content)) {
callback(new Error('请填写活动内容'));
} else {
callback();
}
};
return {
activityType: [],
unions: [],
units: [],
delNotesList: [],
tabLoading: false,
tableData: [],
formData: {},
formSign: {},
pageForm: {
searchName: "username",
year: new Date().getFullYear() + "",
activity_name: "activity_name",
apply_type: apply_type
},
formRules: {
activity_name: [{required: true, message: '必填', trigger: ['blur', 'change']}],
activity_number: [{required: true, message: '必填', trigger: ['blur', 'change']}],
// activity_time: [{required: true, message: '必填', trigger: ['blur', 'change']}],
venue: [{required: true, message: '必填', trigger: ['blur', 'change']}],
activity_type: [{required: true, message: '必填', trigger: ['blur', 'change']}],
activity_content: [{validator: validAc, trigger: ['blur', 'change']}],
},
activity: []
}
},
components: {
'search': httpVueLoader('/components/activityBx/ActivityBxSearch.vue'),
'guava': httpVueLoader('/components/plugins/Guava.vue'),
'file-upload': httpVueLoader('/components/plugins/FileUpload.vue'),
'activity-bx-info': httpVueLoader('/components/activityBx/ActivityBxInfo.vue'),
'sign': httpVueLoader('/components/sign/sign.vue?v=2.0.0')
},
methods: {
dropdownCommand(command) {
const {type, data, apply_type} = command
if (type == 'view') {
this.openView(data)
} else if (type == 'edit') {
this.openEdit(data)
} else if (type == 'delete') {
this.doDelete(data)
} else if (type == 'exportWwj') {
this.exportWwj(data, apply_type)
}
},
exportWwj(row, apply_type) {
const {id, activity_id, activity_type, otherFiles, photoFiles, billFiles} = row
let filesName = null
if (billFiles == undefined || JSON.parse(billFiles).length == 0) filesName = "发票"
if (filesName != null) {
this.$confirm('您没有上传' + filesName + '是否需要去上传', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let activityType = ""
if (activity_type == 40001) activityType = "/school?id="
if (activity_type == 40002) activityType = "/union?id="
if (activity_type == 40003) activityType = "/club?id="
window.location.href = "/platform/activity/apply" + activityType + activity_id
}).catch(() => {
});
} else {
if (apply_type == 2) {
window.location.href = "/platform/jf/activity_bx/reimbursement/doExport?id=" + id
} else {
window.location.href = "/platform/jf/activity_bx/reimbursementview/doExport?id=" + id
}
}
},
blur() {
let num = 0
this.formData.goods.forEach(v => {
num += parseFloat(v.price)
})
if (this.formData.apply_type == 2) {
this.$set(this.formData, "activity_money", num)
} else {
this.$set(this.formData, "funds_money", num)
}
},
delNotesItem(scope) {
this.delNotesList.push(scope.row.id)
this.formData.goods.splice(scope.$index, 1)
},
activityChange(val) {
const activity = this.activity.find(v => v.v_name == val)
this.$set(this.formData, 'activity_id', activity ? activity.id : null)
},
handleSelect(item) {
if (item.id) {
this.$set(this.formData, 'activity_time', item.be_time)
this.$set(this.formData, 'activity_number', item.number)
this.$set(this.formData, 'venue', item.address)
this.$set(this.formData, 'activity_id', item.id)
} else {
this.$set(this.formData, 'activity_id', null)
}
},
async querySearchAsync(queryString, cb) {
const {
code,
data
} = await $.get("/platform/jf/activity_bx/reimbursement/getActivity", {query: queryString})
if (code == 0) {
const arr = data.map(v => {
v.v_name = v.name + moment(v.be_time).format(" YYYY-MM-DD")
return {value: v.v_name, ...v}
})
this.activity = data
cb(arr)
} else {
cb([])
}
},
async doAdd() {
this.$refs["form"].validate(async (valid) => {
if (valid) {
const loading = this.$loading({
lock: true,
text: '正在提交...',
spinner: 'el-icon-loading',
background: COVER_LAYER_COLOR
});
const resp = await $.post("/platform/jf/activity_bx/reimbursement/doAdd", {
activityBx: JSON.stringify(this.formData),
sign: this.formData.sign
})
closeLoadingFunc(loading, resp, async () => {
this.pageData1()
this.$refs.guava.index()
}, (data, msg) => {
this.$message.error(msg);
})
}
})
},
doEdit() {
this.$refs["form"].validate(async (valid) => {
if (valid) {
const loading = this.$loading({
lock: true,
text: '正在提交...',
spinner: 'el-icon-loading',
background: COVER_LAYER_COLOR
});
const resp = await $.post("/platform/jf/activity_bx/reimbursement/doEdit", {
activityBx: JSON.stringify(this.formData),
sign: this.formData.sign,
delNotesList: JSON.stringify(this.delNotesList)
})
closeLoadingFunc(loading, resp, async () => {
this.pageData1()
this.$refs.guava.index()
}, (data, msg) => {
this.$message.error(msg);
})
}
})
},
openAdd() {
this.delNotesList = []
this.formData = {
goods: [],
files: [],
activity_money: null,
user_name: '${@shiro.getPrincipalProperty("username")}',
apply_time: moment().format('YYYY-MM-DD'),
activity_card_number: '${@shiro.getPrincipalProperty("bank_number")}'
}
this.$nextTick(() => {
$("#acEditor").html("")
acEditor = new E("#acEditor")
acEditor.config.onchange = (html) => {
this.formData.activity_content = html
}
acEditor.create()
})
this.$refs.guava.edit()
if (this.$refs['form']) {
this.$refs['form'].resetFields()
}
},
openView(row) {
const {id} = row
this.$refs.act_info.getActInfo(id)
this.$refs.guava.view()
},
async openEdit(row) {
const {id} = row
this.formData = {
goods: [],
plannedDate: []
}
this.activityType = await getActivityTwoLevelType("40000")
const resp = await $.get("/platform/jf/activity_bx/reimbursement/findOne", {id})
if (resp.code === 0){
v.activity_type = v.activity_type.toString()
v.goods = v.Goods
if (v.files && v.files.length > 0) v.files = JSON.parse(v.files)
v.plannedDate = (v.startPlannedDate + "——" + v.endPlannedDate)
this.formData = v
this.$nextTick(() => {
$("#acEditor").html("")
acEditor = new E("#acEditor")
acEditor.config.onchange = (html) => {
this.formData.activity_content = html
}
acEditor.create()
acEditor.txt.html(v.activity_content)
})
this.$refs.guava.edit()
}
},
doDelete(row) {
const {id} = row
this.$confirm('确定要删除吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
callback: async (a, b) => {
if ("confirm" == a) {//确认后再执行
this.$set(row, "delLoading", true)
const resp = await $.post("/platform/jf/activity_bx/reimbursement/doDelete", {id: id});
this.pageData1()
}
}
});
},
async flushUnits() {
this.$set(this.pageForm, "unitId", "")
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
this.units = await getUnits(this.pageForm.unionId)
} else {
this.units = await getUnits("${@shiro.getPrincipalProperty('unit').getUnionid()}")
}
},
pageData1() {
this.pageData("/platform/jf/activity_bx/reimbursement/pageData")
},
doSearch() {
this.tableKey = new Date().getTime()
this.pageForm.pageNumber = 1
this.pageData1()
},
pageOrder(column) {
this.pageForm.pageOrderName = column.prop;
this.pageForm.pageOrderBy = column.order;
this.pageData1();
},
pageNumberChange(val) {
this.pageForm.pageNumber = val;
this.pageData1();
},
pageSizeChange(val) {
this.pageForm.pageSize = val;
this.pageData1();
},
},
async created() {
this.pageData1();
if (getLocationVariable("action") == 'add') {
this.openAdd()
}
this.unions = await getUnions()
this.flushUnits()
}
})
</script>
@@ -1,280 +0,0 @@
<div id="app" v-cloak>
<guava ref="guava">
<template name="el-zoom-in-center">
<el-card shadow="never">
<div class="btn-group tool-button">
<el-date-picker
v-model="pageForm.year"
type="year"
value-format="yyyy" style="width: 150px"
placeholder="选择年">
</el-date-picker>
</div>
<!--分工会查询-->
<div class="btn-group tool-button">
<el-select placeholder="所属工会" v-model="pageForm.unionId" style="width: 100%;"
clearable="true"
@change="flushUnits" @clear="flushUnits"
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}"
filterable="true">
<el-option v-for="item in unions" :label="item.unionname" :value="item.id"></el-option>
</el-select>
</div>
<div class="btn-group tool-button">
<el-select placeholder="所属单位" v-model="pageForm.unitId" style="width: 100%;"
clearable="true"
filterable="true">
<el-option v-for="item in units" :label="item.name" :value="item.id"></el-option>
</el-select>
</div>
<div class="btn-group tool-button">
<el-input placeholder="请输入内容" clearable v-model="pageForm.searchKeyword"
@keyup.enter.native="$emit('search')">
<el-select v-model="pageForm.searchName" slot="prepend" placeholder="查询类型"
style="width: 120px;">
<el-option label="姓名" value="username"></el-option>
<el-option label="工号" value="loginname"></el-option>
<el-option label="活动名称" value="activity_name"></el-option>
</el-select>
</el-input>
</div>
<div class="btn-group tool-button">
<el-button type="primary" icon="el-icon-search" @click="doSearch"></el-button>
</div>
<div class="pull-right offscreen-right">
<el-button icon="el-icon-download" @click="download">导出名单</i>
</el-button>
</div>
</el-card>
<el-card shadow="never" class="mt20">
<el-table :data="tableData" style="width: 100%" row-key="id" @sort-change="pageOrder"
v-loading="tabLoading">
<el-table-column align="center" header-align="center" label="序号" width="120px">
<template scope="scope">
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
</template>
</el-table-column>
<el-table-column label="活动名称" prop="activity_name" show-overflow-tooltip header-align="center"
align="center">
<template scope="scope">
<el-link type="primary" @click="openView(scope.row)">
{{scope.row.activity_name}}
</el-link>
</template>
</el-table-column>
<el-table-column label="申请人姓名" prop="user_name" header-align="center"
align="center"></el-table-column>
<el-table-column label="工号" prop="bxr_loginname" header-align="center"
align="center"></el-table-column>
<el-table-column label="所属工会" prop="bxr_unionname" header-align="center" sortable
align="center"></el-table-column>
<el-table-column label="活动主体类型" prop="activity_type" header-align="center" align="center" sortable>
<template scope="{row}">
{{ row.activity_type == 40002 ? "分工会活动" : row.activity_type == 40003 ? "社团活动" :
"校工会活动"}}
</template>
</el-table-column>
<el-table-column label="活动项目类型" prop="absName" header-align="center"
align="center" sortable>
<template slot-scope="{row}">
{{row.absName}}({{row.projectTypeCode}})
</template>
</el-table-column>
<el-table-column label="申请类型" prop="apply_type" header-align="center" sortable
align="center">
<template scope="{row}">
{{ row.apply_type == 1 ? "经费申报" : "报销申请" }}
</template>
</el-table-column>
<el-table-column label="申请时间" prop="apply_time" header-align="center" sortable
align="center"></el-table-column>
<el-table-column align="center" prop="state_id" header-align="center" label="申请状态" sortable>
<template scope="scope">
<span :style="'color:'+scope.row.state_color">{{scope.row.state_name}}</span>
</template>
</el-table-column>
<!--下拉操作按钮-->
<el-table-column align="center" header-align="center" label="操作" fixed="right"
width="120px">
<template slot-scope="{row}">
<el-dropdown @command="dropdownCommand">
<el-button plain size="mini">
<i class="ti-settings"></i>
<span class="ti-angle-down"></span>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="{type:'view',data:row}">
查看
</el-dropdown-item>
<el-dropdown-item v-if="row.state_id==1060&&row.apply_type!=2"
:command="{type:'export',data:row}">
导出申请表
</el-dropdown-item>
<el-dropdown-item v-if="1060==row.state_id"
:command="{type:'exportWwj',data:row}">
导出报销表
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<template #view>
<activity-bx-info ref="act_info"></activity-bx-info>
</template>
</guava>
</div>
<script>
var vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
unionOptions: [],
tabLoading: false,
tableData: [],
formData: {},
pageForm: {
apply_type: apply_type,
searchName: "username",
year: new Date().getFullYear() + ""
},
formRules: {
activity_number: [{required: true, message: '必填', trigger: ['blur', 'change']}],
activity_time: [{required: true, message: '必填', trigger: ['blur', 'change']}],
venue: [{required: true, message: '必填', trigger: ['blur', 'change']}],
activity_content: [{required: true, message: '必填', trigger: ['blur', 'change']}],
},
unions: [],
units: [],
}
},
components: {
'search': httpVueLoader('/components/activityBx/ActivityBxSearch.vue'),
'guava': httpVueLoader('/components/plugins/Guava.vue'),
'file-upload': httpVueLoader('/components/plugins/FileUpload.vue'),
'activity-bx-info': httpVueLoader('/components/activityBx/ActivityBxInfo.vue'),
},
methods: {
dropdownCommand(command) {
//下拉菜单操作
const {type, data} = command
if (type == 'view') {
this.openView(data)
} else if (type == 'exportWwj') {
this.exportWwj(data)
} else if (type == 'export') {
this.export(data)
}
},
export(row) {
window.location.href = "/platform/jf/activity_bx/reimbursementview/doExport?id=" + row.id
},
async exportWwj(row) {
const {id, activity_id, apply_type, activity_type, otherFiles, photoFiles, billFiles} = row
let filesName = null
if (billFiles == undefined || JSON.parse(billFiles).length == 0) filesName = "发票"
if (filesName != null) {
const confirm = await this.$confirm('您没有上传' + filesName + '是否需要去上传', '提示')
if (confirm === "confirm") {
let activityType = ""
if (activity_type == 40001) activityType = "/school?id="
if (activity_type == 40002) activityType = "/union?id="
if (activity_type == 40003) activityType = "/club?id="
window.location.href = "/platform/activity/apply" + activityType + activity_id
return
}
}
window.location.href = "/platform/jf/activity_bx/reimbursement/doExport?id=" + id
},
download() {
if (!(this.pageForm.year && this.pageForm.year.length)) {
this.$message.error("请选择日期");
return
}
location.href = '/platform/jf/activity_bx/reimbursementview/download?year=' + this.pageForm.year + '&apply_type=' + apply_type
},
/* getunion() {
$.get(base + "/platform/jf/activity_bx/reimbursementview/getunion", (data) => {
if (data.code == 0) {
this.unionOptions = data.data
}
}, "json");
},*/
openView(row) {
const {id} = row
this.$refs.act_info.getActInfo(id)
this.$refs.guava.view()
},
async flushUnits() {
this.$set(this.pageForm, "unitId", "")
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
this.units = await getUnits(this.pageForm.unionId)
} else {
this.units = await getUnits("${@shiro.getPrincipalProperty('unit').getUnionid()}")
}
},
pageData1() {
this.pageData("/platform/jf/activity_bx/reimbursementview/pageData")
},
doSearch() {
this.tableKey = new Date().getTime()
this.pageForm.pageNumber = 1
this.pageData1()
},
pageOrder(column) {
this.pageForm.pageOrderName = column.prop;
this.pageForm.pageOrderBy = column.order;
this.pageData1();
},
pageNumberChange(val) {
this.pageForm.pageNumber = val;
this.pageData1();
},
pageSizeChange(val) {
this.pageForm.pageSize = val;
this.pageData1();
},
},
async created() {
this.unionOptions = await getUnions();
this.pageData1();
this.unions = await getUnions()
this.flushUnits()
}
})
</script>
@@ -1,293 +0,0 @@
<div id="app" v-cloak>
<guava ref="guava">
<template>
<search :page_form.sync="pageForm" @search="doSearch" :has_sh="true">
<template #column>
<div class="btn-group tool-button">
<el-select placeholder="所属工会" v-model="pageForm.unionId" style="width: 100%;"
clearable="true"
@change="flushUnits" @clear="flushUnits"
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}"
filterable="true">
<el-option v-for="item in unions" :label="item.unionname" :value="item.id"></el-option>
</el-select>
</div>
<div class="btn-group tool-button">
<el-select placeholder="所属单位" v-model="pageForm.unitId" style="width: 100%;"
clearable="true"
filterable="true">
<el-option v-for="item in units" :label="item.name" :value="item.id"></el-option>
</el-select>
</div>
</template>
</search>
<el-card shadow="never" class="mt20">
<el-table :data="tableData" style="width: 100%" row-key="id" @sort-change="pageOrder"
v-loading="tabLoading">
<el-table-column align="center" header-align="center" label="序号" width="120px">
<template scope="scope">
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
</template>
</el-table-column>
<el-table-column label="活动名称" prop="activity_name" header-align="center"
align="center">
<template scope="scope">
<el-link type="primary" @click="openView(scope.row)">
{{scope.row.activity_name}}
</el-link>
</template>
</el-table-column>
<el-table-column label="申请人姓名" prop="user_name" header-align="center"
align="center"></el-table-column>
<el-table-column label="工号" prop="bxr_loginname" header-align="center"
align="center"></el-table-column>
<el-table-column label="所属工会" prop="bxr_unionname" header-align="center" sortable
align="center"></el-table-column>
<el-table-column label="活动主体类型" prop="activity_type" header-align="center" align="center" sortable>
<template scope="{row}">
{{ row.activity_type == 40002 ? "分工会活动" : row.activity_type == 40003 ? "社团活动" :
"校工会活动"}}
</template>
</el-table-column>
<el-table-column label="活动项目类型" prop="absName" header-align="center"
align="center" sortable>
<template slot-scope="{row}">
{{row.absName}}({{row.projectTypeCode}})
</template>
</el-table-column>
<el-table-column label="申请类型" prop="apply_type" header-align="center" sortable
align="center">
<template scope="{row}">
{{ row.apply_type == 1 ? "经费申报" : "报销申请" }}
</template>
</el-table-column>
<el-table-column label="申请时间" prop="apply_time" header-align="center" sortable
align="center"></el-table-column>
<el-table-column align="center" prop="state_id" header-align="center" label="申请状态" sortable>
<template scope="scope">
<span :style="'color:'+scope.row.state_color">{{scope.row.state_name}}</span>
</template>
</el-table-column>
<!--下拉操作按钮-->
<el-table-column align="center" header-align="center" label="操作" fixed="right"
width="120px">
<template slot-scope="{row}">
<el-dropdown @command="dropdownCommand">
<el-button plain size="mini">
<i class="ti-settings"></i>
<span class="ti-angle-down"></span>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="{type:'view',data:row}">
查看
</el-dropdown-item>
<el-dropdown-item v-if="[1040].includes(row.state_id)"
:command="{type:'primary',data:row}">
审核
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<template #edit>
<activity-bx-info ref="act_info2" :handle="true" label="校工会主席审核" :panes="[2,3,4,5]">
<template #handle>
<el-form :model="formData" ref="form" :rules="formRules" label-position="right"
style="padding: 20px 0"
label-width="120px">
<el-form-item label="审核信息&emsp;" label-width="135px" class="view-header">
</el-form-item>
<el-row gutter="20">
<el-col :span="12">
<el-form-item prop="username" label="审核人">
<el-input v-model="formData.username"
disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="time" label="审核时间">
<el-input v-model="formData.time" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item prop="idea" label="审核意见">
<el-input type="textarea" v-model="formData.idea" rows="4" maxlength="500"
placeholder="请填写您的审核意见"></el-input>
</el-form-item>
<el-form-item prop="sign" label="签&emsp;&emsp;字">
<sign prefix="medicalAid" :qz.sync="formData.sign"></sign>
</el-form-item>
</el-form>
<div style="float: right;margin: 20px 0">
<el-button type="danger" @click="doReview(false)" :disabled="subDis" :loading="subLoading1">
</el-button>
<el-button type="success" @click="doReview(true)" :disabled="subDis" :loading="subLoading2">
</el-button>
</div>
</template>
</activity-bx-info>
</template>
<template #view>
<activity-bx-info ref="act_info"></activity-bx-info>
</template>
</guava>
</div>
<script>
var vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
unions: [],
units: [],
tabLoading: false,
tableData: [],
formData: {},
subDis: false,
subLoading1: false,
subLoading2: false,
pageForm: {
isAudit: 3,
searchName: "username",
year: new Date().getFullYear() + "",
apply_type: apply_type
},
formRules: {
idea: [{required: true, message: '请填写意见', trigger: ['blur', 'change']}],
},
}
},
components: {
'search': httpVueLoader('/components/activityBx/ActivityBxSearch.vue'),
'guava': httpVueLoader('/components/plugins/Guava.vue'),
'activity-bx-info': httpVueLoader('/components/activityBx/ActivityBxInfo.vue'),
'sign': httpVueLoader('/components/sign/sign.vue?v=2.0.0')
},
methods: {
//下拉菜单操作
dropdownCommand(command) {
const {type, data} = command
if (type == 'view') {
this.openView(data)
} else if (type == 'primary') {
this.openReview(data)
}
},
async doReview(flag) {
this.$refs["form"].validate(async (valid) => {
if (valid) {
this.formData.flag = flag
this.subDis = true
flag ? this.subLoading2 = true : this.subLoading1 = true
const resp = await $.post("/platform/jf/activity_bx/union/doReview", this.formData)
if (resp.code === 0){
this.subDis = false
this.subLoading1 = false
this.subLoading2 = false
this.pageData1()
this.$refs.guava.index()
}
}
})
},
async openReview(row) {
const {id} = row
this.$set(row, "reviewLoading", true)
this.formData = {
id,
username: "${@shiro.getPrincipalProperty('username')}",
time: moment().format('YYYY-MM-DD'),
sign: '',
}
this.$set(row, "reviewLoading", false)
this.$refs.act_info2.getActInfo(id)
this.$refs.guava.edit()
},
openView(row) {
const {id} = row
this.$refs.act_info.getActInfo(id)
this.$refs.guava.view()
},
async flushUnits() {
this.$set(this.pageForm, "unitId", "")
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
this.units = await getUnits(this.pageForm.unionId)
} else {
this.units = await getUnits("${@shiro.getPrincipalProperty('unit').getUnionid()}")
}
},
pageData1() {
this.pageData("/platform/jf/activity_bx/union/pageData")
},
doSearch() {
this.tableKey = new Date().getTime()
this.pageForm.pageNumber = 1
this.pageData1()
},
pageOrder(column) {
this.pageForm.pageOrderName = column.prop;
this.pageForm.pageOrderBy = column.order;
this.pageData1();
},
pageNumberChange(val) {
this.pageForm.pageNumber = val;
this.pageData1();
},
pageSizeChange(val) {
this.pageForm.pageSize = val;
this.pageData1();
},
},
async created() {
this.pageData1();
this.unions = await getUnions()
this.flushUnits()
}
})
</script>