systemMessage.jsx 69 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823
  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 '../../../NewDicProvinceList';
  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,socialAttributeS,industry,socialAttribute,industryS,designatedObjectse,auditStatusL} from '../../../dataDic.js';
  9. import {getPattern,getProvince,getCondition,getcustomerTyp,getSocialAttribute,getDesignated,getCertification,getAuditStatus, getContactType, getfllowSituation,getWhether,getLvl,getCurrentMember,getStatuslist,getMessageType} from '../../../tools.js';
  10. const TabPane = Tabs.TabPane;
  11. const TreeNodet = Tree.TreeNode;
  12. const CheckboxGroup = Checkbox.Group;
  13. const SystemMessage=Form.create()(React.createClass({
  14. //列表的展示和搜索
  15. loadData(pageNo,sendType) {
  16. this.state.data = [];
  17. this.setState({
  18. loading: true
  19. });
  20. $.ajax({
  21. method: "get",
  22. dataType: "json",
  23. crossDomain: false,
  24. url: globalConfig.context + '/api/admin/message/listSystemMessage',
  25. data: {
  26. pageNo: pageNo || 1,
  27. pageSize: this.state.pagination.pageSize,
  28. isDraft:sendType,//是否发送
  29. subject:'01',//列表消息类型
  30. },
  31. success: function (data) {
  32. let theArr = [];
  33. if (!data.data || !data.data.list) {
  34. if (data.error && data.error.length) {
  35. message.warning(data.error[0].message);
  36. };
  37. } else {
  38. for (let i = 0; i < data.data.list.length; i++) {
  39. let thisdata = data.data.list[i];
  40. theArr.push({
  41. key: i,
  42. id: thisdata.messageId,//每一条消息的ID
  43. createTime:thisdata.createTime,//创建时间
  44. title:thisdata.title,//消息标题
  45. body:thisdata.body,//消息内容
  46. subject:thisdata.subject,//消息类型
  47. consumerType:thisdata.consumerType,//发送目标类型
  48. });
  49. };
  50. this.state.pagination.current = data.data.pageNo;
  51. this.state.pagination.total = data.data.totalCount;
  52. };
  53. this.setState({
  54. dataSource: theArr,
  55. pagination: this.state.pagination
  56. });
  57. }.bind(this),
  58. }).always(function () {
  59. this.setState({
  60. loading: false
  61. });
  62. }.bind(this));
  63. },
  64. sanhuLoadData(pageNo, apiUrl) {
  65. this.setState({
  66. loading: true
  67. });
  68. $.ajax({
  69. method: "post",
  70. dataType: "json",
  71. crossDomain: false,
  72. url: globalConfig.context + '/api/admin/customer/listAllPersonalCustomer',
  73. data: {
  74. pageNo: pageNo || 1,
  75. pageSize: this.state.pagination.pageSize,
  76. name: this.state.nameSearch,
  77. societyTag: this.state.societyTagSearch,
  78. },
  79. success: function(data) {
  80. let theArr = [];
  81. if(data.error.length || data.data.list == "") {
  82. if(data.error && data.error.length) {
  83. message.warning(data.error[0].message);
  84. };
  85. } else {
  86. for(let i = 0; i < data.data.list.length; i++) {
  87. let thisdata = data.data.list[i];
  88. theArr.push({
  89. key: thisdata.uid,
  90. id: thisdata.uid,
  91. type: thisdata.type,
  92. name: thisdata.name,
  93. status: thisdata.status,
  94. contacts: thisdata.contacts,
  95. contactMobile: thisdata.contactMobile,
  96. industry: thisdata.industry,
  97. createTime: thisdata.createTime,
  98. businessAudit: thisdata.businessAudit,
  99. auditStatus: thisdata.auditStatus,
  100. lvl: thisdata.lvl,
  101. isMember: thisdata.isMember,
  102. status: thisdata.status,
  103. societyTag: thisdata.societyTag,
  104. currentMemberStatus: thisdata.currentMemberStatus,
  105. international: thisdata.international,
  106. listed: thisdata.listed,
  107. highTechZone: thisdata.highTechZone,
  108. locationProvince: thisdata.province ? thisdata.province + '-' + thisdata.city || '' + '-' + thisdata.area : '--'
  109. });
  110. };
  111. };
  112. this.state.pagination1.current = data.data.pageNo ? data.data.pageNo : '0';
  113. this.state.pagination1.total = data.data.totalCount ? data.data.totalCount : '0';
  114. this.setState({
  115. sanhuDataSource: theArr,
  116. pagination1: this.state.pagination1
  117. });
  118. }.bind(this),
  119. }).always(function() {
  120. this.setState({
  121. loading: false
  122. });
  123. }.bind(this));
  124. },
  125. sanhuLoadData21(pageNo, apiUrl) {
  126. this.setState({
  127. loading: true
  128. });
  129. $.ajax({
  130. method: "post",
  131. dataType: "json",
  132. crossDomain: false,
  133. url: globalConfig.context + '/api/admin/customer/listAllOrganizationCustomer',
  134. data: {
  135. pageNo: pageNo || 1,
  136. pageSize: this.state.pagination.pageSize,
  137. name: this.state.nameSearch,
  138. societyTag: this.state.societyTagSearch,
  139. },
  140. success: function(data) {
  141. let theArr = [];
  142. if(data.error.length || data.data.list == "") {
  143. if(data.error && data.error.length) {
  144. message.warning(data.error[0].message);
  145. };
  146. } else {
  147. for(let i = 0; i < data.data.list.length; i++) {
  148. let thisdata = data.data.list[i];
  149. theArr.push({
  150. key: thisdata.uid,
  151. id: thisdata.uid,
  152. type: thisdata.type,
  153. name: thisdata.name,
  154. status: thisdata.status,
  155. contacts: thisdata.contacts,
  156. contactMobile: thisdata.contactMobile,
  157. industry: thisdata.industry,
  158. createTime: thisdata.createTime,
  159. businessAudit: thisdata.businessAudit,
  160. auditStatus: thisdata.auditStatus,
  161. lvl: thisdata.lvl,
  162. isMember: thisdata.isMember,
  163. status: thisdata.status,
  164. societyTag: thisdata.societyTag,
  165. currentMemberStatus: thisdata.currentMemberStatus,
  166. international: thisdata.international,
  167. listed: thisdata.listed,
  168. highTechZone: thisdata.highTechZone,
  169. locationProvince: thisdata.province ? thisdata.province + '-' + thisdata.city || '' + '-' + thisdata.area : '--'
  170. });
  171. };
  172. };
  173. this.state.pagination21.current = data.data.pageNo ? data.data.pageNo : '0';
  174. this.state.pagination21.total = data.data.totalCount ? data.data.totalCount : '0';
  175. this.setState({
  176. sanhuDataSource21: theArr,
  177. pagination21: this.state.pagination21
  178. });
  179. }.bind(this),
  180. }).always(function() {
  181. this.setState({
  182. loading: false
  183. });
  184. }.bind(this));
  185. },
  186. sanhuLoadData1(pageNo) {
  187. this.setState({
  188. loading: true
  189. });
  190. $.ajax({
  191. type: 'get',
  192. cache: false,
  193. url: globalConfig.context + "/api/admin/supervise/adminList",
  194. dataType: "json",
  195. data: {
  196. pageNo: pageNo || 1,
  197. pageSize: this.state.pagination.pageSize,
  198. province: this.state.searchProvince,
  199. mobile: this.state.searchMobile,
  200. name: this.state.searchName,
  201. department:this.state.departmentt
  202. },
  203. success: function (data) {
  204. let theArr = [];
  205. if (!data.data) {
  206. if (data.error && data.error.length) {
  207. message.warning(data.error[0].message);
  208. };
  209. } else {
  210. for (let i = 0; i < data.data.list.length; i++) {
  211. let thisdata = data.data.list[i];
  212. this.state.onlyProvince = thisdata.province;
  213. theArr.push({
  214. key: thisdata.id,
  215. id: thisdata.id,
  216. mobile: thisdata.mobile,
  217. name: thisdata.name,
  218. email: thisdata.email,
  219. createTime: thisdata.createTime,
  220. number: thisdata.number,
  221. province: thisdata.province,
  222. city:thisdata.city,
  223. position: thisdata.position,
  224. departmentName:thisdata.departmentName,
  225. departmentId:thisdata.departmentId,
  226. superior: thisdata.superior,
  227. superiorId: thisdata.superiorId,
  228. createTimeFormattedDate: thisdata.createTimeFormattedDate
  229. });
  230. };
  231. this.state.pagination2.current = data.data.pageNo;
  232. this.state.pagination2.total = data.data.totalCount;
  233. };
  234. this.setState({
  235. sanhuDataSource1: theArr,
  236. pagination2: this.state.pagination2
  237. });
  238. }.bind(this),
  239. }).always(function () {
  240. this.setState({
  241. loading: false
  242. });
  243. }.bind(this));
  244. },
  245. //分公司列表和搜索
  246. fengongsiLoadData(pageNo) {
  247. this.state.data = [];
  248. this.setState({
  249. loading: true
  250. });
  251. let nameText=this.state.departmentArr;
  252. let superText=(this.state.superId)?nameText[parseInt(this.state.superId)].name:"";
  253. $.ajax({
  254. method: "post",
  255. dataType: "json",
  256. crossDomain: false,
  257. url: globalConfig.context + '/api/admin/organization/listOrganizationManagement',
  258. data: {
  259. pageNo: pageNo || 1,
  260. pageSize: this.state.pagination.pageSize,
  261. name: this.state.name, //组织名称
  262. superId:superText,//上级组织
  263. type:this.state.type,//组织类型
  264. depNo:this.state.depNo,//组织编号
  265. },
  266. success: function (data) {
  267. let theArr = [];
  268. if (!data.data || !data.data.list) {
  269. if (data.error && data.error.length) {
  270. message.warning(data.error[0].message);
  271. };
  272. } else {
  273. for (let i = 0; i < data.data.list.length; i++) {
  274. let thisdata = data.data.list[i];
  275. theArr.push({
  276. key: thisdata.id,
  277. id: thisdata.id,//每一条记录的ID
  278. depNo:thisdata.depNo,//组织编号
  279. name:thisdata.name,//组织名称
  280. type:thisdata.type,//组织类型
  281. managerId:thisdata.managerId,//负责人
  282. superId:thisdata.superId,//上级组织
  283. status:thisdata.status,//组织状态
  284. });
  285. };
  286. this.state.pagination3.current = data.data.pageNo;
  287. this.state.pagination3.total = data.data.totalCount;
  288. };
  289. this.setState({
  290. fengongsiDataSource: theArr,
  291. pagination3: this.state.pagination3
  292. });
  293. }.bind(this),
  294. }).always(function () {
  295. this.setState({
  296. loading: false
  297. });
  298. }.bind(this));
  299. },
  300. jueseLoadData(pageNo) {
  301. this.state.data = [];
  302. this.setState({
  303. loading: true
  304. });
  305. $.ajax({
  306. method: "post",
  307. dataType: "json",
  308. crossDomain: false,
  309. url: globalConfig.context + '/api/admin/roles',
  310. data: {
  311. pageNo: pageNo || 1,
  312. pageSize: this.state.pagination.pageSize,
  313. roleName:this.state.roleNameSearch,
  314. },
  315. success: function (data) {
  316. let theArr = [];
  317. if (!data.data) {
  318. if (data.error && data.error.length) {
  319. message.warning(data.error[0].message);
  320. };
  321. } else {
  322. for (let i = 0; i < data.data.list.length; i++) {
  323. let thisdata = data.data.list[i];
  324. theArr.push({
  325. key: thisdata.id,
  326. id: thisdata.id,
  327. roleName: thisdata.roleName,
  328. creater:thisdata.creater,
  329. createTime:thisdata.createTimez,
  330. });
  331. };
  332. this.state.pagination4.current = data.data.pageNo;
  333. this.state.pagination4.total = data.data.totalCount;
  334. };
  335. this.setState({
  336. jueseDataSource: theArr,
  337. pagination4: this.state.pagination4
  338. });
  339. }.bind(this),
  340. }).always(function () {
  341. this.setState({
  342. loading: false
  343. });
  344. }.bind(this));
  345. },
  346. getInitialState() {
  347. return {
  348. data: [],
  349. sanhu:[],
  350. objText:[],
  351. callnub:'0',
  352. showAdd: false,
  353. showDesc: false,
  354. expandedKeys: [],
  355. autoExpandParent: true,
  356. selectedKeys: [],
  357. searchMore: true,
  358. selectedRowKeys: [],
  359. selectedRows: [],
  360. loading: false,
  361. pagination: {
  362. defaultCurrent: 1,
  363. defaultPageSize: 10,
  364. showQuickJumper: true,
  365. pageSize: 10,
  366. onChange: function (page) {
  367. this.loadData(page);
  368. }.bind(this),
  369. showTotal: function (total) {
  370. return '共' + total + '条数据';
  371. }
  372. },
  373. pagination1: {
  374. defaultCurrent: 1,
  375. defaultPageSize: 10,
  376. showQuickJumper: true,
  377. pageSize: 10,
  378. onChange: function (page) {
  379. this.sanhuLoadData(page);
  380. }.bind(this),
  381. showTotal: function (total) {
  382. return '共' + total + '条数据';
  383. }
  384. },
  385. pagination21: {
  386. defaultCurrent: 1,
  387. defaultPageSize: 10,
  388. showQuickJumper: true,
  389. pageSize: 10,
  390. onChange: function (page) {
  391. this.sanhuLoadData21(page);
  392. }.bind(this),
  393. showTotal: function (total) {
  394. return '共' + total + '条数据';
  395. }
  396. },
  397. pagination2: {
  398. defaultCurrent: 1,
  399. defaultPageSize: 10,
  400. showQuickJumper: true,
  401. pageSize: 10,
  402. onChange: function (page) {
  403. this.sanhuLoadData1(page);
  404. }.bind(this),
  405. showTotal: function (total) {
  406. return '共' + total + '条数据';
  407. }
  408. },
  409. pagination3: {
  410. defaultCurrent: 1,
  411. defaultPageSize: 10,
  412. showQuickJumper: true,
  413. pageSize: 10,
  414. onChange: function (page) {
  415. this.fengongsiLoadData(page);
  416. }.bind(this),
  417. showTotal: function (total) {
  418. return '共' + total + '条数据';
  419. }
  420. },
  421. pagination4: {
  422. defaultCurrent: 1,
  423. defaultPageSize: 10,
  424. showQuickJumper: true,
  425. pageSize: 10,
  426. onChange: function (page) {
  427. this.jueseLoadData(page);
  428. }.bind(this),
  429. showTotal: function (total) {
  430. return '共' + total + '条数据';
  431. }
  432. },
  433. columns: [
  434. {
  435. title: '消息时间',
  436. dataIndex: 'createTime',
  437. key: 'createTime',
  438. width:'150px',
  439. }, {
  440. title: '消息标题',
  441. dataIndex: 'title',
  442. key: 'title',
  443. width:'300px',
  444. },{
  445. title: '消息内容',
  446. dataIndex: 'body',
  447. key: 'body',
  448. },{
  449. title: '消息类型',
  450. dataIndex: 'subject',
  451. key: 'subject',
  452. width:'100px',
  453. render: text => { return getMessageType(text) }
  454. },{
  455. title: '发送目标',
  456. dataIndex: 'consumerType',
  457. key: 'consumerType',
  458. width:'100px',
  459. render: text => { return getDesignated(text) }
  460. }
  461. ],
  462. dataSource: [],
  463. sanhuColumns1: [
  464. {
  465. title: '编号',
  466. dataIndex: 'number',
  467. key: 'number'
  468. }, {
  469. title: '登录账号',
  470. dataIndex: 'mobile',
  471. key: 'mobile'
  472. }, {
  473. title: '名字',
  474. dataIndex: 'name',
  475. key: 'name'
  476. }, {
  477. title: '职位',
  478. dataIndex: 'position',
  479. key: 'position'
  480. },{
  481. title: '部门',
  482. dataIndex: 'departmentName',
  483. key: 'departmentName'
  484. }, {
  485. title: '上级管理员',
  486. dataIndex: 'superior',
  487. key: 'superior'
  488. }, {
  489. title: '邮箱',
  490. dataIndex: 'email',
  491. key: 'email'
  492. }, {
  493. title: '创建时间',
  494. dataIndex: 'createTimeFormattedDate',
  495. key: 'createTimeFormattedDate'
  496. }
  497. ],
  498. sanhuDataSource1: [],
  499. sanhuColumns: [{
  500. title: '客户名称',
  501. dataIndex: 'name',
  502. key: 'name',
  503. },{
  504. title: '地区',
  505. dataIndex: 'locationProvince',
  506. key: 'locationProvince',
  507. }, {
  508. title: '联系人',
  509. dataIndex: 'contacts',
  510. key: 'contacts',
  511. },
  512. {
  513. title: '联系电话',
  514. dataIndex: 'contactMobile',
  515. key: 'contactMobile',
  516. },
  517. {
  518. title: '行业',
  519. dataIndex: 'industry',
  520. key: 'industry',
  521. },
  522. {
  523. title: '社会性质',
  524. dataIndex: 'societyTag',
  525. key: 'societyTag',
  526. render: text => { return getSocialAttribute(text) }
  527. },
  528. {
  529. title: '创建时间',
  530. dataIndex: 'createTime',
  531. key: 'createTime',
  532. },
  533. {
  534. title: '会员等级',
  535. dataIndex: 'lvl',
  536. key: 'lvl',
  537. render: text => { return getLvl(text) }
  538. },
  539. {
  540. title: '会员状态',
  541. dataIndex: 'currentMemberStatus',
  542. key: 'currentMemberStatus',
  543. render: text => { return getCurrentMember(text) }
  544. },
  545. {
  546. title: '账户状态',
  547. dataIndex: 'status',
  548. key: 'status',
  549. render: text => { return getStatuslist(text) }
  550. }
  551. ],
  552. sanhuDataSource: [],
  553. sanhuColumns21: [{
  554. title: '客户名称',
  555. dataIndex: 'name',
  556. key: 'name',
  557. },
  558. {
  559. title: '地区',
  560. dataIndex: 'locationProvince',
  561. key: 'locationProvince',
  562. }, {
  563. title: '联系人',
  564. dataIndex: 'contacts',
  565. key: 'contacts',
  566. },
  567. {
  568. title: '联系电话',
  569. dataIndex: 'contactMobile',
  570. key: 'contactMobile',
  571. },
  572. {
  573. title: '行业',
  574. dataIndex: 'industry',
  575. key: 'industry',
  576. },
  577. {
  578. title: '社会性质',
  579. dataIndex: 'societyTag',
  580. key: 'societyTag',
  581. render: text => { return getSocialAttribute(text) }
  582. },
  583. {
  584. title: '创建时间',
  585. dataIndex: 'createTime',
  586. key: 'createTime',
  587. },
  588. {
  589. title: '会员状态',
  590. dataIndex: 'currentMemberStatus',
  591. key: 'currentMemberStatus',
  592. render: text => { return getCurrentMember(text) }
  593. },
  594. {
  595. title: '账户状态',
  596. dataIndex: 'status',
  597. key: 'status',
  598. render: text => { return getStatuslist(text) }
  599. }
  600. ],
  601. sanhuDataSource21: [],
  602. fengongsiColumns: [
  603. {
  604. title: '组织编号',
  605. dataIndex: 'depNo',
  606. key: 'depNo',
  607. }, {
  608. title: '组织名称',
  609. dataIndex: 'name',
  610. key: 'name',
  611. }, {
  612. title: '负责人',
  613. dataIndex: 'managerId',
  614. key: 'managerId',
  615. },{
  616. title: '组织类型',
  617. dataIndex: 'type',
  618. key: 'type',
  619. render: text => { return getPattern(text) }
  620. }, {
  621. title: '上级组织',
  622. dataIndex: 'superId',
  623. key: 'superId',
  624. },{
  625. title: '组织状态',
  626. dataIndex: 'status',
  627. key: 'status',
  628. render: text => { return getCondition(text) }
  629. }
  630. ],
  631. fengongsiDataSource: [],
  632. jueseColumns: [
  633. {
  634. title: '角色名称',
  635. dataIndex: 'roleName',
  636. key: 'roleName',
  637. width:'300px'
  638. }, {
  639. title: '创建人',
  640. dataIndex: 'creater',
  641. key: 'creater',
  642. width:'300px'
  643. }, {
  644. title: '创建时间',
  645. dataIndex: 'createTime',
  646. key: 'createTime',
  647. }
  648. ],
  649. jueseDataSource: [],
  650. };
  651. },
  652. componentWillMount() {
  653. this.loadData(1,0);
  654. },
  655. //部门
  656. departmentList() {
  657. this.setState({
  658. loading: true
  659. });
  660. $.ajax({
  661. method: "post",
  662. dataType: "json",
  663. crossDomain: false,
  664. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  665. data: {
  666. },
  667. success: function(data) {
  668. let thedata = data.data;
  669. let theArr=[];
  670. if(!thedata) {
  671. if(data.error && data.error.length) {
  672. message.warning(data.error[0].message);
  673. };
  674. thedata = {};
  675. }else{
  676. thedata.map(function(item,index){
  677. theArr.push({
  678. key:index,
  679. name:item.name,
  680. id:item.id,
  681. depNo:item.depNo
  682. })
  683. })
  684. }
  685. this.setState({
  686. departmentArr:theArr,
  687. })
  688. }.bind(this),
  689. }).always(function() {
  690. this.setState({
  691. loading: false
  692. });
  693. }.bind(this));
  694. },
  695. //整行点击
  696. bianji(record, index) {
  697. this.state.RowData = record;
  698. this.setState({
  699. editvisible: true,
  700. selectedRowKeys:[],
  701. rowId:record.businessId,
  702. })
  703. let deletedIds ='';
  704. for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
  705. let rowItem = this.state.selectedRows[idx];
  706. if (rowItem.id) {
  707. deletedIds=rowItem.id;
  708. };
  709. };
  710. $.ajax({
  711. method: "get",
  712. dataType: "json",
  713. crossDomain: false,
  714. url: globalConfig.context +"/api/admin/message/getSystemMessageDetail" ,
  715. data: {
  716. messageId: deletedIds
  717. },
  718. success: function (data) {
  719. let theArr = [];
  720. let thisdata = data.data;
  721. if (!data) {
  722. if (data.error && data.error.length) {
  723. message.warning(data.error[0].message);
  724. };
  725. } else {
  726. theArr.push({
  727. editId: thisdata.messageId,//每一条消息的ID
  728. editTitle:thisdata.title,//消息标题
  729. editBody:thisdata.body,//消息内容
  730. editCreateTime:thisdata.createTime,//消息时间
  731. editSubject:thisdata.subject,//消息类型
  732. editConsumerType:thisdata.consumerType,//消息发送对象
  733. });
  734. };
  735. this.setState({
  736. editId: thisdata.messageId,//每一条消息的ID
  737. editTitle:thisdata.title,//消息标题
  738. editBody:thisdata.body,//消息内容
  739. editCreateTime:thisdata.createTime,//消息时间
  740. editSubject:thisdata.subject,//消息类型
  741. editConsumerType:thisdata.consumerType,//上级组织
  742. editDataSource: theArr,
  743. });
  744. }.bind(this),
  745. }).always(function () {
  746. this.setState({
  747. loading: false
  748. });
  749. }.bind(this));
  750. },
  751. //草稿删除
  752. delectRow() {
  753. let deletedIds ='';
  754. for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
  755. let rowItem = this.state.selectedRows[idx];
  756. if (rowItem.id) {
  757. deletedIds=rowItem.id;
  758. };
  759. };
  760. this.setState({
  761. selectedRowKeys: [],
  762. loading: deletedIds.length > 0
  763. });
  764. $.ajax({
  765. method: "get",
  766. dataType: "json",
  767. crossDomain: false,
  768. url: globalConfig.context + "/api/admin/message/deleteSystemMessage",
  769. data: {
  770. messageId: deletedIds
  771. }
  772. }).done(function (data) {
  773. if (!data.error.length) {
  774. message.success('删除成功!');
  775. this.loadData(1,1);
  776. this.setState({
  777. loading: false,
  778. });
  779. } else {
  780. message.warning(data.error[0].message);
  781. };
  782. }.bind(this));
  783. },
  784. //新增一个部门,保存
  785. addhandleSubmit(e,isDraft){
  786. e.preventDefault();
  787. let duixiang=JSON.stringify(this.state.sanhu)||JSON.stringify(this.state.sanhu21)||JSON.stringify(this.state.shehui)||JSON.stringify(this.state.hangye)||JSON.stringify(this.state.fengongsi)||JSON.stringify(this.state.diqu)||JSON.stringify(this.state.yonghu)||JSON.stringify(this.state.juese);
  788. if(!this.state.addContent){
  789. message.warning('请输入消息内容');
  790. return false;
  791. }
  792. if(!this.state.addType){
  793. message.warning('请选择消息类型');
  794. return false;
  795. }
  796. if(!duixiang){
  797. message.warning('请指定发送对象');
  798. return false;
  799. }
  800. let diquText=this.state.diqu;
  801. let pro=[];
  802. let city=[];
  803. let dis=[];
  804. if(this.state.diqu){
  805. for(var i=0;i<diquText.length;i++){
  806. if(diquText[i]<=34){
  807. pro.push(diquText[i])
  808. }else if(diquText[i]>34&&diquText[i]<380){
  809. city.push(diquText[i])
  810. }else{
  811. dis.push(diquText[i])
  812. }
  813. }
  814. }else{
  815. pro=undefined;
  816. city=undefined;
  817. dis=undefined;
  818. }
  819. this.props.form.validateFields((err, values) => {
  820. if (!err) {
  821. this.setState({
  822. loading: true
  823. });
  824. $.ajax({
  825. method: "post",
  826. dataType: "json",
  827. crossDomain: false,
  828. url:globalConfig.context + '/api/admin/message/createSystemMessage',
  829. data:{
  830. title:this.state.addTitle,//消息标题
  831. body:this.state.addContent,//消息内容
  832. subject:this.state.addType,//消息类型
  833. targetType:this.state.addObject, //指定对象
  834. createTime:this.state.addCreateTime, //创建时间
  835. isDraft:isDraft,//是否存为草稿
  836. personalUserIds:this.state.sanhu?this.state.sanhu.join(","):undefined,//散户
  837. organizationUserIds:this.state.sanhu21?this.state.sanhu21.join(","):undefined,//散户
  838. societyTags:this.state.shehui?this.state.shehui.join(","):undefined,//社会属性
  839. provinceIds:pro?pro.join(","):undefined,//省
  840. cityIds:city?city.join(","):undefined,//市
  841. areaIds:dis?dis.join(","):undefined,//区
  842. industryIds:this.state.hangye?this.state.hangye.join(","):undefined,//行业
  843. companyIds:this.state.fengongsi?this.state.fengongsi.join(","):undefined,//分公司
  844. adminIds:this.state.yonghu?this.state.yonghu.join(","):undefined,//用户
  845. roles:this.state.juese?this.state.juese.join(","):undefined,//角色
  846. }
  847. }).done(function (data) {
  848. this.setState({
  849. loading: false
  850. });
  851. if (!data.error.length) {
  852. message.success('保存成功!');
  853. this.handleCancel();
  854. this.loadData(1,this.state.callnub);
  855. } else {
  856. message.warning(data.error[0].message);
  857. }
  858. }.bind(this));
  859. }
  860. });
  861. },
  862. add(e){
  863. e.preventDefault();
  864. this.addhandleSubmit(e,0);
  865. },
  866. adds(e){
  867. e.preventDefault();
  868. this.addhandleSubmit(e,1);
  869. },
  870. edit(e){
  871. e.preventDefault();
  872. this.editDraft(e,0);
  873. },
  874. edits(e){
  875. e.preventDefault();
  876. this.editDraft(e,1);
  877. },
  878. //编辑一个部门,保存或者存为草稿
  879. editDraft(e,isDraft){
  880. e.preventDefault();
  881. if(!this.state.editTitle){
  882. message.warning('请输入消息标题');
  883. return false;
  884. }
  885. if(!this.state.editBody){
  886. message.warning('请选择消息内容');
  887. return false;
  888. }
  889. this.props.form.validateFields((err, values) => {
  890. if (!err) {
  891. this.setState({
  892. loading: true
  893. });
  894. $.ajax({
  895. method: "post",
  896. dataType: "json",
  897. crossDomain: false,
  898. url:globalConfig.context + '/api/admin/message/updateSystemMessage',
  899. data:{
  900. messageId:this.state.editId,//消息ID
  901. body:this.state.editBody,//消息内容
  902. title:this.state.editTitle,//消息标题
  903. isDraft:isDraft,//是否存为草稿
  904. }
  905. }).done(function (data) {
  906. this.setState({
  907. loading: false
  908. });
  909. if (!data.error.length) {
  910. message.success('保存成功!');
  911. this.edithandleCancel();
  912. } else {
  913. message.warning(data.error[0].message);
  914. }
  915. }.bind(this));
  916. }
  917. });
  918. },
  919. //主管初始加载(自动补全)
  920. supervisor(e){
  921. $.ajax({
  922. method: "post",
  923. dataType: "json",
  924. crossDomain: false,
  925. url: globalConfig.context + "/api/admin/organization/selectName",
  926. data:{
  927. name:e
  928. },
  929. success: function (data) {
  930. let thedata=data.data;
  931. if (!thedata) {
  932. if (data.error && data.error.length) {
  933. message.warning(data.error[0].message);
  934. };
  935. thedata = {};
  936. };
  937. this.setState({
  938. customerArr:thedata,
  939. });
  940. }.bind(this),
  941. }).always(function () {
  942. this.setState({
  943. loading: false
  944. });
  945. }.bind(this));
  946. },
  947. //上级主管输入框失去焦点是判断客户是否存在
  948. selectAuto(value,options){
  949. this.setState({
  950. managerIdOrganization:value
  951. })
  952. },
  953. //失去焦点时
  954. blurChange(e){
  955. this.setState({
  956. theTypes:e
  957. })
  958. },
  959. //消息发送列表切换数据处理
  960. callback(e) {
  961. this.setState({
  962. callnub: e,
  963. })
  964. if(e == 0) {
  965. this.setState({
  966. bianjiMore: false,
  967. selectedRowKeys:[],
  968. })
  969. this.loadData(1,0);
  970. }
  971. if(e == 1) {
  972. this.setState({
  973. bianjiMore: true,
  974. selectedRowKeys:[],
  975. })
  976. this.loadData(1,1);
  977. }
  978. },
  979. //切换系统消息类型
  980. changeNews(e){
  981. if(e == 1) {
  982. this.setState({
  983. newsChange: false,
  984. addObject:undefined,
  985. })
  986. }
  987. if(e == 0) {
  988. this.setState({
  989. newsChange: true ,
  990. addObject:undefined,
  991. })
  992. }
  993. },
  994. //切换创建系统消息中的指定发送对象
  995. selectObjects(e) {
  996. this.setState({
  997. addObject:e
  998. })
  999. if(e == 61) {
  1000. this.sanhuReset();
  1001. this.setState({ visible1: true })
  1002. }
  1003. if(e == 62) {
  1004. this.sanhuReset21();
  1005. this.setState({ visible21: true })
  1006. }
  1007. if(e == 1) {
  1008. this.setState({ visible2: true })
  1009. }
  1010. if(e == 2) {
  1011. this.setState({ visible4: true })
  1012. }
  1013. if(e == 0) {
  1014. this.setState({ visible5: true })
  1015. }
  1016. },
  1017. changeObjects(){
  1018. this.objectReset();
  1019. },
  1020. changeObjects1(e){
  1021. this.setState({
  1022. addObject:e
  1023. })
  1024. if(e == 5) {
  1025. this.sanhuReset1();
  1026. this.setState({ visible6: true })
  1027. }
  1028. if(e == 4) {
  1029. this.jueseReset();
  1030. this.setState({ visible7: true })
  1031. }
  1032. if(e == 3) {
  1033. this.fengongsiLoadData();
  1034. this.setState({ visible3: true })
  1035. }
  1036. },
  1037. //值改变时请求客户名称
  1038. httpChange(e){
  1039. if(e.length>=2){
  1040. this.supervisor(e);
  1041. }
  1042. this.setState({
  1043. managerIdOrganization:e
  1044. })
  1045. },
  1046. addClick() {
  1047. this.state.nameOrganization='';//组织名称清零
  1048. this.state.managerIdOrganization= '';//负责人ID清零
  1049. this.state.typeOrganization= undefined; //组织类型清零
  1050. this.state.upOrganization= undefined;//上级组织清零
  1051. this.state.remarksOrganization= '';//组织职能说明清零
  1052. this.state.RowData = {};
  1053. this.setState({
  1054. visible: true
  1055. });
  1056. $.ajax({
  1057. method: "get",
  1058. dataType: "json",
  1059. crossDomain: false,
  1060. url: globalConfig.context +"/api/admin/message/toCreateSystemMessage" ,
  1061. data: {
  1062. },
  1063. success: function (data) {
  1064. let thisdata = data.data;
  1065. this.setState({
  1066. addCreateTime: thisdata.createTime,//每一条消息的时间
  1067. });
  1068. }.bind(this),
  1069. }).always(function () {
  1070. this.setState({
  1071. loading: false
  1072. });
  1073. }.bind(this));
  1074. },
  1075. editClick() {
  1076. this.state.RowData = {};
  1077. this.setState({
  1078. editvisible: true
  1079. });
  1080. },
  1081. handleCancel() {
  1082. this.setState({ visible: false })
  1083. },
  1084. handleCancel1() {
  1085. this.setState({ visible1: false })
  1086. },
  1087. handleCancel21() {
  1088. this.setState({ visible21: false })
  1089. },
  1090. handleCancel2() {
  1091. this.setState({ visible2: false })
  1092. },
  1093. handleCancel3() {
  1094. this.setState({ visible3: false })
  1095. },
  1096. handleCancel4() {
  1097. this.setState({ visible4: false })
  1098. },
  1099. handleCancel5() {
  1100. this.setState({ visible5: false })
  1101. },
  1102. handleCancel6() {
  1103. this.setState({ visible6: false })
  1104. },
  1105. handleCancel7() {
  1106. this.setState({ visible7: false })
  1107. },
  1108. edithandleCancel() {
  1109. this.setState({ editvisible: false })
  1110. },
  1111. //地区多选
  1112. onExpand(expandedKeys){
  1113. this.setState({
  1114. expandedKeys,
  1115. autoExpandParent: false,
  1116. });
  1117. },
  1118. onCheck(checkedKeys){
  1119. this.setState({
  1120. checkedKeys:checkedKeys
  1121. });
  1122. },
  1123. onSelectDi(selectedKeys, info){
  1124. this.setState({ selectedKeys });
  1125. },
  1126. renderTreeNodes(data){
  1127. return provinceList.map((item) => {
  1128. return(
  1129. <TreeNodet title={item.name} key={item.id} dataRef={item}>
  1130. {item.cityList.map((item) => {
  1131. return(
  1132. <TreeNodet title={item.name} key={item.id} dataRef={item}>
  1133. {item.areaList.map((item) => {
  1134. return(
  1135. <TreeNodet title={item.name} key={item.id} dataRef={item}>
  1136. </TreeNodet>
  1137. );
  1138. })
  1139. }
  1140. </TreeNodet>
  1141. );
  1142. })
  1143. }
  1144. </TreeNodet>
  1145. );
  1146. return <TreeNodet {...item} />;
  1147. });
  1148. },
  1149. search() {
  1150. this.loadData();
  1151. },
  1152. //个人客户搜索
  1153. sanhusearch(){
  1154. this.sanhuLoadData();
  1155. },
  1156. //单位客户搜索
  1157. sanhusearch21(){
  1158. this.sanhuLoadData21();
  1159. },
  1160. //用户搜索
  1161. sanhusearch1(){
  1162. this.sanhuLoadData1();
  1163. },
  1164. //用户搜索
  1165. juesesearch(){
  1166. this.jueseLoadData();
  1167. },
  1168. //个人客户重置
  1169. sanhuReset() {
  1170. this.state.nameSearch = '';
  1171. this.state.societyTagSearch = undefined;
  1172. this.sanhuLoadData();
  1173. },
  1174. //单位客户重置
  1175. sanhuReset21() {
  1176. this.state.nameSearch = '';
  1177. this.state.societyTagSearch = undefined;
  1178. this.sanhuLoadData21();
  1179. },
  1180. //用户重置
  1181. sanhuReset1() {
  1182. this.state.departmentt=undefined;
  1183. this.state.searchMobile = undefined;
  1184. this.state.searchName = undefined;
  1185. this.state.searchProvince = undefined;
  1186. this.sanhuLoadData1();
  1187. },
  1188. //角色重置
  1189. jueseReset() {
  1190. this.state.roleNameSearch='';
  1191. this.jueseLoadData();
  1192. },
  1193. //把搜索的部分置零
  1194. reset() {
  1195. this.state.addTitle= undefined;//消息标题
  1196. this.state.addContent= undefined;//消息内容
  1197. this.state.addType= undefined;//消息类型
  1198. this.state.addObject= undefined; //指定对象
  1199. this.loadData(1,0);
  1200. },
  1201. searchSwitch() {
  1202. this.setState({
  1203. searchMore: !this.state.searchMore
  1204. });
  1205. },
  1206. //选择发送对象时的数据处理
  1207. //指定对象清零
  1208. objectReset(){
  1209. this.state.sanhu=undefined;
  1210. this.state.sanhu21=undefined;
  1211. this.state.yonghu=undefined;
  1212. this.state.juese=undefined;
  1213. this.state.shehui=undefined;
  1214. this.state.diqu=undefined;
  1215. this.state.fengongsi=undefined;
  1216. this.state.hangye=undefined;
  1217. },
  1218. rowReset(){
  1219. this.state.selectedRowKeys=[];
  1220. },
  1221. //散户
  1222. sanhuSubmit(e){
  1223. e.preventDefault();
  1224. this.objectReset();
  1225. this.setState({
  1226. sanhu:this.state.selectedRowKeys
  1227. });
  1228. this.rowReset();
  1229. this.handleCancel1();
  1230. },//散户
  1231. sanhuSubmit21(e){
  1232. e.preventDefault();
  1233. this.objectReset();
  1234. this.setState({
  1235. sanhu21:this.state.selectedRowKeys
  1236. });
  1237. this.rowReset();
  1238. this.handleCancel21();
  1239. },
  1240. //用户
  1241. yonghuSubmit(e){
  1242. e.preventDefault();
  1243. this.objectReset();
  1244. this.setState({
  1245. yonghu:this.state.selectedRowKeys
  1246. });
  1247. this.rowReset();
  1248. this.handleCancel6();
  1249. },
  1250. //角色
  1251. jueseSubmit(e){
  1252. e.preventDefault();
  1253. this.objectReset();
  1254. this.setState({
  1255. juese:this.state.selectedRowKeys
  1256. });
  1257. this.rowReset();
  1258. this.handleCancel7();
  1259. },
  1260. //社会属性
  1261. shehuiSubmit(e){
  1262. e.preventDefault();
  1263. this.setState({
  1264. shehui:this.state.shehui
  1265. });
  1266. this.handleCancel2();
  1267. },
  1268. //分公司
  1269. fengongsiSubmit(e){
  1270. e.preventDefault();
  1271. this.objectReset();
  1272. this.setState({
  1273. fengongsi:this.state.selectedRowKeys
  1274. });
  1275. this.rowReset();
  1276. this.handleCancel3();
  1277. },
  1278. //地区
  1279. diquSubmit(e){
  1280. e.preventDefault();
  1281. this.objectReset();
  1282. this.setState({
  1283. diqu:this.state.checkedKeys
  1284. });
  1285. this.handleCancel4();
  1286. },
  1287. //行业
  1288. hangyeSubmit(e){
  1289. e.preventDefault();
  1290. this.setState({
  1291. hangye:this.state.hangye
  1292. });
  1293. this.handleCancel5();
  1294. },
  1295. render() {
  1296. let departmentArr = this.state.departmentArr || [];
  1297. const FormItem = Form.Item
  1298. const rowSelection = {
  1299. selectedRowKeys: this.state.selectedRowKeys,
  1300. onChange: (selectedRowKeys, selectedRows) => {
  1301. this.setState({
  1302. selectedRows: selectedRows.slice(-1),
  1303. selectedRowKeys: selectedRowKeys.slice(-1)
  1304. });
  1305. },
  1306. onSelect: (recordt, selected, selectedRows) => {
  1307. this.setState({
  1308. recordt:recordt.id
  1309. })
  1310. },
  1311. };
  1312. const rowSelections = {
  1313. selectedRowKeys: this.state.selectedRowKeys,
  1314. onChange: (selectedRowKeys, selectedRows) => {
  1315. this.setState({
  1316. selectedRows: selectedRows,
  1317. selectedRowKeys: selectedRowKeys
  1318. });
  1319. },
  1320. onSelect: (recordt, selected, selectedRows) => {
  1321. this.setState({
  1322. recordt:recordt.id
  1323. })
  1324. },
  1325. };
  1326. const formItemLayout = {
  1327. labelCol: { span: 8 },
  1328. wrapperCol: { span: 14 },
  1329. };
  1330. const { getFieldDecorator } = this.props.form;
  1331. const hasSelected = this.state.selectedRowKeys.length > 0;
  1332. const { RangePicker } = DatePicker;
  1333. const dataSources=this.state.customerArr || [];
  1334. const options = dataSources.map((group,index) =>
  1335. <Option key={index} value={group.name}>{group.name}</Option>
  1336. )
  1337. return (
  1338. <div className="user-content" >
  1339. <div className="content-title">
  1340. <div className="user-search">
  1341. <Button type="primary" className="addButton" onClick={this.addClick}>创建系统消息<Icon type="plus" /></Button>
  1342. <Button type="primary" onClick={this.bianji} style={!this.state.bianjiMore ? { display: 'none',float:'right',marginRight:'10px'} : {display: 'inline-block',float:'right',marginRight:'10px'}} disabled={!hasSelected}>编辑</Button>
  1343. <div style={!this.state.bianjiMore ? { display: 'none',float:'right',marginRight:'10px'} : {display: 'inline-block',float:'right',marginRight:'10px',marginTop:'10px'}}>
  1344. <Popconfirm title="是否删除?" onConfirm={this.delectRow} okText="是" cancelText="否">
  1345. <Button style={{ background: "#ea0862", border: "none", color: "#fff",marginRight:'10px' ,marginLeft:'10px'}}
  1346. disabled={!hasSelected}
  1347. >删除<Icon type="minus" />
  1348. </Button>
  1349. </Popconfirm>
  1350. </div>
  1351. </div>
  1352. <div className="clearfix" style={{marginTop:'-30px',marginLeft:'20px'}}>
  1353. <Tabs onChange={this.callback} type="card" activeKey={this.state.callnub} style={{paddingLeft:'15px',paddingRight:'15px',marginRight:'20px'}}>
  1354. <TabPane tab="已发送" key="0" ></TabPane>
  1355. <TabPane tab="未发送" key="1"></TabPane>
  1356. </Tabs>
  1357. </div>
  1358. <div className="patent-table">
  1359. <Spin spinning={this.state.loading}>
  1360. <Table columns={this.state.columns}
  1361. dataSource={this.state.dataSource}
  1362. rowSelection={rowSelection}
  1363. pagination={this.state.pagination}
  1364. onRowClick={this.tableRowClick} />
  1365. </Spin>
  1366. </div>
  1367. <div className="patent-desc">
  1368. <Modal maskClosable={false} visible={this.state.visible}
  1369. onOk={this.checkPatentProcess} onCancel={this.handleCancel}
  1370. width='600px'
  1371. title='新建系统消息'
  1372. footer=''
  1373. className="admin-desc-content">
  1374. <Form horizontal onSubmit={this.add} id="add-form">
  1375. <Spin spinning={this.state.loading}>
  1376. <div className="clearfix">
  1377. <FormItem
  1378. labelCol={{ span: 4 }}
  1379. wrapperCol={{ span: 18 }}
  1380. label="消息标题" >
  1381. <Input placeholder="消息标题" value={this.state.addTitle} style={{width:'95%'}}
  1382. onChange={(e)=>{this.setState({addTitle:e.target.value})}} required="required"/>
  1383. <span className="mandatory" style={{color:'red',marginLeft:'5px'}}>*</span>
  1384. </FormItem>
  1385. </div>
  1386. <div className="clearfix">
  1387. <FormItem
  1388. labelCol={{ span: 4 }}
  1389. wrapperCol={{ span: 18 }}
  1390. label="创建时间"
  1391. >
  1392. <span>{this.state.addCreateTime}</span>
  1393. </FormItem>
  1394. </div>
  1395. <div className="clearfix">
  1396. <FormItem
  1397. labelCol={{ span: 4 }}
  1398. wrapperCol={{ span: 18 }}
  1399. label="消息内容" >
  1400. <Input type="textarea" rows={4} placeholder="消息内容" value={this.state.addContent}
  1401. onChange={(e) => { this.setState({ addContent: e.target.value }) }} style={{width:'95%'}}/>
  1402. <span className="mandatory" style={{color:'red',marginLeft:'5px'}}>*</span>
  1403. </FormItem>
  1404. </div>
  1405. <div className="clearfix">
  1406. <FormItem
  1407. labelCol={{ span: 4 }}
  1408. wrapperCol={{ span: 18 }}
  1409. label="消息类型"
  1410. >
  1411. <Select placeholder="消息类型" value={this.state.addType}
  1412. onChange={(e)=>{this.setState({addType:e})}} style={{width:'95%'}} required="required"
  1413. onSelect={this.changeNews}>
  1414. {
  1415. messageType.map(function(item) {
  1416. return <Select.Option key={item.value} >{item.key}</Select.Option>
  1417. })
  1418. }
  1419. </Select>
  1420. <span className="mandatory" style={{color:'red',marginLeft:'5px'}}>*</span>
  1421. </FormItem>
  1422. </div>
  1423. <div className="clearfix" >
  1424. <FormItem
  1425. labelCol={{ span: 4 }}
  1426. wrapperCol={{ span: 18 }}
  1427. label="指定发送对象"
  1428. style={this.state.newsChange ? { display: 'none' } : {display: 'inline-block',width:'100%'}}
  1429. >
  1430. <Select placeholder="指定发送对象" value={this.state.addObject}
  1431. onSelect={this.selectObjects} onChange={this.changeObjects} required="required" style={{width:'95%'}}>
  1432. {
  1433. designatedObjects.map(function(item) {
  1434. return <Select.Option key={item.value} >{item.key}</Select.Option>
  1435. })
  1436. }
  1437. </Select>
  1438. <span className="mandatory" style={{color:'red',marginLeft:'5px'}}>*</span>
  1439. </FormItem>
  1440. </div>
  1441. <div className="clearfix" >
  1442. <FormItem
  1443. labelCol={{ span: 4 }}
  1444. wrapperCol={{ span: 18 }}
  1445. label="指定发送对象"
  1446. style={!this.state.newsChange ? { display: 'none' } : {display: 'inline-block',width:'100%'}}
  1447. >
  1448. <Select placeholder="指定发送对象" value={this.state.addObject}
  1449. onSelect={this.changeObjects1} required="required" style={{width:'95%'}}>
  1450. {
  1451. designatedObjectse.map(function(item) {
  1452. return <Select.Option key={item.value} >{item.key}</Select.Option>
  1453. })
  1454. }
  1455. </Select>
  1456. <span className="mandatory" style={{color:'red',marginLeft:'5px'}}>*</span>
  1457. </FormItem>
  1458. </div>
  1459. <FormItem wrapperCol={{ span: 18, offset: 5 }}>
  1460. <Button className="set-submit" type="primary" htmlType="submit">发送</Button>
  1461. <Button className="set-submit" type="ghost" onClick={this.adds} style={{marginLeft:'10px'}}>存为草稿</Button>
  1462. <Button className="set-submit" type="ghost" onClick={this.handleCancel} style={{marginLeft:'10px'}}>取消</Button>
  1463. </FormItem>
  1464. </Spin>
  1465. </Form >
  1466. </Modal>
  1467. </div>
  1468. <div className="patent-desc">
  1469. <Modal maskClosable={false} visible={this.state.editvisible}
  1470. onOk={this.checkPatentProcess} onCancel={this.edithandleCancel}
  1471. width='600px'
  1472. title='编辑系统消息'
  1473. footer=''
  1474. className="admin-desc-content">
  1475. <Form horizontal onSubmit={this.edit} id="add-form">
  1476. <Spin spinning={this.state.loading}>
  1477. <div className="clearfix">
  1478. <FormItem
  1479. labelCol={{ span: 4 }}
  1480. wrapperCol={{ span: 18 }}
  1481. label="消息标题" >
  1482. <Input placeholder="消息标题" value={this.state.editTitle} style={{width:'95%'}}
  1483. onChange={(e)=>{this.setState({editTitle:e.target.value})}} required="required"/>
  1484. <span className="mandatory" style={{color:'red',marginLeft:'5px'}}>*</span>
  1485. </FormItem>
  1486. </div>
  1487. <div className="clearfix">
  1488. <FormItem
  1489. labelCol={{ span: 4 }}
  1490. wrapperCol={{ span: 18 }}
  1491. label="消息内容" >
  1492. <Input type="textarea" rows={4} placeholder="消息内容" value={this.state.editBody}
  1493. onChange={(e) => { this.setState({ editBody: e.target.value }) }} style={{width:'95%'}}/>
  1494. <span className="mandatory" style={{color:'red',marginLeft:'5px'}}>*</span>
  1495. </FormItem>
  1496. </div>
  1497. <div className="clearfix">
  1498. <FormItem
  1499. labelCol={{ span: 4 }}
  1500. wrapperCol={{ span: 18 }}
  1501. label="消息时间"
  1502. >
  1503. <span>{this.state.editCreateTime}</span>
  1504. </FormItem>
  1505. </div>
  1506. <div className="clearfix">
  1507. <FormItem
  1508. labelCol={{ span: 4 }}
  1509. wrapperCol={{ span: 18 }}
  1510. label="消息类型"
  1511. >
  1512. <span>{getMessageType(this.state.editSubject)}</span>
  1513. </FormItem>
  1514. </div>
  1515. <div className="clearfix">
  1516. <FormItem
  1517. labelCol={{ span: 4 }}
  1518. wrapperCol={{ span: 18 }}
  1519. label="指定发送对象"
  1520. >
  1521. <span>{getDesignated(this.state.editConsumerType)}</span>
  1522. </FormItem>
  1523. </div>
  1524. <FormItem wrapperCol={{ span: 18, offset: 5 }}>
  1525. <Button className="set-submit" type="primary" htmlType="submit">发送</Button>
  1526. <Button className="set-submit" type="ghost" onClick={this.edits} style={{marginLeft:'10px'}}>存为草稿</Button>
  1527. <Button className="set-submit" type="ghost" onClick={this.edithandleCancel} style={{marginLeft:'10px'}}>取消</Button>
  1528. </FormItem>
  1529. </Spin>
  1530. </Form >
  1531. </Modal>
  1532. </div>
  1533. <div className="patent-desc">
  1534. <Modal maskClosable={false} visible={this.state.visible6}
  1535. onOk={this.checkPatentProcess} onCancel={this.handleCancel6}
  1536. width='1100px'
  1537. title='用户列表'
  1538. footer=''
  1539. className="admin-desc-content">
  1540. <Form horizontal onSubmit={this.yonghuSubmit} id="add-form">
  1541. <Spin spinning={this.state.loading}>
  1542. <div className="user-search">
  1543. <Input placeholder="登录号" style={{width:'100px',marginRight:'10px',marginBottom:'10px'}}
  1544. value={this.state.searchMobile}
  1545. onChange={(e) => { this.setState({ searchMobile: e.target.value }); }} />
  1546. <Input placeholder="管理员名字" style={{width:'100px',marginRight:'10px',marginBottom:'10px'}}
  1547. value={this.state.searchName}
  1548. onChange={(e) => { this.setState({ searchName: e.target.value }); }} />
  1549. <Button type="primary" onClick={this.sanhusearch1} style={{marginRight:'10px'}}>搜索</Button>
  1550. <Button onClick={this.sanhuReset1} style={{marginRight:'10px'}}>重置</Button>
  1551. </div>
  1552. <div className="foster-table">
  1553. <Spin spinning={this.state.loading}>
  1554. <Table columns={this.state.sanhuColumns1}
  1555. dataSource={this.state.sanhuDataSource1}
  1556. rowSelection={rowSelections}
  1557. pagination={this.state.pagination2}
  1558. onRowClick={this.tableRowClick} />
  1559. </Spin>
  1560. </div>
  1561. <FormItem wrapperCol={{ span: 12, offset: 7 }}>
  1562. <Button className="set-submit" type="primary" htmlType="submit">选定</Button>
  1563. <Button className="set-submit" type="ghost" onClick={this.handleCancel6} style={{marginLeft:'100px'}}>取消</Button>
  1564. </FormItem>
  1565. </Spin>
  1566. </Form >
  1567. </Modal>
  1568. </div>
  1569. <div className="patent-desc">
  1570. <Modal maskClosable={false} visible={this.state.visible7}
  1571. onOk={this.checkPatentProcess} onCancel={this.handleCancel7}
  1572. width='1000px'
  1573. title='角色列表'
  1574. footer=''
  1575. className="admin-desc-content">
  1576. <Form horizontal onSubmit={this.jueseSubmit} id="add-form">
  1577. <Spin spinning={this.state.loading}>
  1578. <div className="user-search">
  1579. <Input placeholder="角色名称" style={{width:'100px',marginRight:'10px',marginBottom:'10px'}}
  1580. value={this.state.roleNameSearch}
  1581. onChange={(e) => { this.setState({ roleNameSearch: e.target.value }); }} />
  1582. <Button type="primary" onClick={this.juesesearch} style={{marginRight:'10px'}}>搜索</Button>
  1583. <Button onClick={this.jueseReset}>重置</Button>
  1584. </div>
  1585. <div className="foster-table">
  1586. <Spin spinning={this.state.loading}>
  1587. <Table columns={this.state.jueseColumns}
  1588. dataSource={this.state.jueseDataSource}
  1589. rowSelection={rowSelections}
  1590. pagination={this.state.pagination4}
  1591. onRowClick={this.tableRowClick} />
  1592. </Spin>
  1593. </div>
  1594. <FormItem wrapperCol={{ span: 12, offset: 7 }}>
  1595. <Button className="set-submit" type="primary" htmlType="submit">选定</Button>
  1596. <Button className="set-submit" type="ghost" onClick={this.handleCancel7} style={{marginLeft:'100px'}}>取消</Button>
  1597. </FormItem>
  1598. </Spin>
  1599. </Form >
  1600. </Modal>
  1601. </div>
  1602. <div className="patent-desc">
  1603. <Modal maskClosable={false} visible={this.state.visible1}
  1604. onOk={this.checkPatentProcess} onCancel={this.handleCancel1}
  1605. width='1200px'
  1606. title='个人客户'
  1607. footer=''
  1608. className="admin-desc-content">
  1609. <Form horizontal onSubmit={this.sanhuSubmit} id="add-form">
  1610. <Spin spinning={this.state.loading}>
  1611. <div className="user-search">
  1612. <Input placeholder="客户名称" style={{width:'100px',marginRight:'10px',marginBottom:'10px'}}
  1613. value={this.state.nameSearch}
  1614. onChange={(e) => { this.setState({ nameSearch: e.target.value }); }} />
  1615. <Select placeholder="社会性质"
  1616. style={{width:'100px',marginRight:'10px'}}
  1617. value={this.state.societyTagSearch}
  1618. onChange={(e) => { this.setState({ societyTagSearch: e }) }}>
  1619. {
  1620. socialAttribute.map(function (item) {
  1621. return <Select.Option key={item.value} >{item.key}</Select.Option>
  1622. })
  1623. }
  1624. </Select>
  1625. <Button type="primary" onClick={this.sanhusearch} style={{marginRight:'10px'}}>搜索</Button>
  1626. <Button onClick={this.sanhuReset} style={{marginRight:'10px'}}>重置</Button>
  1627. </div>
  1628. <div className="foster-table">
  1629. <Spin spinning={this.state.loading}>
  1630. <Table columns={this.state.sanhuColumns}
  1631. dataSource={this.state.sanhuDataSource}
  1632. rowSelection={rowSelections}
  1633. pagination={this.state.pagination1}
  1634. onRowClick={this.tableRowClick} />
  1635. </Spin>
  1636. </div>
  1637. <FormItem wrapperCol={{ span: 12, offset: 7 }}>
  1638. <Button className="set-submit" type="primary" htmlType="submit">选定</Button>
  1639. <Button className="set-submit" type="ghost" onClick={this.handleCancel1} style={{marginLeft:'100px'}}>取消</Button>
  1640. </FormItem>
  1641. </Spin>
  1642. </Form >
  1643. </Modal>
  1644. </div>
  1645. <div className="patent-desc">
  1646. <Modal maskClosable={false} visible={this.state.visible21}
  1647. onOk={this.checkPatentProcess} onCancel={this.handleCancel21}
  1648. width='1200px'
  1649. title='单位客户'
  1650. footer=''
  1651. className="admin-desc-content">
  1652. <Form horizontal onSubmit={this.sanhuSubmit21} id="add-form">
  1653. <Spin spinning={this.state.loading}>
  1654. <div className="user-search">
  1655. <Input placeholder="客户名称" style={{width:'100px',marginRight:'10px',marginBottom:'10px'}}
  1656. value={this.state.nameSearch}
  1657. onChange={(e) => { this.setState({ nameSearch: e.target.value }); }} />
  1658. <Select placeholder="社会性质"
  1659. style={{width:'100px',marginRight:'10px'}}
  1660. value={this.state.societyTagSearch}
  1661. onChange={(e) => { this.setState({ societyTagSearch: e }) }}>
  1662. {
  1663. socialAttribute.map(function (item) {
  1664. return <Select.Option key={item.value} >{item.key}</Select.Option>
  1665. })
  1666. }
  1667. </Select>
  1668. <Button type="primary" onClick={this.sanhusearch21} style={{marginRight:'10px'}}>搜索</Button>
  1669. <Button onClick={this.sanhuReset21} style={{marginRight:'10px'}}>重置</Button>
  1670. </div>
  1671. <div className="foster-table">
  1672. <Spin spinning={this.state.loading}>
  1673. <Table columns={this.state.sanhuColumns21}
  1674. dataSource={this.state.sanhuDataSource21}
  1675. rowSelection={rowSelections}
  1676. pagination={this.state.pagination21}
  1677. onRowClick={this.tableRowClick} />
  1678. </Spin>
  1679. </div>
  1680. <FormItem wrapperCol={{ span: 12, offset: 7 }}>
  1681. <Button className="set-submit" type="primary" htmlType="submit">选定</Button>
  1682. <Button className="set-submit" type="ghost" onClick={this.handleCancel21} style={{marginLeft:'100px'}}>取消</Button>
  1683. </FormItem>
  1684. </Spin>
  1685. </Form >
  1686. </Modal>
  1687. </div>
  1688. <div className="patent-desc">
  1689. <Modal maskClosable={false} visible={this.state.visible2}
  1690. onOk={this.checkPatentProcess} onCancel={this.handleCancel2}
  1691. width='600px'
  1692. title='社会属性'
  1693. footer=''
  1694. className="admin-desc-content">
  1695. <Form horizontal onSubmit={this.shehuiSubmit} id="add-form">
  1696. <Spin spinning={this.state.loading}>
  1697. <FormItem
  1698. labelCol={{ span: 7 }}
  1699. wrapperCol={{ span: 12 }}
  1700. label="请选择社会属性"
  1701. >
  1702. <CheckboxGroup options={socialAttributeS} value={this.state.shehui} onChange={(e)=>{this.setState({shehui:e})}} />
  1703. </FormItem>
  1704. <FormItem wrapperCol={{ span: 12, offset: 7 }}>
  1705. <Button className="set-submit" type="primary" htmlType="submit">选定</Button>
  1706. <Button className="set-submit" type="ghost" onClick={this.handleCancel2} style={{marginLeft:'100px'}}>取消</Button>
  1707. </FormItem>
  1708. </Spin>
  1709. </Form >
  1710. </Modal>
  1711. </div>
  1712. <div className="patent-desc">
  1713. <Modal maskClosable={false} visible={this.state.visible3}
  1714. onOk={this.checkPatentProcess} onCancel={this.handleCancel3}
  1715. width='1200px'
  1716. title='分公司列表'
  1717. footer=''
  1718. className="admin-desc-content">
  1719. <Form horizontal onSubmit={this.fengongsiSubmit} id="add-form">
  1720. <Spin spinning={this.state.loading}>
  1721. <div className="foster-table">
  1722. <Spin spinning={this.state.loading}>
  1723. <Table columns={this.state.fengongsiColumns}
  1724. dataSource={this.state.fengongsiDataSource}
  1725. rowSelection={rowSelections}
  1726. pagination={this.state.pagination3}
  1727. onRowClick={this.tableRowClick} />
  1728. </Spin>
  1729. </div>
  1730. <FormItem wrapperCol={{ span: 12, offset: 7 }}>
  1731. <Button className="set-submit" type="primary" htmlType="submit">选定</Button>
  1732. <Button className="set-submit" type="ghost" onClick={this.handleCancel3} style={{marginLeft:'100px'}}>取消</Button>
  1733. </FormItem>
  1734. </Spin>
  1735. </Form >
  1736. </Modal>
  1737. </div>
  1738. <div className="patent-desc">
  1739. <Modal maskClosable={false} visible={this.state.visible4}
  1740. onOk={this.checkPatentProcess} onCancel={this.handleCancel4}
  1741. width='600px'
  1742. title='地区'
  1743. footer=''
  1744. className="admin-desc-content">
  1745. <Form horizontal onSubmit={this.diquSubmit} id="add-form">
  1746. <Spin spinning={this.state.loading}>
  1747. <div className="clearfix" style={{marginLeft:'90px'}}>
  1748. <Tree
  1749. checkable
  1750. onExpand={this.onExpand}
  1751. expandedKeys={this.state.expandedKeys}
  1752. autoExpandParent={this.state.autoExpandParent}
  1753. onCheck={this.onCheck}
  1754. checkedKeys={this.state.checkedKeys}
  1755. onSelect={this.onSelectDi}
  1756. selectedKeys={this.state.selectedKeys}
  1757. >
  1758. {this.renderTreeNodes(this.state.Interface)}
  1759. </Tree>
  1760. </div>
  1761. <FormItem wrapperCol={{ span: 12, offset: 7 }}>
  1762. <Button className="set-submit" type="primary" htmlType="submit">选定</Button>
  1763. <Button className="set-submit" type="ghost" onClick={this.handleCancel4} style={{marginLeft:'100px'}}>取消</Button>
  1764. </FormItem>
  1765. </Spin>
  1766. </Form >
  1767. </Modal>
  1768. </div>
  1769. <div className="patent-desc">
  1770. <Modal maskClosable={false} visible={this.state.visible5}
  1771. onOk={this.checkPatentProcess} onCancel={this.handleCancel5}
  1772. width='600px'
  1773. title='行业'
  1774. footer=''
  1775. className="admin-desc-content">
  1776. <Form horizontal onSubmit={this.hangyeSubmit} id="add-form">
  1777. <Spin spinning={this.state.loading}>
  1778. <FormItem
  1779. labelCol={{ span: 7 }}
  1780. wrapperCol={{ span: 12 }}
  1781. label="请选择行业"
  1782. >
  1783. <CheckboxGroup options={industryS} value={this.state.hangye} onChange={(e)=>{this.setState({hangye:e})}} />
  1784. </FormItem>
  1785. <FormItem wrapperCol={{ span: 12, offset: 7 }}>
  1786. <Button className="set-submit" type="primary" htmlType="submit">选定</Button>
  1787. <Button className="set-submit" type="ghost" onClick={this.handleCancel5} style={{marginLeft:'100px'}}>取消</Button>
  1788. </FormItem>
  1789. </Spin>
  1790. </Form >
  1791. </Modal>
  1792. </div>
  1793. </div>
  1794. </div>
  1795. );
  1796. }
  1797. }));
  1798. export default SystemMessage;