huiKuan.jsx 28 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007
  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. totalHui: data.data.count ? data.data.count.totalAmount : 0,
  108. hui: data.data.count ? data.data.count.amount : 0
  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. <p
  771. style={{ display: "inline-block", fontSize: "14px", color: "red" }}
  772. >
  773. {`回款金额总计(万元):${
  774. this.state.totalHui ? this.state.totalHui : "0"
  775. }` +
  776. " " +
  777. " " +
  778. `合同额总计(万元):${this.state.hui ? this.state.hui : "0"}`}
  779. </p>
  780. </div>
  781. <Modal
  782. width={500}
  783. visible={visible}
  784. title="收款记录"
  785. onOk={this.handleOk}
  786. onCancel={this.handleCancel}
  787. footer={[
  788. <Button key="back" onClick={this.handleCancel}>
  789. 取消
  790. </Button>,
  791. <Button
  792. key="submit"
  793. type="primary"
  794. loading={loading}
  795. onClick={this.handleOk}
  796. >
  797. 保存
  798. </Button>
  799. ]}
  800. >
  801. <p
  802. style={{
  803. marginBottom: 10,
  804. display: this.state.choose ? "block" : "none"
  805. }}
  806. >
  807. 合同编号:
  808. <Input
  809. style={{
  810. width: "auto"
  811. }}
  812. disabled={this.state.choose}
  813. value={this.state.modalData.contractNo}
  814. onChange={e => {
  815. let val = e.target.value;
  816. this.state.modalData.contractNo = val;
  817. this.setState({ modalData: this.state.modalData });
  818. }}
  819. />
  820. </p>
  821. <p style={{ marginBottom: 10 }}>
  822. 订单编号:
  823. <Input
  824. style={{ width: "auto" }}
  825. value={this.state.modalData.orderNo}
  826. onChange={e => {
  827. let val = e.target.value;
  828. this.state.modalData.orderNo = val;
  829. this.setState({ modalData: this.state.modalData });
  830. }}
  831. />
  832. </p>
  833. <p style={{ marginBottom: 10 }}>
  834. 流水编号:
  835. <Input
  836. style={{ width: "auto" }}
  837. value={this.state.modalData.financialPayNo}
  838. onChange={e => {
  839. let val = e.target.value;
  840. this.state.modalData.financialPayNo = val;
  841. this.setState({ modalData: this.state.modalData });
  842. }}
  843. />
  844. </p>
  845. <p style={{ marginBottom: 10 }}>
  846. 付款方:
  847. <Input
  848. style={{ width: "auto" }}
  849. value={this.state.modalData.corporateName}
  850. onChange={e => {
  851. let val = e.target.value;
  852. this.state.modalData.corporateName = val;
  853. this.setState({ modalData: this.state.modalData });
  854. }}
  855. />
  856. </p>
  857. <p
  858. style={{
  859. marginBottom: 10,
  860. display: this.state.choose ? "block" : "none"
  861. }}
  862. >
  863. 客户名称:
  864. <Input
  865. style={{
  866. width: "auto"
  867. }}
  868. disabled={this.state.choose}
  869. value={this.state.modalData.nickname}
  870. onChange={e => {
  871. let val = e.target.value;
  872. this.state.modalData.nickname = val;
  873. this.setState({ modalData: this.state.modalData });
  874. }}
  875. />
  876. </p>
  877. <p
  878. style={{
  879. marginBottom: 10,
  880. display: this.state.choose ? "block" : "none"
  881. }}
  882. >
  883. 合同额(万元):
  884. <Input
  885. style={{
  886. width: "auto",
  887. display: this.state.choose ? "inline-block" : "none"
  888. }}
  889. disabled={this.state.choose}
  890. value={this.state.modalData.totalAmount}
  891. onChange={e => {
  892. let val = e.target.value;
  893. this.state.modalData.totalAmount = val;
  894. this.setState({ modalData: this.state.modalData });
  895. }}
  896. />
  897. </p>
  898. <p style={{ marginBottom: 10 }}>
  899. 本次回款(万元):
  900. <Input
  901. style={{ width: "auto" }}
  902. value={this.state.modalData.amount}
  903. onChange={e => {
  904. let val = e.target.value;
  905. this.state.modalData.amount = val;
  906. this.setState({ modalData: this.state.modalData });
  907. }}
  908. />
  909. </p>
  910. <p style={{ marginBottom: 10 }}>
  911. 回款时间:
  912. <DatePicker
  913. showTime
  914. placeholder="选择回款时间"
  915. value={
  916. this.state.modalData.receivablesTimes
  917. ? moment(this.state.modalData.receivablesTimes, "YYYY-MM-DD")
  918. : ""
  919. }
  920. onChange={(v, e) => {
  921. this.state.modalData.receivablesTimes = e;
  922. console.log(e);
  923. this.setState({ modalData: this.state.modalData });
  924. }}
  925. onOk={() => {}}
  926. />
  927. </p>
  928. <p
  929. style={{
  930. marginBottom: 10,
  931. display: this.state.choose ? "block" : "none"
  932. }}
  933. >
  934. 批量导入时间:
  935. <Input
  936. style={{ width: "auto" }}
  937. value={this.state.modalData.createTimes}
  938. disabled
  939. onChange={e => {
  940. let val = e.target.value;
  941. this.state.modalData.createTimes = val;
  942. this.setState({ modalData: this.state.modalData });
  943. }}
  944. />
  945. </p>
  946. <p style={{ marginBottom: 10 }}>
  947. <span style={{ display: "inline-block", marginBottom: 20 }}>
  948. 备注:
  949. </span>
  950. <TextArea
  951. style={{ width: "70%" }}
  952. value={this.state.modalData.remarks}
  953. onChange={e => {
  954. this.state.modalData.remarks = e.target.value;
  955. console.log(e);
  956. this.setState({ modalData: this.state.modalData });
  957. }}
  958. placeholder="请输入备注信息"
  959. autosize={{ minRows: 3, maxRows: 5 }}
  960. />
  961. </p>
  962. </Modal>
  963. </div>
  964. );
  965. }
  966. });
  967. export default HuiKuan;