approvedOutsourcing.jsx 67 KB

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