This commit is contained in:
2024-07-31 08:46:23 +08:00
parent 048a7c13b3
commit 64f2569789
14 changed files with 871 additions and 504 deletions
@@ -90,12 +90,12 @@ layout("/layouts/platform.html"){
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="项目编号" prop="projectCode">
<el-input disabled placeholder="选择活动类型自动生成"
v-model="formData.projectCode"></el-input>
</el-form-item>
</el-col>
<!-- <el-col :span="12">
<el-form-item label="项目编号" prop="projectCode">
<el-input disabled placeholder="选择活动类型自动生成"
v-model="formData.projectCode"></el-input>
</el-form-item>
</el-col>-->
<el-col :span="12">
<el-form-item label="活动项目类型" prop="projectTypeCode">
<el-select placeholder="请选择活动类型" style="width: 100%;"
@@ -164,9 +164,9 @@ layout("/layouts/platform.html"){
</el-col>
<el-col :span="12">
<el-form-item label="活动地址" prop="address">
<el-form-item label="活动地址" prop="venue">
<el-input maxlength="50" placeholder="请填写活动地址" type="text"
v-model="formData.address"></el-input>
v-model="formData.venue"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
@@ -321,7 +321,7 @@ layout("/layouts/platform.html"){
projectTypeCode: [{required: true, message: '必填', trigger: ['blur', 'change']}],
activity_type: [{required: true, message: '必填', trigger: ['blur', 'change']}],
plannedDate: [{required: true, message: '必填', trigger: ['blur', 'change']}],
address: [{required: true, message: '必填', trigger: ['blur', 'change']}],
venue: [{required: true, message: '必填', trigger: ['blur', 'change']}],
activity_number: [{required: true, message: '必填', trigger: ['blur', 'change']}],
mobile: [{required: true, message: '必填', trigger: ['blur', 'change']}],
}
@@ -424,7 +424,7 @@ layout("/layouts/platform.html"){
spinner: 'el-icon-loading',
background: COVER_LAYER_COLOR
});
const formData = JSON.parse(JSON.stringify(this.formData))
const formData = clone(this.formData)
const {plannedDate} = formData
if (plannedDate && plannedDate.length) {
formData.startPlannedDate = formData.plannedDate[0]
@@ -432,19 +432,18 @@ layout("/layouts/platform.html"){
formData.startTime = formData.plannedDate[0]
formData.endTime = formData.plannedDate[1]
formData.plannedDate = undefined
}
const resp = await $.post("/platform/jf/activity_bx/apply/doAdd", {
activityBx: JSON.stringify(formData),
sign: this.formData.sign
const url = "/platform/jf/activity_bx/apply"
const resp = await $.post(url + (formData.id ? "/doEdit" : "/doAdd"), {
activityBx: JSON.stringify(formData)
})
closeLoadingFunc(loading, resp, async () => {
location.reload();
}, (data, msg) => {
this.$message.error(msg);
})
// 添加成功 跳转到申请记录页面
//window.location.href = '/platform/jf/activity_bx/reimbursement'
loading.close()
if (resp.code === 0) {
sublime.jumpPagePjax("/platform/jf/activity_bx/reimbursement")
} else {
this.$message.error(resp.msg);
}
}
})
},
@@ -462,34 +461,40 @@ layout("/layouts/platform.html"){
apply_time: moment().format('YYYY-MM-DD'),
activity_card_number: '${@shiro.getPrincipalProperty("bank_number")}'
}
this.activityType = await getActivityTwoLevelType("40000")
this.projectType = await getActivityTwoLevelType("50000")
if ("${@shiro.hasRole('H04')&&!(@shiro.hasRole('A06')||@shiro.hasRole('sysadmin')||@shiro.hasRole('H02'))}" === 'true') {
this.$set(this.formData, "activity_type", "40002")
this.$set(this.formData, "fundsUnitName", '${@shiro.getPrincipalProperty("union").getUnionname()}')
} else if ("${@shiro.hasRole('H02')&&!(@shiro.hasRole('H04')||@shiro.hasRole('sysadmin')||@shiro.hasRole('A06'))}" === 'true') {
this.$set(this.formData, "activity_type", "40003")
} else if ("${(@shiro.hasRole('xghng')||@shiro.hasRole('H10'))&&!(@shiro.hasRole('H04')||@shiro.hasRole('sysadmin')||@shiro.hasRole('H02'))}" === 'true') {
this.$set(this.formData, "activity_type", "40001")
this.$set(this.formData, "fundsUnitName", '校工会')
}
if (this.formData.activity_type) {
await this.getProjectCodeChange()
}
},
findOne(id){
async findOne(id) {
const resp = await $.get("/platform/jf/activity_bx/reimbursement/findOne", {id})
if (resp.code === 0) {
resp.data.activity_type = resp.data.activity_type + ""
resp.data.plannedDate = [resp.data.startPlannedDate, resp.data.endPlannedDate]
this.formData = resp.data
}
}
},
async created() {
this.activityType = await getActivityTwoLevelType("40000")
this.projectType = await getActivityTwoLevelType("50000")
const id = GetQueryString("id")
if (id){
if (id) {
this.findOne(id)
}else{
} else {
this.init()
}
if ("${@shiro.hasRole('H04')&&!(@shiro.hasRole('A06')||@shiro.hasRole('sysadmin')||@shiro.hasRole('H02'))}" === 'true') {
this.$set(this.formData, "activity_type", "40002")
this.$set(this.formData, "fundsUnitName", '${@shiro.getPrincipalProperty("union").getUnionname()}')
} else if ("${@shiro.hasRole('H02')&&!(@shiro.hasRole('H04')||@shiro.hasRole('sysadmin')||@shiro.hasRole('A06'))}" === 'true') {
this.$set(this.formData, "activity_type", "40003")
} else if ("${(@shiro.hasRole('xghng')||@shiro.hasRole('H10'))&&!(@shiro.hasRole('H04')||@shiro.hasRole('sysadmin')||@shiro.hasRole('H02'))}" === 'true') {
this.$set(this.formData, "activity_type", "40001")
this.$set(this.formData, "fundsUnitName", '校工会')
}
}
})
</script>
@@ -9,25 +9,28 @@ layout("/layouts/platform.html"){
<guava ref="guava">
<template>
<search :page_form.sync="pageForm" @search="doSearch" :has_sh="true">
<search :has_sh="true" :page_form.sync="pageForm" @search="doSearch">
<template #column>
<div class="btn-group tool-button">
<el-select placeholder="所属工会" v-model="pageForm.unionId" style="width: 100%;"
<el-select @change="flushUnits" @clear="flushUnits"
clearable="true"
@change="flushUnits" @clear="flushUnits"
filterable="true"
placeholder="所属工会" style="width: 100%;"
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>
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 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 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>
@@ -35,8 +38,9 @@ layout("/layouts/platform.html"){
</template>
</search>
<el-card shadow="never" class="mt20">
<el-table :data="tableData" style="width: 100%" row-key="id" @sort-change="pageOrder"
<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">
@@ -44,52 +48,57 @@ layout("/layouts/platform.html"){
</template>
</el-table-column>
<el-table-column label="活动名称" prop="activity_name" header-align="center"
align="center">
<el-table-column align="center" header-align="center" label="活动名称"
prop="activity_name">
<template scope="scope">
<el-link type="primary" @click="openView(scope.row)">
<el-link @click="openView(scope.row)" type="primary">
{{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 align="center" header-align="center" label="申请人姓名"
prop="user_name"></el-table-column>
<el-table-column label="工号" prop="bxr_loginname" header-align="center"
align="center"></el-table-column>
<el-table-column align="center" header-align="center" label="工号"
prop="bxr_loginname"></el-table-column>
<el-table-column label="所属工会" prop="bxr_unionname" header-align="center" sortable
align="center"></el-table-column>
<el-table-column align="center" header-align="center" label="所属工会"
prop="bxr_unionname"
sortable></el-table-column>
<el-table-column label="活动主体类型" prop="activity_type" header-align="center" align="center" sortable>
<el-table-column align="center" header-align="center" label="活动主体类型"
prop="activity_type" sortable>
<template scope="{row}">
{{ row.activity_type == 40002 ? "分工会活动" : row.activity_type == 40003 ? "协会(社团)活动" :
{{ row.activity_type == 40002 ? "分工会活动" : row.activity_type == 40003 ?
"协会(社团)活动" :
"校工会活动"}}
</template>
</el-table-column>
<el-table-column label="活动项目类型" prop="absName" header-align="center"
align="center" sortable>
<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 label="申请类型" prop="apply_type" header-align="center" sortable
align="center">
<template scope="{row}">
{{ row.apply_type == 1 ? "经费申报" : "报销申请" }}
</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 label="申请时间" prop="apply_time" header-align="center" sortable
align="center"></el-table-column>
<el-table-column align="center" header-align="center" label="申请时间"
prop="apply_time"
sortable></el-table-column>
<el-table-column align="center" prop="state_id" header-align="center" label="申请状态" sortable>
<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>
@@ -97,7 +106,7 @@ layout("/layouts/platform.html"){
<!--下拉操作按钮-->
<el-table-column align="center" header-align="center" label="操作" fixed="right"
<el-table-column align="center" fixed="right" header-align="center" label="操作"
width="120px">
<template slot-scope="{row}">
<el-dropdown @command="dropdownCommand">
@@ -109,8 +118,8 @@ layout("/layouts/platform.html"){
<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 :command="{type:'primary',data:row}"
v-if="[1020].includes(row.state_id)">
审核
</el-dropdown-item>
@@ -128,84 +137,91 @@ layout("/layouts/platform.html"){
</template>
<template #edit>
<activity-bx-info ref="act_info2" :handle="true" label="校工会负责人审核" :panes="[2,3]">
<activity-bx-info handle label="校工会负责人审核" ref="act_info2">
<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 :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 prop="username" label="审核人">
<el-input v-model="formData.username"
disabled></el-input>
<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 prop="time" label="审核时间">
<el-input v-model="formData.time" disabled></el-input>
<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 prop="time" label="实际总费用">
<el-input v-model="formData.activity_money" disabled
placeholder="根据实际物品费用自动计算"></el-input>
<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-col :span="24">
<el-form-item label="购置物品及价格">
<el-table :data="formData.goods" border size="mini" style="width: 100%">
<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-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 prop="idea" label="审核意见">
<el-input type="textarea" v-model="formData.idea" rows="4" maxlength="500"
placeholder="请填写您的审核意见"></el-input>
<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 prop="sign" label="签&emsp;&emsp;字">
<sign prefix="medicalAid" :qz.sync="formData.sign"></sign>
<el-form-item label="签&emsp;&emsp;字" prop="sign">
<sign :qz.sync="formData.sign" prefix="medicalAid"></sign>
</el-form-item>
</el-col>
</el-row>
@@ -213,10 +229,12 @@ layout("/layouts/platform.html"){
</el-form>
<div style="float: right;margin: 20px 0">
<el-button type="danger" @click="doReview(false)" :disabled="subDis" :loading="subLoading1">拒
绝
<el-button :disabled="subDis" :loading="subLoading1"
@click="doReview(false)"
type="danger">退 回
</el-button>
<el-button type="success" @click="doReview(true)" :disabled="subDis" :loading="subLoading2">通
<el-button :disabled="subDis" :loading="subLoading2" @click="doReview(true)"
type="success">通
过
</el-button>
</div>
@@ -258,7 +276,7 @@ layout("/layouts/platform.html"){
components: {
'search': httpVueLoader('/components/activityBx/ActivityBxSearch.vue'),
'guava': httpVueLoader('/components/plugins/Guava.vue'),
'activity-bx-info': httpVueLoader('/components/activityBx/ActivityBxInfo.vue'),
'activity-bx-info': httpVueLoader('/components/activityBx/ActivityBxInfo.vue?v=' + new Date().getTime()),
'sign': httpVueLoader('/components/sign/sign.vue?v=2.0.0')
},
methods: {
@@ -282,19 +300,30 @@ layout("/layouts/platform.html"){
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(location.href + "/doReview", {data: JSON.stringify(this.formData)})
requestLaterMsgFun(vue, resp, null, null, (v) => {
this.subDis = false
this.subLoading1 = false
this.subLoading2 = false
this.pageData()
this.$refs.guava.index()
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()
})
}
}
})
},
@@ -303,7 +332,6 @@ layout("/layouts/platform.html"){
this.formData = {
goods: []
}
console.log(row)
this.$set(row, "reviewLoading", true)
this.formData = {
id,
@@ -313,15 +341,13 @@ layout("/layouts/platform.html"){
}
this.$set(row, "reviewLoading", false)
this.$refs.act_info2.getActInfo(id)
const goods = await $.get(loc() + "/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)
}
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()
},
@@ -351,4 +377,4 @@ layout("/layouts/platform.html"){
<!--#
}
#-->
#-->
@@ -98,15 +98,16 @@ layout("/layouts/platform.html"){
</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_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"
<el-table-column align="center" header-align="center" label="申请时间"
prop="apply_time"
sortable></el-table-column>
@@ -137,16 +138,21 @@ layout("/layouts/platform.html"){
查看
</el-dropdown-item>
<el-dropdown-item :command="{type:'edit',data:row}"
v-if="[1020].includes(row.state_id)">
v-if="[1020,1025].includes(row.state_id)">
编辑
</el-dropdown-item>
<el-dropdown-item :command="{type:'uploadResults',data:row}"
v-if="[1030].includes(row.state_id)">
上传成果
</el-dropdown-item>
<el-dropdown-item :command="{type:'delete',data:row}"
v-if="[1020].includes(row.state_id)">
删除
</el-dropdown-item>
<el-dropdown-item :command="{type:'exportWwj',data:row,apply_type:1}"
v-if="row.state_id==1060&&row.apply_type!=2">
<el-dropdown-item
:command="{type:'exportWwj',data:row,apply_type:1}"
v-if="row.state_id==1060&&row.apply_type!=2">
导出申请表
</el-dropdown-item>
<!-- <el-dropdown-item v-if="[1060].includes(row.state_id)"
@@ -154,10 +160,10 @@ layout("/layouts/platform.html"){
导出报销表
</el-dropdown-item>-->
<!--# if(@shiro.hasRole('sysadmin')){ #-->
<el-dropdown-item :command="{type:'edit',data:row}"
v-if="![1020].includes(row.state_id)">
编辑
</el-dropdown-item>
<!-- <el-dropdown-item :command="{type:'edit',data:row}"
v-if="![1020].includes(row.state_id)">
编辑
</el-dropdown-item>-->
<el-dropdown-item :command="{type:'delete',data:row}"
v-if="![1020].includes(row.state_id)">
删除
@@ -256,7 +262,8 @@ layout("/layouts/platform.html"){
<el-date-picker disabled
placeholder="活动时间"
style="width: 100%" type="date"
v-model="formData.activity_time" value-format="yyyy-MM-dd">
v-model="formData.activity_time"
value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
</el-col>
@@ -339,7 +346,8 @@ layout("/layouts/platform.html"){
label="操作"
width="80px">
<template slot-scope="scope">
<el-button :disabled="formData.goods.length==0" @click="delNotesItem(scope)" circle
<el-button :disabled="formData.goods.length==0"
@click="delNotesItem(scope)" circle
icon="el-icon-delete"
type="danger"></el-button>
</template>
@@ -383,6 +391,17 @@ layout("/layouts/platform.html"){
</guava>
<el-dialog
:visible.sync="dialogVisible"
title="成果提交"
width="30%">
<file-upload :files.sync="formData.files" card></file-upload>
<span class="dialog-footer" slot="footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button @click="uploadResults" type="primary">提交</el-button>
</span>
</el-dialog>
</div>
<script>
@@ -422,14 +441,15 @@ layout("/layouts/platform.html"){
activity_type: [{required: true, message: '必填', trigger: ['blur', 'change']}],
activity_content: [{validator: validAc, trigger: ['blur', 'change']}],
},
activity: []
activity: [],
dialogVisible: false,
}
},
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'),
'activity-bx-info': httpVueLoader('/components/activityBx/ActivityBxInfo.vue?v=' + new Date().getTime()),
'sign': httpVueLoader('/components/sign/sign.vue?v=2.0.0')
},
methods: {
@@ -439,15 +459,48 @@ layout("/layouts/platform.html"){
this.openView(data)
} else if (type == 'edit') {
this.openEdit(data)
} else if (type == 'uploadResults') {
this.openUploadResults(data)
} else if (type == 'delete') {
this.doDelete(data)
} else if (type == 'exportWwj') {
this.exportWwj(data, apply_type)
}
},
async uploadResults() {
if (!this.formData.files || this.formData.files.length === 0) {
this.$message.error("请上传成果后在提交");
return
}
const confirm = await this.$confirm("确定要提交成果吗?", '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if (confirm === "confirm") {
const resp = await $.post("/platform/jf/activity_bx/reimbursement/doEdit", {
files: JSON.stringify(this.formData.files),
id: this.formData.id
})
if (resp.code === 0) {
this.$message({
message: resp.msg,
type: 'success'
});
this.doSearch()
this.dialogVisible = false
}
}
},
openUploadResults(data) {
this.formData = data
this.dialogVisible = true
},
exportWwj(row, apply_type) {
const {id, activity_id, activity_type, otherFiles, photoFiles, billFiles} = row
let filesName = null
/*let filesName = null
if (billFiles == undefined || JSON.parse(billFiles).length == 0) filesName = "发票"
if (filesName != null) {
@@ -470,7 +523,8 @@ layout("/layouts/platform.html"){
} else {
window.location.href = "/platform/jf/activity_bx/reimbursementview/doExport?id=" + id
}
}
}*/
window.open("/platform/jf/activity_bx/reimbursementview/doExport?id=" + id)
},
blur() {
let num = 0
@@ -9,38 +9,40 @@ layout("/layouts/platform.html"){
<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="选择年">
placeholder="选择年"
style="width: 150px"
type="year" v-model="pageForm.year"
value-format="yyyy">
</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"
<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')}"
filterable="true">
<el-option v-for="item in unions" :label="item.unionname" :value="item.id"></el-option>
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 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 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>
<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-input @keyup.enter.native="$emit('search')" clearable placeholder="请输入内容"
v-model="pageForm.searchKeyword">
<el-select placeholder="查询类型" slot="prepend" style="width: 120px;"
v-model="pageForm.searchName">
<el-option label="姓名" value="username"></el-option>
<el-option label="工号" value="loginname"></el-option>
<el-option label="活动名称" value="activity_name"></el-option>
@@ -48,18 +50,23 @@ layout("/layouts/platform.html"){
</el-input>
</div>
<div class="btn-group tool-button">
<el-button type="primary" icon="el-icon-search" @click="doSearch"></el-button>
<el-button @click="doSearch" icon="el-icon-search" type="primary"></el-button>
</div>
<div class="pull-right offscreen-right">
<el-button icon="el-icon-download" @click="download">导出名单</i>
<el-button @click="downloadResults" icon="el-icon-download">下载全部成果</i>
</el-button>
</div>
<!-- <div class="pull-right offscreen-right">
<el-button @click="download" icon="el-icon-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"
<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">
@@ -67,51 +74,58 @@ layout("/layouts/platform.html"){
</template>
</el-table-column>
<el-table-column label="活动名称" prop="activity_name" show-overflow-tooltip header-align="center"
align="center">
<el-table-column align="center" header-align="center" label="活动名称"
prop="activity_name"
show-overflow-tooltip>
<template scope="scope">
<el-link type="primary" @click="openView(scope.row)">
<el-link @click="openView(scope.row)" type="primary">
{{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 align="center" header-align="center" label="申请人姓名"
prop="user_name"></el-table-column>
<el-table-column label="工号" prop="bxr_loginname" header-align="center"
align="center"></el-table-column>
<el-table-column align="center" header-align="center" label="工号"
prop="bxr_loginname"></el-table-column>
<el-table-column label="所属工会" prop="bxr_unionname" header-align="center" sortable
align="center"></el-table-column>
<el-table-column align="center" header-align="center" label="所属工会"
prop="bxr_unionname"
sortable></el-table-column>
<el-table-column label="活动主体类型" prop="activity_type" header-align="center" align="center" sortable>
<el-table-column align="center" header-align="center" label="活动主体类型"
prop="activity_type" sortable>
<template scope="{row}">
{{ row.activity_type == 40002 ? "分工会活动" : row.activity_type == 40003 ? "协会(社团)活动" :
{{ row.activity_type == 40002 ? "分工会活动" : row.activity_type == 40003 ?
"协会(社团)活动" :
"校工会活动"}}
</template>
</el-table-column>
<el-table-column label="活动项目类型" prop="absName" header-align="center"
align="center" sortable>
<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 label="申请类型" prop="apply_type" header-align="center" sortable
align="center">
<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 label="申请时间" prop="apply_time" header-align="center" sortable
align="center"></el-table-column>
<el-table-column align="center" header-align="center" label="申请时间"
prop="apply_time"
sortable></el-table-column>
<el-table-column align="center" prop="state_id" header-align="center" label="申请状态" sortable>
<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>
@@ -119,7 +133,7 @@ layout("/layouts/platform.html"){
<!--下拉操作按钮-->
<el-table-column align="center" header-align="center" label="操作" fixed="right"
<el-table-column align="center" fixed="right" header-align="center" label="操作"
width="120px">
<template slot-scope="{row}">
<el-dropdown @command="dropdownCommand">
@@ -131,14 +145,14 @@ layout("/layouts/platform.html"){
<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:'exportWwj',data:row}">
<el-dropdown-item :command="{type:'exportWwj',data:row}"
v-if="row.state_id==1060&&row.apply_type!=2">
导出申请表
</el-dropdown-item>-->
<el-dropdown-item v-if="1060==row.state_id"
:command="{type:'exportWwj',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>
@@ -175,7 +189,11 @@ layout("/layouts/platform.html"){
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']}],
activity_content: [{
required: true,
message: '必填',
trigger: ['blur', 'change']
}],
},
unions: [],
units: [],
@@ -185,7 +203,7 @@ layout("/layouts/platform.html"){
'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'),
'activity-bx-info': httpVueLoader('/components/activityBx/ActivityBxInfo.vue?v=' + new Date().getTime()),
},
methods: {
dropdownCommand(command) {
@@ -197,34 +215,42 @@ layout("/layouts/platform.html"){
this.exportWwj(data)
}
},
downloadResults() {
if (!(this.pageForm.year && this.pageForm.year.length)) {
this.$message.error("请选择日期");
return
}
window.open("/platform/jf/activity_bx/reimbursementview/downloadResults?year=" + this.pageForm.year)
},
exportWwj(row) {
const {id, apply_type, activity_type, otherFiles, photoFiles, billFiles} = row
let filesName = null
if (billFiles == undefined || JSON.parse(billFiles).length == 0) filesName = "发票"
/* 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
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(() => {
}).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
}
}
});
} 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
}
}*/
window.open("/platform/jf/activity_bx/reimbursementview/doExport?id=" + id)
},
download() {
if (!(this.pageForm.year && this.pageForm.year.length)) {