2539b68c by lihua

核验添加校验

1 parent f9864378
......@@ -20,6 +20,12 @@ export const getDeliveryVerifyDetail = (guid) => request({
method: 'get'
});
/** 检验是否通过的提示 */
export const verifyDetailStatusChange = (guid) => request({
url: `${import.meta.env.VITE_APP_DIGITAL_CONTRACT_URL}/contract-delivery/verify-is-reject?deliveryGuid=${guid}`,
method: 'get'
});
/** 更新核验状态 */
export const verifyStatusChange = (params) => request({
url: `${import.meta.env.VITE_APP_DIGITAL_CONTRACT_URL}/contract-delivery/verify-status-change`,
......@@ -80,6 +86,13 @@ export const distributeContract = (params) => request({
data: params
})
/** 分发提前校验接口 */
export const checkDistributeContract = (params) => request({
url: `${import.meta.env.VITE_APP_DIGITAL_CONTRACT_URL}/contract-use/check-distribute`,
method: 'post',
data: params
})
/** 获取数据使用对应的策略信息 */
export const getContractStrategy = (useGuid ) => request({
url: `${import.meta.env.VITE_APP_DIGITAL_CONTRACT_URL}/contract-use/get-policy?useGuid=${useGuid}`,
......
......@@ -6,6 +6,7 @@ import {
deleteDeliveryContract,
getDeliveryVerifyDetail,
verifyStatusChange,
verifyDetailStatusChange,
deliveryContract
} from "@/api/modules/dataDelivery";
......@@ -376,19 +377,21 @@ const execTableInfo = ref({
{ label: "约束条件", field: "constraintName", width: 120 },
{ label: "约束条件英文名称", field: "constraintEnName", width: 140 },
{ label: "约束条件运算符", field: "constraintOperatorName", width: 140 },
{ label: "约束条件值", field: "constraintValue", width: 150, getName: (scope) => {
let row = scope.row;
if (row.constraintEnName == 'dataField') {
return row.additionValue?.map(a => a.chName)?.join(',');
}
if (scope.row.constraintEnName == 'limitedDeliveryConnector' || scope.row.constraintEnName == 'limitedUseConnector') {
return scope.row.additionValue?.map(a => a.tenantName)?.join(',')
}
if (scope.row.constraintEnName == 'limitedState' || scope.row.constraintEnName == 'areaAddress') {
return scope.row.additionValue?.map(a => a.label)?.join(',');
{
label: "约束条件值", field: "constraintValue", width: 150, getName: (scope) => {
let row = scope.row;
if (row.constraintEnName == 'dataField') {
return row.additionValue?.map(a => a.chName)?.join(',') || scope.row['constraintValue'] || '--';
}
if (scope.row.constraintEnName == 'limitedDeliveryConnector' || scope.row.constraintEnName == 'limitedUseConnector') {
return scope.row.additionValue?.map(a => a.tenantName)?.join(',') || scope.row['constraintValue'] || '--'
}
if (scope.row.constraintEnName == 'limitedState' || scope.row.constraintEnName == 'areaAddress') {
return scope.row.additionValue?.map(a => a.label)?.join(',') || scope.row['constraintValue'] || '--';
}
return scope.row['constraintValue'] || '--';
}
return scope.row['constraintValue'] || '--';
} },
},
{ label: "检验结果", field: "result", width: 130 },
// { label: "上报时间", field: "reportingTime", width: 170 },
],
......@@ -462,17 +465,38 @@ const verifyDialogBtnClick = (btn, info) => {
return;
}
verifyDialogInfo.value.footer.btns[1].loading = true;
verifyStatusChange(Object.assign({}, info, {
verifyDetailStatusChange(Object.assign({}, info, {
deliveryGuid: currTableData.value.guid
})).then((res: any) => {
verifyDialogInfo.value.footer.btns[1].loading = false;
if (res?.code == proxy.$passCode) {
verifyDialogInfo.value.visible = false;
proxy.$ElMessage.success('核验状态提交成功');
getTableData();
let exec = () => {
verifyDialogInfo.value.footer.btns[1].loading = true;
verifyStatusChange(Object.assign({}, info, {
deliveryGuid: currTableData.value.guid
})).then((res: any) => {
verifyDialogInfo.value.footer.btns[1].loading = false;
if (res?.code == proxy.$passCode) {
verifyDialogInfo.value.visible = false;
proxy.$ElMessage.success('核验状态提交成功');
getTableData();
} else {
res?.msg && proxy.$ElMessage.error(res?.msg)
}
})
}
if (res.data) {
proxy.$openMessageBox("合约策略执行的检验结果存在‘拒绝’,是否继续核验通过?", () => {
exec();
})
} else {
exec();
}
} else {
verifyDialogInfo.value.footer.btns[1].loading = false;
res?.msg && proxy.$ElMessage.error(res?.msg)
}
}).catch(() => {
verifyDialogInfo.value.footer.btns[1].loading = false;
})
} else if (btn.value == 'cancel') {
verifyDialogInfo.value.visible = false;
......@@ -491,7 +515,8 @@ const verifyDialogBtnClick = (btn, info) => {
</div>
<el-dialog v-model="dialogInfo.visible" :title="dialogInfo.header.title" width="700" :modal="true"
:close-on-click-modal="true" destroy-on-close align-center @close="handleDialogCancel">
<div v-if="currTableData.verifySatus == 4" class="title-desc">{{ '未通过原因:' + (currTableData.verifySuggest || '--') }}</div>
<div v-if="currTableData.verifySatus == 4" class="title-desc">{{ '未通过原因:' + (currTableData.verifySuggest || '--')
}}</div>
<div class="title-desc">执行内容</div>
<Table ref="execTableRef" :tableInfo="execTableInfo" class="exec-table" />
</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!