remindMessage.jsx 48 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152
  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.data;
  378. if(data.error.length === 0){
  379. theArr.push({
  380. editId: thisdata.id,//每一条记录的ID
  381. editName:thisdata.name,//组织名称
  382. editManagerId:thisdata.managerId,//负责人
  383. editType:thisdata.type,//组织类型
  384. editStatus:thisdata.status,//组织状态
  385. editSuperId:thisdata.superId,//上级组织
  386. editDepNo: thisdata.depNo,//组织编号
  387. editCreateId:thisdata.createId,//创建人
  388. editTime:thisdata.createTime,//创建时间
  389. editRemarks:thisdata.remarks,//组织职能说明
  390. });
  391. this.setState({
  392. editId: thisdata.id,//每一条记录的ID
  393. editName:thisdata.name,//组织名称
  394. editManagerId:thisdata.managerId,//负责人
  395. editType:thisdata.type,//组织类型
  396. editStatus:thisdata.status,//组织状态
  397. editSuperId:thisdata.superId,//上级组织
  398. editDepNo: thisdata.depNo,//组织编号
  399. editCreateId:thisdata.createId,//创建人
  400. editTime:thisdata.createTime,//创建时间
  401. editRemarks: thisdata.remarks,//组织职能说明
  402. editDataSource: theArr,
  403. });
  404. }else{
  405. message.warning(data.error[0].message);
  406. }
  407. }.bind(this),
  408. }).always(function () {
  409. this.setState({
  410. loading: false
  411. });
  412. }.bind(this));
  413. },
  414. //整行删除
  415. delectRow() {
  416. let deletedIds ='';
  417. for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
  418. let rowItem = this.state.selectedRows[idx];
  419. if (rowItem.id) {
  420. deletedIds=rowItem.id;
  421. };
  422. };
  423. this.setState({
  424. selectedRowKeys: [],
  425. loading: deletedIds.length > 0
  426. });
  427. $.ajax({
  428. method: "POST",
  429. dataType: "json",
  430. crossDomain: false,
  431. url: globalConfig.context + "/api/admin/organization/deleteById",
  432. data: {
  433. id: deletedIds
  434. }
  435. }).done(function (data) {
  436. if (!data.error.length) {
  437. message.success('删除成功!');
  438. this.setState({
  439. loading: false,
  440. });
  441. } else {
  442. message.warning(data.error[0].message);
  443. };
  444. this.selectSuperId();
  445. }.bind(this));
  446. },
  447. //新增一个部门,保存
  448. addhandleSubmit(e){
  449. e.preventDefault();
  450. if(!this.state.theTypes){
  451. message.warning('请输入负责人姓名');
  452. return false;
  453. }
  454. if(!this.state.typeOrganization){
  455. message.warning('请选择组织类型');
  456. return false;
  457. }
  458. if(!this.state.upOrganization){
  459. message.warning('请选择上级组织');
  460. return false;
  461. }
  462. this.props.form.validateFields((err, values) => {
  463. if (!err) {
  464. this.setState({
  465. loading: true
  466. });
  467. //上级组织字典
  468. let nameText=this.state.SuperArr
  469. let superText=nameText[parseInt(this.state.upOrganization)].name
  470. $.ajax({
  471. method: "post",
  472. dataType: "json",
  473. crossDomain: false,
  474. url:globalConfig.context + '/api/admin/organization/addOrganization',
  475. data:{
  476. name:this.state.nameOrganization,//组织名称
  477. managerId:this.state.theTypes,//负责人ID
  478. type:this.state.typeOrganization, //组织类型
  479. superId:superText,//上级组织
  480. remarks:this.state.remarksOrganization,//组织职能说明
  481. }
  482. }).done(function (data) {
  483. this.setState({
  484. loading: false
  485. });
  486. if (!data.error.length) {
  487. message.success('保存成功!');
  488. this.handleCancel();
  489. this.selectSuperId();
  490. } else {
  491. message.warning(data.error[0].message);
  492. }
  493. }.bind(this));
  494. }
  495. });
  496. },
  497. //主管初始加载(自动补全)
  498. supervisor(e){
  499. $.ajax({
  500. method: "post",
  501. dataType: "json",
  502. crossDomain: false,
  503. url: globalConfig.context + "/api/admin/organization/selectName",
  504. data:{
  505. name:e
  506. },
  507. success: function (data) {
  508. let thedata=data.data;
  509. if (!thedata) {
  510. if (data.error && data.error.length) {
  511. message.warning(data.error[0].message);
  512. };
  513. thedata = {};
  514. };
  515. this.setState({
  516. customerArr:thedata,
  517. });
  518. }.bind(this),
  519. }).always(function () {
  520. this.setState({
  521. loading: false
  522. });
  523. }.bind(this));
  524. },
  525. //上级主管输入框失去焦点是判断客户是否存在
  526. selectAuto(value,options){
  527. this.setState({
  528. managerIdOrganization:value
  529. })
  530. },
  531. //失去焦点时
  532. blurChange(e){
  533. this.setState({
  534. theTypes:e
  535. })
  536. },
  537. //详情tab切换数据处理
  538. callback(e) {
  539. this.setState({
  540. callnub: e,
  541. })
  542. if(e == 1) {
  543. this.loadData();
  544. }
  545. if(e == 2) {
  546. }
  547. },
  548. //切换创建系统消息中的指定发送对象
  549. changeObjects(e) {
  550. this.setState({
  551. designatedObject:e
  552. })
  553. if(e == 0) {
  554. this.setState({ visible1: true })
  555. }
  556. if(e == 1) {
  557. this.setState({ visible2: true })
  558. }
  559. if(e == 2) {
  560. this.setState({ visible3: true })
  561. }
  562. if(e == 3) {
  563. this.setState({ visible4: true })
  564. }
  565. if(e == 4) {
  566. this.setState({ visible5: true })
  567. }
  568. if(e == 5) {
  569. this.setState({ visible6: true })
  570. }
  571. },
  572. //值改变时请求客户名称
  573. httpChange(e){
  574. if(e.length>=2){
  575. this.supervisor(e);
  576. }
  577. this.setState({
  578. managerIdOrganization:e
  579. })
  580. },
  581. addClick() {
  582. this.state.nameOrganization='';//组织名称清零
  583. this.state.managerIdOrganization= '';//负责人ID清零
  584. this.state.typeOrganization= undefined; //组织类型清零
  585. this.state.upOrganization= undefined;//上级组织清零
  586. this.state.remarksOrganization= '';//组织职能说明清零
  587. this.state.RowData = {};
  588. this.setState({
  589. visible: true
  590. });
  591. this.selectSuperId();
  592. },
  593. editClick() {
  594. this.state.RowData = {};
  595. this.setState({
  596. editvisible: true
  597. });
  598. },
  599. handleCancel() {
  600. this.setState({ visible: false })
  601. },
  602. handleCancel1() {
  603. this.setState({ visible1: false })
  604. },
  605. handleCancel2() {
  606. this.setState({ visible2: false })
  607. },
  608. handleCancel3() {
  609. this.setState({ visible3: false })
  610. },
  611. handleCancel4() {
  612. this.setState({ visible4: false })
  613. },
  614. handleCancel5() {
  615. this.setState({ visible5: false })
  616. },
  617. handleCancel6() {
  618. this.setState({ visible6: false })
  619. },
  620. edithandleCancel() {
  621. this.setState({ editvisible: false })
  622. },
  623. //地区多选
  624. onExpand(expandedKeys){
  625. this.setState({
  626. expandedKeys,
  627. autoExpandParent: false,
  628. });
  629. },
  630. onCheck(checkedKeys){
  631. this.setState({checkedKeys:checkedKeys });
  632. },
  633. onSelect(selectedKeys, info){
  634. this.setState({ selectedKeys });
  635. },
  636. renderTreeNodes(data){
  637. return provinceList.map((item) => {
  638. return(
  639. <TreeNodet title={item.name} key={item.id} dataRef={item}>
  640. {item.cityList.map((item) => {
  641. return(
  642. <TreeNodet title={item.name} key={item.id} dataRef={item}>
  643. {item.areaList.map((item) => {
  644. return(
  645. <TreeNodet title={item.name} key={item.id} dataRef={item}>
  646. </TreeNodet>
  647. );
  648. })
  649. }
  650. </TreeNodet>
  651. );
  652. })
  653. }
  654. </TreeNodet>
  655. );
  656. return <TreeNodet {...item} />;
  657. });
  658. },
  659. search() {
  660. this.loadData();
  661. },
  662. //把搜索的部分置零
  663. reset() {
  664. this.state.superId = undefined;//上级组织清零
  665. this.state.name = '';//组织名称清零
  666. this.state.type = undefined;//组织类型清零
  667. this.state.depNo = '';//组织编号清零
  668. this.loadData();
  669. },
  670. searchSwitch() {
  671. this.setState({
  672. searchMore: !this.state.searchMore
  673. });
  674. },
  675. render() {
  676. const FormItem = Form.Item
  677. const rowSelection = {
  678. selectedRowKeys: this.state.selectedRowKeys,
  679. onChange: (selectedRowKeys, selectedRows) => {
  680. this.setState({
  681. selectedRows: selectedRows.slice(-1),
  682. selectedRowKeys: selectedRowKeys.slice(-1)
  683. });
  684. },
  685. onSelect: (recordt, selected, selectedRows) => {
  686. this.setState({
  687. recordt:recordt.id
  688. })
  689. },
  690. };
  691. const rowSelections = {
  692. selectedRowKeys: this.state.selectedRowKeys,
  693. onChange: (selectedRowKeys, selectedRows) => {
  694. this.setState({
  695. selectedRows: selectedRows,
  696. selectedRowKeys: selectedRowKeys
  697. });
  698. },
  699. onSelect: (recordt, selected, selectedRows) => {
  700. this.setState({
  701. recordt:recordt.id
  702. })
  703. },
  704. };
  705. const formItemLayout = {
  706. labelCol: { span: 8 },
  707. wrapperCol: { span: 14 },
  708. };
  709. const { getFieldDecorator } = this.props.form;
  710. const hasSelected = this.state.selectedRowKeys.length > 0;
  711. const { RangePicker } = DatePicker;
  712. const dataSources=this.state.customerArr || [];
  713. const options = dataSources.map((group,index) =>
  714. <Option key={index} value={group.name}>{group.name}</Option>
  715. )
  716. return (
  717. <div className="user-content" >
  718. <div className="content-title">
  719. <div className="user-search">
  720. <Select placeholder="业务内容"
  721. style={{width:'150px',marginRight:'10px'}}
  722. value={this.state.type}
  723. onChange={(e) => { this.setState({ type: e }) }}>
  724. <Select.Option value="0" >服务项目</Select.Option>
  725. <Select.Option value="1" >科技成果</Select.Option>
  726. <Select.Option value="2" >科技需求</Select.Option>
  727. <Select.Option value="3" >专家</Select.Option>
  728. <Select.Option value="4" >活动</Select.Option>
  729. <Select.Option value="5" >政策</Select.Option>
  730. </Select>
  731. <Select placeholder="业务进程"
  732. style={{width:'150px',marginRight:'10px'}}
  733. value={this.state.type}
  734. onChange={(e) => { this.setState({ type: e }) }}>
  735. <Select.Option value="0" >关注</Select.Option>
  736. <Select.Option value="1" >咨询</Select.Option>
  737. <Select.Option value="2" >发起</Select.Option>
  738. <Select.Option value="3" >受理</Select.Option>
  739. <Select.Option value="4" >付款</Select.Option>
  740. </Select>
  741. <Button type="primary" onClick={this.search} style={{marginRight:'10px'}}>搜索</Button>
  742. </div>
  743. <div className="patent-table">
  744. <Spin spinning={this.state.loading}>
  745. <Table columns={this.state.columns}
  746. dataSource={this.state.dataSource}
  747. rowSelection={rowSelection}
  748. pagination={this.state.pagination}
  749. onRowClick={this.tableRowClick} />
  750. </Spin>
  751. </div>
  752. <div className="patent-desc">
  753. <Modal maskClosable={false} visible={this.state.visible}
  754. onOk={this.checkPatentProcess} onCancel={this.handleCancel}
  755. width='600px'
  756. title='新建技淘智推'
  757. footer=''
  758. className="admin-desc-content">
  759. <Form horizontal onSubmit={this.addhandleSubmit} id="add-form">
  760. <Spin spinning={this.state.loading}>
  761. <div className="clearfix">
  762. <FormItem
  763. labelCol={{ span: 4 }}
  764. wrapperCol={{ span: 18 }}
  765. label="推荐内容"
  766. >
  767. <Select placeholder="推荐内容" value={this.state.designatedObject}
  768. onSelect={this.changeObjects} style={{width:'95%'}} required="required">
  769. {
  770. featuredContent.map(function(item) {
  771. return <Select.Option key={item.value} >{item.key}</Select.Option>
  772. })
  773. }
  774. </Select>
  775. <span className="mandatory" style={{color:'red',marginLeft:'5px'}}>*</span>
  776. </FormItem>
  777. </div>
  778. <div className="clearfix">
  779. <FormItem
  780. labelCol={{ span: 4 }}
  781. wrapperCol={{ span: 18 }}
  782. label="指定发送对象"
  783. >
  784. <Select placeholder="指定发送对象" value={this.state.designatedObject}
  785. onSelect={this.changeObjects} style={{width:'95%'}} required="required">
  786. {
  787. designatedObjects.map(function(item) {
  788. return <Select.Option key={item.value} >{item.key}</Select.Option>
  789. })
  790. }
  791. </Select>
  792. <span className="mandatory" style={{color:'red',marginLeft:'5px'}}>*</span>
  793. </FormItem>
  794. </div>
  795. <FormItem wrapperCol={{ span: 12, offset: 7 }}>
  796. <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
  797. <Button className="set-submit" type="ghost" onClick={this.handleCancel} style={{marginLeft:'100px'}}>取消</Button>
  798. </FormItem>
  799. </Spin>
  800. </Form >
  801. </Modal>
  802. </div>
  803. <div className="patent-desc">
  804. <Modal maskClosable={false} visible={this.state.editvisible}
  805. onOk={this.checkPatentProcess} onCancel={this.edithandleCancel}
  806. width='600px'
  807. title='编辑组织'
  808. footer=''
  809. className="admin-desc-content">
  810. <Form horizontal onSubmit={this.edithandleSubmit} id="edit-form">
  811. <Spin spinning={this.state.loading}>
  812. <div className="clearfix">
  813. <FormItem
  814. labelCol={{ span: 7 }}
  815. wrapperCol={{ span: 12 }}
  816. label="组织名称" >
  817. <Input placeholder="组织名称" value={this.state.editName}
  818. onChange={(e)=>{this.setState({editName:e.target.value})}}/>
  819. </FormItem>
  820. </div>
  821. <div className="clearfix">
  822. <FormItem
  823. labelCol={{ span: 7 }}
  824. wrapperCol={{ span: 12}}
  825. label="负责人" >
  826. <Input placeholder="负责人" value={this.state.editManagerId}
  827. onChange={(e)=>{this.setState({editManagerId:e.target.value})}}/>
  828. </FormItem>
  829. </div>
  830. <div className="clearfix">
  831. <FormItem
  832. labelCol={{ span: 7 }}
  833. wrapperCol={{ span: 12 }}
  834. label="组织类型"
  835. >
  836. <Select placeholder="组织类型" value={this.state.editType}
  837. onChange={(e)=>{this.setState({editType:e})}}>
  838. {
  839. patternOrganization.map(function (item) {
  840. return <Select.Option key={item.value} >{item.key}</Select.Option>
  841. })
  842. }
  843. </Select>
  844. </FormItem>
  845. </div>
  846. <div className="clearfix">
  847. <FormItem
  848. labelCol={{ span: 7 }}
  849. wrapperCol={{ span: 12 }}
  850. label="组织状态"
  851. >
  852. <Select placeholder="组织状态" value={this.state.editStatus}
  853. onChange={(e)=>{this.setState({editStatus:e})}}>
  854. {
  855. conditionOrganization.map(function (item) {
  856. return <Select.Option key={item.value} >{item.key}</Select.Option>
  857. })
  858. }
  859. </Select>
  860. </FormItem>
  861. </div>
  862. <div className="clearfix">
  863. <FormItem
  864. labelCol={{ span: 7 }}
  865. wrapperCol={{ span: 12 }}
  866. label="上级组织"
  867. >
  868. <Select placeholder="请选择上级组织" value={this.state.editSuperId} onChange={(e)=>{this.setState({editSuperId:e})}}
  869. notFoundContent="未获取到上级组织列表">
  870. {this.state.contactsOption}
  871. </Select>
  872. </FormItem>
  873. </div>
  874. <div className="clearfix">
  875. <FormItem
  876. labelCol={{ span: 7 }}
  877. wrapperCol={{ span: 12 }}
  878. label="组织编号"
  879. >
  880. <span>{this.state.editDepNo}</span>
  881. </FormItem>
  882. </div>
  883. <div className="clearfix" >
  884. <FormItem
  885. labelCol={{ span: 7 }}
  886. wrapperCol={{ span: 12 }}
  887. label="创建人"
  888. >
  889. <span>{this.state.editCreateId}</span>
  890. </FormItem>
  891. </div>
  892. <div className="clearfix">
  893. <FormItem
  894. labelCol={{ span: 7 }}
  895. wrapperCol={{ span: 12 }}
  896. label="创建时间"
  897. >
  898. <span>{this.state.editTime}</span>
  899. </FormItem>
  900. </div>
  901. <div className="clearfix">
  902. <FormItem
  903. labelCol={{ span: 7 }}
  904. wrapperCol={{ span: 12 }}
  905. label="组织职能说明" >
  906. <Input type="textarea" rows={4} placeholder="组织职能说明" value={this.state.editRemarks}
  907. onChange={(e) => { this.setState({ editRemarks: e.target.value }) }}/>
  908. </FormItem>
  909. </div>
  910. <FormItem wrapperCol={{ span: 12, offset: 7 }}>
  911. <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
  912. <Button className="set-submit" type="ghost" onClick={this.edithandleCancel} style={{marginLeft:'100px'}}>取消</Button>
  913. </FormItem>
  914. </Spin>
  915. </Form >
  916. </Modal>
  917. </div>
  918. <div className="patent-desc">
  919. <Modal maskClosable={false} visible={this.state.visible1}
  920. onOk={this.checkPatentProcess} onCancel={this.handleCancel1}
  921. width='1200px'
  922. title='散户列表'
  923. footer=''
  924. className="admin-desc-content">
  925. <Form horizontal onSubmit={this.addhandleSubmit} id="add-form">
  926. <Spin spinning={this.state.loading}>
  927. <div className="user-search">
  928. <Input placeholder="客户名称" style={{width:'150px',marginRight:'10px',marginBottom:'10px'}}
  929. value={this.state.name}
  930. onChange={(e) => { this.setState({ name: e.target.value }); }} />
  931. <Input placeholder="所属人" style={{width:'150px',marginRight:'10px'}}
  932. value={this.state.depNo}
  933. onChange={(e) => { this.setState({ depNo: e.target.value }); }} />
  934. <Select placeholder="上级组织"
  935. style={{ width:'150px',marginRight:'10px' }}
  936. value={this.state.superId}
  937. onChange={(e) => { this.setState({ superId: e }) }} notFoundContent="未获取到上级组织列表">
  938. {this.state.contactsOption}
  939. </Select>
  940. <Select placeholder="所属行业"
  941. style={{ width:'150px',marginRight:'10px' }}
  942. value={this.state.superId}
  943. onChange={(e) => { this.setState({ superId: e }) }} notFoundContent="未获取到上级组织列表">
  944. {this.state.contactsOption}
  945. </Select>
  946. <Select placeholder="社会性质"
  947. style={{ width:'150px',marginRight:'10px' }}
  948. value={this.state.superId}
  949. onChange={(e) => { this.setState({ superId: e }) }} notFoundContent="未获取到上级组织列表">
  950. {this.state.contactsOption}
  951. </Select>
  952. <Select placeholder="是否上市"
  953. style={{width:'150px',marginRight:'10px'}}
  954. value={this.state.type}
  955. onChange={(e) => { this.setState({ type: e }) }}>
  956. <Select.Option value="0" >已上市</Select.Option>
  957. <Select.Option value="1" >未上市</Select.Option>
  958. </Select>
  959. <Select placeholder="是否国际"
  960. style={{width:'150px',marginRight:'10px'}}
  961. value={this.state.type}
  962. onChange={(e) => { this.setState({ type: e }) }}>
  963. <Select.Option value="0" >国际</Select.Option>
  964. <Select.Option value="1" >国内</Select.Option>
  965. </Select>
  966. <Select placeholder="是否实名认证"
  967. style={{width:'150px',marginRight:'10px'}}
  968. value={this.state.type}
  969. onChange={(e) => { this.setState({ type: e }) }}>
  970. <Select.Option value="0" >已实名认证</Select.Option>
  971. <Select.Option value="1" >未实名认证</Select.Option>
  972. </Select>
  973. <span style={{marginRight:'10px',width:'150px',display:'inline-block'}}>
  974. <Cascader options={provinceSelect()} style={{marginRight:'10px',width:'150px',display:'inlineBlock'}} value={this.state.ressSearch} placeholder="选择省份"
  975. onChange={(e,pre) => { this.setState({ ressSearch: e }) }} />
  976. </span>
  977. <span style={{marginRight:'10px',width:'150px',display:'inline-block'}}>
  978. <Cascader options={citySelect()} style={{marginRight:'10px',width:'150px',display:'inlineBlock'}} value={this.state.ressSearch} placeholder="选择城市"
  979. onChange={(e,pre) => { this.setState({ ressSearch: e }) }} />
  980. </span>
  981. <span style={{marginRight:'10px',width:'150px',display:'inline-block',marginBottom:'10px'}}>
  982. <Cascader options={areaSelect()} style={{marginRight:'10px',width:'150px',display:'inlineBlock'}} value={this.state.ressSearch} placeholder="选择地区"
  983. onChange={(e,pre) => { this.setState({ ressSearch: e }) }} />
  984. </span>
  985. <Button type="primary" onClick={this.search} style={{marginRight:'10px'}}>搜索</Button>
  986. <Button onClick={this.reset} style={{marginRight:'10px'}}>重置</Button>
  987. </div>
  988. <div className="foster-table">
  989. <Spin spinning={this.state.loading}>
  990. <Table columns={this.state.columns1}
  991. dataSource={this.state.dataSource}
  992. rowSelection={rowSelections}
  993. pagination={this.state.pagination1}
  994. onRowClick={this.tableRowClick} />
  995. </Spin>
  996. </div>
  997. <FormItem wrapperCol={{ span: 12, offset: 7 }}>
  998. <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
  999. <Button className="set-submit" type="ghost" onClick={this.handleCancel1} style={{marginLeft:'100px'}}>取消</Button>
  1000. </FormItem>
  1001. </Spin>
  1002. </Form >
  1003. </Modal>
  1004. </div>
  1005. <div className="patent-desc">
  1006. <Modal maskClosable={false} visible={this.state.visible2}
  1007. onOk={this.checkPatentProcess} onCancel={this.handleCancel2}
  1008. width='600px'
  1009. title='社会属性'
  1010. footer=''
  1011. className="admin-desc-content">
  1012. <Form horizontal onSubmit={this.addhandleSubmit} id="add-form">
  1013. <Spin spinning={this.state.loading}>
  1014. <FormItem
  1015. labelCol={{ span: 7 }}
  1016. wrapperCol={{ span: 12 }}
  1017. label="请选择社会属性"
  1018. >
  1019. <div value={this.state.editStatus}
  1020. onChange={(e)=>{this.setState({editStatus:e})}}>
  1021. {
  1022. socialAttribute.map(function (item) {
  1023. return <Checkbox key={item.value} >{item.key}</Checkbox>
  1024. })
  1025. }
  1026. </div>
  1027. </FormItem>
  1028. <FormItem wrapperCol={{ span: 12, offset: 7 }}>
  1029. <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
  1030. <Button className="set-submit" type="ghost" onClick={this.handleCancel2} style={{marginLeft:'100px'}}>取消</Button>
  1031. </FormItem>
  1032. </Spin>
  1033. </Form >
  1034. </Modal>
  1035. </div>
  1036. <div className="patent-desc">
  1037. <Modal maskClosable={false} visible={this.state.visible3}
  1038. onOk={this.checkPatentProcess} onCancel={this.handleCancel3}
  1039. width='1200px'
  1040. title='分公司列表'
  1041. footer=''
  1042. className="admin-desc-content">
  1043. <Form horizontal onSubmit={this.addhandleSubmit} id="add-form">
  1044. <Spin spinning={this.state.loading}>
  1045. <div className="foster-table">
  1046. <Spin spinning={this.state.loading}>
  1047. <Table columns={this.state.columns1}
  1048. dataSource={this.state.dataSource}
  1049. rowSelection={rowSelections}
  1050. pagination={this.state.pagination1}
  1051. onRowClick={this.tableRowClick} />
  1052. </Spin>
  1053. </div>
  1054. <FormItem wrapperCol={{ span: 12, offset: 7 }}>
  1055. <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
  1056. <Button className="set-submit" type="ghost" onClick={this.handleCancel3} style={{marginLeft:'100px'}}>取消</Button>
  1057. </FormItem>
  1058. </Spin>
  1059. </Form >
  1060. </Modal>
  1061. </div>
  1062. <div className="patent-desc">
  1063. <Modal maskClosable={false} visible={this.state.visible4}
  1064. onOk={this.checkPatentProcess} onCancel={this.handleCancel4}
  1065. width='600px'
  1066. title='地区'
  1067. footer=''
  1068. className="admin-desc-content">
  1069. <Form horizontal onSubmit={this.addhandleSubmit} id="add-form">
  1070. <Spin spinning={this.state.loading}>
  1071. <div className="clearfix" style={{marginLeft:'90px'}}>
  1072. <Tree
  1073. checkable
  1074. onExpand={this.onExpand}
  1075. expandedKeys={this.state.expandedKeys}
  1076. autoExpandParent={this.state.autoExpandParent}
  1077. onCheck={this.onCheck}
  1078. checkedKeys={this.state.checkedKeys}
  1079. onSelect={this.onSelect}
  1080. selectedKeys={this.state.selectedKeys}
  1081. >
  1082. {this.renderTreeNodes(this.state.Interface)}
  1083. </Tree>
  1084. </div>
  1085. <FormItem wrapperCol={{ span: 12, offset: 7 }}>
  1086. <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
  1087. <Button className="set-submit" type="ghost" onClick={this.handleCancel4} style={{marginLeft:'100px'}}>取消</Button>
  1088. </FormItem>
  1089. </Spin>
  1090. </Form >
  1091. </Modal>
  1092. </div>
  1093. <div className="patent-desc">
  1094. <Modal maskClosable={false} visible={this.state.visible5}
  1095. onOk={this.checkPatentProcess} onCancel={this.handleCancel5}
  1096. width='600px'
  1097. title='行业'
  1098. footer=''
  1099. className="admin-desc-content">
  1100. <Form horizontal onSubmit={this.addhandleSubmit} id="add-form">
  1101. <Spin spinning={this.state.loading}>
  1102. <FormItem
  1103. labelCol={{ span: 7 }}
  1104. wrapperCol={{ span: 12 }}
  1105. label="请选择行业"
  1106. >
  1107. <div value={this.state.editStatus}
  1108. onChange={(e)=>{this.setState({editStatus:e})}}>
  1109. {
  1110. industry.map(function (item) {
  1111. return <Checkbox key={item.value} >{item.key}</Checkbox>
  1112. })
  1113. }
  1114. </div>
  1115. </FormItem>
  1116. <FormItem wrapperCol={{ span: 12, offset: 7 }}>
  1117. <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
  1118. <Button className="set-submit" type="ghost" onClick={this.handleCancel5} style={{marginLeft:'100px'}}>取消</Button>
  1119. </FormItem>
  1120. </Spin>
  1121. </Form >
  1122. </Modal>
  1123. </div>
  1124. </div>
  1125. </div>
  1126. );
  1127. }
  1128. }));
  1129. export default RemindMessage;