feat(财务): 新增入账管理模块
新增账单导入和账单核对功能 - 添加账单导入页面,支持微信、支付宝、银行账单文件上传 - 实现账单核对功能,包括自动核对和人工核对 - 添加多种类型订单展示组件(VIP、课程、实物商品等) - 实现订单选择和提交功能 - 添加CardList组件用于展示可选项和已选项
This commit is contained in:
@@ -0,0 +1,74 @@
|
||||
<script lang="ts" setup>
|
||||
import type { CreateOrderType, PaymentRowType } from '../types';
|
||||
|
||||
import { computed } from 'vue';
|
||||
|
||||
import { reconciliateBillsApi } from '#/api/posting';
|
||||
|
||||
import { useCardListGrid } from '../composables/useCardListGrid';
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
payment: PaymentRowType | undefined;
|
||||
selectedData: CreateOrderType[] | undefined;
|
||||
tabKey: string;
|
||||
}>(),
|
||||
{},
|
||||
);
|
||||
|
||||
const emit = defineEmits(['completeCheck', 'deletedChecked']);
|
||||
|
||||
interface RowType {
|
||||
id: number;
|
||||
point: number;
|
||||
tel: string;
|
||||
note: string;
|
||||
}
|
||||
|
||||
function transformData(rows: RowType[]) {
|
||||
return rows.map((row) => ({
|
||||
id: row.id,
|
||||
courseId: '',
|
||||
tel: row.tel,
|
||||
come: '0',
|
||||
orderType: '0',
|
||||
paymentId: props.payment?.id || '',
|
||||
productName: row.note,
|
||||
productId: '',
|
||||
catalogueId: '',
|
||||
orderMoney: String(row.point),
|
||||
realMoney: '',
|
||||
districtMoney: '',
|
||||
startTime: props.payment?.ctime || '',
|
||||
endTime: '',
|
||||
}));
|
||||
}
|
||||
|
||||
const { Grid, cancelCheck, setChecked } = useCardListGrid<RowType, CreateOrderType>({
|
||||
payment: computed(() => props.payment),
|
||||
selectedData: computed(() => props.selectedData),
|
||||
rowKey: 'id',
|
||||
rowKeyPrefix: props.tabKey,
|
||||
columns: [
|
||||
{ type: 'checkbox', width: 60 },
|
||||
{ field: 'note', title: '备注', minWidth: 150 },
|
||||
{ field: 'point', title: '充值金额', minWidth: 100 },
|
||||
{ field: 'tel', title: '手机号', minWidth: 150 },
|
||||
],
|
||||
query: (params) =>
|
||||
reconciliateBillsApi.getYiluPointBuyList({
|
||||
...params,
|
||||
paymentId: props.payment?.id || 0,
|
||||
}),
|
||||
transformData,
|
||||
emit,
|
||||
});
|
||||
|
||||
defineExpose({ cancelCheck, setChecked });
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="orders-container h-full">
|
||||
<Grid />
|
||||
</div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user