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

View File

@ -59,10 +59,10 @@ export default {
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
return j
})
})))
console.log(this.form.roleDtos)
},
methods: {