ezhizao_zx 10 months ago
parent
commit
90e2d29bdc

+ 8 - 0
src/api/business/beforeCheckoutVerify.js

@@ -29,4 +29,12 @@ export function rejectInspection(data) {
     method: 'post',
     data: data
   })
+}
+
+export function checkFurnace(data) {
+  return request({
+    url: baseUrl + '/business/beforeCheckoutVerify/checkFurnace',
+    method: 'post',
+    data: data
+  })
 }

+ 29 - 10
src/views/business/outsourceInspectionVerify/index.vue

@@ -93,7 +93,8 @@
 import {
   listCheckoutInspection,
   rejectInspection,
-  confirmInspection
+  confirmInspection,
+  checkFurnace
 } from '@/api/business/beforeCheckoutVerify'
 import { nextTick } from "vue";
 const { proxy } = getCurrentInstance();
@@ -158,15 +159,33 @@ function handleSelectionChange(selection) {
 }
 
 function handleConfirm(row) {
-  proxy.$confirm('是否确认通过?', '提示', {
-    confirmButtonText: '确定',
-    cancelButtonText: '取消',
-    type: 'warning'
-  }).then(() => {
-    confirmInspection(row).then(res => {
-      getList()
-    })
-  });
+  checkFurnace(row).then(res => {
+    if (res.code === 200) {
+      if (res.data.length === 1) {
+        proxy.$confirm('是否确认通过?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          confirmInspection(res.data).then(res => {
+            getList()
+          })
+        });
+      } else {
+        proxy.$confirm('该炉已全部质检,是否全部确认通过?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          confirmInspection(res.data).then(res => {
+            getList()
+          })
+        });
+      }
+    } else {
+      proxy.$msgError(res.msg)
+    }
+  })
 }
 
 function handleReject(row) {

+ 2 - 2
src/views/business/returnReceipt/form.vue

@@ -94,7 +94,7 @@
                     --el-switch-on-color: #13ce66;
                     --el-switch-off-color: #ff4949;
                   " :active-value="1" :inactive-value="0" active-text="已审核" inactive-text="未审核"
-                  :disabled="scope.row.productionDeptId != 0 || (scope.row.processInspecionList && scope.row.processInspecionList.length > 0)"
+                  :disabled="scope.row.productionDeptId != 0 || (scope.row.isApproved === 0 && scope.row.processInspecionList && scope.row.processInspecionList.length > 0)"
                   @change="handleChangeAuditStatus(scope.row)" />
               </template>
             </el-table-column>
@@ -414,7 +414,7 @@ function handleSetAuditStatus() {
 
 function getP2NeedCheck() {
   getP2NeedCheckProcess("Y").then(res => {
-    processList.value = res.row.map(v => v.prcode.trim())
+    processList.value = res.rows.map(v => v.prcode.trim())
   })
 }
 /** 暴露给父组件的方法 */