|
@@ -110,7 +110,16 @@
|
|
|
<span>在线验签</span>
|
|
|
</el-button>
|
|
|
</HcTooltip>
|
|
|
- <el-button :disabled="tableCheckedKeys.length <= 0" :loading="signLoading" hc-btn type="primary" @click="resignClick">re-sign</el-button>
|
|
|
+ <el-button :disabled="tableCheckedKeys.length <= 0" :loading="signLoading" hc-btn type="primary" @click="resignClick"> <HcIcon name="repeat" />re-sign</el-button>
|
|
|
+ <HcTooltip keys="save_agin">
|
|
|
+ <el-button
|
|
|
+ :disabled="tableCheckedKeys.length <= 0" :loading="saveAginLoading" hc-btn
|
|
|
+ color="#e03997" @click="saveAginClick"
|
|
|
+ >
|
|
|
+ <HcIcon name="save" />
|
|
|
+ <span>Save-again</span>
|
|
|
+ </el-button>
|
|
|
+ </HcTooltip>
|
|
|
</template>
|
|
|
<template #search>
|
|
|
<div class="flex items-center">
|
|
@@ -952,23 +961,10 @@ const resignClick = async ()=>{
|
|
|
}
|
|
|
const signClick = async () => {
|
|
|
const rows = tableCheckedKeys.value
|
|
|
- // if (rows.length <= 0) {
|
|
|
- // window.$message?.warning('请先勾选已审批的数据')
|
|
|
- // return
|
|
|
- // }
|
|
|
- // //判断是否满足条件
|
|
|
- // const result = rows.every(({ status }) => {
|
|
|
- // return status === 2
|
|
|
- // })
|
|
|
- // //判断状态
|
|
|
- // if (!result) {
|
|
|
- // window.$message?.warning('只能勾选已审批的数据')
|
|
|
- // return
|
|
|
- // }
|
|
|
//获取任务id
|
|
|
const taskIds = arrToKey(rows, 'taskId')
|
|
|
const idsArr = taskIds.split(',')
|
|
|
- let isCan = idsArr.some(ele=>ele === '' || ele == -1)
|
|
|
+ let isCan = idsArr.some(ele=>!ele)
|
|
|
|
|
|
if (isCan) {
|
|
|
window.$message?.warning('参数异常,暂不支持该操作')
|
|
@@ -998,6 +994,33 @@ const cancelresign = ()=>{
|
|
|
resignModalRadio.value = 0
|
|
|
resignModal.value = false
|
|
|
}
|
|
|
+//重新验签
|
|
|
+const saveAginClick = async ()=>{
|
|
|
+const rows = tableCheckedKeys.value
|
|
|
+const taskIds = rows.map(row => row.taskId)
|
|
|
+if (taskIds.some(id => id)) {
|
|
|
+ window.$message?.warning('存在taskId,不能点击该按钮')
|
|
|
+ return
|
|
|
+}
|
|
|
+const objArr = rows.map(row => ({
|
|
|
+ id: row.id,
|
|
|
+ wbsId: row.wbsId,
|
|
|
+ projectId: projectId.value,
|
|
|
+ contractId: contractId.value,
|
|
|
+ }))
|
|
|
+ saveAginLoading.value = true
|
|
|
+ const { error, code, msg } = await queryApi.reSigningEVisaStatus0(objArr)
|
|
|
+ //处理数据
|
|
|
+ saveAginLoading.value = false
|
|
|
+
|
|
|
+ if (!error && code === 200) {
|
|
|
+ window.$message?.success(msg ?? '提交成功,请请耐心等待重签,可继续操作其它的功能。')
|
|
|
+ getTableData().then()
|
|
|
+ } else {
|
|
|
+ window.$message?.error(msg ?? '操作失败')
|
|
|
+ }
|
|
|
+}
|
|
|
+const saveAginLoading = ref(false)
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|