+
+
+
+ 请先填写上方「是否特殊情况」「是否集采」「预算金额」,系统将根据填写结果展示「部门自行采购」或「学校统一采购」表单。
+
-
+
部门自行采购
@@ -267,7 +270,7 @@
-
+
学校统一采购
@@ -389,7 +392,7 @@
-
+
取消
- 上一步
- 下一步
+ 暂存
-
-
- 暂存
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
@@ -570,7 +562,6 @@ function flowFieldDisabled(key: string) {
// 定义变量内容
const formRef = ref();
-const currentStep = ref(0);
const dataForm = reactive({
id: '',
projectName: '',
@@ -723,6 +714,16 @@ const isDeptPurchase = computed(() => {
dataForm.budget && dataForm.budget < 50000);
});
+// 是否已填入“是否特殊情况”“是否集采”“预算金额”,从而能明确是部门自行采购还是学校统一采购(新增时先隐藏采购详情,填完后再显示)
+const isPurchaseTypeDetermined = computed(() => {
+ return dataForm.isSpecial !== '' && dataForm.isCentralized !== '' &&
+ dataForm.budget != null && Number(dataForm.budget) > 0;
+});
+// 是否显示“部门自行采购/学校统一采购”区块:查看/编辑/流程嵌入/已保存过 时直接显示;新增时仅当类型已明确后显示
+const showPurchaseDetailBlocks = computed(() => {
+ return !!isViewMode.value || !!isFlowEmbed.value || !!(dataForm.id) || isPurchaseTypeDetermined.value;
+});
+
// 学校统一采购时采购形式默认值(不由用户选择):>=100万→政府采购('1');5万~100万且集采=否→学校自主('2');5万~100万且集采=政府集中采购→政府采购('1');5万~100万且集采=学校集中采购→学校自主('2')
const schoolUnifiedPurchaseFormDefault = computed(() => {
if (isDeptPurchase.value || dataForm.budget == null) return null;
@@ -1064,32 +1065,6 @@ const dataRules = reactive({
],
});
-// 下一步
-const nextStep = async () => {
- try {
- const fieldsToValidate = ['projectName', 'applyDate', 'fundSource', 'budget', 'isCentralized', 'isSpecial', 'categoryCode'];
- await formRef.value?.validateField(fieldsToValidate);
-
- // 打印品目编码的值
- console.log('品目编码值 (categoryCode):', dataForm.categoryCode);
- console.log('品目编码路径 (categoryCodePath):', categoryCodePath.value);
- console.log('品目编码完整信息:', {
- code: dataForm.categoryCode,
- path: categoryCodePath.value,
- categoryInfo: getCategoryInfo()
- });
-
- currentStep.value = 1;
- } catch (error) {
- useMessage().warning('请完善第一步信息');
- }
-};
-
-// 上一步
-const prevStep = () => {
- currentStep.value = 0;
-};
-
// 取消
const handleCancel = () => {
// 流程嵌入时由流程页处理返回,不 postMessage
@@ -1164,7 +1139,6 @@ async function loadDetail(applyId: string | number) {
agentName: detail.agentName ?? '',
});
setCategoryCodePath();
- currentStep.value = 0;
try {
const fileRes = await getApplyFiles(String(applyId));
const fileList: { id: string; fileType: string; fileTitle?: string }[] = fileRes?.data ?? [];