|
|
@@ -14,7 +14,7 @@ const adaptWidth = adapt();
|
|
|
export const columns: BasicColumn[] = [
|
|
|
{
|
|
|
title: 'ID',
|
|
|
- dataIndex: 'bill.id',
|
|
|
+ dataIndex: 'id',
|
|
|
editComponentProps: {
|
|
|
prefix: '$',
|
|
|
},
|
|
|
@@ -23,14 +23,14 @@ export const columns: BasicColumn[] = [
|
|
|
},
|
|
|
{
|
|
|
title: '交易类型',
|
|
|
- dataIndex: 'type.in_out',
|
|
|
+ dataIndex: 'type',
|
|
|
width: 130,
|
|
|
// customRender({ record }) {
|
|
|
// const options = ['会费', '收入', '支出', '内部转账'];
|
|
|
// return options[record['type.in_out']];
|
|
|
// },
|
|
|
customRender({ record }) {
|
|
|
- const inOut = record.inOut;
|
|
|
+ const inOut = record.type;
|
|
|
let color = 'red';
|
|
|
let text = '未定义';
|
|
|
switch (inOut) {
|
|
|
@@ -57,50 +57,50 @@ export const columns: BasicColumn[] = [
|
|
|
},
|
|
|
{
|
|
|
title: '交易名称',
|
|
|
- dataIndex: 'type.name',
|
|
|
+ dataIndex: 'typename',
|
|
|
width: 160,
|
|
|
sorter: true,
|
|
|
},
|
|
|
{
|
|
|
title: '交易账户',
|
|
|
- dataIndex: 'account.name',
|
|
|
+ dataIndex: 'account',
|
|
|
width: 160,
|
|
|
sorter: true,
|
|
|
},
|
|
|
{
|
|
|
title: '金额',
|
|
|
- dataIndex: 'bill.money',
|
|
|
+ dataIndex: 'money',
|
|
|
width: 160,
|
|
|
sorter: true,
|
|
|
},
|
|
|
{
|
|
|
title: '相关会员',
|
|
|
- dataIndex: 'name',
|
|
|
+ dataIndex: 'member',
|
|
|
width: 160,
|
|
|
sorter: true,
|
|
|
},
|
|
|
{
|
|
|
title: '是否开票',
|
|
|
- dataIndex: 'bill.is_code',
|
|
|
+ dataIndex: 'isCode',
|
|
|
width: 130,
|
|
|
customRender({ record }) {
|
|
|
const options = ['否', '是'];
|
|
|
- return options[record['bill.is_code']];
|
|
|
+ return options[record.isCode];
|
|
|
},
|
|
|
sorter: true,
|
|
|
},
|
|
|
{
|
|
|
title: '备注',
|
|
|
- dataIndex: 'bill.remark',
|
|
|
+ dataIndex: 'remark',
|
|
|
width: 160,
|
|
|
sorter: true,
|
|
|
},
|
|
|
{
|
|
|
title: '交易日期',
|
|
|
- dataIndex: 'bill.tradetime',
|
|
|
+ dataIndex: 'tradetime',
|
|
|
width: 200,
|
|
|
customRender({ record }) {
|
|
|
- return moment(record['bill.tradetime']).format('YYYY-MM-DD');
|
|
|
+ return moment(record.tradetime).format('YYYY-MM-DD');
|
|
|
},
|
|
|
sorter: true,
|
|
|
},
|