259 lines
11 KiB
HTML
259 lines
11 KiB
HTML
<!--#
|
||
layout("/layouts/platform.html"){
|
||
#-->
|
||
<style>
|
||
.el-radio-group {
|
||
vertical-align: unset !important;
|
||
}
|
||
</style>
|
||
<div id="app" v-clock>
|
||
<guava ref="guava">
|
||
<syr-table auditval="审核" ref="syrTable" request="/platfotm/syr/info/pwlxps/pageData">
|
||
<template slot="operation">
|
||
<el-table-column fixed="right" label="操作" width="300">
|
||
<template slot-scope="{row}">
|
||
<!--如果是超管 根据状态来判断评委是否都评审完-->
|
||
<template v-if="hasAdminRole">
|
||
<el-button size="mini"
|
||
:type="row.state>40?null:'primary'"
|
||
@click="openView(row,row.state>40)">
|
||
{{row.state>40?'查看':'评审'}}
|
||
</el-button>
|
||
|
||
</template>
|
||
<!--如果是评委-->
|
||
<template v-else>
|
||
<el-button
|
||
:type="row.isps>0?null:'primary'"
|
||
@click="openView(row,row.isps>0)"
|
||
size="mini">
|
||
{{row.isps>0?'查看':'评审'}}
|
||
</el-button>
|
||
<el-button
|
||
:type="row.isps>0?'primary':''"
|
||
@click="openEdit(row)"
|
||
size="mini"
|
||
v-if="[50].includes(row.state)">
|
||
修改
|
||
</el-button>
|
||
</template>
|
||
<el-button size="mini" type="danger" v-if="row.state>40 && row.state<=50"
|
||
@click="doRollBack(row)">撤回
|
||
</el-button>
|
||
|
||
<!--<el-button
|
||
size="mini"
|
||
:type="row.state>40?null:'primary'"
|
||
@click="openView(row,row.state>40)">
|
||
{{row.state>40?'查看':'评审'}}
|
||
</el-button>-->
|
||
</template>
|
||
</el-table-column>
|
||
</template>
|
||
</syr-table>
|
||
|
||
|
||
<template #edit>
|
||
<syr-info-new ref="auditInfo">
|
||
<template #handle>
|
||
<el-tab-pane label="评委立项评审" name="pwlxps">
|
||
<el-form :model="formData" :rules="rules" label-suffix=":" label-width="100px" ref="form">
|
||
<el-row type="flex">
|
||
<el-col>
|
||
<el-form-item label="评委" prop="pwid">
|
||
<span v-if="hasAdminRole">
|
||
<el-select v-model="formData.pwid">
|
||
<el-option v-for="u in userList"
|
||
:value="u.userid"
|
||
:key="u.userid"
|
||
:label="u.username + '-' +u.loginname">
|
||
</el-option>
|
||
</el-select>
|
||
</span>
|
||
<span v-else>
|
||
${@shiro.getPrincipalProperty('username')}
|
||
</span>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col>
|
||
<el-form-item label="审核时间">
|
||
{{moment().format('YYYY-MM-DD')}}
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
<el-row type="flex">
|
||
<el-col>
|
||
<el-form-item label="建议立项" prop="isjylx">
|
||
<el-radio-group v-model="formData.isjylx">
|
||
<el-radio :label="1">是</el-radio>
|
||
<el-radio :label="0">否</el-radio>
|
||
</el-radio-group>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col>
|
||
<el-form-item label="立项等次" prop="lxlevel" v-if="formData.isjylx===1">
|
||
<el-radio-group v-model="formData.lxlevel">
|
||
<el-radio label="2000" value="2000">2000元</el-radio>
|
||
<el-radio label="3000" value="3000">3000元</el-radio>
|
||
<el-radio label="5000" value="5000">5000元</el-radio>
|
||
</el-radio-group>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
|
||
<el-form-item label="评审意见" prop="psyj">
|
||
<el-input maxlength="50" rows="5" show-word-limit type="textarea"
|
||
v-model="formData.psyj"></el-input>
|
||
</el-form-item>
|
||
<!--<el-form-item label="签字" prop="pwlxqz">
|
||
<sign :qz.sync="formData.pwlxqz" prefix="pwlxqz"></sign>
|
||
</el-form-item>-->
|
||
</el-form>
|
||
<el-row class="mt20 text-center">
|
||
<el-button @click="$refs.guava.index()">返 回</el-button>
|
||
<el-button @click="doHandle" type="primary">确 定</el-button>
|
||
</el-row>
|
||
</el-tab-pane>
|
||
</template>
|
||
</syr-info-new>
|
||
</template>
|
||
|
||
<template #view>
|
||
<syr-info-new ref="viewInfo"></syr-info-new>
|
||
</template>
|
||
|
||
</guava>
|
||
</div>
|
||
<script>
|
||
let vue = new Vue({
|
||
el: '#app',
|
||
mixins: [initTableMixins],
|
||
data() {
|
||
return {
|
||
smm: {
|
||
status: 'table'
|
||
},
|
||
formData: {},
|
||
searchData: {
|
||
unionid: '',
|
||
unitid: ''
|
||
},
|
||
userList: [],
|
||
rules: {
|
||
pwid: [{required: true, message: '请选择评委', trigger: ['blur', 'change']}],
|
||
psyj: [{required: true, message: '请输入评审意见(最多填写50个字)', trigger: ['blur', 'change']}],
|
||
pwlxqz: [{required: true, message: '请签字', trigger: ['blur', 'change']}],
|
||
},
|
||
//拥有其它权限吗 校管 超管
|
||
hasAdminRole: false,
|
||
isEdit: false
|
||
}
|
||
},
|
||
components: {
|
||
'syr-table': httpVueLoader('/components/syr/syrtable.vue'),
|
||
'syr-info': httpVueLoader('/components/syr/syrinfo.vue'),
|
||
'syr-info-new': httpVueLoader('/components/syr/SyrInfoNew.vue'),
|
||
},
|
||
methods: {
|
||
openView(row, isView) {
|
||
if (isView) {
|
||
this.$refs.guava.view()
|
||
this.$refs.viewInfo.openView(row.id)
|
||
} else {
|
||
this.isEdit = false
|
||
this.$refs.guava.edit()
|
||
this.$refs.auditInfo.openView(row.id, 'pwlxps')
|
||
this.formData = {
|
||
xmid: row.id,
|
||
isjylx: 1,
|
||
lxlevel: '2000',
|
||
psyj: '',
|
||
pwid: this.hasAdminRole ? '' : "${@shiro.getPrincipalProperty('id')}"
|
||
}
|
||
this.getWpsPwList(row.id)
|
||
}
|
||
},
|
||
async openEdit(row) {
|
||
this.isEdit = true
|
||
this.$refs.guava.edit()
|
||
this.$refs.auditInfo.openView(row.id, 'pwlxps')
|
||
const resp = await $.get(loc() + '/getLxpsInfo', {
|
||
xmId: row.id,
|
||
pwId: "${@shiro.getPrincipalProperty('id')}"
|
||
})
|
||
if (resp.code === 0) {
|
||
this.$set(this.formData, 'xmid', resp.data.xmid)
|
||
this.$set(this.formData, 'isjylx', resp.data.isjylx ? 1 : 0)
|
||
this.$set(this.formData, 'lxlevel', resp.data.lxlevel)
|
||
this.$set(this.formData, 'psyj', resp.data.psyj)
|
||
this.$set(this.formData, 'pwid', resp.data.pwid)
|
||
this.$set(this.formData, 'pwlxqz', resp.data.pwlxqz)
|
||
} else {
|
||
this.notifyWarning(resp.msg)
|
||
}
|
||
this.getWpsPwList(row.id)
|
||
/*console.log(resp.data)
|
||
this.formData = {
|
||
xmid: row.id,
|
||
isjylx: '1',
|
||
lxlevel: '2000',
|
||
psyj: '',
|
||
pwid: this.hasAdminRole ? '' : "${@shiro.getPrincipalProperty('id')}"
|
||
}*/
|
||
|
||
},
|
||
async doHandle() {
|
||
try {
|
||
const valid = await this.$refs['form'].validate()
|
||
if (valid) {
|
||
if (this.formData.pwlxqz === '') {
|
||
this.$message.info('请扫描二维码签字')
|
||
return
|
||
}
|
||
const reqUrl = this.isEdit ? '/platfotm/syr/info/pwlxps/doEdit' : '/platfotm/syr/info/pwlxps/doHandle'
|
||
|
||
const resp = await $.post(reqUrl, this.formData)
|
||
if (resp.code === 0) {
|
||
this.$refs.guava.index()
|
||
this.notifySuccess(resp.msg)
|
||
this.$refs['syrTable'].doSearch()
|
||
}
|
||
}
|
||
} catch (e) {
|
||
console.log(e)
|
||
}
|
||
|
||
// this.$refs['form'].validate(async valid => {
|
||
// if (valid) {
|
||
// await POST('/platfotm/syr/info/pwlxps/doHandle', this.formData)
|
||
// this.smm = {
|
||
// status: 'table',
|
||
// showpane: [1, 2, 3, 4]
|
||
// }
|
||
// }
|
||
// })
|
||
},
|
||
async getWpsPwList(xmid) {
|
||
const {data} = await $.get('/platfotm/syr/info/pwlxps/getWpsPwList', {xmid: xmid})
|
||
this.userList = data
|
||
},
|
||
async doRollBack(row) {
|
||
const resp = await $.get('/platfotm/syr/info/yjsh/doRollBack', {id: row.id, state: row.state})
|
||
if (resp.code === 0) {
|
||
this.notifySuccess(resp.msg)
|
||
this.$refs['syrTable'].doSearch()
|
||
}
|
||
}
|
||
},
|
||
async created() {
|
||
if (${@shiro.hasRole('sysadmin')} || ${@shiro.hasRole('A06')}) {
|
||
this.hasAdminRole = true
|
||
}
|
||
}
|
||
})
|
||
</script>
|
||
|
||
<!--#
|
||
}
|
||
#-->
|