ZaiZai 2 жил өмнө
parent
commit
a4aef4c760

+ 9 - 0
src/api/modules/other.js

@@ -73,3 +73,12 @@ export const eVisaTaskCheckApi = async (form) => {
         return false
     }
 }
+
+
+//检查当前审批人是否存在证书
+export const checkFlowUserIsExistPfxFile = (form, msg = true) => httpApi({
+    url: '/api/blade-business/eVisaTaskCheck/checkFlowUserIsExistPfxFile',
+    method: 'get',
+    params: form
+}, msg);
+

+ 16 - 6
src/views/tasks/hc-data.vue

@@ -96,9 +96,11 @@ import {useRouter, useRoute} from 'vue-router'
 import TableCard from './components/TableCard.vue';
 import notableform from '~src/assets/view/notableform.svg';
 import {getObjValue, getArrValue, isString} from "vue-utils-plus"
+import {checkFlowUserIsExistPfxFile} from "~api/other"
 import tasksApi from '~api/tasks/data';
 import dayjs from "dayjs"
 
+
 //初始变量
 const router = useRouter()
 const useRoutes = useRoute()
@@ -225,16 +227,24 @@ const queryTaskInfo = async (row) => {
 }
 
 //确认审批
-const ConfirmApprovalClick = () => {
+const ConfirmApprovalClick = async () => {
     const formData = taskReviewForm.value
     if (formData.flag === 'NO' && !formData.comment) {
         window?.$message?.warning('请先输入审核意见')
     } else {
-        const ShowAuth = isCheckSmsCodeTime()
-        SMSAuthShow.value = ShowAuth
-        //免短信验证
-        if (!ShowAuth) {
-            SMSAuthConfirm()
+        SMSAuthLoading.value = true
+        const {error, code, msg} = await checkFlowUserIsExistPfxFile()
+        //判断数据
+        SMSAuthLoading.value = false
+        if (!error && code === 200) {
+            const ShowAuth = isCheckSmsCodeTime()
+            SMSAuthShow.value = ShowAuth
+            //免短信验证
+            if (!ShowAuth) {
+                SMSAuthConfirm()
+            }
+        } else {
+            window.$message?.warning(msg)
         }
     }
 }