Prechádzať zdrojové kódy

流程驳回后无法修改问题

lizhenhao 2 rokov pred
rodič
commit
66560961cb

+ 4 - 4
src/views/modules/cw/invoice/InvoiceFormTask.vue

@@ -1,10 +1,10 @@
 <template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
   <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="160px" @submit.native.prevent>
       <el-divider content-position="left"><i class="el-icon-document"></i>
         基本信息
-        <el-button style="margin-left: 20px" type="primary" :disabled="formReadOnly" size="mini" @click="insertEvent('base')"  plain>
+        <el-button style="margin-left: 20px" type="primary" :disabled="status === 'audit' || status === 'taskFormDetail'" size="mini" @click="insertEvent('base')"  plain>
           新增
         </el-button>
       </el-divider>
@@ -537,7 +537,7 @@
       <div v-if="false">
       <el-divider content-position="left"><i class="el-icon-document"></i>
         收款明细
-        <el-button style="margin-left: 20px" :disabled="formReadOnly" type="primary" size="mini" @click="insertEvent('receivables')" plain>
+        <el-button style="margin-left: 20px" :disabled="status === 'audit' || status === 'taskFormDetail'" type="primary" size="mini" @click="insertEvent('receivables')" plain>
           新增
         </el-button>
       </el-divider>
@@ -813,7 +813,7 @@
             if (this.commonJS.isEmpty(this.inputForm.financeInvoiceReceivablesDTOList) || this.inputForm.financeInvoiceReceivablesDTOList.length === 0) {
               this.inputForm.financeInvoiceReceivablesDTOList = []
             }
-            if (this.formReadOnly === true) {
+            if (this.status === 'audit' || this.status === 'taskFormDetail') {
               method = 'view'
             }
             if (!this.commonJS.isEmpty(this.status) && this.status === 'audit' && this.inputForm.financeInvoiceDetailDTOList.length === 0) {

+ 12 - 1
src/views/modules/cw/invoice/InvoiceFormTaskInvalid.vue

@@ -525,7 +525,7 @@
         </vxe-table>
       </el-row>
       <el-divider content-position="left"><i class="el-icon-document"></i>发票作废</el-divider>
-      <el-form size="middle" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="formReadOnly===true"
+      <el-form size="middle" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="status === 'audit' || status === 'taskFormDetail'"
                label-width="160px" @submit.native.prevent>
       <el-row :gutter="15">
         <el-col :span="24">
@@ -829,6 +829,17 @@
         } else if (status === 'reapply') {
           this.inputForm.status = '6'
         }
+        if (this.commonJS.isNotEmpty(this.inputForm.financeInvoiceInvalidDTO)) {
+          if (this.commonJS.isEmpty(this.inputForm.financeInvoiceInvalidDTO.remarks)) {
+            this.loading = false
+            this.$message.error('请填写作废原因')
+            throw new Error('请填写作废原因')
+          }
+        } else {
+          this.loading = false
+          this.$message.error('请填写作废原因')
+          throw new Error('请填写作废原因')
+        }
         if (this.commonJS.isEmpty(this.inputForm.financeInvoiceBaseDTOList)) {
           this.$message.error('至少新增一条基本信息')
           return

+ 5 - 1
src/views/modules/cw/projectRecords/ProjectMembersList.vue

@@ -72,7 +72,11 @@
           <vxe-column min-width="160" align="center" title="创建时间" field="createDate"></vxe-column>
           <vxe-column title="操作" width="70px" fixed="right" align="center">
             <template  slot-scope="scope">
-              <el-button v-if="hasPermission('cwProjectRecords:edit')&&(scope.row.createBy.id === $store.state.user.id||isAdmin||haveProjectIds.includes(scope.row.id))" type="text"  size="small" @click="edit(scope.row.id)">编辑</el-button>
+<!--              项目创建人、项目组成员、管理员可编辑-->
+<!--              <el-button v-if="hasPermission('cwProjectRecords:edit')&&(scope.row.createBy.id === $store.state.user.id||isAdmin||haveProjectIds.includes(scope.row.id))" type="text"  size="small" @click="edit(scope.row.id)">编辑</el-button>-->
+<!--              项目创建人、管理员可编辑-->
+              <el-button v-if="hasPermission('cwProjectRecords:edit')&&(scope.row.createBy.id === $store.state.user.id||isAdmin)" type="text"  size="small" @click="edit(scope.row.id)">编辑</el-button>
+
             </template>
           </vxe-column>
         </vxe-table>

+ 5 - 1
src/views/modules/cw/projectRecords/ProjectRecordsList.vue

@@ -264,7 +264,11 @@
         }).then(() => {
           this.loading = true
           this.projectRecordsService.delete(ids).then(({data}) => {
-            this.$message.success(data)
+            if (data === '删除成功') {
+              this.$message.success(data)
+            } else {
+              this.$message.error(data)
+            }
             this.refreshList()
             this.loading = false
           })

+ 5 - 5
src/views/modules/cw/projectReportArchive/ProjectReportArchiveTaskForm.vue

@@ -3,7 +3,7 @@
     <el-row>
       <el-col :span="24">
 
-        <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="110px" @submit.native.prevent>
               <el-row  :gutter="15">
 <!--                <el-col :span="12">-->
@@ -26,7 +26,7 @@
                                 :rules="[
                    ]">
                     <el-input :disabled="true" v-model="inputForm.cwProjectRecordsDTO.projectName" placeholder="请填写项目名称" clearable>
-<!--                      <el-button slot="append" :disabled="formReadOnly" @click="openChooseProject" icon="el-icon-search"></el-button>-->
+<!--                      <el-button slot="append" :disabled="status === 'audit' || status === 'taskFormDetail'" @click="openChooseProject" icon="el-icon-search"></el-button>-->
                     </el-input>
                   </el-form-item>
                 </el-col>
@@ -52,7 +52,7 @@
                                 {required: true, message:'被审计单位不能为空', trigger:'change'}
                    ]">
                     <el-input :readonly="true" v-model="inputForm.auditedUnitsName" @focus="openChooseClient" placeholder="请填写被审计单位" clearable>
-                      <el-button slot="append" :disabled="formReadOnly" @click="openChooseClient" icon="el-icon-search"></el-button>
+                      <el-button slot="append" :disabled="status === 'audit' || status === 'taskFormDetail'" @click="openChooseClient" icon="el-icon-search"></el-button>
                     </el-input>
                   </el-form-item>
                 </el-col>
@@ -180,7 +180,7 @@
                               :rules="[
                    ]">
                   <el-input :disabled="true" v-model="inputForm.reportNo" placeholder="请填写报告文号" clearable>
-<!--                    <el-button slot="append" :disabled="formReadOnly" @click="openReportChoose" icon="el-icon-search"></el-button>-->
+<!--                    <el-button slot="append" :disabled="status === 'audit' || status === 'taskFormDetail'" @click="openReportChoose" icon="el-icon-search"></el-button>-->
                   </el-input>
                 </el-form-item>
               </el-col>
@@ -450,7 +450,7 @@
             if (this.commonJS.isEmpty(this.inputForm.reportNum)) {
               this.inputForm.reportNum = 0
             }
-            if (this.formReadOnly) {
+            if (this.status === 'audit' || this.status === 'taskFormDetail') {
               this.method = 'view'
             }
             this.$refs.uploadComponent.newUpload(this.method, this.inputForm.workAttachmentDtoList, 'cw_project_archive', null, null, null, null, false)

+ 3 - 4
src/views/modules/cw/reportCancellApplyArchived/ReportCancellApplyArchivedTaskForm.vue

@@ -3,7 +3,7 @@
     <el-row>
       <el-col :span="24">
 
-        <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="135px" @submit.native.prevent>
           <el-row  :gutter="15">
 <!--            <el-col :span="12">-->
@@ -54,7 +54,7 @@
 <!--                                {required: true, message:'被审计单位不能为空', trigger:'change'}-->
 <!--                   ]">-->
 <!--                <el-input :readonly="true" v-model="inputForm.auditedUnitsName" @focus="openChooseClient" placeholder="请填写被审计单位" clearable>-->
-<!--                  <el-button slot="append" :disabled="formReadOnly" @click="openChooseClient" icon="el-icon-search"></el-button>-->
+<!--                  <el-button slot="append" :disabled="status === 'audit' || status === 'taskFormDetail'" @click="openChooseClient" icon="el-icon-search"></el-button>-->
 <!--                </el-input>-->
 <!--              </el-form-item>-->
 <!--            </el-col>-->
@@ -475,10 +475,9 @@
             if (this.commonJS.isEmpty(this.inputForm.reportNum)) {
               this.inputForm.reportNum = 0
             }
-            if (this.formReadOnly) {
+            if (this.status === 'audit' || this.status === 'taskFormDetail') {
               this.method = 'view'
             }
-            console.log('this.inputForm.id', data)
             this.$refs.uploadComponent.newUpload(this.method, this.inputForm.workAttachmentDtoList, 'cw_project_archive', null, null, null, null, false)
             this.loading = false
           })