approvedOutsourcing.jsx 80 KB

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