approvedOutsourcing.jsx 64 KB

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