28b37fbe by lihua

核验添加校验

1 parent 3bdcd166
...@@ -20,6 +20,12 @@ export const getDeliveryVerifyDetail = (guid) => request({ ...@@ -20,6 +20,12 @@ export const getDeliveryVerifyDetail = (guid) => request({
20 method: 'get' 20 method: 'get'
21 }); 21 });
22 22
23 /** 检验是否通过的提示 */
24 export const verifyDetailStatusChange = (guid) => request({
25 url: `${import.meta.env.VITE_APP_DIGITAL_CONTRACT_URL}/contract-delivery/verify-is-reject?deliveryGuid=${guid}`,
26 method: 'get'
27 });
28
23 /** 更新核验状态 */ 29 /** 更新核验状态 */
24 export const verifyStatusChange = (params) => request({ 30 export const verifyStatusChange = (params) => request({
25 url: `${import.meta.env.VITE_APP_DIGITAL_CONTRACT_URL}/contract-delivery/verify-status-change`, 31 url: `${import.meta.env.VITE_APP_DIGITAL_CONTRACT_URL}/contract-delivery/verify-status-change`,
...@@ -80,6 +86,13 @@ export const distributeContract = (params) => request({ ...@@ -80,6 +86,13 @@ export const distributeContract = (params) => request({
80 data: params 86 data: params
81 }) 87 })
82 88
89 /** 分发提前校验接口 */
90 export const checkDistributeContract = (params) => request({
91 url: `${import.meta.env.VITE_APP_DIGITAL_CONTRACT_URL}/contract-use/check-distribute`,
92 method: 'post',
93 data: params
94 })
95
83 /** 获取数据使用对应的策略信息 */ 96 /** 获取数据使用对应的策略信息 */
84 export const getContractStrategy = (useGuid ) => request({ 97 export const getContractStrategy = (useGuid ) => request({
85 url: `${import.meta.env.VITE_APP_DIGITAL_CONTRACT_URL}/contract-use/get-policy?useGuid=${useGuid}`, 98 url: `${import.meta.env.VITE_APP_DIGITAL_CONTRACT_URL}/contract-use/get-policy?useGuid=${useGuid}`,
......
...@@ -6,6 +6,7 @@ import { ...@@ -6,6 +6,7 @@ import {
6 deleteDeliveryContract, 6 deleteDeliveryContract,
7 getDeliveryVerifyDetail, 7 getDeliveryVerifyDetail,
8 verifyStatusChange, 8 verifyStatusChange,
9 verifyDetailStatusChange,
9 deliveryContract 10 deliveryContract
10 } from "@/api/modules/dataDelivery"; 11 } from "@/api/modules/dataDelivery";
11 12
...@@ -376,19 +377,21 @@ const execTableInfo = ref({ ...@@ -376,19 +377,21 @@ const execTableInfo = ref({
376 { label: "约束条件", field: "constraintName", width: 120 }, 377 { label: "约束条件", field: "constraintName", width: 120 },
377 { label: "约束条件英文名称", field: "constraintEnName", width: 140 }, 378 { label: "约束条件英文名称", field: "constraintEnName", width: 140 },
378 { label: "约束条件运算符", field: "constraintOperatorName", width: 140 }, 379 { label: "约束条件运算符", field: "constraintOperatorName", width: 140 },
379 { label: "约束条件值", field: "constraintValue", width: 150, getName: (scope) => { 380 {
380 let row = scope.row; 381 label: "约束条件值", field: "constraintValue", width: 150, getName: (scope) => {
381 if (row.constraintEnName == 'dataField') { 382 let row = scope.row;
382 return row.additionValue?.map(a => a.chName)?.join(','); 383 if (row.constraintEnName == 'dataField') {
383 } 384 return row.additionValue?.map(a => a.chName)?.join(',') || scope.row['constraintValue'] || '--';
384 if (scope.row.constraintEnName == 'limitedDeliveryConnector' || scope.row.constraintEnName == 'limitedUseConnector') { 385 }
385 return scope.row.additionValue?.map(a => a.tenantName)?.join(',') 386 if (scope.row.constraintEnName == 'limitedDeliveryConnector' || scope.row.constraintEnName == 'limitedUseConnector') {
386 } 387 return scope.row.additionValue?.map(a => a.tenantName)?.join(',') || scope.row['constraintValue'] || '--'
387 if (scope.row.constraintEnName == 'limitedState' || scope.row.constraintEnName == 'areaAddress') { 388 }
388 return scope.row.additionValue?.map(a => a.label)?.join(','); 389 if (scope.row.constraintEnName == 'limitedState' || scope.row.constraintEnName == 'areaAddress') {
390 return scope.row.additionValue?.map(a => a.label)?.join(',') || scope.row['constraintValue'] || '--';
391 }
392 return scope.row['constraintValue'] || '--';
389 } 393 }
390 return scope.row['constraintValue'] || '--'; 394 },
391 } },
392 { label: "检验结果", field: "result", width: 130 }, 395 { label: "检验结果", field: "result", width: 130 },
393 // { label: "上报时间", field: "reportingTime", width: 170 }, 396 // { label: "上报时间", field: "reportingTime", width: 170 },
394 ], 397 ],
...@@ -462,17 +465,38 @@ const verifyDialogBtnClick = (btn, info) => { ...@@ -462,17 +465,38 @@ const verifyDialogBtnClick = (btn, info) => {
462 return; 465 return;
463 } 466 }
464 verifyDialogInfo.value.footer.btns[1].loading = true; 467 verifyDialogInfo.value.footer.btns[1].loading = true;
465 verifyStatusChange(Object.assign({}, info, { 468 verifyDetailStatusChange(Object.assign({}, info, {
466 deliveryGuid: currTableData.value.guid 469 deliveryGuid: currTableData.value.guid
467 })).then((res: any) => { 470 })).then((res: any) => {
468 verifyDialogInfo.value.footer.btns[1].loading = false;
469 if (res?.code == proxy.$passCode) { 471 if (res?.code == proxy.$passCode) {
470 verifyDialogInfo.value.visible = false; 472 let exec = () => {
471 proxy.$ElMessage.success('核验状态提交成功'); 473 verifyDialogInfo.value.footer.btns[1].loading = true;
472 getTableData(); 474 verifyStatusChange(Object.assign({}, info, {
475 deliveryGuid: currTableData.value.guid
476 })).then((res: any) => {
477 verifyDialogInfo.value.footer.btns[1].loading = false;
478 if (res?.code == proxy.$passCode) {
479 verifyDialogInfo.value.visible = false;
480 proxy.$ElMessage.success('核验状态提交成功');
481 getTableData();
482 } else {
483 res?.msg && proxy.$ElMessage.error(res?.msg)
484 }
485 })
486 }
487 if (res.data) {
488 proxy.$openMessageBox("合约策略执行的检验结果存在‘拒绝’,是否继续核验通过?", () => {
489 exec();
490 })
491 } else {
492 exec();
493 }
473 } else { 494 } else {
495 verifyDialogInfo.value.footer.btns[1].loading = false;
474 res?.msg && proxy.$ElMessage.error(res?.msg) 496 res?.msg && proxy.$ElMessage.error(res?.msg)
475 } 497 }
498 }).catch(() => {
499 verifyDialogInfo.value.footer.btns[1].loading = false;
476 }) 500 })
477 } else if (btn.value == 'cancel') { 501 } else if (btn.value == 'cancel') {
478 verifyDialogInfo.value.visible = false; 502 verifyDialogInfo.value.visible = false;
...@@ -491,7 +515,8 @@ const verifyDialogBtnClick = (btn, info) => { ...@@ -491,7 +515,8 @@ const verifyDialogBtnClick = (btn, info) => {
491 </div> 515 </div>
492 <el-dialog v-model="dialogInfo.visible" :title="dialogInfo.header.title" width="700" :modal="true" 516 <el-dialog v-model="dialogInfo.visible" :title="dialogInfo.header.title" width="700" :modal="true"
493 :close-on-click-modal="true" destroy-on-close align-center @close="handleDialogCancel"> 517 :close-on-click-modal="true" destroy-on-close align-center @close="handleDialogCancel">
494 <div v-if="currTableData.verifySatus == 4" class="title-desc">{{ '未通过原因:' + (currTableData.verifySuggest || '--') }}</div> 518 <div v-if="currTableData.verifySatus == 4" class="title-desc">{{ '未通过原因:' + (currTableData.verifySuggest || '--')
519 }}</div>
495 <div class="title-desc">执行内容</div> 520 <div class="title-desc">执行内容</div>
496 <Table ref="execTableRef" :tableInfo="execTableInfo" class="exec-table" /> 521 <Table ref="execTableRef" :tableInfo="execTableInfo" class="exec-table" />
497 </el-dialog> 522 </el-dialog>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!