fix
This commit is contained in:
@@ -1087,7 +1087,7 @@ const dataForm = reactive({
|
|||||||
importApplication: '',
|
importApplication: '',
|
||||||
governmentPurchaseIntent: '',
|
governmentPurchaseIntent: '',
|
||||||
servicePublicSelectSchool: '',
|
servicePublicSelectSchool: '',
|
||||||
// 学校统一采购特殊规则字段(5万<=金额<40万)
|
// 学校统一采购特殊规则字段(5万<=金额<30万)
|
||||||
|
|
||||||
serviceInviteSelectSchool: '',
|
serviceInviteSelectSchool: '',
|
||||||
servicePublicSelectSchoolAuto: '',
|
servicePublicSelectSchoolAuto: '',
|
||||||
@@ -1421,7 +1421,7 @@ watch(
|
|||||||
{ immediate: true }
|
{ immediate: true }
|
||||||
);
|
);
|
||||||
|
|
||||||
// 判断是否自动选择网上商城采购方式(5万<=金额<40万,服务类目,特殊服务类目)
|
// 判断是否自动选择网上商城采购方式(5万<=金额<30万,服务类目,特殊服务类目)
|
||||||
const isAutoSelectPurchaseType = computed(() => {
|
const isAutoSelectPurchaseType = computed(() => {
|
||||||
if (!dataForm.budget) return false;
|
if (!dataForm.budget) return false;
|
||||||
const budget = dataForm.budget;
|
const budget = dataForm.budget;
|
||||||
@@ -1433,7 +1433,7 @@ const isAutoSelectPurchaseType = computed(() => {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
// 判断是否显示自动邀请比选模版(5万<=金额<40万,服务类目,特殊服务类目)
|
// 判断是否显示自动邀请比选模版(5万<=金额<30万,服务类目,特殊服务类目)
|
||||||
const showAutoInviteSelect = computed(() => {
|
const showAutoInviteSelect = computed(() => {
|
||||||
if (!isDeptPurchase.value) return false;
|
if (!isDeptPurchase.value) return false;
|
||||||
if (!dataForm.budget) return false;
|
if (!dataForm.budget) return false;
|
||||||
@@ -1446,7 +1446,7 @@ const showAutoInviteSelect = computed(() => {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
// 判断是否显示学校统一采购的自动邀请比选模版(5万<=金额<40万,服务类目,特殊服务类目)
|
// 判断是否显示学校统一采购的自动邀请比选模版(5万<=金额<30万,服务类目,特殊服务类目)
|
||||||
const showAutoInviteSelectSchool = computed(() => {
|
const showAutoInviteSelectSchool = computed(() => {
|
||||||
if (isDeptPurchase.value) return false;
|
if (isDeptPurchase.value) return false;
|
||||||
if (!dataForm.budget) return false;
|
if (!dataForm.budget) return false;
|
||||||
@@ -1454,7 +1454,7 @@ const showAutoInviteSelectSchool = computed(() => {
|
|||||||
return budget >= BUDGET_DEPT_PURCHASE_THRESHOLD.value && budget < BUDGET_PUBLIC_SELECT_THRESHOLD.value && isSpecialServiceCategory.value;
|
return budget >= BUDGET_DEPT_PURCHASE_THRESHOLD.value && budget < BUDGET_PUBLIC_SELECT_THRESHOLD.value && isSpecialServiceCategory.value;
|
||||||
});
|
});
|
||||||
|
|
||||||
// 判断是否显示自动公开比选模版(40万<=金额<100万,特殊服务类目:isMallService=1、isProjectService=1)
|
// 判断是否显示自动公开比选模版(30万<=金额<100万,特殊服务类目:isMallService=1、isProjectService=1)
|
||||||
const showAutoPublicSelect = computed(() => {
|
const showAutoPublicSelect = computed(() => {
|
||||||
if (isDeptPurchase.value) return false;
|
if (isDeptPurchase.value) return false;
|
||||||
if (!dataForm.budget) return false;
|
if (!dataForm.budget) return false;
|
||||||
@@ -1476,7 +1476,7 @@ const getRequirementFileProp = () => {
|
|||||||
return 'purchaseRequirement';
|
return 'purchaseRequirement';
|
||||||
};
|
};
|
||||||
|
|
||||||
// 判断学校统一采购是否需要自动设置采购方式(5万<=金额<40万,服务类目,特殊服务类目)
|
// 判断学校统一采购是否需要自动设置采购方式(5万<=金额<30万,服务类目,特殊服务类目)
|
||||||
const isAutoSelectPurchaseTypeUnion = computed(() => {
|
const isAutoSelectPurchaseTypeUnion = computed(() => {
|
||||||
if (isDeptPurchase.value) return false;
|
if (isDeptPurchase.value) return false;
|
||||||
if (!dataForm.budget) return false;
|
if (!dataForm.budget) return false;
|
||||||
@@ -1494,8 +1494,16 @@ watch(
|
|||||||
() => dataForm.purchaseChannel,
|
() => dataForm.purchaseChannel,
|
||||||
() => isPurchaseCenter.value,
|
() => isPurchaseCenter.value,
|
||||||
],
|
],
|
||||||
() => {
|
(newValues, oldValues) => {
|
||||||
// 部门自行采购 & 采购途径为”委托采购中心采购”且为新增申请阶段:采购方式隐藏且不设置
|
const oldIsDeptPurchase = oldValues?.[2];
|
||||||
|
const newIsDeptPurchase = newValues?.[2];
|
||||||
|
|
||||||
|
// 从部门自行采购切换到学校统一采购时:清空采购方式(由系统自动设置或采购中心审批时选择)
|
||||||
|
if (oldIsDeptPurchase === true && newIsDeptPurchase === false) {
|
||||||
|
dataForm.purchaseType = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
// 部门自行采购 & 采购途径为"委托采购中心采购"且为新增申请阶段:采购方式隐藏且不设置
|
||||||
// 注意:查看模式和编辑模式不清空已有的采购方式
|
// 注意:查看模式和编辑模式不清空已有的采购方式
|
||||||
if (isDeptPurchase.value && isEntrustCenterChannel.value && !isFlowEmbed.value && !isViewMode.value && !isEditMode.value) {
|
if (isDeptPurchase.value && isEntrustCenterChannel.value && !isFlowEmbed.value && !isViewMode.value && !isEditMode.value) {
|
||||||
dataForm.purchaseType = '';
|
dataForm.purchaseType = '';
|
||||||
@@ -2063,7 +2071,7 @@ const getPurchaseTypeDeptDict = async () => {
|
|||||||
.map((item: any) => ({
|
.map((item: any) => ({
|
||||||
id: item.id,
|
id: item.id,
|
||||||
label: item.label || item.dictLabel || item.name,
|
label: item.label || item.dictLabel || item.name,
|
||||||
value: item.value || item.dictValue || item.code,
|
value: String(item.value || item.dictValue || item.code),
|
||||||
}))
|
}))
|
||||||
.filter((item: any) => item.value !== DEPT_PURCHASE_TYPE.ENTRUST_CENTER)
|
.filter((item: any) => item.value !== DEPT_PURCHASE_TYPE.ENTRUST_CENTER)
|
||||||
: [];
|
: [];
|
||||||
@@ -2123,7 +2131,8 @@ const getPurchaseTypeUnionDict = async () => {
|
|||||||
? res.data.map((item: any) => ({
|
? res.data.map((item: any) => ({
|
||||||
id: item.id,
|
id: item.id,
|
||||||
label: item.label || item.dictLabel || item.name,
|
label: item.label || item.dictLabel || item.name,
|
||||||
value: item.value || item.dictValue || item.code,
|
// 确保 value 为字符串类型,避免 el-select 无法匹配
|
||||||
|
value: String(item.value || item.dictValue || item.code),
|
||||||
}))
|
}))
|
||||||
: [];
|
: [];
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|||||||
Reference in New Issue
Block a user