| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964 | 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 } from '../../../NewDicProvinceList';import {  getNewDiccityArr,} from "@/tools.js";import { Form, Radio, Icon, Button, Input, Select, Spin, Table, Switch, message, DatePicker, Modal, Upload, Popconfirm, AutoComplete, Tabs, Tag } from 'antd';import { patternOrganization, conditionOrganization } from '../../../dataDic.js';import { getPattern, getCondition } from '../../../tools.js';import { ChooseList } from "../../order/orderNew/chooseList";import StaffSearch from '../../../../component/common/staffSearch';const confirm = Modal.confirm;const { TabPane } = Tabsconst Organization = Form.create()(React.createClass({  loadData(pageNo) {    this.state.data = [];    this.setState({      loading: true,    });    $.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: this.state.superId,//上级组织        type: this.state.type,//组织类型        depNo: this.state.depNo1,//组织编号      },      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.id,//每一条记录的ID              depNo: thisdata.depNo,//组织编号              name: thisdata.name,//组织名称              type: thisdata.type,//组织类型              managerId: thisdata.managerName,//负责人              superId: thisdata.superName,//上级组织              status: thisdata.status,//组织状态              workingHoursName: thisdata.workingHoursName,              hideSign: thisdata.hideSign,//显示标识              approval: thisdata.approval,            });          };          this.state.pagination.current = data.data.pageNo;          this.state.pagination.total = data.data.totalCount;          this.setState({            dataSource: theArr,            page: data.data.pageNo,            pagination: this.state.pagination          });        };      }.bind(this),    }).always(function () {      this.setState({        loading: false      });    }.bind(this));  },  getInitialState() {    return {      approval: 1,      editvisible: false,      workingHoursType: 0,      searchMore: true,      selectedRowKeys: [],      selectedRows: [],      loading: false,      workTimeList: [],      pagination: {        defaultCurrent: 1,        defaultPageSize: 10,        showQuickJumper: true,        pageSize: 10,        onChange: function (page) {          this.loadData(page);        }.bind(this),        showTotal: function (total) {          return '共' + total + '条数据';        }      },      columns: [        {          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) }        }, {          title: '作息时间类型',          dataIndex: 'workingHoursName',          key: 'workingHoursName',        }, {          title: '显示标识',          dataIndex: 'hideSign',          key: 'hideSign',          render: text => { return ["不显示", "显示"][text] }        },      ],      dataSource: [],      searchTime: [,],    };  },  componentWillMount() {    this.selectSuperId();    this.getWorkTimeList();  },  //获取上级组织  selectSuperId() {    this.state.data = []    $.ajax({      method: "get",      dataType: "json",      crossDomain: false,      url: globalConfig.context + "/api/admin/organization/selectSuperId",      data: {        hideSign: 2,//查询所有(0不显示 1显示 2所有)      },      success: function (data) {        let theArr = [];        let theId = [];//用于保存上级组织的ID和名称        let thedata = data.data;        if (!thedata) {          if (data.error && data.error.length) {            message.warning(data.error[0].message);          };          thedata = {};        };        var contactIds = [];        for (var i = 0; i < data.data.length; i++) {          let theData = data.data[i];          theArr.push(            <Select.Option value={theData.id} key={theData.id}>{theData.name}</Select.Option>          );          theId.push(            [theData.id, theData.name]          );        };        this.setState({          SuperArr: thedata,          contactsOption: theArr,          theId: theId,          orderStatusOptions: data.data,        });      }.bind(this),    }).always(function () {      this.loadData(this.state.page);      this.setState({        loading: false      });    }.bind(this));  },  //获取作息时间  getWorkTimeList() {    $.ajax({      method: "get",      dataType: "json",      crossDomain: false,      url: globalConfig.context + "/api/admin/department/workingHours/list",      data: {},      success: function (data) {        if (data.error.length === 0) {          this.setState({            workTimeList: data.data,          });        } else {          message.warning(data.error[0].message);        }      }.bind(this),    }).always(function () {      this.setState({        loading: false      });    }.bind(this));  },  //编辑部门,保存  edithandleSubmit(e) {    e.preventDefault();    if (!this.state.depNo) {      message.warning('请填写组织编号');      return    }    //上级组织字典    let nameText = this.state.SuperArr    let superText = this.state.editSuperId;    let upId = this.state.theId;    let oldId = '';    let superOne = this.state.editDataSource[0].editSuperId;    if (superOne == superText) {      for (let j = 0; j < upId.length; j++) {        if (superText == upId[j][1]) {          oldId = upId[j][0]        }      }    };    let remarksText = (this.state.editRemarks) ? this.state.editRemarks : '该组织没有职能说明,请完善!';    let isStatus = this.state.editStatus;    let _this = this;    if (isStatus == 1) {      confirm({        title: '是否要解散该部门?',        onOk() {          if (!(superOne == superText)) {            confirm({              title: '上级组织已修改,是否保存?',              onOk() {                $.ajax({                  method: "post",                  dataType: "json",                  crossDomain: false,                  url:                    globalConfig.context +                    "/api/admin/organization/updateOrganization",                  data: {                    name: _this.state.editName, //组织名称                    type: _this.state.editType, //组织类型                    managerId: _this.state.theTypes                      ? _this.state.theTypes                      : _this.state.managerIdOrganizationId, //负责人ID                    financeId: _this.state.theTypes2                      ? _this.state.theTypes2                      : _this.state.financeId, //负责人ID                    approvalAid: _this.state.theTypes1                      ? _this.state.theTypes1                      : _this.state.approvalAid, //审核人ID                    retrialFinanceId: _this.state.theTypes3                      ? _this.state.theTypes3                      : _this.state.reviewerId, // 复审人                    expenseFinanceId: _this.state.theTypes4                      ? _this.state.theTypes4                      : _this.state.accountrId, // 报销审核人                    superId: _this.state.editSuperId, //上级组织                    status: _this.state.editStatus, //组织状态                    remarks: remarksText, //组织职能说明                    id: _this.state.editId, //组织ID                    updateOrganization: _this.state.updateOrganization,                    abbreviation: _this.state.abbreviation,                    workingHoursType: _this.state.workingHoursType,                    hideSign: _this.state.hideSign,//显示标识                    depNo: _this.state.depNo,//组织编号                    approval: _this.state.approval, //是否需要特批审核                    expenseRetrialFinanceExamine: _this.state.expenseRetrialFinanceExamine, // 财务复审                    ceoExamine: _this.state.ceoExamine, // 董事长审核                    cfoExamine: _this.state.cfoExamine, // 财务总监审核                    viceCeoExamine: _this.state.viceCeoExamine, // 集团副总审核                    cashierExamine: _this.state.cashierExamine, // 出纳审核                    techAdminId: _this.state.techAdminId, // 技术总监                    operationGuaranteeId: _this.state.operationGuaranteeId, // 运营保障部审核                  }                }).done(                  function (data) {                    _this.setState({                      loading: false                    });                    if (!data.error.length) {                      message.success("保存成功!");                      _this.edithandleCancel();                      _this.selectSuperId();                    } else {                      message.warning(data.error[0].message);                    }                  }.bind(_this)                );                return false              }            })          } else {            $.ajax({              method: "post",              dataType: "json",              crossDomain: false,              url:                globalConfig.context +                "/api/admin/organization/updateOrganization",              data: {                name: _this.state.editName, //组织名称                type: _this.state.editType, //组织类型                managerId: _this.state.theTypes                  ? _this.state.theTypes                  : _this.state.managerIdOrganizationId, //负责人ID                financeId: _this.state.theTypes2                  ? _this.state.theTypes2                  : _this.state.financeId, //负责人ID                approvalAid: _this.state.theTypes1                  ? _this.state.theTypes1                  : _this.state.approvalAid, //审核人ID                retrialFinanceId: _this.state.theTypes3                  ? _this.state.theTypes3                  : _this.state.reviewerId, // 复审人                expenseFinanceId: _this.state.theTypes4                  ? _this.state.theTypes4                  : _this.state.accountrId, // 报销审核人                superId: oldId, //上级组织                status: _this.state.editStatus, //组织状态                remarks: remarksText, //组织职能说明                id: _this.state.editId, //组织ID                abbreviation: _this.state.abbreviation,                workingHoursType: _this.state.workingHoursType,                hideSign: _this.state.hideSign,//显示标识                depNo: _this.state.depNo,//组织编号                approval: _this.state.approval, //是否需要特批审核                expenseRetrialFinanceExamine: _this.state.expenseRetrialFinanceExamine, // 财务复审                ceoExamine: _this.state.ceoExamine, // 董事长审核                cfoExamine: _this.state.cfoExamine, // 财务总监审核                viceCeoExamine: _this.state.viceCeoExamine, // 集团副总审核                cashierExamine: _this.state.cashierExamine, // 出纳审核                techAdminId: _this.state.techAdminId, // 技术总监                operationGuaranteeId: _this.state.operationGuaranteeId, // 运营保障部审核              }            }).done(              function (data) {                _this.setState({                  loading: false                });                if (!data.error.length) {                  message.success("保存成功!");                  _this.edithandleCancel();                  _this.selectSuperId();                } else {                  message.warning(data.error[0].message);                }              }.bind(_this)            );          }        }      })    } else {      if (!(superOne == superText)) {        confirm({          title: '上级组织已修改,是否保存?',          onOk() {            $.ajax({              method: "post",              dataType: "json",              crossDomain: false,              url:                globalConfig.context +                "/api/admin/organization/updateOrganization",              data: {                name: _this.state.editName, //组织名称                type: _this.state.editType, //组织类型                managerId: _this.state.theTypes                  ? _this.state.theTypes                  : _this.state.managerIdOrganizationId, //负责人ID                financeId: _this.state.theTypes2                  ? _this.state.theTypes2                  : _this.state.financeId, //负责人ID                approvalAid: _this.state.theTypes1                  ? _this.state.theTypes1                  : _this.state.approvalAid, //审核人ID                retrialFinanceId: _this.state.theTypes3                  ? _this.state.theTypes3                  : _this.state.reviewerId, // 复审人                expenseFinanceId: _this.state.theTypes4                  ? _this.state.theTypes4                  : _this.state.accountrId, // 报销审核人                superId: _this.state.editSuperId, //上级组织                status: _this.state.editStatus, //组织状态                province: _this.state.province,//省份                remarks: remarksText, //组织职能说明                id: _this.state.editId, //组织ID                abbreviation: _this.state.abbreviation,                workingHoursType: _this.state.workingHoursType,                hideSign: _this.state.hideSign,//显示标识                depNo: _this.state.depNo,//组织编号                approval: _this.state.approval, //是否需要特批审核                expenseRetrialFinanceExamine: _this.state.expenseRetrialFinanceExamine, // 财务复审                ceoExamine: _this.state.ceoExamine, // 董事长审核                cfoExamine: _this.state.cfoExamine, // 财务总监审核                viceCeoExamine: _this.state.viceCeoExamine, // 集团副总审核                cashierExamine: _this.state.cashierExamine, // 出纳审核                techAdminId: _this.state.techAdminId, // 技术总监                operationGuaranteeId: _this.state.operationGuaranteeId, // 运营保障部审核              }            }).done(              function (data) {                _this.setState({                  loading: false                });                if (!data.error.length) {                  message.success("保存成功!");                  _this.edithandleCancel();                  _this.selectSuperId();                } else {                  message.warning(data.error[0].message);                }              }.bind(_this)            );            return false          }        })      } else {        $.ajax({          method: "post",          dataType: "json",          crossDomain: false,          url:            globalConfig.context +            "/api/admin/organization/updateOrganization",          data: {            name: _this.state.editName, //组织名称            type: _this.state.editType, //组织类型            managerId: _this.state.theTypes              ? _this.state.theTypes              : _this.state.managerIdOrganizationId, //负责人ID            financeId: _this.state.theTypes2              ? _this.state.theTypes2              : _this.state.financeId, //负责人ID            approvalAid: _this.state.theTypes1              ? _this.state.theTypes1              : _this.state.approvalAid, //审核人ID            retrialFinanceId: _this.state.theTypes3              ? _this.state.theTypes3              : _this.state.reviewerId, // 复审人            expenseFinanceId: _this.state.theTypes4              ? _this.state.theTypes4              : _this.state.accountrId, // 报销审核人            superId: oldId, //上级组织            status: _this.state.editStatus, //组织状态            remarks: remarksText, //组织职能说明            id: _this.state.editId, //组织ID            abbreviation: _this.state.abbreviation,            province: _this.state.province,            workingHoursType: _this.state.workingHoursType,            hideSign: _this.state.hideSign,//显示标识            depNo: _this.state.depNo,//组织编号            approval: _this.state.approval, // 是否需要特批            expenseRetrialFinanceExamine: _this.state.expenseRetrialFinanceExamine, // 财务复审            ceoExamine: _this.state.ceoExamine, // 董事长审核            cfoExamine: _this.state.cfoExamine, // 财务总监审核            viceCeoExamine: _this.state.viceCeoExamine, // 集团副总审核            cashierExamine: _this.state.cashierExamine, // 出纳审核            techAdminId: _this.state.techAdminId, // 技术总监            operationGuaranteeId: _this.state.operationGuaranteeId, // 运营保障部审核          }        }).done(          function (data) {            _this.setState({              loading: false            });            if (!data.error.length) {              message.success("保存成功!");              _this.edithandleCancel();              _this.selectSuperId();            } else {              message.warning(data.error[0].message);            }          }.bind(_this)        );      }    }  },  //整行点击  tableRowClick(record, index) {    this.selectSuperId();    this.state.RowData = record;    this.setState({      editvisible: true,      selectedRowKeys: [],      rowId: record.businessId,    })    $.ajax({      method: "post",      dataType: "json",      crossDomain: false,      url: globalConfig.context + "/api/admin/organization/selectAllById",      data: {        id: record.id      },      success: function (data) {        let theArr = [];        let thisdata = data.data;        if (data.error.length === 0) {          theArr.push({            editId: thisdata.id, //每一条记录的ID            editName: thisdata.name, //组织名称            editManagerId: thisdata.managerId, //负责人            editType: thisdata.type, //组织类型            editStatus: thisdata.status, //组织状态            province: thisdata.province,//省份            editSuperId: thisdata.superId, //上级组织            depNo: thisdata.depNo, //组织编号            editCreateId: thisdata.createId, //创建人            editTime: thisdata.createTime, //创建时间            editRemarks: thisdata.remarks, //组织职能说明            workingHoursType: thisdata.workingHoursType,//作息时间类型            financeId: thisdata.financeId, // 财务负责人            approvalAid: thisdata.approvalAid, // 审核人            reviewerId: thisdata.retrialFinanceId, // 财务复审            reviewerName: thisdata.retrialFinanceName,            accountrId: thisdata.expenseFinanceId, // 报销审核            accountrName: thisdata.expenseFinanceName,            hideSign: thisdata.hideSign,//显示标识            approval: thisdata.approval, // 特批审核            expenseRetrialFinanceExamine: thisdata.expenseRetrialFinanceExamine, //财务复审            expenseRetrialFinanceExamineList: thisdata.expenseRetrialFinanceExamineList,            ceoExamine: thisdata.ceoExamine, //董事长审核            ceoExamineList: thisdata.ceoExamineList,            cfoExamine: thisdata.cfoExamine, //财务总监审核            cfoExamineList: thisdata.cfoExamineList,            viceCeoExamine: thisdata.viceCeoExamine, //集团副总审核            viceCeoExamineList: thisdata.viceCeoExamineList,            cashierExamine: thisdata.cashierExamine, //出纳审核            cashierExamineList: thisdata.cashierExamineList,            techAdminId: thisdata.techAdminId, // 技术总监            techAdminName: thisdata.techAdminName,            operationGuaranteeId: thisdata.operationGuaranteeId, // 运营保障部审核            operationGuaranteeName: thisdata.operationGuaranteeName,          });          this.setState({            editId: thisdata.id, //每一条记录的ID            financeId: thisdata.financeId,            financeName: thisdata.financeName,            approvalAid: thisdata.approvalAid, // 审核人            approvalName: thisdata.approvalName, // 审核人            editName: thisdata.name, //组织名称            managerIdOrganization: thisdata.managerName, //负责人名字            managerIdOrganizationId: thisdata.managerId, //负责人idmanagerName            reviewerId: thisdata.retrialFinanceId, // 财务复审            reviewerName: thisdata.retrialFinanceName,            accountrId: thisdata.expenseFinanceId, // 报销审核            accountrName: thisdata.expenseFinanceName,            editType: thisdata.type, //组织类型            editStatus: thisdata.status, //组织状态            province: thisdata.province, //省份            editSuperId: thisdata.superId, //上级组织            depNo: thisdata.depNo, //组织编号            editCreateId: thisdata.createId, //创建人            editTime: thisdata.createTime, //创建时间            editRemarks: thisdata.remarks, //组织职能说明            workingHoursType: thisdata.workingHoursType,//作息时间类型            editDataSource: theArr,            abbreviation: thisdata.abbreviation,            hideSign: thisdata.hideSign,//显示标识            approval: thisdata.approval, // 特批审核            expenseRetrialFinanceExamine: thisdata.expenseRetrialFinanceExamine, //财务复审            expenseRetrialFinanceExamineList: thisdata.expenseRetrialFinanceExamineList,            ceoExamine: thisdata.ceoExamine, //董事长审核            ceoExamineList: thisdata.ceoExamineList,            cfoExamine: thisdata.cfoExamine, //财务总监审核            cfoExamineList: thisdata.cfoExamineList,            viceCeoExamine: thisdata.viceCeoExamine, //集团副总审核            viceCeoExamineList: thisdata.viceCeoExamineList,            cashierExamine: thisdata.cashierExamine, //出纳审核            cashierExamineList: thisdata.cashierExamineList,            techAdminId: thisdata.techAdminId, // 技术总监            techAdminName: thisdata.techAdminName,            operationGuaranteeId: thisdata.operationGuaranteeId, // 运营保障部审核            operationGuaranteeName: thisdata.operationGuaranteeName,          });        } else {          message.warning(data.error[0].message);        }      }.bind(this),    }).always(function (data) {      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: "POST",      dataType: "json",      crossDomain: false,      url: globalConfig.context + "/api/admin/organization/deleteById",      data: {        id: deletedIds      }    }).done(function (data) {      if (!data.error.length) {        message.success('删除成功!');        this.setState({          loading: false,        });      } else {        message.warning(data.error[0].message);      };      this.selectSuperId();    }.bind(this));  },  //新增一个部门,保存  addhandleSubmit(e) {    e.preventDefault();    //  	if(!this.state.theTypes){    //  		message.warning('请输入负责人姓名');    //  		return false;    //  	}    if (!this.state.typeOrganization) {      message.warning('请选择组织类型');      return false;    }    if (!this.state.upOrganization) {      message.warning('请选择上级组织');      return false;    }    if (!this.state.depNo) {      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/organization/addOrganization',          data: {            name: this.state.nameOrganization,//组织名称            managerId: this.state.theTypes,//负责人ID            type: this.state.typeOrganization, //组织类型            superId: this.state.upOrganization,//上级组织            remarks: this.state.remarksOrganization,//组织职能说明            workingHoursType: this.state.workingHoursType,//作息时间            hideSign: this.state.hideSign,//显示标识            depNo: this.state.depNo,//组织编号          }        }).done(function (data) {          this.setState({            loading: false          });          if (!data.error.length) {            message.success('保存成功!');            this.handleCancel();            this.selectSuperId();          } 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));  },  selectAutosel(value) {    this.setState({      adminName: value    })    let theType = '';    let contactLists = this.state.customerArr || [];    if (value) {      contactLists.map(function (item) {        if (item.name == value.toString()) {          theType = item.id;        }      });    }    this.setState({      aid: theType    })  },  //上级主管输入框失去焦点是判断客户是否存在  selectAuto(value, options) {    this.setState({      managerIdOrganization: value    })    let theType = '';    let contactLists = this.state.customerArr || [];    if (value) {      contactLists.map(function (item) {        if (item.name == value.toString()) {          theType = item.id;        }      });    }    this.setState({      theTypes: theType    })  },  selectAuto1(value, options) {    this.setState({      approvalAid: value    })    let theType = '';    let contactLists = this.state.customerArr || [];    if (value) {      contactLists.map(function (item) {        if (item.name == value.toString()) {          theType = item.id;        }      });    }    this.setState({      theTypes1: theType    })  },  selectAuto2(value, options) {    this.setState({      financeId: value    })    let theType = '';    let contactLists = this.state.customerArr || [];    if (value) {      contactLists.map(function (item) {        if (item.name == value.toString()) {          theType = item.id;        }      });    }    this.setState({      theTypes2: theType    })  },  selectAuto3(value, options) {    this.setState({      reviewerId: value    })    let theType = '';    let contactLists = this.state.customerArr || [];    if (value) {      contactLists.map(function (item) {        if (item.name == value.toString()) {          theType = item.id;        }      });    }    this.setState({      theTypes3: theType    })  },  selectAuto4(value, options) {    this.setState({      accountrId: value    })    let theType = '';    let contactLists = this.state.customerArr || [];    if (value) {      contactLists.map(function (item) {        if (item.name == value.toString()) {          theType = item.id;        }      });    }    this.setState({      theTypes4: theType    })  },  //失去焦点时  blurChange(e) {    let theType = '';    let contactLists = this.state.customerArr || [];    if (e) {      contactLists.map(function (item) {        if (item.name == e.toString()) {          theType = item.id        }      });    } else {      this.setState({        reviewerId: null      })    }    this.setState({      theTypes3: theType,    })  },  httpChangesel(e) {    if (e.length >= 1) {      this.supervisor(e);    }    this.setState({      adminName: e    })  },  //值改变时请求客户名称  httpChange(e) {    if (e.length >= 1) {      this.supervisor(e);    }    this.setState({      managerIdOrganization: e    })  },  httpChange1(e) {    if (e.length >= 1) {      this.supervisor(e);    }    this.setState({      approvalName: e    })  },  httpChange2(e) {    if (e.length >= 1) {      this.supervisor(e);    }    this.setState({      financeName: e    })  },  httpChange3(e) {    if (e.length >= 1) {      this.supervisor(e);    }    this.setState({      reviewerName: e    })  },  httpChange4(e) {    if (e.length >= 1) {      this.supervisor(e);    }    this.setState({      accountrName: e    })  },  addClick() {    this.state.DepN = '';//组织编号    this.state.theTypes = '';    this.state.nameOrganization = '';//组织名称清零    this.state.managerIdOrganization = '';//负责人ID清零    this.state.financeId = "";//负责人ID清零    this.state.financeName = "";//负责人ID清零    this.state.approvalAid = "";//审核人ID清零    this.state.approvalName = "";//审核人清零    this.state.techAdminId = ""; // 技术总监    this.state.techAdminName = "";    this.state.operationGuaranteeId = ""; // 运营保障部审核    this.state.operationGuaranteeName = "";    this.state.reviewerId = "";//复审人    this.state.reviewerName = "";//复审人    this.state.accountrId = "";//报销审核人    this.state.accountrName = "";//报销审核人    this.state.approvalName = ""; //特批审核人    this.state.typeOrganization = undefined; //组织类型清零    this.state.upOrganization = undefined;//上级组织清零    this.state.remarksOrganization = '';//组织职能说明清零    this.state.hideSign = 1;//显示标识默认为1(显示)    this.state.approval = 1;//特批审核 1(需要)    this.state.RowData = {};    this.setState({      workingHoursType: 0,      visible: true    });    this.selectSuperId();  },  editClick() {    this.state.RowData = {};    this.setState({      editvisible: true    });  },  handleCancel() {    this.setState({ visible: false })  },  edithandleCancel() {    this.loadData(this.state.page);    this.setState({ editvisible: false })  },  search() {    this.loadData();  },  //把搜索的部分置零  reset() {    this.state.superId = undefined;//上级组织清零    this.state.name = '';//组织名称清零    this.state.type = undefined;//组织类型清零    this.state.depNo1 = '';//组织编号清零    this.loadData();  },  searchSwitch() {    this.setState({      searchMore: !this.state.searchMore    });  },  changeList(arr) {    const newArr = [];    this.state.columns.forEach(item => {      arr.forEach(val => {        if (val === item.title) {          newArr.push(item);        }      });    });    this.setState({      changeList: newArr    });  },  handleOk() {    $.ajax({      method: "post",      dataType: "json",      crossDomain: false,      url: globalConfig.context + '/api/admin/expenseConfig/addDeTails',      data: {        type: this.state.addtype, // 类型        aid: this.state.aid, // 管理员编号        adminName: this.state.adminName, // 管理员名称        depId: this.state.editId, // 部门编号      }    }).done(function (data) {      this.setState({        loading: false      });      if (!data.error.length) {        message.success('添加成功!');        let list = this.state.addtype == 1          ? this.state.expenseRetrialFinanceExamineList : this.state.addtype == 2            ? this.state.ceoExamineList : this.state.addtype == 3              ? this.state.cfoExamineList : this.state.addtype == 4                ? this.state.viceCeoExamineList : this.state.addtype == 5                  ? this.state.cashierExamineList : []        list.push(data.data)        if (this.state.addtype == 1) {          this.setState({            expenseRetrialFinanceExamineList: list          })        } else if (this.state.addtype == 2) {          this.setState({            ceoExamineList: list          })        } if (this.state.addtype == 3) {          this.setState({            cfoExamineList: list          })        } if (this.state.addtype == 4) {          this.setState({            viceCeoExamineList: list          })        } if (this.state.addtype == 5) {          this.setState({            cashierExamineList: list          })        }        this.handleNo()      } else {        message.warning(data.error[0].message);      }    }.bind(this));  },  handleNo() {    this.setState({      addtype: -1,      aid: "",      adminName: "",    })  },  deleteDeTails(type, dataList, id) {    $.ajax({      method: "post",      dataType: "json",      crossDomain: false,      url: globalConfig.context + '/api/admin/expenseConfig/deleteDeTails',      data: {        id, //       }    }).done(function (data) {      this.setState({        loading: false      });      if (!data.error.length) {        message.success('移除成功!');        let lx = dataList.findIndex(item => item.id === id)        dataList.splice(lx, 1)        if (type == 1) {          this.setState({            expenseRetrialFinanceExamineList: dataList          })        } else if (type == 2) {          this.setState({            ceoExamineList: dataList          })        } if (type == 3) {          this.setState({            cfoExamineList: dataList          })        } if (type == 4) {          this.setState({            viceCeoExamineList: dataList          })        } if (type == 5) {          this.setState({            cashierExamineList: dataList          })        }      } else {        message.warning(data.error[0].message);      }    }.bind(this));  },  render() {    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 formItemLayout = {      labelCol: { span: 6 },      wrapperCol: { span: 18 },    };    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>    )    const options2 = 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"            onChange={this.callback}            className="test">            <TabPane tab="搜索" key="1">              <div className="user-search">                <Input placeholder="组织名称" style={{ width: '150px', marginRight: '10px', marginBottom: '10px' }}                  value={this.state.name}                  onChange={(e) => { this.setState({ name: e.target.value }); }} />                <Select placeholder="上级组织"                  style={{ width: '200px', marginRight: '10px' }}                  value={this.state.superId}                  onChange={(e) => { this.setState({ superId: e }) }} notFoundContent="未获取到上级组织列表">                  {this.state.contactsOption}                </Select>                <Button type="primary" onClick={this.search} style={{ marginRight: '10px' }}>搜索</Button>                <Button onClick={this.reset} style={{ marginRight: '10px' }}>重置</Button>                <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>                <span style={{ marginRight: '20px' }}>更多搜索    <Switch defaultChecked={false} onChange={this.searchSwitch} /></span>                <div style={this.state.searchMore ? { display: 'none' } : { display: 'inline-block' }}>                  <Input placeholder="组织编号" style={{ width: '150px', marginRight: '10px' }}                    value={this.state.depNo1}                    onChange={(e) => { this.setState({ depNo1: e.target.value }); }} />                  <Select placeholder="组织类型"                    style={{ width: '150px', marginRight: '50px' }}                    value={this.state.type}                    onChange={(e) => { this.setState({ type: e }) }}>                    <Select.Option value="0" >公司</Select.Option>                    <Select.Option value="1" >部门</Select.Option>                    <Select.Option value="2" >团队</Select.Option>                  </Select>                </div>              </div>            </TabPane>            <TabPane tab="新增组织" key="2"   >              <Button                type="primary"                className="addButton"                onClick={this.addClick}                style={{ marginBottom: '10px', float: 'left' }}              >新增组织<Icon type="plus" /></Button>            </TabPane>            <TabPane tab="更改表格显示数据" key="3">              <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="patent-table">            <Spin spinning={this.state.loading}>              <Table size="middle" columns={                this.state.changeList                  ? this.state.changeList                  : this.state.columns              }                dataSource={this.state.dataSource}                rowSelection={rowSelection}                style={{                  cursor: 'pointer',                }}                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.addhandleSubmit} id="add-form">                <Spin spinning={this.state.loading}>                  <div className="clearfix">                    <FormItem                      labelCol={{ span: 7 }}                      wrapperCol={{ span: 12 }}                      label="组织名称" >                      <Input placeholder="组织名称" value={this.state.nameOrganization} style={{ width: '95%' }}                        onChange={(e) => { this.setState({ nameOrganization: e.target.value }) }} required="required" />                      <span className="mandatory" style={{ color: 'red', marginLeft: '5px' }}>*</span>                    </FormItem>                  </div>                  <div className="clearfix">                    <FormItem                      labelCol={{ span: 7 }}                      wrapperCol={{ span: 12 }}                      label="负责人"                    >                      <AutoComplete                        className="certain-category-search"                        dropdownClassName="certain-category-search-dropdown"                        dropdownMatchSelectWidth={false}                        dataSource={options}                        placeholder="输入名称"                        value={this.state.managerIdOrganization}                        onChange={this.httpChange}                        filterOption={true}                        // onBlur={this.blurChange}                        onSelect={this.selectAuto}                      // style={{ width: '95%' }}                      >                        <Input />                      </AutoComplete>                      {/*<span className="mandatory" style={{color:'red',marginLeft:'5px'}}>*</span>*/}                    </FormItem>                  </div>                  <div className="clearfix">                    <FormItem                      labelCol={{ span: 7 }}                      wrapperCol={{ span: 12 }}                      label="组织类型"                    >                      <Select placeholder="组织类型" value={this.state.typeOrganization}                        onChange={(e) => { this.setState({ typeOrganization: e }) }} style={{ width: '95%' }} required="required">                        {                          patternOrganization.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: 7 }}                      wrapperCol={{ span: 12 }}                      label="上级组织"                    >                      <Select placeholder="请选择上级组织"                        value={this.state.upOrganization}                        onChange={(e) => { this.setState({ upOrganization: e }) }}                        notFoundContent="未获取到上级组织列表"                        style={{ width: '95%' }} required="required">                        {this.state.contactsOption}                      </Select>                      <span className="mandatory" style={{ color: 'red', marginLeft: '5px' }}>*</span>                    </FormItem>                  </div>                  <div className="clearfix">                    <FormItem                      labelCol={{ span: 7 }}                      wrapperCol={{ span: 12 }}                      label="选择作息时间类型"                    >                      <Select placeholder="请选择作息时间类型"                        style={{ width: '95%' }}                        value={this.state.workingHoursType}                        onChange={(e) => { this.setState({ workingHoursType: e }) }}                        notFoundContent="未获取到作息时间类型">                        {this.state.workTimeList.map((v, k) => (                          <Select.Option value={v.type} key={k}>{v.name}</Select.Option>                        ))}                      </Select>                    </FormItem>                  </div>                  <div className="clearfix">                    <FormItem                      labelCol={{ span: 7 }}                      wrapperCol={{ span: 12 }}                      label="组织编号"                    >                      <Input                        placeholder='组织编号'                        value={this.state.depNo}                        onChange={(e) => {                          this.setState({                            depNo: e.target.value                          })                        }}                      />                    </FormItem>                  </div>                  <div className="clearfix">                    <FormItem                      labelCol={{ span: 7 }}                      wrapperCol={{ span: 12 }}                      label="组织职能说明" >                      <Input type="textarea" rows={4} placeholder="组织职能说明" value={this.state.remarksOrganization}                        onChange={(e) => { this.setState({ remarksOrganization: e.target.value }) }} style={{ width: '95%' }} />                    </FormItem>                  </div>                  <div className="clearfix">                    <FormItem                      labelCol={{ span: 7 }}                      wrapperCol={{ span: 12 }}                      label="显示标识"                    >                      <Select placeholder="显示标识"                        value={this.state.hideSign}                        onChange={(e) => { this.setState({ hideSign: e }) }}                        style={{ width: '95%' }}                        required="required"                      >                        <Option value={0}>不显示</Option>                        <Option value={1}>显示</Option>                      </Select>                      <span className="mandatory" style={{ color: 'red', marginLeft: '5px' }}>*</span>                    </FormItem>                  </div>                  <FormItem wrapperCol={{ span: 12, offset: 7 }}>                    <Button className="set-submit" type="primary" htmlType="submit">保存</Button>                    <Button className="set-submit" type="ghost" onClick={this.handleCancel} style={{ marginLeft: '100px' }}>取消</Button>                  </FormItem>                </Spin>              </Form >            </Modal>          </div>          <div className="patent-desc">            <Modal maskClosable={false} visible={this.state.editvisible}              onOk={this.checkPatentProcess} onCancel={this.edithandleCancel}              width='1200px'              title='编辑组织'              footer=''              className="admin-desc-content">              <Form horizontal onSubmit={this.edithandleSubmit} id="edit-form">                <Spin spinning={this.state.loading}>                  <div className="clearfix">                    <FormItem                      className="half-item"                      {...formItemLayout}                      label="组织名称" >                      <Input placeholder="组织名称" value={this.state.editName}                        style={{ width: '70%' }}                        onChange={(e) => { this.setState({ editName: e.target.value }) }} />                    </FormItem>                    <FormItem                      className="half-item"                      {...formItemLayout}                      label="特批审核"                    >                      <Select placeholder="特批审核"                        value={this.state.approval}                        style={{ width: '70%' }}                        onChange={(e) => { this.setState({ approval: e }) }}                        required="required"                      >                        <Option value={0}>不需要</Option>                        <Option value={1}>需要</Option>                      </Select>                      <span style={{ color: "red" }}> 订单/合同特批</span>                    </FormItem>                  </div>                  <div className="clearfix">                    <FormItem                      className="half-item"                      {...formItemLayout}                      label="负责人"                    >                      <AutoComplete                        className="certain-category-search"                        dropdownClassName="certain-category-search-dropdown"                        dropdownMatchSelectWidth={false}                        dataSource={options}                        placeholder="输入名称"                        value={this.state.managerIdOrganization}                        onChange={this.httpChange}                        filterOption={true}                        // onBlur={this.blurChange}                        onSelect={this.selectAuto}                        style={{ width: '70%' }}                      >                        <Input />                      </AutoComplete>                      {/* <span className="mandatory" style={{color:'red',marginLeft:'5px'}}>*</span> */}                    </FormItem>                    <FormItem                      className="half-item"                      {...formItemLayout}                      label="审核人"                    >                      <AutoComplete                        disabled={this.state.approval != 1}                        className="certain-category-search"                        dropdownClassName="certain-category-search-dropdown"                        dropdownMatchSelectWidth={false}                        dataSource={options}                        placeholder="输入名称"                        value={this.state.approvalName}                        onChange={this.httpChange1}                        filterOption={true}                        // onBlur={this.blurChange}                        onSelect={this.selectAuto1}                        style={{ width: '70%' }}                      >                        <Input />                      </AutoComplete>                      {/* <span className="mandatory" style={{color:'red',marginLeft:'5px'}}>特批/变更审核</span> */}                    </FormItem>                  </div>                  <div className="clearfix">                    <FormItem                      className="half-item"                      {...formItemLayout}                      label="组织类型"                    >                      <Select                        placeholder="组织类型"                        value={this.state.editType}                        style={{ width: '70%' }}                        onChange={(e) => { this.setState({ editType: e }) }}>                        {                          patternOrganization.map(function (item) {                            return <Select.Option key={item.value} >{item.key}</Select.Option>                          })                        }                      </Select>                    </FormItem>                    <FormItem                      className="half-item"                      {...formItemLayout}                      label="运营保障部审核"                    >                      <StaffSearch                        valueName={this.state.operationGuaranteeName}                        placeholder="输入名称"                        width="70%"                        onBlurText={e => {                          this.setState({                            operationGuaranteeName: e.title                          })                        }}                        onBlurChange={(obj) => {                          this.setState({                            operationGuaranteeId: obj.value,                          })                        }}                      />                      <span style={{ color: 'red' }}>特批订单/合同变更审核</span>                    </FormItem>                  </div>                  <div className="clearfix">                    <FormItem                      className="half-item"                      {...formItemLayout}                      label="组织状态"                    >                      <Select                        placeholder="组织状态"                        value={this.state.editStatus}                        style={{ width: '70%' }}                        onChange={(e) => { this.setState({ editStatus: e }) }}>                        {                          conditionOrganization.map(function (item) {                            return <Select.Option key={item.value} >{item.key}</Select.Option>                          })                        }                      </Select>                    </FormItem>                    <FormItem                      className="half-item"                      {...formItemLayout}                      label="财务负责人"                    >                      <AutoComplete                        className="certain-category-search"                        dropdownClassName="certain-category-search-dropdown"                        dropdownMatchSelectWidth={false}                        dataSource={options2}                        placeholder="输入名称"                        value={this.state.financeName}                        onChange={this.httpChange2}                        filterOption={true}                        // onBlur={this.blurChange}                        onSelect={this.selectAuto2}                        style={{ width: '70%' }}                      >                        <Input />                      </AutoComplete>                      {/* <span className="mandatory" style={{color:'red',marginLeft:'5px'}}>*</span> */}                    </FormItem>                  </div>                  <div className="clearfix">                    <FormItem                      className="half-item"                      {...formItemLayout}                      label="省份"                    >                      <Select                        placeholder="请选择省份"                        value={getNewDiccityArr(this.state.province)}                        style={{ width: '70%' }}                        onChange={e => {                          this.setState({ province: e });                        }}                      >                        {citySelect().map(function (item) {                          return (                            <Select.Option key={item.value} value={item.value}>{item.label}</Select.Option>                          );                        })}                      </Select>                    </FormItem>                    <FormItem                      className="half-item"                      {...formItemLayout}                      label="财务复审"                    >                      <AutoComplete                        className="certain-category-search"                        dropdownClassName="certain-category-search-dropdown"                        dropdownMatchSelectWidth={false}                        dataSource={options}                        placeholder="输入名称"                        value={this.state.reviewerName}                        onChange={this.httpChange3}                        filterOption={true}                        onBlur={this.blurChange}                        onSelect={this.selectAuto3}                        style={{ width: '70%' }}                      >                        <Input />                      </AutoComplete>                      <span style={{ color: 'red' }}> 订单/合同复审</span>                    </FormItem>                  </div>                  <div className="clearfix">                    <FormItem                      className="half-item"                      {...formItemLayout}                      label="上级组织"                    >                      <Select placeholder="请选择上级组织"                        value={this.state.editSuperId}                        style={{ width: '70%' }}                        onChange={(e) => { this.setState({ editSuperId: e }) }}                        notFoundContent="未获取到上级组织列表">                        {this.state.contactsOption}                      </Select>                    </FormItem>                    <FormItem                      className="half-item"                      {...formItemLayout}                      label="技术总监审核"                    >                      <StaffSearch                        valueName={this.state.techAdminName}                        placeholder="输入名称"                        width="70%"                        onBlurText={e => {                          this.setState({                            techAdminName: e.title                          })                        }}                        onBlurChange={(obj) => {                          this.setState({                            techAdminId: obj.value,                          })                        }}                      />                      <span style={{ color: 'red' }}> 财务同步审核</span>                    </FormItem>                  </div>                  <div className="clearfix">                    <FormItem                      className="half-item"                      {...formItemLayout}                      label="缩写" >                      <Input placeholder="缩写"                        value={this.state.abbreviation}                        style={{ width: '70%' }}                        onChange={(e) => { this.setState({ abbreviation: e.target.value }) }} />                    </FormItem>                    <FormItem                      className="half-item"                      {...formItemLayout}                      label="报销审核人"                    >                      <AutoComplete                        className="certain-category-search"                        dropdownClassName="certain-category-search-dropdown"                        dropdownMatchSelectWidth={false}                        dataSource={options}                        placeholder="输入名称"                        value={this.state.accountrName}                        onChange={this.httpChange4}                        filterOption={true}                        // onBlur={this.blurChange}                        onSelect={this.selectAuto4}                        style={{ width: '70%' }}                      >                        <Input />                      </AutoComplete>                      {/* <span className="mandatory" style={{color:'red',marginLeft:'5px'}}>*</span> */}                    </FormItem>                  </div>                  <div className="clearfix">                    <FormItem                      className="half-item"                      {...formItemLayout}                      label="选择作息时间类型"                    >                      <Select placeholder="请选择作息时间类型"                        value={this.state.workingHoursType}                        style={{ width: '70%' }}                        onChange={(e) => { this.setState({ workingHoursType: e }) }}                        notFoundContent="未获取到作息时间类型">                        {this.state.workTimeList.map((v, k) => (                          <Select.Option value={v.type} key={k}>{v.name}</Select.Option>                        ))}                      </Select>                    </FormItem>                    <FormItem                      className="half-item"                      {...formItemLayout}                      label="报销财务复审"                    >                      <Select placeholder="请选择"                        value={this.state.expenseRetrialFinanceExamine}                        style={{ width: '70%' }}                        onChange={(e) => { this.setState({ expenseRetrialFinanceExamine: e }) }}                      >                        <Option value={0}>不需要</Option>                        <Option value={1}>需要</Option>                      </Select>                      <div>                        {                          this.state.expenseRetrialFinanceExamine == 1 &&                          !!this.state.expenseRetrialFinanceExamineList &&                          this.state.expenseRetrialFinanceExamineList.map(item =>                            <Popconfirm                              title="是否确认删除?"                              okText="确定"                              onConfirm={() => {                                this.deleteDeTails(1, this.state.expenseRetrialFinanceExamineList, item.id);                              }}                              cancelText="取消"                            >                              <Tag key={item.id}>                                {item.adminName + " "}<Icon type="close" />                              </Tag>                            </Popconfirm>                          )                        }                        {                          this.state.expenseRetrialFinanceExamine == 1 &&                          <Button                            type="primary"                            style={{ marginTop: 10 }}                            onClick={() => {                              this.setState({                                addtype: 1                              })                            }}>添加</Button>                        }                      </div>                    </FormItem>                  </div>                  <div className="clearfix">                    <FormItem                      className="half-item"                      {...formItemLayout}                      label="组织编号"                    >                      <Input                        placeholder='组织编号'                        value={this.state.depNo}                        style={{ width: '70%' }}                        onChange={(e) => {                          this.setState({                            depNo: e.target.value                          })                        }}                      />                    </FormItem>                    <FormItem                      className="half-item"                      {...formItemLayout}                      label="董事长特批"                    >                      <Select placeholder="请选择"                        value={this.state.ceoExamine}                        style={{ width: '70%' }}                        onChange={(e) => { this.setState({ ceoExamine: e }) }}                      >                        <Option value={0}>不需要</Option>                        <Option value={1}>需要</Option>                      </Select>                      <div>                        {                          this.state.ceoExamine == 1 &&                          !!this.state.ceoExamineList &&                          this.state.ceoExamineList.map(item =>                            <Popconfirm                              title="是否确认删除?"                              okText="确定"                              onConfirm={() => {                                this.deleteDeTails(2, this.state.ceoExamineList, item.id);                              }}                              cancelText="取消"                            >                              <Tag key={item.id}>                                {item.adminName + " "}<Icon type="close" />                              </Tag>                            </Popconfirm>                          )                        }                        {                          this.state.ceoExamine == 1 &&                          <Button                            type="primary"                            style={{ marginTop: 10 }}                            onClick={() => {                              this.setState({                                addtype: 2                              })                            }}>添加</Button>                        }                      </div>                      <div style={{ color: "red" }}>注:启用董事长审核后,还需要财务指向,是否需要董事长特批</div>                    </FormItem>                  </div>                  <div className="clearfix" >                    <FormItem                      className="half-item"                      {...formItemLayout}                      label="创建人"                    >                      <span>{this.state.editCreateId}</span>                    </FormItem>                    <FormItem                      className="half-item"                      {...formItemLayout}                      label="财务总监审核"                    >                      <Select placeholder="请选择"                        value={this.state.cfoExamine}                        style={{ width: '70%' }}                        onChange={(e) => { this.setState({ cfoExamine: e }) }}                      >                        <Option value={0}>不需要</Option>                        <Option value={1}>需要</Option>                      </Select>                      <div>                        {                          this.state.cfoExamine == 1 &&                          !!this.state.cfoExamineList &&                          this.state.cfoExamineList.map(item =>                            <Popconfirm                              title="是否确认删除?"                              okText="确定"                              onConfirm={() => {                                this.deleteDeTails(3, this.state.cfoExamineList, item.id);                              }}                              cancelText="取消"                            >                              <Tag key={item.id}>                                {item.adminName + " "}<Icon type="close" />                              </Tag>                            </Popconfirm>                          )                        }                        {                          this.state.cfoExamine == 1 &&                          <Button                            type="primary"                            style={{ marginTop: 10 }}                            onClick={() => {                              this.setState({                                addtype: 3                              })                            }}>添加</Button>                        }                      </div>                    </FormItem>                  </div>                  <div className="clearfix">                    <FormItem                      className="half-item"                      {...formItemLayout}                      label="创建时间"                    >                      <span>{this.state.editTime}</span>                    </FormItem>                    <FormItem                      className="half-item"                      {...formItemLayout}                      label="集团副总复审"                    >                      <Select placeholder="请选择"                        value={this.state.viceCeoExamine}                        style={{ width: '70%' }}                        onChange={(e) => { this.setState({ viceCeoExamine: e }) }}                      >                        <Option value={0}>不需要</Option>                        <Option value={1}>需要</Option>                      </Select>                      <div>                        {                          this.state.viceCeoExamine == 1 &&                          !!this.state.viceCeoExamineList &&                          this.state.viceCeoExamineList.map(item =>                            <Popconfirm                              title="是否确认删除?"                              okText="确定"                              onConfirm={() => {                                this.deleteDeTails(3, this.state.viceCeoExamineList, item.id);                              }}                              cancelText="取消"                            >                              <Tag key={item.id}>                                {item.adminName + " "}<Icon type="close" />                              </Tag>                            </Popconfirm>                          )                        }                        {                          this.state.viceCeoExamine == 1 &&                          <Button                            type="primary"                            style={{ marginTop: 10 }}                            onClick={() => {                              this.setState({                                addtype: 4                              })                            }}>添加</Button>                        }                      </div>                    </FormItem>                  </div>                  <div className="clearfix">                    <FormItem                      className="half-item"                      {...formItemLayout}                      label="组织职能说明" >                      <Input type="textarea"                        rows={4}                        placeholder="组织职能说明"                        value={this.state.editRemarks}                        style={{ width: '70%' }}                        onChange={(e) => { this.setState({ editRemarks: e.target.value }) }} />                    </FormItem>                    <FormItem                      className="half-item"                      {...formItemLayout}                      label="报销出纳"                    >                      <Select placeholder="请选择"                        value={this.state.cashierExamine}                        style={{ width: '70%' }}                        onChange={(e) => { this.setState({ cashierExamine: e }) }}                      >                        <Option value={0}>不需要</Option>                        <Option value={1}>需要</Option>                      </Select>                      <div>                        {                          this.state.cashierExamine == 1 &&                          !!this.state.cashierExamineList &&                          this.state.cashierExamineList.map(item =>                            <Popconfirm                              title="是否确认删除?"                              okText="确定"                              onConfirm={() => {                                this.deleteDeTails(3, this.state.cashierExamineList, item.id);                              }}                              cancelText="取消"                            >                              <Tag key={item.id}>                                {item.adminName + " "}<Icon type="close" />                              </Tag>                            </Popconfirm>                          )                        }                        {                          this.state.cashierExamine == 1 &&                          <Button                            type="primary"                            style={{ marginTop: 10 }}                            onClick={() => {                              this.setState({                                addtype: 5                              })                            }}>添加</Button>                        }                      </div>                    </FormItem>                  </div>                  <div className="clearfix">                    <FormItem                      className="half-item"                      {...formItemLayout}                      label="显示标识"                    >                      <Select placeholder="显示标识"                        value={this.state.hideSign}                        style={{ width: '70%' }}                        onChange={(e) => { this.setState({ hideSign: e }) }}                        required="required"                      >                        <Option value={0}>不显示</Option>                        <Option value={1}>显示</Option>                      </Select>                    </FormItem>                  </div>                  <FormItem wrapperCol={{ span: 12, offset: 7 }}>                    <Button className="set-submit" type="primary" htmlType="submit">保存</Button>                    <Button className="set-submit" type="ghost" onClick={this.edithandleCancel} style={{ marginLeft: '100px' }}>取消</Button>                  </FormItem>                </Spin>              </Form >            </Modal>          </div>          <Modal            title="设置审核名单"            width='300px'            visible={this.state.addtype > 0}            onOk={this.handleOk}            onCancel={this.handleNo}            okText="确认"            cancelText="取消"          >            <AutoComplete              className="certain-category-search"              dropdownClassName="certain-category-search-dropdown"              style={{ width: 250 }}              dropdownMatchSelectWidth={false}              dataSource={options}              placeholder="输入名称"              value={this.state.adminName}              onChange={this.httpChangesel}              filterOption={true}              onSelect={this.selectAutosel}            >              <Input />            </AutoComplete>          </Modal>        </div>      </div>    );  }}));export default Organization;
 |