accountDetaillist.jsx 26 KB

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