Prechádzať zdrojové kódy

委托单重签接口

duy 9 mesiacov pred
rodič
commit
8ee69e7f6f

+ 8 - 0
src/api/modules/tentative/detect/commission.js

@@ -57,4 +57,12 @@ export default {
             params: form,
         })
     },
+    //委托单重签
+    async reSigningEntrust(form) {
+        return HcApi({
+            url: '/api/blade-business/task/reSigningEntrust',
+            method: 'post',
+            data: form,
+        })
+    },
 }

+ 1 - 4
src/views/tasks/hc-data.vue

@@ -318,10 +318,7 @@ const queryTaskInfo = async (row, taskids) => {
 const isSmsAndUKey = ref(false)
 const ConfirmApprovalClick = async () => {
   
-    if ( localModelVal.value) {
-        window?.$message?.error('电签已欠费')
-        return
-    }
+  
     const formData = taskReviewForm.value
     if (formData.flag === 'NO' && !formData.comment) {
         window?.$message?.warning('请先输入审核意见')

+ 61 - 2
src/views/tentative/detect/commission.vue

@@ -30,7 +30,7 @@
                         <span>新增</span>
                     </el-button>
                 </hc-tooltip>
-               
+                <el-button :disabled="tableCheckedKeys.length <= 0" :loading="signLoading" hc-btn type="primary" @click="resignClick">re-sign</el-button>
               
                 <hc-tooltip keys="tentative_detect_commission_repeal">
                     <el-button hc-btn type="danger" :disabled="tableCheckedKeys.length <= 0" @click="repealFormData">
@@ -180,6 +180,17 @@
             @hide="hideReport"
         />
     </hc-body>
+
+    <!-- 一键重签弹窗 -->
+    <hc-new-dialog v-model="resignModal" title="一键重签" widths="38rem" :loading="signLoading" @close="cancelresign" @save="signClick">
+        <div>
+            是否重新生成pdf:
+            <el-radio-group v-model="resignModalRadio">
+                <el-radio :value="2">否</el-radio>
+                <el-radio :value="1">是</el-radio>
+            </el-radio-group>
+        </div>
+    </hc-new-dialog>
 </template>
 
 <script setup>
@@ -187,7 +198,7 @@ import { onActivated, onMounted, ref } from 'vue'
 import { useAppStore } from '~src/store'
 import { useRouter } from 'vue-router'
 import { getStoreValue, setStoreValue } from '~src/utils/storage'
-import { arrToId, deepClone, formValidate, getArrValue, getObjValue, isNullES, isString } from 'js-fast-way'
+import { arrToId, arrToKey, deepClone, formValidate, getArrValue, getObjValue, isNullES, isString } from 'js-fast-way'
 import { toPdfPage } from '~uti/btn-auth'
 import { getDictionaryData } from '~uti/tools'
 import { getErtractInfo } from '~api/other'
@@ -641,6 +652,54 @@ const repealFormData = async ()=>{
         window.$message.error(msg || '删除失败')
     }
 }
+//一键重签
+//一键重签
+const signLoading = ref(false)
+const resignModal = ref(false)
+const resignModalRadio = ref(1)
+const resignClick = async ()=>{
+    const rows = tableCheckedKeys.value
+    if (rows.length <= 0) {
+        window.$message?.warning('请先勾选已审批的数据')
+        return
+    }
+
+    resignModal.value = true
+
+
+}
+const signClick = async () => {
+    const rows = tableCheckedKeys.value
+    //获取任务id
+    const taskIds = arrToKey(rows, 'taskid')
+    const entrustIds = arrToKey(rows, 'id')
+
+    const { primaryKeyId } = nodeDataInfo.value
+    //发起请求
+    signLoading.value = true
+    const { error, code, msg } = await mainApi.reSigningEntrust({
+        nodeId:primaryKeyId,
+        contractId: contractId.value,
+        taskIds: taskIds,
+        entrustId:entrustIds,
+        type:resignModalRadio.value,
+   
+    })
+    //处理数据
+    signLoading.value = false
+
+    if (!error && code === 200) {
+        window.$message?.success(msg ?? '提交成功,请请耐心等待重签,可继续操作其它的功能。')
+        getTableData().then()
+    } else {
+        window.$message?.error(msg ?? '操作失败')
+    }
+    resignModal.value = false
+}
+const cancelresign = ()=>{
+    resignModalRadio.value = 0
+    resignModal.value = false
+}
 </script>
 
 <style lang="scss">