| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827 |
- import React from 'react';
- import $ from 'jquery/src/ajax';
- import { provinceList,} from '@/NewDicProvinceList';
- import { Form, Icon, Button, Input, Select, Spin, Table, message, DatePicker, Modal,Popconfirm,Tabs,Checkbox,Tree} from 'antd';
- import {messageType,designatedObjects,socialAttributeS,socialAttribute,industryS,designatedObjectse} from '@/dataDic.js';
- import {getPattern,getCondition,getSocialAttribute,getDesignated,getLvl,getCurrentMember,getStatuslist,getMessageType} from '@/tools.js';
- 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: "post",
- 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
- })
- },
- 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();
- },
- 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">
- <h3>系统消息中心</h3>
- <div className="user-search" style={{overflow:'hidden',marginBottom:0}}>
- <Button type="primary" className="addButton" onClick={this.addClick} style={{float:'right',marginTop:10}}>创建系统消息<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>
- <div className="clearfix" style={{marginTop:'-30px',marginLeft:'20px',width:'80%'}}>
- <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.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='1000px'
- 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;
|