Commit 9082d681 authored by baixian's avatar baixian

优化

parents 46e2eb18 fadb1f6e
......@@ -425,10 +425,12 @@ class Crm extends React.Component {
title: '活动标题',
dataIndex: 'customers',
key: 'customers',
width: 300,
render: (text, record) => {
return (
<div >
{record.customers.activity_title ? record.customers.activity_title : '-'}
{record.source_type != 10 && <div>-</div>}
{record.source_type == 10 && record.customers.map(ele => <div>{ele.activity_title}</div>)}
</div>
);
},
......
......@@ -19,7 +19,7 @@ import {
import moment from 'moment';
import { routerRedux } from 'dva/router';
import pageStyle from './index.less';
import { pageIn, hasBtnPower, btnPermission, translateType } from '../../utils/index';
import { pageIn, hasBtnPower, btnPermission, translateType, formatDate } from '../../utils/index';
import AddLogModal from './AddLogModal';
import BtnPermission from '../../components/BtnPermission';
import RenewEdit from '../student/RenewEdit';
......@@ -201,6 +201,12 @@ class Crm extends React.Component {
} = this.props;
const { tabIndex } = this.state;
const activityColumns = [
{
title: '活动标题',
dataIndex: 'activity_title',
key: 'activity_title',
width: 400,
},
{
title: '活动类型',
dataIndex: 'activity_type',
......@@ -212,14 +218,80 @@ class Crm extends React.Component {
},
},
{
title: '活动标题',
dataIndex: 'activity_title',
key: 'activity_title',
title: '报名时间',
dataIndex: 'create_time',
key: 'create_time',
render: (text, record) => {
return (
<span>{record.created_at}</span>
);
},
},
{
title: '其他信息',
dataIndex: 'address',
key: 'address',
render(text, record) {
const detail = JSON.parse(record.detail);
console.log(detail, 'detail');
return (
<div>
{detail.new_form_joiners &&
<div>
<div>
姓名:{detail.new_form_joiners.name}
</div>
<div>
购买商品:{detail.new_form_joiners.new_form_order && detail.new_form_joiners.new_form_order.length > 0 && detail.new_form_joiners.new_form_order[0].goods_title}
</div>
{detail.new_form_joiners.customize_1 != '' &&
<div>
customize_1: {detail.new_form_joiners.customize_1}
</div>
}
{detail.new_form_joiners.customize_2 != '' &&
<div>
customize_2: {detail.new_form_joiners.customize_2}
</div>
}
{detail.new_form_joiners.customize_3 != '' &&
<div>
customize_2: {detail.new_form_joiners.customize_3}
</div>
}
</div>
}
{detail.new_group_order &&
<div>
<div>
姓名:{detail.new_group_order.name}
</div>
<div>
身份:{detail.new_group_order.is_leader == 1 ? '团长' : '团员'}
</div>
<div>
购买商品:{detail.new_group_order.group_good && detail.new_group_order.group_good.name}
</div>
{detail.new_group_order.other1 != '' &&
<div>
other1: {detail.new_group_order.other1}
</div>
}
{detail.new_group_order.other2 != '' &&
<div>
other2: {detail.new_group_order.other2}
</div>
}
{detail.new_group_order.other3 != '' &&
<div>
other3: {detail.new_group_order.other3}
</div>
}
</div>
}
</div>
);
},
},
];
const dynamicColumns = [
......
......@@ -152,6 +152,7 @@ function isOnline(expiredate) {
return false;
}
function formatDate(date) {
console.log(date, 'date');
const time = Number(date);
if (time === undefined || time === '' || time <= 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment