approvedOutsourcing.jsx 68 KB

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