shouKuang.jsx 132 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419
  1. import React from "react";
  2. import $ from "jquery/src/ajax";
  3. import moment from "moment";
  4. import "./public.less";
  5. import "./shouKuan.less";
  6. import {
  7. AutoComplete,
  8. Button,
  9. Form,
  10. Input,
  11. Spin,
  12. Table,
  13. Select,
  14. message,
  15. DatePicker,
  16. Modal,
  17. Tabs,
  18. Col,
  19. Tag,
  20. Popconfirm,
  21. Tooltip,
  22. } from "antd";
  23. import OrderDesc from "../orderDetail/orderDesc";
  24. import ResolutionDetail from "@/resolutionDetail";
  25. import Receivable from "./receivable";
  26. import Assign from "@/manageCenter/publicComponent/assign";
  27. import KaiPiaoModal from "./kaiPiaoModal";
  28. import ReactToPrint from "react-to-print";
  29. import {
  30. getLiquidationStatus,
  31. getProcessStatus,
  32. getApproval,
  33. getInvoiceStatus,
  34. getTransactionProject,
  35. getTaskStatus,
  36. getNewOrderStatus,
  37. getProjectStatus,
  38. getjiedian,
  39. splitUrl,
  40. } from "@/tools";
  41. import { ChooseList } from "../../order/orderNew/chooseList"
  42. import Project from "../../../../component/project"
  43. import LogPopup from "../../../common/logPopup";
  44. import { throws } from "assert";
  45. import { getProjectName, getClockState } from "@/tools";
  46. import { clockState, salesList } from "@/dataDic";
  47. import OrderItemStatus from "../../../common/orderItemStatus";
  48. import Cascaders from "../../../common/cascaders";
  49. const FormItem = Form.Item;
  50. const { TabPane } = Tabs;
  51. const { TextArea } = Input;
  52. const ShouKuang = React.createClass({
  53. //获取上级组织
  54. selectSuperId() {
  55. $.ajax({
  56. method: "get",
  57. dataType: "json",
  58. crossDomain: false,
  59. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  60. data: {},
  61. success: function (data) {
  62. let theArr = [];
  63. if (data.error && data.error.length === 0) {
  64. for (let i = 0; i < data.data.length; i++) {
  65. let theData = data.data[i];
  66. theArr.push(
  67. <Select.Option value={theData.id} key={theData.id}>
  68. {theData.name}
  69. </Select.Option>
  70. );
  71. }
  72. this.setState({
  73. contactsOption: theArr,
  74. });
  75. } else {
  76. message.warning(data.error[0].message);
  77. }
  78. }.bind(this),
  79. }).always(
  80. function () {
  81. this.setState({
  82. loading: false,
  83. });
  84. }.bind(this)
  85. );
  86. },
  87. departmentList() {
  88. // this.setState({
  89. // loading: true
  90. // });
  91. $.ajax({
  92. method: "get",
  93. dataType: "json",
  94. crossDomain: false,
  95. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  96. data: {},
  97. success: function (data) {
  98. let thedata = data.data;
  99. let theArr = [];
  100. if (!thedata) {
  101. if (data.error && data.error.length) {
  102. message.warning(data.error[0].message);
  103. }
  104. } else {
  105. thedata.map(function (item, index) {
  106. theArr.push({
  107. key: index,
  108. name: item.name,
  109. id: item.id,
  110. });
  111. });
  112. }
  113. this.setState({
  114. departmentArr: theArr,
  115. });
  116. }.bind(this),
  117. }).always(
  118. function () {
  119. // this.setState({
  120. // loading: false
  121. // });
  122. }.bind(this)
  123. );
  124. },
  125. loadData(pageNo, pageSize) {
  126. this.state.data = [];
  127. this.state.pagination.pageSize = 10;
  128. this.setState({
  129. // selectedRowKeys: [],
  130. // selectedRowKey: [],
  131. page: pageNo || this.state.pageNo,
  132. loadingA: true,
  133. pagination: this.state.pagination,
  134. });
  135. $.ajax({
  136. method: "get",
  137. dataType: "json",
  138. crossDomain: false,
  139. url: globalConfig.context + "/api/admin/financial/financeList",
  140. data: {
  141. pageNo: pageNo || 1,
  142. pageSize: pageSize || this.state.pagination.pageSize,
  143. buyerName: this.state.nameSearch, //客户名称
  144. orderNo: this.state.orderNoSearch,
  145. startTime: this.state.releaseDate[0],
  146. endTime: this.state.releaseDate[1],
  147. startFinalReceivablesTime: this.state.shouKuanDate[0],
  148. endFinalReceivablesTime: this.state.shouKuanDate[1],
  149. deps: this.state.departmenttList,
  150. processStatus: this.state.processStatusSearch,
  151. contractNo: this.state.contractNoSearch,
  152. liquidationStatus: this.state.liquidationStatus,
  153. amountStatus: this.state.amountStatus,
  154. approval: this.state.approval,
  155. projectType: this.state.projectType,
  156. myExamine: this.state.myExamine,
  157. },
  158. success: function (data) {
  159. let theArr = [];
  160. if (!data.data || !data.data.pagination.list) {
  161. if (data.error && data.error.length) {
  162. message.warning(data.error[0].message);
  163. }
  164. } else {
  165. for (let i = 0; i < data.data.pagination.list.length; i++) {
  166. let thisdata = data.data.pagination.list[i];
  167. thisdata.key = thisdata.orderNo;
  168. theArr.push(thisdata);
  169. }
  170. }
  171. this.state.pagination.current = data.data.pagination.pageNo;
  172. this.state.pagination.total = data.data.pagination.totalCount;
  173. if (
  174. data.data &&
  175. data.data.pagination.list &&
  176. !data.data.pagination.list.length
  177. ) {
  178. this.state.pagination.current = 0;
  179. this.state.pagination.total = 0;
  180. }
  181. this.setState({
  182. totalPage: data.data.pagination.totalPage,
  183. dataSource: theArr,
  184. pagination: this.state.pagination,
  185. totalHui: data.data.count ? data.data.count.signTotalAmount : 0,
  186. hui: data.data.count ? data.data.count.actuallyTotalAmount : 0,
  187. });
  188. }.bind(this),
  189. }).always(
  190. function () {
  191. // window.setTimeout(() => {
  192. this.setState({
  193. loadingA: false,
  194. });
  195. // },5000)
  196. }.bind(this)
  197. );
  198. },
  199. getInitialState() {
  200. return {
  201. cuiTabKey: "1",
  202. pubVisible: false,
  203. pubDataList: [],
  204. pubpageNo: 1,
  205. pubpagination: {
  206. defaultCurrent: 1,
  207. defaultPageSize: 10,
  208. showQuickJumper: true,
  209. pageSize: 10,
  210. onChange: function (page) {
  211. this.loadData(page);
  212. }.bind(this),
  213. showTotal: function (total) {
  214. return "共" + total + "条数据";
  215. },
  216. },
  217. searchMore: true,
  218. dvisible: false,
  219. pageNo: 1,
  220. assignVisibleX: false,
  221. assignVisibleY: false,
  222. releaseDate: [],
  223. shouKuanDate: [],
  224. assignDataX: [],
  225. assignDataY: [],
  226. totalPage: 0,
  227. processStatusSearch: [],//默认搜索无流程状态
  228. boHuivisible: false,
  229. selectedRowKeys: [],
  230. selectedRows: [],
  231. loading: false,
  232. loadingA: false,
  233. pagination: {
  234. defaultCurrent: 1,
  235. defaultPageSize: 10,
  236. showQuickJumper: true,
  237. pageSize: 10,
  238. onChange: function (page) {
  239. // console.log(page);
  240. this.setState({
  241. pageNo: page,
  242. });
  243. this.loadData(page);
  244. }.bind(this),
  245. showTotal: function (total) {
  246. return "共" + total + "条数据";
  247. },
  248. },
  249. // 子组件改变的表格title数组
  250. changeList: undefined,
  251. pubColumns: [
  252. {
  253. title: "编号",
  254. dataIndex: "key",
  255. key: "key",
  256. width: 45,
  257. },
  258. {
  259. title: "公出类型",
  260. dataIndex: "type",
  261. key: "type",
  262. width: 70,
  263. render: (text) =>
  264. <span
  265. style={{ color: ["#1D4FEA", "#1E90FF", "#FF5500", "red"][text] }}
  266. >
  267. {
  268. text === 0
  269. ? "业务公出" : text === 1
  270. ? "技术公出" : text === 2
  271. ? "行政公出" : text === 3
  272. ? "技术协单" : ""
  273. }
  274. </span>
  275. },
  276. {
  277. title: "客户名称",
  278. dataIndex: "nickname",
  279. key: "nickname",
  280. width: 80,
  281. render: (text) => {
  282. return (
  283. <div
  284. style={{
  285. width: 80,
  286. wordBreak: "break-all",
  287. }}
  288. >
  289. {text}
  290. </div>
  291. );
  292. },
  293. },
  294. {
  295. title: "跟单人",
  296. dataIndex: "sname",
  297. key: "sname",
  298. width: 70,
  299. render: (text) => {
  300. return (
  301. <Tooltip title={text}>
  302. <div
  303. style={{
  304. width: 90,
  305. overflow: "hidden",
  306. textOverflow: "ellipsis",
  307. whiteSpace: "nowrap",
  308. }}
  309. >
  310. {text}
  311. </div>
  312. </Tooltip>
  313. );
  314. },
  315. },
  316. {
  317. title: "公出人",
  318. dataIndex: "aname",
  319. key: "aname",
  320. width: 70,
  321. render: (text) => {
  322. return (
  323. <Tooltip title={text}>
  324. <div
  325. style={{
  326. width: 90,
  327. overflow: "hidden",
  328. textOverflow: "ellipsis",
  329. whiteSpace: "nowrap",
  330. }}
  331. >
  332. {text}
  333. </div>
  334. </Tooltip>
  335. );
  336. },
  337. },
  338. // {
  339. // title: "申请时间",
  340. // dataIndex: "createTimes",
  341. // key: "createTimes",
  342. // width: 130,
  343. // },
  344. {
  345. title: "公出时间",
  346. dataIndex: "releaseStarts",
  347. key: "releaseStarts",
  348. width: 130,
  349. render: (text, record) => (
  350. <div>
  351. <div>{text}</div>
  352. <div style={{ paddingLeft: "44px" }}>至</div>
  353. <div>{record.releaseEnds}</div>
  354. </div>
  355. ),
  356. },
  357. {
  358. title: "公出地点",
  359. dataIndex: "userName",
  360. key: "userName",
  361. width: 120,
  362. render: (text) => {
  363. return (
  364. <div>{text}</div>
  365. );
  366. },
  367. },
  368. {
  369. title: "打卡时间",
  370. dataIndex: "clockInTimes",
  371. key: "clockInTimes",
  372. width: 75,
  373. },
  374. {
  375. title: "时长(时)",
  376. dataIndex: "duration",
  377. key: "duration",
  378. width: 50,
  379. },
  380. {
  381. title: "打卡状态",
  382. dataIndex: "clockIn",
  383. key: "clockIn",
  384. width: 65,
  385. render: (text) => (
  386. <span
  387. style={{ color: ["#F21212", "#34DE38"][text] }}
  388. >
  389. {["未打卡", "已打卡"][text]}
  390. </span>
  391. )
  392. },
  393. {
  394. title: "审核状态",
  395. dataIndex: "status",
  396. key: "status",
  397. width: 110,
  398. render: (text, record) => (
  399. <div style={{ display: "flex", flexDirection: "row", flexWrap: "warp" }}>
  400. <Tag color={getClockState(text).color}>
  401. {getClockState(text).title}
  402. </Tag>
  403. {record.updateStatus == 1 && <Tag color="#1E90FF">改</Tag>}
  404. </div>
  405. ),
  406. },
  407. {
  408. title: "审核/指导",
  409. dataIndex: "auditInfo",
  410. key: "auditInfo",
  411. width: 160,
  412. render: (text) => {
  413. return <div style={{ wordBreak: "break-all" }}>{text}</div>;
  414. },
  415. },
  416. ],
  417. proColumns: [
  418. {
  419. title: "序号",
  420. dataIndex: "key",
  421. key: "key",
  422. },
  423. {
  424. title: "合同编号",
  425. dataIndex: "contractNo",
  426. key: "contractNo",
  427. },
  428. {
  429. title: "订单编号",
  430. dataIndex: "orderNo",
  431. key: "orderNo",
  432. },
  433. // {
  434. // title: "项目编号",
  435. // dataIndex: "id",
  436. // key: "id"
  437. // },
  438. {
  439. title: "客户名称",
  440. dataIndex: "userName",
  441. key: "userName",
  442. render: text => {
  443. return (
  444. <Tooltip title={text}>
  445. <div
  446. // style={{
  447. // maxWidth: '150px',
  448. // overflow: 'hidden',
  449. // textOverflow: "ellipsis",
  450. // whiteSpace: 'nowrap',
  451. // }}
  452. >{text}</div>
  453. </Tooltip>
  454. )
  455. }
  456. },
  457. {
  458. title: "订单负责人",
  459. dataIndex: "salesmanName",
  460. key: "salesmanName",
  461. },
  462. {
  463. title: "是否主项目",
  464. dataIndex: "main",
  465. key: "main",
  466. render: (text) => {
  467. return text == 0 ? "否" : "是";
  468. },
  469. },
  470. {
  471. title: "项目类别",
  472. dataIndex: "cname",
  473. key: "cname",
  474. },
  475. {
  476. title: "项目名称",
  477. dataIndex: "commodityName",
  478. key: "commodityName",
  479. },
  480. {
  481. title: "项目数量",
  482. dataIndex: "commodityQuantity",
  483. key: "commodityQuantity",
  484. render: (text, record) => {
  485. if (record.splitStatus == 1) {
  486. return (
  487. <span>
  488. {text}{" "}
  489. <Tag
  490. color="#108ee9"
  491. onClick={(e) => {
  492. e.stopPropagation();
  493. this.showRes(record);
  494. }}
  495. >
  496. 已拆
  497. </Tag>
  498. </span>
  499. );
  500. } else {
  501. return text;
  502. }
  503. },
  504. },
  505. {
  506. title: "服务市价",
  507. dataIndex: "commodityPrice",
  508. key: "commodityPrice",
  509. },
  510. {
  511. title: "证书编号",
  512. dataIndex: "certificateNumber",
  513. key: "certificateNumber",
  514. },
  515. {
  516. title: "项目状态",
  517. dataIndex: "projectStatus",
  518. key: "projectStatus",
  519. render: (text) => {
  520. return getProjectName(text);
  521. },
  522. },
  523. {
  524. title: "项目说明",
  525. dataIndex: "taskComment",
  526. key: "taskComment",
  527. },
  528. {
  529. title: "是否外包",
  530. dataIndex: "outsource",
  531. key: "outsource",
  532. render: (text) => {
  533. if (text == 0) {
  534. return "否";
  535. } else if (text == 1) {
  536. return "是";
  537. }
  538. },
  539. },
  540. // {
  541. // title: "外包(内部)公司",
  542. // dataIndex: "outsourceName",
  543. // key: "outsourceName",
  544. // },
  545. // {
  546. // title: "外包(内部)价格",
  547. // dataIndex: "outsourcePrice",
  548. // key: "outsourcePrice",
  549. // },
  550. ],
  551. qianColumns: [
  552. {
  553. title: "序号",
  554. dataIndex: "key",
  555. key: "key",
  556. },
  557. {
  558. title: "合同编号",
  559. dataIndex: "contractNo",
  560. key: "contractNo",
  561. },
  562. {
  563. title: "订单编号",
  564. dataIndex: "orderNo",
  565. key: "orderNo",
  566. },
  567. {
  568. title: "客户名称",
  569. dataIndex: "userName",
  570. key: "userName",
  571. render: text => {
  572. return (
  573. <Tooltip title={text}>
  574. <div
  575. // style={{
  576. // maxWidth: '150px',
  577. // overflow: 'hidden',
  578. // textOverflow: "ellipsis",
  579. // whiteSpace: 'nowrap',
  580. // }}
  581. >{text}</div>
  582. </Tooltip>
  583. )
  584. }
  585. },
  586. {
  587. title: "订单负责人",
  588. dataIndex: "salesmanName",
  589. key: "salesmanName",
  590. },
  591. {
  592. title: "订单部门",
  593. dataIndex: "depName",
  594. key: "depName",
  595. },
  596. {
  597. title: "订单状态",
  598. dataIndex: "orderStatus",
  599. key: "orderStatus",
  600. render: (text) => {
  601. return getNewOrderStatus(text);
  602. },
  603. },
  604. {
  605. title: "项目状态",
  606. dataIndex: "projectStatus",
  607. key: "projectStatus",
  608. render: (text) => {
  609. return getProjectName(text);
  610. },
  611. },
  612. {
  613. title: "签单金额",
  614. dataIndex: "totalAmount",
  615. key: "totalAmount",
  616. },
  617. {
  618. title: "结算状态",
  619. dataIndex: "liquidationStatus",
  620. key: "liquidationStatus",
  621. render: (text) => {
  622. return getLiquidationStatus(text);
  623. },
  624. },
  625. {
  626. title: "已收款",
  627. dataIndex: "settlementAmount",
  628. key: "settlementAmount",
  629. },
  630. {
  631. title: "欠款",
  632. dataIndex: "orderArrears",
  633. key: "orderArrears",
  634. },
  635. {
  636. title: "催收科目",
  637. dataIndex: "type",
  638. key: "type",
  639. render: (text) => {
  640. return "按时触发应收欠款";
  641. },
  642. },
  643. {
  644. title: "催款状态",
  645. dataIndex: "dunStatus",
  646. key: "dunStatus",
  647. render: (text) => {
  648. if (text == 0) {
  649. return "未启动";
  650. } else if (text == 1) {
  651. return "催款中";
  652. } else if (text == 2) {
  653. return "已完成";
  654. } else if (text == 3) {
  655. return "已停止";
  656. }
  657. },
  658. },
  659. {
  660. title: "催收启动时间",
  661. dataIndex: "startDate",
  662. key: "startDate",
  663. },
  664. ],
  665. cuiColumns: [
  666. {
  667. title: "序号",
  668. dataIndex: "key",
  669. key: "key",
  670. },
  671. {
  672. title: "合同编号",
  673. dataIndex: "contractNo",
  674. key: "contractNo",
  675. },
  676. {
  677. title: "订单编号",
  678. dataIndex: "orderNo",
  679. key: "orderNo",
  680. },
  681. {
  682. title: "客户名称",
  683. dataIndex: "userName",
  684. key: "userName",
  685. render: text => {
  686. return (
  687. <Tooltip title={text}>
  688. <div
  689. // style={{
  690. // maxWidth: '150px',
  691. // overflow: 'hidden',
  692. // textOverflow: "ellipsis",
  693. // whiteSpace: 'nowrap',
  694. // }}
  695. >{text}</div>
  696. </Tooltip>
  697. )
  698. }
  699. },
  700. {
  701. title: "订单负责人",
  702. dataIndex: "salesmanName",
  703. key: "salesmanName",
  704. },
  705. {
  706. title: "订单部门",
  707. dataIndex: "depName",
  708. key: "depName",
  709. },
  710. {
  711. title: "订单状态",
  712. dataIndex: "orderStatus",
  713. key: "orderStatus",
  714. render: (text) => {
  715. return getNewOrderStatus(text);
  716. },
  717. },
  718. {
  719. title: "项目状态",
  720. dataIndex: "projectStatus",
  721. key: "projectStatus",
  722. render: (text) => {
  723. return getProjectName(text);
  724. },
  725. },
  726. {
  727. title: "签单金额",
  728. dataIndex: "totalAmount",
  729. key: "totalAmount",
  730. },
  731. {
  732. title: "结算状态",
  733. dataIndex: "liquidationStatus",
  734. key: "liquidationStatus",
  735. render: (text) => {
  736. return getLiquidationStatus(text);
  737. },
  738. },
  739. {
  740. title: "已收款",
  741. dataIndex: "settlementAmount",
  742. key: "settlementAmount",
  743. },
  744. {
  745. title: "应收款",
  746. dataIndex: "accountsReceivable",
  747. key: "accountsReceivable",
  748. },
  749. {
  750. title: "催收科目",
  751. dataIndex: "dunSubject",
  752. key: "dunSubject",
  753. // render: text => {
  754. // return getjiedian(text);
  755. // }
  756. },
  757. {
  758. title: "催款状态",
  759. dataIndex: "dunStatus",
  760. key: "dunStatus",
  761. },
  762. {
  763. title: "催收启动时间",
  764. dataIndex: "startDate",
  765. key: "startDate",
  766. },
  767. ],
  768. timeColumns: [
  769. {
  770. title: "合同编号",
  771. dataIndex: "contractNo",
  772. key: "contractNo",
  773. },
  774. {
  775. title: "订单编号",
  776. dataIndex: "orderNo",
  777. key: "orderNo",
  778. },
  779. {
  780. title: "项目编号",
  781. dataIndex: "id",
  782. key: "id",
  783. render: (text, record) => {
  784. if (record.splitStatus == 2) {
  785. return <span>{record.splitSuper + "-" + record.splitId}</span>;
  786. } else {
  787. return text;
  788. }
  789. },
  790. },
  791. {
  792. title: "客户名称",
  793. dataIndex: "userName",
  794. key: "userName",
  795. render: text => {
  796. return (
  797. <Tooltip title={text}>
  798. <div
  799. // style={{
  800. // maxWidth: '150px',
  801. // overflow: 'hidden',
  802. // textOverflow: "ellipsis",
  803. // whiteSpace: 'nowrap',
  804. // }}
  805. >{text}</div>
  806. </Tooltip>
  807. )
  808. }
  809. },
  810. {
  811. title: "订单部门",
  812. dataIndex: "depName",
  813. key: "depName",
  814. },
  815. {
  816. title: "订单负责人",
  817. dataIndex: "salesmanName",
  818. key: "salesmanName",
  819. },
  820. {
  821. title: "项目类别",
  822. dataIndex: "cname",
  823. key: "cname",
  824. },
  825. {
  826. title: "项目名称",
  827. dataIndex: "taskName",
  828. key: "taskName",
  829. },
  830. {
  831. title: "项目负责人",
  832. dataIndex: "receiverName",
  833. key: "receiverName",
  834. },
  835. {
  836. title: "项目价格(万元)",
  837. dataIndex: "commodityPrice",
  838. key: "commodityPrice",
  839. },
  840. {
  841. title: "数量(个)",
  842. dataIndex: "commodityQuantity",
  843. key: "commodityQuantity",
  844. },
  845. {
  846. title: "任务状态",
  847. dataIndex: "taskStatus",
  848. key: "taskStatus",
  849. render: (text) => {
  850. return getTaskStatus(text);
  851. },
  852. },
  853. {
  854. title: "项目状态",
  855. dataIndex: "projectStatus",
  856. key: "projectStatus",
  857. render: (text) => {
  858. return getProjectName(text);
  859. },
  860. },
  861. {
  862. title: "工时",
  863. dataIndex: "hours",
  864. key: "hours",
  865. },
  866. {
  867. title: "是否外包",
  868. dataIndex: "outsource",
  869. key: "outsource",
  870. render: (text) => {
  871. if (text == 0) {
  872. return "否";
  873. } else if (text == 1) {
  874. return "是";
  875. }
  876. },
  877. },
  878. {
  879. title: "签单日期",
  880. dataIndex: "signTime",
  881. key: "signTime",
  882. },
  883. {
  884. title: "派单日期",
  885. dataIndex: "creteTime",
  886. key: "creteTime",
  887. },
  888. {
  889. title: "分配时间",
  890. dataIndex: "taskDistributionTime",
  891. key: "taskDistributionTime",
  892. },
  893. {
  894. title: "完成时间",
  895. dataIndex: "taskEndTime",
  896. key: "taskEndTime",
  897. },
  898. ],
  899. printColumns: [
  900. {
  901. title: "合同编号",
  902. dataIndex: "contractNo",
  903. key: "contractNo",
  904. },
  905. {
  906. title: "订单编号",
  907. dataIndex: "orderNo",
  908. key: "orderNo",
  909. // fixed: "left"
  910. },
  911. {
  912. title: "客户名称",
  913. dataIndex: "buyerName",
  914. key: "buyerName",
  915. render: text => {
  916. return (
  917. <Tooltip title={text}>
  918. <div
  919. // style={{
  920. // maxWidth: '150px',
  921. // overflow: 'hidden',
  922. // textOverflow: "ellipsis",
  923. // whiteSpace: 'nowrap',
  924. // }}
  925. >{text}</div>
  926. </Tooltip>
  927. )
  928. }
  929. },
  930. {
  931. title: "订单部门",
  932. dataIndex: "departmentName",
  933. key: "departmentName",
  934. },
  935. {
  936. title: "订单负责人",
  937. dataIndex: "sellerName",
  938. key: "sellerName",
  939. },
  940. {
  941. title: "签单日期",
  942. dataIndex: "signTime",
  943. key: "signTime",
  944. },
  945. {
  946. title: "下单日期",
  947. dataIndex: "createTime",
  948. key: "createTime",
  949. },
  950. {
  951. title: "签单金额(万元)",
  952. dataIndex: "signTotalAmount",
  953. key: "signTotalAmount",
  954. render: (text) => {
  955. return isNaN(parseFloat(text)) ? text : parseFloat(text);
  956. },
  957. },
  958. {
  959. title: "开票金额(万元)",
  960. dataIndex: "invoiceAmount",
  961. key: "invoiceAmount",
  962. render: (text) => {
  963. return isNaN(parseFloat(text)) ? text : parseFloat(text);
  964. },
  965. },
  966. {
  967. title: "已收款(万元)",
  968. dataIndex: "actuallyTotalAmount",
  969. key: "actuallyTotalAmount",
  970. render: (text) => {
  971. return isNaN(parseFloat(text)) ? text : parseFloat(text);
  972. },
  973. },
  974. {
  975. title: "总成本(万元)",
  976. dataIndex: "costAmount",
  977. key: "costAmount",
  978. render: (text) => {
  979. return isNaN(parseFloat(text)) ? text : parseFloat(text);
  980. }
  981. },
  982. {
  983. title: "已付成本(万元)",
  984. dataIndex: "paymentAmount",
  985. key: "paymentAmount",
  986. render: (text) => {
  987. return isNaN(parseFloat(text)) ? text : parseFloat(text);
  988. },
  989. },
  990. {
  991. title: "最近收款(万元)",
  992. dataIndex: "finalReceivables",
  993. key: "finalReceivables",
  994. render: (text) => {
  995. return isNaN(parseFloat(text)) ? text : parseFloat(text);
  996. },
  997. },
  998. {
  999. title: "最近收款时间",
  1000. dataIndex: "finalReceivablesTime",
  1001. key: "finalReceivablesTime",
  1002. },
  1003. {
  1004. title: "结算状态",
  1005. dataIndex: "liquidationStatus",
  1006. key: "liquidationStatus",
  1007. render: (text) => {
  1008. return getLiquidationStatus(text);
  1009. },
  1010. },
  1011. {
  1012. title: "流程状态",
  1013. dataIndex: "processStatus",
  1014. key: "processStatus",
  1015. render: (text, record) => {
  1016. return getProcessStatus(text, record.examineName, record.approval);
  1017. },
  1018. },
  1019. {
  1020. title: "特批状态",
  1021. dataIndex: "approval",
  1022. key: "approval",
  1023. render: (text) => {
  1024. return getApproval(text);
  1025. },
  1026. },
  1027. ],
  1028. columns: [
  1029. {
  1030. title: "销售类型",
  1031. dataIndex: "salesType",
  1032. key: "salesType",
  1033. className: "title-table",
  1034. fixed: "left",
  1035. render: (text, record) => {
  1036. return (
  1037. <Tooltip
  1038. title={salesList[text] + ((text == 3 || text == 4 || text == 5) ? (!record.other ? "" : "," + record.other) : "")}
  1039. >
  1040. <span>
  1041. {salesList[text]}
  1042. </span>
  1043. </Tooltip>
  1044. );
  1045. },
  1046. },
  1047. {
  1048. title: "合同编号",
  1049. dataIndex: "contractNo",
  1050. key: "contractNo",
  1051. className: "title-table",
  1052. fixed: "left",
  1053. render: (text, record) => {
  1054. return (
  1055. <Tooltip
  1056. title={
  1057. <Button
  1058. type="primary"
  1059. onClick={(e) => {
  1060. e.stopPropagation();
  1061. let input = document.getElementById("copyText");
  1062. input.value = text;
  1063. input.select();
  1064. document.execCommand("copy");
  1065. message.success("复制成功");
  1066. }}
  1067. >
  1068. 复制
  1069. </Button>
  1070. }
  1071. >
  1072. <div>
  1073. {text}
  1074. <div style={{ display: "flex" }}>
  1075. <OrderItemStatus deleteSign={record.deleteSign} />
  1076. {
  1077. record.approval == 1
  1078. ? <Tag color="#faa755">特批待审</Tag> : record.approval == 2
  1079. ? <Tag color="#ff0000">特批通过</Tag> : record.approval == 4
  1080. ? <Tag color="#faa755">特批待审</Tag> : record.approval == 5
  1081. ? <Tag color="#ff0000">特批通过</Tag> : ""
  1082. }
  1083. </div>
  1084. </div>
  1085. </Tooltip>
  1086. );
  1087. },
  1088. },
  1089. {
  1090. title: "客户名称",
  1091. dataIndex: "buyerName",
  1092. key: "buyerName",
  1093. className: "title-table",
  1094. fixed: "left",
  1095. width: 150,
  1096. render: text => {
  1097. return (
  1098. <Tooltip title={text}>
  1099. <div
  1100. // style={{
  1101. // maxWidth: '150px',
  1102. // overflow: 'hidden',
  1103. // textOverflow: "ellipsis",
  1104. // whiteSpace: 'nowrap',
  1105. // }}
  1106. >{text}</div>
  1107. </Tooltip>
  1108. )
  1109. }
  1110. },
  1111. {
  1112. title: "订单编号",
  1113. dataIndex: "orderNo",
  1114. key: "orderNo",
  1115. className: "title-table",
  1116. fixed: "left",
  1117. width: 150,
  1118. render: (text, record) => {
  1119. return (
  1120. <Tooltip
  1121. title={
  1122. <Button
  1123. type="primary"
  1124. onClick={(e) => {
  1125. e.stopPropagation();
  1126. let input = document.getElementById("copyText");
  1127. input.value = text;
  1128. input.select();
  1129. document.execCommand("copy");
  1130. message.success("复制成功");
  1131. }}
  1132. >
  1133. 复制
  1134. </Button>
  1135. }
  1136. >
  1137. <div>
  1138. {text}
  1139. <div>
  1140. {record.signTotalAmount >= 10 && <Tag color="#ef7207">大客户</Tag>}
  1141. {record.projectType == 1 && <Tag color="rgb(22, 155, 213)">会员</Tag>}
  1142. </div>
  1143. </div>
  1144. </Tooltip>
  1145. );
  1146. },
  1147. },
  1148. // {
  1149. // title: "特批状态",
  1150. // dataIndex: "approval",
  1151. // key: "approval",
  1152. // className: "title-table",
  1153. // render: (text) => {
  1154. // if (text == 1 || text == 2) {
  1155. // return <Tag color="#f50">{getApproval(text)}</Tag>;
  1156. // }
  1157. // return getApproval(text);
  1158. // },
  1159. // },
  1160. {
  1161. title: "订单部门",
  1162. dataIndex: "departmentName",
  1163. key: "departmentName",
  1164. className: "title-table",
  1165. },
  1166. {
  1167. title: "订单负责人",
  1168. dataIndex: "sellerName",
  1169. key: "sellerName",
  1170. className: "title-table",
  1171. },
  1172. {
  1173. title: "订单类型",
  1174. dataIndex: "serviceType",
  1175. key: "serviceType",
  1176. className: "title-table",
  1177. width: 150,
  1178. render: (text) => {
  1179. return !!text && text.replace(/[,,]/g, "+");
  1180. }
  1181. },
  1182. {
  1183. title: "订单内容",
  1184. dataIndex: "serviceProject",
  1185. key: "serviceProject",
  1186. className: "title-table",
  1187. render: (text) => {
  1188. return (<div dangerouslySetInnerHTML={{ __html: !!text && text.replace(/[,,]/g, "<br/>") }} />);
  1189. // return (<pre>{!!text && text.replace(/[,,]/g, "\n")}</pre>);
  1190. }
  1191. },
  1192. {
  1193. title: "财务负责人",
  1194. dataIndex: "financeName",
  1195. key: "financeName",
  1196. className: "title-table",
  1197. },
  1198. {
  1199. title: "签单日期",
  1200. dataIndex: "signTime",
  1201. key: "signTime",
  1202. className: "title-table",
  1203. },
  1204. {
  1205. title: "下单日期",
  1206. dataIndex: "createTime",
  1207. key: "createTime",
  1208. className: "title-table",
  1209. },
  1210. {
  1211. title: "签单金额(万元)",
  1212. dataIndex: "signTotalAmount",
  1213. key: "signTotalAmount",
  1214. className: "title-table",
  1215. render: (text) => {
  1216. return isNaN(parseFloat(text)) ? text : parseFloat(text);
  1217. }
  1218. },
  1219. {
  1220. title: "开票金额(万元)",
  1221. dataIndex: "invoiceAmount",
  1222. key: "invoiceAmount",
  1223. className: "title-table",
  1224. render: (text) => {
  1225. return isNaN(parseFloat(text)) ? text : parseFloat(text);
  1226. }
  1227. },
  1228. {
  1229. title: "已收款(万元)",
  1230. dataIndex: "actuallyTotalAmount",
  1231. key: "actuallyTotalAmount",
  1232. className: "title-table",
  1233. render: (text) => {
  1234. return isNaN(parseFloat(text)) ? text : parseFloat(text);
  1235. }
  1236. },
  1237. {
  1238. title: "应收款(万元)",
  1239. dataIndex: "orderReceivables",
  1240. key: "orderReceivables",
  1241. className: "title-table",
  1242. render: (text) => {
  1243. return isNaN(parseFloat(text)) ? text : parseFloat(text);
  1244. }
  1245. },
  1246. {
  1247. title: "欠款(万元)",
  1248. dataIndex: "orderArrears",
  1249. key: "orderArrears",
  1250. className: "title-table",
  1251. render: (text) => {
  1252. return isNaN(parseFloat(text)) ? text : parseFloat(text);
  1253. }
  1254. },
  1255. {
  1256. title: "总成本/实付",
  1257. dataIndex: "costAmount",
  1258. key: "costAmount",
  1259. className: "title-table",
  1260. render: (text, record) => {
  1261. return (
  1262. <span>
  1263. {isNaN(parseFloat(text)) ? text : parseFloat(text)}/
  1264. {isNaN(parseFloat(record.paymentAmount)) ? text : parseFloat(record.paymentAmount)}
  1265. </span>
  1266. )
  1267. },
  1268. },
  1269. {
  1270. title: "专利/专利已付",
  1271. dataIndex: "patentCost",
  1272. key: "patentCost",
  1273. className: "title-table",
  1274. render: (text, record) => {
  1275. return (
  1276. <span>
  1277. {isNaN(parseFloat(text)) ? text : parseFloat(text)}/
  1278. {isNaN(parseFloat(record.patentCostActual)) ? text : parseFloat(record.patentCostActual)}
  1279. </span>
  1280. )
  1281. },
  1282. },
  1283. {
  1284. title: "软著/软著已付",
  1285. dataIndex: "softCost",
  1286. key: "softCost",
  1287. className: "title-table",
  1288. render: (text, record) => {
  1289. return (
  1290. <span>
  1291. {isNaN(parseFloat(text)) ? text : parseFloat(text)}/
  1292. {isNaN(parseFloat(record.softCostActual)) ? text : parseFloat(record.softCostActual)}
  1293. </span>
  1294. )
  1295. },
  1296. },
  1297. {
  1298. title: "审计/审计已付",
  1299. dataIndex: "auditCost",
  1300. key: "auditCost",
  1301. className: "title-table",
  1302. render: (text, record) => {
  1303. return (
  1304. <span>
  1305. {isNaN(parseFloat(text)) ? text : parseFloat(text)}/
  1306. {isNaN(parseFloat(record.auditCostActual)) ? text : parseFloat(record.auditCostActual)}
  1307. </span>
  1308. )
  1309. },
  1310. },
  1311. {
  1312. title: "其他/其他已付",
  1313. dataIndex: "otherCost",
  1314. key: "otherCost",
  1315. className: "title-table",
  1316. render: (text, record) => {
  1317. return (
  1318. <span>
  1319. {isNaN(parseFloat(text)) ? text : parseFloat(text)}/
  1320. {isNaN(parseFloat(record.otherCostActual)) ? text : parseFloat(record.otherCostActual)}
  1321. </span>
  1322. )
  1323. },
  1324. },
  1325. {
  1326. title: "预估毛利(万元)",
  1327. dataIndex: "expectProfit",
  1328. key: "expectProfit",
  1329. className: "title-table",
  1330. },
  1331. {
  1332. title: "实际毛利(万元)",
  1333. dataIndex: "actualProfit",
  1334. key: "actualProfit",
  1335. className: "title-table",
  1336. },
  1337. {
  1338. title: "最近收款(万元)",
  1339. dataIndex: "finalReceivables",
  1340. key: "finalReceivables",
  1341. className: "title-table",
  1342. render: (text) => {
  1343. return isNaN(parseFloat(text)) ? text : parseFloat(text);
  1344. }
  1345. },
  1346. {
  1347. title: "最近收款时间",
  1348. dataIndex: "finalReceivablesTime",
  1349. key: "finalReceivablesTime",
  1350. className: "title-table",
  1351. },
  1352. {
  1353. title: "结算状态",
  1354. dataIndex: "liquidationStatus",
  1355. key: "liquidationStatus",
  1356. className: "title-table",
  1357. render: (text) => {
  1358. return getLiquidationStatus(text);
  1359. },
  1360. },
  1361. {
  1362. title: "流程状态",
  1363. dataIndex: "processStatus",
  1364. key: "processStatus",
  1365. className: "title-table",
  1366. render: (text, record) => {
  1367. return getProcessStatus(text, record.examineName, record.approval);
  1368. },
  1369. },
  1370. // {
  1371. // title: '订单状态',
  1372. // dataIndex: 'orderStatus',
  1373. // key: 'orderStatus',
  1374. // render: text => { return getNewOrderStatus(text)}
  1375. // },
  1376. {
  1377. title: "操作",
  1378. dataIndex: "caozuo",
  1379. key: "caouzo",
  1380. className: "title-table",
  1381. fixed: "right",
  1382. render: (text, recard) => {
  1383. return (
  1384. <div>
  1385. {/* {recard.backStatus == 3 ? <Tag>已驳回</Tag> : ""} */}
  1386. {recard.processStatus == 3 && recard.myExamine == 0 &&
  1387. <Button
  1388. type="primary"
  1389. onClick={(e) => {
  1390. e.stopPropagation(), this.checkRemark(recard);
  1391. }}
  1392. style={{ marginLeft: "5px" }}
  1393. >
  1394. 通过
  1395. </Button>}
  1396. {recard.processStatus == 3 && recard.myExamine == 0 &&
  1397. <Button
  1398. type="danger"
  1399. style={{ marginLeft: "5px", }}
  1400. onClick={(e) => {
  1401. e.stopPropagation(), this.reject(recard);
  1402. }}
  1403. >
  1404. 驳回
  1405. </Button>
  1406. }
  1407. </div>
  1408. );
  1409. },
  1410. },
  1411. ],
  1412. dataSource: [],
  1413. searchTime: [],
  1414. columnsDate: [
  1415. {
  1416. title: "编号",
  1417. dataIndex: "id",
  1418. key: "id",
  1419. },
  1420. {
  1421. title: "订单编号",
  1422. dataIndex: "orderno",
  1423. key: "orderno",
  1424. },
  1425. {
  1426. title: "开票金额(万元)",
  1427. dataIndex: "amount",
  1428. key: "amount",
  1429. },
  1430. {
  1431. title: "申请时间",
  1432. dataIndex: "createTime",
  1433. key: "createTime",
  1434. },
  1435. {
  1436. title: "开票状态",
  1437. dataIndex: "status",
  1438. key: "status",
  1439. render: (text, record) => {
  1440. return <div>{getInvoiceStatus(text, record)} <LogPopup id={record.id} /></div>;
  1441. },
  1442. },
  1443. ],
  1444. waterlistDate: [
  1445. {
  1446. title: "订单编号",
  1447. dataIndex: "orderNo",
  1448. key: "orderNo",
  1449. },
  1450. {
  1451. title: "平台流水号",
  1452. dataIndex: "billNo",
  1453. key: "billNo",
  1454. // fixed: "left"
  1455. },
  1456. {
  1457. title: "收款金额(万元)",
  1458. dataIndex: "transactionAmount",
  1459. key: "transactionAmount",
  1460. },
  1461. {
  1462. title: "收款方",
  1463. dataIndex: "payeeName",
  1464. key: "payeeName",
  1465. },
  1466. {
  1467. title: "付款方",
  1468. dataIndex: "payerName",
  1469. key: "payerName",
  1470. },
  1471. {
  1472. title: "流水科目",
  1473. dataIndex: "transactionSubject",
  1474. key: "transactionSubject",
  1475. render: (text) => {
  1476. return getTransactionProject(text);
  1477. },
  1478. },
  1479. {
  1480. title: "收款类型",
  1481. dataIndex: "type",
  1482. key: "type",
  1483. },
  1484. {
  1485. title: "财务流水时间",
  1486. dataIndex: "financialPayTimes",
  1487. key: "financialPayTimes",
  1488. },
  1489. {
  1490. title: "财务流水号",
  1491. dataIndex: "financialPayNo",
  1492. key: "financialPayNo",
  1493. },
  1494. {
  1495. title: "订单负责人",
  1496. dataIndex: "saleName",
  1497. key: "saleName",
  1498. },
  1499. {
  1500. title: "创建时间",
  1501. dataIndex: "createTimes",
  1502. key: "createTimes",
  1503. },
  1504. {
  1505. title: "退款时间",
  1506. dataIndex: "refundTimes",
  1507. key: "refundTimes",
  1508. },
  1509. {
  1510. title: "删除时间",
  1511. dataIndex: "deleteTimes",
  1512. key: "deleteTimes",
  1513. },
  1514. {
  1515. title: "备注",
  1516. dataIndex: "remarks",
  1517. key: "remarks",
  1518. },
  1519. {
  1520. title: "流水状态",
  1521. dataIndex: "deleteSign",
  1522. key: "deleteSign",
  1523. render: (text, record) => {
  1524. if (!text) {
  1525. return (
  1526. <Popconfirm
  1527. title="是否删除?"
  1528. onConfirm={() => {
  1529. this.changeWater(record.billNo);
  1530. }}
  1531. okText="删除"
  1532. cancelText="不删除"
  1533. >
  1534. <Button>删除</Button>
  1535. </Popconfirm>
  1536. );
  1537. } else {
  1538. return <Tag>已删除</Tag>;
  1539. }
  1540. },
  1541. },
  1542. ],
  1543. waterData: [],
  1544. newVisible: "",
  1545. };
  1546. },
  1547. changeWater(billNo) {
  1548. this.setState({
  1549. loading: true,
  1550. });
  1551. $.ajax({
  1552. method: "get",
  1553. dataType: "json",
  1554. crossDomain: false,
  1555. url: globalConfig.context + "/api/admin/financial/deleteMyBill",
  1556. data: {
  1557. billNo,
  1558. },
  1559. success: function (data) {
  1560. let theArr = [];
  1561. if (data.error && data.error.length) {
  1562. message.warning(data.error[0].message);
  1563. } else {
  1564. message.warning("删除流水成功!");
  1565. this.waterData();
  1566. this.loadData();
  1567. }
  1568. }.bind(this),
  1569. }).always(
  1570. function () {
  1571. this.setState({
  1572. loading: false,
  1573. });
  1574. }.bind(this)
  1575. );
  1576. },
  1577. // 特批通过
  1578. evaluateZ(record) {
  1579. $.ajax({
  1580. method: "POST",
  1581. dataType: "json",
  1582. crossDomain: false,
  1583. url: globalConfig.context + "/api/admin/financial/financeApproval",
  1584. data: {
  1585. orderNo: record.orderNo,
  1586. },
  1587. }).done(
  1588. function (data) {
  1589. if (!data.error.length) {
  1590. message.success("通过成功!");
  1591. this.setState({
  1592. loading: false,
  1593. });
  1594. this.loadData();
  1595. } else {
  1596. message.warning(data.error[0].message);
  1597. }
  1598. }.bind(this)
  1599. );
  1600. },
  1601. /* 收款 */
  1602. evaluateX(recard) {
  1603. this.state.assignDataX = recard;
  1604. this.setState({
  1605. assignVisibleX: true,
  1606. });
  1607. },
  1608. /* 转交 */
  1609. evaluateY(recard, nub) {
  1610. this.state.assignDataY = recard;
  1611. this.setState({
  1612. nub,
  1613. assignVisibleY: true,
  1614. });
  1615. },
  1616. /* 驳回 */
  1617. reject(recard) {
  1618. this.setState({
  1619. bohuiData: recard,
  1620. boHuiVisible: true,
  1621. content: "",
  1622. });
  1623. },
  1624. boHuiOk() {
  1625. this.setState({
  1626. boHuiVisible: false,
  1627. });
  1628. if (
  1629. this.state.pagination.current == this.state.totalPage &&
  1630. this.state.pagination.total % 10 == 1
  1631. ) {
  1632. this.loadData(this.state.page - 1);
  1633. } else {
  1634. this.loadData(this.state.page);
  1635. }
  1636. },
  1637. boHuiCancel() {
  1638. this.setState({
  1639. boHuiVisible: false,
  1640. });
  1641. },
  1642. componentWillMount() {
  1643. this.loadData();
  1644. this.departmentList();
  1645. },
  1646. tableRowClick(record) {
  1647. this.state.RowData = record;
  1648. this.setState({
  1649. showDesc: true,
  1650. });
  1651. },
  1652. tableonRowClick(record) {
  1653. if (this.state.newVisible == "项目进度") {
  1654. this.state.onRowData = record;
  1655. this.setState({
  1656. pvisible: true,
  1657. record
  1658. })
  1659. }
  1660. },
  1661. closeDesc(e, s) {
  1662. this.state.showDesc = e;
  1663. if (s) {
  1664. this.loadData(this.state.page);
  1665. }
  1666. },
  1667. closeAssignX(e, s) {
  1668. this.state.assignDataX = {};
  1669. this.state.assignVisibleX = e;
  1670. if (s) {
  1671. this.loadData(this.state.page);
  1672. }
  1673. },
  1674. closeAssignY(e, s) {
  1675. this.state.assignDataY = {};
  1676. this.state.assignVisibleY = e;
  1677. if (s) {
  1678. this.loadData(this.state.page);
  1679. }
  1680. },
  1681. search() {
  1682. this.setState({
  1683. selectedRowKeys: []
  1684. })
  1685. this.loadData();
  1686. },
  1687. // 拆分详细
  1688. showRes(record) {
  1689. this.setState({
  1690. resVisible: true,
  1691. resRecord: record,
  1692. });
  1693. },
  1694. resCancel() {
  1695. this.setState({
  1696. resVisible: false,
  1697. });
  1698. },
  1699. reset() {
  1700. this.state.nameSearch = "";
  1701. this.state.releaseDate = [];
  1702. this.state.shouKuanDate = [];
  1703. this.state.orderNoSearch = "";
  1704. this.state.departmenttList = undefined;
  1705. this.state.amountStatus = undefined;
  1706. this.state.approval = undefined;
  1707. this.state.projectType = undefined;
  1708. this.state.processStatus = [];
  1709. this.state.contractNoSearch = "";
  1710. this.state.liquidationStatus = [];
  1711. this.state.processStatusSearch = [];
  1712. this.state.contractNo = "";
  1713. this.Cascaders.empty();
  1714. this.loadData();
  1715. },
  1716. //驳回
  1717. boHuiSubmit(e) {
  1718. e.preventDefault();
  1719. if (!this.state.content) {
  1720. message.warning("请填写驳回原因");
  1721. return false;
  1722. }
  1723. if (!this.state.content.replace(/\s+/g, '')) {
  1724. message.warning("请填写驳回原因");
  1725. return false;
  1726. }
  1727. this.setState({
  1728. loading: true,
  1729. });
  1730. $.ajax({
  1731. method: "POST",
  1732. dataType: "json",
  1733. crossDomain: false,
  1734. url: globalConfig.context + "/api/admin/financial/reject",
  1735. data: {
  1736. orderNo: this.state.bohuiData.orderNo,
  1737. reason: this.state.content,
  1738. },
  1739. }).done(
  1740. function (data) {
  1741. if (!data.error.length) {
  1742. message.success("驳回成功!");
  1743. this.setState({
  1744. loading: false,
  1745. });
  1746. this.boHuiOk();
  1747. } else {
  1748. message.warning(data.error[0].message);
  1749. }
  1750. }.bind(this)
  1751. );
  1752. },
  1753. searchSwitch() {
  1754. this.setState({
  1755. searchMore: !this.state.searchMore,
  1756. });
  1757. },
  1758. changeList(arr) {
  1759. const newArr = [];
  1760. this.state.columns.forEach((item) => {
  1761. arr.forEach((val) => {
  1762. if (val === item.title) {
  1763. newArr.push(item);
  1764. }
  1765. });
  1766. });
  1767. this.setState({
  1768. changeList: newArr,
  1769. });
  1770. },
  1771. callback(key) {
  1772. // console.log(key);
  1773. },
  1774. onSelectChange(selectedRowKeys, selectedRows) {
  1775. // for(var i=0; i<selectedRowKeys.length; i++){
  1776. // for(var j=i+1; j<selectedRowKeys.length; j++){
  1777. // if(selectedRowKeys[i]==selectedRowKeys[j]){
  1778. // selectedRowKeys.splice(j,1);
  1779. // j--;
  1780. // }
  1781. // }
  1782. // }
  1783. this.setState({
  1784. selectedRowKeys,
  1785. selectedRows,
  1786. newData: selectedRows,
  1787. });
  1788. },
  1789. inRecordCanl() {
  1790. this.setState({
  1791. bvisible: false,
  1792. });
  1793. },
  1794. inRecordData() {
  1795. this.setState({
  1796. loading: true,
  1797. });
  1798. $.ajax({
  1799. method: "get",
  1800. dataType: "json",
  1801. crossDomain: false,
  1802. url:
  1803. globalConfig.context +
  1804. "/api/admin/orderInvoice/salesmanOrderInvoiceList",
  1805. data: {
  1806. orderNo: this.state.selectedRowKeys[0],
  1807. pageSize: 9999999,
  1808. },
  1809. success: function (data) {
  1810. let theArr = [];
  1811. let sum = 0;
  1812. if (!data.data) {
  1813. if (data.error && data.error.length) {
  1814. message.warning(data.error[0].message);
  1815. }
  1816. } else {
  1817. for (let i = 0; i < data.data.list.length; i++) {
  1818. let thisdata = data.data.list[i];
  1819. sum += parseFloat(thisdata.amount);
  1820. theArr.push({
  1821. id: thisdata.id,
  1822. orderno: thisdata.orderno, //订单编号
  1823. amount: thisdata.amount, //签单金额
  1824. createTime: thisdata.createTime, //流程状态
  1825. status: thisdata.status, //结算状态
  1826. rejectReason: thisdata.rejectReason,
  1827. approval: thisdata.approval,//0非特批 1待审核 2审核通过
  1828. examineName: thisdata.examineName,
  1829. });
  1830. }
  1831. }
  1832. this.setState({
  1833. recordData: theArr,
  1834. sum: sum.toFixed(6),
  1835. });
  1836. }.bind(this),
  1837. }).done(
  1838. function () {
  1839. this.setState({
  1840. loading: false,
  1841. });
  1842. }.bind(this)
  1843. );
  1844. },
  1845. waterData() {
  1846. this.state.data = [];
  1847. this.setState({
  1848. loading: true,
  1849. });
  1850. $.ajax({
  1851. method: "get",
  1852. dataType: "json",
  1853. crossDomain: false,
  1854. url: globalConfig.context + "/api/admin/financial/myBillList",
  1855. data: {
  1856. orderNo: this.state.selectedRowKeys[0],
  1857. pageSize: 9999999,
  1858. whoType: 1,
  1859. },
  1860. success: function (data) {
  1861. let theArr = [];
  1862. let waterSum = 0;
  1863. if (!data.data || !data.data.list) {
  1864. if (data.error && data.error.length) {
  1865. message.warning(data.error[0].message);
  1866. }
  1867. } else {
  1868. for (let i = 0; i < data.data.list.length; i++) {
  1869. let thisdata = data.data.list[i];
  1870. if (thisdata.deleteSign == 0) {
  1871. waterSum += parseFloat(thisdata.transactionAmount);
  1872. }
  1873. theArr.push({
  1874. key: i,
  1875. orderNo: thisdata.orderNo,
  1876. billNo: thisdata.billNo,
  1877. transactionAmount: thisdata.transactionAmount,
  1878. payeeName: thisdata.payeeName,
  1879. payerName: thisdata.payerName,
  1880. transactionSubject: thisdata.transactionSubject,
  1881. transactionChannel: thisdata.transactionChannel,
  1882. financialPayTimes: thisdata.financialPayTimes,
  1883. financialPayNo: thisdata.financialPayNo,
  1884. createrName: thisdata.createrName,
  1885. saleName: thisdata.saleName,
  1886. createTimes: thisdata.createTimes,
  1887. type:
  1888. thisdata.type == 0
  1889. ? "手工"
  1890. : thisdata.type == 1
  1891. ? "批量"
  1892. : "合同变更退款",
  1893. deleteSign: thisdata.deleteSign,
  1894. deleteTimes: thisdata.deleteTimes,
  1895. refundTimes: thisdata.refundTimes,
  1896. remarks: thisdata.remarks,
  1897. });
  1898. }
  1899. }
  1900. this.setState({
  1901. waterData: theArr,
  1902. waterSum: (Math.round(waterSum * 1000000) / 1000000).toFixed(6),
  1903. });
  1904. }.bind(this),
  1905. }).always(
  1906. function () {
  1907. this.setState({
  1908. loading: false,
  1909. });
  1910. }.bind(this)
  1911. );
  1912. },
  1913. waterCanl() {
  1914. this.setState({
  1915. cvisible: false,
  1916. });
  1917. },
  1918. exportKaip() {
  1919. window.location.href =
  1920. globalConfig.context +
  1921. "/api/admin/receivables/exportInvoice?" +
  1922. `orderNo=${this.state.selectedRowKeys}`;
  1923. },
  1924. exportAll() {
  1925. message.config({
  1926. duration: 20,
  1927. });
  1928. let loading = message.loading("下载中...");
  1929. this.setState({
  1930. exportPendingLoading: true,
  1931. });
  1932. let data = {
  1933. orderNo: this.state.orderNoSearch,
  1934. buyerName: this.state.nameSearch,
  1935. deps: this.state.departmenttList,
  1936. contractNo: this.state.contractNoSearch,
  1937. processStatus: this.state.processStatusSearch,
  1938. startTime: this.state.releaseDate[0],
  1939. endTime: this.state.releaseDate[1],
  1940. startFinalReceivablesTime: this.state.shouKuanDate[0],
  1941. endFinalReceivablesTime: this.state.shouKuanDate[1],
  1942. contractNo: this.state.contractNoSearch,
  1943. liquidationStatus: this.state.liquidationStatus,
  1944. amountStatus: this.state.amountStatus,
  1945. approval: this.state.approval,
  1946. projectType: this.state.projectType,
  1947. };
  1948. $.ajax({
  1949. method: "get",
  1950. dataType: "json",
  1951. crossDomain: false,
  1952. url: "/api/admin/receivables/exportReceivables",
  1953. data,
  1954. success: function (data) {
  1955. if (data.error.length === 0) {
  1956. this.download(data.data);
  1957. } else {
  1958. message.warning(data.error[0].message);
  1959. }
  1960. }.bind(this),
  1961. }).always(
  1962. function () {
  1963. loading();
  1964. this.setState({
  1965. exportPendingLoading: false,
  1966. });
  1967. }.bind(this)
  1968. );
  1969. // window.location.href =
  1970. // globalConfig.context +
  1971. // "/api/admin/receivables/exportReceivables?" +
  1972. // `orderNo=${this.state.orderNoSearch ? this.state.orderNoSearch : ""
  1973. // }&buyerName=${this.state.nameSearch ? this.state.nameSearch : ""
  1974. // }&deps=${this.state.departmenttList ? this.state.departmenttList : ""
  1975. // }&contractNo=${this.state.contractNoSearch ? this.state.contractNoSearch : ""
  1976. // }&processStatus=${this.state.processStatusSearch}`;
  1977. },
  1978. // 下载
  1979. download(fileName) {
  1980. window.location.href =
  1981. globalConfig.context + "/open/download?fileName=" + fileName;
  1982. },
  1983. exportWater() {
  1984. window.location.href =
  1985. globalConfig.context +
  1986. "/api/admin/receivables/exportMyBill?" +
  1987. `orderNo=${this.state.selectedRowKeys}&whoType=1`;
  1988. },
  1989. printAll() {
  1990. this.setState({
  1991. dvisible: true,
  1992. });
  1993. this.loadData(1, 9999999);
  1994. },
  1995. timeData() {
  1996. this.setState({
  1997. loading: true,
  1998. });
  1999. $.ajax({
  2000. method: "get",
  2001. dataType: "json",
  2002. crossDomain: false,
  2003. url: globalConfig.context + "/api/admin/orderProject/taskHoursList",
  2004. data: {
  2005. orderNo: this.state.selectedRowKeys[0],
  2006. pageSize: 9999999,
  2007. },
  2008. success: function (data) {
  2009. let theArr = [];
  2010. if (!data.data || !data.data.list) {
  2011. if (data.error && data.error.length) {
  2012. message.warning(data.error[0].message);
  2013. }
  2014. } else {
  2015. for (let i = 0; i < data.data.list.length; i++) {
  2016. let thisdata = data.data.list[i];
  2017. theArr.push({
  2018. key: i + 1,
  2019. id: thisdata.id, //ID
  2020. orderNo: thisdata.orderNo, //订单编号
  2021. taskName: thisdata.taskName, //任务名称
  2022. userName: thisdata.userName, //客户名称
  2023. cname: thisdata.cname, //项目品类
  2024. taskStatus: thisdata.taskStatus, //任务状态
  2025. receiverName: thisdata.receiverName, //负责人
  2026. hours: thisdata.hours, //任务工时
  2027. depName: thisdata.depName, //派单公司
  2028. contractNo: thisdata.contractNo,
  2029. signTime: thisdata.signTime,
  2030. creteTime: thisdata.creteTime,
  2031. projectStatus: thisdata.projectStatus,
  2032. commodityPrice: thisdata.commodityPrice, //价格
  2033. commodityQuantity: thisdata.commodityQuantity, //数量
  2034. salesmanName: thisdata.salesmanName, //订单负责人
  2035. taskDistributionTime: thisdata.taskDistributionTime,
  2036. taskEndTime: thisdata.taskEndTime,
  2037. outsource: thisdata.outsource,
  2038. splitStatus: thisdata.splitStatus,
  2039. splitSuper: thisdata.splitSuper,
  2040. splitId: thisdata.splitId,
  2041. });
  2042. }
  2043. }
  2044. this.setState({
  2045. timeDataList: theArr,
  2046. });
  2047. }.bind(this),
  2048. }).always(
  2049. function () {
  2050. this.setState({
  2051. loading: false,
  2052. });
  2053. }.bind(this)
  2054. );
  2055. },
  2056. exportTime() {
  2057. const data = {
  2058. orderNo: this.state.selectedRowKeys[0],
  2059. pageSize: 9999999,
  2060. };
  2061. window.location.href =
  2062. globalConfig.context +
  2063. "/api/admin/orderProject/exportMyTaskList?" +
  2064. $.param(data);
  2065. },
  2066. exportPro() {
  2067. const data = {
  2068. orderNo: this.state.selectedRowKeys[0],
  2069. };
  2070. window.location.href =
  2071. globalConfig.context +
  2072. "/api/admin/newOrder/exportOrderTaskData?" +
  2073. $.param(data);
  2074. },
  2075. // exportCui() {
  2076. // const data = {
  2077. // orderNo: this.state.selectedRowKeys[0]
  2078. // ? this.state.selectedRowKeys[0]
  2079. // : undefined, //订单编号
  2080. // // specially: 1,
  2081. // pageSize: 9999999,
  2082. // };
  2083. // window.location.href =
  2084. // globalConfig.context +
  2085. // "/api/admin/newOrder/exportOrderDunData?" +
  2086. // $.param(data);
  2087. // },
  2088. exportCui() {
  2089. this.setState({
  2090. exportPendingLoading: true,
  2091. });
  2092. message.config({
  2093. duration: 20,
  2094. });
  2095. let loading = message.loading("下载中...");
  2096. let data = {
  2097. orderNo: this.state.selectedRowKeys[0]
  2098. ? this.state.selectedRowKeys[0]
  2099. : undefined, //订单编号
  2100. pageSize: 9999999,
  2101. };
  2102. $.ajax({
  2103. method: "get",
  2104. dataType: "json",
  2105. crossDomain: false,
  2106. url:
  2107. globalConfig.context + "/api/admin/newOrder/exportOrderDunData",
  2108. data,
  2109. success: function (data) {
  2110. if (data.error.length === 0) {
  2111. this.download(data.data);
  2112. } else {
  2113. message.warning(data.error[0].message);
  2114. }
  2115. }.bind(this),
  2116. }).always(
  2117. function () {
  2118. loading();
  2119. this.setState({
  2120. exportPendingLoading: false,
  2121. });
  2122. }.bind(this)
  2123. );
  2124. },
  2125. cuiData() {
  2126. this.setState({
  2127. loading: true,
  2128. });
  2129. $.ajax({
  2130. method: "get",
  2131. dataType: "json",
  2132. crossDomain: false,
  2133. url: globalConfig.context + "/api/admin/newOrder/dunOrderNewList",
  2134. data: {
  2135. orderNo: this.state.selectedRowKeys[0],
  2136. pageSize: 9999999,
  2137. },
  2138. success: function (data) {
  2139. let theArr = [];
  2140. if (!data.data || !data.data.list) {
  2141. if (data.error && data.error.length) {
  2142. message.warning(data.error[0].message);
  2143. }
  2144. } else {
  2145. for (let i = 0; i < data.data.list.length; i++) {
  2146. let thisdata = data.data.list[i];
  2147. theArr.push({
  2148. key: i + 1,
  2149. orderNo: thisdata.orderNo,
  2150. contractNo: thisdata.contractNo,
  2151. userName: thisdata.userName,
  2152. buyerName: thisdata.buyerName,
  2153. departmentName: thisdata.departmentName,
  2154. salesmanName: thisdata.salesmanName,
  2155. depName: thisdata.depName,
  2156. orderStatus: thisdata.orderStatus,
  2157. projectStatus: thisdata.projectStatus,
  2158. totalAmount: thisdata.totalAmount,
  2159. liquidationStatus: thisdata.liquidationStatus,
  2160. settlementAmount: thisdata.settlementAmount,
  2161. accountsReceivable: thisdata.accountsReceivable,
  2162. dunSubject: thisdata.dunSubject,
  2163. startDate: thisdata.startDate,
  2164. taskStatus: thisdata.taskStatus,
  2165. cname: thisdata.cname,
  2166. id: thisdata.id,
  2167. taskName: thisdata.taskName,
  2168. hours: thisdata.hours,
  2169. taskDistributionTime: thisdata.taskDistributionTime,
  2170. taskEndTime: thisdata.taskEndTime,
  2171. dunStatus: thisdata.dunStatus == 0 ? "未触发" : "已触发",
  2172. });
  2173. }
  2174. }
  2175. this.setState({
  2176. cuiDataList: theArr,
  2177. });
  2178. }.bind(this),
  2179. }).always(
  2180. function () {
  2181. this.setState({
  2182. loading: false,
  2183. });
  2184. }.bind(this)
  2185. );
  2186. },
  2187. cuiTabChange(index) {
  2188. this.setState({
  2189. cuiTabKey: index,
  2190. });
  2191. if (index == 2) {
  2192. this.setState({
  2193. loading: true,
  2194. });
  2195. $.ajax({
  2196. method: "get",
  2197. dataType: "json",
  2198. crossDomain: false,
  2199. url: globalConfig.context + "/api/admin/newOrder/arrearsDunList",
  2200. data: {
  2201. orderNo: this.state.selectedRowKeys[0],
  2202. pageSize: 9999999,
  2203. },
  2204. success: function (data) {
  2205. let theArr = [];
  2206. if (data.error.length || data.data.list == "") {
  2207. if (data.error && data.error.length) {
  2208. message.warning(data.error[0].message);
  2209. }
  2210. } else {
  2211. for (let i = 0; i < data.data.list.length; i++) {
  2212. let thisdata = data.data.list[i];
  2213. let obj = thisdata;
  2214. obj.key = i;
  2215. theArr.push(obj);
  2216. }
  2217. }
  2218. this.setState({
  2219. qianDataList: theArr,
  2220. });
  2221. }.bind(this),
  2222. }).always(
  2223. function () {
  2224. this.setState({
  2225. loading: false,
  2226. });
  2227. }.bind(this)
  2228. );
  2229. }
  2230. },
  2231. proData() {
  2232. this.setState({
  2233. loading: true,
  2234. });
  2235. $.ajax({
  2236. method: "get",
  2237. dataType: "json",
  2238. crossDomain: false,
  2239. url: globalConfig.context + "/api/admin/newOrder/getOrderTask",
  2240. data: {
  2241. orderNo: this.state.selectedRowKeys[0],
  2242. pageSize: 9999999,
  2243. },
  2244. success: function (data) {
  2245. let theArr = [];
  2246. let totalWaibao = 0;
  2247. if (!data.data) {
  2248. if (data.error && data.error.length) {
  2249. message.warning(data.error[0].message);
  2250. }
  2251. } else {
  2252. for (let i = 0; i < data.data.length; i++) {
  2253. let thisdata = data.data[i];
  2254. totalWaibao += thisdata.outsourcePrice;
  2255. thisdata.key = i + 1;
  2256. theArr.push(thisdata);
  2257. }
  2258. }
  2259. totalWaibao = (Math.round(totalWaibao * 1000000) / 1000000).toFixed(6);
  2260. this.setState({
  2261. proDataList: theArr,
  2262. totalWaibao,
  2263. });
  2264. }.bind(this),
  2265. }).always(
  2266. function () {
  2267. this.setState({
  2268. loading: false,
  2269. });
  2270. }.bind(this)
  2271. );
  2272. },
  2273. // 查看公出列表
  2274. pubData() {
  2275. this.setState({
  2276. loading: true,
  2277. });
  2278. let rows = this.state.selectedRows[0]
  2279. let searchInfor = {
  2280. releaseStart: this.state.releaseDate[0] || undefined,
  2281. releaseEnd: this.state.releaseDate[1] || undefined,
  2282. aid: this.state.theTypes || undefined,
  2283. sid: this.state.theTypes1 || undefined,
  2284. status: this.state.status,
  2285. clockIn: this.state.clockIn,
  2286. depId: this.state.depId || undefined,
  2287. publicType: this.state.type,
  2288. }
  2289. let datas = Object.assign(searchInfor, {
  2290. pageNo: this.state.pubpageNo || 1,
  2291. pageSize: 9999999,
  2292. uid: rows.buyerId,
  2293. });
  2294. $.ajax({
  2295. method: "get",
  2296. dataType: "json",
  2297. crossDomain: false,
  2298. url: globalConfig.context + "/api/admin/release/publicReleaseDtails",
  2299. data: datas,
  2300. success: function (data) {
  2301. let theArr = [];
  2302. this.setState({
  2303. loading: false,
  2304. });
  2305. if (!data.data) {
  2306. if (data.error && data.error.length) {
  2307. message.warning(data.error[0].message);
  2308. }
  2309. } else {
  2310. for (let i = 0; i < data.data.list.length; i++) {
  2311. let thisdata = data.data.list[i];
  2312. thisdata.key = (data.data.pageNo - 1) * data.data.pageSize + i + 1;
  2313. theArr.push(thisdata);
  2314. }
  2315. this.state.pubpagination.current = data.data.pageNo;
  2316. this.state.pubpagination.total = data.data.totalCount;
  2317. if (data.data && data.data.list && !data.data.list.length) {
  2318. this.state.pubpagination.current = 0;
  2319. this.state.pubpagination.total = 0;
  2320. }
  2321. }
  2322. this.setState({
  2323. pubDataList: theArr,
  2324. pubpagination: this.state.pubpagination,
  2325. pubpageNo: data.data.pageNo,
  2326. });
  2327. }.bind(this),
  2328. }).always(
  2329. function () {
  2330. this.setState({
  2331. loading: false,
  2332. });
  2333. }.bind(this)
  2334. );
  2335. },
  2336. // 重置公出列表查询
  2337. resetAll() {
  2338. this.setState(
  2339. {
  2340. releaseDate: [],
  2341. theCustomerTypes: undefined,
  2342. status: undefined,
  2343. clockIn: undefined,
  2344. depId: undefined,
  2345. auto: "",
  2346. auto1: "",
  2347. customer: "",
  2348. theTypes: undefined,
  2349. theTypes1: undefined,
  2350. type: undefined,
  2351. },
  2352. () => {
  2353. this.pubData();
  2354. }
  2355. );
  2356. },
  2357. //公出导出
  2358. pubexportExec() {
  2359. this.setState({
  2360. exportPendingLoading: true,
  2361. });
  2362. message.config({
  2363. duration: 20,
  2364. });
  2365. let loading = message.loading("下载中...");
  2366. let rows = this.state.selectedRows[0]
  2367. let searchInfor = {
  2368. releaseStart: this.state.releaseDate[0] || undefined,
  2369. releaseEnd: this.state.releaseDate[1] || undefined,
  2370. aid: this.state.theTypes || undefined,
  2371. sid: this.state.theTypes1 || undefined,
  2372. status: this.state.status,
  2373. clockIn: this.state.clockIn,
  2374. depId: this.state.depId || undefined,
  2375. publicType: this.state.type,
  2376. }
  2377. let data = Object.assign(searchInfor, {
  2378. pageNo: this.state.pubpageNo || 1,
  2379. pageSize: 9999999,
  2380. uid: rows.buyerId,
  2381. exportType: 1,
  2382. });
  2383. for (let i of Object.keys(data)) {
  2384. if (i === "status" || i === "clockIn") {
  2385. if (isNaN(parseInt(data[i]))) {
  2386. delete data[i];
  2387. }
  2388. } else if (!data[i]) {
  2389. delete data[i];
  2390. }
  2391. }
  2392. $.ajax({
  2393. method: "get",
  2394. dataType: "json",
  2395. crossDomain: false,
  2396. url: globalConfig.context + "/api/admin/release/publicReleaseDtails/export",
  2397. data,
  2398. success: function (data) {
  2399. if (data.error.length === 0) {
  2400. this.download(data.data);
  2401. } else {
  2402. message.warning(data.error[0].message);
  2403. }
  2404. }.bind(this),
  2405. }).always(
  2406. function () {
  2407. loading();
  2408. this.setState({
  2409. exportPendingLoading: false,
  2410. });
  2411. }.bind(this)
  2412. );
  2413. },
  2414. // 下载
  2415. download(fileName) {
  2416. window.location.href =
  2417. globalConfig.context + "/open/download?fileName=" + fileName;
  2418. },
  2419. checkRemark(record) {
  2420. this.setState({
  2421. checkVisible: true,
  2422. checkOrderNo: record.orderNo,
  2423. });
  2424. },
  2425. checkOk() {
  2426. if (!this.state.checkData) {
  2427. message.warning("请填写审核内容");
  2428. return;
  2429. }
  2430. if (!this.state.checkData.replace(/\s+/g, '')) {
  2431. message.warning("请填写审核内容");
  2432. return;
  2433. }
  2434. this.setState({
  2435. loading: true,
  2436. });
  2437. let ajaxObj = $.ajax({
  2438. method: "post",
  2439. dataType: "json",
  2440. crossDomain: false,
  2441. url: globalConfig.context + "/api/admin/financial/financeApproval",
  2442. data: {
  2443. orderNo: this.state.checkOrderNo,
  2444. remarks: this.state.checkData,
  2445. },
  2446. success: function (data) {
  2447. let theArr = [];
  2448. if (!data.data) {
  2449. if (data.error && data.error.length) {
  2450. message.warning(data.error[0].message);
  2451. }
  2452. } else {
  2453. message.success("通过成功!");
  2454. this.loadData();
  2455. this.setState({
  2456. checkVisible: false,
  2457. checkData: "",
  2458. });
  2459. }
  2460. }.bind(this),
  2461. }).always(
  2462. function () {
  2463. this.setState({
  2464. loading: false,
  2465. financeApprovalAjaxObj: null
  2466. });
  2467. }.bind(this)
  2468. );
  2469. this.setState({
  2470. financeApprovalAjaxObj: ajaxObj
  2471. })
  2472. },
  2473. tableRowClickPro(record) {
  2474. this.setState({
  2475. pvisible: true,
  2476. record,
  2477. });
  2478. },
  2479. kaiPiaoData(record) {
  2480. this.setState({
  2481. avisible: true,
  2482. });
  2483. this.invoiceData(record.id)
  2484. },
  2485. invoiceData(id) {
  2486. this.setState({
  2487. loading: true,
  2488. });
  2489. $.ajax({
  2490. method: "get",
  2491. dataType: "json",
  2492. crossDomain: false,
  2493. url:
  2494. globalConfig.context + "/api/admin/orderInvoice/selectByIdOrderInvoice",
  2495. data: {
  2496. id,
  2497. },
  2498. success: function (data) {
  2499. let thisdata = data.data;
  2500. let obj = {
  2501. contractNo: thisdata.contractNo,
  2502. orderNo: thisdata.orderNo,
  2503. approval: thisdata.approval,
  2504. type: thisdata.type,
  2505. status: thisdata.status,
  2506. remarks: thisdata.remarks,
  2507. invoiceType: thisdata.invoiceType,
  2508. unitName: thisdata.unitName,
  2509. taxNumber: thisdata.taxNumber,
  2510. amount: thisdata.amount,
  2511. banks: thisdata.banks,
  2512. content: thisdata.content,
  2513. unitAddress: thisdata.unitAddress,
  2514. invoiceRemarks: thisdata.invoiceRemarks,
  2515. unitMobile: thisdata.unitMobile,
  2516. post: thisdata.post,
  2517. addressee: thisdata.addressee,
  2518. addresseeMobile: thisdata.addresseeMobile,
  2519. addresseeProvince: thisdata.addresseeProvince,
  2520. addresseeCity: thisdata.addresseeCity,
  2521. addresseeArea: thisdata.addresseeArea,
  2522. alreadyAmount: thisdata.alreadyAmount,
  2523. recipientAddress: thisdata.recipientAddress,
  2524. orgCodeUrl: thisdata.voucherUrl
  2525. ? splitUrl(
  2526. thisdata.voucherUrl,
  2527. ",",
  2528. globalConfig.avatarHost + "/upload"
  2529. )
  2530. : [],
  2531. };
  2532. this.setState({
  2533. modalData: obj,
  2534. });
  2535. }.bind(this),
  2536. }).done(
  2537. function () {
  2538. this.setState({
  2539. loading: false,
  2540. });
  2541. }.bind(this)
  2542. );
  2543. },
  2544. visitCancels() {
  2545. this.setState({
  2546. avisible: false
  2547. })
  2548. },
  2549. selectAuto(value, options) {
  2550. this.setState({
  2551. auto: value,
  2552. });
  2553. },
  2554. selectAuto1(value, options) {
  2555. this.setState({
  2556. auto1: value,
  2557. });
  2558. },
  2559. blurChange(e) {
  2560. let theType = "";
  2561. let contactLists = this.state.customerArr || [];
  2562. if (e) {
  2563. contactLists.map(function (item) {
  2564. if (item.name == e.toString()) {
  2565. theType = item.id;
  2566. }
  2567. });
  2568. }
  2569. this.setState({
  2570. theTypes: theType,
  2571. });
  2572. },
  2573. blurChange1(e) {
  2574. let theType = "";
  2575. let contactLists = this.state.customerArr1 || [];
  2576. if (e) {
  2577. contactLists.map(function (item) {
  2578. if (item.name == e.toString()) {
  2579. theType = item.id;
  2580. }
  2581. });
  2582. }
  2583. this.setState({
  2584. theTypes1: theType,
  2585. });
  2586. },
  2587. httpChange(e) {
  2588. if (e.length >= 1) {
  2589. this.supervisor(e);
  2590. }
  2591. this.setState({
  2592. auto: e,
  2593. });
  2594. },
  2595. httpChange1(e) {
  2596. if (e.length >= 1) {
  2597. this.supervisor1(e);
  2598. }
  2599. this.setState({
  2600. auto1: e,
  2601. });
  2602. },
  2603. supervisor(e) {
  2604. $.ajax({
  2605. method: "get",
  2606. dataType: "json",
  2607. crossDomain: false,
  2608. url: globalConfig.context + "/api/admin/customer/listAdminByName",
  2609. data: {
  2610. adminName: e,
  2611. },
  2612. success: function (data) {
  2613. if (data.error && data.error.length === 0) {
  2614. this.setState({
  2615. customerArr: data.data,
  2616. });
  2617. } else {
  2618. message.warning(data.error[0].message);
  2619. }
  2620. }.bind(this),
  2621. }).always(function () { }.bind(this));
  2622. },
  2623. supervisor1(e) {
  2624. $.ajax({
  2625. method: "get",
  2626. dataType: "json",
  2627. crossDomain: false,
  2628. url: globalConfig.context + "/api/admin/customer/listAdminByName",
  2629. data: {
  2630. adminName: e,
  2631. },
  2632. success: function (data) {
  2633. if (data.error && data.error.length === 0) {
  2634. this.setState({
  2635. customerArr1: data.data,
  2636. });
  2637. } else {
  2638. message.warning(data.error[0].message);
  2639. }
  2640. }.bind(this),
  2641. }).always(function () { }.bind(this));
  2642. },
  2643. render() {
  2644. const formItemLayout = {
  2645. labelCol: { span: 8 },
  2646. wrapperCol: { span: 14 },
  2647. };
  2648. const { RangePicker } = DatePicker;
  2649. var departmentArr = this.state.departmentArr || [];
  2650. const { loading, selectedRowKeys, visible } = this.state;
  2651. const rowSelection = {
  2652. selectedRowKeys,
  2653. onChange: this.onSelectChange,
  2654. hideDefaultSelections: true,
  2655. type: "radio",
  2656. };
  2657. const dataSources = this.state.customerArr || [];
  2658. const dataSources1 = this.state.customerArr1 || [];
  2659. const options = dataSources.map((group) => (
  2660. <Select.Option key={group.id} value={group.name}>
  2661. {group.name}
  2662. </Select.Option>
  2663. ));
  2664. const options1 = dataSources1.map((group) => (
  2665. <Select.Option key={group.id} value={group.name}>
  2666. {group.name}
  2667. </Select.Option>
  2668. ));
  2669. return (
  2670. <div className="user-content">
  2671. {this.state.resVisible ? (
  2672. <ResolutionDetail
  2673. cancel={this.resCancel}
  2674. detail={this.state.resRecord}
  2675. visible={this.state.resVisible}
  2676. id={this.state.resRecord.orderNo}
  2677. />
  2678. ) : (
  2679. ""
  2680. )}
  2681. <div className="content-title" style={{ marginBottom: 10 }}>
  2682. <span style={{ fontWeight: 900, fontSize: 16 }}>收款结算</span>
  2683. </div>
  2684. <Tabs defaultActiveKey="2" onChange={this.callback} className="test">
  2685. <TabPane tab="更改表格显示数据" key="1">
  2686. <div style={{ marginLeft: 10 }}>
  2687. <ChooseList
  2688. columns={this.state.columns}
  2689. changeFn={this.changeList}
  2690. changeList={this.state.changeList}
  2691. top={55}
  2692. margin={11}
  2693. />
  2694. </div>
  2695. </TabPane>
  2696. <TabPane tab="搜索" key="2">
  2697. <div className="user-search" style={{ padding: "0 20px 0 10px" }}>
  2698. <Input
  2699. style={{ width: 200 }}
  2700. placeholder="订单编号"
  2701. value={this.state.orderNoSearch}
  2702. onChange={(e) => {
  2703. this.setState({ orderNoSearch: e.target.value });
  2704. }}
  2705. />
  2706. <Input
  2707. style={{ width: 200 }}
  2708. placeholder="合同编号"
  2709. value={this.state.contractNoSearch}
  2710. onChange={(e) => {
  2711. this.setState({
  2712. contractNoSearch: e.target.value,
  2713. });
  2714. }}
  2715. />
  2716. <Input
  2717. style={{ width: 200 }}
  2718. placeholder="客户名称"
  2719. value={this.state.nameSearch}
  2720. onChange={(e) => {
  2721. this.setState({ nameSearch: e.target.value });
  2722. }}
  2723. />
  2724. <Cascaders
  2725. ref={node => this.Cascaders = node}
  2726. placeholder="订单部门"
  2727. id="id"
  2728. name="name"
  2729. children="list"
  2730. height={28}
  2731. onSel={(e) => {
  2732. this.setState({
  2733. departmenttList: JSON.stringify(e),
  2734. });
  2735. }}
  2736. />
  2737. {/* <Select
  2738. placeholder="订单部门"
  2739. style={{ width: 190, marginRight: 10 }}
  2740. value={this.state.departmenttList}
  2741. onChange={(e) => {
  2742. this.setState({ departmenttList: e });
  2743. }}
  2744. >
  2745. {departmentArr.map(function (item) {
  2746. return (
  2747. <Select.Option key={item.id}>{item.name}</Select.Option>
  2748. );
  2749. })}
  2750. </Select> */}
  2751. <Select
  2752. placeholder="流程状态"
  2753. onChange={(e) => {
  2754. this.setState({ processStatusSearch: e });
  2755. }}
  2756. style={{ width: 150, marginRight: 10 }}
  2757. value={this.state.processStatusSearch}
  2758. >
  2759. <Option value="3">未分配</Option>
  2760. <Option value="4">已分配</Option>
  2761. <Option value="9">已驳回</Option>
  2762. </Select>
  2763. <Select
  2764. placeholder="结算状态"
  2765. onChange={(e) => {
  2766. this.setState({ liquidationStatus: e });
  2767. }}
  2768. style={{ width: 150, marginRight: 10 }}
  2769. value={this.state.liquidationStatus}
  2770. >
  2771. <Option value="0">首付待付清</Option>
  2772. <Option value="1">尾款待付清</Option>
  2773. <Option value="2">已付清</Option>
  2774. </Select>
  2775. <Select
  2776. style={{ width: 150 }}
  2777. placeholder="签单金额"
  2778. value={this.state.amountStatus}
  2779. onChange={(e) => {
  2780. this.setState({
  2781. amountStatus: e,
  2782. });
  2783. }}
  2784. >
  2785. <Option value="0">10万元以下</Option>
  2786. <Option value="1">10~20万元</Option>
  2787. <Option value="2">20~30万元</Option>
  2788. <Option value="3">30~40万元</Option>
  2789. <Option value="4">40万元以上</Option>
  2790. </Select>
  2791. <Select
  2792. style={{ width: 150 }}
  2793. placeholder="特批状态"
  2794. value={this.state.approval}
  2795. onChange={(e) => {
  2796. this.setState({
  2797. approval: e,
  2798. });
  2799. }}
  2800. >
  2801. <Option value="0">非特批</Option>
  2802. <Option value="1">特批待审</Option>
  2803. <Option value="2">特批通过</Option>
  2804. <Option value="4">全部特批</Option>
  2805. </Select>
  2806. <Select
  2807. style={{ width: 150 }}
  2808. placeholder="会员状态"
  2809. value={this.state.projectType}
  2810. onChange={(e) => {
  2811. this.setState({
  2812. projectType: e,
  2813. });
  2814. }}
  2815. >
  2816. <Option value="1">会员</Option>
  2817. <Option value="0">非会员</Option>
  2818. </Select>
  2819. <span style={{}}>下单日期:</span>
  2820. <RangePicker
  2821. value={[
  2822. this.state.releaseDate[0]
  2823. ? moment(this.state.releaseDate[0])
  2824. : null,
  2825. this.state.releaseDate[1]
  2826. ? moment(this.state.releaseDate[1])
  2827. : null,
  2828. ]}
  2829. onChange={(data, dataString) => {
  2830. this.setState({ releaseDate: dataString });
  2831. }}
  2832. />
  2833. <span style={{ marginLeft: 10 }}>最近收款:</span>
  2834. <RangePicker
  2835. value={[
  2836. this.state.shouKuanDate[0]
  2837. ? moment(this.state.shouKuanDate[0])
  2838. : null,
  2839. this.state.shouKuanDate[1]
  2840. ? moment(this.state.shouKuanDate[1])
  2841. : null,
  2842. ]}
  2843. onChange={(data, dataString) => {
  2844. this.setState({ shouKuanDate: dataString });
  2845. }}
  2846. />
  2847. <Button
  2848. type="primary"
  2849. onClick={this.search}
  2850. style={{ marginLeft: 10 }}
  2851. disabled={this.state.loadingA ? true : false}
  2852. >
  2853. 搜索
  2854. </Button>
  2855. <Button onClick={this.reset}>重置</Button>
  2856. </div>
  2857. </TabPane>
  2858. <TabPane tab="打印" key="3">
  2859. <Button
  2860. type="primary"
  2861. style={{ margin: "11px 0px 10px 10px" }}
  2862. onClick={this.printAll}
  2863. disabled={!this.state.dataSource.length}
  2864. >
  2865. 打印所有列表信息
  2866. </Button>
  2867. <Button
  2868. type="primary"
  2869. disabled={this.state.selectedRowKeys.length != 1}
  2870. style={{ margin: "11px 0px 10px 10px" }}
  2871. onClick={() => {
  2872. this.inRecordData();
  2873. this.setState({
  2874. bvisible: true,
  2875. });
  2876. }}
  2877. >
  2878. 打印开票详情
  2879. </Button>
  2880. <Button
  2881. type="primary"
  2882. disabled={this.state.selectedRowKeys.length != 1}
  2883. style={{ margin: "11px 0px 10px 10px" }}
  2884. onClick={() => {
  2885. this.waterData();
  2886. this.setState({
  2887. cvisible: true,
  2888. });
  2889. }}
  2890. >
  2891. 打印收款流水
  2892. </Button>
  2893. <Button
  2894. type="primary"
  2895. disabled={this.state.selectedRowKeys.length != 1}
  2896. style={{ margin: "11px 0px 10px 10px" }}
  2897. onClick={() => {
  2898. this.timeData();
  2899. this.setState({
  2900. timeVisible: true,
  2901. });
  2902. }}
  2903. >
  2904. 打印工时信息
  2905. </Button>
  2906. <Button
  2907. type="primary"
  2908. disabled={this.state.selectedRowKeys.length != 1}
  2909. style={{ margin: "11px 0px 10px 10px" }}
  2910. onClick={() => {
  2911. this.cuiData();
  2912. this.setState({
  2913. cuiVisible: true,
  2914. });
  2915. }}
  2916. >
  2917. 打印催款信息
  2918. </Button>
  2919. <Button
  2920. type="primary"
  2921. disabled={this.state.selectedRowKeys.length != 1}
  2922. style={{ margin: "11px 0px 10px 10px" }}
  2923. onClick={() => {
  2924. this.proData();
  2925. this.setState({
  2926. proVisible: true,
  2927. });
  2928. }}
  2929. >
  2930. 打印项目进度
  2931. </Button>
  2932. </TabPane>
  2933. <TabPane tab="导出Excel" key="4">
  2934. <Button
  2935. type="primary"
  2936. style={{ margin: "11px 0px 10px 10px" }}
  2937. onClick={this.exportAll}
  2938. >
  2939. 导出当前列表
  2940. </Button>
  2941. <Button
  2942. type="primary"
  2943. disabled={this.state.selectedRowKeys.length != 1}
  2944. style={{ margin: "11px 0px 10px 10px" }}
  2945. onClick={this.exportKaip}
  2946. >
  2947. 导出所选开票详情
  2948. </Button>
  2949. <Button
  2950. type="primary"
  2951. disabled={this.state.selectedRowKeys.length != 1}
  2952. style={{ margin: "11px 0px 10px 10px" }}
  2953. onClick={this.exportWater}
  2954. >
  2955. 导出所选收款详情流水
  2956. </Button>
  2957. <Button
  2958. type="primary"
  2959. disabled={this.state.selectedRowKeys.length != 1}
  2960. style={{ margin: "11px 0px 10px 10px" }}
  2961. onClick={this.exportTime}
  2962. >
  2963. 导出所选工时信息
  2964. </Button>
  2965. <Button
  2966. type="primary"
  2967. disabled={this.state.selectedRowKeys.length != 1}
  2968. style={{ margin: "11px 0px 10px 10px" }}
  2969. onClick={this.exportCui}
  2970. >
  2971. 导出催款信息
  2972. </Button>
  2973. <Button
  2974. type="primary"
  2975. disabled={this.state.selectedRowKeys.length != 1}
  2976. style={{ margin: "11px 0px 10px 10px" }}
  2977. onClick={this.exportPro}
  2978. >
  2979. 导出项目进度
  2980. </Button>
  2981. </TabPane>
  2982. <TabPane tab="查看" key="5">
  2983. <Button
  2984. type="primary"
  2985. disabled={this.state.selectedRowKeys.length != 1}
  2986. style={{ margin: "11px 0px 10px 10px" }}
  2987. onClick={() => {
  2988. this.inRecordData();
  2989. this.setState({
  2990. // bvisible: true,
  2991. newVisible: "开票历史记录",
  2992. });
  2993. }}
  2994. >
  2995. 查看开票详情
  2996. </Button>
  2997. <Button
  2998. type="primary"
  2999. disabled={this.state.selectedRowKeys.length != 1}
  3000. style={{ margin: "11px 0px 10px 10px" }}
  3001. onClick={() => {
  3002. this.waterData();
  3003. this.setState({
  3004. // cvisible: true,
  3005. newVisible: "详细收款流水",
  3006. });
  3007. }}
  3008. >
  3009. 详情收款流水
  3010. </Button>
  3011. <Button
  3012. type="primary"
  3013. disabled={this.state.selectedRowKeys.length != 1}
  3014. style={{ margin: "11px 0px 10px 10px" }}
  3015. onClick={() => {
  3016. this.timeData();
  3017. this.setState({
  3018. // timeVisible: true,
  3019. newVisible: "工时详情",
  3020. });
  3021. }}
  3022. >
  3023. 工时信息
  3024. </Button>
  3025. <Button
  3026. type="primary"
  3027. disabled={this.state.selectedRowKeys.length != 1}
  3028. style={{ margin: "11px 0px 10px 10px" }}
  3029. onClick={() => {
  3030. this.cuiData();
  3031. this.setState({
  3032. // cuiVisible: true,
  3033. newVisible: "催款详情",
  3034. });
  3035. }}
  3036. >
  3037. 催款信息
  3038. </Button>
  3039. <Button
  3040. type="primary"
  3041. disabled={this.state.selectedRowKeys.length != 1}
  3042. style={{ margin: "11px 0px 10px 10px" }}
  3043. onClick={() => {
  3044. this.proData();
  3045. this.setState({
  3046. // proVisible: true,
  3047. newVisible: "项目进度",
  3048. });
  3049. }}
  3050. >
  3051. 项目进度
  3052. </Button>
  3053. <Button
  3054. type="primary"
  3055. disabled={this.state.selectedRowKeys.length != 1}
  3056. style={{ margin: "11px 0px 10px 10px" }}
  3057. onClick={() => {
  3058. this.pubData();
  3059. this.selectSuperId();
  3060. this.setState({
  3061. // pubVisible: true,
  3062. newVisible: "公出详细列表",
  3063. });
  3064. }}
  3065. >
  3066. 查看公出
  3067. </Button>
  3068. </TabPane>
  3069. {/* <TabPane tab="批量操作" key="6">
  3070. <Button
  3071. type="primary"
  3072. disabled={this.state.selectedRowKeys.length == 0}
  3073. style={{ margin: "0px 0px 10px 10px" }}
  3074. onClick={e => {
  3075. e.stopPropagation(),
  3076. this.evaluateY(this.state.selectedRowKeys, "财务专员");
  3077. }}
  3078. >
  3079. 转交
  3080. </Button>
  3081. </TabPane> */}
  3082. </Tabs>
  3083. <div className="patent-table">
  3084. <Spin spinning={this.state.loadingA}>
  3085. <Table
  3086. bordered
  3087. columns={
  3088. this.state.changeList == undefined
  3089. ? this.state.columns
  3090. : this.state.changeList
  3091. }
  3092. dataSource={this.state.dataSource}
  3093. rowSelection={rowSelection}
  3094. scroll={{ x: "max-content", y: 0 }}
  3095. pagination={this.state.pagination}
  3096. onRowDoubleClick={this.tableRowClick.bind(this)}
  3097. size="small"
  3098. />
  3099. </Spin>
  3100. <p
  3101. style={{ display: "inline-block", fontSize: "14px", color: "red" }}
  3102. >
  3103. {
  3104. <span style={{ marginRight: 10 }}>
  3105. {`收款金额总计(万元):${this.state.hui ? this.state.hui : "0"}`}
  3106. </span>
  3107. }
  3108. {
  3109. <span>
  3110. {`合同额总计(万元):${this.state.totalHui ? this.state.totalHui : "0"
  3111. }`}
  3112. </span>
  3113. }
  3114. </p>
  3115. </div>
  3116. <Assign
  3117. title="任务"
  3118. selApi={"/api/admin/newOrder/updateFinance"}
  3119. data={this.state.assignDataY}
  3120. showDesc={this.state.assignVisibleY}
  3121. closeDesc={this.closeAssignY.bind(this)}
  3122. // fenpaiData={8}
  3123. specially={0}
  3124. roleName={this.state.nub}
  3125. requestMethod={"get"}
  3126. />
  3127. <OrderDesc
  3128. data={this.state.RowData}
  3129. showDesc={this.state.showDesc}
  3130. closeDesc={this.closeDesc.bind(this)}
  3131. />
  3132. <Receivable
  3133. title="收款记录"
  3134. api="/api/admin/financial/addReceiptsFlow"
  3135. data={this.state.assignDataX}
  3136. showDesc={this.state.assignVisibleX}
  3137. closeDesc={this.closeAssignX.bind(this)}
  3138. />
  3139. <Modal
  3140. visible={this.state.boHuiVisible}
  3141. width="400px"
  3142. title="驳回备注"
  3143. footer=""
  3144. onOk={this.boHuiOk}
  3145. onCancel={this.boHuiCancel}
  3146. >
  3147. <Form layout="horizontal" onSubmit={this.boHuiSubmit}>
  3148. <Spin spinning={this.state.loading}>
  3149. <FormItem
  3150. labelCol={{ span: 5 }}
  3151. wrapperCol={{ span: 16 }}
  3152. label={
  3153. <span>
  3154. <strong style={{ color: "#f00" }}>*</strong>驳回原因
  3155. </span>
  3156. }
  3157. >
  3158. <Input
  3159. type="textarea"
  3160. rows={4}
  3161. placeholder="请输入驳回原因"
  3162. value={this.state.content}
  3163. onChange={(e) => {
  3164. this.setState({ content: e.target.value });
  3165. }}
  3166. />
  3167. </FormItem>
  3168. <FormItem wrapperCol={{ span: 12, offset: 5 }}>
  3169. <Button
  3170. type="primary"
  3171. htmlType="submit"
  3172. style={{ marginRight: 20 }}
  3173. >
  3174. 驳回
  3175. </Button>
  3176. <Button
  3177. type="default"
  3178. onClick={() => {
  3179. this.boHuiCancel();
  3180. }}
  3181. >
  3182. 取消
  3183. </Button>
  3184. </FormItem>
  3185. </Spin>
  3186. </Form>
  3187. </Modal>
  3188. <Modal
  3189. visible={this.state.bvisible}
  3190. footer=""
  3191. title="开票历史记录"
  3192. className="admin-desc-content"
  3193. width="1200px"
  3194. onCancel={this.inRecordCanl}
  3195. >
  3196. <Spin spinning={this.state.loading}>
  3197. <div
  3198. className="patent-table"
  3199. ref={(e) => {
  3200. this.refs.kaiPiao = e;
  3201. }}
  3202. >
  3203. <Table
  3204. columns={this.state.columnsDate}
  3205. dataSource={this.state.recordData}
  3206. onRowClick={this.kaiPiaoData}
  3207. pagination={false}
  3208. bordered
  3209. size="small"
  3210. />
  3211. <div className="clearfix" style={{ marginTop: "20px" }}>
  3212. <FormItem
  3213. className="half-item"
  3214. {...formItemLayout}
  3215. label={<span style={{ fontSize: "14px" }}>开票总计</span>}
  3216. >
  3217. <span>{this.state.sum + "(万元)"}</span>
  3218. </FormItem>
  3219. </div>
  3220. <ReactToPrint
  3221. trigger={() => (
  3222. <Button
  3223. type="primary"
  3224. style={{
  3225. float: "right",
  3226. // marginTop: 10,
  3227. position: "absolute",
  3228. top: -54,
  3229. right: 30,
  3230. }}
  3231. >
  3232. 打印
  3233. </Button>
  3234. )}
  3235. content={() => this.refs.kaiPiao}
  3236. />
  3237. </div>
  3238. </Spin>
  3239. </Modal>
  3240. <Modal
  3241. visible={this.state.cvisible}
  3242. footer=""
  3243. title="详细收款流水"
  3244. className="admin-desc-content"
  3245. width="1300px"
  3246. onCancel={this.waterCanl}
  3247. >
  3248. <Spin spinning={this.state.loading}>
  3249. <div
  3250. className="patent-table"
  3251. ref={(e) => {
  3252. this.refs.shouKuan = e;
  3253. }}
  3254. >
  3255. <Table
  3256. columns={this.state.waterlistDate}
  3257. dataSource={this.state.waterData}
  3258. pagination={false}
  3259. scroll={{ x: "max-content", y: 0 }}
  3260. bordered
  3261. size="small"
  3262. />
  3263. <div className="clearfix" style={{ marginTop: "20px" }}>
  3264. <FormItem
  3265. className="half-item"
  3266. {...formItemLayout}
  3267. label={<span style={{ fontSize: "14px" }}>总计金额</span>}
  3268. >
  3269. <span>{this.state.waterSum + "(万元)"}</span>
  3270. </FormItem>
  3271. </div>
  3272. <ReactToPrint
  3273. trigger={() => (
  3274. <Button
  3275. type="primary"
  3276. style={{
  3277. float: "right",
  3278. position: "absolute",
  3279. top: -54,
  3280. right: 30,
  3281. }}
  3282. >
  3283. 打印
  3284. </Button>
  3285. )}
  3286. content={() => this.refs.shouKuan}
  3287. />
  3288. </div>
  3289. </Spin>
  3290. </Modal>
  3291. <Modal
  3292. visible={this.state.dvisible}
  3293. footer=""
  3294. title="所有列表信息"
  3295. className="admin-desc-content"
  3296. width="1300px"
  3297. onCancel={() => {
  3298. this.loadData();
  3299. this.setState({
  3300. dvisible: false,
  3301. });
  3302. }}
  3303. >
  3304. <Spin spinning={this.state.loading}>
  3305. <div
  3306. className="patent-table"
  3307. style={{
  3308. // width: 900,
  3309. // position: "relative",
  3310. // left: "50%",
  3311. // transform: "translate(-50%)",
  3312. padding: "25px 0 30px 30px",
  3313. }}
  3314. ref={(e) => {
  3315. this.refs.all = e;
  3316. }}
  3317. >
  3318. <Table
  3319. columns={this.state.printColumns}
  3320. dataSource={this.state.dataSource}
  3321. pagination={false}
  3322. bordered
  3323. size="small"
  3324. />
  3325. </div>
  3326. </Spin>
  3327. <ReactToPrint
  3328. trigger={() => (
  3329. <Button
  3330. type="primary"
  3331. style={{
  3332. float: "right",
  3333. marginTop: 10,
  3334. position: "absolute",
  3335. top: 0,
  3336. right: 30,
  3337. }}
  3338. >
  3339. 打印
  3340. </Button>
  3341. )}
  3342. content={() => this.refs.all}
  3343. />
  3344. </Modal>
  3345. <Project
  3346. record={this.state.record}
  3347. visible={this.state.pvisible}
  3348. isAuditPayment={true}
  3349. cancel={() => {
  3350. this.setState({ pvisible: false });
  3351. }}
  3352. />
  3353. {/* 工时详情 */}
  3354. <Modal
  3355. visible={this.state.timeVisible}
  3356. footer=""
  3357. title="工时详情"
  3358. className="admin-desc-content"
  3359. width="1300px"
  3360. pagination={false}
  3361. onCancel={() => {
  3362. this.loadData();
  3363. this.setState({
  3364. timeVisible: false,
  3365. });
  3366. }}
  3367. >
  3368. <Spin spinning={this.state.loading}>
  3369. <div
  3370. className="patent-table"
  3371. style={
  3372. {
  3373. // width: 900,
  3374. // position: "relative",
  3375. // left: "50%",
  3376. // transform: "translate(-50%)",
  3377. // padding: "25px 0 30px 30px"
  3378. }
  3379. }
  3380. ref={(e) => {
  3381. this.refs.all = e;
  3382. }}
  3383. >
  3384. <Table
  3385. columns={this.state.timeColumns}
  3386. dataSource={this.state.timeDataList}
  3387. onRowClick={this.tableRowClickPro}
  3388. scroll={{ x: "max-content", y: 0 }}
  3389. pagination={false}
  3390. bordered
  3391. size="small"
  3392. />
  3393. </div>
  3394. </Spin>
  3395. <ReactToPrint
  3396. trigger={() => (
  3397. <Button
  3398. type="primary"
  3399. style={{
  3400. float: "right",
  3401. marginTop: 10,
  3402. position: "absolute",
  3403. top: 0,
  3404. right: 30,
  3405. }}
  3406. >
  3407. 打印
  3408. </Button>
  3409. )}
  3410. content={() => this.refs.all}
  3411. />
  3412. </Modal>
  3413. {/* 催款详情 */}
  3414. <Modal
  3415. visible={this.state.cuiVisible}
  3416. footer=""
  3417. title="催款详情"
  3418. className="admin-desc-content"
  3419. width="1300px"
  3420. pagination={false}
  3421. onCancel={() => {
  3422. this.loadData();
  3423. this.setState({
  3424. cuiVisible: false,
  3425. cuiTabKey: "1",
  3426. });
  3427. }}
  3428. >
  3429. <Tabs activeKey={this.state.cuiTabKey} onChange={this.cuiTabChange}>
  3430. <TabPane tab="催款节点" key="1">
  3431. <Spin spinning={this.state.loading}>
  3432. <div
  3433. className="patent-table"
  3434. ref={(e) => {
  3435. this.refs.all = e;
  3436. }}
  3437. >
  3438. <Table
  3439. columns={this.state.cuiColumns}
  3440. dataSource={this.state.cuiDataList}
  3441. scroll={{ x: "max-content", y: 0 }}
  3442. pagination={false}
  3443. bordered
  3444. size="small"
  3445. />
  3446. </div>
  3447. <ReactToPrint
  3448. trigger={() => (
  3449. <Button
  3450. type="primary"
  3451. style={{
  3452. float: "right",
  3453. marginTop: 10,
  3454. position: "absolute",
  3455. top: "-60px",
  3456. right: 30,
  3457. }}
  3458. >
  3459. 打印
  3460. </Button>
  3461. )}
  3462. content={() => this.refs.all}
  3463. />
  3464. </Spin>
  3465. </TabPane>
  3466. <TabPane tab="欠款催收记录" key="2">
  3467. <Spin spinning={this.state.loading}>
  3468. <div
  3469. className="patent-table"
  3470. ref={(e) => {
  3471. this.refs.all = e;
  3472. }}
  3473. >
  3474. <Table
  3475. columns={this.state.qianColumns}
  3476. dataSource={this.state.qianDataList}
  3477. scroll={{ x: "max-content", y: 0 }}
  3478. pagination={false}
  3479. bordered
  3480. size="small"
  3481. />
  3482. </div>
  3483. <ReactToPrint
  3484. trigger={() => (
  3485. <Button
  3486. type="primary"
  3487. style={{
  3488. float: "right",
  3489. marginTop: 10,
  3490. position: "absolute",
  3491. top: "-60px",
  3492. right: 30,
  3493. }}
  3494. >
  3495. 打印
  3496. </Button>
  3497. )}
  3498. content={() => this.refs.all}
  3499. />
  3500. </Spin>
  3501. </TabPane>
  3502. </Tabs>
  3503. </Modal>
  3504. {/* 项目进度 */}
  3505. <Modal
  3506. visible={this.state.proVisible}
  3507. footer=""
  3508. title="项目进度"
  3509. className="admin-desc-content"
  3510. width="1300px"
  3511. pagination={false}
  3512. onCancel={() => {
  3513. this.loadData(this.state.page);
  3514. this.setState({
  3515. proVisible: false,
  3516. });
  3517. }}
  3518. >
  3519. <Spin spinning={this.state.loading}>
  3520. <div
  3521. className="patent-table"
  3522. ref={(e) => {
  3523. this.refs.all = e;
  3524. }}
  3525. >
  3526. <Table
  3527. columns={this.state.proColumns}
  3528. dataSource={this.state.proDataList}
  3529. scroll={{ x: "max-content", y: 0 }}
  3530. onRowClick={this.tableRowClickPro}
  3531. pagination={false}
  3532. bordered
  3533. size="small"
  3534. />
  3535. </div>
  3536. <span style={{ display: "block", marginTop: 10, color: "red" }}>
  3537. 外包(内部)价格总计(万元):{this.state.totalWaibao}
  3538. </span>
  3539. </Spin>
  3540. <ReactToPrint
  3541. trigger={() => (
  3542. <Button
  3543. type="primary"
  3544. style={{
  3545. float: "right",
  3546. marginTop: 10,
  3547. position: "absolute",
  3548. top: 0,
  3549. right: 30,
  3550. }}
  3551. >
  3552. 打印
  3553. </Button>
  3554. )}
  3555. content={() => this.refs.all}
  3556. />
  3557. </Modal>
  3558. {/* 查看公出 */}
  3559. <Modal
  3560. visible={this.state.pubVisible}
  3561. footer=""
  3562. title={<span>公出详细列表(
  3563. {this.state.selectedRows.length > 0 && this.state.selectedRows[0].buyerName}
  3564. )</span>}
  3565. className="admin-desc-content"
  3566. width="1500px"
  3567. pagination={false}
  3568. onCancel={() => {
  3569. this.pubData();
  3570. this.setState({
  3571. pubVisible: false,
  3572. });
  3573. }}
  3574. >
  3575. <div
  3576. className="user-search"
  3577. style={{
  3578. marginTop: "10px",
  3579. marginLeft: "10px",
  3580. marginRight: "10px",
  3581. }}
  3582. >
  3583. <span style={{ marginRight: "10px" }}>
  3584. <Select
  3585. placeholder="请选择审核状态"
  3586. style={{ width: 120 }}
  3587. value={this.state.status}
  3588. onChange={(e) => {
  3589. this.setState({ status: e });
  3590. }}
  3591. >
  3592. {clockState.map((v, k) => (
  3593. <Select.Option key={k} value={v.id}>
  3594. {v.title}
  3595. </Select.Option>
  3596. ))}
  3597. </Select>
  3598. </span>
  3599. <span style={{ marginRight: "10px" }}>
  3600. <Select
  3601. placeholder="请选择打卡状态"
  3602. style={{ width: 120 }}
  3603. value={this.state.clockIn}
  3604. onChange={(e) => {
  3605. this.setState({ clockIn: e });
  3606. }}
  3607. >
  3608. <Select.Option value={1}>已打卡</Select.Option>
  3609. <Select.Option value={0}>未打卡</Select.Option>
  3610. </Select>
  3611. </span>
  3612. <span style={{ marginRight: "10px" }}>
  3613. <Select
  3614. placeholder="请选择公出类型"
  3615. style={{ width: 120 }}
  3616. value={this.state.type}
  3617. onChange={(e) => {
  3618. this.setState({ type: e });
  3619. }}
  3620. >
  3621. <Select.Option value={0}>业务打卡</Select.Option>
  3622. <Select.Option value={1}>技术打卡</Select.Option>
  3623. <Select.Option value={2}>行政打卡</Select.Option>
  3624. <Select.Option value={3}>技术协单</Select.Option>
  3625. </Select>
  3626. </span>
  3627. <span style={{ marginRight: "10px" }}>
  3628. <AutoComplete
  3629. className="certain-category-search"
  3630. dropdownClassName="certain-category-search-dropdown"
  3631. dropdownMatchSelectWidth={false}
  3632. style={{ width: "120px" }}
  3633. dataSource={options}
  3634. placeholder="输入公出申请人"
  3635. value={this.state.auto}
  3636. onChange={this.httpChange}
  3637. filterOption={true}
  3638. onBlur={this.blurChange}
  3639. onSelect={this.selectAuto}
  3640. >
  3641. <Input />
  3642. </AutoComplete>
  3643. </span>
  3644. <span style={{ marginRight: "10px" }}>
  3645. <AutoComplete
  3646. className="certain-category-search"
  3647. dropdownClassName="certain-category-search-dropdown"
  3648. dropdownMatchSelectWidth={false}
  3649. style={{ width: "120px" }}
  3650. dataSource={options1}
  3651. placeholder="输入跟单人"
  3652. value={this.state.auto1}
  3653. onChange={this.httpChange1}
  3654. filterOption={true}
  3655. onBlur={this.blurChange1}
  3656. onSelect={this.selectAuto1}
  3657. >
  3658. <Input />
  3659. </AutoComplete>
  3660. </span>
  3661. <span style={{ marginRight: "10px" }}>
  3662. <Select
  3663. placeholder="请选择公出部门"
  3664. style={{ width: 200 }}
  3665. value={this.state.depId}
  3666. onChange={(e) => {
  3667. this.setState({ depId: e });
  3668. }}
  3669. notFoundContent="未获取到上级组织列表"
  3670. >
  3671. {this.state.contactsOption}
  3672. </Select>
  3673. </span>
  3674. <span style={{ marginRight: "10px" }}>
  3675. <span style={{ marginRight: "5px", marginBottom: "10px" }}>
  3676. 公出时间 :
  3677. </span>
  3678. <RangePicker
  3679. style={{ marginRight: "10px", marginBottom: "10px" }}
  3680. value={[
  3681. this.state.releaseDate[0]
  3682. ? moment(this.state.releaseDate[0])
  3683. : null,
  3684. this.state.releaseDate[1]
  3685. ? moment(this.state.releaseDate[1])
  3686. : null,
  3687. ]}
  3688. onChange={(data, dataString) => {
  3689. this.setState({ releaseDate: dataString });
  3690. }}
  3691. />
  3692. </span>
  3693. <Button
  3694. type="primary"
  3695. onClick={() => {
  3696. this.pubData();
  3697. }}
  3698. style={{ marginRight: "10px", marginBottom: "10px" }}
  3699. >
  3700. 搜索
  3701. </Button>
  3702. <Button
  3703. onClick={this.resetAll}
  3704. style={{ marginRight: "10px", marginBottom: "10px" }}
  3705. >
  3706. 重置
  3707. </Button>
  3708. </div>
  3709. <Spin spinning={this.state.loading}>
  3710. <div
  3711. className="patent-table"
  3712. ref={(e) => {
  3713. this.refs.all = e;
  3714. }}
  3715. >
  3716. <Table
  3717. columns={this.state.pubColumns}
  3718. dataSource={this.state.pubDataList}
  3719. scroll={{ x: "max-content", y: 0 }}
  3720. pagination={false}
  3721. bordered
  3722. size="small"
  3723. />
  3724. </div>
  3725. </Spin>
  3726. <Button
  3727. type="primary"
  3728. style={{
  3729. float: "right",
  3730. marginTop: 10,
  3731. position: "absolute",
  3732. top: 0,
  3733. right: 120,
  3734. }}
  3735. loading={this.state.exportPendingLoading}
  3736. onClick={() => { this.pubexportExec() }}
  3737. >
  3738. 导出
  3739. </Button>
  3740. <ReactToPrint
  3741. trigger={() => (
  3742. <Button
  3743. type="primary"
  3744. style={{
  3745. float: "right",
  3746. marginTop: 10,
  3747. position: "absolute",
  3748. top: 0,
  3749. right: 30,
  3750. }}
  3751. >
  3752. 打印
  3753. </Button>
  3754. )}
  3755. content={() => this.refs.all}
  3756. />
  3757. </Modal>
  3758. <Spin spinning={this.state.loading}>
  3759. {this.state.checkVisible ? <Modal
  3760. title="审核订单"
  3761. visible={this.state.checkVisible}
  3762. onOk={this.checkOk}
  3763. confirmLoading={this.state.loading}
  3764. okText={"通过"}
  3765. onCancel={() => {
  3766. this.state.financeApprovalAjaxObj ? this.state.financeApprovalAjaxObj.abort() : null;
  3767. this.setState({
  3768. financeApprovalAjaxObj: null
  3769. })
  3770. this.loadData();
  3771. this.setState({
  3772. checkVisible: false,
  3773. checkData: "",
  3774. });
  3775. }}
  3776. >
  3777. <TextArea
  3778. value={this.state.checkData}
  3779. onChange={(e, recard) => {
  3780. this.setState({
  3781. checkData: e.target.value,
  3782. });
  3783. }}
  3784. placeholder="请填写审核内容"
  3785. />
  3786. </Modal> : <div />}
  3787. </Spin>
  3788. <KaiPiaoModal
  3789. visible={this.state.avisible}
  3790. data={this.state.modalData}
  3791. onCancel={this.visitCancels}
  3792. loading={this.state.loading}
  3793. />
  3794. {/* 合并查看 */}
  3795. {
  3796. this.state.newVisible != "" &&
  3797. <Modal
  3798. visible={this.state.newVisible != ""}
  3799. footer=""
  3800. title={this.state.newVisible}
  3801. className="admin-desc-content"
  3802. width="1500px"
  3803. pagination={false}
  3804. onCancel={() => {
  3805. this.setState({
  3806. newVisible: "",
  3807. });
  3808. }}
  3809. >
  3810. <Spin spinning={this.state.loading}>
  3811. <div style={{ margin: 20 }}>
  3812. <div style={{ marginBottom: 20 }}>
  3813. <Table
  3814. bordered
  3815. columns={this.state.columns}
  3816. dataSource={this.state.newData}
  3817. scroll={{ x: "max-content", y: 0 }}
  3818. pagination={false}
  3819. onRowDoubleClick={this.tableRowClick.bind(this)}
  3820. size="small"
  3821. />
  3822. </div>
  3823. <div>
  3824. <Button
  3825. type="primary"
  3826. style={{
  3827. margin: "11px 0px 10px 10px",
  3828. background: this.state.newVisible == "开票历史记录" ? "#f04134" : "",
  3829. }}
  3830. onClick={() => {
  3831. this.inRecordData();
  3832. this.setState({
  3833. newVisible: "开票历史记录"
  3834. });
  3835. }}
  3836. >
  3837. 查看开票详情
  3838. </Button>
  3839. <Button
  3840. type="primary"
  3841. style={{
  3842. margin: "11px 0px 10px 10px",
  3843. background: this.state.newVisible == "详细收款流水" ? "#f04134" : "",
  3844. }}
  3845. onClick={() => {
  3846. this.waterData();
  3847. this.setState({
  3848. newVisible: "详细收款流水",
  3849. });
  3850. }}
  3851. >
  3852. 详情收款流水
  3853. </Button>
  3854. <Button
  3855. type="primary"
  3856. style={{
  3857. margin: "11px 0px 10px 10px",
  3858. background: this.state.newVisible == "工时详情" ? "#f04134" : "",
  3859. }}
  3860. onClick={() => {
  3861. this.timeData();
  3862. this.setState({
  3863. newVisible: "工时详情",
  3864. });
  3865. }}
  3866. >
  3867. 工时信息
  3868. </Button>
  3869. <Button
  3870. type="primary"
  3871. style={{
  3872. margin: "11px 0px 10px 10px",
  3873. background: this.state.newVisible == "催款详情" ? "#f04134" : "",
  3874. }}
  3875. onClick={() => {
  3876. this.cuiData();
  3877. this.setState({
  3878. newVisible: "催款详情",
  3879. });
  3880. }}
  3881. >
  3882. 催款信息
  3883. </Button>
  3884. <Button
  3885. type="primary"
  3886. style={{
  3887. margin: "11px 0px 10px 10px",
  3888. background: this.state.newVisible == "项目进度" ? "#f04134" : "",
  3889. }}
  3890. onClick={() => {
  3891. this.proData();
  3892. this.setState({
  3893. newVisible: "项目进度",
  3894. });
  3895. }}
  3896. >
  3897. 项目进度
  3898. </Button>
  3899. <Button
  3900. type="primary"
  3901. style={{
  3902. margin: "11px 0px 10px 10px",
  3903. background: this.state.newVisible == "公出详细列表" ? "#f04134" : "",
  3904. }}
  3905. onClick={() => {
  3906. this.pubData();
  3907. this.selectSuperId();
  3908. this.setState({
  3909. newVisible: "公出详细列表",
  3910. });
  3911. }}
  3912. >
  3913. 查看公出
  3914. </Button>
  3915. </div>
  3916. {
  3917. this.state.newVisible == "公出详细列表" &&
  3918. <div
  3919. className="user-search"
  3920. style={{
  3921. marginTop: "10px",
  3922. marginLeft: "10px",
  3923. marginRight: "10px",
  3924. }}
  3925. >
  3926. <span style={{ marginRight: "10px" }}>
  3927. <Select
  3928. placeholder="请选择审核状态"
  3929. style={{ width: 120 }}
  3930. value={this.state.status}
  3931. onChange={(e) => {
  3932. this.setState({ status: e });
  3933. }}
  3934. >
  3935. {clockState.map((v, k) => (
  3936. <Select.Option key={k} value={v.id}>
  3937. {v.title}
  3938. </Select.Option>
  3939. ))}
  3940. </Select>
  3941. </span>
  3942. <span style={{ marginRight: "10px" }}>
  3943. <Select
  3944. placeholder="请选择打卡状态"
  3945. style={{ width: 120 }}
  3946. value={this.state.clockIn}
  3947. onChange={(e) => {
  3948. this.setState({ clockIn: e });
  3949. }}
  3950. >
  3951. <Select.Option value={1}>已打卡</Select.Option>
  3952. <Select.Option value={0}>未打卡</Select.Option>
  3953. </Select>
  3954. </span>
  3955. <span style={{ marginRight: "10px" }}>
  3956. <Select
  3957. placeholder="请选择公出类型"
  3958. style={{ width: 120 }}
  3959. value={this.state.type}
  3960. onChange={(e) => {
  3961. this.setState({ type: e });
  3962. }}
  3963. >
  3964. <Select.Option value={0}>业务打卡</Select.Option>
  3965. <Select.Option value={1}>技术打卡</Select.Option>
  3966. <Select.Option value={2}>行政打卡</Select.Option>
  3967. <Select.Option value={3}>技术协单</Select.Option>
  3968. </Select>
  3969. </span>
  3970. <span style={{ marginRight: "10px" }}>
  3971. <AutoComplete
  3972. className="certain-category-search"
  3973. dropdownClassName="certain-category-search-dropdown"
  3974. dropdownMatchSelectWidth={false}
  3975. style={{ width: "120px" }}
  3976. dataSource={options}
  3977. placeholder="输入公出申请人"
  3978. value={this.state.auto}
  3979. onChange={this.httpChange}
  3980. filterOption={true}
  3981. onBlur={this.blurChange}
  3982. onSelect={this.selectAuto}
  3983. >
  3984. <Input />
  3985. </AutoComplete>
  3986. </span>
  3987. <span style={{ marginRight: "10px" }}>
  3988. <AutoComplete
  3989. className="certain-category-search"
  3990. dropdownClassName="certain-category-search-dropdown"
  3991. dropdownMatchSelectWidth={false}
  3992. style={{ width: "120px" }}
  3993. dataSource={options1}
  3994. placeholder="输入跟单人"
  3995. value={this.state.auto1}
  3996. onChange={this.httpChange1}
  3997. filterOption={true}
  3998. onBlur={this.blurChange1}
  3999. onSelect={this.selectAuto1}
  4000. >
  4001. <Input />
  4002. </AutoComplete>
  4003. </span>
  4004. <span style={{ marginRight: "10px" }}>
  4005. <Select
  4006. placeholder="请选择公出部门"
  4007. style={{ width: 200 }}
  4008. value={this.state.depId}
  4009. onChange={(e) => {
  4010. this.setState({ depId: e });
  4011. }}
  4012. notFoundContent="未获取到上级组织列表"
  4013. >
  4014. {this.state.contactsOption}
  4015. </Select>
  4016. </span>
  4017. <span style={{ marginRight: "10px" }}>
  4018. <span style={{ marginRight: "5px", marginBottom: "10px" }}>
  4019. 公出时间 :
  4020. </span>
  4021. <RangePicker
  4022. style={{ marginRight: "10px", marginBottom: "10px" }}
  4023. value={[
  4024. this.state.releaseDate[0]
  4025. ? moment(this.state.releaseDate[0])
  4026. : null,
  4027. this.state.releaseDate[1]
  4028. ? moment(this.state.releaseDate[1])
  4029. : null,
  4030. ]}
  4031. onChange={(data, dataString) => {
  4032. this.setState({ releaseDate: dataString });
  4033. }}
  4034. />
  4035. </span>
  4036. <Button
  4037. type="primary"
  4038. onClick={() => {
  4039. this.pubData();
  4040. }}
  4041. style={{ marginRight: "10px", marginBottom: "10px" }}
  4042. >
  4043. 搜索
  4044. </Button>
  4045. <Button
  4046. onClick={this.resetAll}
  4047. style={{ marginRight: "10px", marginBottom: "10px" }}
  4048. >
  4049. 重置
  4050. </Button>
  4051. </div>
  4052. }
  4053. {
  4054. this.state.newVisible == "催款详情"
  4055. ? <Tabs activeKey={this.state.cuiTabKey} onChange={this.cuiTabChange}>
  4056. <TabPane tab="催款节点" key="1">
  4057. <Spin spinning={this.state.loading}>
  4058. <div
  4059. className="patent-table"
  4060. ref={(e) => {
  4061. this.refs.all = e;
  4062. }}
  4063. >
  4064. <Table
  4065. columns={this.state.cuiColumns}
  4066. dataSource={this.state.cuiDataList}
  4067. scroll={{ x: "max-content", y: 0 }}
  4068. pagination={false}
  4069. bordered
  4070. size="small"
  4071. />
  4072. </div>
  4073. <Button
  4074. type="primary"
  4075. style={{
  4076. float: "right",
  4077. marginTop: 10,
  4078. position: "absolute",
  4079. top: "-60px",
  4080. right: "100px",
  4081. }}
  4082. loading={this.state.exportPendingLoading}
  4083. onClick={() => { this.exportCui() }}
  4084. >
  4085. 导出
  4086. </Button>
  4087. <ReactToPrint
  4088. trigger={() => (
  4089. <Button
  4090. type="primary"
  4091. style={{
  4092. float: "right",
  4093. marginTop: 10,
  4094. position: "absolute",
  4095. top: "-60px",
  4096. right: "10px",
  4097. }}
  4098. >
  4099. 打印
  4100. </Button>
  4101. )}
  4102. content={() => this.refs.all}
  4103. />
  4104. </Spin>
  4105. </TabPane>
  4106. <TabPane tab="欠款催收记录" key="2">
  4107. <Spin spinning={this.state.loading}>
  4108. <div
  4109. className="patent-table"
  4110. ref={(e) => {
  4111. this.refs.all = e;
  4112. }}
  4113. >
  4114. <Table
  4115. columns={this.state.qianColumns}
  4116. dataSource={this.state.qianDataList}
  4117. scroll={{ x: "max-content", y: 0 }}
  4118. pagination={false}
  4119. bordered
  4120. size="small"
  4121. />
  4122. </div>
  4123. <ReactToPrint
  4124. trigger={() => (
  4125. <Button
  4126. type="primary"
  4127. style={{
  4128. float: "right",
  4129. marginTop: 10,
  4130. position: "absolute",
  4131. top: "-60px",
  4132. right: "10px",
  4133. }}
  4134. >
  4135. 打印
  4136. </Button>
  4137. )}
  4138. content={() => this.refs.all}
  4139. />
  4140. </Spin>
  4141. </TabPane>
  4142. </Tabs>
  4143. : <div
  4144. className="patent-table"
  4145. style={{ position: "relative" }}
  4146. ref={(e) => {
  4147. this.refs.all = e;
  4148. }}
  4149. >
  4150. <Table
  4151. bordered
  4152. columns={
  4153. this.state.newVisible == "开票历史记录"
  4154. ? this.state.columnsDate : this.state.newVisible == "详细收款流水"
  4155. ? this.state.waterlistDate : this.state.newVisible == "工时详情"
  4156. ? this.state.timeColumns : this.state.newVisible == "催款详情"
  4157. ? this.state.cuiColumns : this.state.newVisible == "项目进度"
  4158. ? this.state.proColumns : this.state.newVisible == "公出详细列表"
  4159. && this.state.pubColumns
  4160. }
  4161. dataSource={
  4162. this.state.newVisible == "开票历史记录"
  4163. ? this.state.recordData : this.state.newVisible == "详细收款流水"
  4164. ? this.state.waterData : this.state.newVisible == "工时详情"
  4165. ? this.state.timeDataList : this.state.newVisible == "催款详情"
  4166. ? this.state.cuiDataList : this.state.newVisible == "项目进度"
  4167. ? this.state.proDataList : this.state.newVisible == "公出详细列表"
  4168. && this.state.pubDataList
  4169. }
  4170. pagination={false}
  4171. scroll={{ x: "max-content", y: 0 }}
  4172. size="small"
  4173. onRowClick={this.tableonRowClick.bind(this)}
  4174. />
  4175. {
  4176. this.state.newVisible == "开票历史记录" &&
  4177. <div className="clearfix" style={{ marginTop: "20px" }}>
  4178. <FormItem
  4179. className="half-item"
  4180. {...formItemLayout}
  4181. label={<span style={{ fontSize: "14px" }}>开票总计</span>}
  4182. >
  4183. <span>{this.state.sum + "(万元)"}</span>
  4184. </FormItem>
  4185. </div>
  4186. }
  4187. {
  4188. this.state.newVisible == "开票历史记录" &&
  4189. <Button
  4190. type="primary"
  4191. style={{
  4192. float: "right",
  4193. position: "absolute",
  4194. top: "-40px",
  4195. right: "100px",
  4196. }}
  4197. loading={this.state.exportPendingLoading}
  4198. onClick={() => { this.exportKaip() }}
  4199. >
  4200. 导出
  4201. </Button>
  4202. }
  4203. {
  4204. this.state.newVisible == "开票历史记录" &&
  4205. <ReactToPrint
  4206. trigger={() => (
  4207. <Button type="primary"
  4208. style={{
  4209. float: "right",
  4210. position: "absolute",
  4211. top: "-40px",
  4212. right: "10px",
  4213. }}
  4214. >打印</Button>
  4215. )}
  4216. content={() => this.refs.kaiPiao}
  4217. />
  4218. }
  4219. {
  4220. this.state.newVisible == "详细收款流水" &&
  4221. <div className="clearfix" style={{ marginTop: "20px" }}>
  4222. <FormItem
  4223. className="half-item"
  4224. {...formItemLayout}
  4225. label={<span style={{ fontSize: "14px" }}>总计金额</span>}
  4226. >
  4227. <span>{this.state.waterSum + "(万元)"}</span>
  4228. </FormItem>
  4229. </div>
  4230. }
  4231. {
  4232. this.state.newVisible == "详细收款流水" &&
  4233. <Button
  4234. type="primary"
  4235. style={{
  4236. float: "right",
  4237. position: "absolute",
  4238. top: "-40px",
  4239. right: "100px",
  4240. }}
  4241. loading={this.state.exportPendingLoading}
  4242. onClick={() => { this.exportWater() }}
  4243. >
  4244. 导出
  4245. </Button>
  4246. }
  4247. {
  4248. this.state.newVisible == "详细收款流水" &&
  4249. <ReactToPrint
  4250. trigger={() => (
  4251. <Button
  4252. type="primary"
  4253. style={{
  4254. float: "right",
  4255. position: "absolute",
  4256. top: "-40px",
  4257. right: "10px",
  4258. }}
  4259. >
  4260. 打印
  4261. </Button>
  4262. )}
  4263. content={() => this.refs.shouKuan}
  4264. />
  4265. }
  4266. {
  4267. this.state.newVisible == "工时详情" &&
  4268. <Button
  4269. type="primary"
  4270. style={{
  4271. float: "right",
  4272. position: "absolute",
  4273. top: "-40px",
  4274. right: "100px",
  4275. }}
  4276. loading={this.state.exportPendingLoading}
  4277. onClick={() => { this.exportTime() }}
  4278. >
  4279. 导出
  4280. </Button>
  4281. }
  4282. {
  4283. this.state.newVisible == "工时详情" &&
  4284. <ReactToPrint
  4285. trigger={() => (
  4286. <Button
  4287. type="primary"
  4288. style={{
  4289. float: "right",
  4290. position: "absolute",
  4291. top: "-40px",
  4292. right: "10px",
  4293. }}
  4294. >
  4295. 打印
  4296. </Button>
  4297. )}
  4298. content={() => this.refs.all}
  4299. />
  4300. }
  4301. {
  4302. this.state.newVisible == "项目进度" &&
  4303. <span style={{ display: "block", marginTop: 10, color: "red" }}>
  4304. 外包(内部)价格总计(万元):{this.state.totalWaibao}
  4305. </span>
  4306. }
  4307. {
  4308. this.state.newVisible == "项目进度" &&
  4309. <Button
  4310. type="primary"
  4311. style={{
  4312. float: "right",
  4313. position: "absolute",
  4314. top: "-40px",
  4315. right: "100px",
  4316. }}
  4317. loading={this.state.exportPendingLoading}
  4318. onClick={() => { this.exportPro() }}
  4319. >
  4320. 导出
  4321. </Button>
  4322. }
  4323. {
  4324. this.state.newVisible == "项目进度" &&
  4325. <ReactToPrint
  4326. trigger={() => (
  4327. <Button
  4328. type="primary"
  4329. style={{
  4330. float: "right",
  4331. position: "absolute",
  4332. top: "-40px",
  4333. right: "10px",
  4334. }}
  4335. >
  4336. 打印
  4337. </Button>
  4338. )}
  4339. content={() => this.refs.all}
  4340. />
  4341. }
  4342. {
  4343. this.state.newVisible == "公出详细列表" &&
  4344. <Button
  4345. type="primary"
  4346. style={{
  4347. float: "right",
  4348. position: "absolute",
  4349. top: "-90px",
  4350. right: "100px",
  4351. }}
  4352. loading={this.state.exportPendingLoading}
  4353. onClick={() => { this.pubexportExec() }}
  4354. >
  4355. 导出
  4356. </Button>
  4357. }
  4358. {
  4359. this.state.newVisible == "公出详细列表" &&
  4360. <ReactToPrint
  4361. trigger={() => (
  4362. <Button
  4363. type="primary"
  4364. style={{
  4365. float: "right",
  4366. position: "absolute",
  4367. top: "-90px",
  4368. right: "10px",
  4369. }}
  4370. >
  4371. 打印
  4372. </Button>
  4373. )}
  4374. content={() => this.refs.all}
  4375. />
  4376. }
  4377. </div>
  4378. }
  4379. </div>
  4380. </Spin>
  4381. </Modal>
  4382. }
  4383. <textarea id="copyText" style={{ opacity: 0 }} />
  4384. </div>
  4385. );
  4386. },
  4387. });
  4388. export default ShouKuang;