feat(对账): 新增批量对账功能并优化对账流程
- 添加批量对账模式,支持按金额批量选择账单 - 优化rowKey处理逻辑 - 调整对账表单验证规则,增加金额校验 - 修改时间单位从月到天,提高精确度 - 优化选中账单展示,增加标记和计数功能 - 修复SelectDropdownRender组件选项更新问题
This commit is contained in:
@@ -34,16 +34,18 @@ const VNodes = defineComponent({
|
||||
});
|
||||
|
||||
const items = ref<{ value: string }[]>(props.options || []);
|
||||
const value = ref(props.value);
|
||||
// const value = computed(() => props.value || items.value[0]?.value);
|
||||
const value = ref(props.value || items.value[0]?.value);
|
||||
const inputRef = ref();
|
||||
const inputValue = ref('');
|
||||
|
||||
// 监听 props.value 变化,更新本地 value
|
||||
watch(
|
||||
() => props.value,
|
||||
() => props.options,
|
||||
(newValue) => {
|
||||
value.value = newValue;
|
||||
value.value = props.value && props.value !== '' ? props.value : newValue.value[0]?.value;
|
||||
},
|
||||
{ immediate: true, deep: true },
|
||||
);
|
||||
|
||||
// 监听本地 value 变化,触发 update:value 事件
|
||||
|
||||
@@ -191,7 +191,7 @@ const renderEditComponent = (column: any, row: any) => {
|
||||
const options = ref<any[]>([]);
|
||||
|
||||
// 创建一个唯一的缓存键,基于 row 的关键属性
|
||||
const cacheKey = `${row.paymentId}_${row.come}_${row.orderType}_${row.courseId}`;
|
||||
const cacheKey = `${row.paymentId}_${row[gridOptions.value?.cardConfig?.keyField || 'id']}`;
|
||||
|
||||
// 检查缓存中是否已有数据
|
||||
if (selectOptionsCache[cacheKey]) {
|
||||
|
||||
@@ -41,6 +41,11 @@ export interface CardListPagination {
|
||||
export interface CardListOptions<T = any> {
|
||||
/** 列配置 */
|
||||
columns?: CardListColumn<T>[];
|
||||
/** 卡片配置 */
|
||||
cardConfig?: {
|
||||
/** 卡片主键字段名 */
|
||||
keyField?: string;
|
||||
};
|
||||
/** 数据源 */
|
||||
data?: T[];
|
||||
/** 是否显示卡片标题 */
|
||||
|
||||
Reference in New Issue
Block a user