huiKuan.jsx 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998
  1. import React from "react";
  2. import $ from "jquery/src/ajax";
  3. import moment from "moment";
  4. import "./public.less";
  5. import {
  6. Form,
  7. Button,
  8. Input,
  9. Select,
  10. Spin,
  11. Table,
  12. message,
  13. Modal,
  14. Upload,
  15. DatePicker,
  16. Icon,
  17. Tabs,
  18. Popconfirm,
  19. Tag
  20. } from "antd";
  21. import {
  22. getProjectStatus,
  23. getProvinceA,
  24. getInvoiceStatus,
  25. getprovince,
  26. getStatus,
  27. getPeople,
  28. splitUrl
  29. } from "@/tools";
  30. import { ChooseList } from "../../../../component/manageCenter/order/orderNew/chooseList";
  31. import "./huiKuan.less"
  32. const { RangePicker } = DatePicker;
  33. const FormItem = Form.Item;
  34. const { TextArea } = Input;
  35. const { TabPane } = Tabs;
  36. const HuiKuan = React.createClass({
  37. loadData(pageNo) {
  38. this.state.data = [];
  39. this.setState({
  40. loading: true
  41. });
  42. $.ajax({
  43. method: "get",
  44. dataType: "json",
  45. crossDomain: false,
  46. url: globalConfig.context + "/api/admin/receivables/listReceivables",
  47. data: {
  48. pageNo: pageNo || 1,
  49. pageSize: this.state.pagination.pageSize,
  50. // 订单状态 判断是否重复
  51. status: this.state.statusSearch,
  52. // 订单编号
  53. orderNo: this.state.orderNoSearch,
  54. // 合同编号
  55. contractNo: this.state.nameSearch,
  56. // 付款方
  57. corporateName: this.state.payFrom,
  58. // 营销员名字
  59. adminName: this.state.adminName,
  60. // 客户名称
  61. nickname: this.state.nickname,
  62. // 订单所属部门id
  63. orderDepId: this.state.orderBranch,
  64. // 管理员部门id
  65. adminDepId: this.state.principalList
  66. },
  67. success: function(data) {
  68. let theArr = [];
  69. if (!data.data || !data.data.pagination.list) {
  70. if (data.error && data.error.length) {
  71. message.warning(data.error[0].message);
  72. }
  73. } else {
  74. for (let i = 0; i < data.data.pagination.list.length; i++) {
  75. let thisdata = data.data.pagination.list[i];
  76. theArr.push({
  77. key: thisdata.id,
  78. status: thisdata.status,
  79. orderNo: thisdata.orderNo,
  80. contractNo: thisdata.contractNo,
  81. corporateName: thisdata.corporateName,
  82. nickname: thisdata.nickname,
  83. totalAmount: thisdata.totalAmount,
  84. depName: thisdata.depName,
  85. amount: thisdata.amount,
  86. receivablesTimes: thisdata.receivablesTimes,
  87. createTimes: thisdata.createTimes,
  88. remarks: thisdata.remarks,
  89. financialPayNo: thisdata.financialPayNo
  90. });
  91. }
  92. }
  93. this.state.pagination.current = data.data.pagination.pageNo;
  94. this.state.pagination.total = data.data.pagination.totalCount;
  95. if (
  96. data.data &&
  97. data.data.pagination.list &&
  98. !data.data.pagination.list.length
  99. ) {
  100. this.state.pagination.current = 0;
  101. this.state.pagination.total = 0;
  102. }
  103. this.setState({
  104. totalPage: data.data.pagination.totalPage,
  105. dataSource: theArr,
  106. pagination: this.state.pagination,
  107. totalAmount: data.data.count.totalAmount,
  108. amount: data.data.count.amount
  109. });
  110. console.log(this.state.dataSource);
  111. }.bind(this)
  112. }).always(
  113. function() {
  114. this.setState({
  115. loading: false
  116. });
  117. }.bind(this)
  118. );
  119. },
  120. departmentList() {
  121. this.setState({
  122. loading: true
  123. });
  124. $.ajax({
  125. method: "get",
  126. dataType: "json",
  127. crossDomain: false,
  128. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  129. data: {},
  130. success: function(data) {
  131. let thedata = data.data;
  132. let theArr = [];
  133. if (!thedata) {
  134. if (data.error && data.error.length) {
  135. message.warning(data.error[0].message);
  136. }
  137. } else {
  138. thedata.map(function(item, index) {
  139. theArr.push({
  140. key: index,
  141. name: item.name,
  142. id: item.id
  143. });
  144. });
  145. }
  146. this.setState({
  147. departmentArr: theArr
  148. });
  149. }.bind(this)
  150. }).always(
  151. function() {
  152. this.setState({
  153. loading: false
  154. });
  155. }.bind(this)
  156. );
  157. },
  158. getInitialState() {
  159. return {
  160. visible: false,
  161. selectedRowKeys: [], // Check here to configure the default column
  162. loading: false,
  163. searchMore: true,
  164. assignVisible: false,
  165. releaseDate: [],
  166. totalPage: 0,
  167. boHuivisible: false,
  168. selectedRowKeys: [],
  169. selectedRows: [],
  170. // 弹出层数据
  171. modalData: {},
  172. // userName: "",
  173. contractNo: "",
  174. loading: false,
  175. reason: "",
  176. foo: 0,
  177. // 子组件改变的表格title数组
  178. changeList: undefined,
  179. pagination: {
  180. defaultCurrent: 1,
  181. defaultPageSize: 10,
  182. showQuickJumper: true,
  183. pageSize: 10,
  184. onChange: function(page) {
  185. this.loadData(page);
  186. }.bind(this),
  187. showTotal: function(total) {
  188. return "共" + total + "条数据";
  189. }
  190. },
  191. columns: [
  192. {
  193. title: "合同编号",
  194. dataIndex: "contractNo",
  195. key: "contractNo"
  196. // fixed: "left"
  197. },
  198. {
  199. title: "订单编号",
  200. dataIndex: "orderNo",
  201. key: "orderNo"
  202. },
  203. {
  204. title: "流水编号",
  205. dataIndex: "financialPayNo",
  206. key: "financialPayNo"
  207. },
  208. {
  209. title: "客户名称",
  210. dataIndex: "nickname",
  211. key: "nickname"
  212. },
  213. {
  214. title: "付款方",
  215. dataIndex: "corporateName",
  216. key: "corporateName"
  217. },
  218. {
  219. title: "合同额",
  220. dataIndex: "totalAmount",
  221. key: "totalAmount"
  222. },
  223. {
  224. title: "本次回款(万元)",
  225. dataIndex: "amount",
  226. key: "amount"
  227. },
  228. {
  229. title: "回款时间",
  230. dataIndex: "receivablesTimes",
  231. key: "receivablesTimes"
  232. },
  233. {
  234. title: "状态",
  235. dataIndex: "status",
  236. key: "status",
  237. render: status => {
  238. let str = "";
  239. let color = "";
  240. if (status == 0) {
  241. str = "正常";
  242. color = "#87d068";
  243. } else if (status == 1) {
  244. str = "重复";
  245. color = "#f50";
  246. } else {
  247. str = "异常";
  248. color = "#000";
  249. }
  250. return <Tag color={color}>{str}</Tag>;
  251. }
  252. },
  253. {
  254. title: "批量导入时间",
  255. dataIndex: "createTimes",
  256. key: "createTimes"
  257. },
  258. {
  259. title: "备注",
  260. dataIndex: "remarks",
  261. key: "remarks"
  262. }
  263. ],
  264. columnsDate: [
  265. {
  266. title: "编号",
  267. dataIndex: "id",
  268. key: "id"
  269. },
  270. {
  271. title: "订单编号",
  272. dataIndex: "orderno",
  273. key: "orderno"
  274. },
  275. {
  276. title: "开票金额(万元)",
  277. dataIndex: "amount",
  278. key: "amount"
  279. },
  280. {
  281. title: "申请时间",
  282. dataIndex: "createTime",
  283. key: "createTime"
  284. },
  285. {
  286. title: "开票状态",
  287. dataIndex: "status",
  288. key: "status",
  289. render: text => {
  290. return getInvoiceStatus(text);
  291. }
  292. }
  293. ],
  294. dataSource: [],
  295. upLoadFlag: false,
  296. upLoad: {
  297. name: "file",
  298. action: globalConfig.context + "/api/admin/receivables/import",
  299. headers: {
  300. authorization: "authorization-text"
  301. },
  302. onChange: info => {
  303. if(info.file.status == "done") {
  304. if (info.file.response.data == 1) {
  305. message.success("导入成功!");
  306. this.loadData();
  307. } else {
  308. message.warning(info.file.response.error[0].message);
  309. }
  310. }
  311. }
  312. }
  313. };
  314. },
  315. search() {
  316. this.loadData();
  317. },
  318. componentWillMount() {
  319. this.loadData();
  320. this.departmentList();
  321. $("#rcDialogTitle0").on("click", function() {
  322. alert(123);
  323. console.log(123);
  324. });
  325. },
  326. reset() {
  327. this.state.nameSearch = "";
  328. this.state.releaseDate = [];
  329. this.state.orderNoSearch = "";
  330. this.state.adminName = "";
  331. this.state.departmenttList = [];
  332. this.state.nickname = "";
  333. this.state.principalList = [];
  334. this.state.payFrom = "";
  335. this.state.statusSearch = [];
  336. this.state.orderBranch = [];
  337. this.state.statusSearch = [];
  338. this.loadData();
  339. },
  340. changeList(arr) {
  341. const newArr = [];
  342. this.state.columns.forEach(item => {
  343. arr.forEach(val => {
  344. if (val === item.title) {
  345. newArr.push(item);
  346. }
  347. });
  348. });
  349. this.setState({
  350. changeList: newArr
  351. });
  352. },
  353. onSelectChange(selectedRowKeys) {
  354. console.log("selectedRowKeys changed: ", selectedRowKeys);
  355. this.setState({ selectedRowKeys });
  356. },
  357. showModal() {
  358. this.setState({
  359. visible: true,
  360. choose: true
  361. });
  362. this.state.dataSource.forEach((item) => {
  363. if(item.key == this.state.selectedRowKeys[0]) {
  364. this.setState({
  365. modalData: JSON.parse(JSON.stringify(item))
  366. })
  367. console.log(this.state.modalData);
  368. }
  369. })
  370. },
  371. handleOk() {
  372. this.setState({ loading: true });
  373. if(!this.state.choose) {
  374. $.ajax({
  375. method: "POST",
  376. dataType: "json",
  377. crossDomain: false,
  378. url: globalConfig.context + "/api/admin/receivables/addReceivables",
  379. data: {
  380. orderNo: this.state.modalData.orderNo,
  381. amount: this.state.modalData.amount,
  382. receivablesTimes: this.state.modalData.receivablesTimes,
  383. // totalAmount: this.state.modalData.totalAmount,
  384. // contractNo: this.state.modalData.contractNo,
  385. // nickname: this.state.modalData.nickname,
  386. remarks: this.state.modalData.remarks,
  387. corporateName: this.state.modalData.corporateName,
  388. financialPayNo: this.state.modalData.financialPayNo
  389. },
  390. success: function(data) {
  391. if (data.error && data.error.length) {
  392. message.warning(data.error[0].message);
  393. } else {
  394. console.log("成功", data);
  395. this.loadData();
  396. this.setState({ loading: false, visible: false });
  397. }
  398. }.bind(this)
  399. }).always(
  400. function() {
  401. this.setState({
  402. loading: false
  403. });
  404. }.bind(this)
  405. );
  406. }else{
  407. $.ajax({
  408. method: "POST",
  409. dataType: "json",
  410. crossDomain: false,
  411. url: globalConfig.context + "/api/admin/receivables/updateReceivables",
  412. data: {
  413. orderNo: this.state.modalData.orderNo,
  414. amount: this.state.modalData.amount,
  415. receivablesTimes: this.state.modalData.receivablesTimes,
  416. // totalAmount: this.state.modalData.totalAmount,
  417. // contractNo: this.state.modalData.contractNo,
  418. // nickname: this.state.modalData.nickname,
  419. remarks: this.state.modalData.remarks,
  420. id: this.state.modalData.key
  421. },
  422. success: function(data) {
  423. if (data.error && data.error.length) {
  424. message.warning(data.error[0].message);
  425. }else {
  426. console.log("成功",data);
  427. this.loadData()
  428. this.setState({ loading: false, visible: false });
  429. }
  430. }.bind(this)
  431. }).always(
  432. function() {
  433. this.setState({
  434. loading: false
  435. });
  436. }.bind(this)
  437. );}
  438. // this.setState({ loading: false, visible: false });
  439. },
  440. handleCancel() {
  441. this.setState({ visible: false });
  442. },
  443. callback(key) {
  444. console.log(key);
  445. },
  446. delChecked() {
  447. console.log("被删除列表",this.state.selectedRowKeys);
  448. let ids = this.state.selectedRowKeys.join(",")
  449. $.ajax({
  450. method: "POST",
  451. dataType: "json",
  452. crossDomain: false,
  453. url: globalConfig.context + "/api/admin/receivables/deleteReceivables",
  454. data: {
  455. ids,
  456. type: 0
  457. },
  458. success: function(data) {
  459. if (data.error && data.error.length) {
  460. message.warning(data.error[0].message);
  461. }
  462. }.bind(this)
  463. }).always(
  464. function() {
  465. this.loadData()
  466. }.bind(this)
  467. );
  468. // this.loadData()
  469. },
  470. delAllChecked() {
  471. console.log("删除全部");
  472. $.ajax({
  473. method: "POST",
  474. dataType: "json",
  475. crossDomain: false,
  476. url: globalConfig.context + "/api/admin/receivables/deleteReceivables",
  477. data: {
  478. type: 1
  479. },
  480. success: function(data) {
  481. if (data.error && data.error.length) {
  482. message.warning(data.error[0].message);
  483. }
  484. }.bind(this)
  485. }).always(
  486. function() {
  487. this.loadData();
  488. }.bind(this)
  489. );
  490. // this.loadData()
  491. // console.log("aaa", $(".ant-modal-content"));
  492. },
  493. mergeAll() {
  494. console.log("合并全部");
  495. $.ajax({
  496. method: "POST",
  497. dataType: "json",
  498. crossDomain: false,
  499. url: globalConfig.context + "/api/admin/receivables/batchImport",
  500. data: {},
  501. success: function(data) {
  502. if (data.error && data.error.length) {
  503. message.warning(data.error[0].message);
  504. }else {
  505. message.success("合并成功!请在收款列表中,查看已收款情况。");
  506. }
  507. }.bind(this)
  508. }).always(
  509. function() {
  510. this.loadData();
  511. }.bind(this)
  512. );
  513. // message.success("合并成功!请在收款列表中,查看已收款情况。");
  514. },
  515. addModal() {
  516. this.state.modalData = {}
  517. this.setState({
  518. modalData: this.state.modalData,
  519. visible: true,
  520. choose: false
  521. })
  522. },
  523. download() {
  524. window.location.href =
  525. globalConfig.context +
  526. "/api/admin/receivables/downloadTemplate?" +
  527. "sign=receivbles_template";
  528. },
  529. // daoHui() {
  530. // window.location.href =
  531. // globalConfig.context +
  532. // "/api/admin/receivables/exportReceivables"
  533. // },
  534. render() {
  535. const formItemLayout = {
  536. labelCol: { span: 8 },
  537. wrapperCol: { span: 14 }
  538. };
  539. var departmentArr = this.state.departmentArr || [];
  540. const { loading, selectedRowKeys, visible } = this.state;
  541. const rowSelection = {
  542. selectedRowKeys,
  543. onChange: this.onSelectChange,
  544. hideDefaultSelections: true
  545. };
  546. var departmentArr = this.state.departmentArr || [];
  547. return (
  548. <div className="user-content" style={{ position: "relative" }}>
  549. <div className="content-title" style={{ marginBottom: 10 }}>
  550. <span style={{ fontWeight: 900, fontSize: 16 }}>回款</span>
  551. </div>
  552. <Tabs defaultActiveKey="1" onChange={this.callback}>
  553. <TabPane tab="搜索" key="1">
  554. <div className="user-search" style={{ marginLeft: 10 }}>
  555. <Input
  556. placeholder="合同编号"
  557. value={this.state.nameSearch}
  558. onChange={e => {
  559. this.setState({ nameSearch: e.target.value });
  560. }}
  561. />
  562. <Input
  563. placeholder="订单编号"
  564. value={this.state.orderNoSearch}
  565. onChange={e => {
  566. this.setState({ orderNoSearch: e.target.value });
  567. }}
  568. />
  569. <Input
  570. placeholder="客户名称"
  571. value={this.state.nickname}
  572. onChange={e => {
  573. this.setState({ nickname: e.target.value });
  574. }}
  575. />
  576. <Select
  577. placeholder="状态"
  578. style={{ width: 150, marginRight: 10 }}
  579. value={this.state.statusSearch}
  580. onChange={e => {
  581. this.setState({ statusSearch: e });
  582. console.log("状态", e);
  583. }}
  584. >
  585. <Select.Option key={0}>正常</Select.Option>
  586. <Select.Option key={1}>重复</Select.Option>
  587. <Select.Option key={2}>异常</Select.Option>
  588. </Select>
  589. <Input
  590. placeholder="订单负责人"
  591. value={this.state.adminName}
  592. onChange={e => {
  593. this.setState({ adminName: e.target.value });
  594. }}
  595. />
  596. <Select
  597. placeholder="订单所属部门"
  598. style={{ width: 150, marginRight: 10 }}
  599. value={this.state.orderBranch}
  600. onChange={e => {
  601. this.setState({ orderBranch: e });
  602. }}
  603. >
  604. {departmentArr.map(function(item) {
  605. return (
  606. <Select.Option key={item.id}>{item.name}</Select.Option>
  607. );
  608. })}
  609. </Select>
  610. <Select
  611. placeholder="负责人所属部门"
  612. style={{ width: 150, marginRight: 10 }}
  613. value={this.state.principalList}
  614. onChange={e => {
  615. this.setState({ principalList: e });
  616. }}
  617. >
  618. {departmentArr.map(function(item) {
  619. return (
  620. <Select.Option key={item.id}>{item.name}</Select.Option>
  621. );
  622. })}
  623. </Select>
  624. <Input
  625. placeholder="付款方"
  626. value={this.state.payFrom}
  627. onChange={e => {
  628. this.setState({ payFrom: e.target.value });
  629. }}
  630. />
  631. <Button
  632. type="primary"
  633. onClick={this.search}
  634. style={{ marginLeft: 10 }}
  635. >
  636. 搜索
  637. </Button>
  638. <Button onClick={this.reset}>重置</Button>
  639. </div>
  640. </TabPane>
  641. <TabPane tab="更改表格显示数据" key="2">
  642. <div style={{ marginLeft: 10 }}>
  643. <ChooseList
  644. columns={this.state.columns}
  645. changeFn={this.changeList}
  646. changeList={this.state.changeList}
  647. top={55}
  648. display={"inline-block"}
  649. style={{ marginBottom: 17 }}
  650. />
  651. </div>
  652. </TabPane>
  653. <TabPane tab="操作" key="3">
  654. <div
  655. class={123}
  656. style={{
  657. position: "relative",
  658. top: 10,
  659. left: 10,
  660. // zIndex: 99,
  661. // left: 400,
  662. // transform: "translateX(-50%)",
  663. display: "inline-block",
  664. width: 119,
  665. height: 28,
  666. overflow: "hidden"
  667. }}
  668. >
  669. <Upload {...this.state.upLoad}>
  670. <Button
  671. type="primary"
  672. disabled={this.state.dataSource.length != 0}
  673. >
  674. <Icon type="upload" />
  675. 导入回款列表
  676. </Button>
  677. </Upload>
  678. </div>
  679. <Button
  680. type="primary"
  681. style={{ marginBottom: 20, marginLeft: 15 }}
  682. onClick={this.download}
  683. >
  684. 下载回款列表模板
  685. </Button>
  686. {/* <Button
  687. type="primary"
  688. style={{ marginBottom: 20, marginLeft: 15 }}
  689. onClick={this.daoHui}
  690. >
  691. 导出回款列表
  692. </Button> */}
  693. <Button
  694. type="primary"
  695. style={{ marginBottom: 20, marginLeft: 15 }}
  696. disabled={this.state.selectedRowKeys.length == 1 ? false : true}
  697. onClick={this.showModal}
  698. >
  699. 修改单条数据
  700. </Button>
  701. <Button
  702. type="primary"
  703. style={{ marginBottom: 20, marginLeft: 15 }}
  704. onClick={this.addModal}
  705. >
  706. 添加单条数据
  707. </Button>
  708. <Popconfirm
  709. placement="top"
  710. title={"您确定要删除选中项的回款信息吗?删除后,不可以恢复!"}
  711. onConfirm={this.delChecked}
  712. okText="确定"
  713. cancelText="取消"
  714. >
  715. <Button
  716. primary
  717. type="danger"
  718. style={{ marginBottom: 20, marginLeft: 15 }}
  719. disabled={this.state.selectedRowKeys.length > 0 ? false : true}
  720. >
  721. 删除选中项
  722. </Button>
  723. </Popconfirm>
  724. <Popconfirm
  725. placement="top"
  726. title={"您确定要删除全部的回款信息吗?删除后,不可以恢复!"}
  727. onConfirm={this.delAllChecked}
  728. okText="确定"
  729. cancelText="取消"
  730. >
  731. <Button
  732. type="danger"
  733. style={{ marginBottom: 20, marginLeft: 15 }}
  734. >
  735. 删除全部
  736. </Button>
  737. </Popconfirm>
  738. <Popconfirm
  739. placement="top"
  740. title={"您确定要合并全部的回款信息吗?合并后,不可以修改!"}
  741. onConfirm={this.mergeAll}
  742. okText="确定"
  743. cancelText="取消"
  744. >
  745. <Button
  746. type="danger"
  747. style={{ marginBottom: 20, marginLeft: 15 }}
  748. disabled={this.state.dataSource.length == 0}
  749. >
  750. 确认合并回款
  751. </Button>
  752. </Popconfirm>
  753. </TabPane>
  754. </Tabs>
  755. <div className="patent-table" style={{ position: "relative" }}>
  756. <Spin spinning={this.state.loading}>
  757. <Table
  758. columns={
  759. this.state.changeList == undefined
  760. ? this.state.columns
  761. : this.state.changeList
  762. }
  763. // scroll={{ x: 1500, y: 0 }}
  764. dataSource={this.state.dataSource}
  765. pagination={this.state.pagination}
  766. rowSelection={rowSelection}
  767. bordered
  768. />
  769. </Spin>
  770. </div>
  771. <Modal
  772. width={500}
  773. visible={visible}
  774. title="收款记录"
  775. onOk={this.handleOk}
  776. onCancel={this.handleCancel}
  777. footer={[
  778. <Button key="back" onClick={this.handleCancel}>
  779. 取消
  780. </Button>,
  781. <Button
  782. key="submit"
  783. type="primary"
  784. loading={loading}
  785. onClick={this.handleOk}
  786. >
  787. 保存
  788. </Button>
  789. ]}
  790. >
  791. <p
  792. style={{
  793. marginBottom: 10,
  794. display: this.state.choose ? "block" : "none"
  795. }}
  796. >
  797. 合同编号:
  798. <Input
  799. style={{
  800. width: "auto"
  801. }}
  802. disabled={this.state.choose}
  803. value={this.state.modalData.contractNo}
  804. onChange={e => {
  805. let val = e.target.value;
  806. this.state.modalData.contractNo = val;
  807. this.setState({ modalData: this.state.modalData });
  808. }}
  809. />
  810. </p>
  811. <p style={{ marginBottom: 10 }}>
  812. 订单编号:
  813. <Input
  814. style={{ width: "auto" }}
  815. value={this.state.modalData.orderNo}
  816. onChange={e => {
  817. let val = e.target.value;
  818. this.state.modalData.orderNo = val;
  819. this.setState({ modalData: this.state.modalData });
  820. }}
  821. />
  822. </p>
  823. <p style={{ marginBottom: 10 }}>
  824. 流水编号:
  825. <Input
  826. style={{ width: "auto" }}
  827. value={this.state.modalData.financialPayNo}
  828. onChange={e => {
  829. let val = e.target.value;
  830. this.state.modalData.financialPayNo = val;
  831. this.setState({ modalData: this.state.modalData });
  832. }}
  833. />
  834. </p>
  835. <p style={{ marginBottom: 10 }}>
  836. 付款方:
  837. <Input
  838. style={{ width: "auto" }}
  839. value={this.state.modalData.corporateName}
  840. onChange={e => {
  841. let val = e.target.value;
  842. this.state.modalData.corporateName = val;
  843. this.setState({ modalData: this.state.modalData });
  844. }}
  845. />
  846. </p>
  847. <p
  848. style={{
  849. marginBottom: 10,
  850. display: this.state.choose ? "block" : "none"
  851. }}
  852. >
  853. 客户名称:
  854. <Input
  855. style={{
  856. width: "auto"
  857. }}
  858. disabled={this.state.choose}
  859. value={this.state.modalData.nickname}
  860. onChange={e => {
  861. let val = e.target.value;
  862. this.state.modalData.nickname = val;
  863. this.setState({ modalData: this.state.modalData });
  864. }}
  865. />
  866. </p>
  867. <p
  868. style={{
  869. marginBottom: 10,
  870. display: this.state.choose ? "block" : "none"
  871. }}
  872. >
  873. 合同额(万元):
  874. <Input
  875. style={{
  876. width: "auto",
  877. display: this.state.choose ? "inline-block" : "none"
  878. }}
  879. disabled={this.state.choose}
  880. value={this.state.modalData.totalAmount}
  881. onChange={e => {
  882. let val = e.target.value;
  883. this.state.modalData.totalAmount = val;
  884. this.setState({ modalData: this.state.modalData });
  885. }}
  886. />
  887. </p>
  888. <p style={{ marginBottom: 10 }}>
  889. 本次回款(万元):
  890. <Input
  891. style={{ width: "auto" }}
  892. value={this.state.modalData.amount}
  893. onChange={e => {
  894. let val = e.target.value;
  895. this.state.modalData.amount = val;
  896. this.setState({ modalData: this.state.modalData });
  897. }}
  898. />
  899. </p>
  900. <p style={{ marginBottom: 10 }}>
  901. 回款时间:
  902. <DatePicker
  903. showTime
  904. placeholder="选择回款时间"
  905. value={
  906. this.state.modalData.receivablesTimes
  907. ? moment(this.state.modalData.receivablesTimes, "YYYY-MM-DD")
  908. : ""
  909. }
  910. onChange={(v, e) => {
  911. this.state.modalData.receivablesTimes = e;
  912. console.log(e);
  913. this.setState({ modalData: this.state.modalData });
  914. }}
  915. onOk={() => {}}
  916. />
  917. </p>
  918. <p
  919. style={{
  920. marginBottom: 10,
  921. display: this.state.choose ? "block" : "none"
  922. }}
  923. >
  924. 批量导入时间:
  925. <Input
  926. style={{ width: "auto" }}
  927. value={this.state.modalData.createTimes}
  928. disabled
  929. onChange={e => {
  930. let val = e.target.value;
  931. this.state.modalData.createTimes = val;
  932. this.setState({ modalData: this.state.modalData });
  933. }}
  934. />
  935. </p>
  936. <p style={{ marginBottom: 10 }}>
  937. <span style={{ display: "inline-block", marginBottom: 20 }}>
  938. 备注:
  939. </span>
  940. <TextArea
  941. style={{ width: "70%" }}
  942. value={this.state.modalData.remarks}
  943. onChange={e => {
  944. this.state.modalData.remarks = e.target.value;
  945. console.log(e);
  946. this.setState({ modalData: this.state.modalData });
  947. }}
  948. placeholder="请输入备注信息"
  949. autosize={{ minRows: 3, maxRows: 5 }}
  950. />
  951. </p>
  952. </Modal>
  953. </div>
  954. );
  955. }
  956. });
  957. export default HuiKuan;