approvedOutsourcingAll.jsx 95 KB

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