b039da99 by lihua

提交和审批的相关内容都需要可以直接录入

1 parent 0ef0fe16
...@@ -14,12 +14,13 @@ import { ...@@ -14,12 +14,13 @@ import {
14 qualityAllow, 14 qualityAllow,
15 deleteQuality, 15 deleteQuality,
16 updatQuality, 16 updatQuality,
17 getTenantList 17 getTenantList,
18 } from "@/api/modules/dataAsset"; 18 } from "@/api/modules/dataAsset";
19 import useUserStore from "@/store/modules/user"; 19 import useUserStore from "@/store/modules/user";
20 import useDataAssetStore from "@/store/modules/dataAsset"; 20 import useDataAssetStore from "@/store/modules/dataAsset";
21 import { 21 import {
22 getStaffDetailInfo 22 getStaffDetailInfo,
23 getSingleList
23 } from "@/api/modules/queryService"; 24 } from "@/api/modules/queryService";
24 import { isNeedApprove, 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
...@@ -49,13 +50,10 @@ const deploymentId = ref(''); ...@@ -49,13 +50,10 @@ const deploymentId = ref('');
49 const tenantList: any = ref([]); 50 const tenantList: any = ref([]);
50 51
51 onBeforeMount(() => { 52 onBeforeMount(() => {
52 getTenantList({ 53 // 获取质量评估机构
53 bizState: 'Y', 54 getSingleList({ pageIndex: -1, pageSize: -1, tenantType: "12505" }).then((res: any) => {
54 pageSize: -1
55 }).then((res: any) => {
56 tenantList.value = [];
57 if (res.code == proxy.$passCode) { 55 if (res.code == proxy.$passCode) {
58 tenantList.value = res.data?.records || []; 56 tenantList.value = res.data.records || [];
59 formItems.value[1].options = tenantList.value; 57 formItems.value[1].options = tenantList.value;
60 } else { 58 } else {
61 proxy.$ElMessage.error(res.msg); 59 proxy.$ElMessage.error(res.msg);
...@@ -162,6 +160,19 @@ const handleCreate = () => { ...@@ -162,6 +160,19 @@ const handleCreate = () => {
162 formItems.value[1].default = ''; 160 formItems.value[1].default = '';
163 formItems.value[2].visible = true; 161 formItems.value[2].visible = true;
164 formItems.value[2].default = []; 162 formItems.value[2].default = [];
163 if (!needApprove.value) {
164 passFormItems.value[0].default = null;
165 passFormItems.value[1].disabled = false;
166 passFormItems.value[1].default = null;
167 passFormItems.value[2].default = '';
168 passFormItems.value[3].default = [];
169 passFormItems.value[2].placeholder = `本次评估数据资产总体质量得分为**分\n准确性:\n一致性:\n可访问性:\n规范性:\n完整性:`;
170 dialogInfo.value.contents[0].formInfo.items = formItems.value.concat(passFormItems.value);
171 dialogInfo.value.contents[0].formInfo.rules = Object.assign({}, formRules.value, passFormRules.value);
172 } else {
173 dialogInfo.value.contents[0].formInfo.items = formItems.value;
174 dialogInfo.value.contents[0].formInfo.rules = formRules.value;
175 }
165 dialogInfo.value.visible = true; 176 dialogInfo.value.visible = true;
166 dialogInfo.value.type = ''; 177 dialogInfo.value.type = '';
167 if (needApprove.value) { 178 if (needApprove.value) {
...@@ -283,7 +294,24 @@ const tableBtnClick = (scope, btn) => { ...@@ -283,7 +294,24 @@ const tableBtnClick = (scope, btn) => {
283 formItems.value[1].visible = !needApprove.value; 294 formItems.value[1].visible = !needApprove.value;
284 formItems.value[1].default = row.evaluationAgencyGuid; 295 formItems.value[1].default = row.evaluationAgencyGuid;
285 formItems.value[2].default = row.qualityEvaluationFile || []; 296 formItems.value[2].default = row.qualityEvaluationFile || [];
297 if (!needApprove.value) {
298 passFormItems.value[0].default = row['qualityScore'];
299 if (row.dataStartDate) {
300 passFormItems.value[1].disabled = true;
301 passFormItems.value[1].default = [row.dataStartDate, row.dataEndDate];
302 } else {
303 passFormItems.value[1].disabled = false;
304 passFormItems.value[1].default = null;
305 }
306 passFormItems.value[2].default = row.evaluationNote || '';
307 passFormItems.value[3].default = row.evaluationFile || [];
308 passFormItems.value[2].placeholder = `本次评估数据资产总体质量得分为**分\n准确性:\n一致性:\n可访问性:\n规范性:\n完整性:`;
309 dialogInfo.value.contents[0].formInfo.items = formItems.value.concat(passFormItems.value);
310 dialogInfo.value.contents[0].formInfo.rules = Object.assign({}, formRules.value, passFormRules.value);
311 } else {
286 dialogInfo.value.contents[0].formInfo.items = formItems.value; 312 dialogInfo.value.contents[0].formInfo.items = formItems.value;
313 dialogInfo.value.contents[0].formInfo.rules = formRules.value;
314 }
287 dialogInfo.value.visible = true; 315 dialogInfo.value.visible = true;
288 dialogInfo.value.type = 'reSubmit'; 316 dialogInfo.value.type = 'reSubmit';
289 } else { 317 } else {
...@@ -477,7 +505,7 @@ const formRules = ref({ ...@@ -477,7 +505,7 @@ const formRules = ref({
477 505
478 const dialogInfo = ref({ 506 const dialogInfo = ref({
479 visible: false, 507 visible: false,
480 size: 510, 508 size: 560,
481 direction: "column", 509 direction: "column",
482 header: { 510 header: {
483 title: "质量评价发起", 511 title: "质量评价发起",
...@@ -502,6 +530,22 @@ const dialogInfo = ref({ ...@@ -502,6 +530,22 @@ const dialogInfo = ref({
502 }, 530 },
503 }); 531 });
504 532
533 const handleDialogSelectChange = (val, row, info) => {
534 if (row.field == 'damGuid') {
535 let selectDam = val && assetListData.value.find(a => a.guid == val);
536 formItems.value.forEach(item => {
537 item.default = info[item.field];
538 })
539 passFormItems.value.forEach(item => {
540 item.default = info[item.field];
541 if (item.field == 'evaluationRange') {
542 item.disabled = !!selectDam?.dataStartDate;
543 item.default = selectDam?.dataStartDate ? [selectDam.dataStartDate, selectDam.dataEndDate] : null;
544 }
545 })
546 }
547 }
548
505 /** 编辑质量评价发起资产申请按钮处理。 */ 549 /** 编辑质量评价发起资产申请按钮处理。 */
506 const dialogBtnClick = (btn, info) => { 550 const dialogBtnClick = (btn, info) => {
507 if (btn.value == 'submit') { 551 if (btn.value == 'submit') {
...@@ -521,7 +565,17 @@ const dialogBtnClick = (btn, info) => { ...@@ -521,7 +565,17 @@ const dialogBtnClick = (btn, info) => {
521 name: file.name, 565 name: file.name,
522 url: file.url 566 url: file.url
523 } 567 }
524 }) || [] 568 }) || [],
569 qualityScore: info.qualityScore,
570 evaluationRangeStart: info.evaluationRange[0],
571 evaluationRangeEnd: info.evaluationRange[1],
572 evaluationNote: info.evaluationNote,
573 evaluationFile: info.evaluationFile?.map(file => {
574 return {
575 name: file.name,
576 url: file.url
577 }
578 }) || [],
525 }).then((res: any) => { 579 }).then((res: any) => {
526 dialogInfo.value.footer.btns[1].loading = false; 580 dialogInfo.value.footer.btns[1].loading = false;
527 if (res?.code == proxy.$passCode) { 581 if (res?.code == proxy.$passCode) {
...@@ -546,7 +600,17 @@ const dialogBtnClick = (btn, info) => { ...@@ -546,7 +600,17 @@ const dialogBtnClick = (btn, info) => {
546 name: file.name, 600 name: file.name,
547 url: file.url 601 url: file.url
548 } 602 }
549 }) || [] 603 }) || [],
604 qualityScore: info.qualityScore,
605 evaluationRangeStart: info.evaluationRange[0],
606 evaluationRangeEnd: info.evaluationRange[1],
607 evaluationNote: info.evaluationNote,
608 evaluationFile: info.evaluationFile?.map(file => {
609 return {
610 name: file.name,
611 url: file.url
612 }
613 }) || [],
550 }).then((res: any) => { 614 }).then((res: any) => {
551 dialogInfo.value.footer.btns[1].loading = false; 615 dialogInfo.value.footer.btns[1].loading = false;
552 if (res?.code == proxy.$passCode) { 616 if (res?.code == proxy.$passCode) {
...@@ -779,6 +843,27 @@ const passDialogInfo = ref({ ...@@ -779,6 +843,27 @@ const passDialogInfo = ref({
779 }, 843 },
780 }); 844 });
781 845
846 const dialogInputChange = (val, item, info) => {
847 if (item.field != 'qualityScore') {
848 return;
849 }
850 passDialogInputChange(val, item);
851 formItems.value.forEach(item => {
852 item.default = info[item.field];
853 })
854 passFormItems.value.forEach(item => {
855 item.default = info[item.field];
856 })
857 if (!needApprove.value) {
858 dialogInfo.value.contents[0].formInfo.items = formItems.value.concat(passFormItems.value);
859 dialogInfo.value.contents[0].formInfo.rules = Object.assign({}, formRules.value, passFormRules.value);
860 } else {
861 dialogInfo.value.contents[0].formInfo.items = formItems.value;
862 dialogInfo.value.contents[0].formInfo.rules = formRules.value;
863 }
864 }
865
866
782 const passDialogInputChange = (val, item) => { 867 const passDialogInputChange = (val, item) => {
783 if (item.field == 'qualityScore') { 868 if (item.field == 'qualityScore') {
784 passFormItems.value[2].placeholder = `本次评估数据资产总体质量得分为${val}分\n准确性:\n一致性:\n可访问性:\n规范性:\n完整性:`; 869 passFormItems.value[2].placeholder = `本次评估数据资产总体质量得分为${val}分\n准确性:\n一致性:\n可访问性:\n规范性:\n完整性:`;
...@@ -969,7 +1054,8 @@ const passCommonDialogBtnClick = (btn, info) => { ...@@ -969,7 +1054,8 @@ const passCommonDialogBtnClick = (btn, info) => {
969 <div class="table_panel_wrap"> 1054 <div class="table_panel_wrap">
970 <Table :tableInfo="tableInfo" @tableBtnClick="tableBtnClick" @tablePageChange="tablePageChange" /> 1055 <Table :tableInfo="tableInfo" @tableBtnClick="tableBtnClick" @tablePageChange="tablePageChange" />
971 </div> 1056 </div>
972 <Dialog :dialogInfo="dialogInfo" @btnClick="dialogBtnClick" /> 1057 <Dialog :dialogInfo="dialogInfo" @btnClick="dialogBtnClick" @inputChange="dialogInputChange"
1058 @selectChange="handleDialogSelectChange" />
973 <Dialog :dialogInfo="passDialogInfo" @btnClick="passDialogBtnClick" @inputChange=passDialogInputChange /> 1059 <Dialog :dialogInfo="passDialogInfo" @btnClick="passDialogBtnClick" @inputChange=passDialogInputChange />
974 <Dialog :dialogInfo="rejectDialogInfo" @btnClick="rejectDialogBtnClick" /> 1060 <Dialog :dialogInfo="rejectDialogInfo" @btnClick="rejectDialogBtnClick" />
975 <Dialog :dialogInfo="passCommonDialogInfo" @btnClick="passCommonDialogBtnClick" /> 1061 <Dialog :dialogInfo="passCommonDialogInfo" @btnClick="passCommonDialogBtnClick" />
......
...@@ -18,7 +18,8 @@ import { ...@@ -18,7 +18,8 @@ import {
18 getTenantList 18 getTenantList
19 } from "@/api/modules/dataAsset"; 19 } from "@/api/modules/dataAsset";
20 import { 20 import {
21 getStaffDetailInfo 21 getStaffDetailInfo,
22 getSingleList
22 } from "@/api/modules/queryService"; 23 } from "@/api/modules/queryService";
23 import useUserStore from "@/store/modules/user"; 24 import useUserStore from "@/store/modules/user";
24 import useDataAssetStore from "@/store/modules/dataAsset"; 25 import useDataAssetStore from "@/store/modules/dataAsset";
...@@ -63,11 +64,8 @@ onBeforeMount(() => { ...@@ -63,11 +64,8 @@ onBeforeMount(() => {
63 tableFields.value.splice(3, 0, { label: "企业名称", field: "tenantName", width: 250, align: "left" }) 64 tableFields.value.splice(3, 0, { label: "企业名称", field: "tenantName", width: 250, align: "left" })
64 tableInfo.value.fields = tableFields.value; 65 tableInfo.value.fields = tableFields.value;
65 } 66 }
66 getTenantList({ 67 // 获取价值评估机构
67 bizState: 'Y', 68 getSingleList({ pageIndex: -1, pageSize: -1, bizState: 'Y', tenantType: "12504" }).then((res: any) => {
68 pageSize: -1
69 }).then((res: any) => {
70 tenantList.value = [];
71 if (res.code == proxy.$passCode) { 69 if (res.code == proxy.$passCode) {
72 tenantList.value = res.data?.records || []; 70 tenantList.value = res.data?.records || [];
73 formItems.value[1].options = tenantList.value; 71 formItems.value[1].options = tenantList.value;
...@@ -197,6 +195,18 @@ const handleCreate = () => { ...@@ -197,6 +195,18 @@ const handleCreate = () => {
197 } 195 }
198 }) 196 })
199 } 197 }
198 if (!needApprove.value) {
199 passFormItems.value[0].default = '';
200 passFormItems.value[1].default = null;
201 passFormItems.value[2].default = '';
202 passFormItems.value[3].default = [];
203 passFormItems.value[2].placeholder = '按照本次评估目的及价值类型,该笔数据资产在评估基准日的评估值为人民币***元。本次评估结论在评估基准日后一年内有效,即自20*年*月*日至20*年*月*日止。超过一年,需重新举行资产评估。';
204 dialogInfo.value.contents[0].formInfo.items = formItems.value.concat(passFormItems.value);
205 dialogInfo.value.contents[0].formInfo.rules = Object.assign({}, formRules.value, passFormRules.value);
206 } else {
207 dialogInfo.value.contents[0].formInfo.items = formItems.value;
208 dialogInfo.value.contents[0].formInfo.rules = formRules.value;
209 }
200 } else { 210 } else {
201 proxy.$ElMessage.error(res1.msg); 211 proxy.$ElMessage.error(res1.msg);
202 } 212 }
...@@ -313,11 +323,9 @@ const tableBtnClick = (scope, btn) => { ...@@ -313,11 +323,9 @@ const tableBtnClick = (scope, btn) => {
313 formItems.value[1].default = row.evaluationAgencyGuid; 323 formItems.value[1].default = row.evaluationAgencyGuid;
314 formItems.value[2].default = row.costAssessmentFile || []; 324 formItems.value[2].default = row.costAssessmentFile || [];
315 // formItems.value[2].default = row.qualityScore; 325 // formItems.value[2].default = row.qualityScore;
316 formItems.value[5].default = row.evaluationRangeStart && row.evaluationRangeEnd ? [row.evaluationRangeStart, row.evaluationRangeEnd] : ''; 326 formItems.value[4].default = row.evaluationRangeStart && row.evaluationRangeEnd ? [row.evaluationRangeStart, row.evaluationRangeEnd] : '';
317 // formItems.value[4].default = row.evaluationNote; 327 // formItems.value[4].default = row.evaluationNote;
318 // formItems.value[5].default = row.evaluationFile || []; 328 // formItems.value[5].default = row.evaluationFile || [];
319 dialogInfo.value.type = 'reSubmit';
320 dialogInfo.value.visible = true;
321 } 329 }
322 if (!row.qualityEvaluationGuid) { 330 if (!row.qualityEvaluationGuid) {
323 formItems.value[3].visible = true; 331 formItems.value[3].visible = true;
...@@ -333,9 +341,21 @@ const tableBtnClick = (scope, btn) => { ...@@ -333,9 +341,21 @@ const tableBtnClick = (scope, btn) => {
333 formItems.value[4].default = row.evaluationRangeStart && row.evaluationRangeEnd ? [row.evaluationRangeStart, row.evaluationRangeEnd] : ''; 341 formItems.value[4].default = row.evaluationRangeStart && row.evaluationRangeEnd ? [row.evaluationRangeStart, row.evaluationRangeEnd] : '';
334 formItems.value[5].default = row.evaluationNote; 342 formItems.value[5].default = row.evaluationNote;
335 formItems.value[6].default = row.evaluationFile || []; 343 formItems.value[6].default = row.evaluationFile || [];
344 }
345 if (!needApprove.value) {
346 passFormItems.value[0].default = row['assessmentMoney'] || '';
347 passFormItems.value[1].default = row.assessmentDate;
348 passFormItems.value[2].default = row.assessmentNote || '';
349 passFormItems.value[3].default = row.assessmentFile || [];
350 passFormItems.value[2].placeholder = '按照本次评估目的及价值类型,该笔数据资产在评估基准日的评估值为人民币***元。本次评估结论在评估基准日后一年内有效,即自20*年*月*日至20*年*月*日止。超过一年,需重新举行资产评估。';
351 dialogInfo.value.contents[0].formInfo.items = formItems.value.concat(passFormItems.value);
352 dialogInfo.value.contents[0].formInfo.rules = Object.assign({}, formRules.value, passFormRules.value);
353 } else {
354 dialogInfo.value.contents[0].formInfo.items = formItems.value;
355 dialogInfo.value.contents[0].formInfo.rules = formRules.value;
356 }
336 dialogInfo.value.type = 'reSubmit'; 357 dialogInfo.value.type = 'reSubmit';
337 dialogInfo.value.visible = true; 358 dialogInfo.value.visible = true;
338 }
339 } else { 359 } else {
340 proxy.$ElMessage.error(res1.msg); 360 proxy.$ElMessage.error(res1.msg);
341 } 361 }
...@@ -653,6 +673,26 @@ const handleSelectChange = (val, row, info) => { ...@@ -653,6 +673,26 @@ const handleSelectChange = (val, row, info) => {
653 673
654 } 674 }
655 675
676 const dialogInputChange = (val, item, info) => {
677 if (item.field != 'assessmentMoney' && item.field != 'assessmentDate') {
678 return;
679 }
680 passDialogInputChange(val, item, info);
681 formItems.value.forEach(item => {
682 item.default = info[item.field];
683 })
684 passFormItems.value.forEach(item => {
685 item.default = info[item.field];
686 })
687 if (!needApprove.value) {
688 dialogInfo.value.contents[0].formInfo.items = formItems.value.concat(passFormItems.value);
689 dialogInfo.value.contents[0].formInfo.rules = Object.assign({}, formRules.value, passFormRules.value);
690 } else {
691 dialogInfo.value.contents[0].formInfo.items = formItems.value;
692 dialogInfo.value.contents[0].formInfo.rules = formRules.value;
693 }
694 }
695
656 const passDialogInputChange = (val, item, inlineValue) => { 696 const passDialogInputChange = (val, item, inlineValue) => {
657 console.log('val', val, item, inlineValue); 697 console.log('val', val, item, inlineValue);
658 if (item.field == 'assessmentMoney') { 698 if (item.field == 'assessmentMoney') {
...@@ -708,6 +748,15 @@ const dialogBtnClick = (btn, info) => { ...@@ -708,6 +748,15 @@ const dialogBtnClick = (btn, info) => {
708 evaluationRangeEnd: info.evaluationRange ? info.evaluationRange[1] : null, 748 evaluationRangeEnd: info.evaluationRange ? info.evaluationRange[1] : null,
709 evaluationNote: info.evaluationNote || null, 749 evaluationNote: info.evaluationNote || null,
710 evaluationAgencyGuid: info.evaluationAgencyGuid, 750 evaluationAgencyGuid: info.evaluationAgencyGuid,
751 assessmentMoney: info.assessmentMoney,
752 assessmentDate: info.assessmentDate,
753 assessmentNote: info.assessmentNote,
754 assessmentFile: info.assessmentFile.map(file => {
755 return {
756 name: file.name,
757 url: file.url
758 }
759 }) || []
711 }).then((res: any) => { 760 }).then((res: any) => {
712 dialogInfo.value.footer.btns[1].loading = false; 761 dialogInfo.value.footer.btns[1].loading = false;
713 if (res?.code == proxy.$passCode) { 762 if (res?.code == proxy.$passCode) {
...@@ -762,6 +811,15 @@ const dialogBtnClick = (btn, info) => { ...@@ -762,6 +811,15 @@ const dialogBtnClick = (btn, info) => {
762 evaluationRangeEnd: info.evaluationRange ? info.evaluationRange[1] : null, 811 evaluationRangeEnd: info.evaluationRange ? info.evaluationRange[1] : null,
763 evaluationNote: info.evaluationNote, 812 evaluationNote: info.evaluationNote,
764 evaluationAgencyGuid: info.evaluationAgencyGuid, 813 evaluationAgencyGuid: info.evaluationAgencyGuid,
814 assessmentMoney: info.assessmentMoney,
815 assessmentDate: info.assessmentDate,
816 assessmentNote: info.assessmentNote,
817 assessmentFile: info.assessmentFile.map(file => {
818 return {
819 name: file.name,
820 url: file.url
821 }
822 }) || []
765 } 823 }
766 } 824 }
767 saveCostAssess(params).then((res: any) => { 825 saveCostAssess(params).then((res: any) => {
...@@ -1216,7 +1274,8 @@ const passCommonDialogBtnClick = (btn, info) => { ...@@ -1216,7 +1274,8 @@ const passCommonDialogBtnClick = (btn, info) => {
1216 <div class="table_panel_wrap"> 1274 <div class="table_panel_wrap">
1217 <Table :tableInfo="tableInfo" @tableBtnClick="tableBtnClick" @tablePageChange="tablePageChange" /> 1275 <Table :tableInfo="tableInfo" @tableBtnClick="tableBtnClick" @tablePageChange="tablePageChange" />
1218 </div> 1276 </div>
1219 <Dialog :dialogInfo="dialogInfo" @btnClick="dialogBtnClick" @selectChange="handleSelectChange" /> 1277 <Dialog :dialogInfo="dialogInfo" @btnClick="dialogBtnClick" @selectChange="handleSelectChange"
1278 @inputChange="dialogInputChange" />
1220 <Dialog :dialogInfo="passDialogInfo" @btnClick="passDialogBtnClick" @inputChange="passDialogInputChange" /> 1279 <Dialog :dialogInfo="passDialogInfo" @btnClick="passDialogBtnClick" @inputChange="passDialogInputChange" />
1221 <Dialog :dialogInfo="rejectDialogInfo" @btnClick="rejectDialogBtnClick" /> 1280 <Dialog :dialogInfo="rejectDialogInfo" @btnClick="rejectDialogBtnClick" />
1222 <Dialog :dialogInfo="passCommonDialogInfo" @btnClick="passCommonDialogBtnClick" /> 1281 <Dialog :dialogInfo="passCommonDialogInfo" @btnClick="passCommonDialogBtnClick" />
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!