feat: 采购模块8项功能优化

1. 履约评价按钮:仅在审核状态完成时显示
2. 流程审批:申请人可编辑表单
3. 部门代表弹窗:增加身份选择(采购代表/评委)
4. 履约验收上传:改为仅支持PDF格式
5. 采购申请列表:增加采购形式字段显示(el-tag)
6. 采购申请提交:防止重复点击(已存在loading)
This commit is contained in:
吴红兵
2026-03-04 20:19:03 +08:00
parent e3437921e5
commit 69439fdfab
4 changed files with 45 additions and 10 deletions

View File

@@ -1035,9 +1035,17 @@ const isPurchaseCenter = ref(false);
/** 流程嵌入时:采购中心审核节点放开所有字段编辑;非采购中心节点只读 */
function flowFieldDisabled(_key: string) {
if (isFlowEmbed.value && isPurchaseCenter.value) return false;
if (isFlowEmbed.value && isApplicant.value) return false;
return !!isFlowEmbed.value;
}
/** 当前用户是否为申请人(在流程中可编辑) */
const isApplicant = computed(() => {
if (!dataForm.createUser) return false;
const currentUser = Session.getUser() || {};
return dataForm.createUser === currentUser.userId || dataForm.createUser === currentUser.username;
});
// 定义变量内容
const formRef = ref();
const dataForm = reactive({
@@ -1888,12 +1896,16 @@ const flowMethods = {
},
};
/** 流程嵌入时采购申请权限根据前端缓存的角色cloud-ui:roleCode判断非采购中心整表只读采购中心仅采购方式/采购形式可编辑 */
/** 流程嵌入时采购申请权限根据前端缓存的角色cloud-ui:roleCode判断非采购中心整表只读采购中心仅采购方式/采购形式可编辑;申请人在流程中可编辑 */
function applyPurchaseApplyFormPerm() {
if (!isFlowEmbed.value) return;
const roleCode = Session.getRoleCode() || '';
isPurchaseCenter.value = roleCode === PURCHASE_CENTER_ROLE_CODE;
flowFormDisabled.value = !isPurchaseCenter.value;
if (isApplicant.value) {
flowFormDisabled.value = false;
} else {
flowFormDisabled.value = !isPurchaseCenter.value;
}
}
/** 流程嵌入时的“保存”回调:校验后调用 editObj并通知流程已保存 */