approvedOutsourcing.jsx 72 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406
  1. import React from "react";
  2. import $ from "jquery/src/ajax";
  3. import moment from "moment";
  4. import "./public.less";
  5. import {
  6. Button,
  7. Form,
  8. Input,
  9. Select,
  10. Spin,
  11. Table,
  12. message,
  13. DatePicker,
  14. Modal,
  15. Upload,
  16. Tabs
  17. } from "antd";
  18. import Receivable from "./receivable";
  19. import Assign from "@/manageCenter/publicComponent/assign";
  20. import ReactToPrint from "react-to-print";
  21. import {
  22. getjiedian,
  23. getProcessStatus,
  24. getApproval,
  25. getNewOrderType,
  26. getLiquidationStatus,
  27. getProjectStatus,
  28. splitUrl,
  29. getprovince,
  30. getRefundStatus,
  31. getTransactionProject
  32. } from "@/tools";
  33. import { ChooseList } from "../../../../component/manageCenter/order/orderNew/chooseList";
  34. const FormItem = Form.Item;
  35. const approvedOutsourcing = React.createClass({
  36. departmentList() {
  37. this.setState({
  38. loading: true
  39. });
  40. $.ajax({
  41. method: "get",
  42. dataType: "json",
  43. crossDomain: false,
  44. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  45. data: {},
  46. success: function(data) {
  47. let thedata = data.data;
  48. let theArr = [];
  49. if (!thedata) {
  50. if (data.error && data.error.length) {
  51. message.warning(data.error[0].message);
  52. }
  53. } else {
  54. thedata.map(function(item, index) {
  55. theArr.push({
  56. key: index,
  57. name: item.name,
  58. id: item.id
  59. });
  60. });
  61. }
  62. this.setState({
  63. departmentArr: theArr
  64. });
  65. }.bind(this)
  66. }).always(
  67. function() {
  68. this.setState({
  69. loading: false
  70. });
  71. }.bind(this)
  72. );
  73. },
  74. loadData(pageNo, pageSize) {
  75. this.state.data = [];
  76. this.setState({
  77. selectedRowKeys: [],
  78. selectedRowKey: [],
  79. page: pageNo,
  80. loading: true
  81. });
  82. $.ajax({
  83. method: "get",
  84. dataType: "json",
  85. crossDomain: false,
  86. url: globalConfig.context + "/api/admin/financial/financeList",
  87. data: {
  88. pageNo: pageNo || 1,
  89. pageSize: pageSize || this.state.pagination.pageSize,
  90. buyerName: this.state.nameSearch, //客户名称
  91. orderNo: this.state.orderNoSearch,
  92. startTime: this.state.releaseDate[0],
  93. endTime: this.state.releaseDate[1],
  94. startFinalReceivablesTime: this.state.shouKuanDate[0],
  95. endFinalReceivablesTime: this.state.shouKuanDate[1],
  96. departmentId: this.state.departmenttList,
  97. processStatus: this.state.processStatusSearch,
  98. contractNo: this.state.contractNoSearch,
  99. outsource: 1,
  100. liquidationStatus: this.state.liquidationStatus
  101. },
  102. success: function(data) {
  103. let theArr = [];
  104. if (!data.data || !data.data.pagination.list) {
  105. if (data.error && data.error.length) {
  106. message.warning(data.error[0].message);
  107. }
  108. } else {
  109. for (let i = 0; i < data.data.pagination.list.length; i++) {
  110. let thisdata = data.data.pagination.list[i];
  111. theArr.push({
  112. key: thisdata.orderNo,
  113. orderNo: thisdata.orderNo,
  114. orderType: thisdata.orderType,
  115. orderStatus: thisdata.orderStatus,
  116. sellerName: thisdata.sellerName,
  117. processStatus: thisdata.processStatus,
  118. liquidationStatus: thisdata.liquidationStatus,
  119. approval: thisdata.approval,
  120. buyerName: thisdata.buyerName,
  121. actuallyTotalAmount: thisdata.actuallyTotalAmount,
  122. signTime: thisdata.signTime,
  123. companyId: thisdata.companyId,
  124. companyName: thisdata.companyName,
  125. buyerId: thisdata.buyerId,
  126. buyerName: thisdata.buyerName,
  127. contractNo: thisdata.contractNo,
  128. createTime: thisdata.createTime,
  129. departmentName: thisdata.departmentName,
  130. outsourceName: thisdata.outsourceName,
  131. invoiceAmount: thisdata.invoiceAmount,
  132. finalReceivables: thisdata.finalReceivables,
  133. finalReceivablesTime: thisdata.finalReceivablesTime,
  134. signTotalAmount: thisdata.signTotalAmount
  135. });
  136. }
  137. }
  138. this.state.pagination.current = data.data.pagination.pageNo;
  139. this.state.pagination.total = data.data.pagination.totalCount;
  140. if (
  141. data.data &&
  142. data.data.pagination.list &&
  143. !data.data.pagination.list.length
  144. ) {
  145. this.state.pagination.current = 0;
  146. this.state.pagination.total = 0;
  147. }
  148. this.setState({
  149. totalPage: data.data.pagination.totalPage,
  150. dataSource: theArr,
  151. pagination: this.state.pagination,
  152. totalHui: data.data.count ? data.data.count.signTotalAmount : 0,
  153. hui: data.data.count ? data.data.count.actuallyTotalAmount : 0
  154. });
  155. }.bind(this)
  156. }).always(
  157. function() {
  158. this.setState({
  159. loading: false
  160. });
  161. }.bind(this)
  162. );
  163. },
  164. getInitialState() {
  165. return {
  166. rotateDeg: 0,
  167. searchMore: true,
  168. assignVisibleX: false,
  169. assignVisibleY: false,
  170. releaseDate: [],
  171. shouKuanDate: [],
  172. assignDataX: [],
  173. assignDataY: [],
  174. attachmentUrl: [],
  175. pictureUrl: [],
  176. totalPage: 0,
  177. modKey: "1",
  178. width: "800px",
  179. boHuivisible: false,
  180. selectedRowKeys: [],
  181. selectedRows: [],
  182. loading: false,
  183. pagination: {
  184. defaultCurrent: 1,
  185. defaultPageSize: 10,
  186. showQuickJumper: true,
  187. pageSize: 10,
  188. onChange: function(page) {
  189. this.loadData(page);
  190. }.bind(this),
  191. showTotal: function(total) {
  192. return "共" + total + "条数据";
  193. }
  194. },
  195. // 子组件改变的表格title数组
  196. changeList: undefined,
  197. columns: [
  198. {
  199. title: "合同编号",
  200. dataIndex: "contractNo",
  201. key: "contractNo",
  202. className: "title-table"
  203. },
  204. {
  205. title: "订单编号",
  206. dataIndex: "orderNo",
  207. key: "orderNo",
  208. className: "title-table"
  209. // fixed: "left"
  210. },
  211. {
  212. title: "客户名称",
  213. dataIndex: "buyerName",
  214. key: "buyerName",
  215. className: "title-table"
  216. },
  217. {
  218. title: "订单部门",
  219. dataIndex: "departmentName",
  220. key: "departmentName",
  221. className: "title-table"
  222. },
  223. {
  224. title: "订单负责人",
  225. dataIndex: "sellerName",
  226. key: "sellerName",
  227. className: "title-table"
  228. },
  229. {
  230. title: "外包公司",
  231. dataIndex: "outsourceName",
  232. key: "outsourceName",
  233. className: "title-table"
  234. },
  235. {
  236. title: "签单日期",
  237. dataIndex: "signTime",
  238. key: "signTime",
  239. className: "title-table"
  240. },
  241. {
  242. title: "下单日期",
  243. dataIndex: "createTime",
  244. key: "createTime",
  245. className: "title-table"
  246. },
  247. {
  248. title: "签单金额(万元)",
  249. dataIndex: "signTotalAmount",
  250. key: "signTotalAmount",
  251. className: "title-table"
  252. },
  253. {
  254. title: "开票金额(万元)",
  255. dataIndex: "invoiceAmount",
  256. key: "invoiceAmount",
  257. className: "title-table"
  258. },
  259. {
  260. title: "已收款(万元)",
  261. dataIndex: "actuallyTotalAmount",
  262. key: "actuallyTotalAmount",
  263. className: "title-table"
  264. },
  265. {
  266. title: "最近收款(万元)",
  267. dataIndex: "finalReceivables",
  268. key: "finalReceivables",
  269. className: "title-table"
  270. },
  271. {
  272. title: "最近收款时间",
  273. dataIndex: "finalReceivablesTime",
  274. key: "finalReceivablesTime",
  275. className: "title-table"
  276. },
  277. {
  278. title: "结算状态",
  279. dataIndex: "liquidationStatus",
  280. key: "liquidationStatus",
  281. className: "title-table",
  282. render: text => {
  283. return getLiquidationStatus(text);
  284. }
  285. },
  286. {
  287. title: "流程状态",
  288. dataIndex: "processStatus",
  289. key: "processStatus",
  290. className: "title-table",
  291. render: text => {
  292. return getProcessStatus(text);
  293. }
  294. },
  295. {
  296. title: "特批状态",
  297. dataIndex: "approval",
  298. key: "approval",
  299. className: "title-table",
  300. render: text => {
  301. return getApproval(text);
  302. }
  303. },
  304. {
  305. title: "操作",
  306. dataIndex: "caozuo",
  307. key: "caouzo",
  308. className: "title-table",
  309. render: (text, recard) => {
  310. return (
  311. <div>
  312. {recard.liquidationStatus < 2 &&
  313. (recard.approval === 1 || recard.approval === 2) ? (
  314. <Button
  315. style={{ background: "rgb(192,192,192)" }}
  316. onClick={e => {
  317. e.stopPropagation(), this.evaluateX(recard);
  318. }}
  319. >
  320. 收款
  321. </Button>
  322. ) : (
  323. <Button
  324. type="primary"
  325. onClick={e => {
  326. e.stopPropagation(), this.evaluateX(recard);
  327. }}
  328. >
  329. 收款
  330. </Button>
  331. )}
  332. {recard.processStatus < 4 ? (
  333. <Button
  334. type="primary"
  335. onClick={e => {
  336. e.stopPropagation(), this.evaluateZ(recard);
  337. }}
  338. style={{ marginLeft: "5px" }}
  339. >
  340. 通过
  341. </Button>
  342. ) : (
  343. ""
  344. )}
  345. {!(
  346. recard.actuallyTotalAmount &&
  347. Number(recard.actuallyTotalAmount) > 0
  348. ) && (
  349. <Button
  350. type="danger"
  351. style={{ marginLeft: "5px" }}
  352. onClick={e => {
  353. e.stopPropagation(), this.reject(recard);
  354. }}
  355. >
  356. 驳回
  357. </Button>
  358. )}
  359. {
  360. // <Button
  361. // type="primary"
  362. // style={{ marginLeft: "5px" }}
  363. // onClick={e => {
  364. // e.stopPropagation(), this.evaluateY(recard, "财务专员");
  365. // console.log(recard);
  366. // }}
  367. // >
  368. // 转交
  369. // </Button>
  370. }
  371. </div>
  372. );
  373. }
  374. }
  375. ],
  376. columnsX: [
  377. {
  378. title: "业务项目名称",
  379. dataIndex: "commodityName",
  380. key: "commodityName",
  381. render: text => {
  382. return text && text.length > 6 ? (
  383. <span title={text}>{text.substr(0, 8)}...</span>
  384. ) : (
  385. text
  386. );
  387. }
  388. },
  389. {
  390. title: "项目类别",
  391. dataIndex: "cname",
  392. key: "cname"
  393. },
  394. {
  395. title: "项目数量(个)",
  396. dataIndex: "commodityQuantity",
  397. key: "commodityQuantity"
  398. },
  399. {
  400. title: "服务市价(万元)",
  401. dataIndex: "commodityPrice",
  402. key: "commodityPrice"
  403. },
  404. {
  405. title: "项目状态",
  406. dataIndex: "projectStatus",
  407. key: "projectStatus",
  408. render: text => {
  409. return getProjectStatus(text);
  410. }
  411. },
  412. {
  413. title: "证书编号",
  414. dataIndex: "certificateNumber",
  415. key: "certificateNumber"
  416. },
  417. {
  418. title: "是否主要项目",
  419. dataIndex: "main",
  420. key: "main",
  421. render: text => {
  422. return text ? "是" : "否";
  423. }
  424. },
  425. {
  426. title: "项目说明",
  427. dataIndex: "taskComment",
  428. key: "taskComment",
  429. render: text => {
  430. return text && text.length > 8 ? (
  431. <span title={text}>{text.substr(0, 8)}...</span>
  432. ) : (
  433. text
  434. );
  435. }
  436. }
  437. ],
  438. columnsDate: [
  439. {
  440. title: "编号",
  441. dataIndex: "id",
  442. key: "id"
  443. },
  444. {
  445. title: "订单编号",
  446. dataIndex: "orderno",
  447. key: "orderno"
  448. },
  449. {
  450. title: "开票金额(万元)",
  451. dataIndex: "amount",
  452. key: "amount"
  453. },
  454. {
  455. title: "申请时间",
  456. dataIndex: "createTime",
  457. key: "createTime"
  458. },
  459. {
  460. title: "开票状态",
  461. dataIndex: "status",
  462. key: "status",
  463. render: text => {
  464. return getInvoiceStatus(text);
  465. }
  466. }
  467. ],
  468. columnsY: [
  469. {
  470. title: "流程",
  471. dataIndex: "processName",
  472. key: "processName"
  473. },
  474. {
  475. title: "操作人",
  476. dataIndex: "adminName",
  477. key: "adminName"
  478. },
  479. {
  480. title: "时间",
  481. dataIndex: "createDate",
  482. key: "createDate"
  483. }
  484. ],
  485. columnsW: [
  486. {
  487. title: "外包名称",
  488. dataIndex: "name",
  489. key: "name"
  490. },
  491. {
  492. title: "联系人",
  493. dataIndex: "contacts",
  494. key: "contacts"
  495. },
  496. {
  497. title: "联系人电话",
  498. dataIndex: "contactsMobile",
  499. key: "contactsMobile"
  500. },
  501. {
  502. title: "地址",
  503. dataIndex: "ProvinceCity",
  504. key: "ProvinceCity",
  505. render: test => {
  506. return test[0] === null
  507. ? ""
  508. : getprovince(test[0]) +
  509. "/" +
  510. getprovince(test[1]) +
  511. "/" +
  512. getprovince(test[2]);
  513. }
  514. },
  515. {
  516. title: "地址详情",
  517. dataIndex: "address",
  518. key: "address",
  519. render: text => {
  520. return text && text.length > 8 ? text.substr(0, 8) + "..." : text;
  521. }
  522. },
  523. {
  524. title: "创建时间",
  525. dataIndex: "createTimes",
  526. key: "createTimes"
  527. },
  528. {
  529. title: "任务名称",
  530. dataIndex: "tname",
  531. key: "tname"
  532. },
  533. {
  534. title: "合同编号",
  535. dataIndex: "contractNo",
  536. key: "contractNo"
  537. },
  538. {
  539. title: "项目状态",
  540. dataIndex: "projectStatus",
  541. key: "projectStatus",
  542. render: text => {
  543. return getProjectStatus(text);
  544. }
  545. }
  546. ],
  547. dataSource: [],
  548. searchTime: [,],
  549. printColumns: [
  550. {
  551. title: "合同编号",
  552. dataIndex: "contractNo",
  553. key: "contractNo"
  554. },
  555. {
  556. title: "订单编号",
  557. dataIndex: "orderNo",
  558. key: "orderNo"
  559. // fixed: "left"
  560. },
  561. {
  562. title: "客户名称",
  563. dataIndex: "buyerName",
  564. key: "buyerName"
  565. },
  566. {
  567. title: "订单部门",
  568. dataIndex: "departmentName",
  569. key: "departmentName"
  570. },
  571. {
  572. title: "订单负责人",
  573. dataIndex: "sellerName",
  574. key: "sellerName"
  575. },
  576. {
  577. title: "外包公司",
  578. dataIndex: "outsourceName",
  579. key: "outsourceName"
  580. },
  581. {
  582. title: "签单日期",
  583. dataIndex: "signTime",
  584. key: "signTime"
  585. },
  586. {
  587. title: "下单日期",
  588. dataIndex: "createTime",
  589. key: "createTime"
  590. },
  591. {
  592. title: "签单金额(万元)",
  593. dataIndex: "signTotalAmount",
  594. key: "signTotalAmount"
  595. },
  596. {
  597. title: "开票金额(万元)",
  598. dataIndex: "invoiceAmount",
  599. key: "invoiceAmount"
  600. },
  601. {
  602. title: "已收款(万元)",
  603. dataIndex: "actuallyTotalAmount",
  604. key: "actuallyTotalAmount"
  605. },
  606. {
  607. title: "最近收款(万元)",
  608. dataIndex: "finalReceivables",
  609. key: "finalReceivables"
  610. },
  611. {
  612. title: "最近收款时间",
  613. dataIndex: "finalReceivablesTime",
  614. key: "finalReceivablesTime"
  615. },
  616. {
  617. title: "结算状态",
  618. dataIndex: "liquidationStatus",
  619. key: "liquidationStatus",
  620. render: text => {
  621. return getLiquidationStatus(text);
  622. }
  623. },
  624. {
  625. title: "流程状态",
  626. dataIndex: "processStatus",
  627. key: "processStatus",
  628. render: text => {
  629. return getProcessStatus(text);
  630. }
  631. },
  632. {
  633. title: "特批状态",
  634. dataIndex: "approval",
  635. key: "approval",
  636. render: text => {
  637. return getApproval(text);
  638. }
  639. }
  640. ],
  641. waterlistDate: [
  642. {
  643. title: "订单编号",
  644. dataIndex: "orderNo",
  645. key: "orderNo"
  646. },
  647. {
  648. title: "平台流水号",
  649. dataIndex: "billNo",
  650. key: "billNo"
  651. // fixed: "left"
  652. },
  653. {
  654. title: "金额(万元)",
  655. dataIndex: "transactionAmount",
  656. key: "transactionAmount"
  657. },
  658. {
  659. title: "收款方",
  660. dataIndex: "payeeName",
  661. key: "payeeName"
  662. },
  663. {
  664. title: "付款方",
  665. dataIndex: "payerName",
  666. key: "payerName"
  667. },
  668. {
  669. title: "流水科目",
  670. dataIndex: "transactionSubject",
  671. key: "transactionSubject",
  672. render: text => {
  673. return getTransactionProject(text);
  674. }
  675. },
  676. {
  677. title: "收款类型",
  678. dataIndex: "type",
  679. key: "type"
  680. },
  681. {
  682. title: "财务流水时间",
  683. dataIndex: "financialPayTimes",
  684. key: "financialPayTimes"
  685. },
  686. {
  687. title: "财务流水号",
  688. dataIndex: "financialPayNo",
  689. key: "financialPayNo"
  690. },
  691. {
  692. title: "订单负责人",
  693. dataIndex: "saleName",
  694. key: "saleName"
  695. },
  696. {
  697. title: "创建时间",
  698. dataIndex: "createTimes",
  699. key: "createTimes"
  700. }
  701. ],
  702. waterData: []
  703. };
  704. },
  705. // 特批通过
  706. evaluateZ(record) {
  707. $.ajax({
  708. method: "POST",
  709. dataType: "json",
  710. crossDomain: false,
  711. url: globalConfig.context + "/api/admin/financial/financeApproval",
  712. data: {
  713. orderNo: record.orderNo
  714. }
  715. }).done(
  716. function(data) {
  717. if (!data.error.length) {
  718. message.success("通过成功!");
  719. this.setState({
  720. loading: false
  721. });
  722. this.loadData();
  723. } else {
  724. message.warning(data.error[0].message);
  725. }
  726. }.bind(this)
  727. );
  728. },
  729. jdDate(orderNo) {
  730. $.ajax({
  731. method: "get",
  732. dataType: "json",
  733. crossDomain: false,
  734. url: globalConfig.context + "/api/admin/newOrder/selectOrderDun",
  735. data: {
  736. orderNo: orderNo
  737. },
  738. success: function(data) {
  739. let thisData = data.data;
  740. if (!thisData.length) {
  741. if (data.error && data.error.length) {
  742. message.warning(data.error[0].message);
  743. }
  744. thisData = {};
  745. } else {
  746. this.setState({
  747. jsDate: thisData
  748. });
  749. }
  750. }.bind(this)
  751. }).always(
  752. function() {
  753. this.setState({
  754. loading: false
  755. });
  756. }.bind(this)
  757. );
  758. },
  759. /* 收款 */
  760. evaluateX(recard) {
  761. this.state.assignDataX = recard;
  762. this.setState({
  763. assignVisibleX: true
  764. });
  765. },
  766. /* 转交 */
  767. evaluateY(recard, nub) {
  768. this.state.assignDataY = recard;
  769. this.setState({
  770. nub,
  771. assignVisibleY: true
  772. });
  773. },
  774. /* 驳回 */
  775. reject(recard) {
  776. this.setState({
  777. bohuiData: recard,
  778. boHuiVisible: true,
  779. content: ""
  780. });
  781. },
  782. boHuiCancel() {
  783. this.setState({
  784. boHuiVisible: false,
  785. reason: ""
  786. });
  787. },
  788. componentWillMount() {
  789. this.loadData();
  790. this.departmentList();
  791. },
  792. tableRowClick(record) {
  793. this.state.RowData = record;
  794. this.setState({
  795. showDesc: true,
  796. visible: true,
  797. orderNo: record.orderNo,
  798. modKey: "1"
  799. });
  800. this.jdDate(record.orderNo);
  801. this.loadXmu(record);
  802. this.loadModal(record);
  803. },
  804. //详情
  805. callBack(key) {
  806. if (key === "2") {
  807. this.setState({
  808. modKey: key,
  809. width: "1200px"
  810. });
  811. this.loadWaiBao();
  812. }
  813. if (key === "1") {
  814. this.setState({
  815. modKey: key,
  816. width: "800px"
  817. });
  818. }
  819. if (this.state.pictureUrl.length) {
  820. let picArr = [];
  821. this.state.pictureUrl.map(function(item) {
  822. if (item.response && item.response.data && item.response.data.length) {
  823. picArr.push(item.response.data);
  824. }
  825. });
  826. }
  827. if (key === "3") {
  828. this.setState({
  829. modKey: key,
  830. width: "800px"
  831. });
  832. this.setState({
  833. loading: true
  834. });
  835. $.ajax({
  836. method: "get",
  837. dataType: "json",
  838. crossDomain: false,
  839. url:
  840. globalConfig.context + "/api/admin/outsourceOrg/orderOutsourceDtails",
  841. data: {
  842. orderNo: this.state.orderNo
  843. },
  844. success: function(data) {
  845. let thisdata = data.data;
  846. this.setState({
  847. id: thisdata.id,
  848. createTimes: thisdata.createTimes,
  849. auditTimes: thisdata.auditTimes,
  850. remarks: thisdata.remarks,
  851. attachmentUrl: thisdata.attachmentUrl
  852. ? splitUrl(
  853. thisdata.attachmentUrl,
  854. ",",
  855. globalConfig.avatarHost + "/upload"
  856. )
  857. : [],
  858. pictureUrl: thisdata.pictureUrl
  859. ? splitUrl(
  860. thisdata.pictureUrl,
  861. ",",
  862. globalConfig.avatarHost + "/upload"
  863. )
  864. : [], //图片地址
  865. amount: thisdata.amount,
  866. companyName: thisdata.companyName,
  867. refundStatus: thisdata.refundStatus,
  868. outsourceRemarks: thisdata.outsourceRemarks,
  869. unitNumber: thisdata.unitNumber,
  870. unitPrice: thisdata.unitPrice
  871. });
  872. }.bind(this)
  873. }).always(
  874. function() {
  875. this.setState({
  876. loading: false
  877. });
  878. }.bind(this)
  879. );
  880. }
  881. },
  882. //外包详情
  883. loadWaiBao() {
  884. $.ajax({
  885. method: "get",
  886. dataType: "json",
  887. rossDomain: false,
  888. url:
  889. globalConfig.context +
  890. "/api/admin/outsourceOrg/selectOrderOutsourceOrg",
  891. data: {
  892. orderNo: this.state.orderNo
  893. },
  894. success: function(data) {
  895. let theArr = [];
  896. if (data.error.length || data.data.list == "") {
  897. if (data.error && data.error.length) {
  898. message.warning(data.error[0].message);
  899. }
  900. } else {
  901. for (let i = 0; i < data.data.length; i++) {
  902. let thisdata = data.data[i];
  903. let ProvinceCityArr = [];
  904. let ProvinceS = thisdata.province; //省
  905. let citys = thisdata.city; //市
  906. let Areas = thisdata.area; //区
  907. ProvinceCityArr.push(ProvinceS, citys, Areas);
  908. theArr.push({
  909. key: i,
  910. id: thisdata.id,
  911. name: thisdata.name,
  912. contacts: thisdata.contacts, //订单编号
  913. contactsMobile: thisdata.contactsMobile,
  914. ProvinceCity: ProvinceCityArr[0] === null ? [] : ProvinceCityArr,
  915. province: thisdata.province,
  916. city: thisdata.city,
  917. area: thisdata.area,
  918. address: thisdata.address,
  919. remarks: thisdata.remarks,
  920. tid: thisdata.tid,
  921. createTimes: thisdata.createTimes,
  922. tname: thisdata.tname,
  923. contractNo: thisdata.contractNo,
  924. projectStatus: thisdata.projectStatus
  925. });
  926. }
  927. }
  928. this.setState(
  929. {
  930. dataSourceW: theArr
  931. },
  932. () => {}
  933. );
  934. }.bind(this)
  935. }).always(
  936. function() {
  937. this.setState({
  938. loading: false
  939. });
  940. }.bind(this)
  941. );
  942. },
  943. loadXmu(record) {
  944. this.state.data = [];
  945. this.setState({
  946. loading: true
  947. });
  948. $.ajax({
  949. method: "get",
  950. dataType: "json",
  951. crossDomain: false,
  952. url: globalConfig.context + "/api/admin/newOrder/getOrderTask",
  953. data: {
  954. orderNo: record.orderNo
  955. },
  956. success: function(data) {
  957. let theArr = [];
  958. if (!data.data) {
  959. if (data.error && data.error.length) {
  960. message.warning(data.error[0].message);
  961. }
  962. } else {
  963. for (let i = 0; i < data.data.length; i++) {
  964. let thisdata = data.data[i];
  965. theArr.push({
  966. key: i,
  967. id: thisdata.id,
  968. orderNo: thisdata.orderNo,
  969. commodityName: thisdata.commodityName,
  970. commodityPrice: thisdata.commodityPrice,
  971. commodityQuantity: thisdata.commodityQuantity,
  972. taskStatus: thisdata.taskStatus,
  973. taskComment: thisdata.taskComment,
  974. main: thisdata.main,
  975. contacts: thisdata.contacts,
  976. contactsMobile: thisdata.contactsMobile,
  977. cname: thisdata.cname,
  978. certificateNumber: thisdata.certificateNumber,
  979. projectStatus: thisdata.projectStatus
  980. });
  981. }
  982. }
  983. this.setState({
  984. dataSourceX: theArr
  985. });
  986. }.bind(this)
  987. }).always(
  988. function() {
  989. this.setState({
  990. loading: false
  991. });
  992. }.bind(this)
  993. );
  994. },
  995. loadModal(record) {
  996. this.state.orderList = [];
  997. $.ajax({
  998. method: "get",
  999. dataType: "json",
  1000. crossDomain: false,
  1001. url: globalConfig.context + "/api/admin/newOrder/getOrderNewDetail",
  1002. data: {
  1003. orderNo: record.orderNo
  1004. },
  1005. success: function(data) {
  1006. let thisData = data.data;
  1007. if (!thisData) {
  1008. if (data.error && data.error.length) {
  1009. message.warning(data.error[0].message);
  1010. }
  1011. thisData = {};
  1012. }
  1013. this.setState({
  1014. id: thisData.id,
  1015. orderList: thisData,
  1016. approval:
  1017. thisData.approval == 0
  1018. ? thisData.approval.toString()
  1019. : thisData.approval,
  1020. orderRemarks: thisData.orderRemarks,
  1021. orgCodeUrl: thisData.contractPictureUrl
  1022. ? splitUrl(
  1023. thisData.contractPictureUrl,
  1024. ",",
  1025. globalConfig.avatarHost + "/upload"
  1026. )
  1027. : [],
  1028. orderNo: thisData.orderNo, //订单编号
  1029. buyerId: thisData.buyerId,
  1030. depName: thisData.depName
  1031. });
  1032. }.bind(this)
  1033. }).always(
  1034. function() {
  1035. this.setState({
  1036. loading: false
  1037. });
  1038. }.bind(this)
  1039. );
  1040. },
  1041. rizhi() {
  1042. this.setState({
  1043. loading: true
  1044. });
  1045. $.ajax({
  1046. method: "get",
  1047. dataType: "json",
  1048. crossDomain: false,
  1049. url: "/api/admin/newOrder/selectOrderLog",
  1050. data: {
  1051. orderNo: this.state.orderNo
  1052. },
  1053. success: function(data) {
  1054. let theArr = [];
  1055. let thisData = data.data;
  1056. if (!thisData.length) {
  1057. if (data.error && data.error.length) {
  1058. message.warning(data.error[0].message);
  1059. }
  1060. thisData = {};
  1061. } else {
  1062. for (let i = 0; i < data.data.length; i++) {
  1063. let thisdata = data.data[i];
  1064. theArr.push({
  1065. processName: thisdata.processName,
  1066. adminName: thisdata.adminName,
  1067. createDate: thisdata.createDate
  1068. });
  1069. }
  1070. }
  1071. this.setState({
  1072. dataSourceY: theArr
  1073. });
  1074. }.bind(this)
  1075. }).always(
  1076. function() {
  1077. this.setState({
  1078. loading: false
  1079. });
  1080. }.bind(this)
  1081. );
  1082. },
  1083. closeOrderLog() {
  1084. this.setState({
  1085. avisible: false
  1086. });
  1087. },
  1088. load() {
  1089. if (this.state.attachmentUrl) {
  1090. let url = window.location.href.substring(7);
  1091. this.state.attachmentUrl.forEach(e => {
  1092. window.location.href =
  1093. "http://" +
  1094. url.substring(0, url.indexOf("/")) +
  1095. "/api/admin/outsourceOrg//downloadFile?path=" +
  1096. e.response.data;
  1097. });
  1098. } else {
  1099. message.error("此订单无上传文件");
  1100. }
  1101. },
  1102. getOrderLog() {
  1103. this.setState({
  1104. avisible: true
  1105. });
  1106. this.rizhi();
  1107. },
  1108. closeModal() {
  1109. this.setState(
  1110. {
  1111. visible: false,
  1112. width: "800px"
  1113. },
  1114. () => {
  1115. this.setState({
  1116. modKey: "1"
  1117. });
  1118. }
  1119. );
  1120. },
  1121. closeDesc(e, s) {
  1122. this.state.showDesc = e;
  1123. if (s) {
  1124. this.loadData();
  1125. }
  1126. },
  1127. closeAssignX(e, s) {
  1128. this.state.assignDataX = {};
  1129. this.state.assignVisibleX = e;
  1130. if (s) {
  1131. this.loadData();
  1132. }
  1133. },
  1134. closeAssignY(e, s) {
  1135. this.state.assignDataY = {};
  1136. this.state.assignVisibleY = e;
  1137. if (s) {
  1138. this.loadData();
  1139. }
  1140. },
  1141. search() {
  1142. this.loadData();
  1143. },
  1144. reset() {
  1145. this.state.nameSearch = "";
  1146. this.state.releaseDate = [];
  1147. this.state.shouKuanDate = [];
  1148. this.state.orderNoSearch = "";
  1149. this.state.departmenttList = undefined;
  1150. this.state.processStatus = [];
  1151. this.state.contractNoSearch = "";
  1152. this.loadData();
  1153. },
  1154. boHuiCo() {
  1155. this.boHuiCancel();
  1156. this.boHuiSubmit();
  1157. },
  1158. //驳回
  1159. boHuiSubmit() {
  1160. if (!this.state.reason) {
  1161. message.warning("请填写驳回原因");
  1162. return false;
  1163. }
  1164. this.setState({
  1165. loading: true
  1166. });
  1167. $.ajax({
  1168. method: "POST",
  1169. dataType: "json",
  1170. crossDomain: false,
  1171. url: globalConfig.context + "/api/admin/financial/reject",
  1172. data: {
  1173. orderNo: this.state.bohuiData.orderNo,
  1174. reason: this.state.reason
  1175. }
  1176. }).done(
  1177. function(data) {
  1178. if (!data.error.length) {
  1179. message.success("驳回成功!");
  1180. this.setState({
  1181. loading: false
  1182. });
  1183. this.loadData();
  1184. } else {
  1185. message.warning(data.error[0].message);
  1186. }
  1187. }.bind(this)
  1188. );
  1189. },
  1190. searchSwitch() {
  1191. this.setState({
  1192. searchMore: !this.state.searchMore
  1193. });
  1194. },
  1195. changeList(arr) {
  1196. const newArr = [];
  1197. this.state.columns.forEach(item => {
  1198. arr.forEach(val => {
  1199. if (val === item.title) {
  1200. newArr.push(item);
  1201. }
  1202. });
  1203. });
  1204. this.setState({
  1205. changeList: newArr
  1206. });
  1207. },
  1208. onSelectChange(selectedRowKeys) {
  1209. // for(var i=0; i<selectedRowKeys.length; i++){
  1210. // for(var j=i+1; j<selectedRowKeys.length; j++){
  1211. // if(selectedRowKeys[i]==selectedRowKeys[j]){
  1212. // selectedRowKeys.splice(j,1);
  1213. // j--;
  1214. // }
  1215. // }
  1216. // }
  1217. console.log(selectedRowKeys);
  1218. this.setState({ selectedRowKeys });
  1219. },
  1220. inRecordData() {
  1221. this.setState({
  1222. loading: true
  1223. });
  1224. $.ajax({
  1225. method: "get",
  1226. dataType: "json",
  1227. crossDomain: false,
  1228. url:
  1229. globalConfig.context +
  1230. "/api/admin/orderInvoice/salesmanOrderInvoiceList",
  1231. data: {
  1232. orderNo: this.state.selectedRowKeys[0]
  1233. },
  1234. success: function(data) {
  1235. let theArr = [];
  1236. let sum = 0;
  1237. if (!data.data) {
  1238. if (data.error && data.error.length) {
  1239. message.warning(data.error[0].message);
  1240. }
  1241. } else {
  1242. for (let i = 0; i < data.data.list.length; i++) {
  1243. let thisdata = data.data.list[i];
  1244. sum += parseFloat(thisdata.amount);
  1245. theArr.push({
  1246. id: thisdata.id,
  1247. orderno: thisdata.orderno, //订单编号
  1248. amount: thisdata.amount, //签单金额
  1249. createTime: thisdata.createTime, //流程状态
  1250. status: thisdata.status, //结算状态
  1251. rejectReason: thisdata.rejectReason
  1252. });
  1253. }
  1254. }
  1255. this.setState({
  1256. recordData: theArr,
  1257. sum: sum.toFixed(4)
  1258. });
  1259. }.bind(this)
  1260. }).done(
  1261. function() {
  1262. this.setState({
  1263. loading: false
  1264. });
  1265. }.bind(this)
  1266. );
  1267. },
  1268. inRecordCanl() {
  1269. this.setState({
  1270. bvisible: false
  1271. });
  1272. },
  1273. waterData() {
  1274. this.state.data = [];
  1275. this.setState({
  1276. loading: true
  1277. });
  1278. $.ajax({
  1279. method: "get",
  1280. dataType: "json",
  1281. crossDomain: false,
  1282. url: globalConfig.context + "/api/admin/financial/myBillList",
  1283. data: {
  1284. orderNo: this.state.selectedRowKeys[0]
  1285. },
  1286. success: function(data) {
  1287. let theArr = [];
  1288. let waterSum = 0;
  1289. if (!data.data || !data.data.list) {
  1290. if (data.error && data.error.length) {
  1291. message.warning(data.error[0].message);
  1292. }
  1293. } else {
  1294. for (let i = 0; i < data.data.list.length; i++) {
  1295. let thisdata = data.data.list[i];
  1296. waterSum += parseFloat(thisdata.transactionAmount);
  1297. theArr.push({
  1298. key: i,
  1299. orderNo: thisdata.orderNo,
  1300. billNo: thisdata.billNo,
  1301. transactionAmount: thisdata.transactionAmount,
  1302. payeeName: thisdata.payeeName,
  1303. payerName: thisdata.payerName,
  1304. transactionSubject: thisdata.transactionSubject,
  1305. transactionChannel: thisdata.transactionChannel,
  1306. financialPayTimes: thisdata.financialPayTimes,
  1307. financialPayNo: thisdata.financialPayNo,
  1308. createrName: thisdata.createrName,
  1309. saleName: thisdata.saleName,
  1310. createTimes: thisdata.createTimes,
  1311. type: thisdata.type == 0 ? "手工" : "批量"
  1312. });
  1313. }
  1314. }
  1315. this.setState({
  1316. waterData: theArr,
  1317. waterSum: waterSum.toFixed(4)
  1318. });
  1319. }.bind(this)
  1320. }).always(
  1321. function() {
  1322. this.setState({
  1323. loading: false
  1324. });
  1325. }.bind(this)
  1326. );
  1327. },
  1328. waterCanl() {
  1329. this.setState({
  1330. cvisible: false
  1331. });
  1332. },
  1333. exportAll() {
  1334. window.location.href =
  1335. globalConfig.context +
  1336. "/api/admin/receivables/exportReceivables?outsource=1";
  1337. },
  1338. exportKaip() {
  1339. window.location.href =
  1340. globalConfig.context +
  1341. "/api/admin/receivables/exportInvoice?" +
  1342. `orderNo=${this.state.selectedRowKeys}`;
  1343. },
  1344. exportWater() {
  1345. window.location.href =
  1346. globalConfig.context +
  1347. "/api/admin/receivables/exportMyBill?" +
  1348. `orderNo=${this.state.selectedRowKeys}`;
  1349. },
  1350. printAll() {
  1351. this.setState({
  1352. dvisible: true
  1353. // loading: true
  1354. });
  1355. this.loadData(1, 9999);
  1356. this.state.pagination.pageSize = 9999;
  1357. this.setState({
  1358. pagination: this.state.pagination
  1359. });
  1360. window.setTimeout(() => {
  1361. document.querySelectorAll(
  1362. ".ant-pagination.ant-table-pagination.mini"
  1363. )[0].style.display = "none";
  1364. // let tr = document.querySelectorAll(".patent-table tr");
  1365. // for(let i = 0; i < tr.length; i++) {
  1366. // tr[i].style.fontSize = "6px"
  1367. // }
  1368. // let td = document.querySelectorAll(".patent-table tr td");
  1369. // for (let i = 0; i < td.length; i++) {
  1370. // td[i].style.padding = "0 0 0 0";
  1371. // }
  1372. }, 100);
  1373. },
  1374. downImg() {
  1375. let num = 0;
  1376. for (let i = 0; i < this.state.orgCodeUrl.length; i++) {
  1377. if (this.state.orgCodeUrl[i].url == this.state.previewImage) {
  1378. num = i;
  1379. }
  1380. }
  1381. if (num == this.state.orgCodeUrl.length - 1) {
  1382. return message.warning("已经是最后一张了哦");
  1383. }
  1384. this.state.previewImage = this.state.orgCodeUrl[num + 1].url;
  1385. this.setState({
  1386. previewImage: this.state.previewImage,
  1387. rotateDeg: 0
  1388. });
  1389. },
  1390. upImg() {
  1391. let num = 0;
  1392. for (let i = 0; i < this.state.orgCodeUrl.length; i++) {
  1393. if (this.state.orgCodeUrl[i].url == this.state.previewImage) {
  1394. num = i;
  1395. }
  1396. }
  1397. if (num == 0) {
  1398. return message.warning("已经是第一张了哦");
  1399. }
  1400. this.state.previewImage = this.state.orgCodeUrl[num - 1].url;
  1401. this.setState({
  1402. previewImage: this.state.previewImage,
  1403. rotateDeg: 0
  1404. });
  1405. },
  1406. rotate() {
  1407. let rotateDeg = this.state.rotateDeg + 90;
  1408. this.setState({
  1409. rotateDeg
  1410. });
  1411. },
  1412. render() {
  1413. const { TextArea } = Input;
  1414. const { RangePicker } = DatePicker;
  1415. const { TabPane } = Tabs;
  1416. var departmentArr = this.state.departmentArr || [];
  1417. const theData = this.state.orderList || {};
  1418. const formItemLayout = {
  1419. labelCol: { span: 8 },
  1420. wrapperCol: { span: 12 }
  1421. };
  1422. const { loading, selectedRowKeys, visible } = this.state;
  1423. const rowSelection = {
  1424. selectedRowKeys,
  1425. onChange: this.onSelectChange,
  1426. hideDefaultSelections: true
  1427. };
  1428. const jsDate = this.state.jsDate || [];
  1429. return (
  1430. <div className="user-content">
  1431. <div className="content-title" style={{ marginBottom: 10 }}>
  1432. <span style={{ fontWeight: 900, fontSize: 16 }}>外包结算管理</span>
  1433. </div>
  1434. <Tabs defaultActiveKey="2" onChange={this.callback} className="test">
  1435. <TabPane tab="更改表格显示数据" key="1">
  1436. <div style={{ marginLeft: 10 }}>
  1437. <ChooseList
  1438. columns={this.state.columns}
  1439. changeFn={this.changeList}
  1440. changeList={this.state.changeList}
  1441. top={55}
  1442. margin={11}
  1443. />
  1444. </div>
  1445. </TabPane>
  1446. <TabPane tab="搜索" key="2">
  1447. <div className="user-search" style={{ marginLeft: 10 }}>
  1448. <Input
  1449. placeholder="订单编号"
  1450. value={this.state.orderNoSearch}
  1451. onChange={e => {
  1452. this.setState({ orderNoSearch: e.target.value });
  1453. }}
  1454. />
  1455. <Input
  1456. placeholder="客户名称"
  1457. value={this.state.nameSearch}
  1458. onChange={e => {
  1459. this.setState({ nameSearch: e.target.value });
  1460. }}
  1461. />
  1462. <Select
  1463. placeholder="订单部门"
  1464. style={{ width: 150, marginRight: 10 }}
  1465. value={this.state.departmenttList}
  1466. onChange={e => {
  1467. this.setState({ departmenttList: e });
  1468. }}
  1469. >
  1470. {departmentArr.map(function(item) {
  1471. return (
  1472. <Select.Option key={item.id}>{item.name}</Select.Option>
  1473. );
  1474. })}
  1475. </Select>
  1476. <Input
  1477. placeholder="合同编号"
  1478. value={this.state.contractNoSearch}
  1479. onChange={e => {
  1480. this.setState({
  1481. contractNoSearch: e.target.value
  1482. });
  1483. }}
  1484. />
  1485. <Select
  1486. placeholder="流程状态"
  1487. onChange={e => {
  1488. this.setState({ processStatusSearch: e });
  1489. }}
  1490. style={{ width: 160, marginRight: 5 }}
  1491. value={this.state.processStatusSearch}
  1492. >
  1493. <Option value="3">未分配</Option>
  1494. <Option value="4">已分配</Option>
  1495. </Select>
  1496. <Select
  1497. placeholder="结算状态"
  1498. onChange={e => {
  1499. this.setState({ liquidationStatus: e });
  1500. }}
  1501. style={{ width: 160, marginRight: 5 }}
  1502. value={this.state.liquidationStatus}
  1503. >
  1504. <Option value="0">首付待付清</Option>
  1505. <Option value="1">尾款待付清</Option>
  1506. <Option value="2">已付清</Option>
  1507. </Select>
  1508. <span style={{ marginRight: 0 }}>下单日期:</span>
  1509. <RangePicker
  1510. value={[
  1511. this.state.releaseDate[0]
  1512. ? moment(this.state.releaseDate[0])
  1513. : null,
  1514. this.state.releaseDate[1]
  1515. ? moment(this.state.releaseDate[1])
  1516. : null
  1517. ]}
  1518. onChange={(data, dataString) => {
  1519. this.setState({ releaseDate: dataString });
  1520. }}
  1521. />
  1522. <span style={{}}>最近收款:</span>
  1523. <RangePicker
  1524. value={[
  1525. this.state.shouKuanDate[0]
  1526. ? moment(this.state.shouKuanDate[0])
  1527. : null,
  1528. this.state.shouKuanDate[1]
  1529. ? moment(this.state.shouKuanDate[1])
  1530. : null
  1531. ]}
  1532. onChange={(data, dataString) => {
  1533. this.setState({ shouKuanDate: dataString });
  1534. }}
  1535. />
  1536. <Button
  1537. type="primary"
  1538. onClick={this.search}
  1539. style={{ marginLeft: 10 }}
  1540. >
  1541. 搜索
  1542. </Button>
  1543. <Button onClick={this.reset}>重置</Button>
  1544. </div>
  1545. </TabPane>
  1546. <TabPane tab="打印" key="3">
  1547. <Button
  1548. type="primary"
  1549. style={{ margin: "11px 0px 10px 10px" }}
  1550. onClick={this.printAll}
  1551. disabled={!this.state.dataSource.length}
  1552. >
  1553. 打印所有列表信息
  1554. </Button>
  1555. <Button
  1556. type="primary"
  1557. disabled={this.state.selectedRowKeys.length != 1}
  1558. style={{ margin: "11px 0px 10px 10px" }}
  1559. onClick={() => {
  1560. this.inRecordData();
  1561. this.setState({
  1562. bvisible: true
  1563. });
  1564. }}
  1565. >
  1566. 打印开票详情
  1567. </Button>
  1568. <Button
  1569. type="primary"
  1570. disabled={this.state.selectedRowKeys.length != 1}
  1571. style={{ margin: "11px 0px 10px 10px" }}
  1572. onClick={() => {
  1573. this.waterData();
  1574. this.setState({
  1575. cvisible: true
  1576. });
  1577. }}
  1578. >
  1579. 打印收款流水
  1580. </Button>
  1581. </TabPane>
  1582. <TabPane tab="导出Excel" key="4">
  1583. <Button
  1584. type="primary"
  1585. style={{ margin: "11px 0px 10px 10px" }}
  1586. onClick={this.exportAll}
  1587. >
  1588. 导出当前列表
  1589. </Button>
  1590. <Button
  1591. type="primary"
  1592. disabled={this.state.selectedRowKeys.length != 1}
  1593. style={{ margin: "11px 0px 10px 10px" }}
  1594. onClick={this.exportKaip}
  1595. >
  1596. 导出所选开票详情
  1597. </Button>
  1598. <Button
  1599. type="primary"
  1600. disabled={this.state.selectedRowKeys.length != 1}
  1601. style={{ margin: "11px 0px 10px 10px" }}
  1602. onClick={this.exportWater}
  1603. >
  1604. 导出所选收款详情流水
  1605. </Button>
  1606. </TabPane>
  1607. <TabPane tab="查看" key="5">
  1608. <Button
  1609. type="primary"
  1610. disabled={this.state.selectedRowKeys.length != 1}
  1611. style={{ margin: "11px 0px 10px 10px" }}
  1612. onClick={() => {
  1613. this.inRecordData();
  1614. this.setState({
  1615. bvisible: true
  1616. });
  1617. }}
  1618. >
  1619. 查看开票详情
  1620. </Button>
  1621. <Button
  1622. type="primary"
  1623. disabled={this.state.selectedRowKeys.length != 1}
  1624. style={{ margin: "11px 0px 10px 10px" }}
  1625. onClick={() => {
  1626. this.waterData();
  1627. this.setState({
  1628. cvisible: true
  1629. });
  1630. }}
  1631. >
  1632. 详情收款流水
  1633. </Button>
  1634. </TabPane>
  1635. {/* <TabPane tab="批量操作" key="6">
  1636. <Button
  1637. type="primary"
  1638. disabled={this.state.selectedRowKeys.length == 0}
  1639. style={{ margin: "0px 0px 10px 10px" }}
  1640. onClick={e => {
  1641. e.stopPropagation(),
  1642. this.evaluateY(this.state.selectedRowKeys, "财务专员");
  1643. }}
  1644. >
  1645. 转交
  1646. </Button>
  1647. </TabPane> */}
  1648. </Tabs>
  1649. <div className="patent-table">
  1650. <Spin spinning={this.state.loading}>
  1651. <Table
  1652. bordered
  1653. columns={
  1654. this.state.changeList == undefined
  1655. ? this.state.columns
  1656. : this.state.changeList
  1657. }
  1658. dataSource={this.state.dataSource}
  1659. rowSelection={false}
  1660. scroll={{ x: "max-content", y: 0 }}
  1661. pagination={this.state.pagination}
  1662. onRowDoubleClick={this.tableRowClick.bind(this)}
  1663. rowSelection={rowSelection}
  1664. size="small"
  1665. />
  1666. </Spin>
  1667. <p
  1668. style={{ display: "inline-block", fontSize: "14px", color: "red" }}
  1669. >
  1670. {
  1671. <span style={{ marginRight: 10 }}>
  1672. {`收款金额总计(万元):${this.state.hui ? this.state.hui : "0"}`}
  1673. </span>
  1674. }
  1675. {
  1676. <span>
  1677. {`合同额总计(万元):${
  1678. this.state.totalHui ? this.state.totalHui : "0"
  1679. }`}
  1680. </span>
  1681. }
  1682. </p>
  1683. </div>
  1684. <div className="patent-desc">
  1685. <Modal
  1686. maskClosable={false}
  1687. visible={this.state.visible}
  1688. onCancel={this.closeModal}
  1689. width={this.state.width}
  1690. footer=""
  1691. className="admin-desc-content"
  1692. >
  1693. <Tabs
  1694. onChange={this.callBack}
  1695. type="card"
  1696. activeKey={this.state.modKey}
  1697. >
  1698. <TabPane tab="项目概况" key="1">
  1699. <Form layout="horizontal" id="demand-form">
  1700. <Spin spinning={this.state.loading}>
  1701. <div className="clearfix">
  1702. <FormItem
  1703. className="half-item"
  1704. {...formItemLayout}
  1705. label="订单编号"
  1706. >
  1707. <span>{this.state.orderNo}</span>
  1708. </FormItem>
  1709. <FormItem
  1710. className="half-item"
  1711. {...formItemLayout}
  1712. label="签单时间"
  1713. >
  1714. <span>{theData.signDate}</span>
  1715. </FormItem>
  1716. <FormItem
  1717. className="half-item"
  1718. {...formItemLayout}
  1719. label="客户名称"
  1720. >
  1721. <span>{theData.userName}</span>
  1722. </FormItem>
  1723. <FormItem
  1724. className="half-item"
  1725. {...formItemLayout}
  1726. label="流转状态"
  1727. >
  1728. <span>{getProcessStatus(theData.processStatus)}</span>
  1729. </FormItem>
  1730. <FormItem
  1731. className="half-item"
  1732. {...formItemLayout}
  1733. label="订单类型"
  1734. >
  1735. <span>{getNewOrderType(theData.orderType)}</span>
  1736. </FormItem>
  1737. <FormItem
  1738. className="half-item"
  1739. {...formItemLayout}
  1740. label="结算状态"
  1741. >
  1742. <span>
  1743. {getLiquidationStatus(theData.liquidationStatus)}
  1744. </span>
  1745. </FormItem>
  1746. <FormItem
  1747. className="half-item"
  1748. {...formItemLayout}
  1749. label="签单总金额(万元)"
  1750. >
  1751. <span>{theData.totalAmount}</span>
  1752. </FormItem>
  1753. <FormItem
  1754. className="half-item"
  1755. {...formItemLayout}
  1756. label="首付款(万元)"
  1757. >
  1758. <span>{theData.firstAmount}</span>
  1759. </FormItem>
  1760. <FormItem
  1761. className="half-item"
  1762. {...formItemLayout}
  1763. label="已收款(万元)"
  1764. >
  1765. <span>{theData.settlementAmount}</span>
  1766. </FormItem>
  1767. <FormItem
  1768. className="half-item"
  1769. {...formItemLayout}
  1770. label="是否特批"
  1771. >
  1772. <span>{getApproval(theData.approval)}</span>
  1773. </FormItem>
  1774. {/*this.props.data.orderStatus=='6'&&<FormItem className="half-item" {...formItemLayout} label="已退(万元)">
  1775. <span>{this.props.data.refundAmount}</span>
  1776. </FormItem>*/}
  1777. </div>
  1778. <div className="clearfix">
  1779. <FormItem
  1780. labelCol={{ span: 5 }}
  1781. wrapperCol={{ span: 18 }}
  1782. label="合同扫描件"
  1783. >
  1784. <Upload
  1785. className="demandDetailShow-upload"
  1786. listType="picture-card"
  1787. fileList={this.state.orgCodeUrl}
  1788. onPreview={file => {
  1789. this.setState({
  1790. previewImage: file.url || file.thumbUrl,
  1791. previewVisible: true
  1792. });
  1793. }}
  1794. ></Upload>
  1795. <Modal
  1796. maskClosable={false}
  1797. footer={null}
  1798. visible={this.state.previewVisible}
  1799. onCancel={() => {
  1800. this.setState({
  1801. previewVisible: false,
  1802. rotateDeg: 0
  1803. });
  1804. }}
  1805. >
  1806. <img
  1807. alt=""
  1808. style={{
  1809. width: "100%",
  1810. transform: `rotate(${this.state.rotateDeg}deg)`
  1811. }}
  1812. src={this.state.previewImage || ""}
  1813. />
  1814. <Button
  1815. onClick={this.rotate}
  1816. style={{
  1817. position: "relative",
  1818. left: "50%",
  1819. transform: "translateX(-50%)"
  1820. }}
  1821. >
  1822. 旋转
  1823. </Button>
  1824. <Button
  1825. onClick={this.upImg}
  1826. style={{
  1827. position: "absolute",
  1828. left: -81,
  1829. top: "50%",
  1830. transform: "translateY(-50%)"
  1831. }}
  1832. >
  1833. 上一张
  1834. </Button>
  1835. <Button
  1836. onClick={this.downImg}
  1837. style={{
  1838. position: "absolute",
  1839. right: -81,
  1840. top: "50%",
  1841. transform: "translateY(-50%)"
  1842. }}
  1843. >
  1844. 下一张
  1845. </Button>
  1846. </Modal>
  1847. <Button
  1848. style={{
  1849. float: "right",
  1850. marginRight: "140px",
  1851. marginTop: "20px"
  1852. }}
  1853. onClick={this.getOrderLog}
  1854. >
  1855. 查看订单日志
  1856. </Button>
  1857. </FormItem>
  1858. </div>
  1859. <div className="clearfix">
  1860. <FormItem
  1861. className="half-item"
  1862. {...formItemLayout}
  1863. label="合同编号"
  1864. >
  1865. <span>{theData.contractNo}</span>
  1866. </FormItem>
  1867. <FormItem
  1868. className="half-item"
  1869. {...formItemLayout}
  1870. label="订单部门"
  1871. >
  1872. <span>{theData.depName}</span>
  1873. </FormItem>
  1874. </div>
  1875. <div className="clearfix">
  1876. <FormItem
  1877. labelCol={{ span: 5 }}
  1878. wrapperCol={{ span: 18 }}
  1879. label="订单留言"
  1880. >
  1881. <p style={{ width: 500, wordWrap: "break-word" }}>
  1882. {this.state.orderRemarks}
  1883. </p>
  1884. </FormItem>
  1885. </div>
  1886. <div className="clearfix">
  1887. <FormItem
  1888. labelCol={{ span: 5 }}
  1889. wrapperCol={{ span: 18 }}
  1890. label="收款节点"
  1891. >
  1892. {jsDate.map(item => {
  1893. return (
  1894. <p>
  1895. {getjiedian(item.dunSubject)} -- {item.money} 万元
  1896. </p>
  1897. );
  1898. })}
  1899. </FormItem>
  1900. </div>
  1901. <div className="clearfix">
  1902. <FormItem
  1903. className="half-item"
  1904. {...formItemLayout}
  1905. label="订单负责人"
  1906. >
  1907. <span>{theData.salesmanName}</span>
  1908. </FormItem>
  1909. <FormItem
  1910. className="half-item"
  1911. {...formItemLayout}
  1912. label="订单负责人电话"
  1913. >
  1914. <span>{theData.salesmanMobile}</span>
  1915. </FormItem>
  1916. <FormItem
  1917. className="half-item"
  1918. {...formItemLayout}
  1919. label="当前财务负责人"
  1920. >
  1921. <span>{theData.nowFinance}</span>
  1922. </FormItem>
  1923. <FormItem
  1924. className="half-item"
  1925. {...formItemLayout}
  1926. label="当前财务负责人电话"
  1927. >
  1928. <span>{theData.nowFinanceMobile}</span>
  1929. </FormItem>
  1930. <FormItem
  1931. className="half-item"
  1932. {...formItemLayout}
  1933. style={{ opacity: ".5" }}
  1934. label="原订单负责人"
  1935. >
  1936. <span>{theData.oldSalesmanName}</span>
  1937. </FormItem>
  1938. <FormItem
  1939. className="half-item"
  1940. {...formItemLayout}
  1941. style={{ opacity: ".5" }}
  1942. label="原订单负责人电话"
  1943. >
  1944. <span>{theData.oldSalesmanMobile}</span>
  1945. </FormItem>
  1946. <FormItem
  1947. className="half-item"
  1948. {...formItemLayout}
  1949. style={{ opacity: ".5" }}
  1950. label="实际财务操作人"
  1951. >
  1952. <span>{theData.financeName}</span>
  1953. </FormItem>
  1954. <FormItem
  1955. className="half-item"
  1956. {...formItemLayout}
  1957. style={{ opacity: ".5" }}
  1958. label="实际财务操作人电话"
  1959. >
  1960. <span>{theData.financeMobile}</span>
  1961. </FormItem>
  1962. </div>
  1963. <Modal
  1964. visible={this.state.avisible}
  1965. className="admin-desc-content"
  1966. width="800px"
  1967. maskClosable={false}
  1968. title="订单日志"
  1969. footer={null}
  1970. onCancel={this.closeOrderLog}
  1971. >
  1972. <div className="patent-table">
  1973. <Spin spinning={this.state.loading}>
  1974. <Table
  1975. columns={this.state.columnsY}
  1976. dataSource={this.state.dataSourceY}
  1977. pagination={false}
  1978. />
  1979. </Spin>
  1980. </div>
  1981. </Modal>
  1982. <div className="clearfix">
  1983. <p style={{ fontSize: 18, marginLeft: 20 }}>项目业务</p>
  1984. <div className="patent-table">
  1985. <Spin spinning={this.state.loading}>
  1986. <Table
  1987. columns={this.state.columnsX}
  1988. dataSource={this.state.dataSourceX}
  1989. pagination={false}
  1990. />
  1991. </Spin>
  1992. </div>
  1993. </div>
  1994. </Spin>
  1995. </Form>
  1996. </TabPane>
  1997. <TabPane tab="外包详情" key="2">
  1998. <div className="clearfix">
  1999. <p style={{ color: "red" }}>
  2000. 提示:查看备注请点击表格左侧加号按钮~
  2001. </p>
  2002. <div className="patent-table">
  2003. <Spin spinning={this.state.loading}>
  2004. <Table
  2005. columns={this.state.columnsW}
  2006. dataSource={this.state.dataSourceW}
  2007. pagination={false}
  2008. expandedRowRender={record => (
  2009. <p style={{ margin: 0 }}>{record.remarks}</p>
  2010. )}
  2011. scroll={{ x: 300, y: 0 }}
  2012. />
  2013. </Spin>
  2014. </div>
  2015. </div>
  2016. </TabPane>
  2017. <TabPane tab="外包审核" key="3">
  2018. <div className="clearfix">
  2019. <FormItem
  2020. className="half-item"
  2021. labelCol={{ span: 8 }}
  2022. wrapperCol={{ span: 14 }}
  2023. label="外包公司"
  2024. >
  2025. <span>{this.state.companyName}</span>
  2026. </FormItem>
  2027. </div>
  2028. <div className="clearfix">
  2029. <FormItem
  2030. className="half-item"
  2031. {...formItemLayout}
  2032. label="单价(万元)"
  2033. >
  2034. <span>{this.state.unitPrice}</span>
  2035. </FormItem>
  2036. </div>
  2037. <div className="clearfix">
  2038. <FormItem
  2039. className="half-item"
  2040. {...formItemLayout}
  2041. label="数量(万元)"
  2042. >
  2043. <span>{this.state.unitNumber}</span>
  2044. </FormItem>
  2045. </div>
  2046. <div className="clearfix">
  2047. <FormItem
  2048. className="half-item"
  2049. {...formItemLayout}
  2050. label="总金额(万元)"
  2051. >
  2052. <span>{this.state.amount}</span>
  2053. </FormItem>
  2054. </div>
  2055. <div className="clearfix">
  2056. <FormItem
  2057. className="half-item"
  2058. {...formItemLayout}
  2059. label="备注"
  2060. >
  2061. <span>{this.state.outsourceRemarks}</span>
  2062. </FormItem>
  2063. </div>
  2064. {/*<div className="clearfix">
  2065. <FormItem className="half-item"
  2066. labelCol={{ span: 8 }}
  2067. wrapperCol={{ span: 14 }}
  2068. label="上传协议文件" >
  2069. <Upload header={{authorization: 'authorization-text'}} action={globalConfig.context + "/api/admin/outsourceOrg/uploadOutsourceFile"}
  2070. data={(e)=>{
  2071. return {
  2072. 'sign': e.name.substring(0,e.name.lastIndexOf("."))
  2073. }
  2074. }}
  2075. fileList={this.state.attachmentUrl}
  2076. showUploadList={{showRemoveIcon:false}}
  2077. onPreview={(e)=>{
  2078. let url = window.location.href.substring(7)
  2079. window.location.href="http://"+url.substring(0,url.indexOf("/"))+"/api/admin/outsourceOrg//downloadFile?path="+e.response.data
  2080. }}>
  2081. </Upload>
  2082. </FormItem>
  2083. </div>*/}
  2084. <div className="clearfix">
  2085. <FormItem
  2086. labelCol={{ span: 4 }}
  2087. wrapperCol={{ span: 18 }}
  2088. label="合同/协议扫描件"
  2089. >
  2090. <Upload
  2091. className="demandDetailShow-upload"
  2092. listType="picture-card"
  2093. fileList={this.state.pictureUrl}
  2094. onPreview={file => {
  2095. this.setState({
  2096. previewImage: file.url || file.thumbUrl,
  2097. previewVisible: true
  2098. });
  2099. }}
  2100. ></Upload>
  2101. <Modal
  2102. maskClosable={false}
  2103. footer={null}
  2104. visible={this.state.previewVisible}
  2105. onCancel={() => {
  2106. this.setState({ previewVisible: false });
  2107. }}
  2108. >
  2109. <img
  2110. alt=""
  2111. style={{
  2112. width: "100%",
  2113. transform: `rotate(${this.state.rotateDeg}deg)`
  2114. }}
  2115. src={this.state.previewImage || ""}
  2116. />
  2117. <Button
  2118. onClick={this.rotate}
  2119. style={{
  2120. position: "relative",
  2121. left: "50%",
  2122. transform: "translateX(-50%)"
  2123. }}
  2124. >
  2125. 旋转
  2126. </Button>
  2127. <Button
  2128. onClick={this.upImg}
  2129. style={{
  2130. position: "absolute",
  2131. left: -81,
  2132. top: "50%",
  2133. transform: "translateY(-50%)"
  2134. }}
  2135. >
  2136. 上一张
  2137. </Button>
  2138. <Button
  2139. onClick={this.downImg}
  2140. style={{
  2141. position: "absolute",
  2142. right: -81,
  2143. top: "50%",
  2144. transform: "translateY(-50%)"
  2145. }}
  2146. >
  2147. 下一张
  2148. </Button>
  2149. </Modal>
  2150. </FormItem>
  2151. </div>
  2152. <div className="clearfix">
  2153. <hr className="division" />
  2154. <div className="clearfix">
  2155. <FormItem
  2156. className="half-item"
  2157. labelCol={{ span: 8 }}
  2158. wrapperCol={{ span: 14 }}
  2159. label="审核意见"
  2160. >
  2161. <span>{this.state.remarks}</span>
  2162. </FormItem>
  2163. </div>
  2164. <div className="clearfix">
  2165. <FormItem
  2166. className="half-item"
  2167. labelCol={{ span: 8 }}
  2168. wrapperCol={{ span: 14 }}
  2169. label="审核结果"
  2170. >
  2171. <span>{getRefundStatus(this.state.refundStatus)}</span>
  2172. </FormItem>
  2173. </div>
  2174. <div className="clearfix">
  2175. <FormItem
  2176. className="half-item"
  2177. labelCol={{ span: 8 }}
  2178. wrapperCol={{ span: 14 }}
  2179. label="审核时间"
  2180. >
  2181. <span>{this.state.auditTimes}</span>
  2182. </FormItem>
  2183. </div>
  2184. </div>
  2185. </TabPane>
  2186. </Tabs>
  2187. </Modal>
  2188. </div>
  2189. <div className="patent-desc">
  2190. <Modal
  2191. maskClosable={false}
  2192. title="驳回理由"
  2193. visible={this.state.boHuiVisible}
  2194. onCancel={this.boHuiCancel}
  2195. width="500px"
  2196. footer=""
  2197. className="admin-desc-content"
  2198. >
  2199. <TextArea
  2200. rows={4}
  2201. value={this.state.reason}
  2202. onChange={e => {
  2203. console.log(e.target.value);
  2204. this.setState({
  2205. reason: e.target.value
  2206. });
  2207. }}
  2208. />
  2209. <Button
  2210. type="primary"
  2211. style={{ marginTop: "20px" }}
  2212. onClick={this.boHuiCo}
  2213. >
  2214. 确定
  2215. </Button>
  2216. </Modal>
  2217. </div>
  2218. <Assign
  2219. title="任务"
  2220. selApi={"/api/admin/newOrder/updateFinance"}
  2221. data={this.state.assignDataY}
  2222. showDesc={this.state.assignVisibleY}
  2223. closeDesc={this.closeAssignY.bind(this)}
  2224. // fenpaiData={8}
  2225. specially={0}
  2226. roleName={this.state.nub}
  2227. requestMethod={"get"}
  2228. />
  2229. <Receivable
  2230. title="收款记录"
  2231. api="/api/admin/financial/addReceiptsFlow"
  2232. data={this.state.assignDataX}
  2233. showDesc={this.state.assignVisibleX}
  2234. closeDesc={this.closeAssignX.bind(this)}
  2235. />
  2236. <Modal
  2237. visible={this.state.bvisible}
  2238. footer=""
  2239. title="开票历史记录"
  2240. className="admin-desc-content"
  2241. width="900px"
  2242. onCancel={this.inRecordCanl}
  2243. >
  2244. <Spin spinning={this.state.loading}>
  2245. <div
  2246. className="patent-table"
  2247. ref={e => {
  2248. this.refs.kaiPiao = e;
  2249. }}
  2250. >
  2251. <Table
  2252. columns={this.state.columnsDate}
  2253. dataSource={this.state.recordData}
  2254. pagination={false}
  2255. bordered
  2256. />
  2257. <div className="clearfix" style={{ marginTop: "20px" }}>
  2258. <FormItem
  2259. className="half-item"
  2260. {...formItemLayout}
  2261. label={<span style={{ fontSize: "14px" }}>开票总计</span>}
  2262. >
  2263. <span>{this.state.sum + "(万元)"}</span>
  2264. </FormItem>
  2265. </div>
  2266. <ReactToPrint
  2267. trigger={() => (
  2268. <Button
  2269. type="primary"
  2270. style={{
  2271. float: "right",
  2272. // marginTop: 10,
  2273. position: "absolute",
  2274. top: -54,
  2275. right: 30
  2276. }}
  2277. >
  2278. 打印
  2279. </Button>
  2280. )}
  2281. content={() => this.refs.kaiPiao}
  2282. />
  2283. </div>
  2284. </Spin>
  2285. </Modal>
  2286. <Modal
  2287. visible={this.state.cvisible}
  2288. footer=""
  2289. title="详细收款流水"
  2290. className="admin-desc-content"
  2291. width="1300px"
  2292. onCancel={this.waterCanl}
  2293. >
  2294. <Spin spinning={this.state.loading}>
  2295. <div
  2296. className="patent-table"
  2297. ref={e => {
  2298. this.refs.shouKuan = e;
  2299. }}
  2300. >
  2301. <Table
  2302. columns={this.state.waterlistDate}
  2303. dataSource={this.state.waterData}
  2304. pagination={false}
  2305. bordered
  2306. />
  2307. <div className="clearfix" style={{ marginTop: "20px" }}>
  2308. <FormItem
  2309. className="half-item"
  2310. {...formItemLayout}
  2311. label={<span style={{ fontSize: "14px" }}>总计金额</span>}
  2312. >
  2313. <span>{this.state.waterSum + "(万元)"}</span>
  2314. </FormItem>
  2315. </div>
  2316. <ReactToPrint
  2317. trigger={() => (
  2318. <Button
  2319. type="primary"
  2320. style={{
  2321. float: "right",
  2322. position: "absolute",
  2323. top: -54,
  2324. right: 30
  2325. }}
  2326. >
  2327. 打印
  2328. </Button>
  2329. )}
  2330. content={() => this.refs.shouKuan}
  2331. />
  2332. </div>
  2333. </Spin>
  2334. </Modal>
  2335. <Modal
  2336. visible={this.state.dvisible}
  2337. footer=""
  2338. title="所有列表信息"
  2339. className="admin-desc-content"
  2340. width="1300px"
  2341. onCancel={() => {
  2342. this.state.pagination.pageSize = 10;
  2343. this.setState({
  2344. pagination: this.state.pagination
  2345. });
  2346. this.loadData();
  2347. this.setState({
  2348. dvisible: false
  2349. });
  2350. }}
  2351. >
  2352. <Spin spinning={this.state.loading}>
  2353. <div
  2354. className="patent-table"
  2355. style={{
  2356. // width: 900,
  2357. // position: "relative",
  2358. // left: "50%",
  2359. // transform: "translate(-50%)",
  2360. padding: "25px 0 30px 30px"
  2361. }}
  2362. ref={e => {
  2363. this.refs.all = e;
  2364. }}
  2365. >
  2366. <Table
  2367. columns={this.state.printColumns}
  2368. dataSource={this.state.dataSource}
  2369. pagination={this.state.pagination}
  2370. bordered
  2371. size="small"
  2372. />
  2373. </div>
  2374. </Spin>
  2375. <ReactToPrint
  2376. trigger={() => (
  2377. <Button
  2378. type="primary"
  2379. style={{
  2380. float: "right",
  2381. marginTop: 10,
  2382. position: "absolute",
  2383. top: 0,
  2384. right: 30
  2385. }}
  2386. >
  2387. 打印
  2388. </Button>
  2389. )}
  2390. content={() => this.refs.all}
  2391. />
  2392. </Modal>
  2393. </div>
  2394. );
  2395. }
  2396. });
  2397. export default approvedOutsourcing;