2 Commits c5c493d247 ... 7dea57a00a

Author SHA1 Message Date
  lin.liu 7dea57a00a 隐患检查 1 week ago
  lin.liu 454593322c 隐患检查 1 week ago

+ 20 - 5
secure-producting-business/src/main/java/com/customs/cq/datacenter/business/service/CheckRecordService.java

@@ -506,9 +506,9 @@ public class CheckRecordService extends BasicService {
         }
         }
         return ExecutedResult.success();
         return ExecutedResult.success();
     }
     }
-    private void updateRevokeStatus(Long gridId, EApprovalState status) {
+    private void updateRevokeStatus(Long checkRecordId, EApprovalState status) {
         CheckRecordPO item = new CheckRecordPO();
         CheckRecordPO item = new CheckRecordPO();
-        item.setId(gridId);
+        item.setId(checkRecordId);
         item.setRevokeStatus(status.getValue());
         item.setRevokeStatus(status.getValue());
 
 
         int rowCount = dao.updateById(item);
         int rowCount = dao.updateById(item);
@@ -516,6 +516,17 @@ public class CheckRecordService extends BasicService {
             throw new ServiceException("修改隐患检查单状态失败", EResultCode.FAILED.getCode());
             throw new ServiceException("修改隐患检查单状态失败", EResultCode.FAILED.getCode());
         }
         }
     }
     }
+    private void doRevokePass(Long checkRecordId) {
+        CheckRecordPO item = new CheckRecordPO();
+        item.setId(checkRecordId);
+        item.setStatus(ECheckFormStatus.STAGING.getValue());
+        item.setRevokeStatus(EApprovalState.PASSED.getValue());
+
+        int rowCount = dao.updateById(item);
+        if (rowCount != 1) {
+            throw new ServiceException("修改隐患检查单状态失败", EResultCode.FAILED.getCode());
+        }
+    }
 
 
     // 检查单撤回申请
     // 检查单撤回申请
     public ExecutedResult<String> revoke(ReqOperator request) {
     public ExecutedResult<String> revoke(ReqOperator request) {
@@ -597,9 +608,13 @@ public class CheckRecordService extends BasicService {
             return ExecutedResult.failed("当前用户没有权限!");
             return ExecutedResult.failed("当前用户没有权限!");
         }
         }
 
 
-        // 修改检查单撤回申请状态
-        this.updateRevokeStatus(request.getId(), EApprovalState.WAITING);
-
+        if (Objects.equals(request.getResult(), EAuditResult.PASS.getValue())) {
+            // 修改检查单撤回申请状态,并将检查表退回暂存状态
+            this.doRevokePass(request.getId());
+        } else {
+            // 修改检查单撤回申请状态
+            this.updateRevokeStatus(request.getId(), EApprovalState.REFUSED);
+        }
         List<CheckRevokePO> list = checkRevokeMapper.list4CheckRecord(request.getId());
         List<CheckRevokePO> list = checkRevokeMapper.list4CheckRecord(request.getId());
         // 没有待审核的撤回申请,返回成功
         // 没有待审核的撤回申请,返回成功
         if (list.stream().noneMatch(c -> Objects.equals(c.getStatus(), EApprovalState.WAITING.getValue()))) {
         if (list.stream().noneMatch(c -> Objects.equals(c.getStatus(), EApprovalState.WAITING.getValue()))) {

+ 9 - 0
secure-producting-vue/src/api/form/DangerCheckRecord.js

@@ -61,3 +61,12 @@ export function revoke(data) {
     data: data
     data: data
   })
   })
 }
 }
+
+// 检查单撤回审核
+export function revokeAudit(data) {
+  return request({
+    url: '/checkRecord/revokeAudit',
+    method: 'post',
+    data: data
+  })
+}

+ 115 - 8
secure-producting-vue/src/views/check/DangerCheckRecordMine.vue

@@ -1,5 +1,9 @@
 <template>
 <template>
   <div class="app-container">
   <div class="app-container">
+    <el-tabs v-model="tabGridUserActiveName" @tab-click="handleChangeGridUser">
+      <el-tab-pane label="网格员" name="gridPerson"></el-tab-pane>
+      <el-tab-pane label="网格管理员" name="gridAdmin"></el-tab-pane>
+    </el-tabs>
     <el-form :model="queryParams" ref="queryRef" :inline="true">
     <el-form :model="queryParams" ref="queryRef" :inline="true">
       <el-form-item label="检查单号" prop="checkFormNo">
       <el-form-item label="检查单号" prop="checkFormNo">
         <el-input
         <el-input
@@ -147,7 +151,7 @@
           {{ parseTime(scope.row.createTimeView, '{y}-{m}-{d}') }}
           {{ parseTime(scope.row.createTimeView, '{y}-{m}-{d}') }}
         </template>
         </template>
       </el-table-column>
       </el-table-column>
-      <el-table-column label="检查表" width="200" align="left" prop="checkFormName">
+      <el-table-column label="检查表" width="200" align="left" prop="checkFormName" :show-overflow-tooltip="true">
         <template #default="scope">
         <template #default="scope">
           {{ scope.row.gridName + " - " +  scope.row.checkFormName}}
           {{ scope.row.gridName + " - " +  scope.row.checkFormName}}
         </template>
         </template>
@@ -160,7 +164,7 @@
           </template>
           </template>
         </el-table-column>
         </el-table-column>
       <el-table-column label="检查单号" width="231" align="left" prop="checkFormNo" />
       <el-table-column label="检查单号" width="231" align="left" prop="checkFormNo" />
-      <el-table-column label="所属部门" width="320" align="left" prop="departmentTxt" />
+      <el-table-column label="所属部门" width="280" align="left" prop="departmentTxt" :show-overflow-tooltip="true" />
       <el-table-column label="所属关区" align="center" prop="customsName" />
       <el-table-column label="所属关区" align="center" prop="customsName" />
       <el-table-column label="检查人员" align="center" prop="checkPersonName" />
       <el-table-column label="检查人员" align="center" prop="checkPersonName" />
       <el-table-column label="是否有隐患" width="89" align="center" prop="hasDangerTxt">
       <el-table-column label="是否有隐患" width="89" align="center" prop="hasDangerTxt">
@@ -176,7 +180,7 @@
       <el-table-column
       <el-table-column
         label="操作"
         label="操作"
         align="left"
         align="left"
-        width="150"
+        width="210"
         fixed="right"
         fixed="right"
         class-name="small-padding fixed-width"
         class-name="small-padding fixed-width"
       >
       >
@@ -201,6 +205,13 @@
             icon="Edit"
             icon="Edit"
             @click="handleDoForm(scope.row)"
             @click="handleDoForm(scope.row)"
           >填报</el-button>
           >填报</el-button>
+          <el-button
+            v-if="scope.row.status === 10"
+            link
+            type="primary"
+            icon="Edit"
+            @click="handleDoForm(scope.row)"
+          >修改</el-button>
           <el-button
           <el-button
             v-if="scope.row.status === 10"
             v-if="scope.row.status === 10"
             link
             link
@@ -208,6 +219,13 @@
             icon="Promotion"
             icon="Promotion"
             @click="onSubmitAdmin(scope.row.id)"
             @click="onSubmitAdmin(scope.row.id)"
           >提交</el-button>
           >提交</el-button>
+          <el-button
+            v-if="showGridAdmin && scope.row.revokeStatus === 10"
+            link
+            type="danger"
+            icon="Avatar"
+            @click="onRevokeAudit(scope.row)"
+          >审核</el-button>
         </template>
         </template>
       </el-table-column>
       </el-table-column>
     </el-table>
     </el-table>
@@ -258,7 +276,7 @@
     <el-dialog
     <el-dialog
       :title="titleRevoke"
       :title="titleRevoke"
       v-model="showRevoke"
       v-model="showRevoke"
-      width="900px"
+      width="600px"
       append-to-body
       append-to-body
     >
     >
       <el-form
       <el-form
@@ -283,6 +301,42 @@
       </div>
       </div>
       </template>
       </template>
     </el-dialog>
     </el-dialog>
+
+    <!-- 审核撤回申请模态框 -->
+    <el-dialog
+      :title="titleRevoke"
+      v-model="showRevokeAudit"
+      width="600px"
+      append-to-body
+    >
+      <el-form
+        ref="refFormRevokeAudit"
+        :model="formRevokeAudit"
+        :rules="rulesRevokeAudit"
+        label-width="85px"
+      >
+        <el-form-item label="审核结果" prop="result">
+          <el-input v-model="formRevokeAudit.id" type="hidden" />
+          <el-radio-group v-model="formRevokeAudit.result">
+            <el-radio :label="1">通过</el-radio>
+            <el-radio :label="2">拒绝</el-radio>
+          </el-radio-group>
+        </el-form-item>
+        <el-form-item label="审核意见" prop="comment">          
+          <el-input v-model="formRevokeAudit.comment" type="textarea" :autosize="{ minRows: 2, maxRows: 4 }" placeholder="请输入" />
+        </el-form-item>
+      </el-form>
+      <template #footer>
+      <div class="dialog-footer">
+        <el-button
+          :loading="loadingRevokeAudit"
+          type="primary"
+          @click="revokeAuditSubmit"
+        >提 交</el-button>
+        <el-button @click="showRevokeAudit = false">取 消</el-button>
+      </div>
+      </template>
+    </el-dialog>
   </div>
   </div>
 </template>
 </template>
 
 
@@ -292,20 +346,28 @@ import { listAllGridCategory } from "@/api/grid/GridCategory";
 import { listAllDangerCategory } from "@/api/danger/DangerCategory";
 import { listAllDangerCategory } from "@/api/danger/DangerCategory";
 import { listEnumValue } from "@/api/system/base"
 import { listEnumValue } from "@/api/system/base"
 import {
 import {
-  submit, detail, listMine, listAdminMine, revoke
+  submit, detail, listMine, listAdminMine, revoke, revokeAudit
 } from "@/api/form/DangerCheckRecord";
 } from "@/api/form/DangerCheckRecord";
 import { parseTime } from "@/utils/ruoyi"
 import { parseTime } from "@/utils/ruoyi"
 import SubmitDangerCheck from '@/views/grid/components/SubmitDangerCheck';
 import SubmitDangerCheck from '@/views/grid/components/SubmitDangerCheck';
+import { ref } from "vue";
 
 
 const { proxy } = getCurrentInstance();
 const { proxy } = getCurrentInstance();
 
 
-const getAdminList = ref(false);
-
 const deptOptions = ref(undefined);
 const deptOptions = ref(undefined);
 const gridCategoryList = ref([]);
 const gridCategoryList = ref([]);
 const dangerCategoryList = ref([]);
 const dangerCategoryList = ref([]);
 const checkFormStatusList = ref([]);
 const checkFormStatusList = ref([]);
 const dataList = ref([]);
 const dataList = ref([]);
+const showGridPerson = ref(true);
+const showGridAdmin = ref(false);
+const tabGridUserActiveName = ref('gridPerson');
+function handleChangeGridUser(tab, event) {
+  dataList.value = [];
+  showGridPerson.value = (tabGridUserActiveName.value === 'gridAdmin');
+  showGridAdmin.value = (tabGridUserActiveName.value === 'gridPerson');
+  getList();
+}
 
 
 
 
 const showSubmitCheck = ref(false);
 const showSubmitCheck = ref(false);
@@ -332,6 +394,24 @@ const rulesRevoke = ref({
 });
 });
 
 
 
 
+
+const titleRevokeAudit = ref('');
+const showRevokeAudit = ref(false);
+const loadingRevokeAudit = ref(false);
+const formRevokeAudit = ref({
+  id: undefined,
+  result: 1,
+  comment: undefined
+});
+const rulesRevokeAudit = ref({
+  result: [{ required: true, message: "审核结果不能为空", trigger: "blur" }],
+  comment: [
+    { required: true, message: "审核意见不能为空", trigger: "blur" },
+    { max: 500, message: '审核意见字符长度不能超过500', trigger: 'blur' }
+  ]
+});
+
+
 const total = ref(0);
 const total = ref(0);
 const dateRangeCheckTime = ref([]);
 const dateRangeCheckTime = ref([]);
 const ids = ref([]);
 const ids = ref([]);
@@ -362,7 +442,7 @@ function getList() {
   ) {
   ) {
     queryParams.value.checkTimeRange = dateRangeCheckTime.value.join(" ~ ");
     queryParams.value.checkTimeRange = dateRangeCheckTime.value.join(" ~ ");
   }
   }
-  if (getAdminList.value) {
+  if (showGridAdmin.value) {
     listAdminMine(queryParams.value).then((response) => {
     listAdminMine(queryParams.value).then((response) => {
         dataList.value = response.data.list;
         dataList.value = response.data.list;
         total.value = response.data.total;
         total.value = response.data.total;
@@ -456,6 +536,33 @@ function revokeSubmit() {
 
 
 
 
 
 
+/** 隐患检查单-撤回申请审核-按钮 */
+function onRevokeAudit(row) {
+  formRevokeAudit.value.id = row.id;
+
+  showRevokeAudit.value = true;
+  titleRevokeAudit.value = '检查单撤回 - ' + row.checkFormNo;
+
+  console.log(JSON.stringify(formRevokeAudit.value));
+}
+/** 隐患检查单-撤回申请审核-提交 */
+function revokeAuditSubmit() {  
+  proxy.$refs["refFormRevokeAudit"].validate((valid) => {
+    if (valid) {
+      loadingRevokeAudit.value = true;
+      revokeAudit(formRevokeAudit.value).then((response) => {
+        getList();
+      })
+      .finally(() => {
+        showRevokeAudit.value = false;
+        loadingRevokeAudit.value = false;
+      });
+    }
+  });
+}
+
+
+
 /** 隐患检查单,提交到网格管理员 */
 /** 隐患检查单,提交到网格管理员 */
 function onSubmitAdmin(id) {  
 function onSubmitAdmin(id) {  
   proxy.$modal.confirm('确认要提交到网格管理员吗?')
   proxy.$modal.confirm('确认要提交到网格管理员吗?')

+ 11 - 4
secure-producting-vue/src/views/grid/components/MyGridAndCheck.vue

@@ -3,15 +3,15 @@
     <el-card shadow="hover" header="今日隐患检查" style="margin-bottom: 5px">
     <el-card shadow="hover" header="今日隐患检查" style="margin-bottom: 5px">
       <el-table :data="listMineGrid" stripe style="width: 100%" empty-text="当前帐号没有待检检查表!">
       <el-table :data="listMineGrid" stripe style="width: 100%" empty-text="当前帐号没有待检检查表!">
         <el-table-column label="检查单号" width="210" prop="checkFormNo" />
         <el-table-column label="检查单号" width="210" prop="checkFormNo" />
-        <el-table-column label="网格" width="100" prop="gridName" />
-        <el-table-column label="检查表" width="140" prop="checkFormName" :show-overflow-tooltip="true" />
+        <el-table-column label="网格" width="80" prop="gridName" />
+        <el-table-column label="检查表" width="105" prop="checkFormName" :show-overflow-tooltip="true" />
         <el-table-column label="状态" width="70" prop="statusTxt" />
         <el-table-column label="状态" width="70" prop="statusTxt" />
         <el-table-column label="撤回申请" width="80" prop="revokeStatusTxt">
         <el-table-column label="撤回申请" width="80" prop="revokeStatusTxt">
           <template #default="scope">
           <template #default="scope">
             {{ scope.row.revokeStatus === 0 ? '-' : scope.row.revokeStatusTxt }}
             {{ scope.row.revokeStatus === 0 ? '-' : scope.row.revokeStatusTxt }}
           </template>
           </template>
         </el-table-column>
         </el-table-column>
-        <el-table-column label="操作" width="145">
+        <el-table-column label="操作" width="210">
           <template #default="scope">
           <template #default="scope">
             <el-button
             <el-button
               v-if="scope.row.status != 0"
               v-if="scope.row.status != 0"
@@ -34,6 +34,13 @@
               icon="Edit"
               icon="Edit"
               @click="handleDoForm(scope.row)"
               @click="handleDoForm(scope.row)"
             >填报</el-button>
             >填报</el-button>
+            <el-button
+              v-if="scope.row.status === 10"
+              link
+              type="primary"
+              icon="Edit"
+              @click="handleDoForm(scope.row)"
+            >修改</el-button>
             <el-button
             <el-button
               v-if="scope.row.status === 10"
               v-if="scope.row.status === 10"
               link
               link
@@ -84,7 +91,7 @@
     <el-dialog
     <el-dialog
       :title="titleRevoke"
       :title="titleRevoke"
       v-model="showRevoke"
       v-model="showRevoke"
-      width="900px"
+      width="600px"
       append-to-body
       append-to-body
     >
     >
       <el-form
       <el-form

+ 3 - 0
secure-producting-vue/src/views/grid/components/SubmitDangerCheck.vue

@@ -351,6 +351,9 @@ function getFormDetail() {
   detail(props.checkRecordId)
   detail(props.checkRecordId)
   .then((response) => {
   .then((response) => {
     formDetail.value = response.data;
     formDetail.value = response.data;
+
+    formSubmit.value.customs = response.data.customs;
+    formSubmit.value.remark = response.data.remark;
     for (let index = 0; index < response.data.listItem.length; index++) {
     for (let index = 0; index < response.data.listItem.length; index++) {
       let item = response.data.listItem[index];
       let item = response.data.listItem[index];
       let value = {...item};
       let value = {...item};