6db5a541 by lihua

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

1 parent 52690beb
...@@ -15,12 +15,13 @@ import { ...@@ -15,12 +15,13 @@ import {
15 qualityAllow, 15 qualityAllow,
16 deleteQuality, 16 deleteQuality,
17 updatQuality, 17 updatQuality,
18 getTenantList 18 getTenantList,
19 } from "@/api/modules/dataAsset"; 19 } from "@/api/modules/dataAsset";
20 import useUserStore from "@/store/modules/user"; 20 import useUserStore from "@/store/modules/user";
21 import useDataAssetStore from "@/store/modules/dataAsset"; 21 import useDataAssetStore from "@/store/modules/dataAsset";
22 import { 22 import {
23 getStaffDetailInfo 23 getStaffDetailInfo,
24 getSingleList
24 } from "@/api/modules/queryService"; 25 } from "@/api/modules/queryService";
25 import { isNeedApprove, rejectFlowData, revokeFlowData, getCamundaDeploymentId, getProcessNodesPromise, isMyFirstNode, passFlowData } from "@/api/modules/workFlowService"; 26 import { isNeedApprove, rejectFlowData, revokeFlowData, getCamundaDeploymentId, getProcessNodesPromise, isMyFirstNode, passFlowData } from "@/api/modules/workFlowService";
26 27
...@@ -70,13 +71,10 @@ const deploymentId = ref(''); ...@@ -70,13 +71,10 @@ const deploymentId = ref('');
70 const tenantList: any = ref([]); 71 const tenantList: any = ref([]);
71 72
72 onBeforeMount(() => { 73 onBeforeMount(() => {
73 getTenantList({ 74 // 获取质量评估机构
74 bizState: 'Y', 75 getSingleList({ pageIndex: -1, pageSize: -1, tenantType: "12505" }).then((res: any) => {
75 pageSize: -1
76 }).then((res: any) => {
77 tenantList.value = [];
78 if (res.code == proxy.$passCode) { 76 if (res.code == proxy.$passCode) {
79 tenantList.value = res.data?.records || []; 77 tenantList.value = res.data.records || [];
80 formItems.value[1].options = tenantList.value; 78 formItems.value[1].options = tenantList.value;
81 } else { 79 } else {
82 proxy.$ElMessage.error(res.msg); 80 proxy.$ElMessage.error(res.msg);
...@@ -183,6 +181,19 @@ const handleCreate = () => { ...@@ -183,6 +181,19 @@ const handleCreate = () => {
183 formItems.value[1].default = ''; 181 formItems.value[1].default = '';
184 formItems.value[2].visible = true; 182 formItems.value[2].visible = true;
185 formItems.value[2].default = []; 183 formItems.value[2].default = [];
184 if (!needApprove.value) {
185 passFormItems.value[0].default = null;
186 passFormItems.value[1].disabled = false;
187 passFormItems.value[1].default = null;
188 passFormItems.value[2].default = '';
189 passFormItems.value[3].default = [];
190 passFormItems.value[2].placeholder = `本次评估数据资产总体质量得分为**分\n准确性:\n一致性:\n可访问性:\n规范性:\n完整性:`;
191 dialogInfo.value.contents[0].formInfo.items = formItems.value.concat(passFormItems.value);
192 dialogInfo.value.contents[0].formInfo.rules = Object.assign({}, formRules.value, passFormRules.value);
193 } else {
194 dialogInfo.value.contents[0].formInfo.items = formItems.value;
195 dialogInfo.value.contents[0].formInfo.rules = formRules.value;
196 }
186 dialogInfo.value.visible = true; 197 dialogInfo.value.visible = true;
187 dialogInfo.value.type = ''; 198 dialogInfo.value.type = '';
188 if (needApprove.value) { 199 if (needApprove.value) {
...@@ -304,7 +315,24 @@ const tableBtnClick = (scope, btn) => { ...@@ -304,7 +315,24 @@ const tableBtnClick = (scope, btn) => {
304 formItems.value[1].visible = !needApprove.value; 315 formItems.value[1].visible = !needApprove.value;
305 formItems.value[1].default = row.evaluationAgencyGuid; 316 formItems.value[1].default = row.evaluationAgencyGuid;
306 formItems.value[2].default = row.qualityEvaluationFile || []; 317 formItems.value[2].default = row.qualityEvaluationFile || [];
318 if (!needApprove.value) {
319 passFormItems.value[0].default = row['qualityScore'];
320 if (row.dataStartDate) {
321 passFormItems.value[1].disabled = true;
322 passFormItems.value[1].default = [row.dataStartDate, row.dataEndDate];
323 } else {
324 passFormItems.value[1].disabled = false;
325 passFormItems.value[1].default = null;
326 }
327 passFormItems.value[2].default = row.evaluationNote || '';
328 passFormItems.value[3].default = row.evaluationFile || [];
329 passFormItems.value[2].placeholder = `本次评估数据资产总体质量得分为**分\n准确性:\n一致性:\n可访问性:\n规范性:\n完整性:`;
330 dialogInfo.value.contents[0].formInfo.items = formItems.value.concat(passFormItems.value);
331 dialogInfo.value.contents[0].formInfo.rules = Object.assign({}, formRules.value, passFormRules.value);
332 } else {
307 dialogInfo.value.contents[0].formInfo.items = formItems.value; 333 dialogInfo.value.contents[0].formInfo.items = formItems.value;
334 dialogInfo.value.contents[0].formInfo.rules = formRules.value;
335 }
308 dialogInfo.value.visible = true; 336 dialogInfo.value.visible = true;
309 dialogInfo.value.type = 'reSubmit'; 337 dialogInfo.value.type = 'reSubmit';
310 } else { 338 } else {
...@@ -494,7 +522,7 @@ const formRules = ref({ ...@@ -494,7 +522,7 @@ const formRules = ref({
494 522
495 const dialogInfo = ref({ 523 const dialogInfo = ref({
496 visible: false, 524 visible: false,
497 size: 510, 525 size: 560,
498 direction: "column", 526 direction: "column",
499 header: { 527 header: {
500 title: "质量评价发起", 528 title: "质量评价发起",
...@@ -519,6 +547,22 @@ const dialogInfo = ref({ ...@@ -519,6 +547,22 @@ const dialogInfo = ref({
519 }, 547 },
520 }); 548 });
521 549
550 const handleDialogSelectChange = (val, row, info) => {
551 if (row.field == 'damGuid') {
552 let selectDam = val && assetListData.value.find(a => a.guid == val);
553 formItems.value.forEach(item => {
554 item.default = info[item.field];
555 })
556 passFormItems.value.forEach(item => {
557 item.default = info[item.field];
558 if (item.field == 'evaluationRange') {
559 item.disabled = !!selectDam?.dataStartDate;
560 item.default = selectDam?.dataStartDate ? [selectDam.dataStartDate, selectDam.dataEndDate] : null;
561 }
562 })
563 }
564 }
565
522 /** 编辑质量评价发起资产申请按钮处理。 */ 566 /** 编辑质量评价发起资产申请按钮处理。 */
523 const dialogBtnClick = (btn, info) => { 567 const dialogBtnClick = (btn, info) => {
524 if (btn.value == 'submit') { 568 if (btn.value == 'submit') {
...@@ -538,7 +582,17 @@ const dialogBtnClick = (btn, info) => { ...@@ -538,7 +582,17 @@ const dialogBtnClick = (btn, info) => {
538 name: file.name, 582 name: file.name,
539 url: file.url 583 url: file.url
540 } 584 }
541 }) || [] 585 }) || [],
586 qualityScore: info.qualityScore,
587 evaluationRangeStart: info.evaluationRange[0],
588 evaluationRangeEnd: info.evaluationRange[1],
589 evaluationNote: info.evaluationNote,
590 evaluationFile: info.evaluationFile?.map(file => {
591 return {
592 name: file.name,
593 url: file.url
594 }
595 }) || [],
542 }).then((res: any) => { 596 }).then((res: any) => {
543 dialogInfo.value.footer.btns[1].loading = false; 597 dialogInfo.value.footer.btns[1].loading = false;
544 if (res?.code == proxy.$passCode) { 598 if (res?.code == proxy.$passCode) {
...@@ -563,7 +617,17 @@ const dialogBtnClick = (btn, info) => { ...@@ -563,7 +617,17 @@ const dialogBtnClick = (btn, info) => {
563 name: file.name, 617 name: file.name,
564 url: file.url 618 url: file.url
565 } 619 }
566 }) || [] 620 }) || [],
621 qualityScore: info.qualityScore,
622 evaluationRangeStart: info.evaluationRange[0],
623 evaluationRangeEnd: info.evaluationRange[1],
624 evaluationNote: info.evaluationNote,
625 evaluationFile: info.evaluationFile?.map(file => {
626 return {
627 name: file.name,
628 url: file.url
629 }
630 }) || [],
567 }).then((res: any) => { 631 }).then((res: any) => {
568 dialogInfo.value.footer.btns[1].loading = false; 632 dialogInfo.value.footer.btns[1].loading = false;
569 if (res?.code == proxy.$passCode) { 633 if (res?.code == proxy.$passCode) {
...@@ -796,6 +860,27 @@ const passDialogInfo = ref({ ...@@ -796,6 +860,27 @@ const passDialogInfo = ref({
796 }, 860 },
797 }); 861 });
798 862
863 const dialogInputChange = (val, item, info) => {
864 if (item.field != 'qualityScore') {
865 return;
866 }
867 passDialogInputChange(val, item);
868 formItems.value.forEach(item => {
869 item.default = info[item.field];
870 })
871 passFormItems.value.forEach(item => {
872 item.default = info[item.field];
873 })
874 if (!needApprove.value) {
875 dialogInfo.value.contents[0].formInfo.items = formItems.value.concat(passFormItems.value);
876 dialogInfo.value.contents[0].formInfo.rules = Object.assign({}, formRules.value, passFormRules.value);
877 } else {
878 dialogInfo.value.contents[0].formInfo.items = formItems.value;
879 dialogInfo.value.contents[0].formInfo.rules = formRules.value;
880 }
881 }
882
883
799 const passDialogInputChange = (val, item) => { 884 const passDialogInputChange = (val, item) => {
800 if (item.field == 'qualityScore') { 885 if (item.field == 'qualityScore') {
801 passFormItems.value[2].placeholder = `本次评估数据资产总体质量得分为${val}分\n准确性:\n一致性:\n可访问性:\n规范性:\n完整性:`; 886 passFormItems.value[2].placeholder = `本次评估数据资产总体质量得分为${val}分\n准确性:\n一致性:\n可访问性:\n规范性:\n完整性:`;
...@@ -986,7 +1071,8 @@ const passCommonDialogBtnClick = (btn, info) => { ...@@ -986,7 +1071,8 @@ const passCommonDialogBtnClick = (btn, info) => {
986 <div class="table_panel_wrap"> 1071 <div class="table_panel_wrap">
987 <Table :tableInfo="tableInfo" @tableBtnClick="tableBtnClick" @tablePageChange="tablePageChange" /> 1072 <Table :tableInfo="tableInfo" @tableBtnClick="tableBtnClick" @tablePageChange="tablePageChange" />
988 </div> 1073 </div>
989 <Dialog :dialogInfo="dialogInfo" @btnClick="dialogBtnClick" /> 1074 <Dialog :dialogInfo="dialogInfo" @btnClick="dialogBtnClick" @inputChange="dialogInputChange"
1075 @selectChange="handleDialogSelectChange" />
990 <Dialog :dialogInfo="passDialogInfo" @btnClick="passDialogBtnClick" @inputChange=passDialogInputChange /> 1076 <Dialog :dialogInfo="passDialogInfo" @btnClick="passDialogBtnClick" @inputChange=passDialogInputChange />
991 <Dialog :dialogInfo="rejectDialogInfo" @btnClick="rejectDialogBtnClick" /> 1077 <Dialog :dialogInfo="rejectDialogInfo" @btnClick="rejectDialogBtnClick" />
992 <Dialog :dialogInfo="passCommonDialogInfo" @btnClick="passCommonDialogBtnClick" /> 1078 <Dialog :dialogInfo="passCommonDialogInfo" @btnClick="passCommonDialogBtnClick" />
......
...@@ -16,7 +16,8 @@ import { ...@@ -16,7 +16,8 @@ import {
16 getTenantList 16 getTenantList
17 } from "@/api/modules/dataAsset"; 17 } from "@/api/modules/dataAsset";
18 import { 18 import {
19 getStaffDetailInfo 19 getStaffDetailInfo,
20 getSingleList
20 } from "@/api/modules/queryService"; 21 } from "@/api/modules/queryService";
21 import useUserStore from "@/store/modules/user"; 22 import useUserStore from "@/store/modules/user";
22 import useDataAssetStore from "@/store/modules/dataAsset"; 23 import useDataAssetStore from "@/store/modules/dataAsset";
...@@ -59,11 +60,8 @@ onBeforeMount(() => { ...@@ -59,11 +60,8 @@ onBeforeMount(() => {
59 tableFields.value.splice(3, 0, { label: "企业名称", field: "tenantName", width: 250, align: "left" }) 60 tableFields.value.splice(3, 0, { label: "企业名称", field: "tenantName", width: 250, align: "left" })
60 tableInfo.value.fields = tableFields.value; 61 tableInfo.value.fields = tableFields.value;
61 } 62 }
62 getTenantList({ 63 // 获取价值评估机构
63 bizState: 'Y', 64 getSingleList({ pageIndex: -1, pageSize: -1, bizState: 'Y', tenantType: "12504" }).then((res: any) => {
64 pageSize: -1
65 }).then((res: any) => {
66 tenantList.value = [];
67 if (res.code == proxy.$passCode) { 65 if (res.code == proxy.$passCode) {
68 tenantList.value = res.data?.records || []; 66 tenantList.value = res.data?.records || [];
69 formItems.value[1].options = tenantList.value; 67 formItems.value[1].options = tenantList.value;
...@@ -193,6 +191,18 @@ const handleCreate = () => { ...@@ -193,6 +191,18 @@ const handleCreate = () => {
193 } 191 }
194 }) 192 })
195 } 193 }
194 if (!needApprove.value) {
195 passFormItems.value[0].default = '';
196 passFormItems.value[1].default = null;
197 passFormItems.value[2].default = '';
198 passFormItems.value[3].default = [];
199 passFormItems.value[2].placeholder = '按照本次评估目的及价值类型,该笔数据资产在评估基准日的评估值为人民币***元。本次评估结论在评估基准日后一年内有效,即自20*年*月*日至20*年*月*日止。超过一年,需重新举行资产评估。';
200 dialogInfo.value.contents[0].formInfo.items = formItems.value.concat(passFormItems.value);
201 dialogInfo.value.contents[0].formInfo.rules = Object.assign({}, formRules.value, passFormRules.value);
202 } else {
203 dialogInfo.value.contents[0].formInfo.items = formItems.value;
204 dialogInfo.value.contents[0].formInfo.rules = formRules.value;
205 }
196 } else { 206 } else {
197 proxy.$ElMessage.error(res1.msg); 207 proxy.$ElMessage.error(res1.msg);
198 } 208 }
...@@ -309,11 +319,9 @@ const tableBtnClick = (scope, btn) => { ...@@ -309,11 +319,9 @@ const tableBtnClick = (scope, btn) => {
309 formItems.value[1].default = row.evaluationAgencyGuid; 319 formItems.value[1].default = row.evaluationAgencyGuid;
310 formItems.value[2].default = row.costAssessmentFile || []; 320 formItems.value[2].default = row.costAssessmentFile || [];
311 // formItems.value[2].default = row.qualityScore; 321 // formItems.value[2].default = row.qualityScore;
312 formItems.value[5].default = row.evaluationRangeStart && row.evaluationRangeEnd ? [row.evaluationRangeStart, row.evaluationRangeEnd] : ''; 322 formItems.value[4].default = row.evaluationRangeStart && row.evaluationRangeEnd ? [row.evaluationRangeStart, row.evaluationRangeEnd] : '';
313 // formItems.value[4].default = row.evaluationNote; 323 // formItems.value[4].default = row.evaluationNote;
314 // formItems.value[5].default = row.evaluationFile || []; 324 // formItems.value[5].default = row.evaluationFile || [];
315 dialogInfo.value.type = 'reSubmit';
316 dialogInfo.value.visible = true;
317 } 325 }
318 if (!row.qualityEvaluationGuid) { 326 if (!row.qualityEvaluationGuid) {
319 formItems.value[3].visible = true; 327 formItems.value[3].visible = true;
...@@ -329,9 +337,21 @@ const tableBtnClick = (scope, btn) => { ...@@ -329,9 +337,21 @@ const tableBtnClick = (scope, btn) => {
329 formItems.value[4].default = row.evaluationRangeStart && row.evaluationRangeEnd ? [row.evaluationRangeStart, row.evaluationRangeEnd] : ''; 337 formItems.value[4].default = row.evaluationRangeStart && row.evaluationRangeEnd ? [row.evaluationRangeStart, row.evaluationRangeEnd] : '';
330 formItems.value[5].default = row.evaluationNote; 338 formItems.value[5].default = row.evaluationNote;
331 formItems.value[6].default = row.evaluationFile || []; 339 formItems.value[6].default = row.evaluationFile || [];
340 }
341 if (!needApprove.value) {
342 passFormItems.value[0].default = row['assessmentMoney'] || '';
343 passFormItems.value[1].default = row.assessmentDate;
344 passFormItems.value[2].default = row.assessmentNote || '';
345 passFormItems.value[3].default = row.assessmentFile || [];
346 passFormItems.value[2].placeholder = '按照本次评估目的及价值类型,该笔数据资产在评估基准日的评估值为人民币***元。本次评估结论在评估基准日后一年内有效,即自20*年*月*日至20*年*月*日止。超过一年,需重新举行资产评估。';
347 dialogInfo.value.contents[0].formInfo.items = formItems.value.concat(passFormItems.value);
348 dialogInfo.value.contents[0].formInfo.rules = Object.assign({}, formRules.value, passFormRules.value);
349 } else {
350 dialogInfo.value.contents[0].formInfo.items = formItems.value;
351 dialogInfo.value.contents[0].formInfo.rules = formRules.value;
352 }
332 dialogInfo.value.type = 'reSubmit'; 353 dialogInfo.value.type = 'reSubmit';
333 dialogInfo.value.visible = true; 354 dialogInfo.value.visible = true;
334 }
335 } else { 355 } else {
336 proxy.$ElMessage.error(res1.msg); 356 proxy.$ElMessage.error(res1.msg);
337 } 357 }
...@@ -649,6 +669,26 @@ const handleSelectChange = (val, row, info) => { ...@@ -649,6 +669,26 @@ const handleSelectChange = (val, row, info) => {
649 669
650 } 670 }
651 671
672 const dialogInputChange = (val, item, info) => {
673 if (item.field != 'assessmentMoney' && item.field != 'assessmentDate') {
674 return;
675 }
676 passDialogInputChange(val, item, info);
677 formItems.value.forEach(item => {
678 item.default = info[item.field];
679 })
680 passFormItems.value.forEach(item => {
681 item.default = info[item.field];
682 })
683 if (!needApprove.value) {
684 dialogInfo.value.contents[0].formInfo.items = formItems.value.concat(passFormItems.value);
685 dialogInfo.value.contents[0].formInfo.rules = Object.assign({}, formRules.value, passFormRules.value);
686 } else {
687 dialogInfo.value.contents[0].formInfo.items = formItems.value;
688 dialogInfo.value.contents[0].formInfo.rules = formRules.value;
689 }
690 }
691
652 const passDialogInputChange = (val, item, inlineValue) => { 692 const passDialogInputChange = (val, item, inlineValue) => {
653 console.log('val', val, item, inlineValue); 693 console.log('val', val, item, inlineValue);
654 if (item.field == 'assessmentMoney') { 694 if (item.field == 'assessmentMoney') {
...@@ -704,6 +744,15 @@ const dialogBtnClick = (btn, info) => { ...@@ -704,6 +744,15 @@ const dialogBtnClick = (btn, info) => {
704 evaluationRangeEnd: info.evaluationRange ? info.evaluationRange[1] : null, 744 evaluationRangeEnd: info.evaluationRange ? info.evaluationRange[1] : null,
705 evaluationNote: info.evaluationNote || null, 745 evaluationNote: info.evaluationNote || null,
706 evaluationAgencyGuid: info.evaluationAgencyGuid, 746 evaluationAgencyGuid: info.evaluationAgencyGuid,
747 assessmentMoney: info.assessmentMoney,
748 assessmentDate: info.assessmentDate,
749 assessmentNote: info.assessmentNote,
750 assessmentFile: info.assessmentFile.map(file => {
751 return {
752 name: file.name,
753 url: file.url
754 }
755 }) || []
707 }).then((res: any) => { 756 }).then((res: any) => {
708 dialogInfo.value.footer.btns[1].loading = false; 757 dialogInfo.value.footer.btns[1].loading = false;
709 if (res?.code == proxy.$passCode) { 758 if (res?.code == proxy.$passCode) {
...@@ -758,6 +807,15 @@ const dialogBtnClick = (btn, info) => { ...@@ -758,6 +807,15 @@ const dialogBtnClick = (btn, info) => {
758 evaluationRangeEnd: info.evaluationRange ? info.evaluationRange[1] : null, 807 evaluationRangeEnd: info.evaluationRange ? info.evaluationRange[1] : null,
759 evaluationNote: info.evaluationNote, 808 evaluationNote: info.evaluationNote,
760 evaluationAgencyGuid: info.evaluationAgencyGuid, 809 evaluationAgencyGuid: info.evaluationAgencyGuid,
810 assessmentMoney: info.assessmentMoney,
811 assessmentDate: info.assessmentDate,
812 assessmentNote: info.assessmentNote,
813 assessmentFile: info.assessmentFile.map(file => {
814 return {
815 name: file.name,
816 url: file.url
817 }
818 }) || []
761 } 819 }
762 } 820 }
763 saveCostAssess(params).then((res: any) => { 821 saveCostAssess(params).then((res: any) => {
...@@ -1219,7 +1277,8 @@ const passCommonDialogBtnClick = (btn, info) => { ...@@ -1219,7 +1277,8 @@ const passCommonDialogBtnClick = (btn, info) => {
1219 <div class="table_panel_wrap"> 1277 <div class="table_panel_wrap">
1220 <Table :tableInfo="tableInfo" @tableBtnClick="tableBtnClick" @tablePageChange="tablePageChange" /> 1278 <Table :tableInfo="tableInfo" @tableBtnClick="tableBtnClick" @tablePageChange="tablePageChange" />
1221 </div> 1279 </div>
1222 <Dialog :dialogInfo="dialogInfo" @btnClick="dialogBtnClick" @selectChange="handleSelectChange" /> 1280 <Dialog :dialogInfo="dialogInfo" @btnClick="dialogBtnClick" @selectChange="handleSelectChange"
1281 @inputChange="dialogInputChange" />
1223 <Dialog :dialogInfo="passDialogInfo" @btnClick="passDialogBtnClick" @inputChange="passDialogInputChange" /> 1282 <Dialog :dialogInfo="passDialogInfo" @btnClick="passDialogBtnClick" @inputChange="passDialogInputChange" />
1224 <Dialog :dialogInfo="rejectDialogInfo" @btnClick="rejectDialogBtnClick" /> 1283 <Dialog :dialogInfo="rejectDialogInfo" @btnClick="rejectDialogBtnClick" />
1225 <Dialog :dialogInfo="passCommonDialogInfo" @btnClick="passCommonDialogBtnClick" /> 1284 <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!