|
@@ -4,7 +4,7 @@ import ajax from 'jquery/src/ajax/xhr.js';
|
|
|
import $ from 'jquery/src/ajax';
|
|
|
const FormItem =Form.Item;
|
|
|
import {statuslist,lvl,currentMember} from '@/dataDic.js';
|
|
|
-import {getcustomerTyp} from '@/tools.js';
|
|
|
+import {getcustomerTyp,getCustomerSource} from '@/tools.js';
|
|
|
const Account =React.createClass({
|
|
|
httpAccount(record) {
|
|
|
$.ajax({
|
|
@@ -23,22 +23,13 @@ const Account =React.createClass({
|
|
|
};
|
|
|
thisData = {};
|
|
|
};
|
|
|
- let sourcecustomer = ''
|
|
|
- switch(String(thisData.source)) {
|
|
|
- case '0':
|
|
|
- sourcecustomer = '注册客户'
|
|
|
- break;
|
|
|
- case '1':
|
|
|
- sourcecustomer = '录入客户'
|
|
|
- break;
|
|
|
- }
|
|
|
this.setState({
|
|
|
Accountuid: thisData.id,
|
|
|
mobile: thisData.mobile,
|
|
|
nickname: thisData.nickname,
|
|
|
email: thisData.email,
|
|
|
type: getcustomerTyp(String(thisData.type)),
|
|
|
- source: sourcecustomer,
|
|
|
+ source: thisData.source,
|
|
|
isMember: thisData.isMember,
|
|
|
currentMemberStatus: String(thisData.currentMemberStatus),
|
|
|
lvl: String(thisData.lvl),
|
|
@@ -132,7 +123,7 @@ const Account =React.createClass({
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
|
label="客户来源" >
|
|
|
- <span>{this.state.source}</span>
|
|
|
+ <span>{getCustomerSource(this.state.source)}</span>
|
|
|
</FormItem>
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
@@ -157,43 +148,6 @@ const Account =React.createClass({
|
|
|
</Select>
|
|
|
</FormItem>
|
|
|
</div>
|
|
|
- <div className="clearfix">
|
|
|
- <FormItem className="half-item"
|
|
|
- {...formItemLayout}
|
|
|
- label="会员"
|
|
|
- >
|
|
|
- <Radio.Group value={this.state.isMember} onChange={(e) => {
|
|
|
- this.setState({ isMember: e.target.value })
|
|
|
- }}>
|
|
|
- <Radio value={0}>否</Radio>
|
|
|
- <Radio value={1}>是</Radio>
|
|
|
- </Radio.Group>
|
|
|
- </FormItem>
|
|
|
- <FormItem className="half-item"
|
|
|
- {...formItemLayout}
|
|
|
- label="会员等级"
|
|
|
- >
|
|
|
- <Select placeholder="客户状态" value={this.state.lvl} onChange={(e) => { this.setState({ lvl: e }); }} >
|
|
|
- {
|
|
|
- lvl.map(function (item) {
|
|
|
- return <Select.Option key={item.value} >{item.key}</Select.Option>
|
|
|
- })
|
|
|
- }
|
|
|
- </Select>
|
|
|
- </FormItem>
|
|
|
- <FormItem className="half-item"
|
|
|
- {...formItemLayout}
|
|
|
- label="会员状态"
|
|
|
- >
|
|
|
- <Select placeholder="会员状态" value={this.state.currentMemberStatus} onChange={(e) => { this.setState({ currentMemberStatus: e }); }} >
|
|
|
- {
|
|
|
- currentMember.map(function (item) {
|
|
|
- return <Select.Option key={item.value} >{item.key}</Select.Option>
|
|
|
- })
|
|
|
- }
|
|
|
- </Select>
|
|
|
- </FormItem>
|
|
|
- </div>
|
|
|
<div className="clearfix">
|
|
|
<Button className='saveBtn' type="primary" htmlType="submit">保存</Button>
|
|
|
<Button type="ghost" onClick={this.detailsModal}>取消</Button>
|