fix
This commit is contained in:
@@ -4,8 +4,8 @@
|
||||
<ai-title slot="title" title="审批详情" isShowBack isShowBottomBorder @onBackClick="approval.goBack()">
|
||||
<template #rightBtn>
|
||||
<template v-if="listType==0&&$permissions('zwsp_oaapprovalapplyinfo_approve')">
|
||||
<el-button size="small" class="iconfont iconClean del-btn-list" @click="agreeRefulse(0)">拒绝</el-button>
|
||||
<el-button size="small" type="primary" class="iconfont iconCorrect" @click="agreeRefulse(1)">同意</el-button>
|
||||
<el-button size="small" icon="iconfont iconClean del-btn-list" @click="agreeRefulse(0)">拒绝</el-button>
|
||||
<el-button size="small" type="primary" icon="iconfont iconCorrect" @click="agreeRefulse(1)">同意</el-button>
|
||||
</template>
|
||||
<el-button v-if="listType==2&&detail.approvalStatus==0&&$permissions('app_oaapprovalapplyinfo_del')"
|
||||
size="small" class="iconfont iconRevoke del-btn-list" style="width: 76px;" @click="recall">撤回
|
||||
@@ -157,9 +157,9 @@
|
||||
<span class="li_opinion" v-if="item.annexFiles && item.annexFiles.length>0">审批附件:</span>
|
||||
<div style="flex: 1;">
|
||||
<div class="desc_div">
|
||||
<img @click="openImg(value.accessUrl)" v-for="(value,_v) in item.pictureFiles" :key="_v"
|
||||
:src="value.accessUrl" alt="图片" width="80px" height="80px"
|
||||
style="border: 1px solid #ddd;cursor: pointer;">
|
||||
<el-image v-for="(value,_v) in item.pictureFiles" :key="_v" :preview-src-list="[value.accessUrl]"
|
||||
:src="value.accessUrl" alt="图片" width="80px" height="80px"
|
||||
style="border: 1px solid #ddd;cursor: pointer;"/>
|
||||
</div>
|
||||
<ul class="file_ul">
|
||||
<li v-for="(v,_i) in item.annexFiles" :key="_i" @click="downFile(v.accessUrl)">
|
||||
@@ -205,15 +205,12 @@
|
||||
</template>
|
||||
</ai-detail>
|
||||
|
||||
<el-dialog :visible.sync="isOpen" width="600px">
|
||||
<img :src="imgUrl" alt="" width="100%" height="500px">
|
||||
</el-dialog>
|
||||
|
||||
<!--审批同意、拒绝-->
|
||||
<el-dialog :title="titleType" center :visible.sync="isAgree" width="720px" v-loading="loading"
|
||||
:close-on-click-modal="false" @close="form.fieldInfos = []">
|
||||
<div style="height: 400px;overflow-y: auto;">
|
||||
<el-form size="small" :model="form" label-width="90px" ref="ruleForm" label-position="right"
|
||||
<div style="max-height: 400px;overflow-y: auto;">
|
||||
<el-form size="small" :model="form" label-width="120px" ref="ruleForm" label-position="right"
|
||||
class="dialog-form">
|
||||
<el-form-item v-for="(op,i) in form.fieldInfos" :key="i"
|
||||
:label="op.fieldName + (op.fieldNameSuffix ? op.fieldNameSuffix : '')" class="dynamicFormItem"
|
||||
@@ -240,15 +237,15 @@
|
||||
type="date"
|
||||
placeholder="请选择">
|
||||
</el-date-picker>
|
||||
<ai-select v-if="op.fieldDataType=='9'" v-model="op.fieldValue"
|
||||
:selectList="dict.getDict(op.dictionaryCode)"/>
|
||||
<ai-select v-if="op.fieldDataType=='9'" v-model="op.fieldValue" :selectList="dict.getDict(op.dictionaryCode)"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="审批意见" prop="opinion" :rules="[{ required: true, message: '请输入审批意见', trigger: 'blur' }]"
|
||||
v-if="titleType=='审批拒绝'">
|
||||
<el-input type="textarea" :rows="4" v-model.trim="form.opinion" placeholder="请输入" show-word-limit
|
||||
:maxlength="150"></el-input>
|
||||
<el-form-item label="指定审批人" prop="appointNextCandidateId" :rules="[{ required: true, message: '请选择指定审批人'}]" v-if="form.nextNodeAreaFilter==3">
|
||||
<ai-select v-model="form.appointNextCandidateId" :selectList="form.nextCandidateList"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="图片" prop="imgList" style="position: relative;">
|
||||
<el-form-item label="审批意见" prop="opinion" :rules="[{ required: true, message: '请输入审批意见', trigger: 'blur' }]" v-if="!form.pass">
|
||||
<el-input type="textarea" :rows="4" v-model.trim="form.opinion" placeholder="请输入" show-word-limit :maxlength="150"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="图片" prop="imgList" style="position: relative;" v-if="form.pictureEnable==1">
|
||||
<span style="position: absolute;left: -78px;top: 18px;font-size: 12px;color: #999;">(最多9张)</span>
|
||||
<el-upload
|
||||
action
|
||||
@@ -268,7 +265,7 @@
|
||||
</div>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item label="附件" prop="fileList">
|
||||
<el-form-item label="附件" prop="fileList" v-if="form.annexEnable==1">
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
action
|
||||
@@ -324,7 +321,6 @@ export default {
|
||||
detailObj: {},
|
||||
dataList: [],
|
||||
processList: [],
|
||||
titleType: '',
|
||||
isAgree: false,
|
||||
form: {
|
||||
id: '',
|
||||
@@ -344,7 +340,6 @@ export default {
|
||||
fileList: [],
|
||||
alreadyList: [],//已审批的
|
||||
imgUrl: '',
|
||||
isOpen: false,
|
||||
url: "/admin/sysunit/getAll2",
|
||||
applyForm: {},
|
||||
menuList: ["基本信息", '申请表单', '附件材料', "审批记录"],
|
||||
@@ -370,7 +365,8 @@ export default {
|
||||
{slot: "annex"},
|
||||
{slot: "options"}
|
||||
]
|
||||
}
|
||||
},
|
||||
titleType: v => v.form.pass ? '审批同意' : '审批拒绝'
|
||||
},
|
||||
methods: {
|
||||
handleDownload() {
|
||||
@@ -417,10 +413,6 @@ export default {
|
||||
this.fileList = []
|
||||
this.isAgree = false
|
||||
},
|
||||
openImg(url) {
|
||||
this.isOpen = true;
|
||||
this.imgUrl = url;
|
||||
},
|
||||
// 下载
|
||||
downFile(url) {
|
||||
window.open(url);
|
||||
@@ -558,36 +550,22 @@ export default {
|
||||
let dictionaryArr = []
|
||||
this.loading = true
|
||||
this.instance.post(`/app/approv-alapply-info/approval-popup?id=${this.detail.id}&type=${index}`).then(res => {
|
||||
this.loading = false
|
||||
if (res && res.data) {
|
||||
if (res?.data) {
|
||||
if (index == 1) {
|
||||
res.data.fieldInfos.map(e => {
|
||||
if (e.fieldType == 3 && e.dictionaryCode && dictionaryArr.indexOf(e.dictionaryCode) == -1) {
|
||||
this.form = res.data
|
||||
this.form.fieldInfos = res.data.fieldInfos.filter(e => e.fieldType == 3)
|
||||
this.form.nextCandidateList = this.form.nextCandidateList?.map(e => ({dictValue: e.candidate, dictName: e.name}))
|
||||
this.form.fieldInfos.map(e => {
|
||||
if (e.dictionaryCode && !dictionaryArr.includes(e.dictionaryCode)) {
|
||||
dictionaryArr.push(e.dictionaryCode)
|
||||
}
|
||||
})
|
||||
if (dictionaryArr.length) {
|
||||
this.dict.load(dictionaryArr).then(() => {
|
||||
this.form.fieldInfos = res.data.fieldInfos.filter(e => e.fieldType == 3)
|
||||
})
|
||||
} else {
|
||||
this.form.fieldInfos = res.data.fieldInfos.filter(e => e.fieldType == 3)
|
||||
}
|
||||
dictionaryArr.length > 0 && this.dict.load(dictionaryArr)
|
||||
}
|
||||
|
||||
this.form.pass = index == 1
|
||||
this.isAgree = true;
|
||||
if (index == 0) {
|
||||
this.form.pass = false;
|
||||
this.titleType = '审批拒绝';
|
||||
} else {
|
||||
this.form.pass = true;
|
||||
this.titleType = '审批同意';
|
||||
}
|
||||
}
|
||||
}).catch(err => {
|
||||
this.loading = false
|
||||
console.log(err);
|
||||
})
|
||||
}).finally(() => this.loading = false)
|
||||
},
|
||||
saveAgree() {
|
||||
this.form.id = this.detail.id;
|
||||
|
||||
Reference in New Issue
Block a user