This commit is contained in:
xiongchengqiang 2020-12-02 15:20:29 +08:00
parent bb87ee9ef0
commit 9e7bdc4d51
2 changed files with 83 additions and 70 deletions

View File

@ -1,8 +1,7 @@
<!-- --> <!-- -->
<template> <template>
<div> <div>
<div <div style="display:inline-block;margin:0 4px;"
style="display:inline-block;margin:0 4px;"
v-for="(i,index) in authList.filter(i=>i.info)" v-for="(i,index) in authList.filter(i=>i.info)"
:key="index"> :key="index">
<el-button size="mini" <el-button size="mini"
@ -20,23 +19,26 @@
<el-button size="mini" v-if="info && formList.auth.tiaozhuang" :disabled='formList.auth.tiaozhuang===1' @click="handleJump" type="primary" plain>跳过</el-button> <el-button size="mini" v-if="info && formList.auth.tiaozhuang" :disabled='formList.auth.tiaozhuang===1' @click="handleJump" type="primary" plain>跳过</el-button>
<el-button size="mini" @click="handleZhuanjiao" type="primary" plain> </el-button> --> <el-button size="mini" @click="handleZhuanjiao" type="primary" plain> </el-button> -->
<!-- <el-button size="mini" v-if="info" @click="handleCuiban" type="warning" plain>催办</el-button> --> <!-- <el-button size="mini" v-if="info" @click="handleCuiban" type="warning" plain>催办</el-button> -->
<getPersonnel @cb='cb' v-if="isShowPersonnel" :isShow.sync='isShowPersonnel' :len='1'/> <getPersonnel @cb='cb'
v-if="isShowPersonnel"
:isShow.sync='isShowPersonnel'
:len='1' />
<!-- 驳回 --> <!-- 驳回 -->
<popup-right <popup-right v-if="bohui"
v-if="bohui"
@cancel='handleCancel' @cancel='handleCancel'
@submit="handleSubmit" @submit="handleSubmit"
:footer='true' :footer='true'
title="驳回" title="驳回">
> <div slot="content"
<div class="chooseManage">
slot="content" <el-form style="width:400px;"
class="chooseManage" :model="form"
> :rules="rules"
<el-form style="width:400px;" :model="form" :rules="rules" ref="form" label-width="80px" class="demo-ruleForm"> ref="form"
<el-form-item label="驳回理由" > label-width="80px"
<el-input class="demo-ruleForm">
:rows="5" <el-form-item label="驳回理由">
<el-input :rows="5"
type="textarea" type="textarea"
v-model="form.comment" v-model="form.comment"
placeholder="请输入驳回理由" placeholder="请输入驳回理由"
@ -47,11 +49,12 @@
</div> </div>
</popup-right> </popup-right>
<!-- 同意 --> <!-- 同意 -->
<el-dialog title="意见说明" :visible.sync="dialogFormVisible"> <el-dialog title="意见说明"
<el-form :model="form" ref="form"> :visible.sync="dialogFormVisible">
<el-form-item label="" > <el-form :model="form"
<el-input ref="form">
:rows="5" <el-form-item label="">
<el-input :rows="5"
type="textarea" type="textarea"
v-model="form.comment" v-model="form.comment"
placeholder="请输入意见说明" placeholder="请输入意见说明"
@ -59,9 +62,13 @@
show-word-limit></el-input> show-word-limit></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer"
<el-button size="small" @click="dialogFormVisible = false"> </el-button> class="dialog-footer">
<el-button size="small" type="primary" @click="handleAgree"> </el-button> <el-button size="small"
@click="dialogFormVisible = false"> </el-button>
<el-button size="small"
type="primary"
@click="handleAgree"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
@ -90,6 +97,12 @@ export default {
info: !this.info, info: !this.info,
permis: 'resultInput', permis: 'resultInput',
click: this.handleJieguo click: this.handleJieguo
}, {
name: '修改目标',
type: 'primary',
info: !this.info,
permis: 'changeResult',
click: this.handleJieguo
}, },
{ {
name: '开始评分', name: '开始评分',
@ -167,17 +180,17 @@ export default {
PopupRight PopupRight
}, },
computed: {}, computed: {},
beforeMount () {}, beforeMount () { },
mounted () { mounted () {
}, },
methods: { methods: {
// //
handleJieguo () { handleJieguo () {
this.$emit('update:tableInfo', Object.assign({}, this.tableInfo, {result: true})) this.$emit('update:tableInfo', Object.assign({}, this.tableInfo, { result: true }))
}, },
// //
handlePingfen () { handlePingfen () {
this.$emit('update:tableInfo', Object.assign({}, this.tableInfo, {score: true})) this.$emit('update:tableInfo', Object.assign({}, this.tableInfo, { score: true }))
}, },
// //
handleTongyi () { handleTongyi () {
@ -185,7 +198,7 @@ export default {
}, },
async handleAgree () { async handleAgree () {
this.$loadingStart() this.$loadingStart()
let res = await this.handlApiSaveapproval({status: 1, menuName: '同意了'}) let res = await this.handlApiSaveapproval({ status: 1, menuName: '同意了' })
this.$loadingEnd() this.$loadingEnd()
this.dialogFormVisible = !!res this.dialogFormVisible = !!res
}, },
@ -202,9 +215,9 @@ export default {
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(async () => { }).then(async () => {
const obj = {status: 3, menuName: '催办了'} const obj = { status: 3, menuName: '催办了' }
if (this.info) obj.flowRecordId = this.info.flowRecordId if (this.info) obj.flowRecordId = this.info.flowRecordId
const params = Object.assign({}, this.form, {resultRecordId: this.resultRecordId || ''}, obj) const params = Object.assign({}, this.form, { resultRecordId: this.resultRecordId || '' }, obj)
this.$loadingStart() this.$loadingStart()
let res = await apiSaveapproval(params) let res = await apiSaveapproval(params)
this.$loadingEnd() this.$loadingEnd()
@ -233,10 +246,10 @@ export default {
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(async () => { }).then(async () => {
const obj = {status: 4, menuName: '跳过了'} const obj = { status: 4, menuName: '跳过了' }
if (this.info) obj.flowRecordId = this.info.flowRecordId if (this.info) obj.flowRecordId = this.info.flowRecordId
if (this.$attrs.flowRecordId) obj.flowRecordId = this.$attrs.flowRecordId if (this.$attrs.flowRecordId) obj.flowRecordId = this.$attrs.flowRecordId
const params = Object.assign({}, this.form, {resultRecordId: this.resultRecordId || ''}, obj) const params = Object.assign({}, this.form, { resultRecordId: this.resultRecordId || '' }, obj)
this.$loadingStart() this.$loadingStart()
let res = await apiSaveapproval(params) let res = await apiSaveapproval(params)
this.$loadingEnd() this.$loadingEnd()
@ -272,7 +285,7 @@ export default {
}, },
async handleSubmit () { async handleSubmit () {
this.$loadingStart() this.$loadingStart()
let res = await this.handlApiSaveapproval({status: 5, menuName: '驳回了'}) let res = await this.handlApiSaveapproval({ status: 5, menuName: '驳回了' })
this.$loadingEnd() this.$loadingEnd()
this.bohui = !!res this.bohui = !!res
}, },
@ -280,11 +293,11 @@ export default {
this.bohui = false this.bohui = false
}, },
async cb (info) { async cb (info) {
const obj = {status: 8, menuName: '转交了', transferStaffId: info.value} const obj = { status: 8, menuName: '转交了', transferStaffId: info.value }
if (this.info) { if (this.info) {
obj.flowRecordId = this.info.flowRecordId obj.flowRecordId = this.info.flowRecordId
} else if (this.formList.flowRecordId !== 0) obj.flowRecordId = this.formList.flowRecordId } else if (this.formList.flowRecordId !== 0) obj.flowRecordId = this.formList.flowRecordId
const params = Object.assign({}, this.form, {resultRecordId: this.resultRecordId || ''}, obj) const params = Object.assign({}, this.form, { resultRecordId: this.resultRecordId || '' }, obj)
let res = await apiSaveapproval(params) let res = await apiSaveapproval(params)
if (res.code !== 200) { if (res.code !== 200) {
this.$message.error(res.msg) this.$message.error(res.msg)
@ -301,7 +314,7 @@ export default {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
this.$refs.form.validate(async v => { this.$refs.form.validate(async v => {
if (v) { if (v) {
const params = Object.assign({}, this.form, {resultRecordId: this.resultRecordId || ''}, obj) const params = Object.assign({}, this.form, { resultRecordId: this.resultRecordId || '' }, obj)
let res = await apiSaveapproval(params) let res = await apiSaveapproval(params)
if (res.code !== 200) { if (res.code !== 200) {
this.$message.error(res.msg) this.$message.error(res.msg)

View File

@ -59,10 +59,10 @@ export default {
optType: -1 optType: -1
} }
] ]
this.listinfo = this.form.roleDtos.map(j => { this.listinfo = JSON.parse(JSON.stringify(this.form.roleDtos.map(j => {
j.checked = this.form.chartDetails.recordSimpleDtos[0].roleIds ? this.form.chartDetails.recordSimpleDtos[0].roleIds.includes(String(j.roleId)) : false j.checked = this.form.chartDetails.recordSimpleDtos[0].roleIds ? this.form.chartDetails.recordSimpleDtos[0].roleIds.includes(String(j.roleId)) : false
return j return j
}) })))
console.log(this.form.roleDtos) console.log(this.form.roleDtos)
}, },
methods: { methods: {