446441d0 by lihua

数据申请问题解决

1 parent abd63db0
......@@ -93,7 +93,7 @@
</div>
<div class="tool_btns">
<div class="btns">
<el-button v-for="btn in toolBtns" :type="btn.type" :plain="btn.plain" @click="btnClick(btn)">{{ btn.label
<el-button v-for="btn in toolBtns" :type="btn.type" :plain="btn.plain" @click="btn.click ? btn.click() : btnClick(btn)">{{ btn.label
}}</el-button>
</div>
</div>
......@@ -142,6 +142,33 @@ const toolBtns: any = computed(() => {
let btnsArr: any = [{
label: "关闭", value: "cancel", plain: true
}];
const approveVO = detailInfo.value.applicationApproveRSVO || {}
let approveState = approveVO.approveState || null;
const staffGuid = detailInfo.value.createUserId || '';
const currentStaffGuid = userData.userGuid;
if (approveState == 'A' && staffGuid == currentStaffGuid) {
btnsArr.push({
label: "撤销", value: "revoke", click: () => {
proxy.$openMessageBox('确定撤销该数据申请审批吗??', () => {
fullscreenLoading.value = true;
updateDataApplyState({
guid: detailInfo.value.guid,
approveState: 'C'
}).then((res: any) => {
fullscreenLoading.value = false;
if (res?.code == proxy.$passCode) {
proxy.$ElMessage.success('该数据申请撤销成功');
getDetail();
} else {
res?.msg && proxy.$ElMessage.error(res.msg);
}
});
}, () => {
proxy.$ElMessage.info("已取消撤销");
});
}
})
}
return btnsArr;
} else {
let btnsArr: any = [{
......@@ -153,11 +180,11 @@ const toolBtns: any = computed(() => {
let approveStaffGuid = approveVO?.approveInstanceRSVOS?.[1]?.operator || '';
if (approveState == 'A' && approveStaffGuid == userData.tenantGuid) {
btnsArr.push(...[{
label: "通过", value: "pass", click: () => {
label: "通过", value: "pass", type: 'primary', click: () => {
passDialogInfo.value.visible = true;
}
}, {
label: "驳回", value: "reject", click: () => {
label: "驳回", value: "reject", type: 'danger', plain: true, click: () => {
rejectDialogInfo.value.visible = true;
}
}])
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!