myClientDesc.jsx 61 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364
  1. import React from 'react';
  2. import { Tabs, Table, Icon, Tooltip, Modal, message, AutoComplete, Spin, DatePicker,Upload, Input, InputNumber, Select,TimePicker, Button, Radio, Form, Cascader, Tag, Switch } from 'antd';
  3. import './myClient.less';
  4. import ajax from 'jquery/src/ajax/xhr.js';
  5. import moment from 'moment';
  6. import $ from 'jquery/src/ajax';
  7. import { areaSelect } from '../../NewDicProvinceList';
  8. import { maturityList, innovationList, transferModeList,cityArr ,newFollow,customerStatus,intentionalService,tag} from '../../dataDic';
  9. import { IndustryObject, getIndustryCategory } from '../../DicIndustryList.js';
  10. import { beforeUploadFile, splitUrl, companySearch, getTransferMode, getAchievementCategory, getTechAuditStatus, getDemandType, getMaturity, getInnovation,beforeUpload, getBase64,getsex,getCompanyIntention,getcityArr,getfllowSituation,getcustomerStatue} from '../../tools.js';
  11. import throttle from '../../throttle.js';
  12. const KeyWordTagGroup = React.createClass({
  13. getInitialState() {
  14. return {
  15. tags: [],
  16. inputVisible: false,
  17. inputValue: ''
  18. };
  19. },
  20. handleClose(removedTag) {
  21. const tags = this.state.tags.filter(tag => tag !== removedTag);
  22. this.props.tagsArr(tags);
  23. this.setState({ tags });
  24. },
  25. showInput() {
  26. this.setState({ inputVisible: true }, () => this.input.focus());
  27. },
  28. handleInputChange(e) {
  29. this.setState({ inputValue: e.target.value });
  30. },
  31. handleInputConfirm() {
  32. const state = this.state;
  33. const inputValue = state.inputValue;
  34. let tags = state.tags;
  35. if (inputValue && tags.indexOf(inputValue) === -1 && inputValue.replace(/(^\s*)|(\s*$)/g, "").length != 0) {
  36. tags = [...tags, inputValue.replace(/(^\s*)|(\s*$)/g, "")];
  37. };
  38. this.props.tagsArr(tags);
  39. this.setState({
  40. tags,
  41. inputVisible: false,
  42. inputValue: '',
  43. });
  44. },
  45. componentWillMount() {
  46. this.state.tags = this.props.keyWordArr;
  47. },
  48. componentWillReceiveProps(nextProps) {
  49. if (this.props.keyWordArr != nextProps.keyWordArr) {
  50. this.state.tags = nextProps.keyWordArr;
  51. };
  52. },
  53. render() {
  54. const { tags, inputVisible, inputValue } = this.state;
  55. return (
  56. <div className="keyWord-tips">
  57. {tags.map((tag, index) => {
  58. const isLongTag = tag.length > 10;
  59. const tagElem = (
  60. <Tag key={tag} closable={index !== -1} afterClose={() => this.handleClose(tag)}>
  61. {isLongTag ? `${tag.slice(0, 10)}...` : tag}
  62. </Tag>
  63. );
  64. return isLongTag ? <Tooltip key={tag} title={tag}>{tagElem}</Tooltip> : tagElem;
  65. })}
  66. {inputVisible && (
  67. <Input
  68. ref={input => this.input = input}
  69. type="text"
  70. style={{ width: 78 }}
  71. value={inputValue}
  72. onChange={this.handleInputChange}
  73. onBlur={this.handleInputConfirm}
  74. onPressEnter={this.handleInputConfirm}
  75. />
  76. )}
  77. {!inputVisible && <Button className="addtips" type="dashed" disabled={tags.length > 9 ? true : false} onClick={this.showInput}>+ 新关键词</Button>}
  78. </div>
  79. );
  80. }
  81. });
  82. const PicturesWall = React.createClass({
  83. getInitialState() {
  84. return {
  85. previewVisible: false,
  86. previewImage: '',
  87. fileList: [],
  88. }
  89. },
  90. handleCancel() {
  91. this.setState({ previewVisible: false })
  92. },
  93. handlePreview(file) {
  94. this.setState({
  95. previewImage: file.url || file.thumbUrl,
  96. previewVisible: true,
  97. });
  98. },
  99. handleChange(info) {
  100. let fileList = info.fileList;
  101. this.setState({ fileList });
  102. this.props.fileList(fileList);
  103. },
  104. serviceChange(value) {
  105. console.log(`selected ${value}`);
  106. },
  107. componentWillReceiveProps(nextProps) {
  108. this.state.fileList = nextProps.pictureUrl;
  109. },
  110. render() {
  111. const { previewVisible, previewImage, fileList } = this.state;
  112. const uploadButton = (
  113. <div>
  114. <Icon type="plus" />
  115. <div className="ant-upload-text">点击上传</div>
  116. </div>
  117. );
  118. return (
  119. <div className="clearfix">
  120. <Upload
  121. action={globalConfig.context + "/api/admin/achievement/uploadPicture"}
  122. data={{ 'sign': this.props.pictureSign }}
  123. listType="picture-card"
  124. fileList={fileList}
  125. onPreview={this.handlePreview}
  126. onChange={this.handleChange} >
  127. {fileList.length >= 5 ? null : uploadButton}
  128. </Upload>
  129. <Modal maskClosable={false} visible={previewVisible} footer={null} onCancel={this.handleCancel}>
  130. <img alt="example" style={{ width: '100%' }} src={previewImage} />
  131. </Modal>
  132. </div>
  133. );
  134. }
  135. });
  136. const AchievementDetailShow = Form.create()(React.createClass({
  137. getInitialState() {
  138. return {
  139. loading: false,
  140. buttonLoading: false,
  141. contactsObj: {},
  142. data: {},
  143. tags: [],
  144. technicalPictureUrl: [],
  145. coverImg: [],
  146. maturityPictureUrl: [],
  147. textFileList: [],
  148. techPlanFileList: [],
  149. businessPlanFileList: []
  150. };
  151. },
  152. //鼠标点击整行的时候的函数
  153. loadData(id, detailApiUrl) {
  154. this.setState({
  155. loading: true
  156. });
  157. $.ajax({
  158. method: "post",
  159. dataType: "json",
  160. crossDomain: false,
  161. url: globalConfig.context + detailApiUrl,
  162. data: {
  163. id: id
  164. },
  165. success: function (data) {
  166. let thisData = data.data;
  167. if (!thisData) {
  168. if (data.error && data.error.length) {
  169. message.warning(data.error[0].message);
  170. };
  171. thisData = {};
  172. };
  173. this.setState({
  174. data: thisData,
  175. orgDisplay: thisData.ownerType,
  176. switchValue: Boolean(!thisData.ownerId),
  177. radios:thisData.hot==='1'?true:false,
  178. tags: thisData.keyword ? (thisData.keyword.replace(/(,|、)/g, ",")).split(',') : [],
  179. technicalPictureUrl: thisData.technicalPictureUrl ? splitUrl(thisData.technicalPictureUrl, ',', globalConfig.avatarHost + '/upload') : [],
  180. coverImg: thisData.coverImg ? splitUrl(thisData.coverImg, ',', globalConfig.avatarHost + '/upload') : [],
  181. maturityPictureUrl: thisData.maturityPictureUrl ? splitUrl(thisData.maturityPictureUrl, ',', globalConfig.avatarHost + '/upload') : [],
  182. });
  183. if (thisData.ownerId) {
  184. this.getContactsList(thisData.ownerId);
  185. };
  186. console.log(thisData);
  187. }.bind(this),
  188. }).always(function () {
  189. this.setState({
  190. loading: false
  191. });
  192. }.bind(this));
  193. },
  194. offShelf() {
  195. this.setState({
  196. loading: true
  197. });
  198. $.ajax({
  199. method: "post",
  200. dataType: "json",
  201. crossDomain: false,
  202. url: globalConfig.context + "/api/admin/achievement/offShelf",
  203. data: { "id": this.props.data.id }
  204. }).done(function (data) {
  205. if (!data.error.length) {
  206. message.success('撤销成功!');
  207. this.setState({
  208. visible: false,
  209. releaseSubmitVisible: false
  210. });
  211. this.props.handleOk();
  212. } else {
  213. message.warning(data.error[0].message);
  214. }
  215. }.bind(this));
  216. },
  217. modifyBroker() {
  218. this.props.form.validateFields((err, values) => {
  219. if (!err) {
  220. this.setState({
  221. loading: true
  222. });
  223. $.ajax({
  224. method: "POST",
  225. dataType: "json",
  226. crossDomain: false,
  227. url: globalConfig.context + '/api/admin/audit/modifyAchievementTechBroker',
  228. data: {
  229. id: this.props.data.id,
  230. techBrokerId: values.modifyTechBrokerId
  231. }
  232. }).done(function (data) {
  233. this.state.auditStatus = 0;
  234. this.setState({
  235. loading: false
  236. });
  237. if (data.error && data.error.length) {
  238. message.warning(data.error[0].message);
  239. } else {
  240. message.success('保存成功!');
  241. this.props.handleOk();
  242. };
  243. }.bind(this));
  244. }
  245. });
  246. },
  247. formSubmit() {
  248. this.props.form.validateFields((err, values) => {
  249. if (!err) {
  250. this.setState({
  251. loading: true
  252. });
  253. $.ajax({
  254. method: "POST",
  255. dataType: "json",
  256. crossDomain: false,
  257. url: globalConfig.context + '/api/admin/audit/achievement',
  258. data: {
  259. id: this.props.data.id,
  260. techBroderId: values.techBrokerId,
  261. auditStatus: values.auditStatus
  262. }
  263. }).done(function (data) {
  264. this.state.auditStatus = 0;
  265. this.setState({
  266. loading: false
  267. });
  268. if (!data.error.length) {
  269. message.success('保存成功!');
  270. this.setState({
  271. formSubmitVisible: false
  272. });
  273. this.props.handleOk();
  274. } else {
  275. message.warning(data.error[0].message);
  276. };
  277. }.bind(this));
  278. }
  279. });
  280. },
  281. handleSubmit(e) {
  282. e.preventDefault();
  283. this.props.form.validateFields((err, values) => {
  284. if (values.auditStatus == 4) {
  285. this.setState({
  286. formSubmitVisible: true
  287. });
  288. } else {
  289. this.formSubmit();
  290. };
  291. });
  292. },
  293. buildMatchList() {
  294. this.setState({
  295. buttonLoading: true
  296. });
  297. $.ajax({
  298. method: "POST",
  299. dataType: "json",
  300. crossDomain: false,
  301. url: globalConfig.context + '/api/admin/achievement/matchDemand',
  302. data: {
  303. id: this.props.data.id,
  304. }
  305. }).done(function (data) {
  306. this.setState({
  307. buttonLoading: false
  308. });
  309. if (!data.error.length) {
  310. message.success('匹配完成!匹配到' + data.data + '条记录');
  311. } else {
  312. message.warning(data.error[0].message);
  313. };
  314. }.bind(this));
  315. },
  316. getContactsList(theUid) {
  317. $.ajax({
  318. method: "get",
  319. dataType: "json",
  320. crossDomain: false,
  321. url: globalConfig.context + "/api/admin/findCustomer",
  322. data: {
  323. id: theUid
  324. },
  325. success: function (data) {
  326. if (!data.data) {
  327. if (data.error && data.error.length) {
  328. message.warning(data.error[0].message);
  329. return;
  330. };
  331. } else {
  332. this.setState({
  333. contactsObj: data.data || {}
  334. });
  335. };
  336. }.bind(this),
  337. });
  338. },
  339. componentWillMount() {
  340. this.loadData(this.props.data.id, this.props.detailApiUrl);
  341. },
  342. componentWillReceiveProps(nextProps) {
  343. if (!this.props.visible && nextProps.visible) {
  344. this.loadData(nextProps.data.id, nextProps.detailApiUrl);
  345. this.state.textFileList = [];
  346. this.state.techPlanFileList = [];
  347. this.state.businessPlanFileList = [];
  348. this.props.form.resetFields();
  349. };
  350. },
  351. render() {
  352. const theData = this.state.data || {};
  353. const { getFieldDecorator } = this.props.form;
  354. const FormItem = Form.Item
  355. const formItemLayout = {
  356. labelCol: { span: 8 },
  357. wrapperCol: { span: 14 },
  358. };
  359. const selectOption=[];
  360. intentionalService.map(function (item) {
  361. selectOption.push(
  362. <Select.Option key={item.id}>{item.name}</Select.Option>
  363. )
  364. });
  365. return (
  366. <Form horizontal onSubmit={this.handleSubmit} id="demand-form">
  367. <Spin spinning={this.state.loading}>
  368. <div className="clearfix">
  369. <FormItem className="half-item"
  370. {...formItemLayout}
  371. label="客户类型" >
  372. <span>{theData._shareType}</span>
  373. </FormItem>
  374. <div className="clearfix" style={{marginLeft:'40px',marginBottom:'20px',color:'#000000'}}>基本资料:</div>
  375. </div>
  376. {/* <FormItem className="half-item"
  377. {...formItemLayout}
  378. label="录入时间" >
  379. {getFieldDecorator('createTime', {
  380. initialValue: theData.createTime ? moment(theData.createTime) : null
  381. })(
  382. <DatePicker />
  383. )}
  384. </FormItem> */}
  385. <FormItem className="half-item"
  386. {...formItemLayout}
  387. label="跟单人" >
  388. <span>{theData.adminName}</span>
  389. </FormItem>
  390. <div className="clearfix" style={{marginLeft:'40px',marginBottom:'20px',color:'#000000'}}>公司资料:</div>
  391. <div>
  392. <FormItem className="half-item"
  393. {...formItemLayout}
  394. label="公司名称" >
  395. {getFieldDecorator('companyName', {
  396. rules: [{ required: true, message: '此项为必填项!' }],
  397. initialValue: theData.companyName
  398. })(
  399. <Input />
  400. )}
  401. </FormItem>
  402. <FormItem className="half-item"
  403. {...formItemLayout}
  404. label="公司行业" >
  405. {getFieldDecorator('companyIndustry', {
  406. initialValue: theData.companyIndustry
  407. })(
  408. <Input />
  409. )}
  410. </FormItem>
  411. {/*<FormItem className="half-item"
  412. {...formItemLayout}
  413. label="意向服务" >
  414. {getFieldDecorator('companyIntention', {
  415. rules: [{ required: true, message: '此项为必填项!' }],
  416. initialValue: theData.companyIntention
  417. })(
  418. <Select placeholder="选择服务类型" >
  419. {
  420. intentionalService.map(function (item) {
  421. return <Select.Option key={item.value} >{item.key}</Select.Option>
  422. })
  423. }
  424. </Select>
  425. )}
  426. </FormItem>*/}
  427. <FormItem className="half-item"
  428. {...formItemLayout}
  429. label="意向服务" >
  430. <Select
  431. multiple
  432. style={{ width: '80%' }}
  433. placeholder="选择服务类型"
  434. filterOption={(input, option) => { return option.props.children.indexOf(input) >= 0 }}
  435. value={this.state.companyIntention}
  436. onChange={(pids) => {
  437. this.state.companyIntention = pids;
  438. this.setState({
  439. companyIntention: this.state.companyIntention
  440. })
  441. }}
  442. >
  443. {selectOption}
  444. </Select>
  445. </FormItem>
  446. <FormItem className="half-item"
  447. {...formItemLayout}
  448. label="地区" >
  449. {getFieldDecorator('locationProvince', {
  450. initialValue: theData.locationProvince
  451. })(
  452. <Select placeholder="选择地区" style={{ width: 160 }} >
  453. {
  454. cityArr.map(function (item) {
  455. return <Select.Option key={item.value} >{item.key}</Select.Option>
  456. })
  457. }
  458. </Select>
  459. )}
  460. </FormItem>
  461. <FormItem className="half-item"
  462. {...formItemLayout}
  463. label="最新跟进" >
  464. {getFieldDecorator('followSituation', {
  465. rules: [{ required: true, message: '此项为必填项!' }],
  466. initialValue: getfllowSituation(theData.followSituation)
  467. })(
  468. <Select placeholder="选择跟进进度" style={{ width: 160 }} >
  469. {
  470. newFollow.map(function (item) {
  471. return <Select.Option key={item.value} >{item.key}</Select.Option>
  472. })
  473. }
  474. </Select>
  475. )}
  476. </FormItem>
  477. <FormItem className="half-item"
  478. {...formItemLayout}
  479. label="客户状态" >
  480. {getFieldDecorator('customerStatus', {
  481. rules: [{ required: true, message: '此项为必填项!' }],
  482. initialValue: getcustomerStatue(theData.customerStatus)
  483. })(
  484. <Select placeholder="选择客户状态" style={{ width: 160 }} >
  485. {
  486. customerStatus.map(function (item) {
  487. return <Select.Option key={item.value} >{item.key}</Select.Option>
  488. })
  489. }
  490. </Select>
  491. )}
  492. </FormItem>
  493. <FormItem className="half-item"
  494. {...formItemLayout}
  495. label="详细地址" >
  496. {getFieldDecorator('adress', {
  497. initialValue: theData.adress
  498. })(
  499. <Input type="text" rows={1}/>
  500. )}
  501. </FormItem>
  502. <div className="clearfix">
  503. <FormItem
  504. labelCol={{ span: 4 }}
  505. wrapperCol={{ span: 18 }}
  506. label="备注" >
  507. {getFieldDecorator('remarks', {
  508. initialValue: theData.remarks
  509. })(
  510. <Input type="textarea" rows={4} />
  511. )}
  512. </FormItem>
  513. </div>
  514. </div>
  515. <div className="clearfix" style={{marginLeft:'40px',marginBottom:'20px',color:'#000000'}}>联系资料:</div>
  516. <div>
  517. <FormItem className="half-item"
  518. {...formItemLayout}
  519. label="姓名" >
  520. {getFieldDecorator('contactName', {
  521. rules: [{ required: true, message: '此项为必填项!' }],
  522. initialValue: theData.contactName
  523. })(
  524. <Input type="text" rows={1}/>
  525. )}
  526. </FormItem>
  527. <FormItem className="half-item"
  528. {...formItemLayout}
  529. label="性别" >
  530. {getFieldDecorator('sex', {
  531. rules: [{ required: true, message: '此项为必填项!' }],
  532. initialValue:theData.sex
  533. })(
  534. <Radio.Group onChange={(e) => { this.setState({ radios: e.target.value }); }}>
  535. <Radio value="0">男</Radio>
  536. <Radio value="1">女</Radio>
  537. </Radio.Group>
  538. )}
  539. </FormItem>
  540. <FormItem className="half-item"
  541. {...formItemLayout}
  542. label="手机号码" >
  543. {getFieldDecorator('telNum', {
  544. rules: [{ required: true, message: '此项为必填项!' }],
  545. initialValue: theData.telNum
  546. })(
  547. <Input type="text" rows={1}/>
  548. )}
  549. </FormItem>
  550. <FormItem className="half-item"
  551. {...formItemLayout}
  552. label="座机号" >
  553. {getFieldDecorator('mobile', {
  554. initialValue: theData.mobile
  555. })(
  556. <Input type="text" rows={1}/>
  557. )}
  558. </FormItem>
  559. <FormItem className="half-item"
  560. {...formItemLayout}
  561. label="QQ号码" >
  562. {getFieldDecorator('qq', {
  563. initialValue: theData.qq
  564. })(
  565. <Input type="text" rows={1}/>
  566. )}
  567. </FormItem>
  568. <FormItem className="half-item"
  569. {...formItemLayout}
  570. label="邮箱号" >
  571. {getFieldDecorator('email', {
  572. initialValue: theData.email
  573. })(
  574. <Input type="text" rows={1}/>
  575. )}
  576. </FormItem>
  577. <FormItem className="half-item"
  578. {...formItemLayout}
  579. label="微信" >
  580. {getFieldDecorator('wechat', {
  581. initialValue: theData.wechat
  582. })(
  583. <Input type="text" rows={1}/>
  584. )}
  585. </FormItem>
  586. <FormItem className="half-item"
  587. {...formItemLayout}
  588. label="部门" >
  589. {getFieldDecorator('depatrment', {
  590. initialValue: theData.depatrment
  591. })(
  592. <Input type="text" rows={1}/>
  593. )}
  594. </FormItem>
  595. <FormItem className="half-item"
  596. {...formItemLayout}
  597. label="职位" >
  598. {getFieldDecorator('customerPosition', {
  599. initialValue: theData.customerPosition
  600. })(
  601. <Input type="text" rows={1}/>
  602. )}
  603. </FormItem>
  604. </div>
  605. <div className="clearfix" style={{paddingLeft:"200px",marginBottom:"20px"}}>
  606. <Button className="set-submit" type="primary" htmlType="submit" id="change_keep" style={{marginTop:"20px"}}>保存</Button>
  607. <Button className="set-submit" type="ghost" onClick={this.props.closeDesc} id='change_rem' style={{marginTop:"20px"}}>取消</Button>
  608. </div>
  609. {/* <FormItem wrapperCol={{ span: 12, offset: 4 }}>
  610. {theData.auditStatus == 2 ? <Button className="set-submit" type="primary" htmlType="submit">保存</Button> : <span></span>}
  611. {theData.auditStatus == 3 ? <Button className="set-submit" type="primary" onClick={() => { this.modifyBroker(); }}>保存</Button> : <span></span>}
  612. <Button className="set-submit" type="ghost" onClick={this.props.closeDesc}>取消</Button> */}
  613. {/*{window.showAuditStatus ? <Button className="set-submit" loading={this.state.buttonLoading} type="primary" onClick={this.buildMatchList}>生成匹配列表</Button> : <span></span>}*/}
  614. {/* </FormItem>
  615. */}
  616. </Spin>
  617. </Form >
  618. )
  619. }
  620. }));
  621. const AchievementDetailForm = Form.create()(React.createClass({
  622. getInitialState() {
  623. return {
  624. loading: false,
  625. auditStatus: 0,
  626. selectOption: [],
  627. textFileList: [],
  628. switchValue: false,
  629. radios: false,
  630. techPlanFileList: [],
  631. data: {},
  632. tags: [],
  633. technicalPictureUrl: [],
  634. coverImg: [],
  635. maturityPictureUrl: [],
  636. businessPlanFileList: [],
  637. dataSource: [],
  638. };
  639. },
  640. loadData(id, detailApiUrl) {
  641. this.setState({
  642. loading: true
  643. });
  644. $.ajax({
  645. method: "get",
  646. dataType: "json",
  647. crossDomain: false,
  648. url: globalConfig.context + detailApiUrl,
  649. data: {
  650. id: id
  651. },
  652. success: function (data) {
  653. let thisData = data.data;
  654. if (!thisData) {
  655. if (data.error && data.error.length) {
  656. message.warning(data.error[0].message);
  657. };
  658. thisData = {};
  659. };
  660. this.setState({
  661. data: thisData,
  662. orgDisplay: thisData.ownerType,
  663. switchValue: Boolean(!thisData.ownerId),
  664. radios: thisData.hot == '1' ? true : false,
  665. transferPriceDis: thisData.transferMode == 1 ? true : false,
  666. tags: thisData.keyword ? (thisData.keyword.replace(/(,|、)/g, ",")).split(',') : [],
  667. technicalPictureUrl: thisData.technicalPictureUrl ? splitUrl(thisData.technicalPictureUrl, ',', globalConfig.avatarHost + '/upload') : [],
  668. coverImg: thisData.coverImg ? splitUrl(thisData.coverImg, ',', globalConfig.avatarHost + '/upload') : [],
  669. maturityPictureUrl: thisData.maturityPictureUrl ? splitUrl(thisData.maturityPictureUrl, ',', globalConfig.avatarHost + '/upload') : [],
  670. });
  671. if (thisData.ownerType == "1" && thisData.ownerId) {
  672. this.getContactsList(thisData.ownerId);
  673. };
  674. }.bind(this),
  675. }).always(function () {
  676. this.setState({
  677. loading: false
  678. });
  679. }.bind(this));
  680. },
  681. getContactsList(theUid) {
  682. $.ajax({
  683. method: "get",
  684. dataType: "json",
  685. crossDomain: false,
  686. url: globalConfig.context + "/api/admin/getContacts",
  687. data: {
  688. uid: theUid
  689. },
  690. success: function (data) {
  691. let theOption = [];
  692. if (!data.data) {
  693. if (data.error && data.error.length) {
  694. message.warning(data.error[0].message);
  695. return;
  696. };
  697. };
  698. for (let item in data.data) {
  699. let theData = data.data[item];
  700. theOption.push(
  701. <Select.Option value={item} key={theData}>{theData}</Select.Option>
  702. );
  703. };
  704. this.setState({
  705. contactsOption: theOption
  706. });
  707. }.bind(this),
  708. });
  709. },
  710. getTagsArr(e) {
  711. this.setState({ tags: e });
  712. },
  713. getMaturityPictureUrl(e) {
  714. this.setState({ maturityPictureUrl: e });
  715. },
  716. getTechnicalPictureUrl(e) {
  717. this.setState({ technicalPictureUrl: e });
  718. },
  719. getcoverImg(e) {
  720. this.setState({coverImg: e });
  721. },
  722. handleSearch(e) {
  723. if (this.props.detailApiUrl.indexOf('org') != -1) {
  724. $.ajax({
  725. method: "get",
  726. dataType: "json",
  727. crossDomain: false,
  728. url: globalConfig.context + "/api/admin/achievement/orgOwner",
  729. data: { name: e },
  730. success: function (data) {
  731. let theArr = [];
  732. let theObj = {};
  733. if (!data.data) {
  734. if (data.error && data.error.length) {
  735. message.warning(data.error[0].message);
  736. };
  737. } else if (!$.isEmptyObject(data.data)) {
  738. data.data.map(function (item) {
  739. theArr.push(item.unitName);
  740. theObj[item.unitName] = item.uid;
  741. });
  742. };
  743. this.setState({
  744. dataSource: theArr,
  745. dataSourceObj: theObj
  746. });
  747. }.bind(this),
  748. });
  749. } else {
  750. $.ajax({
  751. method: "get",
  752. dataType: "json",
  753. crossDomain: false,
  754. url: globalConfig.context + "/api/admin/achievement/userOwner",
  755. data: { name: e },
  756. success: function (data) {
  757. let theArr = [];
  758. let theObj = {};
  759. if (!data.data) {
  760. if (data.error && data.error.length) {
  761. message.warning(data.error[0].message);
  762. };
  763. } else if (!$.isEmptyObject(data.data)) {
  764. for (let item in data.data) {
  765. theArr.push(data.data[item]);
  766. theObj[data.data[item]] = item;
  767. };
  768. };
  769. this.setState({
  770. dataSource: theArr,
  771. dataSourceObj: theObj
  772. });
  773. }.bind(this),
  774. });
  775. };
  776. },
  777. handleSubmit(e) {
  778. e.preventDefault();
  779. this.props.form.validateFields((err, values) => {
  780. //url转化
  781. let theTechnicalPictureUrl = [];
  782. if (this.state.technicalPictureUrl.length) {
  783. let picArr = [];
  784. this.state.technicalPictureUrl.map(function (item) {
  785. picArr.push(item.response.data);
  786. });
  787. theTechnicalPictureUrl = picArr.join(",");
  788. };
  789. let thecoverImg = [];
  790. if (this.state.coverImg.length) {
  791. let picArr = [];
  792. this.state.coverImg.map(function (item) {
  793. picArr.push(item.response.data);
  794. });
  795. thecoverImg = picArr.join(",");
  796. };
  797. let theMaturityPictureUrl = [];
  798. if (this.state.maturityPictureUrl.length) {
  799. let picArr = [];
  800. this.state.maturityPictureUrl.map(function (item) {
  801. picArr.push(item.response.data);
  802. });
  803. theMaturityPictureUrl = picArr.join(",");
  804. };
  805. let companyMore = [];
  806. if (values.companyIntention.length) {
  807. let companyList = [];
  808. values.companyIntention.map(function (item) {
  809. companyList.push(item);
  810. });
  811. companyMore = companyList.join(",");
  812. };
  813. console.log(values.companyIntention)
  814. if (!err) {
  815. this.setState({
  816. loading: true
  817. });
  818. $.ajax({
  819. method: "POST",
  820. dataType: "json",
  821. crossDomain: false,
  822. url: this.props.data.id ? globalConfig.context + '/api/admin/customer/updCustomer' : globalConfig.context + '/api/admin/customer/addCustomer',
  823. data: {
  824. id: this.props.data.id, //编号
  825. customerType:values.customerTyp ,//客户信息 1
  826. // createTime: values.createTime ? values.createTime.format('YYYY-MM-DD') : undefined,//时间 1\
  827. companyName: values.companyName,//公司名称 1
  828. companyIndustry: values.companyIndustry,//公司行业
  829. companyIntention: companyMore,//公司意向1
  830. tag: values.tag,
  831. locationProvince: values.locationProvince,//省份1
  832. adress: values.adress,//详细地址1
  833. remarks: values.remarks,//备注1
  834. followSituation: values.followSituation,//最新跟进1
  835. customerStatus: values.customerStatus,//客户状态1
  836. name: values.name,//客户姓名1
  837. mobile: values.mobile,//座机1
  838. telNum: values.telNum,//手机号码1
  839. sex: values.sex,//性别1
  840. customerPosition: values.customerPosition,//职位1
  841. wechat: values.wechat,//微信号1
  842. qq: values.qq,//qq 1
  843. depatrment: values.depatrment,//部门 1
  844. email: values.email,//邮箱 1
  845. shareType:0,
  846. followDates:values.createTime ? values.createTime.format('YYYY-MM-DD'):undefined,//+" "+(values.createTim ? values.createTim.format('YYYY:MM:DD'):undefined),//时间,
  847. primaryFlg:0,
  848. }
  849. }).done(function (data) {
  850. this.state.auditStatus = 0;
  851. this.setState({
  852. loading: false
  853. });
  854. if (!data.error.length) {
  855. message.success('保存成功!');
  856. this.props.handleOk();
  857. } else {
  858. message.warning(data.error[0].message);
  859. }
  860. }.bind(this));
  861. }
  862. });
  863. },
  864. componentWillMount() {
  865. this.state.therottleSearch = throttle(this.handleSearch, 1000, { leading: false }).bind(this);
  866. if (this.props.data && this.props.data.id) {
  867. this.loadData(this.props.data.id, this.props.detailApiUrl);
  868. };
  869. },
  870. componentWillReceiveProps(nextProps) {
  871. if (!this.props.visible && nextProps.visible) {
  872. if (nextProps.data && nextProps.data.id) {
  873. this.loadData(nextProps.data.id, nextProps.detailApiUrl);
  874. };
  875. this.state.data = {};
  876. this.state.tags = [];
  877. this.state.switchValue = false;
  878. this.state.radios = false;
  879. this.state.technicalPictureUrl = [];
  880. this.state.coverImg = [];
  881. this.state.maturityPictureUrl = [];
  882. this.state.textFileList = [];
  883. this.state.techPlanFileList = [];
  884. this.state.businessPlanFileList = [];
  885. this.props.form.resetFields();
  886. };
  887. },
  888. render() {
  889. const theData = this.state.data || {};
  890. const { getFieldDecorator } = this.props.form;
  891. const FormItem = Form.Item
  892. const formItemLayout = {
  893. labelCol: { span: 8 },
  894. wrapperCol: { span: 14 },
  895. };
  896. const { RangePicker } = DatePicker;
  897. return (
  898. <Form horizontal onSubmit={this.handleSubmit} id="demand-form">
  899. <Spin spinning={this.state.loading}>
  900. <div className="clearfix">
  901. <FormItem className="half-item"
  902. {...formItemLayout}
  903. label="客户类型" >
  904. {getFieldDecorator('customerTyp', {
  905. rules: [{ required: true, message: '此项为必填项!' }],
  906. initialValue: theData.customerTyp
  907. })(
  908. <Select placeholder="选择客户类型" style={{ width: 160 }} >
  909. <Select.Option value="0" >个人客户</Select.Option>
  910. <Select.Option value="1" >公司客户</Select.Option>
  911. </Select>
  912. )}
  913. </FormItem>
  914. <div className="clearfix" style={{marginLeft:'40px',marginBottom:'20px',color:'#000000'}}>基本资料:</div>
  915. <div>
  916. <FormItem className="half-item"
  917. {...formItemLayout}
  918. label="录入时间" >
  919. {getFieldDecorator('createTime', {
  920. rules: [{ required: true, message: '此项为必填项!' }],
  921. initialValue: theData.createTime ? moment(theData.createTime) : null
  922. })(
  923. <DatePicker />
  924. )}
  925. </FormItem>
  926. {/* <FormItem className="half-item" style={{marginLeft:'-160px'}}
  927. {...formItemLayout}
  928. label="" >
  929. </FormItem> */}
  930. {/* <FormItem className="half-item"
  931. {...formItemLayout}
  932. label="跟单人" >
  933. {getFieldDecorator('ownerId', {
  934. initialValue: theData.ownerId
  935. })(
  936. <Input />
  937. )}
  938. </FormItem> */}
  939. </div>
  940. <div className="clearfix" style={{marginLeft:'40px',marginBottom:'20px',color:'#000000'}}>公司资料:</div>
  941. <div>
  942. <FormItem className="half-item"
  943. {...formItemLayout}
  944. label="公司名称" >
  945. {getFieldDecorator('companyName', {
  946. rules: [{ required: true, message: '此项为必填项!' }],
  947. initialValue: theData.companyName
  948. })(
  949. <Input />
  950. )}
  951. </FormItem>
  952. <FormItem className="half-item"
  953. {...formItemLayout}
  954. label="公司行业" >
  955. {getFieldDecorator('companyIndustry', {
  956. initialValue: theData.companyIndustry
  957. })(
  958. <Input />
  959. )}
  960. </FormItem>
  961. <FormItem className="half-item"
  962. {...formItemLayout}
  963. label="地区" >
  964. {getFieldDecorator('locationProvince', {
  965. initialValue: getcityArr(theData.locationProvince)
  966. })(
  967. <Select placeholder="选择地区" style={{ width: 160 }} >
  968. {
  969. cityArr.map(function (item) {
  970. return <Select.Option key={item.value} >{item.key}</Select.Option>
  971. })
  972. }
  973. </Select>
  974. )}
  975. </FormItem>
  976. <FormItem className="half-item"
  977. {...formItemLayout}
  978. label="最新跟进" >
  979. {getFieldDecorator('followSituation', {
  980. rules: [{ required: true, message: '此项为必填项!' }],
  981. initialValue: getfllowSituation(theData.followSituation)
  982. })(
  983. <Select placeholder="选择跟进进度" style={{ width: 160 }} >
  984. {
  985. newFollow.map(function (item) {
  986. return <Select.Option key={item.value} >{item.key}</Select.Option>
  987. })
  988. }
  989. </Select>
  990. )}
  991. </FormItem>
  992. <FormItem className="half-item"
  993. {...formItemLayout}
  994. label="客户状态" >
  995. {getFieldDecorator('customerStatus', {
  996. rules: [{ required: true, message: '此项为必填项!' }],
  997. initialValue: getcustomerStatue(theData.customerStatus)
  998. })(
  999. <Select placeholder="选择客户状态" style={{ width: 160 }} >
  1000. {
  1001. customerStatus.map(function (item) {
  1002. return <Select.Option key={item.value} >{item.key}</Select.Option>
  1003. })
  1004. }
  1005. </Select>
  1006. )}
  1007. </FormItem>
  1008. <FormItem className="half-item"
  1009. {...formItemLayout}
  1010. label="详细地址" >
  1011. {getFieldDecorator('adress', {
  1012. initialValue: theData.adress
  1013. })(
  1014. <Input />
  1015. )}
  1016. </FormItem>
  1017. <FormItem className="half-item"
  1018. {...formItemLayout}
  1019. label="标签" >
  1020. {getFieldDecorator('tag', {
  1021. initialValue: theData.tag
  1022. })(
  1023. <Select placeholder="选择客户标签" >
  1024. {
  1025. tag.map(function (item) {
  1026. return <Select.Option key={item.key} >{item.key}</Select.Option>
  1027. })
  1028. }
  1029. </Select>
  1030. )}
  1031. </FormItem>
  1032. <div className="clearfix" >
  1033. <FormItem className="half-item" style={{marginLeft:'80px'}}
  1034. labelCol={{ span: 4 }}
  1035. wrapperCol={{ span: 18 }}
  1036. label="意向服务" >
  1037. {getFieldDecorator('companyIntention', {
  1038. rules: [{ required: true, message: '此项为必填项!' }],
  1039. })(
  1040. <Select
  1041. multiple
  1042. style={{width:'600px'}}
  1043. placeholder="选择服务类型"
  1044. filterOption={(input, option) => { return option.props.children.indexOf(input) >= 0 }}
  1045. value={this.state.companyIntention}
  1046. onChange={(pids) => {
  1047. this.state.companyIntention = pids;
  1048. this.setState({
  1049. companyIntention: this.state.companyIntention
  1050. })
  1051. }}
  1052. >
  1053. {
  1054. intentionalService.map(function (item) {
  1055. return <Select.Option key={item.value} >{item.key}</Select.Option>
  1056. })
  1057. }
  1058. </Select>)}
  1059. </FormItem>
  1060. </div>
  1061. <div className="clearfix">
  1062. <FormItem
  1063. labelCol={{ span: 4 }}
  1064. wrapperCol={{ span: 18 }}
  1065. label="备注" >
  1066. {getFieldDecorator('remarks', {
  1067. initialValue: theData.remarks
  1068. })(
  1069. <Input type="textarea" rows={4} />
  1070. )}
  1071. </FormItem>
  1072. </div>
  1073. </div>
  1074. <div className="clearfix" style={{marginLeft:'40px',marginBottom:'20px',color:'#000000'}}>联系资料:</div>
  1075. <div>
  1076. <FormItem className="half-item"
  1077. {...formItemLayout}
  1078. label="姓名" >
  1079. {getFieldDecorator('name', {
  1080. rules: [{ required: true, message: '此项为必填项!' }],
  1081. initialValue: theData.name
  1082. })(
  1083. <Input />
  1084. )}
  1085. </FormItem>
  1086. <FormItem className="half-item"
  1087. {...formItemLayout}
  1088. label="性别" >
  1089. {getFieldDecorator('sex', {
  1090. rules: [{ required: true, message: '此项为必填项!' }],
  1091. initialValue: getsex(theData.sex)
  1092. })(
  1093. <Radio.Group>
  1094. <Radio value="0">男</Radio>
  1095. <Radio value="1">女</Radio>
  1096. </Radio.Group>
  1097. )}
  1098. </FormItem>
  1099. <FormItem className="half-item"
  1100. {...formItemLayout}
  1101. label="手机号码" >
  1102. {getFieldDecorator('telNum', {
  1103. initialValue: theData.telNum
  1104. })(
  1105. <Input />
  1106. )}
  1107. </FormItem>
  1108. <FormItem className="half-item"
  1109. {...formItemLayout}
  1110. label="座机号" >
  1111. {getFieldDecorator('mobile', {
  1112. initialValue: theData.mobile
  1113. })(
  1114. <Input />
  1115. )}
  1116. </FormItem>
  1117. <FormItem className="half-item"
  1118. {...formItemLayout}
  1119. label="QQ号码" >
  1120. {getFieldDecorator('qq', {
  1121. initialValue: theData.qq
  1122. })(
  1123. <Input />
  1124. )}
  1125. </FormItem>
  1126. <FormItem className="half-item"
  1127. {...formItemLayout}
  1128. label="邮箱号" >
  1129. {getFieldDecorator('email', {
  1130. initialValue: theData.email
  1131. })(
  1132. <Input />
  1133. )}
  1134. </FormItem>
  1135. <FormItem className="half-item"
  1136. {...formItemLayout}
  1137. label="微信" >
  1138. {getFieldDecorator('wechat', {
  1139. initialValue: theData.wechat
  1140. })(
  1141. <Input />
  1142. )}
  1143. </FormItem>
  1144. <FormItem className="half-item"
  1145. {...formItemLayout}
  1146. label="部门" >
  1147. {getFieldDecorator('depatrment', {
  1148. initialValue: theData.depatrment
  1149. })(
  1150. <Input />
  1151. )}
  1152. </FormItem>
  1153. <FormItem className="half-item"
  1154. {...formItemLayout}
  1155. label="职位" >
  1156. {getFieldDecorator('customerPosition', {
  1157. initialValue: theData.customerPosition
  1158. })(
  1159. <Input />
  1160. )}
  1161. </FormItem>
  1162. </div>
  1163. </div>
  1164. <FormItem wrapperCol={{ span: 12, offset: 4 }}>
  1165. <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
  1166. {/*<Button className="set-submit" type="ghost" onClick={(e) => { this.state.auditStatus = 1; }} htmlType="submit">发布</Button>*/}
  1167. <Button className="set-submit" type="ghost" onClick={this.props.closeDesc}>取消</Button>
  1168. </FormItem>
  1169. </Spin>
  1170. </Form >
  1171. )
  1172. }
  1173. }));
  1174. const AchievementDetail = React.createClass({
  1175. getInitialState() {
  1176. return {
  1177. visible: false,
  1178. tabsKey: 1,
  1179. loading: false,
  1180. columns: [
  1181. {
  1182. title: '客户信息',
  1183. dataIndex: 'id',
  1184. key: 'id',
  1185. render: text => {
  1186. switch (text) {
  1187. case "0":
  1188. return <span>个人客户</span>;
  1189. case "1":
  1190. return <span>公司客户</span>;
  1191. }
  1192. }
  1193. }, {
  1194. title: '名称',
  1195. dataIndex: 'companyNmae',
  1196. key: 'companyNmae',
  1197. }, {
  1198. title: '关键字',
  1199. dataIndex: 'keyword',
  1200. key: 'keyword',
  1201. }, {
  1202. title: '类型',
  1203. dataIndex: 'demandType',
  1204. key: 'demandType',
  1205. render: text => { return getDemandType(text); }
  1206. }, {
  1207. title: '所有人名称',
  1208. dataIndex: 'theName',
  1209. key: 'theName',
  1210. }, {
  1211. title: '发布时间',
  1212. dataIndex: 'releaseDateFormattedDate',
  1213. key: 'releaseDateFormattedDate',
  1214. }, {
  1215. title: '有效期限',
  1216. dataIndex: 'validityPeriodFormattedDate',
  1217. key: 'validityPeriodFormattedDate',
  1218. },
  1219. ],
  1220. dataSource: [],
  1221. };
  1222. },
  1223. getTableList() {
  1224. this.setState({
  1225. loading: true
  1226. });
  1227. $.ajax({
  1228. method: "get",
  1229. dataType: "json",
  1230. crossDomain: false,
  1231. url: globalConfig.context + "/api/admin/achievement/achievementDemand",
  1232. data: { id: this.props.data.id },
  1233. success: function (data) {
  1234. let theArr = [];
  1235. if (!data.data) {
  1236. if (data.error && data.error.length) {
  1237. message.warning(data.error[0].message);
  1238. };
  1239. } else if (data.data.length) {
  1240. for (let i = 0; i < data.data.length; i++) {
  1241. let thisdata = data.data[i];
  1242. theArr.push({
  1243. key: i,
  1244. id: thisdata.id,
  1245. serialNumber: thisdata.serialNumber,
  1246. createTime: thisdata.createTime,
  1247. name: thisdata.name,
  1248. keyword: thisdata.keyword,
  1249. demandType: thisdata.demandType,
  1250. theName: thisdata.username || thisdata.unitName,
  1251. releaseDateFormattedDate: thisdata.releaseDateFormattedDate,
  1252. validityPeriodFormattedDate: thisdata.validityPeriodFormattedDate,
  1253. coverImg: thisdata.coverImg,
  1254. hot: thisdata.hot,
  1255. });
  1256. };
  1257. };
  1258. this.setState({
  1259. dataSource: theArr,
  1260. });
  1261. }.bind(this),
  1262. }).always(function () {
  1263. this.setState({
  1264. loading: false
  1265. });
  1266. }.bind(this));
  1267. },
  1268. tableRowClick(record, index) {
  1269. window.open(globalConfig.context + '/portal/detail/demandDetail.html?id=' + record.id + '&type=' + record.dataCategory);
  1270. },
  1271. handleCancel(e) {
  1272. this.setState({
  1273. visible: false,
  1274. });
  1275. this.props.closeDesc(false);
  1276. },
  1277. handleOk(e) {
  1278. this.setState({
  1279. visible: false,
  1280. });
  1281. this.props.closeDesc(false, true);
  1282. },
  1283. componentWillReceiveProps(nextProps) {
  1284. if (!this.state.visible && nextProps.showDesc) {
  1285. this.state.tabsKey = "1";
  1286. };
  1287. this.state.visible = nextProps.showDesc;
  1288. },
  1289. render() {
  1290. if (this.props.data) {
  1291. return (
  1292. <div className="patent-desc">
  1293. <Modal maskClosable={false} visible={this.state.visible}
  1294. onOk={this.checkPatentProcess} onCancel={this.handleCancel}
  1295. width='1000px'
  1296. footer=''
  1297. className="admin-desc-content">
  1298. <Spin spinning={this.state.loading}>
  1299. <Tabs activeKey={this.state.tabsKey}
  1300. onChange={(e) => {
  1301. this.setState({ tabsKey: e });
  1302. if (e == "2") {
  1303. this.getTableList();
  1304. };
  1305. }} >
  1306. <Tabs.TabPane tab="客户详情" key="1">
  1307. {(() => {
  1308. if (this.props.data.id && this.props.data.auditStatus != "0" && this.props.data.auditStatus != "4") {
  1309. return <AchievementDetailShow
  1310. data={this.props.data}
  1311. detailApiUrl={this.props.detailApiUrl}
  1312. techBrodersOption={this.state.techBrodersOption}
  1313. techBrodersObj={this.state.techBrodersObj}
  1314. closeDesc={this.handleCancel}
  1315. visible={this.state.visible}
  1316. handleOk={this.handleOk} />
  1317. } else {
  1318. return <AchievementDetailForm
  1319. data={this.props.data}
  1320. detailApiUrl={this.props.detailApiUrl}
  1321. achievementCategoryOption={this.props.achievementCategoryOption}
  1322. techBrodersObj={this.state.techBrodersObj}
  1323. closeDesc={this.handleCancel}
  1324. visible={this.state.visible}
  1325. handleOk={this.handleOk} />
  1326. };
  1327. })()}
  1328. </Tabs.TabPane>
  1329. </Tabs>
  1330. </Spin>
  1331. </Modal>
  1332. </div>
  1333. );
  1334. } else {
  1335. return <div></div>
  1336. }
  1337. },
  1338. });
  1339. export default AchievementDetail;