suhp 1 месяц назад
Родитель
Сommit
03ae47d7f7

+ 215 - 2
src/views/costAudit/auditInfo/auditManage/details.vue

@@ -64,6 +64,104 @@
         </el-tab-pane>
       </el-tabs>
     </el-drawer>
+    <!-- 补充资料弹窗 -->
+    <el-dialog
+      :visible.sync="showSupplementDialog"
+      title="补充资料"
+      width="500px"
+      :modal="false"
+    >
+      <div class="dialog-content">
+        <div class="form-item">
+          <label class="form-label">补充意见</label>
+          <el-input
+            v-model="supplementForm.content"
+            type="textarea"
+            :rows="6"
+            placeholder="请输入补充意见"
+            maxlength="500"
+            show-word-limit
+          />
+        </div>
+        <div class="form-item">
+          <label class="form-label">发送方式</label>
+          <el-checkbox-group v-model="supplementForm.sendType">
+            <el-checkbox label="site">站内消息</el-checkbox>
+            <el-checkbox label="sms">短信通知</el-checkbox>
+          </el-checkbox-group>
+        </div>
+      </div>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="showSupplementDialog = false">取消</el-button>
+        <el-button type="primary" @click="submitSupplement">发送</el-button>
+      </div>
+    </el-dialog>
+
+    <!-- 中止监审弹窗 -->
+    <el-dialog
+      :visible.sync="showAbortDialog"
+      title="中止监审"
+      width="500px"
+      :modal="false"
+    >
+      <div class="dialog-content">
+        <div class="form-item">
+          <label class="form-label">中止意见</label>
+          <el-input
+            v-model="abortForm.content"
+            type="textarea"
+            :rows="6"
+            placeholder="请输入中止意见"
+            maxlength="500"
+            show-word-limit
+          />
+        </div>
+        <div class="form-item">
+          <label class="form-label">发送方式</label>
+          <el-checkbox-group v-model="abortForm.sendType">
+            <el-checkbox label="site">站内消息</el-checkbox>
+            <el-checkbox label="sms">短信通知</el-checkbox>
+          </el-checkbox-group>
+        </div>
+      </div>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="showAbortDialog = false">取消</el-button>
+        <el-button type="primary" @click="submitAbort">发送</el-button>
+      </div>
+    </el-dialog>
+
+    <!-- 初审退回弹窗 -->
+    <el-dialog
+      :visible.sync="showRejectDialog"
+      title="初审退回"
+      width="500px"
+      :modal="false"
+    >
+      <div class="dialog-content">
+        <div class="form-item">
+          <label class="form-label">退回意见</label>
+          <el-input
+            v-model="rejectForm.content"
+            type="textarea"
+            :rows="6"
+            placeholder="请输入退回意见"
+            maxlength="500"
+            show-word-limit
+          />
+        </div>
+        <div class="form-item">
+          <label class="form-label">发送方式</label>
+          <el-checkbox-group v-model="rejectForm.sendType">
+            <el-checkbox label="site">站内消息</el-checkbox>
+            <el-checkbox label="sms">短信通知</el-checkbox>
+          </el-checkbox-group>
+        </div>
+      </div>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="showRejectDialog = false">取消</el-button>
+        <el-button type="primary" @click="submitReject">发送</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
@@ -112,6 +210,25 @@
       return {
         buttonData: [], //资料初审按钮数据
         activeTab: 'submitData', // 默认选中报送资料标签页
+        // 弹窗显示状态
+        showSupplementDialog: false,
+        showAbortDialog: false,
+        showRejectDialog: false,
+        // 弹窗数据
+        supplementForm: {
+          content: '',
+          sendType: ['site', 'sms'], // 默认选中站内消息和短信通知
+        },
+        abortForm: {
+          content: '',
+          sendType: ['site', 'sms'],
+        },
+        rejectForm: {
+          content: '',
+          sendType: ['site', 'sms'],
+        },
+        // 当前操作按钮信息
+        currentButton: null,
       }
     },
     computed: {
@@ -247,7 +364,32 @@
         this.$emit('update:visible', true)
       },
       // 处理审核操作按钮点击
-      async handleAuditPass(item) {
+      handleAuditPass(item) {
+        this.currentButton = item
+        // 根据key值显示对应的弹窗
+        if (item.key === 1) {
+          // 补充资料
+          this.supplementForm.content = ''
+          this.supplementForm.sendType = ['site', 'sms']
+          this.showSupplementDialog = true
+        } else if (item.key === 2) {
+          // 中止监审
+          this.abortForm.content = ''
+          this.abortForm.sendType = ['site', 'sms']
+          this.showAbortDialog = true
+        } else if (item.key === 4) {
+          // 初审退回
+          this.rejectForm.content = ''
+          this.rejectForm.sendType = ['site', 'sms']
+          this.showRejectDialog = true
+        } else {
+          // 其他操作直接执行
+          this.executeAuditOperation(item)
+        }
+      },
+
+      // 执行审核操作
+      async executeAuditOperation(item, additionalParams = {}) {
         if (!this.id) {
           this.$message.error('缺少任务ID')
           return
@@ -263,13 +405,18 @@
               }),
             // 根据按钮项传递其他必要参数
             ...item,
+            ...additionalParams,
           }
 
           const response = await doProcessBtn(params)
 
           if (response && response.code === 200) {
             this.$message.success(item.value + '操作成功')
-            // 关闭弹窗
+            // 关闭所有弹窗
+            this.showSupplementDialog = false
+            this.showAbortDialog = false
+            this.showRejectDialog = false
+            // 关闭主弹窗
             this.handleClose()
             // 触发父组件刷新列表
             this.$emit('refresh')
@@ -280,6 +427,42 @@
           this.$message.error(item.value + '操作失败')
         }
       },
+
+      // 提交补充资料
+      submitSupplement() {
+        if (!this.supplementForm.content.trim()) {
+          this.$message.error('请输入补充意见')
+          return
+        }
+        this.executeAuditOperation(this.currentButton, {
+          content: this.supplementForm.content,
+          sendType: this.supplementForm.sendType.join(','),
+        })
+      },
+
+      // 提交中止监审
+      submitAbort() {
+        if (!this.abortForm.content.trim()) {
+          this.$message.error('请输入中止意见')
+          return
+        }
+        this.executeAuditOperation(this.currentButton, {
+          content: this.abortForm.content,
+          sendType: this.abortForm.sendType.join(','),
+        })
+      },
+
+      // 提交初审退回
+      submitReject() {
+        if (!this.rejectForm.content.trim()) {
+          this.$message.error('请输入退回意见')
+          return
+        }
+        this.executeAuditOperation(this.currentButton, {
+          content: this.rejectForm.content,
+          sendType: this.rejectForm.sendType.join(','),
+        })
+      },
     },
   }
 </script>
@@ -322,4 +505,34 @@
   .audit-tabs .el-tab-pane {
     height: 100%;
   }
+
+  /* 弹窗样式 */
+  .dialog-content {
+    padding: 10px 0;
+  }
+
+  .form-item {
+    margin-bottom: 20px;
+  }
+
+  .form-label {
+    display: inline-block;
+    width: 100px;
+    text-align: right;
+    margin-right: 15px;
+    color: #606266;
+  }
+
+  .form-item .el-checkbox-group {
+    margin-left: 115px;
+  }
+
+  .form-item .el-checkbox {
+    margin-right: 20px;
+  }
+
+  .form-item .el-input__inner {
+    width: calc(100% - 115px);
+    margin-left: 115px;
+  }
 </style>

+ 49 - 1
src/views/costAudit/auditInfo/auditManage/index.vue

@@ -143,6 +143,13 @@
               >
                 审核
               </el-button>
+              <el-button
+                v-if="scope.row.status === '中止'"
+                type="text"
+                @click="handleHf(scope.row)"
+              >
+                恢复
+              </el-button>
             </span>
           </template>
         </el-table-column>
@@ -171,8 +178,8 @@
     />
   </div>
 </template>
-
 <script>
+  import { doProcessBtn } from '@/api/dataPreliminaryReview'
   import detailsDialog from './details.vue'
   import taskMixins from './taskMixins.js'
   // 成本监审任务列表API
@@ -342,6 +349,47 @@
         })
       },
 
+      // 恢复任务
+      async handleHf(row) {
+        if (!row || !row.id) {
+          this.$message.error('缺少任务ID')
+          return
+        }
+
+        // 弹出确认对话框
+        this.$confirm('确定要恢复此任务吗?', '恢复任务', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning',
+        })
+          .then(async () => {
+            try {
+              const params = {
+                taskId: row.id,
+                key: 2,
+                status: 200,
+              }
+
+              const response = await doProcessBtn(params)
+
+              if (response && response.code === 200) {
+                this.$message.success('恢复任务成功')
+                // 刷新列表
+                this.loadAuditProjectList()
+              } else {
+                this.$message.error(response?.message || '恢复任务失败')
+              }
+            } catch (error) {
+              this.$message.error('恢复任务失败')
+              console.error('恢复任务失败:', error)
+            }
+          })
+          .catch(() => {
+            // 用户取消操作
+            this.$message.info('已取消恢复任务')
+          })
+      },
+
       // 分页处理
       handleSizeChange(size) {
         this.pageSize = size