|
@@ -15,6 +15,7 @@ import type { FormInstance } from 'ant-design-vue';
|
|
|
type SystemModel = Partial<SystemItemModel>;
|
|
type SystemModel = Partial<SystemItemModel>;
|
|
|
const props = defineProps<{ data: SystemModel }>();
|
|
const props = defineProps<{ data: SystemModel }>();
|
|
|
const formRef = ref<FormInstance>();
|
|
const formRef = ref<FormInstance>();
|
|
|
|
|
+const typeOptionsLoading = ref<boolean>(false);
|
|
|
const typeOptions = ref<{ label: string; value: string }[]>([]);
|
|
const typeOptions = ref<{ label: string; value: string }[]>([]);
|
|
|
|
|
|
|
|
const supplierOptions = ref<{ label: string; value: string }[]>([]);
|
|
const supplierOptions = ref<{ label: string; value: string }[]>([]);
|
|
@@ -191,6 +192,7 @@ function doSubmit() {
|
|
|
}
|
|
}
|
|
|
// 获取方案类型
|
|
// 获取方案类型
|
|
|
async function getConditioningProgramType() {
|
|
async function getConditioningProgramType() {
|
|
|
|
|
+ typeOptionsLoading.value = true;
|
|
|
try {
|
|
try {
|
|
|
const res = await getDictionaryMethod('condition_type');
|
|
const res = await getDictionaryMethod('condition_type');
|
|
|
if (res?.length > 0) {
|
|
if (res?.length > 0) {
|
|
@@ -198,6 +200,8 @@ async function getConditioningProgramType() {
|
|
|
}
|
|
}
|
|
|
} catch (error) {
|
|
} catch (error) {
|
|
|
console.error('获取方案类型列表失败:', error);
|
|
console.error('获取方案类型列表失败:', error);
|
|
|
|
|
+ } finally {
|
|
|
|
|
+ typeOptionsLoading.value = false;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -319,7 +323,15 @@ function handleSelect(value: string, node: any, extra: any) {
|
|
|
<a-input v-model:value="form.name" placeholder="请输入" />
|
|
<a-input v-model:value="form.name" placeholder="请输入" />
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
<a-form-item label="方案类型:" name="conditioningProgramType" required>
|
|
<a-form-item label="方案类型:" name="conditioningProgramType" required>
|
|
|
- <a-select v-model:value="form.conditioningProgramType" :options="typeOptions" placeholder="请选择" allowClear @change="bindchange" />
|
|
|
|
|
|
|
+ <a-select
|
|
|
|
|
+ v-model:value="form.conditioningProgramType"
|
|
|
|
|
+ :options="typeOptions"
|
|
|
|
|
+ placeholder="请选择"
|
|
|
|
|
+ allowClear
|
|
|
|
|
+ :loading="typeOptionsLoading"
|
|
|
|
|
+ :disabled="typeOptions.length === 0"
|
|
|
|
|
+ @change="bindchange"
|
|
|
|
|
+ />
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
<a-form-item label="计价规则:" name="pricingType" required>
|
|
<a-form-item label="计价规则:" name="pricingType" required>
|
|
|
<a-radio-group v-model:value="form.pricingType">
|
|
<a-radio-group v-model:value="form.pricingType">
|