remindMessage.jsx 49 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155
  1. import React from 'react';
  2. import ReactDom from 'react-dom';
  3. import ajax from 'jquery/src/ajax/xhr.js';
  4. import $ from 'jquery/src/ajax';
  5. import '../content.less';
  6. import { citySelect,provinceList,areaSelect,provinceSelect,addressList} from '../../../NewDicProvinceListAll';
  7. import { Form,Radio, Icon, Button, Input, Select, Spin, Table, Switch, message, DatePicker, Modal, Upload,Popconfirm,AutoComplete,Tabs,Checkbox,Tree,Cascader} from 'antd';
  8. import {patternOrganization,conditionOrganization,intentionalService,messageType,designatedObjects,socialAttribute,industry,featuredContent} from '../../../dataDic.js';
  9. import {getPattern,getCondition} from '../../../tools.js';
  10. const TabPane = Tabs.TabPane;
  11. const TreeNodet = Tree.TreeNode;
  12. const RemindMessage=Form.create()(React.createClass({
  13. loadData(pageNo) {
  14. this.state.data = [];
  15. this.setState({
  16. loading: true
  17. });
  18. let nameText=this.state.SuperArr;
  19. let superText=(this.state.superId)?nameText[parseInt(this.state.superId)].name:"";
  20. $.ajax({
  21. method: "post",
  22. dataType: "json",
  23. crossDomain: false,
  24. url: globalConfig.context + '/api/admin/organization/listOrganizationManagement',
  25. data: {
  26. pageNo: pageNo || 1,
  27. pageSize: this.state.pagination.pageSize,
  28. name: this.state.name, //组织名称
  29. superId:superText,//上级组织
  30. type:this.state.type,//组织类型
  31. depNo:this.state.depNo,//组织编号
  32. },
  33. success: function (data) {
  34. let theArr = [];
  35. if (!data.data || !data.data.list) {
  36. if (data.error && data.error.length) {
  37. message.warning(data.error[0].message);
  38. };
  39. } else {
  40. for (let i = 0; i < data.data.list.length; i++) {
  41. let thisdata = data.data.list[i];
  42. theArr.push({
  43. key: thisdata.id,
  44. id: thisdata.id,//每一条记录的ID
  45. depNo:thisdata.depNo,//组织编号
  46. name:thisdata.name,//组织名称
  47. type:thisdata.type,//组织类型
  48. managerId:thisdata.managerId,//负责人
  49. superId:thisdata.superId,//上级组织
  50. status:thisdata.status,//组织状态
  51. });
  52. };
  53. this.state.pagination.current = data.data.pageNo;
  54. this.state.pagination.total = data.data.totalCount;
  55. };
  56. this.setState({
  57. dataSource: theArr,
  58. pagination: this.state.pagination
  59. });
  60. }.bind(this),
  61. }).always(function () {
  62. this.setState({
  63. loading: false
  64. });
  65. }.bind(this));
  66. },
  67. getInitialState() {
  68. return {
  69. visible: false,
  70. data: [],
  71. showAdd: false,
  72. showDesc: false,
  73. expandedKeys: [],
  74. autoExpandParent: true,
  75. selectedKeys: [],
  76. searchMore: true,
  77. selectedRowKeys: [],
  78. selectedRows: [],
  79. loading: false,
  80. pagination: {
  81. defaultCurrent: 1,
  82. defaultPageSize: 10,
  83. showQuickJumper: true,
  84. pageSize: 10,
  85. onChange: function (page) {
  86. this.loadData(page);
  87. }.bind(this),
  88. showTotal: function (total) {
  89. return '共' + total + '条数据';
  90. }
  91. },
  92. pagination1: {
  93. defaultCurrent: 1,
  94. defaultPageSize: 10,
  95. showQuickJumper: true,
  96. pageSize: 10,
  97. onChange: function (page) {
  98. this.loadData(page);
  99. }.bind(this),
  100. showTotal: function (total) {
  101. return '共' + total + '条数据';
  102. }
  103. },
  104. columns: [
  105. {
  106. title: '消息时间',
  107. dataIndex: 'depNo',
  108. key: 'depNo',
  109. }, {
  110. title: '消息标题',
  111. dataIndex: 'name1',
  112. key: 'name1',
  113. },{
  114. title: '消息内容',
  115. dataIndex: 'name',
  116. key: 'name',
  117. }
  118. ],
  119. dataSource: [],
  120. columns1: [
  121. {
  122. title: '客户名称',
  123. dataIndex: 'depNo',
  124. key: 'depNo',
  125. }, {
  126. title: '地区',
  127. dataIndex: 'name1',
  128. key: 'name1',
  129. },{
  130. title: '行业',
  131. dataIndex: 'name',
  132. key: 'name',
  133. },{
  134. title: '社会性质',
  135. dataIndex: 'type',
  136. key: 'type',
  137. render: text => { return getPattern(text) }
  138. },{
  139. title: '创建时间',
  140. dataIndex: 'name2',
  141. key: 'name2',
  142. },{
  143. title: '所属人',
  144. dataIndex: 'name3',
  145. key: 'name3',
  146. },{
  147. title: '业务认证',
  148. dataIndex: 'status',
  149. key: 'status',
  150. render: text => { return getCondition(text) }
  151. },{
  152. title: '实名认证',
  153. dataIndex: 'name4',
  154. key: 'name4',
  155. },{
  156. title: '是否高新',
  157. dataIndex: 'name5',
  158. key: 'name5',
  159. },{
  160. title: '是否上市',
  161. dataIndex: 'name6',
  162. key: 'name6',
  163. },{
  164. title: '是否国际',
  165. dataIndex: 'name7',
  166. key: 'name7',
  167. },{
  168. title: '会员等级',
  169. dataIndex: 'name8',
  170. key: 'name8',
  171. },{
  172. title: '会员状态',
  173. dataIndex: 'name9',
  174. key: 'name9',
  175. }
  176. ],
  177. dataSource: [],
  178. //searchTime: [,]
  179. };
  180. },
  181. componentWillMount() {
  182. this.selectSuperId();
  183. },
  184. //获取上级组织
  185. selectSuperId() {
  186. this.state.data = []
  187. $.ajax({
  188. method: "get",
  189. dataType: "json",
  190. crossDomain: false,
  191. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  192. data:{
  193. },
  194. success: function (data) {
  195. let theArr = [];
  196. let thedata=data.data;
  197. if (!thedata) {
  198. if (data.error && data.error.length) {
  199. message.warning(data.error[0].message);
  200. };
  201. thedata = {};
  202. };
  203. var contactIds=[];
  204. //for (let item in data.data) {
  205. for(var i=0;i<data.data.length;i++){
  206. let theData = data.data[i];
  207. theArr.push(
  208. <Select.Option value={i.toString()} key={theData.name}>{theData.name}</Select.Option>
  209. );
  210. };
  211. this.setState({
  212. SuperArr:thedata,
  213. contactsOption: theArr,
  214. orderStatusOptions:data.data,
  215. });
  216. }.bind(this),
  217. }).always(function () {
  218. this.loadData();
  219. this.setState({
  220. loading: false
  221. });
  222. }.bind(this));
  223. },
  224. //编辑部门,保存
  225. edithandleSubmit(e){
  226. e.preventDefault();
  227. //上级组织字典
  228. let nameText=this.state.SuperArr
  229. let superText=this.state.editSuperId;
  230. //let superText=(this.state.editSuperId).length<=1?nameText[parseInt(this.state.editSuperId)].name:''
  231. let superOne=this.state.editDataSource[0].editSuperId;
  232. let remarksText=(this.state.editRemarks)?this.state.editRemarks:'该组织没有职能说明,请完善!';
  233. let isStatus=this.state.editStatus;
  234. if(isStatus==1){
  235. if(confirm('是否要解散该部门?')){
  236. if(!(superOne==superText)){
  237. let changeSuper=nameText[parseInt(this.state.editSuperId)].name;
  238. if(confirm('上级组织已修改,是否保存?')){
  239. $.ajax({
  240. method: "post",
  241. dataType: "json",
  242. crossDomain: false,
  243. url:globalConfig.context + '/api/admin/organization/updateOrganization',
  244. data:{
  245. name:this.state.editName,//组织名称
  246. type:this.state.editType, //组织类型
  247. managerId:this.state.editManagerId,//负责人ID
  248. superId:changeSuper,//上级组织
  249. status:this.state.editStatus,//组织状态
  250. remarks:remarksText,//组织职能说明
  251. id:this.state.editId,//组织ID
  252. }
  253. }).done(function (data) {
  254. this.setState({
  255. loading: false
  256. });
  257. if (!data.error.length) {
  258. message.success('保存成功!');
  259. this.edithandleCancel();
  260. this.selectSuperId();
  261. } else {
  262. message.warning(data.error[0].message);
  263. }
  264. }.bind(this));
  265. return false
  266. }
  267. }else {
  268. $.ajax({
  269. method: "post",
  270. dataType: "json",
  271. crossDomain: false,
  272. url:globalConfig.context + '/api/admin/organization/updateOrganization',
  273. data:{
  274. name:this.state.editName,//组织名称
  275. type:this.state.editType, //组织类型
  276. managerId:this.state.editManagerId,//负责人ID
  277. superId:superText,//上级组织
  278. status:this.state.editStatus,//组织状态
  279. remarks:remarksText,//组织职能说明
  280. id:this.state.editId,//组织ID
  281. }
  282. }).done(function (data) {
  283. this.setState({
  284. loading: false
  285. });
  286. if (!data.error.length) {
  287. message.success('保存成功!');
  288. this.edithandleCancel();
  289. this.selectSuperId();
  290. } else {
  291. message.warning(data.error[0].message);
  292. }
  293. }.bind(this));
  294. }
  295. }
  296. }else{
  297. if(!(superOne==superText)){
  298. let changeSuper=nameText[parseInt(this.state.editSuperId)].name;
  299. if(confirm('上级组织已修改,是否保存?')){
  300. $.ajax({
  301. method: "post",
  302. dataType: "json",
  303. crossDomain: false,
  304. url:globalConfig.context + '/api/admin/organization/updateOrganization',
  305. data:{
  306. name:this.state.editName,//组织名称
  307. type:this.state.editType, //组织类型
  308. managerId:this.state.editManagerId,//负责人ID
  309. superId:changeSuper,//上级组织
  310. status:this.state.editStatus,//组织状态
  311. remarks:remarksText,//组织职能说明
  312. id:this.state.editId,//组织ID
  313. }
  314. }).done(function (data) {
  315. this.setState({
  316. loading: false
  317. });
  318. if (!data.error.length) {
  319. message.success('保存成功!');
  320. this.edithandleCancel();
  321. this.selectSuperId();
  322. } else {
  323. message.warning(data.error[0].message);
  324. }
  325. }.bind(this));
  326. return false
  327. }
  328. }else {
  329. $.ajax({
  330. method: "post",
  331. dataType: "json",
  332. crossDomain: false,
  333. url:globalConfig.context + '/api/admin/organization/updateOrganization',
  334. data:{
  335. name:this.state.editName,//组织名称
  336. type:this.state.editType, //组织类型
  337. managerId:this.state.editManagerId,//负责人ID
  338. superId:superText,//上级组织
  339. status:this.state.editStatus,//组织状态
  340. remarks:remarksText,//组织职能说明
  341. id:this.state.editId,//组织ID
  342. }
  343. }).done(function (data) {
  344. this.setState({
  345. loading: false
  346. });
  347. if (!data.error.length) {
  348. message.success('保存成功!');
  349. this.edithandleCancel();
  350. this.selectSuperId();
  351. } else {
  352. message.warning(data.error[0].message);
  353. }
  354. }.bind(this));
  355. }
  356. }
  357. },
  358. //整行点击
  359. tableRowClick(record, index) {
  360. this.selectSuperId();
  361. this.state.RowData = record;
  362. this.setState({
  363. editvisible: true,
  364. selectedRowKeys:[],
  365. rowId:record.businessId,
  366. })
  367. $.ajax({
  368. method: "post",
  369. dataType: "json",
  370. crossDomain: false,
  371. url: globalConfig.context +"/api/admin/organization/selectAllById" ,
  372. data: {
  373. id: record.id
  374. },
  375. success: function (data) {
  376. let theArr = [];
  377. let thisdata = data;
  378. if (!data) {
  379. if (data.error && data.error.length) {
  380. message.warning(data.error[0].message);
  381. };
  382. } else {
  383. theArr.push({
  384. editId: thisdata.id,//每一条记录的ID
  385. editName:thisdata.name,//组织名称
  386. editManagerId:thisdata.managerId,//负责人
  387. editType:thisdata.type,//组织类型
  388. editStatus:thisdata.status,//组织状态
  389. editSuperId:thisdata.superId,//上级组织
  390. editDepNo: thisdata.depNo,//组织编号
  391. editCreateId:thisdata.createId,//创建人
  392. editTime:thisdata.createTime,//创建时间
  393. editRemarks:thisdata.remarks,//组织职能说明
  394. });
  395. };
  396. this.setState({
  397. editId: thisdata.id,//每一条记录的ID
  398. editName:thisdata.name,//组织名称
  399. editManagerId:thisdata.managerId,//负责人
  400. editType:thisdata.type,//组织类型
  401. editStatus:thisdata.status,//组织状态
  402. editSuperId:thisdata.superId,//上级组织
  403. editDepNo: thisdata.depNo,//组织编号
  404. editCreateId:thisdata.createId,//创建人
  405. editTime:thisdata.createTime,//创建时间
  406. editRemarks: thisdata.remarks,//组织职能说明
  407. editDataSource: theArr,
  408. });
  409. }.bind(this),
  410. }).always(function () {
  411. this.setState({
  412. loading: false
  413. });
  414. }.bind(this));
  415. },
  416. //整行删除
  417. delectRow() {
  418. let deletedIds ='';
  419. for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
  420. let rowItem = this.state.selectedRows[idx];
  421. if (rowItem.id) {
  422. deletedIds=rowItem.id;
  423. };
  424. };
  425. this.setState({
  426. selectedRowKeys: [],
  427. loading: deletedIds.length > 0
  428. });
  429. $.ajax({
  430. method: "POST",
  431. dataType: "json",
  432. crossDomain: false,
  433. url: globalConfig.context + "/api/admin/organization/deleteById",
  434. data: {
  435. id: deletedIds
  436. }
  437. }).done(function (data) {
  438. if (!data.error.length) {
  439. message.success('删除成功!');
  440. this.setState({
  441. loading: false,
  442. });
  443. } else {
  444. message.warning(data.error[0].message);
  445. };
  446. this.selectSuperId();
  447. }.bind(this));
  448. },
  449. //新增一个部门,保存
  450. addhandleSubmit(e){
  451. e.preventDefault();
  452. if(!this.state.theTypes){
  453. message.warning('请输入负责人姓名');
  454. return false;
  455. }
  456. if(!this.state.typeOrganization){
  457. message.warning('请选择组织类型');
  458. return false;
  459. }
  460. if(!this.state.upOrganization){
  461. message.warning('请选择上级组织');
  462. return false;
  463. }
  464. this.props.form.validateFields((err, values) => {
  465. if (!err) {
  466. this.setState({
  467. loading: true
  468. });
  469. //上级组织字典
  470. let nameText=this.state.SuperArr
  471. let superText=nameText[parseInt(this.state.upOrganization)].name
  472. $.ajax({
  473. method: "post",
  474. dataType: "json",
  475. crossDomain: false,
  476. url:globalConfig.context + '/api/admin/organization/addOrganization',
  477. data:{
  478. name:this.state.nameOrganization,//组织名称
  479. managerId:this.state.theTypes,//负责人ID
  480. type:this.state.typeOrganization, //组织类型
  481. superId:superText,//上级组织
  482. remarks:this.state.remarksOrganization,//组织职能说明
  483. }
  484. }).done(function (data) {
  485. this.setState({
  486. loading: false
  487. });
  488. if (!data.error.length) {
  489. message.success('保存成功!');
  490. this.handleCancel();
  491. this.selectSuperId();
  492. } else {
  493. message.warning(data.error[0].message);
  494. }
  495. }.bind(this));
  496. }
  497. });
  498. },
  499. //主管初始加载(自动补全)
  500. supervisor(e){
  501. $.ajax({
  502. method: "post",
  503. dataType: "json",
  504. crossDomain: false,
  505. url: globalConfig.context + "/api/admin/organization/selectName",
  506. data:{
  507. name:e
  508. },
  509. success: function (data) {
  510. let thedata=data.data;
  511. if (!thedata) {
  512. if (data.error && data.error.length) {
  513. message.warning(data.error[0].message);
  514. };
  515. thedata = {};
  516. };
  517. this.setState({
  518. customerArr:thedata,
  519. });
  520. }.bind(this),
  521. }).always(function () {
  522. this.setState({
  523. loading: false
  524. });
  525. }.bind(this));
  526. },
  527. //上级主管输入框失去焦点是判断客户是否存在
  528. selectAuto(value,options){
  529. this.setState({
  530. managerIdOrganization:value
  531. })
  532. },
  533. //失去焦点时
  534. blurChange(e){
  535. this.setState({
  536. theTypes:e
  537. })
  538. },
  539. //详情tab切换数据处理
  540. callback(e) {
  541. this.setState({
  542. callnub: e,
  543. })
  544. if(e == 1) {
  545. this.loadData();
  546. }
  547. if(e == 2) {
  548. }
  549. },
  550. //切换创建系统消息中的指定发送对象
  551. changeObjects(e) {
  552. this.setState({
  553. designatedObject:e
  554. })
  555. if(e == 0) {
  556. this.setState({ visible1: true })
  557. }
  558. if(e == 1) {
  559. this.setState({ visible2: true })
  560. }
  561. if(e == 2) {
  562. this.setState({ visible3: true })
  563. }
  564. if(e == 3) {
  565. this.setState({ visible4: true })
  566. }
  567. if(e == 4) {
  568. this.setState({ visible5: true })
  569. }
  570. if(e == 5) {
  571. this.setState({ visible6: true })
  572. }
  573. },
  574. //值改变时请求客户名称
  575. httpChange(e){
  576. if(e.length>=2){
  577. this.supervisor(e);
  578. }
  579. this.setState({
  580. managerIdOrganization:e
  581. })
  582. },
  583. addClick() {
  584. this.state.nameOrganization='';//组织名称清零
  585. this.state.managerIdOrganization= '';//负责人ID清零
  586. this.state.typeOrganization= undefined; //组织类型清零
  587. this.state.upOrganization= undefined;//上级组织清零
  588. this.state.remarksOrganization= '';//组织职能说明清零
  589. this.state.RowData = {};
  590. this.setState({
  591. visible: true
  592. });
  593. this.selectSuperId();
  594. },
  595. editClick() {
  596. this.state.RowData = {};
  597. this.setState({
  598. editvisible: true
  599. });
  600. },
  601. handleCancel() {
  602. this.setState({ visible: false })
  603. },
  604. handleCancel1() {
  605. this.setState({ visible1: false })
  606. },
  607. handleCancel2() {
  608. this.setState({ visible2: false })
  609. },
  610. handleCancel3() {
  611. this.setState({ visible3: false })
  612. },
  613. handleCancel4() {
  614. this.setState({ visible4: false })
  615. },
  616. handleCancel5() {
  617. this.setState({ visible5: false })
  618. },
  619. handleCancel6() {
  620. this.setState({ visible6: false })
  621. },
  622. edithandleCancel() {
  623. this.setState({ editvisible: false })
  624. },
  625. //地区多选
  626. onExpand(expandedKeys){
  627. this.setState({
  628. expandedKeys,
  629. autoExpandParent: false,
  630. });
  631. },
  632. onCheck(checkedKeys){
  633. this.setState({checkedKeys:checkedKeys });
  634. },
  635. onSelect(selectedKeys, info){
  636. this.setState({ selectedKeys });
  637. },
  638. renderTreeNodes(data){
  639. return provinceList.map((item) => {
  640. return(
  641. <TreeNodet title={item.name} key={item.id} dataRef={item}>
  642. {item.cityList.map((item) => {
  643. return(
  644. <TreeNodet title={item.name} key={item.id} dataRef={item}>
  645. {item.areaList.map((item) => {
  646. return(
  647. <TreeNodet title={item.name} key={item.id} dataRef={item}>
  648. </TreeNodet>
  649. );
  650. })
  651. }
  652. </TreeNodet>
  653. );
  654. })
  655. }
  656. </TreeNodet>
  657. );
  658. return <TreeNodet {...item} />;
  659. });
  660. },
  661. search() {
  662. this.loadData();
  663. },
  664. //把搜索的部分置零
  665. reset() {
  666. this.state.superId = undefined;//上级组织清零
  667. this.state.name = '';//组织名称清零
  668. this.state.type = undefined;//组织类型清零
  669. this.state.depNo = '';//组织编号清零
  670. this.loadData();
  671. },
  672. searchSwitch() {
  673. this.setState({
  674. searchMore: !this.state.searchMore
  675. });
  676. },
  677. render() {
  678. const FormItem = Form.Item
  679. const rowSelection = {
  680. selectedRowKeys: this.state.selectedRowKeys,
  681. onChange: (selectedRowKeys, selectedRows) => {
  682. this.setState({
  683. selectedRows: selectedRows.slice(-1),
  684. selectedRowKeys: selectedRowKeys.slice(-1)
  685. });
  686. },
  687. onSelect: (recordt, selected, selectedRows) => {
  688. this.setState({
  689. recordt:recordt.id
  690. })
  691. },
  692. };
  693. const rowSelections = {
  694. selectedRowKeys: this.state.selectedRowKeys,
  695. onChange: (selectedRowKeys, selectedRows) => {
  696. this.setState({
  697. selectedRows: selectedRows,
  698. selectedRowKeys: selectedRowKeys
  699. });
  700. },
  701. onSelect: (recordt, selected, selectedRows) => {
  702. this.setState({
  703. recordt:recordt.id
  704. })
  705. },
  706. };
  707. const formItemLayout = {
  708. labelCol: { span: 8 },
  709. wrapperCol: { span: 14 },
  710. };
  711. const { getFieldDecorator } = this.props.form;
  712. const hasSelected = this.state.selectedRowKeys.length > 0;
  713. const { RangePicker } = DatePicker;
  714. const dataSources=this.state.customerArr || [];
  715. const options = dataSources.map((group,index) =>
  716. <Option key={index} value={group.name}>{group.name}</Option>
  717. )
  718. return (
  719. <div className="user-content" >
  720. <div className="content-title">
  721. <div className="user-search">
  722. <Select placeholder="业务内容"
  723. style={{width:'150px',marginRight:'10px'}}
  724. value={this.state.type}
  725. onChange={(e) => { this.setState({ type: e }) }}>
  726. <Select.Option value="0" >服务项目</Select.Option>
  727. <Select.Option value="1" >科技成果</Select.Option>
  728. <Select.Option value="2" >科技需求</Select.Option>
  729. <Select.Option value="3" >专家</Select.Option>
  730. <Select.Option value="4" >活动</Select.Option>
  731. <Select.Option value="5" >政策</Select.Option>
  732. </Select>
  733. <Select placeholder="业务进程"
  734. style={{width:'150px',marginRight:'10px'}}
  735. value={this.state.type}
  736. onChange={(e) => { this.setState({ type: e }) }}>
  737. <Select.Option value="0" >关注</Select.Option>
  738. <Select.Option value="1" >咨询</Select.Option>
  739. <Select.Option value="2" >发起</Select.Option>
  740. <Select.Option value="3" >受理</Select.Option>
  741. <Select.Option value="4" >付款</Select.Option>
  742. </Select>
  743. <Button type="primary" onClick={this.search} style={{marginRight:'10px'}}>搜索</Button>
  744. </div>
  745. <div className="patent-table">
  746. <Spin spinning={this.state.loading}>
  747. <Table columns={this.state.columns}
  748. dataSource={this.state.dataSource}
  749. rowSelection={rowSelection}
  750. pagination={this.state.pagination}
  751. onRowClick={this.tableRowClick} />
  752. </Spin>
  753. </div>
  754. <div className="patent-desc">
  755. <Modal maskClosable={false} visible={this.state.visible}
  756. onOk={this.checkPatentProcess} onCancel={this.handleCancel}
  757. width='600px'
  758. title='新建技淘智推'
  759. footer=''
  760. className="admin-desc-content">
  761. <Form horizontal onSubmit={this.addhandleSubmit} id="add-form">
  762. <Spin spinning={this.state.loading}>
  763. <div className="clearfix">
  764. <FormItem
  765. labelCol={{ span: 4 }}
  766. wrapperCol={{ span: 18 }}
  767. label="推荐内容"
  768. >
  769. <Select placeholder="推荐内容" value={this.state.designatedObject}
  770. onSelect={this.changeObjects} style={{width:'95%'}} required="required">
  771. {
  772. featuredContent.map(function(item) {
  773. return <Select.Option key={item.value} >{item.key}</Select.Option>
  774. })
  775. }
  776. </Select>
  777. <span className="mandatory" style={{color:'red',marginLeft:'5px'}}>*</span>
  778. </FormItem>
  779. </div>
  780. <div className="clearfix">
  781. <FormItem
  782. labelCol={{ span: 4 }}
  783. wrapperCol={{ span: 18 }}
  784. label="指定发送对象"
  785. >
  786. <Select placeholder="指定发送对象" value={this.state.designatedObject}
  787. onSelect={this.changeObjects} style={{width:'95%'}} required="required">
  788. {
  789. designatedObjects.map(function(item) {
  790. return <Select.Option key={item.value} >{item.key}</Select.Option>
  791. })
  792. }
  793. </Select>
  794. <span className="mandatory" style={{color:'red',marginLeft:'5px'}}>*</span>
  795. </FormItem>
  796. </div>
  797. <FormItem wrapperCol={{ span: 12, offset: 7 }}>
  798. <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
  799. <Button className="set-submit" type="ghost" onClick={this.handleCancel} style={{marginLeft:'100px'}}>取消</Button>
  800. </FormItem>
  801. </Spin>
  802. </Form >
  803. </Modal>
  804. </div>
  805. <div className="patent-desc">
  806. <Modal maskClosable={false} visible={this.state.editvisible}
  807. onOk={this.checkPatentProcess} onCancel={this.edithandleCancel}
  808. width='600px'
  809. title='编辑组织'
  810. footer=''
  811. className="admin-desc-content">
  812. <Form horizontal onSubmit={this.edithandleSubmit} id="edit-form">
  813. <Spin spinning={this.state.loading}>
  814. <div className="clearfix">
  815. <FormItem
  816. labelCol={{ span: 7 }}
  817. wrapperCol={{ span: 12 }}
  818. label="组织名称" >
  819. <Input placeholder="组织名称" value={this.state.editName}
  820. onChange={(e)=>{this.setState({editName:e.target.value})}}/>
  821. </FormItem>
  822. </div>
  823. <div className="clearfix">
  824. <FormItem
  825. labelCol={{ span: 7 }}
  826. wrapperCol={{ span: 12}}
  827. label="负责人" >
  828. <Input placeholder="负责人" value={this.state.editManagerId}
  829. onChange={(e)=>{this.setState({editManagerId:e.target.value})}}/>
  830. </FormItem>
  831. </div>
  832. <div className="clearfix">
  833. <FormItem
  834. labelCol={{ span: 7 }}
  835. wrapperCol={{ span: 12 }}
  836. label="组织类型"
  837. >
  838. <Select placeholder="组织类型" value={this.state.editType}
  839. onChange={(e)=>{this.setState({editType:e})}}>
  840. {
  841. patternOrganization.map(function (item) {
  842. return <Select.Option key={item.value} >{item.key}</Select.Option>
  843. })
  844. }
  845. </Select>
  846. </FormItem>
  847. </div>
  848. <div className="clearfix">
  849. <FormItem
  850. labelCol={{ span: 7 }}
  851. wrapperCol={{ span: 12 }}
  852. label="组织状态"
  853. >
  854. <Select placeholder="组织状态" value={this.state.editStatus}
  855. onChange={(e)=>{this.setState({editStatus:e})}}>
  856. {
  857. conditionOrganization.map(function (item) {
  858. return <Select.Option key={item.value} >{item.key}</Select.Option>
  859. })
  860. }
  861. </Select>
  862. </FormItem>
  863. </div>
  864. <div className="clearfix">
  865. <FormItem
  866. labelCol={{ span: 7 }}
  867. wrapperCol={{ span: 12 }}
  868. label="上级组织"
  869. >
  870. <Select placeholder="请选择上级组织" value={this.state.editSuperId} onChange={(e)=>{this.setState({editSuperId:e})}}
  871. notFoundContent="未获取到上级组织列表">
  872. {this.state.contactsOption}
  873. </Select>
  874. </FormItem>
  875. </div>
  876. <div className="clearfix">
  877. <FormItem
  878. labelCol={{ span: 7 }}
  879. wrapperCol={{ span: 12 }}
  880. label="组织编号"
  881. >
  882. <span>{this.state.editDepNo}</span>
  883. </FormItem>
  884. </div>
  885. <div className="clearfix" >
  886. <FormItem
  887. labelCol={{ span: 7 }}
  888. wrapperCol={{ span: 12 }}
  889. label="创建人"
  890. >
  891. <span>{this.state.editCreateId}</span>
  892. </FormItem>
  893. </div>
  894. <div className="clearfix">
  895. <FormItem
  896. labelCol={{ span: 7 }}
  897. wrapperCol={{ span: 12 }}
  898. label="创建时间"
  899. >
  900. <span>{this.state.editTime}</span>
  901. </FormItem>
  902. </div>
  903. <div className="clearfix">
  904. <FormItem
  905. labelCol={{ span: 7 }}
  906. wrapperCol={{ span: 12 }}
  907. label="组织职能说明" >
  908. <Input type="textarea" rows={4} placeholder="组织职能说明" value={this.state.editRemarks}
  909. onChange={(e) => { this.setState({ editRemarks: e.target.value }) }}/>
  910. </FormItem>
  911. </div>
  912. <FormItem wrapperCol={{ span: 12, offset: 7 }}>
  913. <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
  914. <Button className="set-submit" type="ghost" onClick={this.edithandleCancel} style={{marginLeft:'100px'}}>取消</Button>
  915. </FormItem>
  916. </Spin>
  917. </Form >
  918. </Modal>
  919. </div>
  920. <div className="patent-desc">
  921. <Modal maskClosable={false} visible={this.state.visible1}
  922. onOk={this.checkPatentProcess} onCancel={this.handleCancel1}
  923. width='1200px'
  924. title='散户列表'
  925. footer=''
  926. className="admin-desc-content">
  927. <Form horizontal onSubmit={this.addhandleSubmit} id="add-form">
  928. <Spin spinning={this.state.loading}>
  929. <div className="user-search">
  930. <Input placeholder="客户名称" style={{width:'150px',marginRight:'10px',marginBottom:'10px'}}
  931. value={this.state.name}
  932. onChange={(e) => { this.setState({ name: e.target.value }); }} />
  933. <Input placeholder="所属人" style={{width:'150px',marginRight:'10px'}}
  934. value={this.state.depNo}
  935. onChange={(e) => { this.setState({ depNo: e.target.value }); }} />
  936. <Select placeholder="上级组织"
  937. style={{ width:'150px',marginRight:'10px' }}
  938. value={this.state.superId}
  939. onChange={(e) => { this.setState({ superId: e }) }} notFoundContent="未获取到上级组织列表">
  940. {this.state.contactsOption}
  941. </Select>
  942. <Select placeholder="所属行业"
  943. style={{ width:'150px',marginRight:'10px' }}
  944. value={this.state.superId}
  945. onChange={(e) => { this.setState({ superId: e }) }} notFoundContent="未获取到上级组织列表">
  946. {this.state.contactsOption}
  947. </Select>
  948. <Select placeholder="社会性质"
  949. style={{ width:'150px',marginRight:'10px' }}
  950. value={this.state.superId}
  951. onChange={(e) => { this.setState({ superId: e }) }} notFoundContent="未获取到上级组织列表">
  952. {this.state.contactsOption}
  953. </Select>
  954. <Select placeholder="是否上市"
  955. style={{width:'150px',marginRight:'10px'}}
  956. value={this.state.type}
  957. onChange={(e) => { this.setState({ type: e }) }}>
  958. <Select.Option value="0" >已上市</Select.Option>
  959. <Select.Option value="1" >未上市</Select.Option>
  960. </Select>
  961. <Select placeholder="是否国际"
  962. style={{width:'150px',marginRight:'10px'}}
  963. value={this.state.type}
  964. onChange={(e) => { this.setState({ type: e }) }}>
  965. <Select.Option value="0" >国际</Select.Option>
  966. <Select.Option value="1" >国内</Select.Option>
  967. </Select>
  968. <Select placeholder="是否实名认证"
  969. style={{width:'150px',marginRight:'10px'}}
  970. value={this.state.type}
  971. onChange={(e) => { this.setState({ type: e }) }}>
  972. <Select.Option value="0" >已实名认证</Select.Option>
  973. <Select.Option value="1" >未实名认证</Select.Option>
  974. </Select>
  975. <span style={{marginRight:'10px',width:'150px',display:'inline-block'}}>
  976. <Cascader options={provinceSelect()} style={{marginRight:'10px',width:'150px',display:'inlineBlock'}} value={this.state.ressSearch} placeholder="选择省份"
  977. onChange={(e,pre) => { this.setState({ ressSearch: e }) }} />
  978. </span>
  979. <span style={{marginRight:'10px',width:'150px',display:'inline-block'}}>
  980. <Cascader options={citySelect()} style={{marginRight:'10px',width:'150px',display:'inlineBlock'}} value={this.state.ressSearch} placeholder="选择城市"
  981. onChange={(e,pre) => { this.setState({ ressSearch: e }) }} />
  982. </span>
  983. <span style={{marginRight:'10px',width:'150px',display:'inline-block',marginBottom:'10px'}}>
  984. <Cascader options={areaSelect()} style={{marginRight:'10px',width:'150px',display:'inlineBlock'}} value={this.state.ressSearch} placeholder="选择地区"
  985. onChange={(e,pre) => { this.setState({ ressSearch: e }) }} />
  986. </span>
  987. <Button type="primary" onClick={this.search} style={{marginRight:'10px'}}>搜索</Button>
  988. <Button onClick={this.reset} style={{marginRight:'10px'}}>重置</Button>
  989. </div>
  990. <div className="foster-table">
  991. <Spin spinning={this.state.loading}>
  992. <Table columns={this.state.columns1}
  993. dataSource={this.state.dataSource}
  994. rowSelection={rowSelections}
  995. pagination={this.state.pagination1}
  996. onRowClick={this.tableRowClick} />
  997. </Spin>
  998. </div>
  999. <FormItem wrapperCol={{ span: 12, offset: 7 }}>
  1000. <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
  1001. <Button className="set-submit" type="ghost" onClick={this.handleCancel1} style={{marginLeft:'100px'}}>取消</Button>
  1002. </FormItem>
  1003. </Spin>
  1004. </Form >
  1005. </Modal>
  1006. </div>
  1007. <div className="patent-desc">
  1008. <Modal maskClosable={false} visible={this.state.visible2}
  1009. onOk={this.checkPatentProcess} onCancel={this.handleCancel2}
  1010. width='600px'
  1011. title='社会属性'
  1012. footer=''
  1013. className="admin-desc-content">
  1014. <Form horizontal onSubmit={this.addhandleSubmit} id="add-form">
  1015. <Spin spinning={this.state.loading}>
  1016. <FormItem
  1017. labelCol={{ span: 7 }}
  1018. wrapperCol={{ span: 12 }}
  1019. label="请选择社会属性"
  1020. >
  1021. <div value={this.state.editStatus}
  1022. onChange={(e)=>{this.setState({editStatus:e})}}>
  1023. {
  1024. socialAttribute.map(function (item) {
  1025. return <Checkbox key={item.value} >{item.key}</Checkbox>
  1026. })
  1027. }
  1028. </div>
  1029. </FormItem>
  1030. <FormItem wrapperCol={{ span: 12, offset: 7 }}>
  1031. <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
  1032. <Button className="set-submit" type="ghost" onClick={this.handleCancel2} style={{marginLeft:'100px'}}>取消</Button>
  1033. </FormItem>
  1034. </Spin>
  1035. </Form >
  1036. </Modal>
  1037. </div>
  1038. <div className="patent-desc">
  1039. <Modal maskClosable={false} visible={this.state.visible3}
  1040. onOk={this.checkPatentProcess} onCancel={this.handleCancel3}
  1041. width='1200px'
  1042. title='分公司列表'
  1043. footer=''
  1044. className="admin-desc-content">
  1045. <Form horizontal onSubmit={this.addhandleSubmit} id="add-form">
  1046. <Spin spinning={this.state.loading}>
  1047. <div className="foster-table">
  1048. <Spin spinning={this.state.loading}>
  1049. <Table columns={this.state.columns1}
  1050. dataSource={this.state.dataSource}
  1051. rowSelection={rowSelections}
  1052. pagination={this.state.pagination1}
  1053. onRowClick={this.tableRowClick} />
  1054. </Spin>
  1055. </div>
  1056. <FormItem wrapperCol={{ span: 12, offset: 7 }}>
  1057. <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
  1058. <Button className="set-submit" type="ghost" onClick={this.handleCancel3} style={{marginLeft:'100px'}}>取消</Button>
  1059. </FormItem>
  1060. </Spin>
  1061. </Form >
  1062. </Modal>
  1063. </div>
  1064. <div className="patent-desc">
  1065. <Modal maskClosable={false} visible={this.state.visible4}
  1066. onOk={this.checkPatentProcess} onCancel={this.handleCancel4}
  1067. width='600px'
  1068. title='地区'
  1069. footer=''
  1070. className="admin-desc-content">
  1071. <Form horizontal onSubmit={this.addhandleSubmit} id="add-form">
  1072. <Spin spinning={this.state.loading}>
  1073. <div className="clearfix" style={{marginLeft:'90px'}}>
  1074. <Tree
  1075. checkable
  1076. onExpand={this.onExpand}
  1077. expandedKeys={this.state.expandedKeys}
  1078. autoExpandParent={this.state.autoExpandParent}
  1079. onCheck={this.onCheck}
  1080. checkedKeys={this.state.checkedKeys}
  1081. onSelect={this.onSelect}
  1082. selectedKeys={this.state.selectedKeys}
  1083. >
  1084. {this.renderTreeNodes(this.state.Interface)}
  1085. </Tree>
  1086. </div>
  1087. <FormItem wrapperCol={{ span: 12, offset: 7 }}>
  1088. <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
  1089. <Button className="set-submit" type="ghost" onClick={this.handleCancel4} style={{marginLeft:'100px'}}>取消</Button>
  1090. </FormItem>
  1091. </Spin>
  1092. </Form >
  1093. </Modal>
  1094. </div>
  1095. <div className="patent-desc">
  1096. <Modal maskClosable={false} visible={this.state.visible5}
  1097. onOk={this.checkPatentProcess} onCancel={this.handleCancel5}
  1098. width='600px'
  1099. title='行业'
  1100. footer=''
  1101. className="admin-desc-content">
  1102. <Form horizontal onSubmit={this.addhandleSubmit} id="add-form">
  1103. <Spin spinning={this.state.loading}>
  1104. <FormItem
  1105. labelCol={{ span: 7 }}
  1106. wrapperCol={{ span: 12 }}
  1107. label="请选择行业"
  1108. >
  1109. <div value={this.state.editStatus}
  1110. onChange={(e)=>{this.setState({editStatus:e})}}>
  1111. {
  1112. industry.map(function (item) {
  1113. return <Checkbox key={item.value} >{item.key}</Checkbox>
  1114. })
  1115. }
  1116. </div>
  1117. </FormItem>
  1118. <FormItem wrapperCol={{ span: 12, offset: 7 }}>
  1119. <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
  1120. <Button className="set-submit" type="ghost" onClick={this.handleCancel5} style={{marginLeft:'100px'}}>取消</Button>
  1121. </FormItem>
  1122. </Spin>
  1123. </Form >
  1124. </Modal>
  1125. </div>
  1126. </div>
  1127. </div>
  1128. );
  1129. }
  1130. }));
  1131. export default RemindMessage;