approvedOutsourcing.jsx 62 KB

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