Ver Fonte

qhse月报审核

yanghao há 2 semanas atrás
pai
commit
bf33f7e8d2

+ 2 - 2
src/api/pms/qhse/index.ts

@@ -603,12 +603,12 @@ export const QhseMonthReportAuditApi = {
 
   // 审核通过
   auditPass: async (id) => {
-    return await request.put({ url: `/rq/qhse-month-report/approval/${id}` })
+    return await request.post({ url: `/rq/qhse-month-report/approval/${id}` })
   },
 
   // 审核不通过
   auditNotPass: async (data) => {
-    return await request.put({ url: `/rq/qhse-month-report/reject`, data })
+    return await request.post({ url: `/rq/qhse-month-report/reject`, data })
   }
 }
 

+ 12 - 4
src/views/pms/qhse/monthlyReport/index.vue

@@ -64,11 +64,19 @@
             </template>
           </zm-table-column>
 
-          <zm-table-column label="操作" width="180" align="center" fixed="right" action>
+          <zm-table-column width="230" label="操作" align="center" fixed="right" action>
             <template #default="{ row }">
-              <div class="flex justify-center">
-                <el-button text type="primary" @click="add(row)"> 填报 </el-button>
-                <el-button text type="primary" @click="submit(row)"> 提交 </el-button>
+              <div class="">
+                <el-button text v-if="row.status === 'unsubmit'" type="primary" @click="add(row)">
+                  填报
+                </el-button>
+                <el-button
+                  v-if="row.status === 'unsubmit'"
+                  text
+                  type="primary"
+                  @click="submit(row)">
+                  提交审批
+                </el-button>
                 <el-button text size="small" type="success" @click="detail(row)"> 查看 </el-button>
               </div>
             </template>

+ 3 - 2
src/views/pms/qhse/reportReview/index.vue

@@ -51,6 +51,7 @@
               <dict-tag :type="DICT_TYPE.QHSE_AUDIT_STATUS" :value="row.status" />
             </template>
           </zm-table-column>
+          <zm-table-column prop="rejectDesc" label="拒绝原因" align="center" />
           <zm-table-column label="创建日期" prop="createTime" align="center">
             <template #default="{ row }">
               {{ formatDate(row.createTime) }}
@@ -92,7 +93,7 @@
               <span><Icon icon="ep:calendar" /> {{ displayValue(reviewReport.yearMonths) }}</span>
             </div>
           </div>
-          <dict-tag :type="DICT_TYPE.QHSE_AUDIT_STATUS" :value="reviewReport.auditStatus" />
+          <dict-tag :type="DICT_TYPE.QHSE_AUDIT_STATUS" :value="reviewReport.status" />
         </div>
         <div class="report-meta-grid">
           <div class="meta-item"
@@ -147,7 +148,7 @@
     </template>
   </el-drawer>
   <el-dialog v-model="rejectDialogVisible" title="填写驳回原因" width="520px">
-    <el-form ref="rejectFormRef" :model="rejectForm" :rules="rejectRules" label-width="90px">
+    <el-form ref="rejectFormRef" :model="rejectForm" :rules="rejectRules" label-width="auto">
       <el-form-item label="驳回原因" prop="rejectDesc">
         <el-input
           v-model="rejectForm.rejectDesc"