approvedOutsourcing.jsx 65 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219
  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. }}
  361. >
  362. 转交
  363. </Button>
  364. }
  365. </div>
  366. );
  367. }
  368. }
  369. ],
  370. columnsX: [
  371. {
  372. title: "业务项目名称",
  373. dataIndex: "commodityName",
  374. key: "commodityName",
  375. render: text => {
  376. return text && text.length > 6 ? (
  377. <span title={text}>{text.substr(0, 8)}...</span>
  378. ) : (
  379. text
  380. );
  381. }
  382. },
  383. {
  384. title: "项目类别",
  385. dataIndex: "cname",
  386. key: "cname"
  387. },
  388. {
  389. title: "项目数量(个)",
  390. dataIndex: "commodityQuantity",
  391. key: "commodityQuantity"
  392. },
  393. {
  394. title: "服务市价(万元)",
  395. dataIndex: "commodityPrice",
  396. key: "commodityPrice"
  397. },
  398. {
  399. title: "项目状态",
  400. dataIndex: "projectStatus",
  401. key: "projectStatus",
  402. render: text => {
  403. return getProjectStatus(text);
  404. }
  405. },
  406. {
  407. title: "证书编号",
  408. dataIndex: "certificateNumber",
  409. key: "certificateNumber"
  410. },
  411. {
  412. title: "是否主要项目",
  413. dataIndex: "main",
  414. key: "main",
  415. render: text => {
  416. return text ? "是" : "否";
  417. }
  418. },
  419. {
  420. title: "项目说明",
  421. dataIndex: "taskComment",
  422. key: "taskComment",
  423. render: text => {
  424. return text && text.length > 8 ? (
  425. <span title={text}>{text.substr(0, 8)}...</span>
  426. ) : (
  427. text
  428. );
  429. }
  430. }
  431. ],
  432. columnsDate: [
  433. {
  434. title: "编号",
  435. dataIndex: "id",
  436. key: "id"
  437. },
  438. {
  439. title: "订单编号",
  440. dataIndex: "orderno",
  441. key: "orderno"
  442. },
  443. {
  444. title: "开票金额(万元)",
  445. dataIndex: "amount",
  446. key: "amount"
  447. },
  448. {
  449. title: "申请时间",
  450. dataIndex: "createTime",
  451. key: "createTime"
  452. },
  453. {
  454. title: "开票状态",
  455. dataIndex: "status",
  456. key: "status",
  457. render: text => {
  458. return getInvoiceStatus(text);
  459. }
  460. }
  461. ],
  462. columnsY: [
  463. {
  464. title: "流程",
  465. dataIndex: "processName",
  466. key: "processName"
  467. },
  468. {
  469. title: "操作人",
  470. dataIndex: "adminName",
  471. key: "adminName"
  472. },
  473. {
  474. title: "时间",
  475. dataIndex: "createDate",
  476. key: "createDate"
  477. }
  478. ],
  479. columnsW: [
  480. {
  481. title: "外包名称",
  482. dataIndex: "name",
  483. key: "name"
  484. },
  485. {
  486. title: "联系人",
  487. dataIndex: "contacts",
  488. key: "contacts"
  489. },
  490. {
  491. title: "联系人电话",
  492. dataIndex: "contactsMobile",
  493. key: "contactsMobile"
  494. },
  495. {
  496. title: "地址",
  497. dataIndex: "ProvinceCity",
  498. key: "ProvinceCity",
  499. render: test => {
  500. return test[0] === null
  501. ? ""
  502. : getprovince(test[0]) +
  503. "/" +
  504. getprovince(test[1]) +
  505. "/" +
  506. getprovince(test[2]);
  507. }
  508. },
  509. {
  510. title: "地址详情",
  511. dataIndex: "address",
  512. key: "address",
  513. render: text => {
  514. return text && text.length > 8 ? text.substr(0, 8) + "..." : text;
  515. }
  516. },
  517. {
  518. title: "创建时间",
  519. dataIndex: "createTimes",
  520. key: "createTimes"
  521. },
  522. {
  523. title: "任务名称",
  524. dataIndex: "tname",
  525. key: "tname"
  526. },
  527. {
  528. title: "合同编号",
  529. dataIndex: "contractNo",
  530. key: "contractNo"
  531. },
  532. {
  533. title: "项目状态",
  534. dataIndex: "projectStatus",
  535. key: "projectStatus",
  536. render: text => {
  537. return getProjectStatus(text);
  538. }
  539. }
  540. ],
  541. dataSource: [],
  542. searchTime: [,],
  543. printColumns: [
  544. {
  545. title: "合同编号",
  546. dataIndex: "contractNo",
  547. key: "contractNo"
  548. },
  549. {
  550. title: "订单编号",
  551. dataIndex: "orderNo",
  552. key: "orderNo"
  553. // fixed: "left"
  554. },
  555. {
  556. title: "客户名称",
  557. dataIndex: "buyerName",
  558. key: "buyerName"
  559. },
  560. {
  561. title: "订单部门",
  562. dataIndex: "departmentName",
  563. key: "departmentName"
  564. },
  565. {
  566. title: "订单负责人",
  567. dataIndex: "sellerName",
  568. key: "sellerName"
  569. },
  570. {
  571. title: "外包公司",
  572. dataIndex: "outsourceName",
  573. key: "outsourceName"
  574. },
  575. {
  576. title: "签单日期",
  577. dataIndex: "signTime",
  578. key: "signTime"
  579. },
  580. {
  581. title: "下单日期",
  582. dataIndex: "createTime",
  583. key: "createTime"
  584. },
  585. {
  586. title: "签单金额(万元)",
  587. dataIndex: "signTotalAmount",
  588. key: "signTotalAmount"
  589. },
  590. {
  591. title: "开票金额(万元)",
  592. dataIndex: "invoiceAmount",
  593. key: "invoiceAmount"
  594. },
  595. {
  596. title: "已收款(万元)",
  597. dataIndex: "actuallyTotalAmount",
  598. key: "actuallyTotalAmount"
  599. },
  600. {
  601. title: "最近收款(万元)",
  602. dataIndex: "finalReceivables",
  603. key: "finalReceivables"
  604. },
  605. {
  606. title: "最近收款时间",
  607. dataIndex: "finalReceivablesTime",
  608. key: "finalReceivablesTime"
  609. },
  610. {
  611. title: "结算状态",
  612. dataIndex: "liquidationStatus",
  613. key: "liquidationStatus",
  614. render: text => {
  615. return getLiquidationStatus(text);
  616. }
  617. },
  618. {
  619. title: "流程状态",
  620. dataIndex: "processStatus",
  621. key: "processStatus",
  622. render: text => {
  623. return getProcessStatus(text);
  624. }
  625. },
  626. {
  627. title: "特批状态",
  628. dataIndex: "approval",
  629. key: "approval",
  630. render: text => {
  631. return getApproval(text);
  632. }
  633. }
  634. ],
  635. waterlistDate: [
  636. {
  637. title: "订单编号",
  638. dataIndex: "orderNo",
  639. key: "orderNo"
  640. },
  641. {
  642. title: "平台流水号",
  643. dataIndex: "billNo",
  644. key: "billNo"
  645. // fixed: "left"
  646. },
  647. {
  648. title: "金额(万元)",
  649. dataIndex: "transactionAmount",
  650. key: "transactionAmount"
  651. },
  652. {
  653. title: "收款方",
  654. dataIndex: "payeeName",
  655. key: "payeeName"
  656. },
  657. {
  658. title: "付款方",
  659. dataIndex: "payerName",
  660. key: "payerName"
  661. },
  662. {
  663. title: "流水科目",
  664. dataIndex: "transactionSubject",
  665. key: "transactionSubject",
  666. render: text => {
  667. return getTransactionProject(text);
  668. }
  669. },
  670. {
  671. title: "收款类型",
  672. dataIndex: "type",
  673. key: "type"
  674. },
  675. {
  676. title: "财务流水时间",
  677. dataIndex: "financialPayTimes",
  678. key: "financialPayTimes"
  679. },
  680. {
  681. title: "财务流水号",
  682. dataIndex: "financialPayNo",
  683. key: "financialPayNo"
  684. },
  685. {
  686. title: "订单负责人",
  687. dataIndex: "saleName",
  688. key: "saleName"
  689. },
  690. {
  691. title: "创建时间",
  692. dataIndex: "createTimes",
  693. key: "createTimes"
  694. }
  695. ],
  696. waterData: []
  697. };
  698. },
  699. // 特批通过
  700. evaluateZ(record) {
  701. $.ajax({
  702. method: "POST",
  703. dataType: "json",
  704. crossDomain: false,
  705. url: globalConfig.context + "/api/admin/financial/financeApproval",
  706. data: {
  707. orderNo: record.orderNo
  708. }
  709. }).done(
  710. function(data) {
  711. if (!data.error.length) {
  712. message.success("通过成功!");
  713. this.setState({
  714. loading: false
  715. });
  716. this.loadData();
  717. } else {
  718. message.warning(data.error[0].message);
  719. }
  720. }.bind(this)
  721. );
  722. },
  723. jdDate(orderNo) {
  724. $.ajax({
  725. method: "get",
  726. dataType: "json",
  727. crossDomain: false,
  728. url: globalConfig.context + "/api/admin/newOrder/selectOrderDun",
  729. data: {
  730. orderNo: orderNo
  731. },
  732. success: function(data) {
  733. let thisData = data.data;
  734. if (!thisData.length) {
  735. if (data.error && data.error.length) {
  736. message.warning(data.error[0].message);
  737. }
  738. thisData = {};
  739. } else {
  740. this.setState({
  741. jsDate: thisData
  742. });
  743. }
  744. }.bind(this)
  745. }).always(
  746. function() {
  747. this.setState({
  748. loading: false
  749. });
  750. }.bind(this)
  751. );
  752. },
  753. /* 收款 */
  754. evaluateX(recard) {
  755. this.state.assignDataX = recard;
  756. this.setState({
  757. assignVisibleX: true
  758. });
  759. },
  760. /* 转交 */
  761. evaluateY(recard, nub) {
  762. this.state.assignDataY = recard;
  763. this.setState({
  764. nub,
  765. assignVisibleY: true
  766. });
  767. },
  768. /* 驳回 */
  769. reject(recard) {
  770. this.setState({
  771. bohuiData: recard,
  772. boHuiVisible: true,
  773. content: ""
  774. });
  775. },
  776. boHuiCancel() {
  777. this.setState({
  778. boHuiVisible: false,
  779. reason: ""
  780. });
  781. },
  782. componentWillMount() {
  783. this.loadData();
  784. this.departmentList();
  785. },
  786. tableRowClick(record) {
  787. this.state.RowData = record;
  788. this.setState({
  789. showDesc: true,
  790. visible: true,
  791. orderNo: record.orderNo,
  792. modKey: "1"
  793. });
  794. this.jdDate(record.orderNo);
  795. this.loadXmu(record);
  796. this.loadModal(record);
  797. },
  798. //详情
  799. callBack(key) {
  800. if (key === "2") {
  801. this.setState({
  802. modKey: key,
  803. width: "1200px"
  804. });
  805. this.loadWaiBao();
  806. }
  807. if (key === "1") {
  808. this.setState({
  809. modKey: key,
  810. width: "800px"
  811. });
  812. }
  813. if (this.state.pictureUrl.length) {
  814. let picArr = [];
  815. this.state.pictureUrl.map(function(item) {
  816. if (item.response && item.response.data && item.response.data.length) {
  817. picArr.push(item.response.data);
  818. }
  819. });
  820. }
  821. if (key === "3") {
  822. this.setState({
  823. modKey: key,
  824. width: "800px"
  825. });
  826. this.setState({
  827. loading: true
  828. });
  829. $.ajax({
  830. method: "get",
  831. dataType: "json",
  832. crossDomain: false,
  833. url:
  834. globalConfig.context + "/api/admin/outsourceOrg/orderOutsourceDtails",
  835. data: {
  836. orderNo: this.state.orderNo
  837. },
  838. success: function(data) {
  839. let thisdata = data.data;
  840. this.setState({
  841. id: thisdata.id,
  842. createTimes: thisdata.createTimes,
  843. auditTimes: thisdata.auditTimes,
  844. remarks: thisdata.remarks,
  845. attachmentUrl: thisdata.attachmentUrl
  846. ? splitUrl(
  847. thisdata.attachmentUrl,
  848. ",",
  849. globalConfig.avatarHost + "/upload"
  850. )
  851. : [],
  852. pictureUrl: thisdata.pictureUrl
  853. ? splitUrl(
  854. thisdata.pictureUrl,
  855. ",",
  856. globalConfig.avatarHost + "/upload"
  857. )
  858. : [], //图片地址
  859. amount: thisdata.amount,
  860. companyName: thisdata.companyName,
  861. refundStatus: thisdata.refundStatus,
  862. outsourceRemarks: thisdata.outsourceRemarks,
  863. unitNumber: thisdata.unitNumber,
  864. unitPrice: thisdata.unitPrice
  865. });
  866. }.bind(this)
  867. }).always(
  868. function() {
  869. this.setState({
  870. loading: false
  871. });
  872. }.bind(this)
  873. );
  874. }
  875. },
  876. //外包详情
  877. loadWaiBao() {
  878. $.ajax({
  879. method: "get",
  880. dataType: "json",
  881. rossDomain: false,
  882. url:
  883. globalConfig.context +
  884. "/api/admin/outsourceOrg/selectOrderOutsourceOrg",
  885. data: {
  886. orderNo: this.state.orderNo
  887. },
  888. success: function(data) {
  889. let theArr = [];
  890. if (data.error.length || data.data.list == "") {
  891. if (data.error && data.error.length) {
  892. message.warning(data.error[0].message);
  893. }
  894. } else {
  895. for (let i = 0; i < data.data.length; i++) {
  896. let thisdata = data.data[i];
  897. let ProvinceCityArr = [];
  898. let ProvinceS = thisdata.province; //省
  899. let citys = thisdata.city; //市
  900. let Areas = thisdata.area; //区
  901. ProvinceCityArr.push(ProvinceS, citys, Areas);
  902. theArr.push({
  903. key: i,
  904. id: thisdata.id,
  905. name: thisdata.name,
  906. contacts: thisdata.contacts, //订单编号
  907. contactsMobile: thisdata.contactsMobile,
  908. ProvinceCity: ProvinceCityArr[0] === null ? [] : ProvinceCityArr,
  909. province: thisdata.province,
  910. city: thisdata.city,
  911. area: thisdata.area,
  912. address: thisdata.address,
  913. remarks: thisdata.remarks,
  914. tid: thisdata.tid,
  915. createTimes: thisdata.createTimes,
  916. tname: thisdata.tname,
  917. contractNo: thisdata.contractNo,
  918. projectStatus: thisdata.projectStatus
  919. });
  920. }
  921. }
  922. this.setState(
  923. {
  924. dataSourceW: theArr
  925. },
  926. () => {}
  927. );
  928. }.bind(this)
  929. }).always(
  930. function() {
  931. this.setState({
  932. loading: false
  933. });
  934. }.bind(this)
  935. );
  936. },
  937. loadXmu(record) {
  938. this.state.data = [];
  939. this.setState({
  940. loading: true
  941. });
  942. $.ajax({
  943. method: "get",
  944. dataType: "json",
  945. crossDomain: false,
  946. url: globalConfig.context + "/api/admin/newOrder/getOrderTask",
  947. data: {
  948. orderNo: record.orderNo
  949. },
  950. success: function(data) {
  951. let theArr = [];
  952. if (!data.data) {
  953. if (data.error && data.error.length) {
  954. message.warning(data.error[0].message);
  955. }
  956. } else {
  957. for (let i = 0; i < data.data.length; i++) {
  958. let thisdata = data.data[i];
  959. theArr.push({
  960. key: i,
  961. id: thisdata.id,
  962. orderNo: thisdata.orderNo,
  963. commodityName: thisdata.commodityName,
  964. commodityPrice: thisdata.commodityPrice,
  965. commodityQuantity: thisdata.commodityQuantity,
  966. taskStatus: thisdata.taskStatus,
  967. taskComment: thisdata.taskComment,
  968. main: thisdata.main,
  969. contacts: thisdata.contacts,
  970. contactsMobile: thisdata.contactsMobile,
  971. cname: thisdata.cname,
  972. certificateNumber: thisdata.certificateNumber,
  973. projectStatus: thisdata.projectStatus
  974. });
  975. }
  976. }
  977. this.setState({
  978. dataSourceX: theArr
  979. });
  980. }.bind(this)
  981. }).always(
  982. function() {
  983. this.setState({
  984. loading: false
  985. });
  986. }.bind(this)
  987. );
  988. },
  989. loadModal(record) {
  990. this.state.orderList = [];
  991. $.ajax({
  992. method: "get",
  993. dataType: "json",
  994. crossDomain: false,
  995. url: globalConfig.context + "/api/admin/newOrder/getOrderNewDetail",
  996. data: {
  997. orderNo: record.orderNo
  998. },
  999. success: function(data) {
  1000. let thisData = data.data;
  1001. if (!thisData) {
  1002. if (data.error && data.error.length) {
  1003. message.warning(data.error[0].message);
  1004. }
  1005. thisData = {};
  1006. }
  1007. this.setState({
  1008. id: thisData.id,
  1009. orderList: thisData,
  1010. approval:
  1011. thisData.approval == 0
  1012. ? thisData.approval.toString()
  1013. : thisData.approval,
  1014. orderRemarks: thisData.orderRemarks,
  1015. orgCodeUrl: thisData.contractPictureUrl
  1016. ? splitUrl(
  1017. thisData.contractPictureUrl,
  1018. ",",
  1019. globalConfig.avatarHost + "/upload"
  1020. )
  1021. : [],
  1022. orderNo: thisData.orderNo, //订单编号
  1023. buyerId: thisData.buyerId,
  1024. depName: thisData.depName
  1025. });
  1026. }.bind(this)
  1027. }).always(
  1028. function() {
  1029. this.setState({
  1030. loading: false
  1031. });
  1032. }.bind(this)
  1033. );
  1034. },
  1035. rizhi() {
  1036. this.setState({
  1037. loading: true
  1038. });
  1039. $.ajax({
  1040. method: "get",
  1041. dataType: "json",
  1042. crossDomain: false,
  1043. url: "/api/admin/newOrder/selectOrderLog",
  1044. data: {
  1045. orderNo: this.state.orderNo
  1046. },
  1047. success: function(data) {
  1048. let theArr = [];
  1049. let thisData = data.data;
  1050. if (!thisData.length) {
  1051. if (data.error && data.error.length) {
  1052. message.warning(data.error[0].message);
  1053. }
  1054. thisData = {};
  1055. } else {
  1056. for (let i = 0; i < data.data.length; i++) {
  1057. let thisdata = data.data[i];
  1058. theArr.push({
  1059. processName: thisdata.processName,
  1060. adminName: thisdata.adminName,
  1061. createDate: thisdata.createDate
  1062. });
  1063. }
  1064. }
  1065. this.setState({
  1066. dataSourceY: theArr
  1067. });
  1068. }.bind(this)
  1069. }).always(
  1070. function() {
  1071. this.setState({
  1072. loading: false
  1073. });
  1074. }.bind(this)
  1075. );
  1076. },
  1077. closeOrderLog() {
  1078. this.setState({
  1079. avisible: false
  1080. });
  1081. },
  1082. load() {
  1083. if (this.state.attachmentUrl) {
  1084. let url = window.location.href.substring(7);
  1085. this.state.attachmentUrl.forEach(e => {
  1086. window.location.href =
  1087. "http://" +
  1088. url.substring(0, url.indexOf("/")) +
  1089. "/api/admin/outsourceOrg//downloadFile?path=" +
  1090. e.response.data;
  1091. });
  1092. } else {
  1093. message.error("此订单无上传文件");
  1094. }
  1095. },
  1096. getOrderLog() {
  1097. this.setState({
  1098. avisible: true
  1099. });
  1100. this.rizhi();
  1101. },
  1102. closeModal() {
  1103. this.setState(
  1104. {
  1105. visible: false,
  1106. width: "800px"
  1107. },
  1108. () => {
  1109. this.setState({
  1110. modKey: "1"
  1111. });
  1112. }
  1113. );
  1114. },
  1115. closeDesc(e, s) {
  1116. this.state.showDesc = e;
  1117. if (s) {
  1118. this.loadData();
  1119. }
  1120. },
  1121. closeAssignX(e, s) {
  1122. this.state.assignDataX = {};
  1123. this.state.assignVisibleX = e;
  1124. if (s) {
  1125. this.loadData();
  1126. }
  1127. },
  1128. closeAssignY(e, s) {
  1129. this.state.assignDataY = {};
  1130. this.state.assignVisibleY = e;
  1131. if (s) {
  1132. this.loadData();
  1133. }
  1134. },
  1135. search() {
  1136. this.loadData();
  1137. },
  1138. reset() {
  1139. this.state.nameSearch = "";
  1140. this.state.releaseDate = [];
  1141. this.state.orderNoSearch = "";
  1142. this.state.departmenttList = undefined;
  1143. this.state.processStatus = [];
  1144. this.state.contractNoSearch = "";
  1145. this.loadData();
  1146. },
  1147. boHuiCo() {
  1148. this.boHuiCancel();
  1149. this.boHuiSubmit();
  1150. },
  1151. //驳回
  1152. boHuiSubmit() {
  1153. if (!this.state.reason) {
  1154. message.warning("请填写驳回原因");
  1155. return false;
  1156. }
  1157. this.setState({
  1158. loading: true
  1159. });
  1160. $.ajax({
  1161. method: "POST",
  1162. dataType: "json",
  1163. crossDomain: false,
  1164. url: globalConfig.context + "/api/admin/financial/reject",
  1165. data: {
  1166. orderNo: this.state.bohuiData.orderNo,
  1167. reason: this.state.reason
  1168. }
  1169. }).done(
  1170. function(data) {
  1171. if (!data.error.length) {
  1172. message.success("驳回成功!");
  1173. this.setState({
  1174. loading: false
  1175. });
  1176. this.loadData();
  1177. } else {
  1178. message.warning(data.error[0].message);
  1179. }
  1180. }.bind(this)
  1181. );
  1182. },
  1183. searchSwitch() {
  1184. this.setState({
  1185. searchMore: !this.state.searchMore
  1186. });
  1187. },
  1188. changeList(arr) {
  1189. const newArr = [];
  1190. this.state.columns.forEach(item => {
  1191. arr.forEach(val => {
  1192. if (val === item.title) {
  1193. newArr.push(item);
  1194. }
  1195. });
  1196. });
  1197. this.setState({
  1198. changeList: newArr
  1199. });
  1200. },
  1201. onSelectChange(selectedRowKeys) {
  1202. // for(var i=0; i<selectedRowKeys.length; i++){
  1203. // for(var j=i+1; j<selectedRowKeys.length; j++){
  1204. // if(selectedRowKeys[i]==selectedRowKeys[j]){
  1205. // selectedRowKeys.splice(j,1);
  1206. // j--;
  1207. // }
  1208. // }
  1209. // }
  1210. console.log(selectedRowKeys);
  1211. this.setState({ selectedRowKeys });
  1212. },
  1213. inRecordData() {
  1214. this.setState({
  1215. loading: true
  1216. });
  1217. $.ajax({
  1218. method: "get",
  1219. dataType: "json",
  1220. crossDomain: false,
  1221. url:
  1222. globalConfig.context +
  1223. "/api/admin/orderInvoice/salesmanOrderInvoiceList",
  1224. data: {
  1225. orderNo: this.state.selectedRowKeys[0]
  1226. },
  1227. success: function(data) {
  1228. let theArr = [];
  1229. let sum = 0;
  1230. if (!data.data) {
  1231. if (data.error && data.error.length) {
  1232. message.warning(data.error[0].message);
  1233. }
  1234. } else {
  1235. for (let i = 0; i < data.data.list.length; i++) {
  1236. let thisdata = data.data.list[i];
  1237. sum += parseFloat(thisdata.amount);
  1238. theArr.push({
  1239. id: thisdata.id,
  1240. orderno: thisdata.orderno, //订单编号
  1241. amount: thisdata.amount, //签单金额
  1242. createTime: thisdata.createTime, //流程状态
  1243. status: thisdata.status, //结算状态
  1244. rejectReason: thisdata.rejectReason
  1245. });
  1246. }
  1247. }
  1248. this.setState({
  1249. recordData: theArr,
  1250. sum: sum.toFixed(4)
  1251. });
  1252. }.bind(this)
  1253. }).done(
  1254. function() {
  1255. this.setState({
  1256. loading: false
  1257. });
  1258. }.bind(this)
  1259. );
  1260. },
  1261. inRecordCanl() {
  1262. this.setState({
  1263. bvisible: false
  1264. });
  1265. },
  1266. waterData() {
  1267. this.state.data = [];
  1268. this.setState({
  1269. loading: true
  1270. });
  1271. $.ajax({
  1272. method: "get",
  1273. dataType: "json",
  1274. crossDomain: false,
  1275. url: globalConfig.context + "/api/admin/financial/myBillList",
  1276. data: {
  1277. orderNo: this.state.selectedRowKeys[0]
  1278. },
  1279. success: function(data) {
  1280. let theArr = [];
  1281. let waterSum = 0;
  1282. if (!data.data || !data.data.list) {
  1283. if (data.error && data.error.length) {
  1284. message.warning(data.error[0].message);
  1285. }
  1286. } else {
  1287. for (let i = 0; i < data.data.list.length; i++) {
  1288. let thisdata = data.data.list[i];
  1289. waterSum += parseFloat(thisdata.transactionAmount);
  1290. theArr.push({
  1291. key: i,
  1292. orderNo: thisdata.orderNo,
  1293. billNo: thisdata.billNo,
  1294. transactionAmount: thisdata.transactionAmount,
  1295. payeeName: thisdata.payeeName,
  1296. payerName: thisdata.payerName,
  1297. transactionSubject: thisdata.transactionSubject,
  1298. transactionChannel: thisdata.transactionChannel,
  1299. financialPayTimes: thisdata.financialPayTimes,
  1300. financialPayNo: thisdata.financialPayNo,
  1301. createrName: thisdata.createrName,
  1302. saleName: thisdata.saleName,
  1303. createTimes: thisdata.createTimes,
  1304. type: thisdata.type == 0 ? "手工" : "批量"
  1305. });
  1306. }
  1307. }
  1308. this.setState({
  1309. waterData: theArr,
  1310. waterSum: waterSum.toFixed(4)
  1311. });
  1312. }.bind(this)
  1313. }).always(
  1314. function() {
  1315. this.setState({
  1316. loading: false
  1317. });
  1318. }.bind(this)
  1319. );
  1320. },
  1321. waterCanl() {
  1322. this.setState({
  1323. cvisible: false
  1324. });
  1325. },
  1326. exportAll() {
  1327. window.location.href =
  1328. globalConfig.context +
  1329. "/api/admin/receivables/exportReceivables?outsource=1";
  1330. },
  1331. exportKaip() {
  1332. window.location.href =
  1333. globalConfig.context +
  1334. "/api/admin/receivables/exportInvoice?" +
  1335. `orderNo=${this.state.selectedRowKeys}`;
  1336. },
  1337. exportWater() {
  1338. window.location.href =
  1339. globalConfig.context +
  1340. "/api/admin/receivables/exportMyBill?" +
  1341. `orderNo=${this.state.selectedRowKeys}`;
  1342. },
  1343. printAll() {
  1344. this.setState({
  1345. dvisible: true
  1346. // loading: true
  1347. });
  1348. this.loadData(1, 9999);
  1349. this.state.pagination.pageSize = 9999;
  1350. this.setState({
  1351. pagination: this.state.pagination
  1352. });
  1353. window.setTimeout(() => {
  1354. document.querySelectorAll(
  1355. ".ant-pagination.ant-table-pagination.mini"
  1356. )[0].style.display = "none";
  1357. // let tr = document.querySelectorAll(".patent-table tr");
  1358. // for(let i = 0; i < tr.length; i++) {
  1359. // tr[i].style.fontSize = "6px"
  1360. // }
  1361. // let td = document.querySelectorAll(".patent-table tr td");
  1362. // for (let i = 0; i < td.length; i++) {
  1363. // td[i].style.padding = "0 0 0 0";
  1364. // }
  1365. }, 100);
  1366. },
  1367. render() {
  1368. const { TextArea } = Input;
  1369. const { RangePicker } = DatePicker;
  1370. const { TabPane } = Tabs;
  1371. var departmentArr = this.state.departmentArr || [];
  1372. const theData = this.state.orderList || {};
  1373. const formItemLayout = {
  1374. labelCol: { span: 8 },
  1375. wrapperCol: { span: 12 }
  1376. };
  1377. const { loading, selectedRowKeys, visible } = this.state;
  1378. const rowSelection = {
  1379. selectedRowKeys,
  1380. onChange: this.onSelectChange,
  1381. hideDefaultSelections: true,
  1382. type: "radio"
  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}
  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}
  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. </Tabs>
  1565. <div className="patent-table">
  1566. <Spin spinning={this.state.loading}>
  1567. <Table
  1568. bordered
  1569. columns={
  1570. this.state.changeList == undefined
  1571. ? this.state.columns
  1572. : this.state.changeList
  1573. }
  1574. dataSource={this.state.dataSource}
  1575. rowSelection={false}
  1576. scroll={{ x: "max-content", y: 0 }}
  1577. pagination={this.state.pagination}
  1578. onRowDoubleClick={this.tableRowClick.bind(this)}
  1579. rowSelection={rowSelection}
  1580. size="small"
  1581. />
  1582. </Spin>
  1583. <p
  1584. style={{ display: "inline-block", fontSize: "14px", color: "red" }}
  1585. >
  1586. {
  1587. <span style={{ marginRight: 10 }}>
  1588. {`收款金额总计(万元):${
  1589. this.state.hui ? this.state.hui : "0"
  1590. }`}
  1591. </span>
  1592. }
  1593. {
  1594. <span>
  1595. {`合同额总计(万元):${
  1596. this.state.totalHui ? this.state.totalHui : "0"
  1597. }`}
  1598. </span>
  1599. }
  1600. </p>
  1601. </div>
  1602. <div className="patent-desc">
  1603. <Modal
  1604. maskClosable={false}
  1605. visible={this.state.visible}
  1606. onCancel={this.closeModal}
  1607. width={this.state.width}
  1608. footer=""
  1609. className="admin-desc-content"
  1610. >
  1611. <Tabs
  1612. onChange={this.callBack}
  1613. type="card"
  1614. activeKey={this.state.modKey}
  1615. >
  1616. <TabPane tab="项目概况" key="1">
  1617. <Form layout="horizontal" id="demand-form">
  1618. <Spin spinning={this.state.loading}>
  1619. <div className="clearfix">
  1620. <FormItem
  1621. className="half-item"
  1622. {...formItemLayout}
  1623. label="订单编号"
  1624. >
  1625. <span>{this.state.orderNo}</span>
  1626. </FormItem>
  1627. <FormItem
  1628. className="half-item"
  1629. {...formItemLayout}
  1630. label="签单时间"
  1631. >
  1632. <span>{theData.signDate}</span>
  1633. </FormItem>
  1634. <FormItem
  1635. className="half-item"
  1636. {...formItemLayout}
  1637. label="客户名称"
  1638. >
  1639. <span>{theData.userName}</span>
  1640. </FormItem>
  1641. <FormItem
  1642. className="half-item"
  1643. {...formItemLayout}
  1644. label="流转状态"
  1645. >
  1646. <span>{getProcessStatus(theData.processStatus)}</span>
  1647. </FormItem>
  1648. <FormItem
  1649. className="half-item"
  1650. {...formItemLayout}
  1651. label="订单类型"
  1652. >
  1653. <span>{getNewOrderType(theData.orderType)}</span>
  1654. </FormItem>
  1655. <FormItem
  1656. className="half-item"
  1657. {...formItemLayout}
  1658. label="结算状态"
  1659. >
  1660. <span>
  1661. {getLiquidationStatus(theData.liquidationStatus)}
  1662. </span>
  1663. </FormItem>
  1664. <FormItem
  1665. className="half-item"
  1666. {...formItemLayout}
  1667. label="签单总金额(万元)"
  1668. >
  1669. <span>{theData.totalAmount}</span>
  1670. </FormItem>
  1671. <FormItem
  1672. className="half-item"
  1673. {...formItemLayout}
  1674. label="首付款(万元)"
  1675. >
  1676. <span>{theData.firstAmount}</span>
  1677. </FormItem>
  1678. <FormItem
  1679. className="half-item"
  1680. {...formItemLayout}
  1681. label="已收款(万元)"
  1682. >
  1683. <span>{theData.settlementAmount}</span>
  1684. </FormItem>
  1685. <FormItem
  1686. className="half-item"
  1687. {...formItemLayout}
  1688. label="是否特批"
  1689. >
  1690. <span>{getApproval(theData.approval)}</span>
  1691. </FormItem>
  1692. {/*this.props.data.orderStatus=='6'&&<FormItem className="half-item" {...formItemLayout} label="已退(万元)">
  1693. <span>{this.props.data.refundAmount}</span>
  1694. </FormItem>*/}
  1695. </div>
  1696. <div className="clearfix">
  1697. <FormItem
  1698. labelCol={{ span: 5 }}
  1699. wrapperCol={{ span: 18 }}
  1700. label="合同扫描件"
  1701. >
  1702. <Upload
  1703. className="demandDetailShow-upload"
  1704. listType="picture-card"
  1705. fileList={this.state.orgCodeUrl}
  1706. onPreview={file => {
  1707. this.setState({
  1708. previewImage: file.url || file.thumbUrl,
  1709. previewVisible: true
  1710. });
  1711. }}
  1712. ></Upload>
  1713. <Modal
  1714. maskClosable={false}
  1715. footer={null}
  1716. visible={this.state.previewVisible}
  1717. onCancel={() => {
  1718. this.setState({ previewVisible: false });
  1719. }}
  1720. >
  1721. <img
  1722. alt=""
  1723. style={{ width: "100%" }}
  1724. src={this.state.previewImage || ""}
  1725. />
  1726. </Modal>
  1727. <Button
  1728. style={{
  1729. float: "right",
  1730. marginRight: "140px",
  1731. marginTop: "20px"
  1732. }}
  1733. onClick={this.getOrderLog}
  1734. >
  1735. 查看订单日志
  1736. </Button>
  1737. </FormItem>
  1738. </div>
  1739. <div className="clearfix">
  1740. <FormItem
  1741. className="half-item"
  1742. {...formItemLayout}
  1743. label="合同编号"
  1744. >
  1745. <span>{theData.contractNo}</span>
  1746. </FormItem>
  1747. <FormItem
  1748. className="half-item"
  1749. {...formItemLayout}
  1750. label="订单部门"
  1751. >
  1752. <span>{theData.depName}</span>
  1753. </FormItem>
  1754. </div>
  1755. <div className="clearfix">
  1756. <FormItem
  1757. labelCol={{ span: 5 }}
  1758. wrapperCol={{ span: 18 }}
  1759. label="订单留言"
  1760. >
  1761. <p style={{ width: 500, wordWrap: "break-word" }}>
  1762. {this.state.orderRemarks}
  1763. </p>
  1764. </FormItem>
  1765. </div>
  1766. <div className="clearfix">
  1767. <FormItem
  1768. labelCol={{ span: 5 }}
  1769. wrapperCol={{ span: 18 }}
  1770. label="收款节点"
  1771. >
  1772. {jsDate.map(item => {
  1773. return (
  1774. <p>
  1775. {getjiedian(item.dunSubject)} -- {item.money} 万元
  1776. </p>
  1777. );
  1778. })}
  1779. </FormItem>
  1780. </div>
  1781. <div className="clearfix">
  1782. <FormItem
  1783. className="half-item"
  1784. {...formItemLayout}
  1785. label="订单负责人"
  1786. >
  1787. <span>{theData.salesmanName}</span>
  1788. </FormItem>
  1789. <FormItem
  1790. className="half-item"
  1791. {...formItemLayout}
  1792. label="订单负责人电话"
  1793. >
  1794. <span>{theData.salesmanMobile}</span>
  1795. </FormItem>
  1796. <FormItem
  1797. className="half-item"
  1798. {...formItemLayout}
  1799. label="财务负责人"
  1800. >
  1801. <span>{theData.financeName}</span>
  1802. </FormItem>
  1803. <FormItem
  1804. className="half-item"
  1805. {...formItemLayout}
  1806. label="财务负责人电话"
  1807. >
  1808. <span>{theData.financeMobile}</span>
  1809. </FormItem>
  1810. </div>
  1811. <Modal
  1812. visible={this.state.avisible}
  1813. className="admin-desc-content"
  1814. width="800px"
  1815. maskClosable={false}
  1816. title="订单日志"
  1817. footer={null}
  1818. onCancel={this.closeOrderLog}
  1819. >
  1820. <div className="patent-table">
  1821. <Spin spinning={this.state.loading}>
  1822. <Table
  1823. columns={this.state.columnsY}
  1824. dataSource={this.state.dataSourceY}
  1825. pagination={false}
  1826. />
  1827. </Spin>
  1828. </div>
  1829. </Modal>
  1830. <div className="clearfix">
  1831. <p style={{ fontSize: 18, marginLeft: 20 }}>项目业务</p>
  1832. <div className="patent-table">
  1833. <Spin spinning={this.state.loading}>
  1834. <Table
  1835. columns={this.state.columnsX}
  1836. dataSource={this.state.dataSourceX}
  1837. pagination={false}
  1838. />
  1839. </Spin>
  1840. </div>
  1841. </div>
  1842. </Spin>
  1843. </Form>
  1844. </TabPane>
  1845. <TabPane tab="外包详情" key="2">
  1846. <div className="clearfix">
  1847. <p style={{ color: "red" }}>
  1848. 提示:查看备注请点击表格左侧加号按钮~
  1849. </p>
  1850. <div className="patent-table">
  1851. <Spin spinning={this.state.loading}>
  1852. <Table
  1853. columns={this.state.columnsW}
  1854. dataSource={this.state.dataSourceW}
  1855. pagination={false}
  1856. expandedRowRender={record => (
  1857. <p style={{ margin: 0 }}>{record.remarks}</p>
  1858. )}
  1859. scroll={{ x: 300, y: 0 }}
  1860. />
  1861. </Spin>
  1862. </div>
  1863. </div>
  1864. </TabPane>
  1865. <TabPane tab="外包审核" key="3">
  1866. <div className="clearfix">
  1867. <FormItem
  1868. className="half-item"
  1869. labelCol={{ span: 8 }}
  1870. wrapperCol={{ span: 14 }}
  1871. label="外包公司"
  1872. >
  1873. <span>{this.state.companyName}</span>
  1874. </FormItem>
  1875. </div>
  1876. <div className="clearfix">
  1877. <FormItem
  1878. className="half-item"
  1879. {...formItemLayout}
  1880. label="单价(万元)"
  1881. >
  1882. <span>{this.state.unitPrice}</span>
  1883. </FormItem>
  1884. </div>
  1885. <div className="clearfix">
  1886. <FormItem
  1887. className="half-item"
  1888. {...formItemLayout}
  1889. label="数量(万元)"
  1890. >
  1891. <span>{this.state.unitNumber}</span>
  1892. </FormItem>
  1893. </div>
  1894. <div className="clearfix">
  1895. <FormItem
  1896. className="half-item"
  1897. {...formItemLayout}
  1898. label="总金额(万元)"
  1899. >
  1900. <span>{this.state.amount}</span>
  1901. </FormItem>
  1902. </div>
  1903. <div className="clearfix">
  1904. <FormItem
  1905. className="half-item"
  1906. {...formItemLayout}
  1907. label="备注"
  1908. >
  1909. <span>{this.state.outsourceRemarks}</span>
  1910. </FormItem>
  1911. </div>
  1912. {/*<div className="clearfix">
  1913. <FormItem className="half-item"
  1914. labelCol={{ span: 8 }}
  1915. wrapperCol={{ span: 14 }}
  1916. label="上传协议文件" >
  1917. <Upload header={{authorization: 'authorization-text'}} action={globalConfig.context + "/api/admin/outsourceOrg/uploadOutsourceFile"}
  1918. data={(e)=>{
  1919. return {
  1920. 'sign': e.name.substring(0,e.name.lastIndexOf("."))
  1921. }
  1922. }}
  1923. fileList={this.state.attachmentUrl}
  1924. showUploadList={{showRemoveIcon:false}}
  1925. onPreview={(e)=>{
  1926. let url = window.location.href.substring(7)
  1927. window.location.href="http://"+url.substring(0,url.indexOf("/"))+"/api/admin/outsourceOrg//downloadFile?path="+e.response.data
  1928. }}>
  1929. </Upload>
  1930. </FormItem>
  1931. </div>*/}
  1932. <div className="clearfix">
  1933. <FormItem
  1934. labelCol={{ span: 4 }}
  1935. wrapperCol={{ span: 18 }}
  1936. label="合同/协议扫描件"
  1937. >
  1938. <Upload
  1939. className="demandDetailShow-upload"
  1940. listType="picture-card"
  1941. fileList={this.state.pictureUrl}
  1942. onPreview={file => {
  1943. this.setState({
  1944. previewImage: file.url || file.thumbUrl,
  1945. previewVisible: true
  1946. });
  1947. }}
  1948. ></Upload>
  1949. <Modal
  1950. maskClosable={false}
  1951. footer={null}
  1952. visible={this.state.previewVisible}
  1953. onCancel={() => {
  1954. this.setState({ previewVisible: false });
  1955. }}
  1956. >
  1957. <img
  1958. alt=""
  1959. style={{ width: "100%" }}
  1960. src={this.state.previewImage || ""}
  1961. />
  1962. </Modal>
  1963. </FormItem>
  1964. </div>
  1965. <div className="clearfix">
  1966. <hr className="division" />
  1967. <div className="clearfix">
  1968. <FormItem
  1969. className="half-item"
  1970. labelCol={{ span: 8 }}
  1971. wrapperCol={{ span: 14 }}
  1972. label="审核意见"
  1973. >
  1974. <span>{this.state.remarks}</span>
  1975. </FormItem>
  1976. </div>
  1977. <div className="clearfix">
  1978. <FormItem
  1979. className="half-item"
  1980. labelCol={{ span: 8 }}
  1981. wrapperCol={{ span: 14 }}
  1982. label="审核结果"
  1983. >
  1984. <span>{getRefundStatus(this.state.refundStatus)}</span>
  1985. </FormItem>
  1986. </div>
  1987. <div className="clearfix">
  1988. <FormItem
  1989. className="half-item"
  1990. labelCol={{ span: 8 }}
  1991. wrapperCol={{ span: 14 }}
  1992. label="审核时间"
  1993. >
  1994. <span>{this.state.auditTimes}</span>
  1995. </FormItem>
  1996. </div>
  1997. </div>
  1998. </TabPane>
  1999. </Tabs>
  2000. </Modal>
  2001. </div>
  2002. <div className="patent-desc">
  2003. <Modal
  2004. maskClosable={false}
  2005. title="驳回理由"
  2006. visible={this.state.boHuiVisible}
  2007. onCancel={this.boHuiCancel}
  2008. width="500px"
  2009. footer=""
  2010. className="admin-desc-content"
  2011. >
  2012. <TextArea
  2013. rows={4}
  2014. value={this.state.reason}
  2015. onChange={e => {
  2016. console.log(e.target.value);
  2017. this.setState({
  2018. reason: e.target.value
  2019. });
  2020. }}
  2021. />
  2022. <Button
  2023. type="primary"
  2024. style={{ marginTop: "20px" }}
  2025. onClick={this.boHuiCo}
  2026. >
  2027. 确定
  2028. </Button>
  2029. </Modal>
  2030. </div>
  2031. <Assign
  2032. title="任务"
  2033. selApi={"/api/admin/newOrder/updateFinance"}
  2034. data={this.state.assignDataY}
  2035. showDesc={this.state.assignVisibleY}
  2036. closeDesc={this.closeAssignY.bind(this)}
  2037. // fenpaiData={8}
  2038. specially={0}
  2039. roleName={this.state.nub}
  2040. requestMethod={"get"}
  2041. />
  2042. <Receivable
  2043. title="收款记录"
  2044. api="/api/admin/financial/addReceiptsFlow"
  2045. data={this.state.assignDataX}
  2046. showDesc={this.state.assignVisibleX}
  2047. closeDesc={this.closeAssignX.bind(this)}
  2048. />
  2049. <Modal
  2050. visible={this.state.bvisible}
  2051. footer=""
  2052. title="开票历史记录"
  2053. className="admin-desc-content"
  2054. width="900px"
  2055. onCancel={this.inRecordCanl}
  2056. >
  2057. <Spin spinning={this.state.loading}>
  2058. <div
  2059. className="patent-table"
  2060. ref={e => {
  2061. this.refs.kaiPiao = e;
  2062. }}
  2063. >
  2064. <Table
  2065. columns={this.state.columnsDate}
  2066. dataSource={this.state.recordData}
  2067. pagination={false}
  2068. bordered
  2069. />
  2070. <div className="clearfix" style={{ marginTop: "20px" }}>
  2071. <FormItem
  2072. className="half-item"
  2073. {...formItemLayout}
  2074. label={<span style={{ fontSize: "14px" }}>开票总计</span>}
  2075. >
  2076. <span>{this.state.sum + "(万元)"}</span>
  2077. </FormItem>
  2078. </div>
  2079. <ReactToPrint
  2080. trigger={() => (
  2081. <Button
  2082. type="primary"
  2083. style={{
  2084. float: "right",
  2085. // marginTop: 10,
  2086. position: "absolute",
  2087. top: -54,
  2088. right: 30
  2089. }}
  2090. >
  2091. 打印
  2092. </Button>
  2093. )}
  2094. content={() => this.refs.kaiPiao}
  2095. />
  2096. </div>
  2097. </Spin>
  2098. </Modal>
  2099. <Modal
  2100. visible={this.state.cvisible}
  2101. footer=""
  2102. title="详细收款流水"
  2103. className="admin-desc-content"
  2104. width="1300px"
  2105. onCancel={this.waterCanl}
  2106. >
  2107. <Spin spinning={this.state.loading}>
  2108. <div
  2109. className="patent-table"
  2110. ref={e => {
  2111. this.refs.shouKuan = e;
  2112. }}
  2113. >
  2114. <Table
  2115. columns={this.state.waterlistDate}
  2116. dataSource={this.state.waterData}
  2117. pagination={false}
  2118. bordered
  2119. />
  2120. <div className="clearfix" style={{ marginTop: "20px" }}>
  2121. <FormItem
  2122. className="half-item"
  2123. {...formItemLayout}
  2124. label={<span style={{ fontSize: "14px" }}>总计金额</span>}
  2125. >
  2126. <span>{this.state.waterSum + "(万元)"}</span>
  2127. </FormItem>
  2128. </div>
  2129. <ReactToPrint
  2130. trigger={() => (
  2131. <Button
  2132. type="primary"
  2133. style={{
  2134. float: "right",
  2135. position: "absolute",
  2136. top: -54,
  2137. right: 30
  2138. }}
  2139. >
  2140. 打印
  2141. </Button>
  2142. )}
  2143. content={() => this.refs.shouKuan}
  2144. />
  2145. </div>
  2146. </Spin>
  2147. </Modal>
  2148. <Modal
  2149. visible={this.state.dvisible}
  2150. footer=""
  2151. title="所有列表信息"
  2152. className="admin-desc-content"
  2153. width="1300px"
  2154. onCancel={() => {
  2155. this.state.pagination.pageSize = 10;
  2156. this.setState({
  2157. pagination: this.state.pagination
  2158. });
  2159. this.loadData();
  2160. this.setState({
  2161. dvisible: false
  2162. });
  2163. }}
  2164. >
  2165. <Spin spinning={this.state.loading}>
  2166. <div
  2167. className="patent-table"
  2168. style={{
  2169. // width: 900,
  2170. // position: "relative",
  2171. // left: "50%",
  2172. // transform: "translate(-50%)",
  2173. padding: "25px 0 30px 30px"
  2174. }}
  2175. ref={e => {
  2176. this.refs.all = e;
  2177. }}
  2178. >
  2179. <Table
  2180. columns={this.state.printColumns}
  2181. dataSource={this.state.dataSource}
  2182. pagination={this.state.pagination}
  2183. bordered
  2184. size="small"
  2185. />
  2186. </div>
  2187. </Spin>
  2188. <ReactToPrint
  2189. trigger={() => (
  2190. <Button
  2191. type="primary"
  2192. style={{
  2193. float: "right",
  2194. marginTop: 10,
  2195. position: "absolute",
  2196. top: 0,
  2197. right: 30
  2198. }}
  2199. >
  2200. 打印
  2201. </Button>
  2202. )}
  2203. content={() => this.refs.all}
  2204. />
  2205. </Modal>
  2206. </div>
  2207. );
  2208. }
  2209. });
  2210. export default approvedOutsourcing;