approvedOutsourcingAll.jsx 95 KB

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