approvedOutsourcingAll.jsx 95 KB

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