Files
2026-09-20 15:46:34 +08:00

405 lines
19 KiB
HTML

<!--#
layout("/layouts/platform.html"){
#-->
<!--
工会会计审核
-->
<div id="app" v-cloak>
<guava ref="guava">
<template>
<search :has_sh="true" :page_form.sync="pageForm" @search="doSearch">
<template #column>
<div class="btn-group tool-button">
<el-select @change="flushUnits" @clear="flushUnits"
clearable="true"
filterable="true"
placeholder="所属工会" style="width: 100%;"
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}"
v-model="pageForm.unionId">
<el-option :label="item.unionname" :value="item.id"
v-for="item in unions"></el-option>
</el-select>
</div>
<div class="btn-group tool-button">
<el-select clearable="true" filterable="true" placeholder="所属单位"
style="width: 100%;"
v-model="pageForm.unitId">
<el-option :label="item.name" :value="item.id"
v-for="item in units"></el-option>
</el-select>
</div>
</template>
</search>
<el-card class="mt20" shadow="never">
<el-table :data="tableData" @sort-change="pageOrder" row-key="id"
style="width: 100%"
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 align="center" header-align="center" label="活动名称"
prop="activity_name">
<template scope="scope">
<el-link @click="openView(scope.row)" type="primary">
{{scope.row.activity_name}}
</el-link>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="申请人姓名"
prop="user_name"></el-table-column>
<el-table-column align="center" header-align="center" label="工号"
prop="bxr_loginname"></el-table-column>
<el-table-column align="center" header-align="center" label="所属工会"
prop="bxr_unionname"
sortable></el-table-column>
<el-table-column align="center" header-align="center" label="活动主体类型"
prop="activity_type" sortable>
<template scope="{row}">
{{ row.activity_type == 40002 ? "分工会活动" : row.activity_type == 40003 ?
"协会(社团)活动" :
"校工会活动"}}
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="活动项目类型"
prop="absName" sortable>
<template slot-scope="{row}">
{{row.absName}}({{row.projectTypeCode}})
</template>
</el-table-column>
<!-- <el-table-column align="center" header-align="center" label="申请类型" prop="apply_type"
sortable>
<template scope="{row}">
{{ row.apply_type == 1 ? "经费申报" : "报销申请" }}
</template>
</el-table-column>-->
<el-table-column align="center" header-align="center" label="申请时间"
prop="apply_time"
sortable></el-table-column>
<el-table-column align="center" header-align="center" label="申请状态"
prop="state_id" 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" fixed="right" header-align="center" label="操作"
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 :command="{type:'primary',data:row}"
v-if="[1020].includes(row.state_id)">
审核
</el-dropdown-item>
<el-dropdown-item :command="{type:'revoke',data:row}"
v-if="[1030].includes(row.state_id)">
撤回
</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 handle label="校工会负责人审核" ref="act_info2">
<template #handle>
<el-form :model="formData" :rules="formRules" label-position="right"
label-width="120px"
ref="form"
style="padding: 20px 0">
<el-form-item class="view-header" label="审核信息&emsp;" label-width="135px">
</el-form-item>
<el-row gutter="20">
<el-col :span="8">
<el-form-item label="审核人" prop="username">
<el-input disabled
v-model="formData.username"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="审核时间" prop="time">
<el-input disabled v-model="formData.time"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="实际总费用" prop="time">
<el-input disabled placeholder="根据实际物品费用自动计算"
v-model="formData.activity_money"></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 align="center" header-align="center" label="序号"
sortable
type="index" width="100">
</el-table-column>
<el-table-column align="center" header-align="center" label="物品名称"
prop="name">
<template slot-scope="{row}">
<el-input disabled maxlength="50" placeholder="物品名称"
type="text"
v-model="row.name"></el-input>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="预算费用"
prop="price">
<template slot-scope="{row}">
<el-input disabled maxlength="50" placeholder="预算费用"
type="number"
v-model="row.price"></el-input>
</template>
</el-table-column>
<el-table-column align="center" header-align="center"
label="实际费用"
prop="actualPrice">
<template slot-scope="{row}">
<el-input :disabled="formData.apply_type==2" @input="blur"
maxlength="50"
placeholder="实际费用"
type="number" v-model="row.actualPrice"></el-input>
</template>
</el-table-column>
&lt;!&ndash; <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>&ndash;&gt;
</el-table>
</el-form-item>
</el-col>-->
<el-col :span="24">
<el-form-item label="审核意见" prop="idea">
<el-input maxlength="500" placeholder="请填写您的审核意见" rows="4"
type="textarea"
v-model="formData.idea"></el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="签&emsp;&emsp;字" prop="sign">
<sign :qz.sync="formData.sign" prefix="medicalAid"></sign>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div style="float: right;margin: 20px 0">
<el-button :disabled="subDis" :loading="subLoading1"
@click="doReview(false)"
type="danger">退 回
</el-button>
<el-button :disabled="subDis" :loading="subLoading2" @click="doReview(true)"
type="success">通
过
</el-button>
</div>
</template>
</activity-bx-info>
</template>
<template #view>
<activity-bx-info ref="act_info"></activity-bx-info>
</template>
</guava>
</div>
<script>
const vue = new Vue({
el: '#app',
data() {
return {
unions: [],
units: [],
tabLoading: false,
tableData: [],
formData: {},
subDis: false,
subLoading1: false,
subLoading2: false,
pageForm: {
isAudit: 1,
...getPageForm(),
searchName: "username",
year: new Date().getFullYear() + ""
},
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?v=' + new Date().getTime()),
'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)
} else if (type == 'revoke') {
this.doRevoke(data)
}
},
async doRevoke(row) {
const confirm = await this.$confirm('确定要撤回吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if (confirm === "confirm") {
const resp = await $.post("/platform/jf/activity_bx/accounting/doRevoke", {id: row.id})
if (resp.code === 0) {
this.doSearch()
this.$notify({
title: '成功',
message: resp.msg,
type: 'success'
});
}
}
},
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) {
const confirm = await this.$confirm('确定要提交审核?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if (confirm === "confirm") {
this.formData.flag = flag
this.subDis = true
flag ? this.subLoading2 = true : this.subLoading1 = true
const formData = clone(this.formData)
formData.goods = JSON.stringify(formData.goods)
const resp = await $.post(loc() + "/doReview", formData)
requestLaterMsgFun(vue, resp, null, null, (v) => {
this.subDis = false
this.subLoading1 = false
this.subLoading2 = false
this.pageData()
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(loc() + "/getGoods", {id: id})
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()}")
}
},
...pageSomeThing
},
async created() {
this.pageData();
this.unions = await getUnions()
this.flushUnits()
}
})
</script>
<!--#
}
#-->