12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889 |
- import React from 'react';
- import ReactDom from 'react-dom';
- import ajax from 'jquery/src/ajax/xhr.js';
- import $ from 'jquery/src/ajax';
- import '../content.less';
- import { citySelect,provinceList,areaSelect,provinceSelect,addressList} from '../../../NewDicProvinceList';
- import { Form,Radio, Icon, Button, Input, Select, Spin, Table, Switch, message, DatePicker, Modal, Upload,Popconfirm,AutoComplete,Tabs,Checkbox,Tree,Cascader} from 'antd';
- import {patternOrganization,conditionOrganization,intentionalService,messageType,designatedObjects,socialAttributeS,industry,socialAttribute,industryS,designatedObjectse,auditStatusL} from '../../../dataDic.js';
- import {getPattern,getProvince,getCondition,getcustomerTyp,getSocialAttribute,getDesignated,getCertification,getAuditStatus, getContactType, getfllowSituation,getWhether,getLvl,getCurrentMember,getStatuslist,getMessageType} from '../../../tools.js';
- import {ChooseList} from "../../order/orderNew/chooseList";
- const TabPane = Tabs.TabPane;
- const TreeNodet = Tree.TreeNode;
- const CheckboxGroup = Checkbox.Group;
- const SystemMessage=Form.create()(React.createClass({
- //列表的展示和搜索
- loadData(pageNo,sendType) {
- this.state.data = [];
- this.setState({
- loading: true
- });
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + '/api/admin/message/listSystemMessage',
- data: {
- pageNo: pageNo || 1,
- pageSize: this.state.pagination.pageSize,
- isDraft:sendType,//是否发送
- subject:'01',//列表消息类型
- },
- success: function (data) {
- let theArr = [];
- if (!data.data || !data.data.list) {
- if (data.error && data.error.length) {
- message.warning(data.error[0].message);
- };
- } else {
- for (let i = 0; i < data.data.list.length; i++) {
- let thisdata = data.data.list[i];
- theArr.push({
- key: i,
- id: thisdata.messageId,//每一条消息的ID
- createTime:thisdata.createTime,//创建时间
- title:thisdata.title,//消息标题
- body:thisdata.body,//消息内容
- subject:thisdata.subject,//消息类型
- consumerType:thisdata.consumerType,//发送目标类型
- });
- };
- this.state.pagination.current = data.data.pageNo;
- this.state.pagination.total = data.data.totalCount;
- };
- this.setState({
- dataSource: theArr,
- pagination: this.state.pagination
- });
- }.bind(this),
- }).always(function () {
- this.setState({
- loading: false
- });
- }.bind(this));
-
- },
- sanhuLoadData(pageNo, apiUrl) {
- this.setState({
- loading: true
- });
- $.ajax({
- method: "post",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + '/api/admin/customer/listAllPersonalCustomer',
- data: {
- pageNo: pageNo || 1,
- pageSize: this.state.pagination.pageSize,
- name: this.state.nameSearch,
- societyTag: this.state.societyTagSearch,
- },
- success: function(data) {
- let theArr = [];
- if(data.error.length || data.data.list == "") {
- if(data.error && data.error.length) {
- message.warning(data.error[0].message);
- };
- } else {
- for(let i = 0; i < data.data.list.length; i++) {
- let thisdata = data.data.list[i];
- theArr.push({
- key: thisdata.uid,
- id: thisdata.uid,
- type: thisdata.type,
- name: thisdata.name,
- status: thisdata.status,
- contacts: thisdata.contacts,
- contactMobile: thisdata.contactMobile,
- industry: thisdata.industry,
- createTime: thisdata.createTime,
- businessAudit: thisdata.businessAudit,
- auditStatus: thisdata.auditStatus,
- lvl: thisdata.lvl,
- isMember: thisdata.isMember,
- status: thisdata.status,
- societyTag: thisdata.societyTag,
- currentMemberStatus: thisdata.currentMemberStatus,
- international: thisdata.international,
- listed: thisdata.listed,
- highTechZone: thisdata.highTechZone,
- locationProvince: thisdata.province ? thisdata.province + '-' + thisdata.city || '' + '-' + thisdata.area : '--'
- });
- };
- };
- this.state.pagination1.current = data.data.pageNo ? data.data.pageNo : '0';
- this.state.pagination1.total = data.data.totalCount ? data.data.totalCount : '0';
- this.setState({
- sanhuDataSource: theArr,
- pagination1: this.state.pagination1
- });
- }.bind(this),
- }).always(function() {
- this.setState({
- loading: false
- });
- }.bind(this));
- },
- sanhuLoadData21(pageNo, apiUrl) {
- this.setState({
- loading: true
- });
- $.ajax({
- method: "post",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + '/api/admin/customer/listAllOrganizationCustomer',
- data: {
- pageNo: pageNo || 1,
- pageSize: this.state.pagination.pageSize,
- name: this.state.nameSearch,
- societyTag: this.state.societyTagSearch,
- },
- success: function(data) {
- let theArr = [];
- if(data.error.length || data.data.list == "") {
- if(data.error && data.error.length) {
- message.warning(data.error[0].message);
- };
- } else {
- for(let i = 0; i < data.data.list.length; i++) {
- let thisdata = data.data.list[i];
- theArr.push({
- key: thisdata.uid,
- id: thisdata.uid,
- type: thisdata.type,
- name: thisdata.name,
- status: thisdata.status,
- contacts: thisdata.contacts,
- contactMobile: thisdata.contactMobile,
- industry: thisdata.industry,
- createTime: thisdata.createTime,
- businessAudit: thisdata.businessAudit,
- auditStatus: thisdata.auditStatus,
- lvl: thisdata.lvl,
- isMember: thisdata.isMember,
- status: thisdata.status,
- societyTag: thisdata.societyTag,
- currentMemberStatus: thisdata.currentMemberStatus,
- international: thisdata.international,
- listed: thisdata.listed,
- highTechZone: thisdata.highTechZone,
- locationProvince: thisdata.province ? thisdata.province + '-' + thisdata.city || '' + '-' + thisdata.area : '--'
- });
- };
- };
- this.state.pagination21.current = data.data.pageNo ? data.data.pageNo : '0';
- this.state.pagination21.total = data.data.totalCount ? data.data.totalCount : '0';
- this.setState({
- sanhuDataSource21: theArr,
- pagination21: this.state.pagination21
- });
- }.bind(this),
- }).always(function() {
- this.setState({
- loading: false
- });
- }.bind(this));
- },
- sanhuLoadData1(pageNo) {
- this.setState({
- loading: true
- });
- $.ajax({
- type: 'get',
- cache: false,
- url: globalConfig.context + "/api/admin/supervise/adminList",
- dataType: "json",
- data: {
- pageNo: pageNo || 1,
- pageSize: this.state.pagination.pageSize,
- province: this.state.searchProvince,
- mobile: this.state.searchMobile,
- name: this.state.searchName,
- department:this.state.departmentt
- },
- success: function (data) {
- let theArr = [];
- if (!data.data) {
- if (data.error && data.error.length) {
- message.warning(data.error[0].message);
- };
- } else {
- for (let i = 0; i < data.data.list.length; i++) {
- let thisdata = data.data.list[i];
- this.state.onlyProvince = thisdata.province;
- theArr.push({
- key: thisdata.id,
- id: thisdata.id,
- mobile: thisdata.mobile,
- name: thisdata.name,
- email: thisdata.email,
- createTime: thisdata.createTime,
- number: thisdata.number,
- province: thisdata.province,
- city:thisdata.city,
- position: thisdata.position,
- departmentName:thisdata.departmentName,
- departmentId:thisdata.departmentId,
- superior: thisdata.superior,
- superiorId: thisdata.superiorId,
- createTimeFormattedDate: thisdata.createTimeFormattedDate
- });
- };
- this.state.pagination2.current = data.data.pageNo;
- this.state.pagination2.total = data.data.totalCount;
- };
- this.setState({
- sanhuDataSource1: theArr,
- pagination2: this.state.pagination2
- });
- }.bind(this),
- }).always(function () {
- this.setState({
- loading: false
- });
- }.bind(this));
- },
- //分公司列表和搜索
- fengongsiLoadData(pageNo) {
- this.state.data = [];
- this.setState({
- loading: true
- });
- let nameText=this.state.departmentArr;
- let superText=(this.state.superId)?nameText[parseInt(this.state.superId)].name:"";
- $.ajax({
- method: "post",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + '/api/admin/organization/listOrganizationManagement',
- data: {
- pageNo: pageNo || 1,
- pageSize: this.state.pagination.pageSize,
- name: this.state.name, //组织名称
- superId:superText,//上级组织
- type:this.state.type,//组织类型
- depNo:this.state.depNo,//组织编号
- },
- success: function (data) {
- let theArr = [];
- if (!data.data || !data.data.list) {
- if (data.error && data.error.length) {
- message.warning(data.error[0].message);
- };
- } else {
- for (let i = 0; i < data.data.list.length; i++) {
- let thisdata = data.data.list[i];
- theArr.push({
- key: thisdata.id,
- id: thisdata.id,//每一条记录的ID
- depNo:thisdata.depNo,//组织编号
- name:thisdata.name,//组织名称
- type:thisdata.type,//组织类型
- managerId:thisdata.managerId,//负责人
- superId:thisdata.superId,//上级组织
- status:thisdata.status,//组织状态
- });
- };
- this.state.pagination3.current = data.data.pageNo;
- this.state.pagination3.total = data.data.totalCount;
- };
- this.setState({
- fengongsiDataSource: theArr,
- pagination3: this.state.pagination3
- });
- }.bind(this),
- }).always(function () {
- this.setState({
- loading: false
- });
- }.bind(this));
-
- },
- jueseLoadData(pageNo) {
- this.state.data = [];
- this.setState({
- loading: true
- });
- $.ajax({
- method: "post",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + '/api/admin/roles',
- data: {
- pageNo: pageNo || 1,
- pageSize: this.state.pagination.pageSize,
- roleName:this.state.roleNameSearch,
- },
- success: function (data) {
- let theArr = [];
- if (!data.data) {
- if (data.error && data.error.length) {
- message.warning(data.error[0].message);
- };
- } else {
- for (let i = 0; i < data.data.list.length; i++) {
- let thisdata = data.data.list[i];
- theArr.push({
- key: thisdata.id,
- id: thisdata.id,
- roleName: thisdata.roleName,
- creater:thisdata.creater,
- createTime:thisdata.createTimez,
- });
- };
- this.state.pagination4.current = data.data.pageNo;
- this.state.pagination4.total = data.data.totalCount;
- };
- this.setState({
- jueseDataSource: theArr,
- pagination4: this.state.pagination4
- });
- }.bind(this),
- }).always(function () {
- this.setState({
- loading: false
- });
- }.bind(this));
- },
- getInitialState() {
- return {
- data: [],
- sanhu:[],
- objText:[],
- callnub:'0',
- sendType:'0',
- showAdd: false,
- showDesc: false,
- expandedKeys: [],
- autoExpandParent: true,
- selectedKeys: [],
- searchMore: true,
- selectedRowKeys: [],
- selectedRows: [],
- loading: false,
- pagination: {
- defaultCurrent: 1,
- defaultPageSize: 10,
- showQuickJumper: true,
- pageSize: 10,
- onChange: function (page) {
- this.loadData(page,this.state.sendType);
- }.bind(this),
- showTotal: function (total) {
- return '共' + total + '条数据';
- }
- },
- pagination1: {
- defaultCurrent: 1,
- defaultPageSize: 10,
- showQuickJumper: true,
- pageSize: 10,
- onChange: function (page) {
- this.sanhuLoadData(page);
- }.bind(this),
- showTotal: function (total) {
- return '共' + total + '条数据';
- }
- },
- pagination21: {
- defaultCurrent: 1,
- defaultPageSize: 10,
- showQuickJumper: true,
- pageSize: 10,
- onChange: function (page) {
- this.sanhuLoadData21(page);
- }.bind(this),
- showTotal: function (total) {
- return '共' + total + '条数据';
- }
- },
- pagination2: {
- defaultCurrent: 1,
- defaultPageSize: 10,
- showQuickJumper: true,
- pageSize: 10,
- onChange: function (page) {
- this.sanhuLoadData1(page);
- }.bind(this),
- showTotal: function (total) {
- return '共' + total + '条数据';
- }
- },
- pagination3: {
- defaultCurrent: 1,
- defaultPageSize: 10,
- showQuickJumper: true,
- pageSize: 10,
- onChange: function (page) {
- this.fengongsiLoadData(page);
- }.bind(this),
- showTotal: function (total) {
- return '共' + total + '条数据';
- }
- },
- pagination4: {
- defaultCurrent: 1,
- defaultPageSize: 10,
- showQuickJumper: true,
- pageSize: 10,
- onChange: function (page) {
- this.jueseLoadData(page);
- }.bind(this),
- showTotal: function (total) {
- return '共' + total + '条数据';
- }
- },
- columns: [
- {
- title: '消息时间',
- dataIndex: 'createTime',
- key: 'createTime',
- width:'150px',
- }, {
- title: '消息标题',
- dataIndex: 'title',
- key: 'title',
- width:'300px',
- },{
- title: '消息内容',
- dataIndex: 'body',
- key: 'body',
- },{
- title: '消息类型',
- dataIndex: 'subject',
- key: 'subject',
- width:'100px',
- render: text => { return getMessageType(text) }
- },{
- title: '发送目标',
- dataIndex: 'consumerType',
- key: 'consumerType',
- width:'100px',
- render: text => { return getDesignated(text) }
-
- }
- ],
- dataSource: [],
- sanhuColumns1: [
- {
- title: '编号',
- dataIndex: 'number',
- key: 'number'
- }, {
- title: '登录账号',
- dataIndex: 'mobile',
- key: 'mobile'
- }, {
- title: '名字',
- dataIndex: 'name',
- key: 'name'
- }, {
- title: '职位',
- dataIndex: 'position',
- key: 'position'
- },{
- title: '部门',
- dataIndex: 'departmentName',
- key: 'departmentName'
- }, {
- title: '上级管理员',
- dataIndex: 'superior',
- key: 'superior'
- }, {
- title: '邮箱',
- dataIndex: 'email',
- key: 'email'
- }, {
- title: '创建时间',
- dataIndex: 'createTimeFormattedDate',
- key: 'createTimeFormattedDate'
- }
- ],
- sanhuDataSource1: [],
- sanhuColumns: [{
- title: '客户名称',
- dataIndex: 'name',
- key: 'name',
- },{
- title: '地区',
- dataIndex: 'locationProvince',
- key: 'locationProvince',
- }, {
- title: '联系人',
- dataIndex: 'contacts',
- key: 'contacts',
- },
- {
- title: '联系电话',
- dataIndex: 'contactMobile',
- key: 'contactMobile',
- },
- {
- title: '行业',
- dataIndex: 'industry',
- key: 'industry',
- },
- {
- title: '社会性质',
- dataIndex: 'societyTag',
- key: 'societyTag',
- render: text => { return getSocialAttribute(text) }
- },
- {
- title: '创建时间',
- dataIndex: 'createTime',
- key: 'createTime',
- },
- {
- title: '会员等级',
- dataIndex: 'lvl',
- key: 'lvl',
- render: text => { return getLvl(text) }
- },
- {
- title: '会员状态',
- dataIndex: 'currentMemberStatus',
- key: 'currentMemberStatus',
- render: text => { return getCurrentMember(text) }
- },
- {
- title: '账户状态',
- dataIndex: 'status',
- key: 'status',
- render: text => { return getStatuslist(text) }
- }
- ],
- sanhuDataSource: [],
- sanhuColumns21: [{
- title: '客户名称',
- dataIndex: 'name',
- key: 'name',
- },
- {
- title: '地区',
- dataIndex: 'locationProvince',
- key: 'locationProvince',
- }, {
- title: '联系人',
- dataIndex: 'contacts',
- key: 'contacts',
- },
- {
- title: '联系电话',
- dataIndex: 'contactMobile',
- key: 'contactMobile',
- },
- {
- title: '行业',
- dataIndex: 'industry',
- key: 'industry',
- },
- {
- title: '社会性质',
- dataIndex: 'societyTag',
- key: 'societyTag',
- render: text => { return getSocialAttribute(text) }
- },
- {
- title: '创建时间',
- dataIndex: 'createTime',
- key: 'createTime',
- },
- {
- title: '会员状态',
- dataIndex: 'currentMemberStatus',
- key: 'currentMemberStatus',
- render: text => { return getCurrentMember(text) }
- },
- {
- title: '账户状态',
- dataIndex: 'status',
- key: 'status',
- render: text => { return getStatuslist(text) }
- }
- ],
- sanhuDataSource21: [],
- fengongsiColumns: [
- {
- title: '组织编号',
- dataIndex: 'depNo',
- key: 'depNo',
- }, {
- title: '组织名称',
- dataIndex: 'name',
- key: 'name',
- }, {
- title: '负责人',
- dataIndex: 'managerId',
- key: 'managerId',
- },{
- title: '组织类型',
- dataIndex: 'type',
- key: 'type',
- render: text => { return getPattern(text) }
- }, {
- title: '上级组织',
- dataIndex: 'superId',
- key: 'superId',
- },{
- title: '组织状态',
- dataIndex: 'status',
- key: 'status',
- render: text => { return getCondition(text) }
-
- }
- ],
- fengongsiDataSource: [],
- jueseColumns: [
- {
- title: '角色名称',
- dataIndex: 'roleName',
- key: 'roleName',
- width:'300px'
- }, {
- title: '创建人',
- dataIndex: 'creater',
- key: 'creater',
- width:'300px'
- }, {
- title: '创建时间',
- dataIndex: 'createTime',
- key: 'createTime',
- }
- ],
- jueseDataSource: [],
- };
- },
- componentWillMount() {
- this.loadData(1,0);
- },
- //部门
- departmentList() {
- this.setState({
- loading: true
- });
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/organization/selectSuperId",
- data: {
-
- },
- success: function(data) {
- let thedata = data.data;
- let theArr=[];
- if(!thedata) {
- if(data.error && data.error.length) {
- message.warning(data.error[0].message);
- };
- thedata = {};
- }else{
- thedata.map(function(item,index){
- theArr.push({
- key:index,
- name:item.name,
- id:item.id,
- depNo:item.depNo
- })
- })
- }
- this.setState({
- departmentArr:theArr,
- })
- }.bind(this),
- }).always(function() {
- this.setState({
- loading: false
- });
- }.bind(this));
- },
-
- //整行点击
- bianji(record, index) {
- this.state.RowData = record;
- this.setState({
- editvisible: true,
- selectedRowKeys:[],
- rowId:record.businessId,
- })
- let deletedIds ='';
- for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
- let rowItem = this.state.selectedRows[idx];
- if (rowItem.id) {
- deletedIds=rowItem.id;
- };
- };
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context +"/api/admin/message/getSystemMessageDetail" ,
- data: {
- messageId: deletedIds
- },
- success: function (data) {
- let theArr = [];
- let thisdata = data.data;
- if (!data) {
- if (data.error && data.error.length) {
- message.warning(data.error[0].message);
- };
- } else {
- theArr.push({
- editId: thisdata.messageId,//每一条消息的ID
- editTitle:thisdata.title,//消息标题
- editBody:thisdata.body,//消息内容
- editCreateTime:thisdata.createTime,//消息时间
- editSubject:thisdata.subject,//消息类型
- editConsumerType:thisdata.consumerType,//消息发送对象
- });
- };
- this.setState({
- editId: thisdata.messageId,//每一条消息的ID
- editTitle:thisdata.title,//消息标题
- editBody:thisdata.body,//消息内容
- editCreateTime:thisdata.createTime,//消息时间
- editSubject:thisdata.subject,//消息类型
- editConsumerType:thisdata.consumerType,//上级组织
- editDataSource: theArr,
- });
- }.bind(this),
- }).always(function () {
- this.setState({
- loading: false
- });
- }.bind(this));
- },
- //草稿删除
- delectRow() {
- let deletedIds ='';
- for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
- let rowItem = this.state.selectedRows[idx];
- if (rowItem.id) {
- deletedIds=rowItem.id;
- };
- };
- this.setState({
- selectedRowKeys: [],
- loading: deletedIds.length > 0
- });
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/message/deleteSystemMessage",
- data: {
- messageId: deletedIds
- }
- }).done(function (data) {
- if (!data.error.length) {
- message.success('删除成功!');
- this.loadData(1,1);
- this.setState({
- loading: false,
- });
- } else {
- message.warning(data.error[0].message);
- };
-
- }.bind(this));
- },
- //新增一个部门,保存
- addhandleSubmit(e,isDraft){
- e.preventDefault();
- 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);
- if(!this.state.addContent){
- message.warning('请输入消息内容');
- return false;
- }
- if(!this.state.addType){
- message.warning('请选择消息类型');
- return false;
- }
- if(!duixiang){
- message.warning('请指定发送对象');
- return false;
- }
- let diquText=this.state.diqu;
- let pro=[];
- let city=[];
- let dis=[];
- if(this.state.diqu){
- for(var i=0;i<diquText.length;i++){
- if(diquText[i]<=34){
- pro.push(diquText[i])
- }else if(diquText[i]>34&&diquText[i]<380){
- city.push(diquText[i])
- }else{
- dis.push(diquText[i])
- }
- }
- }else{
- pro=undefined;
- city=undefined;
- dis=undefined;
- }
- this.props.form.validateFields((err, values) => {
- if (!err) {
- this.setState({
- loading: true
- });
- $.ajax({
- method: "post",
- dataType: "json",
- crossDomain: false,
- url:globalConfig.context + '/api/admin/message/createSystemMessage',
- data:{
- title:this.state.addTitle,//消息标题
- body:this.state.addContent,//消息内容
- subject:this.state.addType,//消息类型
- targetType:this.state.addObject, //指定对象
- createTime:this.state.addCreateTime, //创建时间
- isDraft:isDraft,//是否存为草稿
- personalUserIds:this.state.sanhu?this.state.sanhu.join(","):undefined,//散户
- organizationUserIds:this.state.sanhu21?this.state.sanhu21.join(","):undefined,//散户
- societyTags:this.state.shehui?this.state.shehui.join(","):undefined,//社会属性
- provinceIds:pro?pro.join(","):undefined,//省
- cityIds:city?city.join(","):undefined,//市
- areaIds:dis?dis.join(","):undefined,//区
- industryIds:this.state.hangye?this.state.hangye.join(","):undefined,//行业
- companyIds:this.state.fengongsi?this.state.fengongsi.join(","):undefined,//分公司
- adminIds:this.state.yonghu?this.state.yonghu.join(","):undefined,//用户
- roles:this.state.juese?this.state.juese.join(","):undefined,//角色
- }
- }).done(function (data) {
- this.setState({
- loading: false
- });
- if (!data.error.length) {
- message.success('保存成功!');
- this.handleCancel();
- this.loadData(1,this.state.callnub);
- } else {
- message.warning(data.error[0].message);
- }
- }.bind(this));
- }
- });
- },
- add(e){
- e.preventDefault();
- this.addhandleSubmit(e,0);
- },
- adds(e){
- e.preventDefault();
- this.addhandleSubmit(e,1);
- },
- edit(e){
- e.preventDefault();
- this.editDraft(e,0);
- },
- edits(e){
- e.preventDefault();
- this.editDraft(e,1);
- },
- //编辑一个部门,保存或者存为草稿
- editDraft(e,isDraft){
- e.preventDefault();
- if(!this.state.editTitle){
- message.warning('请输入消息标题');
- return false;
- }
- if(!this.state.editBody){
- message.warning('请选择消息内容');
- return false;
- }
- this.props.form.validateFields((err, values) => {
- if (!err) {
- this.setState({
- loading: true
- });
- $.ajax({
- method: "post",
- dataType: "json",
- crossDomain: false,
- url:globalConfig.context + '/api/admin/message/updateSystemMessage',
- data:{
- messageId:this.state.editId,//消息ID
- body:this.state.editBody,//消息内容
- title:this.state.editTitle,//消息标题
- isDraft:isDraft,//是否存为草稿
- }
- }).done(function (data) {
- this.setState({
- loading: false
- });
- if (!data.error.length) {
- message.success('保存成功!');
- this.edithandleCancel();
-
- } else {
- message.warning(data.error[0].message);
- }
- }.bind(this));
- }
- });
- },
- //主管初始加载(自动补全)
- supervisor(e){
- $.ajax({
- method: "post",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/organization/selectName",
- data:{
- name:e
- },
- success: function (data) {
- let thedata=data.data;
- if (!thedata) {
- if (data.error && data.error.length) {
- message.warning(data.error[0].message);
- };
- thedata = {};
- };
- this.setState({
- customerArr:thedata,
- });
- }.bind(this),
- }).always(function () {
- this.setState({
- loading: false
- });
- }.bind(this));
- },
- //上级主管输入框失去焦点是判断客户是否存在
- selectAuto(value,options){
- this.setState({
- managerIdOrganization:value
- })
- },
- //失去焦点时
- blurChange(e){
- this.setState({
- theTypes:e
- })
- },
- //消息发送列表切换数据处理
- callback(e) {
- this.setState({
- callnub: e,
- })
- if(e == 0) {
- this.setState({
- bianjiMore: false,
- selectedRowKeys:[],
- sendType:0,
- })
- this.loadData(1,0);
- }
- if(e == 1) {
- this.setState({
- bianjiMore: true,
- selectedRowKeys:[],
- sendType:1,
- })
- this.loadData(1,1);
- }
- },
- //切换系统消息类型
- changeNews(e){
- if(e == 1) {
- this.setState({
- newsChange: false,
- addObject:undefined,
- })
- }
- if(e == 0) {
- this.setState({
- newsChange: true ,
- addObject:undefined,
- })
- }
- },
- //切换创建系统消息中的指定发送对象
- selectObjects(e) {
- this.setState({
- addObject:e
- })
- if(e == 61) {
- this.sanhuReset();
- this.setState({ visible1: true })
-
- }
- if(e == 62) {
- this.sanhuReset21();
- this.setState({ visible21: true })
-
- }
- if(e == 1) {
- this.setState({ visible2: true })
- }
- if(e == 2) {
- this.setState({ visible4: true })
- }
- if(e == 0) {
- this.setState({ visible5: true })
- }
-
- },
- changeObjects(){
- this.objectReset();
- },
- changeObjects1(e){
- this.setState({
- addObject:e
- })
- if(e == 5) {
- this.sanhuReset1();
- this.setState({ visible6: true })
-
- }
- if(e == 4) {
- this.jueseReset();
- this.setState({ visible7: true })
-
- }
- if(e == 3) {
- this.fengongsiLoadData();
- this.setState({ visible3: true })
- }
- },
- //值改变时请求客户名称
- httpChange(e){
- if(e.length>=2){
- this.supervisor(e);
- }
- this.setState({
- managerIdOrganization:e
- })
- },
- //修复账号
- repairData(){
- this.setState({
- loading: true
- });
- $.ajax({
- method: "post",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context +"/api/admin/lockAdmin" ,
- success: function (data) {
- if (!data.data) {
- if (data.error && data.error.length) {
- message.warning(data.error[0].message);
- };
- }
- if(!data.error.length){
- message.success('操作成功');
- }
- }.bind(this),
- }).always(function () {
- this.setState({
- loading: false
- });
- }.bind(this));
- },
- addClick() {
- this.state.addTitle= undefined;//消息标题
- this.state.addContent= undefined;//消息内容
- this.state.addType= undefined;//消息类型
- this.state.addObject= undefined; //指定对象
- this.state.RowData = {};
- this.setState({
- visible: true
- });
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context +"/api/admin/message/toCreateSystemMessage" ,
- data: {
-
- },
- success: function (data) {
- let thisdata = data.data;
- this.setState({
- addCreateTime: thisdata.createTime,//每一条消息的时间
- });
- }.bind(this),
- }).always(function () {
- this.setState({
- loading: false
- });
- }.bind(this));
-
- },
- editClick() {
- this.state.RowData = {};
- this.setState({
- editvisible: true
- });
- },
- handleCancel() {
- this.state.addTitle= undefined;//消息标题
- this.state.addContent= undefined;//消息内容
- this.state.addType= undefined;//消息类型
- this.state.addObject= undefined; //指定对象
- this.setState({ visible: false })
- },
- handleCancel1() {
- this.setState({ visible1: false })
- },
- handleCancel21() {
- this.setState({ visible21: false })
- },
- handleCancel2() {
- this.setState({ visible2: false })
- },
- handleCancel3() {
- this.setState({ visible3: false })
- },
- handleCancel4() {
- this.setState({ visible4: false })
- },
- handleCancel5() {
- this.setState({ visible5: false })
- },
- handleCancel6() {
- this.setState({ visible6: false })
- },
- handleCancel7() {
- this.setState({ visible7: false })
- },
- edithandleCancel() {
- this.setState({ editvisible: false })
- },
- //地区多选
- onExpand(expandedKeys){
- this.setState({
- expandedKeys,
- autoExpandParent: false,
- });
- },
- onCheck(checkedKeys){
- this.setState({
- checkedKeys:checkedKeys
- });
- },
- onSelectDi(selectedKeys, info){
- this.setState({ selectedKeys });
- },
- renderTreeNodes(data){
- return provinceList.map((item) => {
- return(
- <TreeNodet title={item.name} key={item.id} dataRef={item}>
- {item.cityList.map((item) => {
- return(
- <TreeNodet title={item.name} key={item.id} dataRef={item}>
- {item.areaList.map((item) => {
- return(
- <TreeNodet title={item.name} key={item.id} dataRef={item}>
-
- </TreeNodet>
- );
- })
- }
- </TreeNodet>
- );
- })
- }
- </TreeNodet>
- );
-
- return <TreeNodet {...item} />;
- });
- },
- search() {
- this.loadData();
- },
- //个人客户搜索
- sanhusearch(){
- this.sanhuLoadData();
- },
- //单位客户搜索
- sanhusearch21(){
- this.sanhuLoadData21();
- },
- //用户搜索
- sanhusearch1(){
- this.sanhuLoadData1();
- },
- //用户搜索
- juesesearch(){
- this.jueseLoadData();
- },
- //个人客户重置
- sanhuReset() {
- this.state.nameSearch = '';
- this.state.societyTagSearch = undefined;
- this.sanhuLoadData();
- },
- //单位客户重置
- sanhuReset21() {
- this.state.nameSearch = '';
- this.state.societyTagSearch = undefined;
- this.sanhuLoadData21();
- },
- //用户重置
- sanhuReset1() {
- this.state.departmentt=undefined;
- this.state.searchMobile = undefined;
- this.state.searchName = undefined;
- this.state.searchProvince = undefined;
- this.sanhuLoadData1();
- },
- //角色重置
- jueseReset() {
- this.state.roleNameSearch='';
- this.jueseLoadData();
- },
- //把搜索的部分置零
- reset() {
- this.state.addTitle= undefined;//消息标题
- this.state.addContent= undefined;//消息内容
- this.state.addType= undefined;//消息类型
- this.state.addObject= undefined; //指定对象
- this.loadData(1,0);
- },
- searchSwitch() {
- this.setState({
- searchMore: !this.state.searchMore
- });
- },
- //选择发送对象时的数据处理
- //指定对象清零
- objectReset(){
- this.state.sanhu=undefined;
- this.state.sanhu21=undefined;
- this.state.yonghu=undefined;
- this.state.juese=undefined;
- this.state.shehui=undefined;
- this.state.diqu=undefined;
- this.state.fengongsi=undefined;
- this.state.hangye=undefined;
- },
- rowReset(){
- this.state.selectedRowKeys=[];
- },
- //散户
- sanhuSubmit(e){
- e.preventDefault();
- this.objectReset();
- this.setState({
- sanhu:this.state.selectedRowKeys
- });
- this.rowReset();
- this.handleCancel1();
- },//散户
- sanhuSubmit21(e){
- e.preventDefault();
- this.objectReset();
- this.setState({
- sanhu21:this.state.selectedRowKeys
- });
- this.rowReset();
- this.handleCancel21();
- },
- //用户
- yonghuSubmit(e){
- e.preventDefault();
- this.objectReset();
- this.setState({
- yonghu:this.state.selectedRowKeys
- });
- this.rowReset();
- this.handleCancel6();
- },
- //角色
- jueseSubmit(e){
- e.preventDefault();
- this.objectReset();
- this.setState({
- juese:this.state.selectedRowKeys
- });
- this.rowReset();
- this.handleCancel7();
- },
- //社会属性
- shehuiSubmit(e){
- e.preventDefault();
- this.setState({
- shehui:this.state.shehui
- });
- this.handleCancel2();
- },
- //分公司
- fengongsiSubmit(e){
- e.preventDefault();
- this.objectReset();
- this.setState({
- fengongsi:this.state.selectedRowKeys
- });
- this.rowReset();
- this.handleCancel3();
- },
- //地区
- diquSubmit(e){
- e.preventDefault();
- this.objectReset();
- this.setState({
- diqu:this.state.checkedKeys
- });
-
- this.handleCancel4();
- },
- //行业
- hangyeSubmit(e){
- e.preventDefault();
- this.setState({
- hangye:this.state.hangye
- });
- this.handleCancel5();
- },
- changeList(arr) {
- const newArr = [];
- this.state.columns.forEach(item => {
- arr.forEach(val => {
- if (val === item.title) {
- newArr.push(item);
- }
- });
- });
- this.setState({
- changeList: newArr
- });
- },
- render() {
- let departmentArr = this.state.departmentArr || [];
- const FormItem = Form.Item
- const rowSelection = {
- selectedRowKeys: this.state.selectedRowKeys,
- onChange: (selectedRowKeys, selectedRows) => {
- this.setState({
- selectedRows: selectedRows.slice(-1),
- selectedRowKeys: selectedRowKeys.slice(-1)
- });
- },
- onSelect: (recordt, selected, selectedRows) => {
- this.setState({
- recordt:recordt.id
- })
- },
- };
- const rowSelections = {
- selectedRowKeys: this.state.selectedRowKeys,
- onChange: (selectedRowKeys, selectedRows) => {
- this.setState({
- selectedRows: selectedRows,
- selectedRowKeys: selectedRowKeys
- });
- },
- onSelect: (recordt, selected, selectedRows) => {
- this.setState({
- recordt:recordt.id
- })
- },
- };
- const formItemLayout = {
- labelCol: { span: 8 },
- wrapperCol: { span: 14 },
- };
- const { getFieldDecorator } = this.props.form;
- const hasSelected = this.state.selectedRowKeys.length > 0;
- const { RangePicker } = DatePicker;
- const dataSources=this.state.customerArr || [];
- const options = dataSources.map((group,index) =>
- <Option key={index} value={group.name}>{group.name}</Option>
- )
- return (
- <div className="user-content" >
- <div className="content-title">
- <Tabs defaultActiveKey="1" className="test">
- <TabPane tab="搜索" key="1">
- <div className="user-search">
- <Button type="danger" className="addButton" onClick={this.repairData}>禁用默认账号</Button>
- <Button type="primary" className="addButton" onClick={this.addClick}>创建系统消息<Icon type="plus" /></Button>
- <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>
- <div style={!this.state.bianjiMore ? { display: 'none',float:'right',marginRight:'10px'} : {display: 'inline-block',float:'right',marginRight:'10px',marginTop:'10px'}}>
- <Popconfirm title="是否删除?" onConfirm={this.delectRow} okText="是" cancelText="否">
- <Button style={{ background: "#ea0862", border: "none", color: "#fff",marginRight:'10px' ,marginLeft:'10px'}}
- disabled={!hasSelected}
- >删除<Icon type="minus" />
- </Button>
- </Popconfirm>
- </div>
- </div>
- </TabPane>
- <TabPane tab="更改表格显示数据" key="2">
- <div style={{ marginLeft: 10 }}>
- <ChooseList
- columns={this.state.columns}
- changeFn={this.changeList}
- changeList={this.state.changeList}
- top={55}
- margin={11}
- />
- </div>
- </TabPane>
- </Tabs>
- <div className="clearfix" style={{marginLeft:'20px'}}>
- <Tabs onChange={this.callback} type="card" activeKey={this.state.callnub} style={{paddingLeft:'15px',paddingRight:'15px',marginRight:'20px'}}>
- <TabPane tab="已发送" key="0" ></TabPane>
- <TabPane tab="未发送" key="1"></TabPane>
- </Tabs>
- </div>
- <div className="patent-table">
- <Spin spinning={this.state.loading}>
- <Table columns={
- this.state.changeList
- ? this.state.changeList
- : this.state.columns
- }
- dataSource={this.state.dataSource}
- rowSelection={rowSelection}
- pagination={this.state.pagination}
- onRowClick={this.tableRowClick} />
- </Spin>
- </div>
-
- <div className="patent-desc">
- <Modal maskClosable={false} visible={this.state.visible}
- onOk={this.checkPatentProcess} onCancel={this.handleCancel}
- width='600px'
- title='新建系统消息'
- footer=''
- className="admin-desc-content">
- <Form horizontal onSubmit={this.add} id="add-form">
- <Spin spinning={this.state.loading}>
- <div className="clearfix">
- <FormItem
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 18 }}
- label="消息标题" >
- <Input placeholder="消息标题" value={this.state.addTitle} style={{width:'95%'}}
- onChange={(e)=>{this.setState({addTitle:e.target.value})}} required="required"/>
- <span className="mandatory" style={{color:'red',marginLeft:'5px'}}>*</span>
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 18 }}
- label="创建时间"
- >
- <span>{this.state.addCreateTime}</span>
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 18 }}
- label="消息内容" >
- <Input type="textarea" rows={4} placeholder="消息内容" value={this.state.addContent}
- onChange={(e) => { this.setState({ addContent: e.target.value }) }} style={{width:'95%'}}/>
- <span className="mandatory" style={{color:'red',marginLeft:'5px'}}>*</span>
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 18 }}
- label="消息类型"
- >
- <Select placeholder="消息类型" value={this.state.addType}
- onChange={(e)=>{this.setState({addType:e})}} style={{width:'95%'}} required="required"
- onSelect={this.changeNews}>
- {
- messageType.map(function(item) {
- return <Select.Option key={item.value} >{item.key}</Select.Option>
- })
- }
- </Select>
- <span className="mandatory" style={{color:'red',marginLeft:'5px'}}>*</span>
- </FormItem>
- </div>
- <div className="clearfix" >
- <FormItem
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 18 }}
- label="指定发送对象"
- style={this.state.newsChange ? { display: 'none' } : {display: 'inline-block',width:'100%'}}
- >
- <Select placeholder="指定发送对象" value={this.state.addObject}
- onSelect={this.selectObjects} onChange={this.changeObjects} required="required" style={{width:'95%'}}>
- {
- designatedObjects.map(function(item) {
- return <Select.Option key={item.value} >{item.key}</Select.Option>
- })
- }
- </Select>
- <span className="mandatory" style={{color:'red',marginLeft:'5px'}}>*</span>
- </FormItem>
- </div>
- <div className="clearfix" >
- <FormItem
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 18 }}
- label="指定发送对象"
- style={!this.state.newsChange ? { display: 'none' } : {display: 'inline-block',width:'100%'}}
- >
- <Select placeholder="指定发送对象" value={this.state.addObject}
- onSelect={this.changeObjects1} required="required" style={{width:'95%'}}>
- {
- designatedObjectse.map(function(item) {
- return <Select.Option key={item.value} >{item.key}</Select.Option>
- })
- }
- </Select>
- <span className="mandatory" style={{color:'red',marginLeft:'5px'}}>*</span>
- </FormItem>
- </div>
- <FormItem wrapperCol={{ span: 18, offset: 5 }}>
- <Button className="set-submit" type="primary" htmlType="submit">发送</Button>
- <Button className="set-submit" type="ghost" onClick={this.adds} style={{marginLeft:'10px'}}>存为草稿</Button>
- <Button className="set-submit" type="ghost" onClick={this.handleCancel} style={{marginLeft:'10px'}}>取消</Button>
- </FormItem>
- </Spin>
- </Form >
- </Modal>
- </div>
- <div className="patent-desc">
- <Modal maskClosable={false} visible={this.state.editvisible}
- onOk={this.checkPatentProcess} onCancel={this.edithandleCancel}
- width='600px'
- title='编辑系统消息'
- footer=''
- className="admin-desc-content">
- <Form horizontal onSubmit={this.edit} id="add-form">
- <Spin spinning={this.state.loading}>
- <div className="clearfix">
- <FormItem
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 18 }}
- label="消息标题" >
- <Input placeholder="消息标题" value={this.state.editTitle} style={{width:'95%'}}
- onChange={(e)=>{this.setState({editTitle:e.target.value})}} required="required"/>
- <span className="mandatory" style={{color:'red',marginLeft:'5px'}}>*</span>
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 18 }}
- label="消息内容" >
- <Input type="textarea" rows={4} placeholder="消息内容" value={this.state.editBody}
- onChange={(e) => { this.setState({ editBody: e.target.value }) }} style={{width:'95%'}}/>
- <span className="mandatory" style={{color:'red',marginLeft:'5px'}}>*</span>
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 18 }}
- label="消息时间"
- >
- <span>{this.state.editCreateTime}</span>
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 18 }}
- label="消息类型"
- >
- <span>{getMessageType(this.state.editSubject)}</span>
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 18 }}
- label="指定发送对象"
- >
- <span>{getDesignated(this.state.editConsumerType)}</span>
- </FormItem>
- </div>
- <FormItem wrapperCol={{ span: 18, offset: 5 }}>
- <Button className="set-submit" type="primary" htmlType="submit">发送</Button>
- <Button className="set-submit" type="ghost" onClick={this.edits} style={{marginLeft:'10px'}}>存为草稿</Button>
- <Button className="set-submit" type="ghost" onClick={this.edithandleCancel} style={{marginLeft:'10px'}}>取消</Button>
- </FormItem>
- </Spin>
- </Form >
- </Modal>
- </div>
- <div className="patent-desc">
- <Modal maskClosable={false} visible={this.state.visible6}
- onOk={this.checkPatentProcess} onCancel={this.handleCancel6}
- width='1100px'
- title='用户列表'
- footer=''
- className="admin-desc-content">
- <Form horizontal onSubmit={this.yonghuSubmit} id="add-form">
- <Spin spinning={this.state.loading}>
- <div className="user-search">
- <Input placeholder="登录号" style={{width:'100px',marginRight:'10px',marginBottom:'10px'}}
- value={this.state.searchMobile}
- onChange={(e) => { this.setState({ searchMobile: e.target.value }); }} />
- <Input placeholder="管理员名字" style={{width:'100px',marginRight:'10px',marginBottom:'10px'}}
- value={this.state.searchName}
- onChange={(e) => { this.setState({ searchName: e.target.value }); }} />
- <Button type="primary" onClick={this.sanhusearch1} style={{marginRight:'10px'}}>搜索</Button>
- <Button onClick={this.sanhuReset1} style={{marginRight:'10px'}}>重置</Button>
- </div>
- <div className="foster-table">
- <Spin spinning={this.state.loading}>
- <Table columns={this.state.sanhuColumns1}
- dataSource={this.state.sanhuDataSource1}
- rowSelection={rowSelections}
- pagination={this.state.pagination2}
- onRowClick={this.tableRowClick} />
- </Spin>
- </div>
- <FormItem wrapperCol={{ span: 12, offset: 7 }}>
- <Button className="set-submit" type="primary" htmlType="submit">选定</Button>
- <Button className="set-submit" type="ghost" onClick={this.handleCancel6} style={{marginLeft:'100px'}}>取消</Button>
- </FormItem>
- </Spin>
- </Form >
- </Modal>
- </div>
- <div className="patent-desc">
- <Modal maskClosable={false} visible={this.state.visible7}
- onOk={this.checkPatentProcess} onCancel={this.handleCancel7}
- width='1200px'
- title='角色列表'
- footer=''
- className="admin-desc-content">
- <Form horizontal onSubmit={this.jueseSubmit} id="add-form">
- <Spin spinning={this.state.loading}>
- <div className="user-search">
- <Input placeholder="角色名称" style={{width:'100px',marginRight:'10px',marginBottom:'10px'}}
- value={this.state.roleNameSearch}
- onChange={(e) => { this.setState({ roleNameSearch: e.target.value }); }} />
- <Button type="primary" onClick={this.juesesearch} style={{marginRight:'10px'}}>搜索</Button>
- <Button onClick={this.jueseReset}>重置</Button>
- </div>
- <div className="foster-table">
- <Spin spinning={this.state.loading}>
- <Table columns={this.state.jueseColumns}
- dataSource={this.state.jueseDataSource}
- rowSelection={rowSelections}
- pagination={this.state.pagination4}
- onRowClick={this.tableRowClick} />
- </Spin>
- </div>
- <FormItem wrapperCol={{ span: 12, offset: 7 }}>
- <Button className="set-submit" type="primary" htmlType="submit">选定</Button>
- <Button className="set-submit" type="ghost" onClick={this.handleCancel7} style={{marginLeft:'100px'}}>取消</Button>
- </FormItem>
- </Spin>
- </Form >
- </Modal>
- </div>
- <div className="patent-desc">
- <Modal maskClosable={false} visible={this.state.visible1}
- onOk={this.checkPatentProcess} onCancel={this.handleCancel1}
- width='1200px'
- title='个人客户'
- footer=''
- className="admin-desc-content">
- <Form horizontal onSubmit={this.sanhuSubmit} id="add-form">
- <Spin spinning={this.state.loading}>
- <div className="user-search">
- <Input placeholder="客户名称" style={{width:'100px',marginRight:'10px',marginBottom:'10px'}}
- value={this.state.nameSearch}
- onChange={(e) => { this.setState({ nameSearch: e.target.value }); }} />
- <Select placeholder="社会性质"
- style={{width:'100px',marginRight:'10px'}}
- value={this.state.societyTagSearch}
- onChange={(e) => { this.setState({ societyTagSearch: e }) }}>
- {
- socialAttribute.map(function (item) {
- return <Select.Option key={item.value} >{item.key}</Select.Option>
- })
- }
- </Select>
-
- <Button type="primary" onClick={this.sanhusearch} style={{marginRight:'10px'}}>搜索</Button>
- <Button onClick={this.sanhuReset} style={{marginRight:'10px'}}>重置</Button>
- </div>
- <div className="foster-table">
- <Spin spinning={this.state.loading}>
- <Table columns={this.state.sanhuColumns}
- dataSource={this.state.sanhuDataSource}
- rowSelection={rowSelections}
- pagination={this.state.pagination1}
- onRowClick={this.tableRowClick} />
- </Spin>
- </div>
- <FormItem wrapperCol={{ span: 12, offset: 7 }}>
- <Button className="set-submit" type="primary" htmlType="submit">选定</Button>
- <Button className="set-submit" type="ghost" onClick={this.handleCancel1} style={{marginLeft:'100px'}}>取消</Button>
- </FormItem>
- </Spin>
- </Form >
- </Modal>
- </div>
- <div className="patent-desc">
- <Modal maskClosable={false} visible={this.state.visible21}
- onOk={this.checkPatentProcess} onCancel={this.handleCancel21}
- width='1200px'
- title='单位客户'
- footer=''
- className="admin-desc-content">
- <Form horizontal onSubmit={this.sanhuSubmit21} id="add-form">
- <Spin spinning={this.state.loading}>
- <div className="user-search">
- <Input placeholder="客户名称" style={{width:'100px',marginRight:'10px',marginBottom:'10px'}}
- value={this.state.nameSearch}
- onChange={(e) => { this.setState({ nameSearch: e.target.value }); }} />
- <Select placeholder="社会性质"
- style={{width:'100px',marginRight:'10px'}}
- value={this.state.societyTagSearch}
- onChange={(e) => { this.setState({ societyTagSearch: e }) }}>
- {
- socialAttribute.map(function (item) {
- return <Select.Option key={item.value} >{item.key}</Select.Option>
- })
- }
- </Select>
- <Button type="primary" onClick={this.sanhusearch21} style={{marginRight:'10px'}}>搜索</Button>
- <Button onClick={this.sanhuReset21} style={{marginRight:'10px'}}>重置</Button>
- </div>
- <div className="foster-table">
- <Spin spinning={this.state.loading}>
- <Table columns={this.state.sanhuColumns21}
- dataSource={this.state.sanhuDataSource21}
- rowSelection={rowSelections}
- pagination={this.state.pagination21}
- onRowClick={this.tableRowClick} />
- </Spin>
- </div>
- <FormItem wrapperCol={{ span: 12, offset: 7 }}>
- <Button className="set-submit" type="primary" htmlType="submit">选定</Button>
- <Button className="set-submit" type="ghost" onClick={this.handleCancel21} style={{marginLeft:'100px'}}>取消</Button>
- </FormItem>
- </Spin>
- </Form >
- </Modal>
- </div>
- <div className="patent-desc">
- <Modal maskClosable={false} visible={this.state.visible2}
- onOk={this.checkPatentProcess} onCancel={this.handleCancel2}
- width='600px'
- title='社会属性'
- footer=''
- className="admin-desc-content">
- <Form horizontal onSubmit={this.shehuiSubmit} id="add-form">
- <Spin spinning={this.state.loading}>
- <FormItem
- labelCol={{ span: 7 }}
- wrapperCol={{ span: 12 }}
- label="请选择社会属性"
- >
- <CheckboxGroup options={socialAttributeS} value={this.state.shehui} onChange={(e)=>{this.setState({shehui:e})}} />
-
- </FormItem>
- <FormItem wrapperCol={{ span: 12, offset: 7 }}>
- <Button className="set-submit" type="primary" htmlType="submit">选定</Button>
- <Button className="set-submit" type="ghost" onClick={this.handleCancel2} style={{marginLeft:'100px'}}>取消</Button>
- </FormItem>
- </Spin>
- </Form >
- </Modal>
- </div>
- <div className="patent-desc">
- <Modal maskClosable={false} visible={this.state.visible3}
- onOk={this.checkPatentProcess} onCancel={this.handleCancel3}
- width='1200px'
- title='分公司列表'
- footer=''
- className="admin-desc-content">
- <Form horizontal onSubmit={this.fengongsiSubmit} id="add-form">
- <Spin spinning={this.state.loading}>
- <div className="foster-table">
- <Spin spinning={this.state.loading}>
- <Table columns={this.state.fengongsiColumns}
- dataSource={this.state.fengongsiDataSource}
- rowSelection={rowSelections}
- pagination={this.state.pagination3}
- onRowClick={this.tableRowClick} />
- </Spin>
- </div>
- <FormItem wrapperCol={{ span: 12, offset: 7 }}>
- <Button className="set-submit" type="primary" htmlType="submit">选定</Button>
- <Button className="set-submit" type="ghost" onClick={this.handleCancel3} style={{marginLeft:'100px'}}>取消</Button>
- </FormItem>
- </Spin>
- </Form >
- </Modal>
- </div>
- <div className="patent-desc">
- <Modal maskClosable={false} visible={this.state.visible4}
- onOk={this.checkPatentProcess} onCancel={this.handleCancel4}
- width='600px'
- title='地区'
- footer=''
- className="admin-desc-content">
- <Form horizontal onSubmit={this.diquSubmit} id="add-form">
- <Spin spinning={this.state.loading}>
- <div className="clearfix" style={{marginLeft:'90px'}}>
- <Tree
- checkable
- onExpand={this.onExpand}
- expandedKeys={this.state.expandedKeys}
- autoExpandParent={this.state.autoExpandParent}
- onCheck={this.onCheck}
- checkedKeys={this.state.checkedKeys}
- onSelect={this.onSelectDi}
- selectedKeys={this.state.selectedKeys}
- >
- {this.renderTreeNodes(this.state.Interface)}
- </Tree>
- </div>
- <FormItem wrapperCol={{ span: 12, offset: 7 }}>
- <Button className="set-submit" type="primary" htmlType="submit">选定</Button>
- <Button className="set-submit" type="ghost" onClick={this.handleCancel4} style={{marginLeft:'100px'}}>取消</Button>
- </FormItem>
- </Spin>
- </Form >
- </Modal>
- </div>
- <div className="patent-desc">
- <Modal maskClosable={false} visible={this.state.visible5}
- onOk={this.checkPatentProcess} onCancel={this.handleCancel5}
- width='600px'
- title='行业'
- footer=''
- className="admin-desc-content">
- <Form horizontal onSubmit={this.hangyeSubmit} id="add-form">
- <Spin spinning={this.state.loading}>
- <FormItem
- labelCol={{ span: 7 }}
- wrapperCol={{ span: 12 }}
- label="请选择行业"
- >
- <CheckboxGroup options={industryS} value={this.state.hangye} onChange={(e)=>{this.setState({hangye:e})}} />
- </FormItem>
- <FormItem wrapperCol={{ span: 12, offset: 7 }}>
- <Button className="set-submit" type="primary" htmlType="submit">选定</Button>
- <Button className="set-submit" type="ghost" onClick={this.handleCancel5} style={{marginLeft:'100px'}}>取消</Button>
- </FormItem>
- </Spin>
- </Form >
- </Modal>
- </div>
- </div>
- </div>
- );
- }
- }));
- export default SystemMessage;
|