approvedOutsourcing.jsx 60 KB

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