Forráskód Böngészése

资料查询,一键重签

ZaiZai 1 éve
szülő
commit
2053870fb7
2 módosított fájl, 30 hozzáadás és 4 törlés
  1. 8 0
      src/api/modules/data-fill/query.js
  2. 22 4
      src/views/data-fill/query.vue

+ 8 - 0
src/api/modules/data-fill/query.js

@@ -137,4 +137,12 @@ export default {
             params: form,
         }, msg)
     },
+    //一键重签
+    async reSigningEVisa(form, msg = true) {
+        return httpApi({
+            url: '/api/blade-business/task/reSigningEVisa',
+            method: 'post',
+            params: form,
+        }, msg)
+    },
 }

+ 22 - 4
src/views/data-fill/query.vue

@@ -108,7 +108,7 @@
                             <span>在线验签</span>
                         </el-button>
                     </HcTooltip>
-                    <el-button :disabled="tableCheckedKeys.length <= 0" :loading="signLoading" hc-btn color="#409eff" @click="signClick">re-sign</el-button>
+                    <el-button :disabled="tableCheckedKeys.length <= 0" :loading="signLoading" hc-btn type="primary" @click="signClick">re-sign</el-button>
                 </template>
                 <template #search>
                     <div class="flex items-center">
@@ -228,7 +228,7 @@
 import { onMounted, ref, watch } from 'vue'
 import { useAppStore } from '~src/store'
 import { getStoreValue, setStoreValue } from '~src/utils/storage'
-import { arrToId, downloadBlob, getArrValue, getObjValue, isString } from 'js-fast-way'
+import { arrToId, arrToKey, downloadBlob, getArrValue, getObjValue, isString } from 'js-fast-way'
 import queryApi from '~api/data-fill/query'
 import { eVisaTaskCheckApi } from '~api/other'
 
@@ -798,8 +798,26 @@ const signClick = async () => {
         window.$message?.warning('只能勾选已审批的数据')
         return
     }
-    const ids = arrToId(rows)
-    console.log('ids', ids)
+    //获取任务id
+    const taskIds = arrToKey(rows, 'taskId')
+    if (!taskIds) {
+        window.$message?.warning('参数异常,暂不支持该操作')
+        return
+    }
+    //发起请求
+    signLoading.value = true
+    const { error, code, msg } = await queryApi.reSigningEVisa({
+        contractId: contractId.value,
+        projectId: projectId.value,
+        taskIds: taskIds,
+    })
+    //处理数据
+    signLoading.value = false
+    if (!error && code === 200) {
+        getTableData().then()
+    } else {
+        window.$message?.error(msg ?? '操作失败')
+    }
 }
 </script>