0e184ae7 by xukangle

fiix

1 parent 2c28a99b
...@@ -164,8 +164,14 @@ export const deleteCostAssess = (params) => request({ ...@@ -164,8 +164,14 @@ export const deleteCostAssess = (params) => request({
164 }); 164 });
165 165
166 /** 通过价值评估审批 */ 166 /** 通过价值评估审批 */
167 // export const costAssessAllow = (params) => request({
168 // url: `${import.meta.env.VITE_API_NEW_PORTAL}/cost-assessment/allow`,
169 // method: 'post',
170 // data: params
171 // });
172 /** 质量评价审批通过 */
167 export const costAssessAllow = (params) => request({ 173 export const costAssessAllow = (params) => request({
168 url: `${import.meta.env.VITE_API_NEW_PORTAL}/cost-assessment/allow`, 174 url: `${import.meta.env.VITE_API_NEW_PORTAL}/cost-assessment/submit-flow`,
169 method: 'post', 175 method: 'post',
170 data: params 176 data: params
171 }); 177 });
......
...@@ -72,7 +72,7 @@ const textareVal = ref(""); ...@@ -72,7 +72,7 @@ const textareVal = ref("");
72 const headerSearchInputValue = ref(""); 72 const headerSearchInputValue = ref("");
73 73
74 const dialogVisible = computed(() => { 74 const dialogVisible = computed(() => {
75 return props.dialogInfo.visible; 75 return props.dialogInfo?.visible;
76 }); 76 });
77 const showClose = computed(() => { 77 const showClose = computed(() => {
78 return props.dialogInfo.showClose ?? true; 78 return props.dialogInfo.showClose ?? true;
...@@ -99,10 +99,10 @@ const dialogHeight = computed(() => { ...@@ -99,10 +99,10 @@ const dialogHeight = computed(() => {
99 return props.dialogInfo.height ?? "auto"; 99 return props.dialogInfo.height ?? "auto";
100 }); 100 });
101 const dialogTitle = computed(() => { 101 const dialogTitle = computed(() => {
102 return props.dialogInfo.header.title; 102 return props.dialogInfo.header?.title;
103 }); 103 });
104 const headerSearchInputVisible = computed(() => { 104 const headerSearchInputVisible = computed(() => {
105 return props.dialogInfo.header.headerSearchInputVisible ?? false; 105 return props.dialogInfo.header?.headerSearchInputVisible ?? false;
106 }); 106 });
107 const headerSearchInputPlaceholder = computed(() => { 107 const headerSearchInputPlaceholder = computed(() => {
108 return ( 108 return (
...@@ -579,7 +579,7 @@ defineExpose({ ...@@ -579,7 +579,7 @@ defineExpose({
579 <span>{{ bar.label }}</span> 579 <span>{{ bar.label }}</span>
580 </span> 580 </span>
581 <template v-else> 581 <template v-else>
582 <el-popover v-if="bar.popover" :visible="bar.popover.visible" :title="bar.popover.title" 582 <el-popover v-if="bar.popover" :visible="bar.popover?.visible" :title="bar.popover.title"
583 :content="bar.popover.content" placement="bottom-start" :width="bar.popover.width ?? 200" 583 :content="bar.popover.content" placement="bottom-start" :width="bar.popover.width ?? 200"
584 trigger="click"> 584 trigger="click">
585 <template #reference> 585 <template #reference>
...@@ -692,7 +692,7 @@ defineExpose({ ...@@ -692,7 +692,7 @@ defineExpose({
692 </div> 692 </div>
693 </div> 693 </div>
694 </div> 694 </div>
695 <template #footer v-if="footer.visible ?? true"> 695 <template #footer v-if="footer?.visible ?? true">
696 <div class="dialog-footer" :class="{ between: footer.textBtns }"> 696 <div class="dialog-footer" :class="{ between: footer.textBtns }">
697 <div v-if="footer.textBtns"> 697 <div v-if="footer.textBtns">
698 <span class="text_btn" v-for="btn in footer.textBtns" :disabled="btn.disabled ?? false" 698 <span class="text_btn" v-for="btn in footer.textBtns" :disabled="btn.disabled ?? false"
...@@ -700,7 +700,7 @@ defineExpose({ ...@@ -700,7 +700,7 @@ defineExpose({
700 </div> 700 </div>
701 <div> 701 <div>
702 <template v-for="btn in footer.btns"> 702 <template v-for="btn in footer.btns">
703 <el-button v-if="btn.visible ?? true" :type="btn.type" :disabled="btn.disabled ?? false" 703 <el-button v-if="btn?.visible ?? true" :type="btn.type" :disabled="btn.disabled ?? false"
704 :loading="btn.loading ?? btnLoading" @click="btnClick(btn, null)" v-preReClick>{{ btn.label }}</el-button> 704 :loading="btn.loading ?? btnLoading" @click="btnClick(btn, null)" v-preReClick>{{ btn.label }}</el-button>
705 </template> 705 </template>
706 </div> 706 </div>
......
...@@ -197,6 +197,19 @@ const inputChange = (val, row) => { ...@@ -197,6 +197,19 @@ const inputChange = (val, row) => {
197 formInline.value[row.field] = val = parseFloat(val || 0).toFixed(2); 197 formInline.value[row.field] = val = parseFloat(val || 0).toFixed(2);
198 } 198 }
199 } 199 }
200 if (row.inputType == 'scoreNumber' && parseFloat(val) > 100) {
201 // 先去除非数字和小数点字符
202 val = val.replace(/[^\d.]/g, "");
203 // 限制最多保留两位小数
204 val = val.replace(/\.{2,}/g, ".");
205 val = val.replace(/^(\d+)\.(\d{2}).*$/, "$1.$2");
206 let num = parseFloat(val);
207 if (num > 100) {
208 num = 100; // 超过100时将其设置为100
209 val = num.toFixed(2); // 保证显示为两位小数
210 }
211 formInline.value[row.field] = val;
212 }
200 // 新增的 inputType 处理逻辑:integerWithComma 213 // 新增的 inputType 处理逻辑:integerWithComma
201 if (row.inputType == "integerWithComma") { 214 if (row.inputType == "integerWithComma") {
202 val = val.replace(/[^\d]/g, ""); // 移除非数字字符 215 val = val.replace(/[^\d]/g, ""); // 移除非数字字符
...@@ -981,8 +994,7 @@ const panelChange = (scope, row) => { ...@@ -981,8 +994,7 @@ const panelChange = (scope, row) => {
981 </div> 994 </div>
982 </div> 995 </div>
983 <div v-if="item.example" class="panel_header-expample">{{ item.example }}</div> 996 <div v-if="item.example" class="panel_header-expample">{{ item.example }}</div>
984 <el-input ref="exampleTextareaRef" :id="item.field" 997 <el-input ref="exampleTextareaRef" :id="item.field" :class="[item.col, { is_block: item.block }]"
985 :class="[item.col, { is_block: item.block }]"
986 v-model="formInline[item.field]" :rows="item.rows ?? 4" type="textarea" :placeholder="item.placeholder" 998 v-model="formInline[item.field]" :rows="item.rows ?? 4" type="textarea" :placeholder="item.placeholder"
987 :disabled="item.disabled || readonly" :readonly="item.readonly" resize="none" 999 :disabled="item.disabled || readonly" :readonly="item.readonly" resize="none"
988 :maxlength="item.maxlength ?? 500" show-word-limit @focus="(event) => inputFocus(event, item)" 1000 :maxlength="item.maxlength ?? 500" show-word-limit @focus="(event) => inputFocus(event, item)"
......
...@@ -223,6 +223,7 @@ const tableBtnClick = (scope, btn) => { ...@@ -223,6 +223,7 @@ const tableBtnClick = (scope, btn) => {
223 const type = btn.value; 223 const type = btn.value;
224 const row = scope.row; 224 const row = scope.row;
225 currTableData.value = row; 225 currTableData.value = row;
226 console.log(row, '-------');
226 if (type == "redit") { 227 if (type == "redit") {
227 dialogInfo.value.visible = true; 228 dialogInfo.value.visible = true;
228 dialogInfo.value.type = 'reSubmit'; 229 dialogInfo.value.type = 'reSubmit';
......
...@@ -21,7 +21,7 @@ import { ...@@ -21,7 +21,7 @@ import {
21 } from "@/api/modules/queryService"; 21 } from "@/api/modules/queryService";
22 import useUserStore from "@/store/modules/user"; 22 import useUserStore from "@/store/modules/user";
23 import useDataAssetStore from "@/store/modules/dataAsset"; 23 import useDataAssetStore from "@/store/modules/dataAsset";
24 import { passFlowData, rejectFlowData, revokeFlowData } from '@/api/modules/workFlowService'; 24 import { getCamundaDeploymentId, getProcessNodesPromise, passFlowData, rejectFlowData, revokeFlowData } from '@/api/modules/workFlowService';
25 25
26 const assetStore = useDataAssetStore(); 26 const assetStore = useDataAssetStore();
27 27
...@@ -80,6 +80,7 @@ const tableFields = ref([ ...@@ -80,6 +80,7 @@ const tableFields = ref([
80 }, 80 },
81 ]); 81 ]);
82 82
83 const deploymentId = ref('');
83 onBeforeMount(() => { 84 onBeforeMount(() => {
84 if (isCompanyPlatform.value) { 85 if (isCompanyPlatform.value) {
85 tableInfo.value.fields = tableFields.value; 86 tableInfo.value.fields = tableFields.value;
...@@ -87,12 +88,19 @@ onBeforeMount(() => { ...@@ -87,12 +88,19 @@ onBeforeMount(() => {
87 tableFields.value.splice(3, 0, { label: "企业名称", field: "tenantName", width: 250, align: "left" }) 88 tableFields.value.splice(3, 0, { label: "企业名称", field: "tenantName", width: 250, align: "left" })
88 tableInfo.value.fields = tableFields.value; 89 tableInfo.value.fields = tableFields.value;
89 } 90 }
90 getTenantAttach(userData.tenantGuid).then((res: any) => { 91 // getTenantAttach(userData.tenantGuid).then((res: any) => {
91 if (res?.code == proxy.$passCode) { 92 // if (res?.code == proxy.$passCode) {
92 attachDataInfo.value = res.data || {}; 93 // attachDataInfo.value = res.data || {};
93 formItems.value[1].templateUrl = attachDataInfo.value.quality_evaluation_file; 94 // formItems.value[1].templateUrl = attachDataInfo.value.quality_evaluation_file;
95 // } else {
96 // ElMessage.error(res.msg);
97 // }
98 // })
99 getCamundaDeploymentId('10019', userData.tenantGuid, userData.staffGuid).then((res: any) => {
100 if (res.code == proxy.$passCode) {
101 deploymentId.value = res.data;
94 } else { 102 } else {
95 ElMessage.error(res.msg); 103 proxy.$ElMessage.error(res.msg);
96 } 104 }
97 }) 105 })
98 }); 106 });
...@@ -252,14 +260,14 @@ const tableInfo = ref({ ...@@ -252,14 +260,14 @@ const tableInfo = ref({
252 // } 260 // }
253 // return btnsArr; 261 // return btnsArr;
254 // } 262 // }
255 const getTableBtns = (row, includeDetail = true) => { 263 const getTableBtns = (row) => {
256 let btnsArr: any[] = []; 264 let btnsArr: any[] = [];
257 const approveVO = row.approveVO; 265 const approveVO = row.approveVO || {};
266 const approveState = row.approveState || null;
267 const approveStaffGuids = approveVO.approveStaffGuids || [];
268 const staffGuid = approveVO.staffGuid || '';
269 const bizApproveState = row.bizApproveState;
258 const currentStaffGuid = userData.staffGuid 270 const currentStaffGuid = userData.staffGuid
259 const bizApproveState = row.approveState;
260 const approveState = approveVO?.approveState || 'N';
261 const approveStaffGuids = approveVO?.approveStaffGuids || [];
262 const staffGuid = approveVO?.staffGuid || '';
263 let isShowCancel = false; 271 let isShowCancel = false;
264 let flowState; 272 let flowState;
265 if (approveState == 'N') { 273 if (approveState == 'N') {
...@@ -274,24 +282,25 @@ const getTableBtns = (row, includeDetail = true) => { ...@@ -274,24 +282,25 @@ const getTableBtns = (row, includeDetail = true) => {
274 if (approveVO && approveVO.approveState == 'A' && staffGuid == currentStaffGuid) { 282 if (approveVO && approveVO.approveState == 'A' && staffGuid == currentStaffGuid) {
275 isShowCancel = true; 283 isShowCancel = true;
276 } 284 }
277
278 if (flowState === 1) { 285 if (flowState === 1) {
279 btnsArr = [{ label: "编辑", value: "edit" }, { label: "删除", value: "delete" }] 286 btnsArr = [{ label: "删除", value: "delete" }]
280 } else {
281 btnsArr.push({ label: "详情", value: "detail" })
282 if (flowState === 2) {
283 btnsArr.push(...[{ label: "通过", value: "pass" }, { label: "驳回", value: "reject" }])
284 if (isShowCancel) {
285 btnsArr.push({ label: "撤销", value: "revoke" })
286 } 287 }
287 } else if (flowState === 3) { 288 if (flowState === 2) {
288 if (bizApproveState != 'D') { 289 btnsArr = [{ label: "通过", value: "pass" }, { label: "驳回", value: "reject" }]
289 btnsArr.push({ label: "重新提交", value: "edit" })
290 } 290 }
291 if (flowState === 3) {
291 btnsArr.push({ label: "删除", value: "delete" }) 292 btnsArr.push({ label: "删除", value: "delete" })
292 } 293 }
294 if (flowState === 3 && bizApproveState != 'D') {
295 btnsArr.push({ label: "重新提交", value: "redit" })
296 }
297 if (isShowCancel) {
298 btnsArr.push({ label: "撤销", value: "revoke" })
299 }
300 if (flowState !== 1) {
301 btnsArr.push({ label: "详情", value: "detail" })
293 } 302 }
294 return btnsArr 303 return btnsArr;
295 } 304 }
296 305
297 306
...@@ -300,12 +309,34 @@ const currTableData: any = ref({}); ...@@ -300,12 +309,34 @@ const currTableData: any = ref({});
300 const tableBtnClick = (scope, btn) => { 309 const tableBtnClick = (scope, btn) => {
301 const type = btn.value; 310 const type = btn.value;
302 const row = scope.row; 311 const row = scope.row;
312 console.log('row', row);
303 currTableData.value = row; 313 currTableData.value = row;
304 if (type == "edit") { 314 if (type == "redit") {
315 if (!row.registerGuid) {
316 formItems.value[2].visible = false;
317 formItems.value[3].visible = false;
318 formItems.value[4].visible = false;
319 formItems.value[5].visible = false;
320 formItems.value[0].visible = false;
321 formItems.value[0].default = row.damGuid;
322 formItems.value[1].default = row.costAssessmentFile || [];
323 dialogInfo.value.type = 'reSubmit';
324 dialogInfo.value.visible = true;
325 } else {
326 formItems.value[2].visible = true;
327 formItems.value[3].visible = true;
328 formItems.value[4].visible = true;
329 formItems.value[5].visible = true;
305 formItems.value[0].visible = false; 330 formItems.value[0].visible = false;
331 formItems.value[0].default = row.damGuid;
306 formItems.value[1].default = row.costAssessmentFile || []; 332 formItems.value[1].default = row.costAssessmentFile || [];
333 formItems.value[2].default = row.qualityScore;
334 formItems.value[3].default = row.evaluationRangeStart && row.evaluationRangeEnd ? [row.evaluationRangeStart, row.evaluationRangeEnd] : '';
335 formItems.value[4].default = row.evaluationNote;
336 formItems.value[5].default = row.evaluationFile || [];
307 dialogInfo.value.type = 'reSubmit'; 337 dialogInfo.value.type = 'reSubmit';
308 dialogInfo.value.visible = true; 338 dialogInfo.value.visible = true;
339 }
309 } else if (type == "delete") { 340 } else if (type == "delete") {
310 delTableOpen("此操作将永久删除该资产价值评估,是否继续?", "warning"); 341 delTableOpen("此操作将永久删除该资产价值评估,是否继续?", "warning");
311 } else if (type === 'backup') { 342 } else if (type === 'backup') {
...@@ -314,29 +345,23 @@ const tableBtnClick = (scope, btn) => { ...@@ -314,29 +345,23 @@ const tableBtnClick = (scope, btn) => {
314 passDialogInfo.value.visible = true; 345 passDialogInfo.value.visible = true;
315 passFormItems.value[2].placeholder = '按照本次评估目的及价值类型,该笔数据资产在评估基准日的评估值为人民币***元。本次评估结论在评估基准日后一年内有效,即自20*年*月*日至20*年*月*日止。超过一年,需重新举行资产评估。'; 346 passFormItems.value[2].placeholder = '按照本次评估目的及价值类型,该笔数据资产在评估基准日的评估值为人民币***元。本次评估结论在评估基准日后一年内有效,即自20*年*月*日至20*年*月*日止。超过一年,需重新举行资产评估。';
316 } else if (type === 'revoke') { // 撤销,状态为审批中时可以撤销。 347 } else if (type === 'revoke') { // 撤销,状态为审批中时可以撤销。
317 ElMessageBox.confirm('确定撤销该资产价值评估吗?', "提示", { 348 ElMessageBox.confirm(`撤销后,该流程将不再进行审核,确定这样操作吗?`, "提示", {
318 confirmButtonText: "确定", 349 confirmButtonText: "确定",
319 cancelButtonText: "取消", 350 cancelButtonText: "取消",
320 type: 'warning', 351 type: 'warning',
321 }).then(() => { 352 }).then(() => {
322 let params = { 353 revokeFlowData({
323 bizGuid: row.guid, 354 guid: row.approveVO.approveGuid,
324 funcCode: row.funcCode 355 flowType: row.approveVO.flowType,
325 } 356 approveStaffGuid: userData.staffGuid,
326 tableInfo.value.loading = true; 357 }).then((res: any) => {
327 registerApproveCancel(params).then((res: any) => { 358 if (res.code == '00000') {
328 tableInfo.value.loading = false; 359 ElMessage.success('撤销成功!')
329 if (res?.code == proxy.$passCode) {
330 if (res.data) {
331 ElMessage.success('该资产价值评估流程撤销成功!');
332 getTableData(); 360 getTableData();
333 } else { 361 } else {
334 ElMessage.error('该资产价值评估流程撤销失败!'); 362 ElMessage.error(res.msg)
335 }
336 } else {
337 ElMessage.error(res.msg);
338 } 363 }
339 }); 364 })
340 }).catch(() => { 365 }).catch(() => {
341 ElMessage({ 366 ElMessage({
342 type: 'info', 367 type: 'info',
...@@ -348,6 +373,23 @@ const tableBtnClick = (scope, btn) => { ...@@ -348,6 +373,23 @@ const tableBtnClick = (scope, btn) => {
348 name: 'registerValueDetail', 373 name: 'registerValueDetail',
349 query: { guid: row.registerGuid, costAssessGuid: row.guid, type: 'costAssess', daTenantGuid: row.tenantGuid } 374 query: { guid: row.registerGuid, costAssessGuid: row.guid, type: 'costAssess', daTenantGuid: row.tenantGuid }
350 }); 375 });
376 } else if (type === 'detail') { // 详情
377 if (row.registerApproveState == 'Y') {
378 router.push({
379 name: 'registerDetail',
380 query: { guid: row.registerGuid, costAssessGuid: row.guid, type: 'costAssess', daTenantGuid: row.tenantGuid }
381 });
382 } else {
383 router.push({
384 name: 'evaCatalogDetail',
385 query: { guid: row.registerGuid, costAssessGuid: row.guid, type: 'costAssess' }
386 });
387 }
388 } else if (type == 'productDetail') {
389 router.push({
390 name: 'registerCatalogDetail',
391 query: { guid: row.damGuid }
392 });
351 } 393 }
352 else if (type === 'pass') { 394 else if (type === 'pass') {
353 passDialogInfo.value.visible = true; 395 passDialogInfo.value.visible = true;
...@@ -458,7 +500,7 @@ const tablePageChange = (info) => { ...@@ -458,7 +500,7 @@ const tablePageChange = (info) => {
458 getTableData(); 500 getTableData();
459 }; 501 };
460 502
461 const formItems = ref([ 503 const formItems = ref<any>([
462 { 504 {
463 label: '资产名称', 505 label: '资产名称',
464 type: 'select', 506 type: 'select',
...@@ -479,6 +521,9 @@ const formItems = ref([ ...@@ -479,6 +521,9 @@ const formItems = ref([
479 tip: '支持格式:xls .xlsx .doc .docx .rar .zip', 521 tip: '支持格式:xls .xlsx .doc .docx .rar .zip',
480 type: 'upload-file', 522 type: 'upload-file',
481 accept: '.xls, .xlsx, .doc, .docx, .rar, .zip', 523 accept: '.xls, .xlsx, .doc, .docx, .rar, .zip',
524 field: 'costAssessmentFile',
525 default: [],
526 required: true,
482 templateUrl: 'auto', 527 templateUrl: 'auto',
483 templateClick: () => { 528 templateClick: () => {
484 const link = document.createElement('a'); 529 const link = document.createElement('a');
...@@ -488,11 +533,8 @@ const formItems = ref([ ...@@ -488,11 +533,8 @@ const formItems = ref([
488 link.click(); 533 link.click();
489 link.remove(); 534 link.remove();
490 }, 535 },
491 required: true,
492 block: true, 536 block: true,
493 visible: true, 537 visible: true,
494 default: [],
495 field: 'costAssessmentFile',
496 }, 538 },
497 // 质量评分 type: input 539 // 质量评分 type: input
498 { 540 {
...@@ -528,7 +570,6 @@ const formItems = ref([ ...@@ -528,7 +570,6 @@ const formItems = ref([
528 default: '', 570 default: '',
529 maxlength: 250, 571 maxlength: 250,
530 block: true, 572 block: true,
531 focusValue: true,
532 clearable: true, 573 clearable: true,
533 required: true, 574 required: true,
534 visible: false 575 visible: false
...@@ -614,19 +655,24 @@ const handleSelectChange = (val, row, info) => { ...@@ -614,19 +655,24 @@ const handleSelectChange = (val, row, info) => {
614 } 655 }
615 656
616 const passDialogInputChange = (val, item, inlineValue) => { 657 const passDialogInputChange = (val, item, inlineValue) => {
658 console.log('val', val, item, inlineValue);
617 if (item.field == 'assessmentMoney') { 659 if (item.field == 'assessmentMoney') {
618 let M = ""; 660 let M = "";
619 let D = ""; 661 let D = "";
620 let assessmentDate = inlineValue.assessmentDate; 662 let assessmentDate = inlineValue.assessmentDate;
621 if (assessmentDate) { 663 if (assessmentDate) {
622 M = (assessmentDate.getMonth() + 1 < 10 ? '0' + (assessmentDate.getMonth() + 1) : assessmentDate.getMonth() + 1); 664 M = (assessmentDate?.getMonth() + 1 < 10 ? '0' + (assessmentDate?.getMonth() + 1) : assessmentDate?.getMonth() + 1);
623 D = (assessmentDate.getDate() + 1 < 10 ? '0' + assessmentDate.getDate() : assessmentDate.getDate()); 665 D = (assessmentDate?.getDate() + 1 < 10 ? '0' + assessmentDate?.getDate() : assessmentDate?.getDate());
624 } 666 }
625 passFormItems.value[2].placeholder = `按照本次评估目的及价值类型,该笔数据资产在评估基准日的评估值为人民币${val}元。本次评估结论在评估基准日后一年内有效,即自${inlineValue.assessmentDate ? `${inlineValue.assessmentDate.getFullYear()}${M}${D}日至${inlineValue.assessmentDate.getFullYear() + 1}${M}${D}日` : '20*年*月*日至20*年*月*日'}止。超过一年,需重新举行资产评估。`; 667 passFormItems.value[2].placeholder = `按照本次评估目的及价值类型,该笔数据资产在评估基准日的评估值为人民币${val}元。本次评估结论在评估基准日后一年内有效,即自${inlineValue.assessmentDate ? `${inlineValue.assessmentDate?.getFullYear()}${M}${D}日至${inlineValue.assessmentDate?.getFullYear() + 1}${M}${D}` : '20*年*月*日至20*年*月*日'}止。超过一年,需重新举行资产评估。`;
626 } else if (item.field == 'assessmentDate') { 668 } else if (item.field == 'assessmentDate') {
627 let M = (val.getMonth() + 1 < 10 ? '0' + (val.getMonth() + 1) : val.getMonth() + 1); 669 if (val && !(val instanceof Date)) {
628 let D = (val.getDate() + 1 < 10 ? '0' + val.getDate() : val.getDate()); 670 // 如果 val 不是 Date 类型,尝试将其转换为 Date 对象
629 passFormItems.value[2].placeholder = `按照本次评估目的及价值类型,该笔数据资产在评估基准日的评估值为人民币${inlineValue.assessmentMoney ? inlineValue.assessmentMoney : '***'}元。本次评估结论在评估基准日后一年内有效,即自${val ? `${val.getFullYear()}${M}${D}日至${val.getFullYear() + 1}${M}${D}日` : '20*年*月*日至20*年*月*日'}止。超过一年,需重新举行资产评估。`; 671 val = new Date(val);
672 }
673 let M = (val?.getMonth() + 1 < 10 ? '0' + (val?.getMonth() + 1) : val?.getMonth() + 1);
674 let D = (val?.getDate() + 1 < 10 ? '0' + val?.getDate() : val?.getDate());
675 passFormItems.value[2].placeholder = `按照本次评估目的及价值类型,该笔数据资产在评估基准日的评估值为人民币${inlineValue.assessmentMoney ? inlineValue.assessmentMoney : '***'}元。本次评估结论在评估基准日后一年内有效,即自${val ? `${val?.getFullYear()}${M}${D}日至${val?.getFullYear() + 1}${M}${D}` : '20*年*月*日至20*年*月*日'}止。超过一年,需重新举行资产评估。`;
630 } 676 }
631 } 677 }
632 678
...@@ -635,19 +681,40 @@ const reSubmitPromise: any = ref(null); ...@@ -635,19 +681,40 @@ const reSubmitPromise: any = ref(null);
635 681
636 /** 编辑质量评估发起资产申请按钮处理。 */ 682 /** 编辑质量评估发起资产申请按钮处理。 */
637 const dialogBtnClick = (btn, info) => { 683 const dialogBtnClick = (btn, info) => {
684 console.log('btn', btn, info);
638 if (btn.value == 'submit') { 685 if (btn.value == 'submit') {
686 getProcessNodesPromise({
687 deploymentId: deploymentId.value,
688 processInstanceId: null,
689 }).then((res: any) => {
690 console.log('res', res);
639 if (dialogInfo.value.type == 'reSubmit') { 691 if (dialogInfo.value.type == 'reSubmit') {
640 if (reSubmitPromise.value) { 692 if (reSubmitPromise.value) {
641 return; 693 return;
642 } 694 }
643 reSubmitPromise.value = updateCostAssess({ 695 reSubmitPromise.value = updateCostAssess({
644 guid: currTableData.value.guid, 696 guid: currTableData.value.guid,
697 immediateApprove: true,
645 tenantGuid: userData.tenantGuid, 698 tenantGuid: userData.tenantGuid,
646 registerGuid: currTableData.value.registerGuid,
647 daName: currTableData.value.daName, 699 daName: currTableData.value.daName,
648 registerTime: currTableData.value.registerTime, 700 damGuid: currTableData.value.damGuid,
649 issuingEntityGuid: currTableData.value.issuingEntityGuid, 701 costAssessmentFile: info.costAssessmentFile?.map(file => {
650 costAssessmentFile: info.costAssessmentFile?.map(f => f.url) || [] 702 return {
703 name: file.name,
704 url: file.url
705 }
706 }) || [],
707 evaluationFile: info.evaluationFile?.map(file => {
708 return {
709 name: file.name,
710 url: file.url
711 }
712 }) || [],
713 qualityScore: info.qualityScore || null,
714 evaluationRangeStart: info.evaluationRange ? info.evaluationRange[0] : null,
715 evaluationRangeEnd: info.evaluationRange ? info.evaluationRange[1] : null,
716 evaluationNote: info.evaluationNote || null,
717 evaluationAgencyGuid: res.data?.[1]?.candidateUsers?.[0]?.staffGuid,
651 }).then((res: any) => { 718 }).then((res: any) => {
652 reSubmitPromise.value = null; 719 reSubmitPromise.value = null;
653 if (res?.code == proxy.$passCode) { 720 if (res?.code == proxy.$passCode) {
...@@ -663,32 +730,47 @@ const dialogBtnClick = (btn, info) => { ...@@ -663,32 +730,47 @@ const dialogBtnClick = (btn, info) => {
663 if (savePromise.value) { 730 if (savePromise.value) {
664 return; 731 return;
665 } 732 }
666 let daInfo = assetListData.value.find(a => a.guid == info.registerGuid);
667 let params: any = {}; 733 let params: any = {};
734 let daInfo = assetListData.value.find(a => a.guid == info.registerGuid);
668 if (daInfo.qualityEvaluationGuid) { 735 if (daInfo.qualityEvaluationGuid) {
669 //通过质量评估 736 //通过质量评估发起资产申请
670 params = { 737 params = {
671 immediateApprove: true, 738 immediateApprove: true,
672 tenantGuid: userData.tenantGuid, 739 tenantGuid: userData.tenantGuid,
673 registerGuid: info.registerGuid,
674 daName: daInfo.damName, 740 daName: daInfo.damName,
675 damGuid: daInfo.guid, 741 damGuid: daInfo.guid,
676 costAssessmentFile: info.costAssessmentFile?.map(f => f.url) || [], 742 costAssessmentFile: info.costAssessmentFile?.map(file => {
677 evaluationFile: info.evaluationFile?.map(f => f.url) || [], 743 return {
678 qualityScore: info.qualityScore, 744 name: file.name,
679 evaluationRangeStart: info.evaluationRange ? info.evaluationRange[0] : null, 745 url: file.url
680 evaluationRangeEnd: info.evaluationRange ? info.evaluationRange[1] : null, 746 }
681 evaluationNote: info.evaluationNote, 747 }) || [],
748 evaluationAgencyGuid: res.data?.[1]?.candidateUsers?.[0]?.staffGuid,
682 } 749 }
683 } else { 750 } else {
684 //未通过质量评估 751 //未通过质量评估发起资产申请
685 params = { 752 params = {
686 immediateApprove: true, 753 immediateApprove: true,
687 tenantGuid: userData.tenantGuid, 754 tenantGuid: userData.tenantGuid,
688 registerGuid: info.registerGuid,
689 daName: daInfo.damName, 755 daName: daInfo.damName,
690 damGuid: daInfo.guid, 756 damGuid: daInfo.guid,
691 costAssessmentFile: info.costAssessmentFile?.map(f => f.url) || [], 757 costAssessmentFile: info.costAssessmentFile?.map(file => {
758 return {
759 name: file.name,
760 url: file.url
761 }
762 }) || [],
763 evaluationFile: info.evaluationFile?.map(file => {
764 return {
765 name: file.name,
766 url: file.url
767 }
768 }) || [],
769 qualityScore: info.qualityScore,
770 evaluationRangeStart: info.evaluationRange ? info.evaluationRange[0] : null,
771 evaluationRangeEnd: info.evaluationRange ? info.evaluationRange[1] : null,
772 evaluationNote: info.evaluationNote,
773 evaluationAgencyGuid: res.data?.[1]?.candidateUsers?.[0]?.staffGuid,
692 } 774 }
693 } 775 }
694 console.log('daInfo', daInfo, info); 776 console.log('daInfo', daInfo, info);
...@@ -704,6 +786,7 @@ const dialogBtnClick = (btn, info) => { ...@@ -704,6 +786,7 @@ const dialogBtnClick = (btn, info) => {
704 } 786 }
705 }) 787 })
706 } 788 }
789 })
707 } else if (btn.value == 'cancel') { 790 } else if (btn.value == 'cancel') {
708 dialogInfo.value.visible = false; 791 dialogInfo.value.visible = false;
709 } 792 }
...@@ -833,42 +916,26 @@ const passDialogInfo = ref({ ...@@ -833,42 +916,26 @@ const passDialogInfo = ref({
833 }, 916 },
834 }); 917 });
835 918
836 // const passDialogBtnClick = (btn, info) => {
837 // if (btn.value == 'submit') {
838 // costAssessAllow({
839 // guid: currTableData.value.guid,
840 // assessmentMoney: info.assessmentMoney,
841 // assessmentDate: info.assessmentDate,
842 // assessmentNote: info.assessmentNote,
843 // assessmentFile: info.assessmentFile.map(f => f.url),
844 // }).then((res: any) => {
845 // if (res?.code == proxy.$passCode) {
846 // if (res.data) {
847 // ElMessage.success('审批成功');
848 // passDialogInfo.value.visible = false;
849 // getTableData();
850 // } else {
851 // ElMessage.error('审批失败');
852 // }
853 // } else {
854 // ElMessage.error(res.msg);
855 // }
856 // })
857 // } else if (btn.value == 'cancel') {
858 // passDialogInfo.value.visible = false;
859 // }
860 // };
861 const passDialogBtnClick = (btn, info) => { 919 const passDialogBtnClick = (btn, info) => {
920 let params: any = {}
921 console.log('btn', btn, info, currTableData.value);
862 if (btn.value == 'submit') { 922 if (btn.value == 'submit') {
863 tableInfo.value.loading = true; 923
864 let params = { 924 costAssessAllow({
865 guid: currTableData.value.approveVO.approveGuid, 925 guid: currTableData.value.approveVO.approveGuid,
926 bizGuid: currTableData.value.guid,
866 flowType: currTableData.value.approveVO.flowType, 927 flowType: currTableData.value.approveVO.flowType,
867 approveSuggest: info.approveSuggest,
868 approveStaffGuid: userData.staffGuid, 928 approveStaffGuid: userData.staffGuid,
929 assessmentMoney: info.assessmentMoney,
930 assessmentDate: info.assessmentDate,
931 assessmentNote: info.assessmentNote,
932 assessmentFile: info.assessmentFile.map(file => {
933 return {
934 name: file.name,
935 url: file.url
869 } 936 }
870 passFlowData(params).then((res: any) => { 937 }) || [],
871 tableInfo.value.loading = false; 938 }).then((res: any) => {
872 if (res?.code == proxy.$passCode) { 939 if (res?.code == proxy.$passCode) {
873 if (res.data) { 940 if (res.data) {
874 ElMessage.success('审批成功'); 941 ElMessage.success('审批成功');
...@@ -880,9 +947,7 @@ const passDialogBtnClick = (btn, info) => { ...@@ -880,9 +947,7 @@ const passDialogBtnClick = (btn, info) => {
880 } else { 947 } else {
881 ElMessage.error(res.msg); 948 ElMessage.error(res.msg);
882 } 949 }
883 }).catch(() => { 950 })
884 tableInfo.value.loading = false;
885 });
886 } else if (btn.value == 'cancel') { 951 } else if (btn.value == 'cancel') {
887 passDialogInfo.value.visible = false; 952 passDialogInfo.value.visible = false;
888 } 953 }
......
...@@ -76,117 +76,90 @@ const tableInfo = ref({ ...@@ -76,117 +76,90 @@ const tableInfo = ref({
76 76
77 77
78 78
79 /**弹窗配置 */ 79 const formItems = ref([
80 const newCreateGradeFormItems = ref<any>([{ 80 {
81 label: '标签名', 81 label: '附件上传',
82 type: 'input', 82 tip: '支持格式:pdf,单个文件不能超过10MB ',
83 placeholder: '请选择', 83 type: 'upload-file',
84 field: 'label', 84 accept: '.pdf',
85 default: '', 85 field: 'costAssessmentFile',
86 templateUrl: '',
86 required: true, 87 required: true,
87 filterable: true,
88 clearable: true,
89 visible: true,
90 block: true, 88 block: true,
91 }, 89 visible: true,
92 { 90 default: [],
93 label: '分类',
94 type: 'tree-select',
95 placeholder: '请选择',
96 field: 'classifyDetailGuid',
97 default: '',
98 options: [],
99 props: {
100 label: "classifyName",
101 value: "guid",
102 }, 91 },
92 {
93 label: '附件上传',
94 tip: '支持格式:pdf,单个文件不能超过10MB ',
95 type: 'upload-file',
96 accept: '.pdf',
97 field: 'costAssessmentFile1',
98 templateUrl: '',
103 required: true, 99 required: true,
104 checkStricty: true,
105 lazy: false,
106 filterable: true,
107 clearable: true,
108 visible: true,
109 block: true, 100 block: true,
110 }, 101 visible: true,
111 { 102 default: [],
112 label: '分级',
113 type: 'select',
114 maxlength: 19,
115 placeholder: '请输入',
116 field: 'gradeDetailGuid',
117 default: '',
118 options: [],
119 props: {
120 label: 'name',
121 value: 'guid',
122 }, 103 },
123 clearable: true, 104 {
105 label: '附件上传',
106 tip: '支持格式:pdf,单个文件不能超过10MB ',
107 type: 'upload-file',
108 accept: '.pdf',
109 field: 'costAssessmentFile2',
110 templateUrl: '',
124 required: true, 111 required: true,
125 block: true, 112 block: true,
126 }, 113 visible: true,
127 // { 114 default: [],
128 // label: ' ', 115 },
129 // type: 'label',
130 // default: '规则配置',
131 // block: true,
132 // col: 'title-label'
133 // },
134 // {
135 // label: '精确匹配',
136 // type: 'textarea',
137 // maxlength: 200,
138 // placeholder: '请输入字段中文,中间用英文“,”分号隔开',
139 // field: 'matchChValue',
140 // default: '',
141 // clearable: true,
142 // required: false,
143
144 // },
145 // {
146 // label: '',
147 // type: 'textarea',
148 // maxlength: 200,
149 // placeholder: '请输入字段中文,中间用英文“,”分号隔开',
150 // field: 'matchEnValue',
151 // default: '',
152 // clearable: true,
153 // required: false,
154 // }
155 ]); 116 ]);
156 117
157 const newCreateGradeFormRules = ref({ 118 const formRules = ref({
158 label: [ 119 registerGuid: [
159 { required: true, message: '请输入标签名', trigger: 'change' } 120 { required: true, trigger: 'change', message: "请填写资产名称" }
160 ],
161 detailGuid: [
162 { required: true, message: '请选择分类', trigger: 'change' }
163 ],
164 gradeDetailGuid: [
165 { required: true, message: '请选择分级', trigger: 'change' }
166 ], 121 ],
122 costAssessmentFile: [{
123 validator: (rule: any, value: any, callback: any) => {
124 if (!value?.length) {
125 callback(new Error('请上传数据价值评估附件'))
126 } else {
127 callback();
128 }
129 }, trigger: 'change'
130 }]
167 }); 131 });
168 132
169 const newCreateGradeStandardDialogInfo = ref({ 133 const dialogInfo = ref({
170 visible: false, 134 visible: false,
171 size: 600, 135 size: 510,
172 title: "添加标签", 136 direction: "column",
173 type: "", 137 header: {
174 formInfo: { 138 title: "价值评估发起",
175 id: "grade-form",
176 items: newCreateGradeFormItems.value,
177 rules: newCreateGradeFormRules.value,
178 },
179 submitBtnLoading: false,
180 btns: {
181 cancel: () => {
182 newCreateGradeStandardDialogInfo.value.visible = false;
183 newCreateGradeStandardDialogInfo.value.submitBtnLoading = false;
184 }, 139 },
185 submit: async (btn, info) => { 140 type: '',//标识是否是重新提交
141 contents: [
142 {
143 type: 'form',
144 title: '',
145 formInfo: {
146 id: 'quality-coss-level',
147 items: formItems.value,
148 rules: formRules.value
186 } 149 }
187 } 150 }
188 }) 151 ],
152 footer: {
153 btns: [
154 { type: "default", label: "取消", value: "cancel" },
155 { type: "primary", label: "确定", value: "submit" },
156 ],
157 },
158 });
189 159
160 const dialogBtnClick = () => {
161 console.log('handleSelectChange');
162 };
190 163
191 164
192 const classSearchItemList = ref<any>([ 165 const classSearchItemList = ref<any>([
...@@ -244,13 +217,7 @@ const searchClass = async (val: any, clear: boolean = false) => { ...@@ -244,13 +217,7 @@ const searchClass = async (val: any, clear: boolean = false) => {
244 }; 217 };
245 218
246 const addNewLabel = () => { 219 const addNewLabel = () => {
247 newCreateGradeStandardDialogInfo.value.visible = true; 220 dialogInfo.value.visible = true;
248 newCreateGradeStandardDialogInfo.value.title = '新增标签';
249 newCreateGradeFormItems.value.forEach(item => {
250 item.default = '';
251 item.disabled = false;
252 });
253 newCreateGradeStandardDialogInfo.value.submitBtnLoading = false;
254 } 221 }
255 222
256 223
...@@ -276,8 +243,7 @@ const addNewLabel = () => { ...@@ -276,8 +243,7 @@ const addNewLabel = () => {
276 </div> 243 </div>
277 </div> 244 </div>
278 </div> 245 </div>
279 <Dialog_form ref="dialogLabelFormRef" :dialogConfigInfo="newCreateGradeStandardDialogInfo" class="v-dialog-form"> 246 <Dialog :dialogInfo="dialogInfo" @btnClick="dialogBtnClick" />
280 </Dialog_form>
281 </div> 247 </div>
282 </template> 248 </template>
283 249
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!