质量评估,价值评估支持不走流程配置
Showing
7 changed files
with
577 additions
and
376 deletions
| ... | @@ -78,3 +78,9 @@ export const crossPlatformApprove = (params) => request({ | ... | @@ -78,3 +78,9 @@ export const crossPlatformApprove = (params) => request({ |
| 78 | method: 'post', | 78 | method: 'post', |
| 79 | data: {} | 79 | data: {} |
| 80 | }) | 80 | }) |
| 81 | |||
| 82 | /** 功能流程配置-获取是否需要审批 */ | ||
| 83 | export const isNeedApprove = (params) => request({ | ||
| 84 | url: `${import.meta.env.VITE_APP_WORK_FLOW_URL}/func-flow-config/is-need-approve?funcCode=${params.funcCode}`, | ||
| 85 | method: 'get', | ||
| 86 | }) | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -1452,8 +1452,8 @@ const panelChange = (scope, row) => { | ... | @@ -1452,8 +1452,8 @@ const panelChange = (scope, row) => { |
| 1452 | :disabled="item.disabled || readonly" @change="(val) => cascaderChange(val, item)" /> | 1452 | :disabled="item.disabled || readonly" @change="(val) => cascaderChange(val, item)" /> |
| 1453 | <template v-else-if="item.type && item.type.indexOf('date') > -1"> | 1453 | <template v-else-if="item.type && item.type.indexOf('date') > -1"> |
| 1454 | <el-date-picker :class="[item.col, { is_block: item.block }]" v-if="item.type == 'date-picker'" | 1454 | <el-date-picker :class="[item.col, { is_block: item.block }]" v-if="item.type == 'date-picker'" |
| 1455 | v-model="formInline[item.field]" type="daterange" range-separator="至" start-placeholder="开始日期" :format="item.format ?? ''" | 1455 | v-model="formInline[item.field]" type="daterange" range-separator="至" start-placeholder="开始日期" :format="item.format ?? null" |
| 1456 | :value-format="item.valueFormat ?? ''" | 1456 | :value-format="item.valueFormat ?? null" |
| 1457 | end-placeholder="结束日期" :unlink-panels="item.unlink ?? false" :shortcuts="item.shortcuts ?? []" | 1457 | end-placeholder="结束日期" :unlink-panels="item.unlink ?? false" :shortcuts="item.shortcuts ?? []" |
| 1458 | :default-value="item.defaultDate" :disabled="item.disabled ?? false" /> | 1458 | :default-value="item.defaultDate" :disabled="item.disabled ?? false" /> |
| 1459 | <el-date-picker :class="[item.col, { is_block: item.block }]" v-else-if="item.type == 'date-year'" | 1459 | <el-date-picker :class="[item.col, { is_block: item.block }]" v-else-if="item.type == 'date-year'" | ... | ... |
| ... | @@ -292,7 +292,7 @@ onMounted(() => { | ... | @@ -292,7 +292,7 @@ onMounted(() => { |
| 292 | <span v-else>{{ '--' }}</span> | 292 | <span v-else>{{ '--' }}</span> |
| 293 | </template> | 293 | </template> |
| 294 | <template #default="scope" v-else-if="item.type == 'approveTagBtn'"> | 294 | <template #default="scope" v-else-if="item.type == 'approveTagBtn'"> |
| 295 | <div v-if="scope.row[item.field] !== undefined" style="position: relative;"> | 295 | <div v-if="item.enableNoApprove == true ? (scope.row.isApprove != 'N' && scope.row[item.field] !== undefined) : (scope.row[item.field] !== undefined)" style="position: relative;"> |
| 296 | <el-tag :type="tagType(scope.row, item.field)">{{ | 296 | <el-tag :type="tagType(scope.row, item.field)">{{ |
| 297 | tagMethod(scope.row, item.field) | 297 | tagMethod(scope.row, item.field) |
| 298 | }}</el-tag> | 298 | }}</el-tag> | ... | ... |
| ... | @@ -15,13 +15,14 @@ import { | ... | @@ -15,13 +15,14 @@ import { |
| 15 | qualityAllow, | 15 | qualityAllow, |
| 16 | deleteQuality, | 16 | deleteQuality, |
| 17 | updatQuality, | 17 | updatQuality, |
| 18 | getTenantList | ||
| 18 | } from "@/api/modules/dataAsset"; | 19 | } from "@/api/modules/dataAsset"; |
| 19 | import useUserStore from "@/store/modules/user"; | 20 | import useUserStore from "@/store/modules/user"; |
| 20 | import useDataAssetStore from "@/store/modules/dataAsset"; | 21 | import useDataAssetStore from "@/store/modules/dataAsset"; |
| 21 | import { | 22 | import { |
| 22 | getStaffDetailInfo | 23 | getStaffDetailInfo |
| 23 | } from "@/api/modules/queryService"; | 24 | } from "@/api/modules/queryService"; |
| 24 | import { rejectFlowData, revokeFlowData, getCamundaDeploymentId, getProcessNodesPromise, isMyFirstNode, passFlowData } from "@/api/modules/workFlowService"; | 25 | import { isNeedApprove, rejectFlowData, revokeFlowData, getCamundaDeploymentId, getProcessNodesPromise, isMyFirstNode, passFlowData } from "@/api/modules/workFlowService"; |
| 25 | 26 | ||
| 26 | const assetStore = useDataAssetStore(); | 27 | const assetStore = useDataAssetStore(); |
| 27 | 28 | ||
| ... | @@ -51,9 +52,9 @@ const tableFields = ref([ | ... | @@ -51,9 +52,9 @@ const tableFields = ref([ |
| 51 | { label: "登记时间", field: "registerTime", width: 120 }, | 52 | { label: "登记时间", field: "registerTime", width: 120 }, |
| 52 | // { label: "企业名称", field: "tenantName", width: 240, align: "left" }, | 53 | // { label: "企业名称", field: "tenantName", width: 240, align: "left" }, |
| 53 | { label: "评估机构", field: "evaluationAgencyName", width: 250, align: "left" }, | 54 | { label: "评估机构", field: "evaluationAgencyName", width: 250, align: "left" }, |
| 54 | { label: "审批状态", field: "approveVO", type: "approveTag", width: 96, align: 'center' }, | 55 | { label: "审批状态", field: "approveVO", type: "approveTag", enableNoApprove: true, width: 96, align: 'center' }, |
| 55 | { | 56 | { |
| 56 | label: "主平台审批状态", field: "crossPlatformApproveState", type: "approveTagBtn", width: 150, align: 'center', btn: { | 57 | label: "主平台审批状态", field: "crossPlatformApproveState", enableNoApprove: true, type: "approveTagBtn", width: 150, align: 'center', btn: { |
| 57 | label: '查看', visible: (scope) => { | 58 | label: '查看', visible: (scope) => { |
| 58 | return scope.row.crossPlatformApproveState != null; | 59 | return scope.row.crossPlatformApproveState != null; |
| 59 | }, click: (scope) => { | 60 | }, click: (scope) => { |
| ... | @@ -66,7 +67,21 @@ const tableFields = ref([ | ... | @@ -66,7 +67,21 @@ const tableFields = ref([ |
| 66 | 67 | ||
| 67 | const deploymentId = ref(''); | 68 | const deploymentId = ref(''); |
| 68 | 69 | ||
| 69 | onMounted(() => { | 70 | const tenantList: any = ref([]); |
| 71 | |||
| 72 | onBeforeMount(() => { | ||
| 73 | getTenantList({ | ||
| 74 | bizState: 'Y', | ||
| 75 | pageSize: -1 | ||
| 76 | }).then((res: any) => { | ||
| 77 | tenantList.value = []; | ||
| 78 | if (res.code == proxy.$passCode) { | ||
| 79 | tenantList.value = res.data?.records || []; | ||
| 80 | formItems.value[1].options = tenantList.value; | ||
| 81 | } else { | ||
| 82 | proxy.$ElMessage.error(res.msg); | ||
| 83 | } | ||
| 84 | }) | ||
| 70 | }); | 85 | }); |
| 71 | 86 | ||
| 72 | onActivated(() => { | 87 | onActivated(() => { |
| ... | @@ -144,23 +159,42 @@ const getTableData = () => { | ... | @@ -144,23 +159,42 @@ const getTableData = () => { |
| 144 | }) | 159 | }) |
| 145 | } | 160 | } |
| 146 | 161 | ||
| 162 | let needApprovePromise = ref(); | ||
| 163 | |||
| 164 | const needApprove = ref(true); | ||
| 165 | |||
| 147 | const handleCreate = () => { | 166 | const handleCreate = () => { |
| 148 | if (!assetListData.value.length) { | 167 | if (!assetListData.value.length) { |
| 149 | ElMessage.warning('当前没有可发起质量评价的资产!'); | 168 | ElMessage.warning('当前没有可发起质量评价的资产!'); |
| 150 | return; | 169 | return; |
| 151 | } | 170 | } |
| 152 | formItems.value[0].visible = true; | 171 | if (needApprovePromise.value) { |
| 153 | formItems.value[0].default = ''; | 172 | return; |
| 154 | formItems.value[1].visible = true; | 173 | } |
| 155 | formItems.value[1].default = []; | 174 | needApprovePromise.value = isNeedApprove({ funcCode: 'ZCZLPJ' }).then((res1: any) => { |
| 156 | dialogInfo.value.visible = true; | 175 | needApprovePromise.value = null; |
| 157 | dialogInfo.value.type = ''; | 176 | if (res1.code == proxy.$passCode) { |
| 158 | getCamundaDeploymentId('10018', userData.tenantGuid, userData.staffGuid).then((res: any) => { | 177 | needApprove.value = res1.data; |
| 159 | if (res.code == proxy.$passCode) { | 178 | formItems.value[0].visible = true; |
| 160 | deploymentId.value = res.data; | 179 | formItems.value[0].default = ''; |
| 180 | formItems.value[1].visible = !needApprove.value; | ||
| 181 | formItems.value[1].default = ''; | ||
| 182 | formItems.value[2].visible = true; | ||
| 183 | formItems.value[2].default = []; | ||
| 184 | dialogInfo.value.visible = true; | ||
| 185 | dialogInfo.value.type = ''; | ||
| 186 | if (needApprove.value) { | ||
| 187 | getCamundaDeploymentId('10018', userData.tenantGuid, userData.staffGuid).then((res: any) => { | ||
| 188 | if (res.code == proxy.$passCode) { | ||
| 189 | deploymentId.value = res.data; | ||
| 190 | } else { | ||
| 191 | deploymentId.value = ''; | ||
| 192 | proxy.$ElMessage.error(res.msg); | ||
| 193 | } | ||
| 194 | }) | ||
| 195 | } | ||
| 161 | } else { | 196 | } else { |
| 162 | deploymentId.value = ''; | 197 | proxy.$ElMessage.error(res1.msg); |
| 163 | proxy.$ElMessage.error(res.msg); | ||
| 164 | } | 198 | } |
| 165 | }) | 199 | }) |
| 166 | } | 200 | } |
| ... | @@ -203,7 +237,13 @@ const tableInfo = ref({ | ... | @@ -203,7 +237,13 @@ const tableInfo = ref({ |
| 203 | 237 | ||
| 204 | const getTableBtns = (row) => { | 238 | const getTableBtns = (row) => { |
| 205 | let btnsArr: any[] = []; | 239 | let btnsArr: any[] = []; |
| 206 | const approveVO = row.approveVO || {}; | 240 | const approveVO = row.approveVO; |
| 241 | if (!approveVO && row.isApprove == 'N') { | ||
| 242 | btnsArr.push({ label: "编辑", value: "redit" }); | ||
| 243 | btnsArr.push({ label: "删除", value: "del" }); | ||
| 244 | btnsArr.push({ label: "详情", value: "detail" }); | ||
| 245 | return btnsArr; | ||
| 246 | } | ||
| 207 | const approveState = row.approveVO.approveState || null; | 247 | const approveState = row.approveVO.approveState || null; |
| 208 | const approveStaffGuids = approveVO.approveStaffGuids || []; | 248 | const approveStaffGuids = approveVO.approveStaffGuids || []; |
| 209 | const staffGuid = approveVO.staffGuid || ''; | 249 | const staffGuid = approveVO.staffGuid || ''; |
| ... | @@ -254,11 +294,21 @@ const tableBtnClick = (scope, btn) => { | ... | @@ -254,11 +294,21 @@ const tableBtnClick = (scope, btn) => { |
| 254 | currTableData.value = row; | 294 | currTableData.value = row; |
| 255 | console.log(row, '-------'); | 295 | console.log(row, '-------'); |
| 256 | if (type == "redit") { | 296 | if (type == "redit") { |
| 257 | dialogInfo.value.visible = true; | 297 | isNeedApprove({ funcCode: 'ZCZLPJ' }).then((res1: any) => { |
| 258 | dialogInfo.value.type = 'reSubmit'; | 298 | if (res1.code == proxy.$passCode) { |
| 259 | formItems.value[0].visible = false; | 299 | needApprove.value = res1.data; |
| 260 | formItems.value[0].default = row.registerGuid; | 300 | formItems.value[0].visible = false; |
| 261 | formItems.value[1].default = row.qualityEvaluationFile || []; | 301 | formItems.value[0].default = row.damGuid; |
| 302 | formItems.value[1].visible = !needApprove.value; | ||
| 303 | formItems.value[1].default = row.evaluationAgencyGuid; | ||
| 304 | formItems.value[2].default = row.qualityEvaluationFile || []; | ||
| 305 | dialogInfo.value.contents[0].formInfo.items = formItems.value; | ||
| 306 | dialogInfo.value.visible = true; | ||
| 307 | dialogInfo.value.type = 'reSubmit'; | ||
| 308 | } else { | ||
| 309 | proxy.$ElMessage.error(res1.msg); | ||
| 310 | } | ||
| 311 | }) | ||
| 262 | } else if (type == "del") { | 312 | } else if (type == "del") { |
| 263 | delTableOpen("此操作将永久删除该资产质量评价,是否继续?", "warning"); | 313 | delTableOpen("此操作将永久删除该资产质量评价,是否继续?", "warning"); |
| 264 | } else if (type === 'reject') { | 314 | } else if (type === 'reject') { |
| ... | @@ -390,6 +440,20 @@ const formItems = ref([{ | ... | @@ -390,6 +440,20 @@ const formItems = ref([{ |
| 390 | visible: true, | 440 | visible: true, |
| 391 | required: true | 441 | required: true |
| 392 | }, { | 442 | }, { |
| 443 | label: '评估机构', | ||
| 444 | type: 'select', | ||
| 445 | placeholder: '请选择', | ||
| 446 | field: 'evaluationAgencyGuid', | ||
| 447 | default: '', | ||
| 448 | block: true, | ||
| 449 | options: tenantList.value, | ||
| 450 | props: { | ||
| 451 | value: 'guid', | ||
| 452 | label: 'tenantName' | ||
| 453 | }, | ||
| 454 | visible: false, | ||
| 455 | required: true | ||
| 456 | }, { | ||
| 393 | label: '附件上传', | 457 | label: '附件上传', |
| 394 | tip: '支持格式:xls .xlsx .doc .docx .rar .zip', | 458 | tip: '支持格式:xls .xlsx .doc .docx .rar .zip', |
| 395 | type: 'upload-file', | 459 | type: 'upload-file', |
| ... | @@ -456,89 +520,146 @@ const dialogInfo = ref({ | ... | @@ -456,89 +520,146 @@ const dialogInfo = ref({ |
| 456 | /** 编辑质量评价发起资产申请按钮处理。 */ | 520 | /** 编辑质量评价发起资产申请按钮处理。 */ |
| 457 | const dialogBtnClick = (btn, info) => { | 521 | const dialogBtnClick = (btn, info) => { |
| 458 | if (btn.value == 'submit') { | 522 | if (btn.value == 'submit') { |
| 459 | dialogInfo.value.footer.btns[1].loading = true; | 523 | if (!needApprove.value) { |
| 460 | let submitFunc = () => { | 524 | // 不需要走流程审批的提交 |
| 461 | getProcessNodesPromise({ | 525 | dialogInfo.value.footer.btns[1].loading = true; |
| 462 | deploymentId: deploymentId.value, | 526 | if (dialogInfo.value.type == 'reSubmit') { |
| 463 | processInstanceId: null, | 527 | updatQuality({ |
| 464 | }).then((res: any) => { | 528 | guid: currTableData.value.guid, |
| 465 | if (res?.code == proxy.$passCode) { | 529 | tenantGuid: userData.tenantGuid, |
| 466 | getStaffDetailInfo(res.data?.[1]?.candidateUsers?.[0]?.staffGuid).then((resUser: any) => { | 530 | damGuid: currTableData.value.damGuid, |
| 467 | if (resUser?.code == proxy.$passCode) { | 531 | daName: currTableData.value.daName, |
| 468 | if (dialogInfo.value.type == 'reSubmit') { | 532 | immediateApprove: true, |
| 469 | updatQuality({ | 533 | evaluationAgencyGuid: info.evaluationAgencyGuid, |
| 470 | guid: currTableData.value.guid, | 534 | qualityEvaluationFile: info.qualityEvaluationFile?.map(file => { |
| 471 | tenantGuid: userData.tenantGuid, | 535 | return { |
| 472 | damGuid: currTableData.value.damGuid, | 536 | name: file.name, |
| 473 | daName: currTableData.value.daName, | 537 | url: file.url |
| 474 | immediateApprove: true, | ||
| 475 | evaluationAgencyGuid: resUser.data?.tenantGuid, | ||
| 476 | qualityEvaluationFile: info.qualityEvaluationFile?.map(file => { | ||
| 477 | return { | ||
| 478 | name: file.name, | ||
| 479 | url: file.url | ||
| 480 | } | ||
| 481 | }) || [] | ||
| 482 | }).then((res: any) => { | ||
| 483 | dialogInfo.value.footer.btns[1].loading = false; | ||
| 484 | if (res?.code == proxy.$passCode) { | ||
| 485 | ElMessage.success('该资产质量评价重新提交成功'); | ||
| 486 | dialogInfo.value.visible = false; | ||
| 487 | page.value.curr = 1; | ||
| 488 | getTableData(); | ||
| 489 | } else { | ||
| 490 | ElMessage.error(res.msg); | ||
| 491 | } | ||
| 492 | }) | ||
| 493 | } else { | ||
| 494 | let daInfo = assetListData.value.find(a => a.guid == info.damGuid); | ||
| 495 | saveQuality({ | ||
| 496 | tenantGuid: userData.tenantGuid, | ||
| 497 | damGuid: info.damGuid, | ||
| 498 | daName: daInfo.damName, | ||
| 499 | immediateApprove: true, | ||
| 500 | evaluationAgencyGuid: resUser.data?.tenantGuid, | ||
| 501 | qualityEvaluationFile: info.qualityEvaluationFile?.map(file => { | ||
| 502 | return { | ||
| 503 | name: file.name, | ||
| 504 | url: file.url | ||
| 505 | } | ||
| 506 | }) || [] | ||
| 507 | }).then((res: any) => { | ||
| 508 | dialogInfo.value.footer.btns[1].loading = false; | ||
| 509 | if (res?.code == proxy.$passCode) { | ||
| 510 | ElMessage.success('质量评价发起成功'); | ||
| 511 | dialogInfo.value.visible = false; | ||
| 512 | page.value.curr = 1; | ||
| 513 | getTableData(); | ||
| 514 | } else { | ||
| 515 | ElMessage.error(res.msg); | ||
| 516 | } | ||
| 517 | }) | ||
| 518 | } | ||
| 519 | } else { | ||
| 520 | dialogInfo.value.footer.btns[1].loading = false; | ||
| 521 | ElMessage.error(res.msg); | ||
| 522 | } | 538 | } |
| 523 | }) | 539 | }) || [] |
| 524 | } else { | 540 | }).then((res: any) => { |
| 525 | dialogInfo.value.footer.btns[1].loading = false; | 541 | dialogInfo.value.footer.btns[1].loading = false; |
| 526 | ElMessage.error(res.msg); | 542 | if (res?.code == proxy.$passCode) { |
| 527 | } | 543 | ElMessage.success('该资产质量评价重新提交成功'); |
| 528 | }) | 544 | dialogInfo.value.visible = false; |
| 529 | } | 545 | page.value.curr = 1; |
| 530 | if (deploymentId.value) { | 546 | getTableData(); |
| 531 | submitFunc(); | 547 | } else { |
| 532 | } else { | 548 | ElMessage.error(res.msg); |
| 533 | getCamundaDeploymentId('10018', userData.tenantGuid, userData.staffGuid).then((res: any) => { | 549 | } |
| 534 | if (res.code == proxy.$passCode) { | 550 | }) |
| 535 | deploymentId.value = res.data; | 551 | } else { |
| 536 | submitFunc(); | 552 | let daInfo = assetListData.value.find(a => a.guid == info.damGuid); |
| 537 | } else { | 553 | saveQuality({ |
| 554 | tenantGuid: userData.tenantGuid, | ||
| 555 | damGuid: info.damGuid, | ||
| 556 | daName: daInfo.damName, | ||
| 557 | immediateApprove: true, | ||
| 558 | evaluationAgencyGuid: info.evaluationAgencyGuid, | ||
| 559 | qualityEvaluationFile: info.qualityEvaluationFile?.map(file => { | ||
| 560 | return { | ||
| 561 | name: file.name, | ||
| 562 | url: file.url | ||
| 563 | } | ||
| 564 | }) || [] | ||
| 565 | }).then((res: any) => { | ||
| 538 | dialogInfo.value.footer.btns[1].loading = false; | 566 | dialogInfo.value.footer.btns[1].loading = false; |
| 539 | proxy.$ElMessage.error(res.msg); | 567 | if (res?.code == proxy.$passCode) { |
| 540 | } | 568 | ElMessage.success('质量评价发起成功'); |
| 541 | }) | 569 | dialogInfo.value.visible = false; |
| 570 | page.value.curr = 1; | ||
| 571 | getTableData(); | ||
| 572 | } else { | ||
| 573 | ElMessage.error(res.msg); | ||
| 574 | } | ||
| 575 | }) | ||
| 576 | } | ||
| 577 | } else { | ||
| 578 | // 需要走流程的审批功能。 | ||
| 579 | dialogInfo.value.footer.btns[1].loading = true; | ||
| 580 | let submitFunc = () => { | ||
| 581 | getProcessNodesPromise({ | ||
| 582 | deploymentId: deploymentId.value, | ||
| 583 | processInstanceId: null, | ||
| 584 | }).then((res: any) => { | ||
| 585 | if (res?.code == proxy.$passCode) { | ||
| 586 | getStaffDetailInfo(res.data?.[1]?.candidateUsers?.[0]?.staffGuid).then((resUser: any) => { | ||
| 587 | if (resUser?.code == proxy.$passCode) { | ||
| 588 | if (dialogInfo.value.type == 'reSubmit') { | ||
| 589 | updatQuality({ | ||
| 590 | guid: currTableData.value.guid, | ||
| 591 | tenantGuid: userData.tenantGuid, | ||
| 592 | damGuid: currTableData.value.damGuid, | ||
| 593 | daName: currTableData.value.daName, | ||
| 594 | immediateApprove: true, | ||
| 595 | evaluationAgencyGuid: resUser.data?.tenantGuid, | ||
| 596 | qualityEvaluationFile: info.qualityEvaluationFile?.map(file => { | ||
| 597 | return { | ||
| 598 | name: file.name, | ||
| 599 | url: file.url | ||
| 600 | } | ||
| 601 | }) || [] | ||
| 602 | }).then((res: any) => { | ||
| 603 | dialogInfo.value.footer.btns[1].loading = false; | ||
| 604 | if (res?.code == proxy.$passCode) { | ||
| 605 | ElMessage.success('该资产质量评价重新提交成功'); | ||
| 606 | dialogInfo.value.visible = false; | ||
| 607 | page.value.curr = 1; | ||
| 608 | getTableData(); | ||
| 609 | } else { | ||
| 610 | ElMessage.error(res.msg); | ||
| 611 | } | ||
| 612 | }) | ||
| 613 | } else { | ||
| 614 | let daInfo = assetListData.value.find(a => a.guid == info.damGuid); | ||
| 615 | saveQuality({ | ||
| 616 | tenantGuid: userData.tenantGuid, | ||
| 617 | damGuid: info.damGuid, | ||
| 618 | daName: daInfo.damName, | ||
| 619 | immediateApprove: true, | ||
| 620 | evaluationAgencyGuid: resUser.data?.tenantGuid, | ||
| 621 | qualityEvaluationFile: info.qualityEvaluationFile?.map(file => { | ||
| 622 | return { | ||
| 623 | name: file.name, | ||
| 624 | url: file.url | ||
| 625 | } | ||
| 626 | }) || [] | ||
| 627 | }).then((res: any) => { | ||
| 628 | dialogInfo.value.footer.btns[1].loading = false; | ||
| 629 | if (res?.code == proxy.$passCode) { | ||
| 630 | ElMessage.success('质量评价发起成功'); | ||
| 631 | dialogInfo.value.visible = false; | ||
| 632 | page.value.curr = 1; | ||
| 633 | getTableData(); | ||
| 634 | } else { | ||
| 635 | ElMessage.error(res.msg); | ||
| 636 | } | ||
| 637 | }) | ||
| 638 | } | ||
| 639 | } else { | ||
| 640 | dialogInfo.value.footer.btns[1].loading = false; | ||
| 641 | ElMessage.error(res.msg); | ||
| 642 | } | ||
| 643 | }) | ||
| 644 | } else { | ||
| 645 | dialogInfo.value.footer.btns[1].loading = false; | ||
| 646 | ElMessage.error(res.msg); | ||
| 647 | } | ||
| 648 | }) | ||
| 649 | } | ||
| 650 | if (deploymentId.value) { | ||
| 651 | submitFunc(); | ||
| 652 | } else { | ||
| 653 | getCamundaDeploymentId('10018', userData.tenantGuid, userData.staffGuid).then((res: any) => { | ||
| 654 | if (res.code == proxy.$passCode) { | ||
| 655 | deploymentId.value = res.data; | ||
| 656 | submitFunc(); | ||
| 657 | } else { | ||
| 658 | dialogInfo.value.footer.btns[1].loading = false; | ||
| 659 | proxy.$ElMessage.error(res.msg); | ||
| 660 | } | ||
| 661 | }) | ||
| 662 | } | ||
| 542 | } | 663 | } |
| 543 | } else if (btn.value == 'cancel') { | 664 | } else if (btn.value == 'cancel') { |
| 544 | dialogInfo.value.visible = false; | 665 | dialogInfo.value.visible = false; | ... | ... |
| ... | @@ -114,7 +114,7 @@ const getDetailInfo = () => { | ... | @@ -114,7 +114,7 @@ const getDetailInfo = () => { |
| 114 | if (res.code == proxy.$passCode) { | 114 | if (res.code == proxy.$passCode) { |
| 115 | const data = res.data || {}; | 115 | const data = res.data || {}; |
| 116 | evaDetailInfo.value = data; | 116 | evaDetailInfo.value = data; |
| 117 | deploymentId.value = data.approveVO.camundaDeploymentId; | 117 | deploymentId.value = data.approveVO?.camundaDeploymentId; |
| 118 | processInstanceId.value = data.approveVO?.camundaInstanceId; | 118 | processInstanceId.value = data.approveVO?.camundaInstanceId; |
| 119 | } else { | 119 | } else { |
| 120 | proxy.$ElMessage.error(res.msg); | 120 | proxy.$ElMessage.error(res.msg); |
| ... | @@ -127,7 +127,7 @@ const getDetailInfo = () => { | ... | @@ -127,7 +127,7 @@ const getDetailInfo = () => { |
| 127 | const data = res.data || {}; | 127 | const data = res.data || {}; |
| 128 | costAssessDetail.value = data; | 128 | costAssessDetail.value = data; |
| 129 | evaDetailInfo.value = data; | 129 | evaDetailInfo.value = data; |
| 130 | deploymentId.value = data.approveVO.camundaDeploymentId; | 130 | deploymentId.value = data.approveVO?.camundaDeploymentId; |
| 131 | processInstanceId.value = data.approveVO?.camundaInstanceId; | 131 | processInstanceId.value = data.approveVO?.camundaInstanceId; |
| 132 | } else { | 132 | } else { |
| 133 | proxy.$ElMessage.error(res.msg); | 133 | proxy.$ElMessage.error(res.msg); |
| ... | @@ -209,6 +209,9 @@ const toolBtns: any = computed(() => { | ... | @@ -209,6 +209,9 @@ const toolBtns: any = computed(() => { |
| 209 | label: "关闭", value: "cancel", plain: true | 209 | label: "关闭", value: "cancel", plain: true |
| 210 | }]; | 210 | }]; |
| 211 | let approveVO = evaDetailInfo.value.approveVO || costAssessDetail.value.approveVO; | 211 | let approveVO = evaDetailInfo.value.approveVO || costAssessDetail.value.approveVO; |
| 212 | if (!approveVO) { | ||
| 213 | return btnsArr; | ||
| 214 | } | ||
| 212 | let staffGuid = userData.staffGuid; | 215 | let staffGuid = userData.staffGuid; |
| 213 | if (approveVO && approveVO.approveState == 'A' && approveVO.approveStaffGuids && approveVO.approveStaffGuids.indexOf(staffGuid) > -1) { | 216 | if (approveVO && approveVO.approveState == 'A' && approveVO.approveStaffGuids && approveVO.approveStaffGuids.indexOf(staffGuid) > -1) { |
| 214 | btnsArr.push(...[{ label: "通过", value: "pass", type: 'primary' }, { label: "驳回", value: "reject", type: 'danger', plain: true }]); | 217 | btnsArr.push(...[{ label: "通过", value: "pass", type: 'primary' }, { label: "驳回", value: "reject", type: 'danger', plain: true }]); |
| ... | @@ -1171,7 +1174,7 @@ const handleClick = () => { | ... | @@ -1171,7 +1174,7 @@ const handleClick = () => { |
| 1171 | </div> | 1174 | </div> |
| 1172 | </ContentWrap> | 1175 | </ContentWrap> |
| 1173 | 1176 | ||
| 1174 | <ContentWrap v-if="route.query.type == 'qualityEvaluate' || route.query.type == 'costAssess'" id="id-approveInfo" | 1177 | <ContentWrap v-if="(route.query.type == 'qualityEvaluate' && evaDetailInfo.approveVO && evaDetailInfo.isApprove !='N') || (route.query.type == 'costAssess' && costAssessDetail.approveVO && costAssessDetail.isApprove !='N')" id="id-approveInfo" |
| 1175 | title="审批信息" description="" style="margin: 16px 16px 16px"> | 1178 | title="审批信息" description="" style="margin: 16px 16px 16px"> |
| 1176 | <ApprovalProcess ref="approvalProcessRef" v-if="deploymentId" :deploymentId="deploymentId" :processInstanceId="processInstanceId"> | 1179 | <ApprovalProcess ref="approvalProcessRef" v-if="deploymentId" :deploymentId="deploymentId" :processInstanceId="processInstanceId"> |
| 1177 | </ApprovalProcess> | 1180 | </ApprovalProcess> | ... | ... |
| ... | @@ -78,7 +78,7 @@ const getDetailInfo = () => { | ... | @@ -78,7 +78,7 @@ const getDetailInfo = () => { |
| 78 | const data = res.data || {}; | 78 | const data = res.data || {}; |
| 79 | evaDetailInfo.value = data; | 79 | evaDetailInfo.value = data; |
| 80 | detailInfo.value = data; | 80 | detailInfo.value = data; |
| 81 | deploymentId.value = data.approveVO.camundaDeploymentId; | 81 | deploymentId.value = data.approveVO?.camundaDeploymentId; |
| 82 | processInstanceId.value = data.approveVO?.camundaInstanceId; | 82 | processInstanceId.value = data.approveVO?.camundaInstanceId; |
| 83 | //需要显示质量评价信息 | 83 | //需要显示质量评价信息 |
| 84 | if (data.qualityScore != null) { | 84 | if (data.qualityScore != null) { |
| ... | @@ -90,6 +90,9 @@ const getDetailInfo = () => { | ... | @@ -90,6 +90,9 @@ const getDetailInfo = () => { |
| 90 | tabsInfo.value.tabs.splice(3, 1); | 90 | tabsInfo.value.tabs.splice(3, 1); |
| 91 | } | 91 | } |
| 92 | } | 92 | } |
| 93 | if (evaDetailInfo.value.isApprove == 'N') { | ||
| 94 | tabsInfo.value.tabs.pop(); | ||
| 95 | } | ||
| 93 | if (fullPath === route.fullPath) { | 96 | if (fullPath === route.fullPath) { |
| 94 | document.title = `详情-${data.daName}`; | 97 | document.title = `详情-${data.daName}`; |
| 95 | } | 98 | } |
| ... | @@ -124,7 +127,7 @@ const getDetailInfo = () => { | ... | @@ -124,7 +127,7 @@ const getDetailInfo = () => { |
| 124 | const data = res.data || {}; | 127 | const data = res.data || {}; |
| 125 | costAssessDetailInfo.value = data; | 128 | costAssessDetailInfo.value = data; |
| 126 | detailInfo.value = data; | 129 | detailInfo.value = data; |
| 127 | deploymentId.value = data.approveVO.camundaDeploymentId; | 130 | deploymentId.value = data.approveVO?.camundaDeploymentId; |
| 128 | processInstanceId.value = data.approveVO?.camundaInstanceId; | 131 | processInstanceId.value = data.approveVO?.camundaInstanceId; |
| 129 | // 需要显示价值评估信息 | 132 | // 需要显示价值评估信息 |
| 130 | if (data.assessmentMoney != null) { | 133 | if (data.assessmentMoney != null) { |
| ... | @@ -136,7 +139,9 @@ const getDetailInfo = () => { | ... | @@ -136,7 +139,9 @@ const getDetailInfo = () => { |
| 136 | tabsInfo.value.tabs.splice(3, 1); | 139 | tabsInfo.value.tabs.splice(3, 1); |
| 137 | } | 140 | } |
| 138 | } | 141 | } |
| 139 | 142 | if (costAssessDetailInfo.value.isApprove == 'N') { | |
| 143 | tabsInfo.value.tabs.pop(); | ||
| 144 | } | ||
| 140 | if (data.qualityScore) { | 145 | if (data.qualityScore) { |
| 141 | // 确保"质量评价"标签存在于tabs中,并插入到"价值评估"前面 | 146 | // 确保"质量评价"标签存在于tabs中,并插入到"价值评估"前面 |
| 142 | const qualityTabIndex = tabsInfo.value.tabs.findIndex(tab => tab.name === "qualityEvaluate"); | 147 | const qualityTabIndex = tabsInfo.value.tabs.findIndex(tab => tab.name === "qualityEvaluate"); |
| ... | @@ -285,8 +290,8 @@ const getDetailInfo = () => { | ... | @@ -285,8 +290,8 @@ const getDetailInfo = () => { |
| 285 | let { approveVO } = data; | 290 | let { approveVO } = data; |
| 286 | detailInfo.value = data; | 291 | detailInfo.value = data; |
| 287 | assetDetailInfo.value = data; | 292 | assetDetailInfo.value = data; |
| 288 | deploymentId.value = approveVO.camundaDeploymentId; | 293 | deploymentId.value = approveVO?.camundaDeploymentId; |
| 289 | processInstanceId.value = approveVO.camundaInstanceId; | 294 | processInstanceId.value = approveVO?.camundaInstanceId; |
| 290 | isTextTruncated(); | 295 | isTextTruncated(); |
| 291 | } else { | 296 | } else { |
| 292 | ElMessage.error(res.msg); | 297 | ElMessage.error(res.msg); |
| ... | @@ -446,6 +451,9 @@ const toolBtns: any = computed(() => { | ... | @@ -446,6 +451,9 @@ const toolBtns: any = computed(() => { |
| 446 | return btnsArr; | 451 | return btnsArr; |
| 447 | } | 452 | } |
| 448 | let approveVO = detailInfo.value.approveVO; | 453 | let approveVO = detailInfo.value.approveVO; |
| 454 | if (!approveVO) { | ||
| 455 | return btnsArr; | ||
| 456 | } | ||
| 449 | let staffGuid = userData.staffGuid; | 457 | let staffGuid = userData.staffGuid; |
| 450 | if (approveVO && approveVO.approveState == 'A' && approveVO.approveStaffGuids && approveVO.approveStaffGuids.indexOf(staffGuid) > -1) { | 458 | if (approveVO && approveVO.approveState == 'A' && approveVO.approveStaffGuids && approveVO.approveStaffGuids.indexOf(staffGuid) > -1) { |
| 451 | btnsArr.push(...[{ label: "通过", value: "pass", type: 'primary' }, { label: "驳回", value: "reject", type: 'danger', plain: true }]); | 459 | btnsArr.push(...[{ label: "通过", value: "pass", type: 'primary' }, { label: "驳回", value: "reject", type: 'danger', plain: true }]); |
| ... | @@ -1748,7 +1756,7 @@ const passCommonDialogBtnClick = (btn, info) => { | ... | @@ -1748,7 +1756,7 @@ const passCommonDialogBtnClick = (btn, info) => { |
| 1748 | </div> | 1756 | </div> |
| 1749 | </ContentWrap> | 1757 | </ContentWrap> |
| 1750 | <ContentWrap id="id-approveInfo" title="审批信息" expandSwicth style="margin-top: 15px" | 1758 | <ContentWrap id="id-approveInfo" title="审批信息" expandSwicth style="margin-top: 15px" |
| 1751 | :isExpand="approveInfoExpand" @expand="(v) => approveInfoExpand = v" v-if="route.query.type != 'certificate'"> | 1759 | :isExpand="approveInfoExpand" @expand="(v) => approveInfoExpand = v" v-if="tabsInfo.tabs.find(t => t.name == 'approveInfo') && route.query.type != 'certificate'"> |
| 1752 | <!-- <Table :tableInfo="approveTableInfo" /> --> | 1760 | <!-- <Table :tableInfo="approveTableInfo" /> --> |
| 1753 | <ApprovalProcess ref="approvalProcessRef" v-if="deploymentId" :deploymentId="deploymentId" | 1761 | <ApprovalProcess ref="approvalProcessRef" v-if="deploymentId" :deploymentId="deploymentId" |
| 1754 | :processInstanceId="processInstanceId"> | 1762 | :processInstanceId="processInstanceId"> | ... | ... |
| ... | @@ -12,14 +12,15 @@ import { | ... | @@ -12,14 +12,15 @@ import { |
| 12 | saveCostAssess, | 12 | saveCostAssess, |
| 13 | updateCostAssess, | 13 | updateCostAssess, |
| 14 | deleteCostAssess, | 14 | deleteCostAssess, |
| 15 | costAssessAllow | 15 | costAssessAllow, |
| 16 | getTenantList | ||
| 16 | } from "@/api/modules/dataAsset"; | 17 | } from "@/api/modules/dataAsset"; |
| 17 | import { | 18 | import { |
| 18 | getStaffDetailInfo | 19 | getStaffDetailInfo |
| 19 | } from "@/api/modules/queryService"; | 20 | } from "@/api/modules/queryService"; |
| 20 | import useUserStore from "@/store/modules/user"; | 21 | import useUserStore from "@/store/modules/user"; |
| 21 | import useDataAssetStore from "@/store/modules/dataAsset"; | 22 | import useDataAssetStore from "@/store/modules/dataAsset"; |
| 22 | import { getCamundaDeploymentId, getProcessNodesPromise, passFlowData, rejectFlowData, revokeFlowData, isMyFirstNode } from '@/api/modules/workFlowService'; | 23 | import { isNeedApprove, getCamundaDeploymentId, getProcessNodesPromise, passFlowData, rejectFlowData, revokeFlowData, isMyFirstNode } from '@/api/modules/workFlowService'; |
| 23 | import { changeNum } from '@/utils/common'; | 24 | import { changeNum } from '@/utils/common'; |
| 24 | 25 | ||
| 25 | const assetStore = useDataAssetStore(); | 26 | const assetStore = useDataAssetStore(); |
| ... | @@ -43,11 +44,14 @@ const tableFields = ref([ | ... | @@ -43,11 +44,14 @@ const tableFields = ref([ |
| 43 | // { label: "企业名称", field: "tenantName", width: 240, align: "left" }, | 44 | // { label: "企业名称", field: "tenantName", width: 240, align: "left" }, |
| 44 | { label: "评估机构", field: "evaluationAgencyName", width: 250, align: "left" }, | 45 | { label: "评估机构", field: "evaluationAgencyName", width: 250, align: "left" }, |
| 45 | { | 46 | { |
| 46 | label: "审批状态", field: "approveVO", type: "approveTag", width: 96, align: 'center' | 47 | label: "审批状态", field: "approveVO", type: "approveTag", enableNoApprove: true, width: 96, align: 'center' |
| 47 | }, | 48 | }, |
| 48 | ]); | 49 | ]); |
| 49 | 50 | ||
| 50 | const deploymentId = ref(''); | 51 | const deploymentId = ref(''); |
| 52 | |||
| 53 | const tenantList: any = ref([]); | ||
| 54 | |||
| 51 | onBeforeMount(() => { | 55 | onBeforeMount(() => { |
| 52 | if (isCompanyPlatform.value) { | 56 | if (isCompanyPlatform.value) { |
| 53 | tableInfo.value.fields = tableFields.value; | 57 | tableInfo.value.fields = tableFields.value; |
| ... | @@ -55,14 +59,18 @@ onBeforeMount(() => { | ... | @@ -55,14 +59,18 @@ onBeforeMount(() => { |
| 55 | tableFields.value.splice(3, 0, { label: "企业名称", field: "tenantName", width: 250, align: "left" }) | 59 | tableFields.value.splice(3, 0, { label: "企业名称", field: "tenantName", width: 250, align: "left" }) |
| 56 | tableInfo.value.fields = tableFields.value; | 60 | tableInfo.value.fields = tableFields.value; |
| 57 | } | 61 | } |
| 58 | // getTenantAttach(userData.tenantGuid).then((res: any) => { | 62 | getTenantList({ |
| 59 | // if (res?.code == proxy.$passCode) { | 63 | bizState: 'Y', |
| 60 | // attachDataInfo.value = res.data || {}; | 64 | pageSize: -1 |
| 61 | // formItems.value[1].templateUrl = attachDataInfo.value.quality_evaluation_file; | 65 | }).then((res: any) => { |
| 62 | // } else { | 66 | tenantList.value = []; |
| 63 | // ElMessage.error(res.msg); | 67 | if (res.code == proxy.$passCode) { |
| 64 | // } | 68 | tenantList.value = res.data?.records || []; |
| 65 | // }) | 69 | formItems.value[1].options = tenantList.value; |
| 70 | } else { | ||
| 71 | proxy.$ElMessage.error(res.msg); | ||
| 72 | } | ||
| 73 | }) | ||
| 66 | }); | 74 | }); |
| 67 | 75 | ||
| 68 | onActivated(() => { | 76 | onActivated(() => { |
| ... | @@ -140,36 +148,53 @@ const getTableData = () => { | ... | @@ -140,36 +148,53 @@ const getTableData = () => { |
| 140 | }) | 148 | }) |
| 141 | } | 149 | } |
| 142 | 150 | ||
| 151 | let needApprovePromise = ref(); | ||
| 152 | |||
| 153 | const needApprove = ref(true); | ||
| 154 | |||
| 143 | const handleCreate = () => { | 155 | const handleCreate = () => { |
| 144 | if (!assetListData.value.length) { | 156 | if (!assetListData.value.length) { |
| 145 | ElMessage.warning('当前没有可发起价值评估的资产!'); | 157 | ElMessage.warning('当前没有可发起价值评估的资产!'); |
| 146 | return; | 158 | return; |
| 147 | } | 159 | } |
| 148 | formItems.value[4].placeholder = `本次评估数据资产总体质量得分为**分\n准确性:\n一致性:\n可访问性:\n规范性:\n完整性:`; | 160 | if (needApprovePromise.value) { |
| 149 | formItems.value[0].visible = true; | 161 | return; |
| 150 | formItems.value[0].default = ''; | ||
| 151 | formItems.value[1].visible = true; | ||
| 152 | formItems.value[1].default = []; | ||
| 153 | formItems.value[2].visible = false; | ||
| 154 | formItems.value[2].default = ''; | ||
| 155 | formItems.value[3].visible = false; | ||
| 156 | formItems.value[3].default = ''; | ||
| 157 | formItems.value[4].visible = false; | ||
| 158 | formItems.value[4].default = ''; | ||
| 159 | formItems.value[5].visible = false; | ||
| 160 | formItems.value[5].default = []; | ||
| 161 | dialogInfo.value.visible = true; | ||
| 162 | dialogInfo.value.type = ''; | ||
| 163 | if (!deploymentId.value) { | ||
| 164 | getCamundaDeploymentId('10019', userData.tenantGuid, userData.staffGuid).then((res: any) => { | ||
| 165 | if (res.code == proxy.$passCode) { | ||
| 166 | deploymentId.value = res.data; | ||
| 167 | } else { | ||
| 168 | deploymentId.value = ''; | ||
| 169 | proxy.$ElMessage.error(res.msg); | ||
| 170 | } | ||
| 171 | }) | ||
| 172 | } | 162 | } |
| 163 | needApprovePromise.value = isNeedApprove({ funcCode: 'ZCJZPG' }).then((res1: any) => { | ||
| 164 | needApprovePromise.value = null; | ||
| 165 | if (res1.code == proxy.$passCode) { | ||
| 166 | needApprove.value = res1.data; | ||
| 167 | formItems.value[5].placeholder = `本次评估数据资产总体质量得分为**分\n准确性:\n一致性:\n可访问性:\n规范性:\n完整性:`; | ||
| 168 | formItems.value[0].visible = true; | ||
| 169 | formItems.value[0].default = ''; | ||
| 170 | formItems.value[1].visible = !needApprove.value; | ||
| 171 | formItems.value[1].default = ''; | ||
| 172 | formItems.value[2].visible = true; | ||
| 173 | formItems.value[2].default = []; | ||
| 174 | formItems.value[3].visible = false; | ||
| 175 | formItems.value[3].default = ''; | ||
| 176 | formItems.value[4].visible = false; | ||
| 177 | formItems.value[4].default = ''; | ||
| 178 | formItems.value[5].visible = false; | ||
| 179 | formItems.value[5].default = ''; | ||
| 180 | formItems.value[6].visible = false; | ||
| 181 | formItems.value[6].default = []; | ||
| 182 | dialogInfo.value.visible = true; | ||
| 183 | dialogInfo.value.type = ''; | ||
| 184 | if (needApprove.value) { | ||
| 185 | getCamundaDeploymentId('10019', userData.tenantGuid, userData.staffGuid).then((res: any) => { | ||
| 186 | if (res.code == proxy.$passCode) { | ||
| 187 | deploymentId.value = res.data; | ||
| 188 | } else { | ||
| 189 | deploymentId.value = ''; | ||
| 190 | proxy.$ElMessage.error(res.msg); | ||
| 191 | } | ||
| 192 | }) | ||
| 193 | } | ||
| 194 | } else { | ||
| 195 | proxy.$ElMessage.error(res1.msg); | ||
| 196 | } | ||
| 197 | }); | ||
| 173 | } | 198 | } |
| 174 | 199 | ||
| 175 | const page = ref({ | 200 | const page = ref({ |
| ... | @@ -210,7 +235,13 @@ const tableInfo = ref({ | ... | @@ -210,7 +235,13 @@ const tableInfo = ref({ |
| 210 | 235 | ||
| 211 | const getTableBtns = (row) => { | 236 | const getTableBtns = (row) => { |
| 212 | let btnsArr: any[] = []; | 237 | let btnsArr: any[] = []; |
| 213 | const approveVO = row.approveVO || {}; | 238 | const approveVO = row.approveVO; |
| 239 | if (!approveVO && row.isApprove == 'N') { | ||
| 240 | btnsArr.push({ label: "编辑", value: "redit" }); | ||
| 241 | btnsArr.push({ label: "删除", value: "del" }); | ||
| 242 | btnsArr.push({ label: "详情", value: "detail" }); | ||
| 243 | return btnsArr; | ||
| 244 | } | ||
| 214 | const approveState = row.approveVO.approveState || null; | 245 | const approveState = row.approveVO.approveState || null; |
| 215 | const approveStaffGuids = approveVO.approveStaffGuids || []; | 246 | const approveStaffGuids = approveVO.approveStaffGuids || []; |
| 216 | const staffGuid = approveVO.staffGuid || ''; | 247 | const staffGuid = approveVO.staffGuid || ''; |
| ... | @@ -262,62 +293,47 @@ const tableBtnClick = (scope, btn) => { | ... | @@ -262,62 +293,47 @@ const tableBtnClick = (scope, btn) => { |
| 262 | console.log('row', row); | 293 | console.log('row', row); |
| 263 | currTableData.value = row; | 294 | currTableData.value = row; |
| 264 | if (type == "redit") { | 295 | if (type == "redit") { |
| 265 | // if (!row.registerGuid) { | 296 | isNeedApprove({ funcCode: 'ZCJZPG' }).then((res1: any) => { |
| 266 | // formItems.value[2].visible = true; | 297 | if (res1.code == proxy.$passCode) { |
| 267 | // formItems.value[3].visible = true; | 298 | needApprove.value = res1.data; |
| 268 | // formItems.value[4].visible = true; | 299 | if (row.qualityEvaluationGuid) { |
| 269 | // formItems.value[5].visible = true; | 300 | formItems.value[3].visible = false; |
| 270 | // formItems.value[0].visible = false; | 301 | formItems.value[4].visible = false; |
| 271 | // formItems.value[0].default = row.damGuid; | 302 | formItems.value[5].visible = false; |
| 272 | // formItems.value[1].default = row.costAssessmentFile || []; | 303 | formItems.value[6].visible = false; |
| 273 | // dialogInfo.value.type = 'reSubmit'; | 304 | formItems.value[0].visible = false; |
| 274 | // dialogInfo.value.visible = true; | 305 | formItems.value[0].default = row.damGuid; |
| 275 | // } else { | 306 | formItems.value[1].visible = !needApprove.value; |
| 276 | // formItems.value[2].visible = false; | 307 | formItems.value[1].default = row.evaluationAgencyGuid; |
| 277 | // formItems.value[3].visible = false; | 308 | formItems.value[2].default = row.costAssessmentFile || []; |
| 278 | // formItems.value[4].visible = false; | 309 | // formItems.value[2].default = row.qualityScore; |
| 279 | // formItems.value[5].visible = false; | 310 | formItems.value[5].default = row.evaluationRangeStart && row.evaluationRangeEnd ? [row.evaluationRangeStart, row.evaluationRangeEnd] : ''; |
| 280 | // formItems.value[0].visible = false; | 311 | // formItems.value[4].default = row.evaluationNote; |
| 281 | // formItems.value[0].default = row.damGuid; | 312 | // formItems.value[5].default = row.evaluationFile || []; |
| 282 | // formItems.value[1].default = row.costAssessmentFile || []; | 313 | dialogInfo.value.type = 'reSubmit'; |
| 283 | // formItems.value[2].default = row.qualityScore; | 314 | dialogInfo.value.visible = true; |
| 284 | // formItems.value[3].default = row.evaluationRangeStart && row.evaluationRangeEnd ? [row.evaluationRangeStart, row.evaluationRangeEnd] : ''; | 315 | } |
| 285 | // formItems.value[4].default = row.evaluationNote; | 316 | if (!row.qualityEvaluationGuid) { |
| 286 | // formItems.value[5].default = row.evaluationFile || []; | 317 | formItems.value[3].visible = true; |
| 287 | // dialogInfo.value.type = 'reSubmit'; | 318 | formItems.value[4].visible = true; |
| 288 | // dialogInfo.value.visible = true; | 319 | formItems.value[5].visible = true; |
| 289 | // } | 320 | formItems.value[6].visible = true; |
| 290 | if (row.qualityEvaluationGuid) { | 321 | formItems.value[0].visible = false; |
| 291 | formItems.value[2].visible = false; | 322 | formItems.value[0].default = row.damGuid; |
| 292 | formItems.value[3].visible = false; | 323 | formItems.value[1].visible = !needApprove.value; |
| 293 | formItems.value[4].visible = false; | 324 | formItems.value[1].default = row.evaluationAgencyGuid; |
| 294 | formItems.value[5].visible = false; | 325 | formItems.value[2].default = row.costAssessmentFile || []; |
| 295 | formItems.value[0].visible = false; | 326 | formItems.value[3].default = changeNum(row.qualityScore || 0, 2); |
| 296 | formItems.value[0].default = row.damGuid; | 327 | formItems.value[4].default = row.evaluationRangeStart && row.evaluationRangeEnd ? [row.evaluationRangeStart, row.evaluationRangeEnd] : ''; |
| 297 | formItems.value[1].default = row.costAssessmentFile || []; | 328 | formItems.value[5].default = row.evaluationNote; |
| 298 | // formItems.value[2].default = row.qualityScore; | 329 | formItems.value[6].default = row.evaluationFile || []; |
| 299 | formItems.value[3].default = row.evaluationRangeStart && row.evaluationRangeEnd ? [row.evaluationRangeStart, row.evaluationRangeEnd] : ''; | 330 | dialogInfo.value.type = 'reSubmit'; |
| 300 | // formItems.value[4].default = row.evaluationNote; | 331 | dialogInfo.value.visible = true; |
| 301 | // formItems.value[5].default = row.evaluationFile || []; | 332 | } |
| 302 | dialogInfo.value.type = 'reSubmit'; | 333 | } else { |
| 303 | dialogInfo.value.visible = true; | 334 | proxy.$ElMessage.error(res1.msg); |
| 304 | } | 335 | } |
| 305 | if (!row.qualityEvaluationGuid) { | 336 | }); |
| 306 | formItems.value[2].visible = true; | ||
| 307 | formItems.value[3].visible = true; | ||
| 308 | formItems.value[4].visible = true; | ||
| 309 | formItems.value[5].visible = true; | ||
| 310 | formItems.value[0].visible = false; | ||
| 311 | formItems.value[0].default = row.damGuid; | ||
| 312 | formItems.value[1].default = row.costAssessmentFile || []; | ||
| 313 | formItems.value[2].default = changeNum(row.qualityScore || 0, 2); | ||
| 314 | formItems.value[3].default = row.evaluationRangeStart && row.evaluationRangeEnd ? [row.evaluationRangeStart, row.evaluationRangeEnd] : ''; | ||
| 315 | formItems.value[4].default = row.evaluationNote; | ||
| 316 | formItems.value[5].default = row.evaluationFile || []; | ||
| 317 | dialogInfo.value.type = 'reSubmit'; | ||
| 318 | dialogInfo.value.visible = true; | ||
| 319 | } | ||
| 320 | |||
| 321 | } else if (type == "delete") { | 337 | } else if (type == "delete") { |
| 322 | delTableOpen("此操作将永久删除该资产价值评估,是否继续?", "warning"); | 338 | delTableOpen("此操作将永久删除该资产价值评估,是否继续?", "warning"); |
| 323 | } else if (type === 'backup') { | 339 | } else if (type === 'backup') { |
| ... | @@ -392,71 +408,6 @@ const tableBtnClick = (scope, btn) => { | ... | @@ -392,71 +408,6 @@ const tableBtnClick = (scope, btn) => { |
| 392 | } | 408 | } |
| 393 | }; | 409 | }; |
| 394 | 410 | ||
| 395 | // const tableBtnClick = (scope, btn) => { | ||
| 396 | // const type = btn.value; | ||
| 397 | // const row = scope.row; | ||
| 398 | // currTableData.value = row; | ||
| 399 | // if (type === "edit") { //草稿中\已驳回\已撤销\已通过 状态,才可以编辑。 | ||
| 400 | // localStorage.setItem('isRestart', btn.label == '重新提交' ? 'true' : ''); | ||
| 401 | // // router.push({ | ||
| 402 | // // name: 'registerStart', | ||
| 403 | // // query: { guid: row.guid, exchangeGuid: row.exchangeGuid, name: row.daName, type } | ||
| 404 | // // }); | ||
| 405 | // router.push({ | ||
| 406 | // name: 'registerValueDetail', | ||
| 407 | // query: { guid: row.registerGuid, costAssessGuid: row.guid, type: 'costAssess', daTenantGuid: row.tenantGuid, exchangeGuid: row.exchangeGuid } | ||
| 408 | // }); | ||
| 409 | // } else if (type == "delete") { | ||
| 410 | // delTableOpen("此操作将永久删除该资产登记,是否继续?", "warning"); | ||
| 411 | // } else if (type === 'revoke') { // 撤销,状态为审批中时可以撤销。 | ||
| 412 | // ElMessageBox.confirm('确定撤销该资产登记审批流程吗?', "提示", { | ||
| 413 | // confirmButtonText: "确定", | ||
| 414 | // cancelButtonText: "取消", | ||
| 415 | // type: 'warning', | ||
| 416 | // }).then(() => { | ||
| 417 | // tableInfo.value.loading = true; | ||
| 418 | // let params = { | ||
| 419 | // guid: row.approveVO.approveGuid, | ||
| 420 | // flowType: row.approveVO.flowType, | ||
| 421 | // approveStaffGuid: userData.staffGuid, | ||
| 422 | // } | ||
| 423 | // revokeFlowData(params).then((res: any) => { | ||
| 424 | // tableInfo.value.loading = false; | ||
| 425 | // if (res?.code == proxy.$passCode) { | ||
| 426 | // if (res.data) { | ||
| 427 | // ElMessage.success('该审批流程撤销成功!'); | ||
| 428 | // getTableData(); | ||
| 429 | // } else { | ||
| 430 | // ElMessage.error('该审批流程撤销失败!'); | ||
| 431 | // } | ||
| 432 | // } else { | ||
| 433 | // ElMessage.error(res.msg); | ||
| 434 | // } | ||
| 435 | // }).catch(() => { | ||
| 436 | // tableInfo.value.loading = false; | ||
| 437 | // }); | ||
| 438 | // }).catch(() => { | ||
| 439 | // ElMessage({ | ||
| 440 | // type: 'info', | ||
| 441 | // message: '已取消撤销' | ||
| 442 | // }); | ||
| 443 | // }); | ||
| 444 | // } else if (type === 'detail') { // 详情, 若是草稿中,详情就是编辑, | ||
| 445 | // // router.push({ | ||
| 446 | // // name: 'registerInfoDetail', | ||
| 447 | // // query: { guid: row.guid, name: row.daName, type: 'asset' } | ||
| 448 | // // }); | ||
| 449 | // router.push({ | ||
| 450 | // name: 'registerValueDetail', | ||
| 451 | // query: { guid: row.registerGuid, costAssessGuid: row.guid, type: 'costAssess', daTenantGuid: row.tenantGuid } | ||
| 452 | // }); | ||
| 453 | // } else if (type === 'pass') { | ||
| 454 | // passDialogInfo.value.visible = true; | ||
| 455 | // } else if (type == 'reject') { | ||
| 456 | // rejectDialogInfo.value.visible = true; | ||
| 457 | // } | ||
| 458 | // }; | ||
| 459 | |||
| 460 | const delTableOpen = (msg, type, isBatch: boolean = false) => { | 411 | const delTableOpen = (msg, type, isBatch: boolean = false) => { |
| 461 | ElMessageBox.confirm(msg, "提示", { | 412 | ElMessageBox.confirm(msg, "提示", { |
| 462 | confirmButtonText: "确定", | 413 | confirmButtonText: "确定", |
| ... | @@ -509,6 +460,20 @@ const formItems = ref<any>([ | ... | @@ -509,6 +460,20 @@ const formItems = ref<any>([ |
| 509 | }, | 460 | }, |
| 510 | visible: true, | 461 | visible: true, |
| 511 | required: true | 462 | required: true |
| 463 | }, { | ||
| 464 | label: '评估机构', | ||
| 465 | type: 'select', | ||
| 466 | placeholder: '请选择', | ||
| 467 | field: 'evaluationAgencyGuid', | ||
| 468 | default: '', | ||
| 469 | block: true, | ||
| 470 | options: tenantList.value, | ||
| 471 | props: { | ||
| 472 | value: 'guid', | ||
| 473 | label: 'tenantName' | ||
| 474 | }, | ||
| 475 | visible: false, | ||
| 476 | required: true | ||
| 512 | }, | 477 | }, |
| 513 | { | 478 | { |
| 514 | label: '附件上传', | 479 | label: '附件上传', |
| ... | @@ -658,24 +623,26 @@ const dialogInfo = ref({ | ... | @@ -658,24 +623,26 @@ const dialogInfo = ref({ |
| 658 | 623 | ||
| 659 | 624 | ||
| 660 | const handleSelectChange = (val, row, info) => { | 625 | const handleSelectChange = (val, row, info) => { |
| 661 | let qualityEvaluationGuid = ''; | 626 | if (row.field != 'registerGuid') { |
| 662 | assetListData.value.forEach((item) => { | 627 | return; |
| 663 | if (item.guid == val) { | 628 | } |
| 664 | qualityEvaluationGuid = item.qualityEvaluationGuid; | 629 | let qualityEvaluationGuid = assetListData.value.find(item => item.guid == val)?.qualityEvaluationGuid; |
| 665 | } | ||
| 666 | }); | ||
| 667 | if (!qualityEvaluationGuid) { | 630 | if (!qualityEvaluationGuid) { |
| 668 | formItems.value[0].default = val; | 631 | formItems.value[0].default = val; |
| 669 | formItems.value[2].visible = true; | 632 | formItems.value[1].default = info.evaluationAgencyGuid; |
| 633 | formItems.value[2].default = info[formItems.value[2].field]; | ||
| 670 | formItems.value[3].visible = true; | 634 | formItems.value[3].visible = true; |
| 671 | formItems.value[4].visible = true; | 635 | formItems.value[4].visible = true; |
| 672 | formItems.value[5].visible = true; | 636 | formItems.value[5].visible = true; |
| 637 | formItems.value[6].visible = true; | ||
| 673 | } else { | 638 | } else { |
| 674 | formItems.value[0].default = val; | 639 | formItems.value[0].default = val; |
| 675 | formItems.value[2].visible = false; | 640 | formItems.value[1].default = info.evaluationAgencyGuid; |
| 641 | formItems.value[2].default = info[formItems.value[2].field]; | ||
| 676 | formItems.value[3].visible = false; | 642 | formItems.value[3].visible = false; |
| 677 | formItems.value[4].visible = false; | 643 | formItems.value[4].visible = false; |
| 678 | formItems.value[5].visible = false; | 644 | formItems.value[5].visible = false; |
| 645 | formItems.value[6].visible = false; | ||
| 679 | } | 646 | } |
| 680 | 647 | ||
| 681 | } | 648 | } |
| ... | @@ -709,80 +676,118 @@ const reSubmitPromise: any = ref(null); | ... | @@ -709,80 +676,118 @@ const reSubmitPromise: any = ref(null); |
| 709 | const dialogBtnClick = (btn, info) => { | 676 | const dialogBtnClick = (btn, info) => { |
| 710 | console.log('btn', btn, info); | 677 | console.log('btn', btn, info); |
| 711 | if (btn.value == 'submit') { | 678 | if (btn.value == 'submit') { |
| 712 | let submitFunc = () => { | 679 | if (!needApprove.value) { |
| 713 | getProcessNodesPromise({ | 680 | dialogInfo.value.footer.btns[1].loading = true; |
| 714 | deploymentId: deploymentId.value, | 681 | if (dialogInfo.value.type == 'reSubmit') { |
| 715 | processInstanceId: null, | 682 | updateCostAssess({ |
| 716 | }).then((res: any) => { | 683 | guid: currTableData.value.guid, |
| 717 | getStaffDetailInfo(res.data?.[1]?.candidateUsers?.[0]?.staffGuid).then((resUser: any) => { | 684 | immediateApprove: true, |
| 718 | if (resUser?.code == proxy.$passCode) { | 685 | tenantGuid: userData.tenantGuid, |
| 719 | if (dialogInfo.value.type == 'reSubmit') { | 686 | daName: currTableData.value.daName, |
| 720 | if (reSubmitPromise.value) { | 687 | damGuid: currTableData.value.damGuid, |
| 721 | return; | 688 | costAssessmentFile: info.costAssessmentFile?.map(file => { |
| 689 | return { | ||
| 690 | name: file.name, | ||
| 691 | url: file.url | ||
| 692 | } | ||
| 693 | }) || [], | ||
| 694 | evaluationFile: info.evaluationFile?.map(file => { | ||
| 695 | return { | ||
| 696 | name: file.name, | ||
| 697 | url: file.url | ||
| 698 | } | ||
| 699 | }) || [], | ||
| 700 | qualityScore: info.qualityScore || null, | ||
| 701 | evaluationRangeStart: info.evaluationRange ? info.evaluationRange[0] : null, | ||
| 702 | evaluationRangeEnd: info.evaluationRange ? info.evaluationRange[1] : null, | ||
| 703 | evaluationNote: info.evaluationNote || null, | ||
| 704 | evaluationAgencyGuid: info.evaluationAgencyGuid, | ||
| 705 | }).then((res: any) => { | ||
| 706 | dialogInfo.value.footer.btns[1].loading = false; | ||
| 707 | if (res?.code == proxy.$passCode) { | ||
| 708 | ElMessage.success('该资产价值评估重新提交成功'); | ||
| 709 | dialogInfo.value.visible = false; | ||
| 710 | page.value.curr = 1; | ||
| 711 | getTableData(); | ||
| 712 | formItems.value[4].placeholder = `本次评估数据资产总体质量得分为**分\n准确性:\n一致性:\n可访问性:\n规范性:\n完整性:`; | ||
| 713 | } else { | ||
| 714 | ElMessage.error(res.msg); | ||
| 715 | } | ||
| 716 | }) | ||
| 717 | } else { | ||
| 718 | let params: any = {}; | ||
| 719 | let daInfo = assetListData.value.find(a => a.guid == info.registerGuid); | ||
| 720 | if (daInfo.qualityEvaluationGuid) { | ||
| 721 | //通过质量评估发起资产申请 | ||
| 722 | params = { | ||
| 723 | immediateApprove: true, | ||
| 724 | tenantGuid: userData.tenantGuid, | ||
| 725 | daName: daInfo.damName, | ||
| 726 | damGuid: daInfo.guid, | ||
| 727 | costAssessmentFile: info.costAssessmentFile?.map(file => { | ||
| 728 | return { | ||
| 729 | name: file.name, | ||
| 730 | url: file.url | ||
| 722 | } | 731 | } |
| 723 | reSubmitPromise.value = updateCostAssess({ | 732 | }) || [], |
| 724 | guid: currTableData.value.guid, | 733 | evaluationAgencyGuid: info.evaluationAgencyGuid, |
| 725 | immediateApprove: true, | 734 | } |
| 726 | tenantGuid: userData.tenantGuid, | 735 | } else { |
| 727 | daName: currTableData.value.daName, | 736 | //未通过质量评估发起资产申请 |
| 728 | damGuid: currTableData.value.damGuid, | 737 | params = { |
| 729 | costAssessmentFile: info.costAssessmentFile?.map(file => { | 738 | immediateApprove: true, |
| 730 | return { | 739 | tenantGuid: userData.tenantGuid, |
| 731 | name: file.name, | 740 | daName: daInfo.damName, |
| 732 | url: file.url | 741 | damGuid: daInfo.guid, |
| 733 | } | 742 | costAssessmentFile: info.costAssessmentFile?.map(file => { |
| 734 | }) || [], | 743 | return { |
| 735 | evaluationFile: info.evaluationFile?.map(file => { | 744 | name: file.name, |
| 736 | return { | 745 | url: file.url |
| 737 | name: file.name, | ||
| 738 | url: file.url | ||
| 739 | } | ||
| 740 | }) || [], | ||
| 741 | qualityScore: info.qualityScore || null, | ||
| 742 | evaluationRangeStart: info.evaluationRange ? info.evaluationRange[0] : null, | ||
| 743 | evaluationRangeEnd: info.evaluationRange ? info.evaluationRange[1] : null, | ||
| 744 | evaluationNote: info.evaluationNote || null, | ||
| 745 | evaluationAgencyGuid: resUser.data?.tenantGuid, | ||
| 746 | }).then((res: any) => { | ||
| 747 | reSubmitPromise.value = null; | ||
| 748 | if (res?.code == proxy.$passCode) { | ||
| 749 | ElMessage.success('该资产价值评估重新提交成功'); | ||
| 750 | dialogInfo.value.visible = false; | ||
| 751 | page.value.curr = 1; | ||
| 752 | getTableData(); | ||
| 753 | formItems.value[4].placeholder = `本次评估数据资产总体质量得分为**分\n准确性:\n一致性:\n可访问性:\n规范性:\n完整性:`; | ||
| 754 | } else { | ||
| 755 | ElMessage.error(res.msg); | ||
| 756 | } | ||
| 757 | }) | ||
| 758 | } else { | ||
| 759 | if (savePromise.value) { | ||
| 760 | return; | ||
| 761 | } | 746 | } |
| 762 | let params: any = {}; | 747 | }) || [], |
| 763 | let daInfo = assetListData.value.find(a => a.guid == info.registerGuid); | 748 | evaluationFile: info.evaluationFile?.map(file => { |
| 764 | if (daInfo.qualityEvaluationGuid) { | 749 | return { |
| 765 | //通过质量评估发起资产申请 | 750 | name: file.name, |
| 766 | params = { | 751 | url: file.url |
| 767 | immediateApprove: true, | 752 | } |
| 768 | tenantGuid: userData.tenantGuid, | 753 | }) || [], |
| 769 | daName: daInfo.damName, | 754 | qualityScore: info.qualityScore, |
| 770 | damGuid: daInfo.guid, | 755 | evaluationRangeStart: info.evaluationRange ? info.evaluationRange[0] : null, |
| 771 | costAssessmentFile: info.costAssessmentFile?.map(file => { | 756 | evaluationRangeEnd: info.evaluationRange ? info.evaluationRange[1] : null, |
| 772 | return { | 757 | evaluationNote: info.evaluationNote, |
| 773 | name: file.name, | 758 | evaluationAgencyGuid: info.evaluationAgencyGuid, |
| 774 | url: file.url | 759 | } |
| 775 | } | 760 | } |
| 776 | }) || [], | 761 | saveCostAssess(params).then((res: any) => { |
| 777 | evaluationAgencyGuid: resUser.data?.tenantGuid, | 762 | dialogInfo.value.footer.btns[1].loading = false; |
| 763 | if (res?.code == proxy.$passCode) { | ||
| 764 | ElMessage.success('价值评估发起成功'); | ||
| 765 | dialogInfo.value.visible = false; | ||
| 766 | page.value.curr = 1; | ||
| 767 | getTableData(); | ||
| 768 | } else { | ||
| 769 | ElMessage.error(res.msg); | ||
| 770 | } | ||
| 771 | }) | ||
| 772 | } | ||
| 773 | } else { | ||
| 774 | let submitFunc = () => { | ||
| 775 | getProcessNodesPromise({ | ||
| 776 | deploymentId: deploymentId.value, | ||
| 777 | processInstanceId: null, | ||
| 778 | }).then((res: any) => { | ||
| 779 | getStaffDetailInfo(res.data?.[1]?.candidateUsers?.[0]?.staffGuid).then((resUser: any) => { | ||
| 780 | if (resUser?.code == proxy.$passCode) { | ||
| 781 | if (dialogInfo.value.type == 'reSubmit') { | ||
| 782 | if (reSubmitPromise.value) { | ||
| 783 | return; | ||
| 778 | } | 784 | } |
| 779 | } else { | 785 | reSubmitPromise.value = updateCostAssess({ |
| 780 | //未通过质量评估发起资产申请 | 786 | guid: currTableData.value.guid, |
| 781 | params = { | ||
| 782 | immediateApprove: true, | 787 | immediateApprove: true, |
| 783 | tenantGuid: userData.tenantGuid, | 788 | tenantGuid: userData.tenantGuid, |
| 784 | daName: daInfo.damName, | 789 | daName: currTableData.value.daName, |
| 785 | damGuid: daInfo.guid, | 790 | damGuid: currTableData.value.damGuid, |
| 786 | costAssessmentFile: info.costAssessmentFile?.map(file => { | 791 | costAssessmentFile: info.costAssessmentFile?.map(file => { |
| 787 | return { | 792 | return { |
| 788 | name: file.name, | 793 | name: file.name, |
| ... | @@ -795,43 +800,101 @@ const dialogBtnClick = (btn, info) => { | ... | @@ -795,43 +800,101 @@ const dialogBtnClick = (btn, info) => { |
| 795 | url: file.url | 800 | url: file.url |
| 796 | } | 801 | } |
| 797 | }) || [], | 802 | }) || [], |
| 798 | qualityScore: info.qualityScore, | 803 | qualityScore: info.qualityScore || null, |
| 799 | evaluationRangeStart: info.evaluationRange ? info.evaluationRange[0] : null, | 804 | evaluationRangeStart: info.evaluationRange ? info.evaluationRange[0] : null, |
| 800 | evaluationRangeEnd: info.evaluationRange ? info.evaluationRange[1] : null, | 805 | evaluationRangeEnd: info.evaluationRange ? info.evaluationRange[1] : null, |
| 801 | evaluationNote: info.evaluationNote, | 806 | evaluationNote: info.evaluationNote || null, |
| 802 | evaluationAgencyGuid: resUser.data?.tenantGuid, | 807 | evaluationAgencyGuid: resUser.data?.tenantGuid, |
| 808 | }).then((res: any) => { | ||
| 809 | reSubmitPromise.value = null; | ||
| 810 | if (res?.code == proxy.$passCode) { | ||
| 811 | ElMessage.success('该资产价值评估重新提交成功'); | ||
| 812 | dialogInfo.value.visible = false; | ||
| 813 | page.value.curr = 1; | ||
| 814 | getTableData(); | ||
| 815 | formItems.value[4].placeholder = `本次评估数据资产总体质量得分为**分\n准确性:\n一致性:\n可访问性:\n规范性:\n完整性:`; | ||
| 816 | } else { | ||
| 817 | ElMessage.error(res.msg); | ||
| 818 | } | ||
| 819 | }) | ||
| 820 | } else { | ||
| 821 | if (savePromise.value) { | ||
| 822 | return; | ||
| 803 | } | 823 | } |
| 804 | } | 824 | let params: any = {}; |
| 805 | console.log('daInfo', daInfo, info); | 825 | let daInfo = assetListData.value.find(a => a.guid == info.registerGuid); |
| 806 | savePromise.value = saveCostAssess(params).then((res: any) => { | 826 | if (daInfo.qualityEvaluationGuid) { |
| 807 | savePromise.value = null; | 827 | //通过质量评估发起资产申请 |
| 808 | if (res?.code == proxy.$passCode) { | 828 | params = { |
| 809 | ElMessage.success('价值评估发起成功'); | 829 | immediateApprove: true, |
| 810 | dialogInfo.value.visible = false; | 830 | tenantGuid: userData.tenantGuid, |
| 811 | page.value.curr = 1; | 831 | daName: daInfo.damName, |
| 812 | getTableData(); | 832 | damGuid: daInfo.guid, |
| 833 | costAssessmentFile: info.costAssessmentFile?.map(file => { | ||
| 834 | return { | ||
| 835 | name: file.name, | ||
| 836 | url: file.url | ||
| 837 | } | ||
| 838 | }) || [], | ||
| 839 | evaluationAgencyGuid: resUser.data?.tenantGuid, | ||
| 840 | } | ||
| 813 | } else { | 841 | } else { |
| 814 | ElMessage.error(res.msg); | 842 | //未通过质量评估发起资产申请 |
| 843 | params = { | ||
| 844 | immediateApprove: true, | ||
| 845 | tenantGuid: userData.tenantGuid, | ||
| 846 | daName: daInfo.damName, | ||
| 847 | damGuid: daInfo.guid, | ||
| 848 | costAssessmentFile: info.costAssessmentFile?.map(file => { | ||
| 849 | return { | ||
| 850 | name: file.name, | ||
| 851 | url: file.url | ||
| 852 | } | ||
| 853 | }) || [], | ||
| 854 | evaluationFile: info.evaluationFile?.map(file => { | ||
| 855 | return { | ||
| 856 | name: file.name, | ||
| 857 | url: file.url | ||
| 858 | } | ||
| 859 | }) || [], | ||
| 860 | qualityScore: info.qualityScore, | ||
| 861 | evaluationRangeStart: info.evaluationRange ? info.evaluationRange[0] : null, | ||
| 862 | evaluationRangeEnd: info.evaluationRange ? info.evaluationRange[1] : null, | ||
| 863 | evaluationNote: info.evaluationNote, | ||
| 864 | evaluationAgencyGuid: resUser.data?.tenantGuid, | ||
| 865 | } | ||
| 815 | } | 866 | } |
| 816 | }) | 867 | console.log('daInfo', daInfo, info); |
| 868 | savePromise.value = saveCostAssess(params).then((res: any) => { | ||
| 869 | savePromise.value = null; | ||
| 870 | if (res?.code == proxy.$passCode) { | ||
| 871 | ElMessage.success('价值评估发起成功'); | ||
| 872 | dialogInfo.value.visible = false; | ||
| 873 | page.value.curr = 1; | ||
| 874 | getTableData(); | ||
| 875 | } else { | ||
| 876 | ElMessage.error(res.msg); | ||
| 877 | } | ||
| 878 | }) | ||
| 879 | } | ||
| 880 | } else { | ||
| 881 | ElMessage.error(res.msg); | ||
| 817 | } | 882 | } |
| 883 | }); | ||
| 884 | }) | ||
| 885 | } | ||
| 886 | if (deploymentId.value) { | ||
| 887 | submitFunc(); | ||
| 888 | } else { | ||
| 889 | getCamundaDeploymentId('10019', userData.tenantGuid, userData.staffGuid).then((res: any) => { | ||
| 890 | if (res.code == proxy.$passCode) { | ||
| 891 | deploymentId.value = res.data; | ||
| 892 | submitFunc(); | ||
| 818 | } else { | 893 | } else { |
| 819 | ElMessage.error(res.msg); | 894 | proxy.$ElMessage.error(res.msg); |
| 820 | } | 895 | } |
| 821 | }); | 896 | }) |
| 822 | }) | 897 | } |
| 823 | } | ||
| 824 | if (deploymentId.value) { | ||
| 825 | submitFunc(); | ||
| 826 | } else { | ||
| 827 | getCamundaDeploymentId('10019', userData.tenantGuid, userData.staffGuid).then((res: any) => { | ||
| 828 | if (res.code == proxy.$passCode) { | ||
| 829 | deploymentId.value = res.data; | ||
| 830 | submitFunc(); | ||
| 831 | } else { | ||
| 832 | proxy.$ElMessage.error(res.msg); | ||
| 833 | } | ||
| 834 | }) | ||
| 835 | } | 898 | } |
| 836 | } else if (btn.value == 'cancel') { | 899 | } else if (btn.value == 'cancel') { |
| 837 | dialogInfo.value.visible = false; | 900 | dialogInfo.value.visible = false; |
| ... | @@ -1011,7 +1074,7 @@ const passCommonDialogInfo = ref({ | ... | @@ -1011,7 +1074,7 @@ const passCommonDialogInfo = ref({ |
| 1011 | }, | 1074 | }, |
| 1012 | type: '', | 1075 | type: '', |
| 1013 | contents: [ | 1076 | contents: [ |
| 1014 | { | 1077 | { |
| 1015 | type: 'form', | 1078 | type: 'form', |
| 1016 | title: '', | 1079 | title: '', |
| 1017 | formInfo: { | 1080 | formInfo: { | ... | ... |
-
Please register or sign in to post a comment