import React from 'react'; import { Icon, Button, Input, Spin, Table, message, Modal, Tabs, InputNumber, Checkbox } from 'antd'; import ajax from 'jquery/src/ajax/xhr.js'; import $ from 'jquery/src/ajax'; import './userList.less'; const ListAdd = React.createClass({ getInitialState () { return { visible: false, loading: false }; }, showModal () { this.setState({ visible: true, }); }, handleCancel (e) { this.setState({ visible: false, }); }, handleOk () { this.setState({ loading: true, visible: false }); }, render () { return (
提交, ]} className="admin-desc-content">
会员等级名称: { this.setState({ lvlName: e.target.value }); }} />
); } }); const ListDelete = React.createClass({ getInitialState () { return { visible: false, loading: false }; }, showModal () { this.setState({ visible: true, }); }, handleCancel (e) { this.setState({ visible: false, }); }, handleOk () { this.setState({ loading: true }); }, render () { return (
提交, ]} >

确认要删除该用户等级吗?删除以后不可恢复!

); } }); const SetContent = React.createClass({ getInitialState () { return { visible: false, columns: [ { title: '会员时长', dataIndex: 'time', key: 'time', render: (text, record, index) => { return
{ record.time = e.target.value; this.setState({ dataSource: this.state.dataSource }); }} /> 个月
} }, { title: '金额', dataIndex: 'money', key: 'money', render: (text, record, index) => { return
{ record.money = e; this.setState({ dataSource: this.state.dataSource }); }} />
} } ], dataSource: [], selectedRowKeys: [] }; }, remove () { this.state.selectedRowKeys.sort((a, b) => { return b - a }); let theArr = this.state.dataSource.concat(); for (let idx = 0; idx < this.state.selectedRowKeys.length; idx++) { let dataIndex = this.state.selectedRowKeys[idx]; theArr.map((item, index) => { if (item.key === dataIndex) { theArr.splice(index, 1); } }) }; this.state.dataSource = []; for (let i = 0; i < theArr.length; i++) { let item = theArr[i]; this.state.dataSource.push({ key: i, time: item.time, money: item.money }) }; this.setState({ dataSource: this.state.dataSource, selectedRowKeys: [] }); }, addNew () { this.state.dataSource.push({ key: this.state.dataSource.length, time: '', money: '' }); this.setState({ dataSource: this.state.dataSource }) }, render () { const rowSelection = { type: 'checkbox', selectedRowKeys: this.state.selectedRowKeys, onChange: (selectedRowKeys, selectedRows) => { this.setState({ selectedRows: selectedRows, selectedRowKeys: selectedRowKeys }); } }; const hasSelected = this.state.selectedRowKeys.length > 0; return (
会员等级费用设置
会员等级增值服务设置
{ this.setState({ checked: e.target.checked }) }}> 科技成果,专家信息定点推送
{ this.setState({ checked: e.target.checked }) }}> 查看专家的联系方式
{ this.setState({ checked: e.target.checked }) }}> 任何业务申请,付费业享受会员专属折扣
{ this.setState({ checked: e.target.checked }) }}> 一对一的技术经纪人服务,进行技术成果媒合服务
{ this.setState({ checked: e.target.checked }) }}> 一对一的科技咨询师服务
{ this.setState({ checked: e.target.checked }) }}> 一对一的专业技术顾问,搜集技术情报,提供研发高参
{ this.setState({ checked: e.target.checked }) }}> 免费参加现场业务培训会
{ this.setState({ checked: e.target.checked }) }}> 免前期费用做科技类扶持资金项目申报
); } }); const CustomerList = React.createClass({ loadData (pageNo) { this.setState({ loading: true }); $.ajax({ method: "get", dataType: "json", crossDomain: false, url: globalConfig.context + "/api/admin/customer", data: { }, success: function (data) { if (data.error && data.error.length) { message.warning(data.error[0].message); } }.bind(this), }).always(function () { this.setState({ loading: false }); }.bind(this)); }, getInitialState () { return { data: [], loading: false }; }, componentWillMount () { this.loadData(); }, tabChange () { }, render () { return (
会员等级管理
); } }); export default CustomerList;