first commit
This commit is contained in:
@@ -0,0 +1,291 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.el-table__expand-icon {
|
||||
color: #de194f;
|
||||
}
|
||||
|
||||
.el-table__expand-icon > .el-icon-arrow-right {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<proposal-search :page="pageForm" @search="doSearch" :has_seconded="false" title="附议"></proposal-search>
|
||||
|
||||
<el-card shadow="never" class="mt20">
|
||||
<table-tool label="附议提案" :app="this">
|
||||
<template #func>
|
||||
<el-button v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('tamange')}"
|
||||
type="primary" size="small" @click="openOneClickRemind"
|
||||
:disabled="pageForm.isAudit">一键提醒
|
||||
</el-button>
|
||||
</template>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" style="width: 100%" row-key="secondedId" @sort-change="pageOrder"
|
||||
:key="tableKey"
|
||||
:size="tableSize"
|
||||
v-loading="tableLoading"
|
||||
:tree-props="{children: 'children'}"
|
||||
|
||||
>
|
||||
<el-table-column align="center" header-align="center" label="序号" type="index" width="80">
|
||||
<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"
|
||||
v-for="column in tableColumns"
|
||||
show-overflow-tooltip
|
||||
:label="column.label"
|
||||
:width="column.width"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
>
|
||||
<template v-if="column.prop=='proposalName'" scope="{row}">
|
||||
<el-link type="primary" @click="openView(row)">{{row.proposalName}}</el-link>
|
||||
</template>
|
||||
<template v-else-if="column.prop=='isAgree'" scope="{row}">
|
||||
<span class="text-primary" v-if="row.isAgree==undefined">未附议</span>
|
||||
<span class="text-danger" v-if="row.isAgree==false">不同意</span>
|
||||
<span class="text-success" v-if="row.isAgree==true">同意</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="操作" fixed="right" width="150">
|
||||
<template scope="{row}">
|
||||
<el-button size="mini" type="primary" @click="openView(row)">查看</el-button>
|
||||
<el-button type="primary" size="mini" @click="openAudit(row)"
|
||||
v-if="[proposal.UNSUBMIT,150].includes(row.stateCode) && row.isAgree==null">
|
||||
附议
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<!-- <template #edit_func>
|
||||
<el-button :disabled="subDis" icon="el-icon-close" @click="doAudit(false)">拒绝</el-button>
|
||||
<el-button type="primary" :disabled="subDis" icon="el-icon-check" @click="doAudit(true)">同意</el-button>
|
||||
</template>-->
|
||||
|
||||
<template #edit>
|
||||
<proposal-info ref="audit" label="附议" handle>
|
||||
<template #handle>
|
||||
<el-form :model="formData" ref="auditForm" :rules="formRules" label-width="120px">
|
||||
<vi-title title="审核信息"></vi-title>
|
||||
<el-row gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="username" label="附议人">
|
||||
<el-input v-model="formData.username" readonly></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="auditTime" label="附议时间">
|
||||
<el-input v-model="formData.auditTime" readonly></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-form-item label="签 字" prop="seconderSign" v-if="isSign()">
|
||||
<sign prefix="proposal" :qz.sync="formData.seconderSign"></sign>
|
||||
</el-form-item>
|
||||
|
||||
<el-row style="margin: 40px 0;text-align: right">
|
||||
<el-button :disabled="subDis" icon="el-icon-close" @click="doAudit(false)">拒绝</el-button>
|
||||
<el-button type="primary" :disabled="subDis" icon="el-icon-check" @click="doAudit(true)">
|
||||
同意
|
||||
</el-button>
|
||||
</el-row>
|
||||
|
||||
</el-form>
|
||||
</template>
|
||||
</proposal-info>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<proposal-info ref="info"></proposal-info>
|
||||
</template>
|
||||
</guava>
|
||||
|
||||
<el-dialog :visible.sync="oneKeyRemindDialogVisible" title="一键提醒" width="60%" :close-on-click-modal="false"
|
||||
top="50px">
|
||||
<el-table :data="oneKeyTableData" ref="oneKeyRemindTable" size="small" max-height="500px">
|
||||
<el-table-column type="selection" width="55"></el-table-column>
|
||||
<el-table-column type="index" label="序号"></el-table-column>
|
||||
<el-table-column prop="proposalCode" label="提案编号" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="proposalName" label="提案名称" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="delegationName" label="代表团" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="tzUserName" label="团长姓名" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="tzloginName" label="团长工号" show-overflow-tooltip></el-table-column>
|
||||
</el-table>
|
||||
<el-row type="flex" justify="end" class="mt20">
|
||||
<el-button @click="oneKeyRemindDialogVisible = false">取消</el-button>
|
||||
<el-button @click="confirmOneKeyRemind" type="primary">确定</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
'proposal-info': httpVueLoader('/components/proposal/ProposalInfo.vue'),
|
||||
'proposal-search': httpVueLoader('/components/proposal/ProposalSearch.vue'),
|
||||
'proposal-table': httpVueLoader('/components/proposal/ProposalTable.vue'),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
oneKeyRemindDialogVisible: false,
|
||||
oneKeyTableData: [],
|
||||
tableColumns: [
|
||||
{prop: 'proposalCode', label: '提案编号', width: "120", sortable: true, disabled: true},
|
||||
{prop: 'proposalName', label: '提案名称', width: "300", disabled: true},
|
||||
{prop: 'username', label: '提案人', disabled: true},
|
||||
{prop: 'typeName', label: '提案类型', sortable: true},
|
||||
{prop: 'typeCode', label: '提案类型编码', sortable: true, checked: 0},
|
||||
{prop: 'meetingName', label: '届次', sortable: true},
|
||||
{prop: 'delegationName', label: '代表团', sortable: true},
|
||||
{prop: 'delegationCode', label: '代表团编码', sortable: true, checked: 0},
|
||||
{prop: 'stateName', label: '提案状态', sortable: true},
|
||||
{prop: 'secondedUserName', label: '附议人', sortable: true},
|
||||
{prop: 'isAgree', label: '附议状态', sortable: true},
|
||||
],
|
||||
isSign: () => {
|
||||
return proposal.needSignState.map(v => v.stateCode).includes(proposal.INVIRTE)
|
||||
},
|
||||
subDis: false,
|
||||
pageForm: {searchName: 'proposalName', isAudit: false},
|
||||
formData: {
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
loginName: "${@shiro.getPrincipalProperty('loginname')}",
|
||||
auditTime: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||
seconderSign: ""
|
||||
},
|
||||
formRules: {
|
||||
implementUnitId: [{required: true, message: '请选择建议落实部门', trigger: ['blur', 'change']}],
|
||||
seconderSign: [{required: true, message: '请扫描二维码进行签字', trigger: ['blur', 'change']}],
|
||||
},
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
'formData.seconderSign'(val){
|
||||
if(this.$refs.auditForm){
|
||||
this.$refs.auditForm.validateField(['seconderSign'])
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async openOneClickRemind() {
|
||||
const {meetingId} = this.pageForm
|
||||
if (!meetingId) {
|
||||
this.notifyWarning('请先选择教代会')
|
||||
return
|
||||
}
|
||||
const resp = await $.post(loc() + '/readyToRemindRecords', {meetingId})
|
||||
if (resp.code === 0) {
|
||||
this.oneKeyRemindDialogVisible = true
|
||||
this.oneKeyTableData = resp.data
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
async confirmOneKeyRemind() {
|
||||
const selection = this.$refs.oneKeyRemindTable.selection
|
||||
if (selection.length === 0) {
|
||||
this.notifyWarning('没有可提醒的记录!')
|
||||
return
|
||||
}
|
||||
const proposalIds = selection.map(v => v.id)
|
||||
const resp = await $.post(loc() + '/doConfirmRemind', {proposalIds: JSON.stringify(proposalIds)})
|
||||
if (resp.code === 0) {
|
||||
this.oneKeyRemindDialogVisible = false
|
||||
this.notifySuccess(resp.msg)
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
async load(tree, treeNode, resolve) {
|
||||
const {id, secondedId} = tree
|
||||
const resp = await $.get(loc() + "/getSecondedList", {id: id, secondedId: secondedId})
|
||||
if (resp.code === 0) {
|
||||
resolve(resp.data)
|
||||
} else {
|
||||
resolve([])
|
||||
}
|
||||
},
|
||||
openView(row) {
|
||||
this.$refs.guava.view()
|
||||
this.$refs.info.openView(row.id)
|
||||
},
|
||||
openAudit(row) {
|
||||
this.formData.secondedId = row.secondedId
|
||||
this.formData.proposalId = row.id
|
||||
this.formData.delegationId = row.delegationId
|
||||
this.formData.proposalName = row.proposalName
|
||||
this.formData.createUser = row.createUser
|
||||
this.$refs.guava.edit()
|
||||
this.$refs.audit.openView(row.id)
|
||||
},
|
||||
async doAudit(flag) {
|
||||
this.$refs.auditForm.validate(async valid => {
|
||||
if(valid){
|
||||
const flagText = flag ? '同意' : '拒绝'
|
||||
const msgRes = await this.$confirm('您是否要' + flagText + '该提案?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (msgRes === 'confirm') {
|
||||
this.subDis = true
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '正在提交...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: COVER_LAYER_COLOR
|
||||
});
|
||||
|
||||
const resp = await $.post(loc() + "/doAudit", {
|
||||
secondedId: this.formData.secondedId,
|
||||
proposalId: this.formData.proposalId,
|
||||
proposalName: this.formData.proposalName,
|
||||
createUser: this.formData.createUser,
|
||||
flag: flag,
|
||||
seconderSign: this.formData.seconderSign
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.$notify.success({title: '成功', message: resp.msg});
|
||||
this.pageData()
|
||||
this.$refs.guava.index()
|
||||
} else {
|
||||
this.$notify.error({title: '失败', message: resp.msg});
|
||||
}
|
||||
loading.close()
|
||||
this.subDis = false
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
await proposal.initData(this)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user