accountDetaillist.jsx 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899
  1. import React from "react";
  2. import $ from "jquery/src/ajax";
  3. import moment from "moment";
  4. import {
  5. Button,
  6. Form,
  7. Input,
  8. Spin,
  9. Table,
  10. Select,
  11. message,
  12. Tabs,
  13. AutoComplete,
  14. DatePicker,
  15. Modal,
  16. } from "antd";
  17. import { ChooseList } from "../../order/orderNew/chooseList";
  18. import { ShowModal, getAccountName, getSecondaryAccountName } from "../../../tools"
  19. import ShowModalDiv from "@/showModal.jsx";
  20. import AccountDetails from "./accountDetails";
  21. import { accountType, typeLists, accountStatus } from "@/dataDic";
  22. const FormItem = Form.Item;
  23. const { RangePicker } = DatePicker;
  24. const { TabPane } = Tabs;
  25. const AccountDetaillist = React.createClass({
  26. getInitialState() {
  27. return {
  28. showDetails: false,
  29. data: {},
  30. logvisible: false,
  31. logdataSour: [],
  32. visible: "",
  33. reason: "",
  34. checkData: {},
  35. aname: "",
  36. searchValues: {}, // 列表筛选条件
  37. loading: false, //加载动画
  38. changeList: undefined, // 更改后的表格显示数据
  39. dataSource: [], // 列表数据
  40. departmentArr: [],
  41. pagination: {
  42. defaultCurrent: 1,
  43. defaultPageSize: 10,
  44. showQuickJumper: true,
  45. pageSize: 10,
  46. onChange: function (page) {
  47. this.loadData(page);
  48. }.bind(this),
  49. showTotal: function (total) {
  50. return "共" + total + "条数据";
  51. },
  52. },
  53. columns: [
  54. {
  55. title: "类型",
  56. dataIndex: "type",
  57. key: "type",
  58. width: 140,
  59. render: (text, record) => {
  60. return (
  61. <span>
  62. {(text == 0 && !record.typeOther)
  63. ? getAccountName(record.sonType, record.sonTypeOther)
  64. : getSecondaryAccountName(text, record.typeOther)}
  65. </span>
  66. );
  67. },
  68. },
  69. {
  70. title: "报销时间",
  71. dataIndex: "releaseStart",
  72. key: "releaseStart",
  73. render: (text, record) => {
  74. return (
  75. <div>
  76. <div style={{ textAlign: "center" }}>{text}</div>
  77. <div style={{ textAlign: "center" }}>至</div>
  78. <div style={{ textAlign: "center" }}>{record.releaseEnd}</div>
  79. </div>
  80. );
  81. },
  82. },
  83. {
  84. title: "工时",
  85. dataIndex: "duration",
  86. key: "duration",
  87. },
  88. {
  89. title: "报销金额(元)",
  90. dataIndex: "amount",
  91. key: "amount",
  92. },
  93. {
  94. title: "实报金额(元)",
  95. dataIndex: "realAmount",
  96. key: "realAmount",
  97. },
  98. {
  99. title: "天数",
  100. dataIndex: "days",
  101. key: "days",
  102. },
  103. {
  104. title: "报销编号",
  105. dataIndex: "checkNo",
  106. key: "checkNo",
  107. },
  108. {
  109. title: "报销至订单",
  110. dataIndex: "buyerName",
  111. key: "buyerName",
  112. render: (text, record) => {
  113. return (
  114. record.targetType == 0
  115. ? <div>固定费用</div>
  116. : <div>
  117. <div>{text || ""}</div>
  118. <div>{record.contractNo || ""}</div>
  119. </div>
  120. );
  121. },
  122. },
  123. {
  124. title: "报销至部门",
  125. dataIndex: "applyDepName",
  126. key: "applyDepName",
  127. render: (text, record) => {
  128. return (
  129. <span>{record.targetType == 0 && text}</span>
  130. );
  131. },
  132. },
  133. {
  134. title: "报销人",
  135. dataIndex: "aname",
  136. key: "aname",
  137. },
  138. {
  139. title: "财务负责人",
  140. dataIndex: "financeName",
  141. key: "financeName",
  142. },
  143. {
  144. title: "报销公司/支付公司",
  145. dataIndex: "payDepName",
  146. key: "payDepName",
  147. render: (text, record) => {
  148. return (
  149. <div>
  150. <div>{record.applyDepName || ""}</div>
  151. <div>{text || ""}</div>
  152. </div>
  153. );
  154. },
  155. },
  156. {
  157. title: "发起时间",
  158. dataIndex: "createTimeStr",
  159. key: "createTimeStr",
  160. },
  161. {
  162. title: "状态",
  163. dataIndex: "status",
  164. key: "status",
  165. render: (text, record) => {
  166. return (
  167. <span style={{ color: accountStatus[text].color }}>
  168. {accountStatus[text].label}
  169. </span>
  170. );
  171. },
  172. },
  173. {
  174. title: "操作",
  175. dataIndex: "operate",
  176. key: "operate",
  177. render: (text, record) => {
  178. return (
  179. <div>
  180. <div>
  181. {this.props.isOperate &&
  182. <Button type="primary"
  183. style={{ margin: 4 }}
  184. onClick={() => { this.download(record.attachmentUrl) }}
  185. >下载</Button>}
  186. {this.props.isOperate && record.examine == 1 &&
  187. <Button type="primary"
  188. style={{ margin: 4 }}
  189. onClick={(e) => {
  190. e.stopPropagation();
  191. this.setState({
  192. visible: "adopt",
  193. checkData: record,
  194. })
  195. }}
  196. >同意</Button>}
  197. {this.props.isOperate && record.examine == 1 &&
  198. <Button type="danger"
  199. style={{ margin: 4 }}
  200. onClick={(e) => {
  201. e.stopPropagation();
  202. this.setState({
  203. visible: "reject",
  204. checkData: record,
  205. })
  206. }}
  207. >驳回</Button>}
  208. {record.status != 0 && <Button
  209. style={{ margin: 4 }}
  210. onClick={() => {
  211. this.setState({
  212. logvisible: true
  213. })
  214. this.getLogData(record.mainId || record.sonId)
  215. }}>日志</Button>}
  216. </div>
  217. </div>
  218. )
  219. }
  220. },
  221. ],
  222. logcolumns: [
  223. {
  224. title: "审核人",
  225. dataIndex: "auditorName",
  226. key: "auditorName"
  227. },
  228. {
  229. title: "操作",
  230. dataIndex: "status",
  231. key: "status",
  232. width: 120,
  233. render: (text, record) => {
  234. return (
  235. <span style={{ color: ["#1D4FEA", "#34DE38", "#108EE9", "red", "#808080", "#1D4FEA"][text] }}>
  236. {["【发起】", "【通过】", "【完成】", "【驳回】", "【撤销】", "【修改】"][text]}
  237. {this.state.processStatus == record.processStatus && !record.id &&
  238. <span style={{ color: "#FFA500" }}>&nbsp;审核中...</span>}
  239. </span>
  240. );
  241. },
  242. },
  243. {
  244. title: "操作时间",
  245. dataIndex: "createTimeStr",
  246. key: "createTimeStr",
  247. width: 88,
  248. },
  249. {
  250. title: "备注",
  251. dataIndex: "remarks",
  252. key: "remarks",
  253. render: (text, record) => {
  254. return (
  255. <div style={{ minWidth: 250 }}>{text}</div>
  256. )
  257. }
  258. }
  259. ],
  260. };
  261. },
  262. componentWillMount() {
  263. this.departmentList();
  264. this.loadData();
  265. },
  266. // 列表接口
  267. loadData(pageNo) {
  268. const { searchValues, pagination } = this.state;
  269. this.setState({
  270. loading: true,
  271. });
  272. let datas = Object.assign(searchValues, {
  273. pageNo: pageNo || 1,
  274. pageSize: pagination.pageSize,
  275. // expenseMain: 1,
  276. // processStatus: this.props.isOperate ? 1 : 2,
  277. });
  278. $.ajax({
  279. method: "get",
  280. dataType: "json",
  281. crossDomain: false,
  282. url: globalConfig.context + "/api/admin/expenseAccount/detailsList",
  283. data: datas,
  284. success: function (data) {
  285. ShowModal(this);
  286. this.setState({
  287. loading: false,
  288. });
  289. if (data.error && data.error.length === 0) {
  290. if (data.data.list) {
  291. pagination.current = data.data.pageNo;
  292. pagination.total = data.data.totalCount;
  293. if (data.data && data.data.list && !data.data.list.length) {
  294. pagination.current = 0;
  295. pagination.total = 0;
  296. }
  297. this.setState({
  298. dataSource: data.data.list,
  299. pagination: this.state.pagination,
  300. pageNo: data.data.pageNo,
  301. totalAmount: data.data.totalAmount,
  302. });
  303. } else {
  304. this.setState({
  305. dataSource: data.data,
  306. pagination: false,
  307. });
  308. }
  309. } else {
  310. message.warning(data.error[0].message);
  311. }
  312. }.bind(this),
  313. }).always(
  314. function () {
  315. this.setState({
  316. loading: false,
  317. });
  318. }.bind(this)
  319. );
  320. },
  321. // 日志
  322. getLogData(eaid) {
  323. $.ajax({
  324. method: "get",
  325. dataType: "json",
  326. crossDomain: false,
  327. url: globalConfig.context + "/api/admin/expenseAccount/log/list",
  328. data: { eaid },
  329. success: function (data) {
  330. if (data.error.length === 0) {
  331. this.setState({
  332. logdataSour: data.data || []
  333. });
  334. this.isHere(data.data || [])
  335. } else {
  336. message.warning(data.error[0].message);
  337. }
  338. }.bind(this)
  339. }).always(
  340. function () {
  341. }.bind(this)
  342. );
  343. },
  344. //
  345. isHere(list = []) {
  346. for (var i = 0; i < list.length; i++) {
  347. if (!list[i].id) {
  348. this.setState({
  349. processStatus: list[i].processStatus
  350. })
  351. return
  352. }
  353. }
  354. },
  355. download(urls) {
  356. if (!urls) {
  357. message.error("暂无可下载的附件!");
  358. } else {
  359. let list = urls.split(',') || []
  360. list.forEach(e => {
  361. var aLink = document.createElement('a');
  362. aLink.download = e;
  363. aLink.href = globalConfig.context + `/open/download?fileName=${e}&delete=false`;
  364. document.body.appendChild(aLink);
  365. aLink.click();
  366. document.body.removeChild(aLink);
  367. });
  368. }
  369. },
  370. departmentList() {
  371. $.ajax({
  372. method: "get",
  373. dataType: "json",
  374. crossDomain: false,
  375. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  376. data: {},
  377. success: function (data) {
  378. let thedata = data.data;
  379. let theArr = [];
  380. if (!thedata) {
  381. if (data.error && data.error.length) {
  382. message.warning(data.error[0].message);
  383. }
  384. } else {
  385. thedata.map(function (item, index) {
  386. theArr.push({
  387. key: index,
  388. name: item.name,
  389. id: item.id
  390. });
  391. });
  392. }
  393. this.setState({
  394. departmentArr: theArr
  395. });
  396. }.bind(this)
  397. }).always(
  398. function () {
  399. }.bind(this)
  400. );
  401. },
  402. // 审核
  403. toExamine(num) {
  404. const { checkData, reason } = this.state
  405. if (!reason) {
  406. message.warning("请填写审核说明~");
  407. return;
  408. }
  409. this.setState({
  410. loading: true,
  411. });
  412. $.ajax({
  413. method: "POST",
  414. dataType: "json",
  415. crossDomain: false,
  416. url: globalConfig.context + "/api/admin/expenseAccount/examine",
  417. data: {
  418. id: checkData.id,
  419. reason,
  420. status: num,//1同意 3驳回
  421. },
  422. }).done(
  423. function (data) {
  424. if (!data.error.length) {
  425. message.success("审核成功!");
  426. this.setState({
  427. visible: "",
  428. reason: "",
  429. showDetails: false,
  430. checkData: {},
  431. });
  432. this.loadData()
  433. } else {
  434. message.warning(data.error[0].message);
  435. }
  436. }.bind(this)
  437. );
  438. },
  439. tableRowClick(e) {
  440. this.setState({
  441. showDetails: true,
  442. id: e.id,
  443. })
  444. // this.getDetails(e.id)
  445. },
  446. // 查询负责人
  447. followUp(e) {
  448. this.setState({
  449. aname: e
  450. });
  451. $.ajax({
  452. method: "get",
  453. dataType: "json",
  454. crossDomain: false,
  455. url: globalConfig.context + "/api/admin/customer/listAdminByName",
  456. data: {
  457. adminName: e,
  458. },
  459. success: function (data) {
  460. let thedata = data.data || [];
  461. if (!thedata) {
  462. if (data.error && data.error.length) {
  463. message.warning(data.error[0].message);
  464. }
  465. thedata = {};
  466. }
  467. this.setState({
  468. fjlist: thedata,
  469. });
  470. }.bind(this),
  471. }).always(
  472. function () {
  473. this.setState({
  474. loading: false,
  475. });
  476. }.bind(this)
  477. );
  478. },
  479. // 选中负责人
  480. selectF(value) {
  481. const { searchValues, fjlist } = this.state;
  482. const newdataSources = JSON.stringify(fjlist) == "{}" ? [] : fjlist;
  483. this.setState({
  484. searchValues: Object.assign(searchValues, {
  485. aid: newdataSources.find((item) => item.name == value).id,
  486. }),
  487. });
  488. },
  489. // 搜索
  490. search() {
  491. this.loadData();
  492. },
  493. // 重置
  494. reset() {
  495. this.setState({
  496. aname: "",
  497. searchValues: JSON.parse(JSON.stringify({})),
  498. }, () => {
  499. this.loadData();
  500. })
  501. },
  502. changeList(arr) {
  503. const newArr = [];
  504. this.state.columns.forEach((item) => {
  505. arr.forEach((val) => {
  506. if (val === item.title) {
  507. newArr.push(item);
  508. }
  509. });
  510. });
  511. this.setState({
  512. changeList: newArr,
  513. });
  514. },
  515. export() {
  516. this.setState({
  517. exportExecLoading: true
  518. })
  519. let loading = message.loading('加载中...');
  520. let data = this.state.searchValues;
  521. $.ajax({
  522. method: "get",
  523. dataType: "json",
  524. crossDomain: false,
  525. url: globalConfig.context + "/api/admin/expenseAccount/detailsListExport",
  526. data,
  527. success: function (data) {
  528. if (data.error.length === 0) {
  529. this.download(data.data.data);
  530. } else {
  531. message.warning(data.error[0].message);
  532. }
  533. }.bind(this),
  534. }).always(function () {
  535. loading();
  536. this.setState({
  537. exportExecLoading: false
  538. })
  539. }.bind(this));
  540. },
  541. // 下载
  542. download(fileName) {
  543. window.location.href = globalConfig.context + "/open/download?fileName=" + fileName
  544. },
  545. render() {
  546. const { TextArea } = Input
  547. const { searchValues, visible, } = this.state
  548. const formItemLayout = {
  549. labelCol: { span: 5 },
  550. wrapperCol: { span: 18 },
  551. };
  552. const dataSources = this.state.fjlist || [];
  553. const options = dataSources.map((group) => (
  554. <Select.Option key={group.id} value={group.name}>
  555. {group.name}
  556. </Select.Option>
  557. ));
  558. return (
  559. <div className="user-content">
  560. <ShowModalDiv ShowModal={this.state.showModal} />
  561. <div className="content-title" style={{ marginBottom: 10 }}>
  562. <span style={{ fontWeight: 900, fontSize: 16 }}>报销明细列表</span>
  563. </div>
  564. <Tabs defaultActiveKey="2" className="test">
  565. <TabPane tab="搜索" key="2">
  566. <div className="user-search" style={{ marginLeft: 10 }}>
  567. <Input
  568. placeholder="合同编号"
  569. value={searchValues["contractNo"]
  570. ? searchValues["contractNo"]
  571. : ""}
  572. onChange={(e) => {
  573. searchValues["contractNo"] = e.target.value;
  574. this.setState({
  575. searchValues: searchValues,
  576. });
  577. }}
  578. />
  579. <Input
  580. placeholder="客户名称"
  581. value={searchValues["username"]
  582. ? searchValues["username"]
  583. : ""}
  584. onChange={(e) => {
  585. searchValues["username"] = e.target.value;
  586. this.setState({
  587. searchValues: searchValues,
  588. });
  589. }}
  590. />
  591. <Select
  592. style={{ width: 140 }}
  593. placeholder="报销类型"
  594. value={searchValues["type"]
  595. ? searchValues["type"]
  596. : undefined}
  597. onChange={(e) => {
  598. searchValues["type"] = e;
  599. this.setState({
  600. searchValues: searchValues,
  601. });
  602. }}
  603. >
  604. <Option value="1">交通费</Option>
  605. <Option value="2">住宿费</Option>
  606. <Option value="3">市内车费</Option>
  607. <Option value="4">餐补</Option>
  608. <Option value="5">出差补贴</Option>
  609. <Option value="6">预借支</Option>
  610. <Option value="7">油费</Option>
  611. <Option value="8">招待费</Option>
  612. <Option value="9">办公费</Option>
  613. <Option value="10">福利费</Option>
  614. <Option value="11">物业水电费</Option>
  615. <Option value="12">打印费</Option>
  616. <Option value="0">其他</Option>
  617. </Select>
  618. <AutoComplete
  619. className="certain-category-search"
  620. dropdownClassName="certain-category-search-dropdown"
  621. dropdownMatchSelectWidth={false}
  622. style={{ width: 140 }}
  623. dataSource={options}
  624. placeholder="报销人"
  625. value={this.state.aname}
  626. onChange={this.followUp.bind(this)}
  627. filterOption={true}
  628. onSelect={this.selectF.bind(this)}
  629. >
  630. <Input />
  631. </AutoComplete>
  632. <Select
  633. placeholder="所属部门"
  634. style={{ width: 200, marginRight: 10 }}
  635. value={searchValues["depId"]
  636. ? searchValues["depId"]
  637. : undefined}
  638. onChange={e => {
  639. searchValues["depId"] = e;
  640. this.setState({
  641. searchValues: searchValues,
  642. });
  643. }}
  644. >
  645. {this.state.departmentArr.map(function (item) {
  646. return <Select.Option key={item.id}>{item.name}</Select.Option>;
  647. })}
  648. </Select>
  649. <Select
  650. placeholder="申请部门"
  651. style={{ width: 200, marginRight: 10 }}
  652. value={searchValues["applyDep"]
  653. ? searchValues["applyDep"]
  654. : undefined}
  655. onChange={e => {
  656. searchValues["applyDep"] = e;
  657. this.setState({
  658. searchValues: searchValues,
  659. });
  660. }}
  661. >
  662. {this.state.departmentArr.map(function (item) {
  663. return <Select.Option key={item.id}>{item.name}</Select.Option>;
  664. })}
  665. </Select>
  666. <Select
  667. placeholder="支付部门"
  668. style={{ width: 200, marginRight: 10 }}
  669. value={searchValues["payDep"]
  670. ? searchValues["payDep"]
  671. : undefined}
  672. onChange={e => {
  673. searchValues["payDep"] = e;
  674. this.setState({
  675. searchValues: searchValues,
  676. });
  677. }}
  678. >
  679. {this.state.departmentArr.map(function (item) {
  680. return <Select.Option key={item.id}>{item.name}</Select.Option>;
  681. })}
  682. </Select>
  683. <Input
  684. placeholder="报销编号"
  685. value={searchValues["checkNo"]
  686. ? searchValues["checkNo"]
  687. : ""}
  688. onChange={(e) => {
  689. searchValues["checkNo"] = e.target.value;
  690. this.setState({
  691. searchValues: searchValues,
  692. });
  693. }}
  694. />
  695. <div style={{ marginTop: 10 }}>
  696. <span>报销时间:</span>
  697. <RangePicker
  698. style={{ width: 300 }}
  699. value={[
  700. searchValues.startTime ? moment(searchValues.startTime) : null,
  701. searchValues.endTime ? moment(searchValues.endTime) : null,
  702. ]}
  703. onChange={(data, dataString) => {
  704. this.setState({
  705. searchValues: Object.assign(searchValues, {
  706. startTime: dataString[0],
  707. endTime: dataString[1],
  708. }),
  709. });
  710. }}
  711. />
  712. <Select
  713. style={{ width: 140, marginLeft: 10 }}
  714. placeholder="审核状态"
  715. value={searchValues["status"]
  716. ? searchValues["status"]
  717. : undefined}
  718. onChange={(e) => {
  719. searchValues["status"] = e;
  720. this.setState({
  721. searchValues: searchValues,
  722. });
  723. }}
  724. >
  725. <Option value="0">未提交</Option>
  726. <Option value="1">审核中</Option>
  727. <Option value="2">完成</Option>
  728. <Option value="3">驳回</Option>
  729. <Option value="4">撤销</Option>
  730. </Select>
  731. <Button
  732. type="primary"
  733. onClick={this.search}
  734. style={{ margin: "0 10px" }}
  735. >
  736. 搜索
  737. </Button>
  738. <Button onClick={this.reset}>重置</Button>
  739. </div>
  740. </div>
  741. </TabPane>
  742. <TabPane tab="更改表格显示数据" key="1">
  743. <div style={{ marginLeft: 10 }}>
  744. <ChooseList
  745. columns={this.state.columns}
  746. changeFn={this.changeList}
  747. changeList={this.state.changeList}
  748. top={55}
  749. margin={11}
  750. />
  751. </div>
  752. </TabPane>
  753. <TabPane tab="导出" key="3">
  754. <div style={{ float: "left" }}>
  755. <Button
  756. type="primary"
  757. loading={this.state.exportPendingLoading}
  758. onClick={this.export}
  759. style={{ margin: 10 }}
  760. >
  761. 导出excel
  762. </Button>
  763. </div>
  764. </TabPane>
  765. </Tabs>
  766. <div className="patent-table">
  767. <Spin spinning={this.state.loading}>
  768. <Table
  769. bordered
  770. columns={
  771. this.state.changeList == undefined
  772. ? this.state.columns
  773. : this.state.changeList
  774. }
  775. dataSource={this.state.dataSource}
  776. pagination={this.state.pagination}
  777. // onRowDoubleClick={this.tableRowClick.bind(this)}
  778. size="small"
  779. />
  780. </Spin>
  781. <p
  782. style={{ display: "inline-block", fontSize: "14px", color: "red" }}
  783. >
  784. {
  785. <span style={{ marginRight: 10 }}>
  786. {`金额总计(元):${this.state.totalAmount}`}
  787. </span>
  788. }
  789. </p>
  790. </div>
  791. {
  792. //审核弹窗
  793. this.state.visible != "" &&
  794. <Modal
  795. width="400px"
  796. maskClosable={false}
  797. title="审核"
  798. confirmLoading={this.state.loading}
  799. visible={this.state.visible != ""}
  800. onOk={() => { this.toExamine(visible == "adopt" ? 1 : visible == "reject" && 3) }}
  801. okText={this.state.visible == "adopt" ? "通过" : this.state.visible == "reject" && "驳回"}
  802. onCancel={() => {
  803. this.setState({
  804. visible: '',
  805. reason: "",
  806. checkData: {},
  807. })
  808. }}
  809. >
  810. <div style={{ width: "90%", margin: "0 auto" }}>
  811. <TextArea
  812. rows={4}
  813. value={this.state.reason}
  814. onChange={(e) => {
  815. this.setState({
  816. reason: e.target.value,
  817. })
  818. }}
  819. placeholder="请填写审核内容"
  820. />
  821. </div>
  822. </Modal>
  823. }
  824. {
  825. this.state.showDetails &&
  826. <AccountDetails
  827. showDetails={this.state.showDetails}
  828. id={this.state.id}
  829. isOperate={this.props.isOperate}
  830. onCancel={() => { this.setState({ showDetails: false }) }}
  831. />
  832. }
  833. {
  834. // 审核日志
  835. this.state.logvisible &&
  836. <Modal
  837. visible={this.state.logvisible}
  838. className="admin-desc-content"
  839. width="800px"
  840. maskClosable={false}
  841. title="审核日志"
  842. footer={null}
  843. onCancel={() => {
  844. this.setState({
  845. logvisible: false,
  846. })
  847. }}
  848. >
  849. <div className="patent-table">
  850. <Spin spinning={this.state.loading}>
  851. <Table
  852. columns={this.state.logcolumns}
  853. dataSource={this.state.logdataSour}
  854. pagination={false}
  855. bordered
  856. size="small"
  857. />
  858. </Spin>
  859. </div>
  860. </Modal>
  861. }
  862. </div>
  863. );
  864. },
  865. });
  866. export default AccountDetaillist;