Explorar el Código

三级校审重新发起时无法调整附件问题

lizhenhao hace 2 años
padre
commit
c7377649e5

+ 6 - 9
src/views/modules/program/registered/ProjectThreeAuditForm.vue

@@ -7,7 +7,7 @@
         </el-row>
         <el-divider content-position="left"><i class="el-icon-document"></i> 项目校审</el-divider>
       </div>
-      <el-form size="middle" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="formReadOnly"
+      <el-form size="middle" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="status === 'audit' || status === 'taskFormDetail'"
                label-width="125px" @submit.native.prevent>
           <el-row  :gutter="15">
             <el-col :span="12">
@@ -36,7 +36,7 @@
               <el-form-item label="专业评估人员" prop="auditPeopleList"
                             :rules="[{required: true, message: '专业评估人员不能为空', trigger: 'blur'},{required: true, message: '专业评估人员不能为空', trigger: 'change'}]"
               >
-                <UserSelect size="medium" :disabled="formReadOnly" :readonly="true" :limit='10' :value="inputForm.auditPeopleList" @getValue='(value) => {inputForm.auditPeopleList = value}'></UserSelect>
+                <UserSelect size="medium" :disabled="status === 'audit' || status === 'taskFormDetail'" :readonly="true" :limit='10' :value="inputForm.auditPeopleList" @getValue='(value) => {inputForm.auditPeopleList = value}'></UserSelect>
               </el-form-item>
             </el-col>
             <el-col :span="12">
@@ -64,7 +64,7 @@
               <el-form-item label="选择项目审核人" prop="auditPeople"
                             :rules="[{required: true, message: '审批人不能为空', trigger: 'blur'},{required: true, message: '审批人不能为空', trigger: 'change'}]"
               >
-                <UserSelect size="medium" :disabled="formReadOnly" :readonly="true" :limit='1' :value="inputForm.auditPeople" @getValue='(value) => {inputForm.auditPeople = value}'></UserSelect>
+                <UserSelect size="medium" :disabled="status === 'audit' || status === 'taskFormDetail'" :readonly="true" :limit='1' :value="inputForm.auditPeople" @getValue='(value) => {inputForm.auditPeople = value}'></UserSelect>
               </el-form-item>
             </el-col>
           </el-row>
@@ -224,9 +224,6 @@
       },
       init (method, id, tabName) {
         this.tabName = tabName
-        if (method === 'formReadOnly') {
-          this.formReadOnly = true
-        }
         this.method = method
         this.inputForm = {
           id: '',
@@ -294,11 +291,11 @@
             } else {
               this.inputForm.auditPeopleList = ''
             }
-            if (this.formReadOnly === true && this.status === 'taskFormDetail') {
+            if (this.status === 'taskFormDetail') {
               this.$refs.uploadComponent.newUpload('view', this.inputForm.workAttachmentDtoList, 'program_audit')
-            } else if (this.formReadOnly === true && this.status === 'audit') {
+            } else if (this.status === 'audit') {
               this.$refs.uploadComponent.newUpload('view', this.inputForm.workAttachmentDtoList, 'program_audit', null, null, true, JSON.parse(localStorage.getItem('user')).name)
-            } else if (this.formReadOnly === true && this.status !== 'audit' && this.status !== 'taskFormDetail') {
+            } else if (this.method === 'view') {
               this.$refs.uploadComponent.newUpload('view', this.inputForm.workAttachmentDtoList, 'program_audit')
             } else {
               this.$refs.uploadComponent.newUpload('view', this.inputForm.workAttachmentDtoList, 'program_audit', null, null, true, JSON.parse(localStorage.getItem('user')).name)