feat: 项目管理列表搜索、新增/编辑

This commit is contained in:
Zzz1zz
2025-08-06 23:26:38 +08:00
parent 40a28f38cb
commit 52102d2e72
17 changed files with 843 additions and 68 deletions
@@ -109,6 +109,7 @@
// import { CreateCodeSettingParam } from '@/types/setting'
import draggable from 'vuedraggable';
const isLoading = ref<boolean>(false);
const props = defineProps<{
visible: boolean;
isEdit: boolean;
@@ -240,7 +241,9 @@
form.arrange = JSON.parse(JSON.stringify(arrangeList.value));
};
const handleOk = async () => {
if (isLoading.value) return;
try {
isLoading.value = true;
const valid = await formRef.value.validate();
if (valid) return;
// 同步编号排序
@@ -265,6 +268,8 @@
}
} catch (err) {
// 捕获异常,暂不处理
} finally {
isLoading.value = false;
}
};
@@ -120,7 +120,7 @@
(e: 'update:visible', val: boolean): void;
(e: 'submitted'): void;
}>();
const isLoading = ref<boolean>(false);
// 表单数据
const formRef = ref<FormInstance>();
const defaultForm: CreateTermSettingParam = {
@@ -182,7 +182,9 @@
};
const handleOk = async () => {
if (isLoading.value) return;
try {
isLoading.value = true;
const valid = await formRef.value.validate();
if (valid) return;
const { is_bond, is_fee, finance_bond_fee_id, finance_fee_id } = form;
@@ -208,6 +210,8 @@
}
} catch (err) {
// 捕获异常,暂不处理
} finally {
isLoading.value = false;
}
};
@@ -78,6 +78,7 @@
import { CreateFeeParams } from '@/types/setting';
import { feeTypeList } from '@/utils/constant';
const isLoading = ref<boolean>(false);
const props = defineProps<{
visible: boolean;
isEdit: boolean;
@@ -132,7 +133,9 @@
{ immediate: true }
);
const handleOk = async () => {
if (isLoading.value) return;
try {
isLoading.value = true;
const valid = await formRef.value.validate();
if (valid) return;
const res = props?.isEdit ? await updateFee(form) : await createFee(form);
@@ -143,6 +146,8 @@
}
} catch (err) {
// 捕获异常,暂不处理
} finally {
isLoading.value = false;
}
};