addService.jsx 202 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592
  1. import React from "react";
  2. import {
  3. Table,
  4. Modal,
  5. message,
  6. Spin,
  7. Input,
  8. Select,
  9. Button,
  10. Form,
  11. Upload,
  12. Popconfirm,
  13. AutoComplete,
  14. DatePicker,
  15. Col,
  16. Tabs,
  17. Tag
  18. } from "antd";
  19. import $ from "jquery/src/ajax";
  20. import "../userMangagement.less";
  21. import "../billing.less";
  22. import moment from "moment";
  23. import Picture from "@/manageCenter/publicComponent/picture";
  24. import OrderRiZi from "@/orderRiZi.jsx";
  25. import {
  26. orderTypes,
  27. customerType,
  28. jiedian,
  29. tepi,
  30. boutique,
  31. } from "../../../dataDic.js";
  32. import {
  33. splitUrl,
  34. getProcessStatus,
  35. getLiquidationStatus,
  36. getboutique,
  37. getApprovedState,
  38. getjiedian,
  39. getCuikuan,
  40. getProjectStatus,
  41. moneyVerify,
  42. getProcessStatusNew
  43. } from "../../../tools.js";
  44. import { cuiJieDian } from "@/dataDic.js"
  45. import PicturesWall from "./changeComponent/picturesWall.js";
  46. import { changeType, getChangeType } from "./changeComponent/changeDetailYxgly";
  47. // const Options = Select.Option;
  48. const Option = AutoComplete.Option;
  49. const confirm = Modal.confirm;
  50. const NewService = Form.create()(
  51. React.createClass({
  52. //查看项目列表
  53. loadData(record) {
  54. this.state.data = [];
  55. this.setState({
  56. loading: true
  57. });
  58. $.ajax({
  59. method: "get",
  60. dataType: "json",
  61. crossDomain: false,
  62. url: globalConfig.context + "/api/admin/newOrder/getOrderTask",
  63. data: {
  64. orderNo: record ? record.orderNo : this.props.datauser.orderNo
  65. },
  66. success: function (data) {
  67. let theArr = [];
  68. if (!data.data) {
  69. if (data.error && data.error.length) {
  70. message.warning(data.error[0].message);
  71. }
  72. } else {
  73. for (let i = 0; i < data.data.length; i++) {
  74. let thisdata = data.data[i];
  75. theArr.push({
  76. key: i,
  77. id: thisdata.id,
  78. orderNo: thisdata.orderNo, //订单编号
  79. commodityId: thisdata.commodityId, //项目ID
  80. commodityName: thisdata.commodityName, //项目名称
  81. cname: thisdata.cname, //项目类别
  82. commodityPrice: thisdata.commodityPrice, //项目价格
  83. commodityQuantity: thisdata.commodityQuantity, //项目数量
  84. main: thisdata.main, //是否为主要任务
  85. taskComment: thisdata.taskComment, //任务说明
  86. contacts: thisdata.contacts, //联系人
  87. contactsMobile: thisdata.contactsMobile, //联系人电话
  88. projectStatus: thisdata.projectStatus, //项目状态
  89. sort: thisdata.cSort
  90. });
  91. }
  92. }
  93. this.departmentList();
  94. this.setState({
  95. dataSource: theArr,
  96. pagination: false,
  97. // 禁用变更类型
  98. changeFlag: false
  99. });
  100. }.bind(this)
  101. }).always(
  102. function () {
  103. this.setState({
  104. loading: false
  105. });
  106. }.bind(this)
  107. );
  108. },
  109. //收款节点
  110. loadDatas(record) {
  111. this.state.data = [];
  112. this.setState({
  113. loading: true
  114. });
  115. $.ajax({
  116. method: "get",
  117. dataType: "json",
  118. crossDomain: false,
  119. url: globalConfig.context + "/api/admin/newOrder/selectOrderDun",
  120. data: {
  121. orderNo: record ? record.orderNo : this.props.datauser.orderNo
  122. },
  123. success: function (data) {
  124. let theArr = [];
  125. if (!data.data) {
  126. if (data.error && data.error.length) {
  127. message.warning(data.error[0].message);
  128. }
  129. } else {
  130. for (let i = 0; i < data.data.length; i++) {
  131. let thisdata = data.data[i];
  132. theArr.push({
  133. key: i,
  134. id: thisdata.id
  135. });
  136. }
  137. }
  138. this.setState({
  139. dataSource: theArr,
  140. pagination: false
  141. });
  142. }.bind(this)
  143. }).always(
  144. function () {
  145. this.setState({
  146. loading: false
  147. });
  148. }.bind(this)
  149. );
  150. },
  151. getInitialState() {
  152. return {
  153. isCaoGao: false,
  154. cuiFlag: false,
  155. startRemarks: "",
  156. remarksC: "",
  157. loading: false,
  158. visible: false,
  159. cuiDataSource: [],
  160. status: 4,
  161. orgCodeUrl: [],
  162. voucherUrl: [],
  163. customerArr: [],
  164. // 禁用变更类型转换
  165. changeFlag: false,
  166. // 合同额禁用
  167. hetongFlag: true,
  168. // 项目及催款禁用
  169. listFlag: true,
  170. mark: false,
  171. activeKey: "1",
  172. typeChange: [],
  173. bussStats: false,
  174. checkedKeys: [],
  175. lookflowList: [],
  176. contractUrl: [],
  177. applicationUrl: [],
  178. changeAmount: "0",
  179. active: {
  180. applySign: false
  181. },
  182. lookState: false,
  183. signBillVisible: false,
  184. commod: "",
  185. columns: [
  186. {
  187. title: "业务项目名称",
  188. dataIndex: "commodityName",
  189. key: "commodityName"
  190. },
  191. {
  192. title: "项目类别",
  193. dataIndex: "cname",
  194. key: "cname"
  195. },
  196. {
  197. title: "项目数量",
  198. dataIndex: "commodityQuantity",
  199. key: "commodityQuantity"
  200. },
  201. {
  202. title: "金额(万元)",
  203. dataIndex: "commodityPrice",
  204. key: "commodityPrice"
  205. },
  206. {
  207. title: "负责人",
  208. dataIndex: "contacts",
  209. key: "contacts"
  210. },
  211. {
  212. title: "负责人电话",
  213. dataIndex: "contactsMobile",
  214. key: "contactsMobile"
  215. },
  216. {
  217. title: "项目状态",
  218. dataIndex: "projectStatus",
  219. key: "projectStatus",
  220. render: text => {
  221. return getProjectStatus(text);
  222. }
  223. },
  224. {
  225. title: "主要项目",
  226. dataIndex: "main",
  227. key: "main",
  228. render: text => {
  229. return text ? "是" : "否";
  230. }
  231. },
  232. {
  233. title: "项目说明",
  234. dataIndex: "taskComment",
  235. key: "taskComment",
  236. render: text => {
  237. return text && text.length > 8 ? text.substr(0, 8) + "…" : text;
  238. }
  239. },
  240. {
  241. title: "操作",
  242. dataIndex: "ABC",
  243. key: "ABC",
  244. render: (text, record) => {
  245. return (
  246. <div>
  247. {this.state.processStatus == 0 ? (
  248. <Button
  249. onClick={e => {
  250. e.stopPropagation();
  251. this.showConfirm(this.delectRow, record);
  252. }}
  253. >
  254. 删除
  255. </Button>
  256. ) : (
  257. ""
  258. )}
  259. </div>
  260. );
  261. }
  262. }
  263. ],
  264. proColumns: [
  265. {
  266. title: "变更状态",
  267. dataIndex: "type",
  268. key: "type",
  269. render: text => {
  270. let str = "";
  271. let color = "";
  272. if (text == 1) {
  273. str = "增";
  274. color = "#87d068";
  275. } else if (text == 2) {
  276. str = "改";
  277. color = "#108ee9";
  278. } else if (text == 3) {
  279. str = "删";
  280. color = "#f50";
  281. }
  282. return (
  283. <Tag
  284. color={color}
  285. style={{ display: text == 0 ? "none" : "inline-block" }}
  286. >
  287. {str}
  288. </Tag>
  289. );
  290. }
  291. },
  292. {
  293. title: "业务项目名称",
  294. dataIndex: "commodityName",
  295. key: "commodityName"
  296. },
  297. {
  298. title: "项目类别",
  299. dataIndex: "cname",
  300. key: "cname"
  301. },
  302. {
  303. title: "项目数量",
  304. dataIndex: "commodityQuantity",
  305. key: "commodityQuantity"
  306. },
  307. {
  308. title: "金额(万元)",
  309. dataIndex: "commodityPrice",
  310. key: "commodityPrice"
  311. },
  312. {
  313. title: "主要项目",
  314. dataIndex: "main",
  315. key: "main",
  316. render: text => {
  317. return text ? "是" : "否";
  318. }
  319. },
  320. {
  321. title: "项目说明",
  322. dataIndex: "taskComment",
  323. key: "taskComment",
  324. render: text => {
  325. return text && text.length > 8 ? text.substr(0, 8) + "…" : text;
  326. }
  327. },
  328. {
  329. title: "操作",
  330. dataIndex: "ABC",
  331. key: "ABC",
  332. render: (text, record) => {
  333. return (
  334. <div>
  335. <Button
  336. onClick={e => {
  337. e.stopPropagation();
  338. this.showConfirm(this.changeDeletePro, record);
  339. }}
  340. disabled={this.state.listFlag}
  341. style={{
  342. display: this.state.displayList ? "none" : "block"
  343. }}
  344. >
  345. 删除
  346. </Button>
  347. </div>
  348. );
  349. }
  350. }
  351. ],
  352. detailColumns: [
  353. {
  354. title: "变更状态",
  355. dataIndex: "type",
  356. key: "type",
  357. render: text => {
  358. let str = "";
  359. let color = "";
  360. if (text == 1) {
  361. str = "增";
  362. color = "#87d068";
  363. } else if (text == 2) {
  364. str = "改";
  365. color = "#108ee9";
  366. } else if (text == 3) {
  367. str = "删";
  368. color = "#f50";
  369. }
  370. return (
  371. <Tag
  372. color={color}
  373. style={{ display: text == 0 ? "none" : "inline-block" }}
  374. >
  375. {str}
  376. </Tag>
  377. );
  378. }
  379. },
  380. {
  381. title: "业务项目名称",
  382. dataIndex: "commodityName",
  383. key: "commodityName"
  384. // render: (text, record) => {
  385. // let str = "";
  386. // let color = "";
  387. // if (record.type == 1) {
  388. // str = "增";
  389. // color = "#87d068";
  390. // } else if (record.type == 2) {
  391. // str = "改";
  392. // color = "#108ee9";
  393. // } else if (record.type == 3) {
  394. // str = "删";
  395. // color = "#f50";
  396. // }
  397. // if (record.type == 0) {
  398. // return <span>{text}</span>;
  399. // } else {
  400. // return (
  401. // <span>
  402. // <Tag color={color}>{str}</Tag>
  403. // {text}
  404. // </span>
  405. // );
  406. // }
  407. // }
  408. },
  409. {
  410. title: "项目类别",
  411. dataIndex: "cname",
  412. key: "cname"
  413. },
  414. {
  415. title: "项目数量",
  416. dataIndex: "commodityQuantity",
  417. key: "commodityQuantity"
  418. },
  419. {
  420. title: "金额(万元)",
  421. dataIndex: "commodityPrice",
  422. key: "commodityPrice",
  423. render: text => {
  424. if (this.props.isZxs) {
  425. return <span>***</span>;
  426. } else {
  427. return <span>{text}</span>
  428. }
  429. }
  430. },
  431. {
  432. title: "主要项目",
  433. dataIndex: "main",
  434. key: "main",
  435. render: text => {
  436. return text ? "是" : "否";
  437. }
  438. },
  439. {
  440. title: "项目说明",
  441. dataIndex: "taskComment",
  442. key: "taskComment",
  443. render: text => {
  444. return text && text.length > 8 ? text.substr(0, 8) + "…" : text;
  445. }
  446. }
  447. ],
  448. detailContactsLists: [
  449. {
  450. title: "变更状态",
  451. dataIndex: "type",
  452. key: "type",
  453. render: text => {
  454. let str = "";
  455. let color = "";
  456. if (text == 1) {
  457. str = "增";
  458. color = "#87d068";
  459. } else if (text == 2) {
  460. str = "改";
  461. color = "#108ee9";
  462. } else if (text == 3) {
  463. str = "删";
  464. color = "#f50";
  465. }
  466. return (
  467. <Tag
  468. color={color}
  469. style={{ display: text == 0 ? "none" : "inline-block" }}
  470. >
  471. {str}
  472. </Tag>
  473. );
  474. }
  475. },
  476. {
  477. title: "项目名称",
  478. dataIndex: "commodityName",
  479. key: "commodityName"
  480. // render: (text, record) => {
  481. // let str = "";
  482. // let color = "";
  483. // if (record.type == 1) {
  484. // str = "增";
  485. // color = "#87d068";
  486. // } else if (record.type == 2) {
  487. // str = "改";
  488. // color = "#108ee9";
  489. // } else if (record.type == 3) {
  490. // str = "删";
  491. // color = "#f50";
  492. // }
  493. // if (record.type == 0) {
  494. // return <span>{text}</span>;
  495. // } else {
  496. // return (
  497. // <span>
  498. // <Tag color={color}>{str}</Tag>
  499. // {text}
  500. // </span>
  501. // );
  502. // }
  503. // }
  504. },
  505. {
  506. title: "项目分类",
  507. dataIndex: "projectType",
  508. key: "projectType",
  509. render: text => {
  510. let arr = this.state.proDataSource || [];
  511. let str = "";
  512. for (let i = 0; i < arr.length; i++) {
  513. if (this.state.proDataSource[i].cSort == text) {
  514. str = this.state.proDataSource[i].cname;
  515. return <span>{str}</span>;
  516. }
  517. }
  518. }
  519. },
  520. {
  521. title: "催款科目",
  522. dataIndex: "dunTypeName",
  523. key: "dunTypeName",
  524. render: text => {
  525. return <span>{text}</span>;
  526. }
  527. },
  528. {
  529. title: "时间",
  530. dataIndex: "waitDay",
  531. key: "waitDay",
  532. render: (text, record) => {
  533. if (record.dunTypeName) {
  534. return <span>{text}</span>;
  535. }
  536. }
  537. },
  538. {
  539. title: "金额(万元)",
  540. dataIndex: "money",
  541. key: "money",
  542. render: (text, record) => {
  543. if (record.dunTypeName) {
  544. if (record.appropriationRatio && !record.money) {
  545. return <span>{record.appropriationRatio}(拨款比例)</span>;
  546. } else if (record.appropriationRatio && record.money) {
  547. return (
  548. <span>
  549. {text}(比例:{record.appropriationRatio})
  550. </span>
  551. );
  552. } else {
  553. if (this.props.isZxs) {
  554. return <span>***</span>
  555. }
  556. return <span>{text}</span>;
  557. }
  558. }
  559. }
  560. },
  561. {
  562. title: "服务年限",
  563. dataIndex: "startDate",
  564. key: "startDate",
  565. render: (text, record) => {
  566. if (record.dunTypeName) {
  567. return <span>{text}</span>;
  568. }
  569. }
  570. },
  571. {
  572. title: "催款状态",
  573. dataIndex: "status",
  574. key: "status",
  575. render: text => {
  576. return <span>{text == 1 ? "已启动" : "未启动"}</span>;
  577. }
  578. }
  579. ],
  580. columnsrizhi: [
  581. {
  582. title: "流程",
  583. dataIndex: "processName",
  584. key: "processName"
  585. },
  586. {
  587. title: "操作人",
  588. dataIndex: "adminName",
  589. key: "adminName"
  590. },
  591. {
  592. title: "时间",
  593. dataIndex: "createDate",
  594. key: "createDate"
  595. }
  596. ],
  597. contactList: [],
  598. loading: false,
  599. ContactsLists: [
  600. {
  601. title: "催款科目",
  602. dataIndex: "dunSubject",
  603. key: "dunSubject",
  604. render: (text, record) => {
  605. return (
  606. <Select
  607. placeholder="请选择催款科目"
  608. value={record.dunSubject}
  609. style={{ width: "150px" }}
  610. disabled
  611. onChange={e => {
  612. record.dunSubject = e;
  613. this.setState({ contactList: this.state.contactList });
  614. }}
  615. >
  616. {jiedian.map(function (item) {
  617. return (
  618. <Select.Option key={item.value}>{item.key}</Select.Option>
  619. );
  620. })}
  621. </Select>
  622. );
  623. }
  624. },
  625. {
  626. title: "金额(万元)",
  627. dataIndex: "money",
  628. key: "money",
  629. render: (text, record) => {
  630. return (
  631. <Input
  632. value={record.money}
  633. placeholder="请输入金额(必填项)"
  634. disabled
  635. key={record.id}
  636. required="required"
  637. onChange={e => {
  638. record.money = e.target.value;
  639. this.setState({ contactList: this.state.contactList });
  640. }}
  641. style={{ width: "120px" }}
  642. />
  643. );
  644. }
  645. },
  646. {
  647. title: "催款状态",
  648. dataIndex: "dunStatus",
  649. key: "dunStatus",
  650. render: text => {
  651. return getCuikuan(text);
  652. }
  653. },
  654. {
  655. title: "操作",
  656. dataIndex: "dels",
  657. key: "dels",
  658. render: (text, record) => {
  659. return (
  660. <div>
  661. {
  662. <Popconfirm
  663. title="是否删除?"
  664. onConfirm={() => {
  665. this.confirmDelet(record.key);
  666. }}
  667. okText="删除"
  668. cancelText="不删除"
  669. >
  670. <Button
  671. style={{
  672. marginRight: "10px",
  673. color: "#ffffff",
  674. background: "#f00",
  675. border: "none",
  676. display:
  677. this.state.processStatus == 0 ? "block" : "none"
  678. }}
  679. >
  680. 删除
  681. </Button>
  682. </Popconfirm>
  683. }
  684. {record.id ? (
  685. ""
  686. ) : (
  687. <Button type="primary" onClick={this.contactSave}>
  688. 保存
  689. </Button>
  690. )}
  691. </div>
  692. );
  693. }
  694. }
  695. ],
  696. ContactsListsNew: [
  697. {
  698. title: "项目名称",
  699. dataIndex: "commodityName",
  700. key: "commodityName",
  701. render: (text, record, index) => {
  702. let dataArr = this.state.dataSource || [];
  703. if (text) {
  704. return <span>{text}</span>;
  705. }
  706. return (
  707. <Select
  708. placeholder="请选择名称"
  709. style={{ width: "150px" }}
  710. disabled={
  711. this.state.getLoad && record.sortName ? true : false
  712. }
  713. onChange={e => {
  714. record.sortName = e;
  715. dataArr.forEach(item => {
  716. if (item.commodityName == record.sortName) {
  717. record.cname = item.cname;
  718. record.tid = item.id;
  719. record.isSave = true;
  720. record.sort = item.sort;
  721. cuiJieDian.forEach(item => {
  722. if (item.value == record.sort) {
  723. record.arr = item.children;
  724. let yearFlag = true;
  725. if (record.sort == 6) {
  726. yearFlag = false;
  727. }
  728. this.setState({
  729. getLoad: true,
  730. yearFlag
  731. });
  732. }
  733. });
  734. }
  735. });
  736. }}
  737. >
  738. {dataArr.map(item => {
  739. return (
  740. <Select.Option key={item.id} value={item.commodityName}>
  741. {item.commodityName}
  742. </Select.Option>
  743. );
  744. })}
  745. </Select>
  746. );
  747. }
  748. },
  749. {
  750. title: "项目分类",
  751. dataIndex: "projectType",
  752. key: "projectType",
  753. render: (text, record) => {
  754. if (text) {
  755. let arr = this.state.dataSource || [];
  756. let str = "";
  757. for (let i = 0; i < arr.length; i++) {
  758. if (this.state.dataSource[i].sort == text) {
  759. str = this.state.dataSource[i].cname;
  760. return <span>{str}</span>;
  761. }
  762. }
  763. }
  764. if (this.state.getLoad) {
  765. return (
  766. <Select
  767. style={{ width: "150px" }}
  768. placeholder="请选择分类"
  769. value={record.cname}
  770. >
  771. <Select.Option key={record.sort} value={record.cname}>
  772. {record.cname}
  773. </Select.Option>
  774. </Select>
  775. );
  776. } else {
  777. return (
  778. <Select style={{ width: "150px" }} placeholder="请选择分类">
  779. <Select.Option key={record.sort} value={record.cname}>
  780. {record.cname}
  781. </Select.Option>
  782. </Select>
  783. );
  784. }
  785. }
  786. },
  787. {
  788. title: "催款科目",
  789. dataIndex: "dunTypeName",
  790. key: "dunTypeName",
  791. render: (text, record) => {
  792. if (text) {
  793. return <span>{text}</span>;
  794. }
  795. if (this.state.getLoad) {
  796. let arr = record.arr || [];
  797. return (
  798. <Select
  799. style={{ width: "150px" }}
  800. placeholder="请选择分类"
  801. onChange={e => {
  802. record.dunType = e;
  803. if (e != 1) {
  804. this.setState({
  805. timeFlag: true
  806. });
  807. } else {
  808. this.setState({
  809. timeFlag: false
  810. });
  811. }
  812. if (e == 1 && record.sort == 6) {
  813. this.setState({
  814. yearFlag: true
  815. });
  816. } else if (e != 1 && record.sort == 6) {
  817. this.setState({
  818. yearFlag: false
  819. });
  820. }
  821. if (record.sort == 3 && e == 3) {
  822. this.setState({
  823. boFlag: true
  824. });
  825. } else {
  826. this.setState({
  827. boFlag: false
  828. });
  829. }
  830. }}
  831. >
  832. {arr.map(item => {
  833. record;
  834. return (
  835. <Select.Option key={item.value} value={item.value}>
  836. {item.key}
  837. </Select.Option>
  838. );
  839. })}
  840. </Select>
  841. );
  842. } else {
  843. return (
  844. <Select style={{ width: "150px" }} placeholder="请选择分类">
  845. <Select.Option
  846. key={0}
  847. value={"请选择上一项"}
  848. ></Select.Option>
  849. </Select>
  850. );
  851. }
  852. }
  853. },
  854. {
  855. title: "首付时间(特批需选择时间)",
  856. dataIndex: "waitDay",
  857. key: "waitDay",
  858. render: (text, record) => {
  859. if (record.dunTypeName) {
  860. if (text == 0) {
  861. var str = "当天";
  862. } else if (!text) {
  863. var str = "";
  864. } else {
  865. var str = text + "天";
  866. }
  867. return <span>{str}</span>;
  868. }
  869. return (
  870. <Select
  871. placeholder="请选择时间"
  872. style={{ width: "150px" }}
  873. disabled={
  874. this.state.approval != 0 && !this.state.timeFlag
  875. ? false
  876. : true
  877. }
  878. onChange={e => {
  879. record.waitDay = e;
  880. }}
  881. >
  882. <Select.Option key={0}>当天</Select.Option>
  883. <Select.Option key={3}>3天</Select.Option>
  884. <Select.Option key={5}>5天</Select.Option>
  885. <Select.Option key={7}>7天</Select.Option>
  886. <Select.Option key={15}>15天</Select.Option>
  887. </Select>
  888. );
  889. }
  890. },
  891. {
  892. title: "金额(万元)",
  893. dataIndex: "money",
  894. key: "money",
  895. render: (text, record) => {
  896. if (record.dunTypeName) {
  897. if (record.appropriationRatio && !record.money) {
  898. return <span>{record.appropriationRatio}(拨款比例)</span>;
  899. } else if (record.appropriationRatio && record.money) {
  900. return (
  901. <span>
  902. {text}(比例:{record.appropriationRatio})
  903. </span>
  904. );
  905. } else {
  906. return <span>{text}</span>;
  907. }
  908. }
  909. if (this.state.boFlag) {
  910. return (
  911. <div>
  912. <div style={{ width: 70, float: "left", marginRight: 5 }}>
  913. <Select
  914. placeholder="选择"
  915. defaultValue={"金额"}
  916. onChange={e => {
  917. record.boStatus = e;
  918. }}
  919. >
  920. <Select.Option key={true}>比例</Select.Option>
  921. <Select.Option key={false}>金额</Select.Option>
  922. </Select>
  923. </div>
  924. <div style={{ float: "right" }}>
  925. <Input
  926. value={record.money}
  927. placeholder="请根据左侧类型填写"
  928. key={record.id}
  929. required="required"
  930. onChange={e => {
  931. record.money = e.target.value;
  932. this.setState({
  933. contactList: this.state.contactList
  934. });
  935. }}
  936. style={{ width: "120px" }}
  937. />
  938. </div>
  939. </div>
  940. );
  941. } else {
  942. return (
  943. <div>
  944. <Input
  945. value={record.money}
  946. placeholder="请输入金额(必填项)"
  947. key={record.id}
  948. required="required"
  949. onChange={e => {
  950. record.money = e.target.value;
  951. this.setState({ contactList: this.state.contactList });
  952. }}
  953. style={{ width: "120px" }}
  954. />
  955. </div>
  956. );
  957. }
  958. }
  959. },
  960. {
  961. title: "服务年限",
  962. dataIndex: "startDate",
  963. key: "startDate",
  964. render: (text, record) => {
  965. if (record.dunTypeName) {
  966. return <span>{text}</span>;
  967. }
  968. return (
  969. <Select
  970. placeholder="请选择年限"
  971. style={{ width: "150px" }}
  972. disabled={this.state.yearFlag ? true : false}
  973. onChange={e => {
  974. record.effectiveCount = e;
  975. }}
  976. >
  977. {/* <Select.Option key={null}>无</Select.Option> */}
  978. <Select.Option key={1}>一年</Select.Option>
  979. <Select.Option key={3}>两年</Select.Option>
  980. <Select.Option key={5}>三年</Select.Option>
  981. <Select.Option key={7}>四年</Select.Option>
  982. <Select.Option key={9}>五年</Select.Option>
  983. </Select>
  984. );
  985. }
  986. },
  987. {
  988. title: "催款状态",
  989. dataIndex: "status",
  990. key: "status",
  991. render: text => {
  992. return <span>{text == 1 ? "已启动" : "未启动"}</span>;
  993. }
  994. },
  995. {
  996. title: "操作",
  997. dataIndex: "dels",
  998. key: "dels",
  999. render: (text, record, index) => {
  1000. return (
  1001. <div>
  1002. {this.state.processStatus == 0 ? (
  1003. <Popconfirm
  1004. title="是否删除?"
  1005. onConfirm={() => {
  1006. this.confirmDeletNew(record);
  1007. }}
  1008. okText="删除"
  1009. cancelText="不删除"
  1010. >
  1011. <Button
  1012. style={{
  1013. marginRight: "10px",
  1014. color: "#ffffff",
  1015. background: "#f00",
  1016. border: "none"
  1017. }}
  1018. >
  1019. 删除
  1020. </Button>
  1021. </Popconfirm>
  1022. ) : (
  1023. ""
  1024. )}
  1025. {record.isSave ? (
  1026. <Button
  1027. type="primary"
  1028. onClick={e => {
  1029. this.contactSaveNew(record);
  1030. }}
  1031. >
  1032. 保存
  1033. </Button>
  1034. ) : (
  1035. ""
  1036. )}
  1037. </div>
  1038. );
  1039. }
  1040. }
  1041. ],
  1042. changeCuiList: [
  1043. {
  1044. title: "变更状态",
  1045. dataIndex: "type",
  1046. key: "type",
  1047. render: text => {
  1048. let str = "";
  1049. let color = "";
  1050. if (text == 1) {
  1051. str = "增";
  1052. color = "#87d068";
  1053. } else if (text == 2) {
  1054. str = "改";
  1055. color = "#108ee9";
  1056. } else if (text == 3) {
  1057. str = "删";
  1058. color = "#f50";
  1059. }
  1060. return (
  1061. <Tag
  1062. color={color}
  1063. style={{ display: text == 0 ? "none" : "inline-block" }}
  1064. >
  1065. {str}
  1066. </Tag>
  1067. );
  1068. }
  1069. },
  1070. {
  1071. title: "项目名称",
  1072. dataIndex: "commodityName",
  1073. key: "commodityName",
  1074. render: (text, record, index) => {
  1075. let dataArr = this.state.proDataSource || [];
  1076. if (text) {
  1077. return <span>{text}</span>;
  1078. }
  1079. return (
  1080. <Select
  1081. placeholder="请选择名称"
  1082. style={{ width: "150px" }}
  1083. disabled={
  1084. this.state.getLoad && record.sortName ? true : false
  1085. }
  1086. onChange={e => {
  1087. record.sortName = e;
  1088. dataArr.forEach(item => {
  1089. if (item.commodityName == record.sortName) {
  1090. record.cname = item.cname;
  1091. record.ctid = item.id;
  1092. record.isSave = true;
  1093. record.sort = item.cSort;
  1094. cuiJieDian.forEach(item => {
  1095. if (item.value == record.sort) {
  1096. record.arr = item.children;
  1097. let yearFlag = true;
  1098. if (record.sort == 6) {
  1099. yearFlag = false;
  1100. }
  1101. this.setState({
  1102. getLoad: true,
  1103. yearFlag
  1104. });
  1105. }
  1106. });
  1107. }
  1108. });
  1109. }}
  1110. >
  1111. {dataArr.map(item => {
  1112. return (
  1113. <Select.Option key={item.id} value={item.commodityName}>
  1114. {item.commodityName}
  1115. </Select.Option>
  1116. );
  1117. })}
  1118. </Select>
  1119. );
  1120. }
  1121. },
  1122. {
  1123. title: "项目分类",
  1124. dataIndex: "projectType",
  1125. key: "projectType",
  1126. render: (text, record) => {
  1127. if (text) {
  1128. let arr = this.state.proDataSource || [];
  1129. let str = "";
  1130. for (let i = 0; i < arr.length; i++) {
  1131. if (this.state.proDataSource[i].cSort == text) {
  1132. str = this.state.proDataSource[i].cname;
  1133. return <span>{str}</span>;
  1134. }
  1135. }
  1136. }
  1137. if (this.state.getLoad) {
  1138. return (
  1139. <Select
  1140. style={{ width: "150px" }}
  1141. placeholder="请选择分类"
  1142. value={record.cname}
  1143. >
  1144. <Select.Option key={record.sort} value={record.cname}>
  1145. {record.cname}
  1146. </Select.Option>
  1147. </Select>
  1148. );
  1149. } else {
  1150. return (
  1151. <Select style={{ width: "150px" }} placeholder="请选择分类">
  1152. <Select.Option key={record.sort} value={record.cname}>
  1153. {record.cname}
  1154. </Select.Option>
  1155. </Select>
  1156. );
  1157. }
  1158. }
  1159. },
  1160. {
  1161. title: "催款科目",
  1162. dataIndex: "dunTypeName",
  1163. key: "dunTypeName",
  1164. render: (text, record) => {
  1165. if (text) {
  1166. return <span>{text}</span>;
  1167. }
  1168. if (this.state.getLoad) {
  1169. let arr = record.arr || [];
  1170. return (
  1171. <Select
  1172. style={{ width: "150px" }}
  1173. placeholder="请选择分类"
  1174. onChange={e => {
  1175. record.dunType = e;
  1176. if (e != 1) {
  1177. this.setState({
  1178. timeFlag: true
  1179. });
  1180. } else {
  1181. this.setState({
  1182. timeFlag: false
  1183. });
  1184. }
  1185. if (e == 1 && record.sort == 6) {
  1186. this.setState({
  1187. yearFlag: true
  1188. });
  1189. } else if (e != 1 && record.sort == 6) {
  1190. this.setState({
  1191. yearFlag: false
  1192. });
  1193. }
  1194. if (record.sort == 3 && e == 3) {
  1195. this.setState({
  1196. boFlag: true
  1197. });
  1198. } else {
  1199. this.setState({
  1200. boFlag: false
  1201. });
  1202. }
  1203. }}
  1204. >
  1205. {arr.map(item => {
  1206. record;
  1207. return (
  1208. <Select.Option key={item.value} value={item.value}>
  1209. {item.key}
  1210. </Select.Option>
  1211. );
  1212. })}
  1213. </Select>
  1214. );
  1215. } else {
  1216. return (
  1217. <Select style={{ width: "150px" }} placeholder="请选择分类">
  1218. <Select.Option
  1219. key={0}
  1220. value={"请选择上一项"}
  1221. ></Select.Option>
  1222. </Select>
  1223. );
  1224. }
  1225. }
  1226. },
  1227. {
  1228. title: "首付时间(特批需选择时间)",
  1229. dataIndex: "waitDay",
  1230. key: "waitDay",
  1231. render: (text, record) => {
  1232. if (record.dunTypeName) {
  1233. if (text == 0) {
  1234. var str = "当天";
  1235. } else if (!text) {
  1236. var str = "";
  1237. } else {
  1238. var str = text + "天";
  1239. }
  1240. return <span>{str}</span>;
  1241. }
  1242. return (
  1243. <Select
  1244. placeholder="请选择时间"
  1245. style={{ width: "150px" }}
  1246. disabled={
  1247. this.state.approval != 0 && !this.state.timeFlag
  1248. ? false
  1249. : true
  1250. }
  1251. onChange={e => {
  1252. record.waitDay = e;
  1253. }}
  1254. >
  1255. <Select.Option key={0}>当天</Select.Option>
  1256. <Select.Option key={3}>3天</Select.Option>
  1257. <Select.Option key={5}>5天</Select.Option>
  1258. <Select.Option key={7}>7天</Select.Option>
  1259. <Select.Option key={15}>15天</Select.Option>
  1260. </Select>
  1261. );
  1262. }
  1263. },
  1264. {
  1265. title: "金额(万元)",
  1266. dataIndex: "money",
  1267. key: "money",
  1268. render: (text, record) => {
  1269. if (record.dunTypeName) {
  1270. if (record.appropriationRatio && !record.money) {
  1271. return <span>{record.appropriationRatio}(拨款比例)</span>;
  1272. } else if (record.appropriationRatio && record.money) {
  1273. return (
  1274. <span>
  1275. {text}(比例:{record.appropriationRatio})
  1276. </span>
  1277. );
  1278. } else {
  1279. return <span>{text}</span>;
  1280. }
  1281. }
  1282. if (this.state.boFlag) {
  1283. return (
  1284. <div>
  1285. <div style={{ width: 70, float: "left", marginRight: 5 }}>
  1286. <Select
  1287. placeholder="选择"
  1288. defaultValue={"金额"}
  1289. onChange={e => {
  1290. record.boStatus = e;
  1291. }}
  1292. >
  1293. <Select.Option key={true}>比例</Select.Option>
  1294. <Select.Option key={false}>金额</Select.Option>
  1295. </Select>
  1296. </div>
  1297. <div style={{ float: "right" }}>
  1298. <Input
  1299. value={record.money}
  1300. placeholder="请根据左侧类型填写"
  1301. key={record.id}
  1302. required="required"
  1303. onChange={e => {
  1304. record.money = e.target.value;
  1305. this.setState({
  1306. contactList: this.state.contactList
  1307. });
  1308. }}
  1309. style={{ width: "120px" }}
  1310. />
  1311. </div>
  1312. </div>
  1313. );
  1314. } else {
  1315. return (
  1316. <div>
  1317. <Input
  1318. value={record.money}
  1319. placeholder="请输入金额(必填项)"
  1320. key={record.id}
  1321. required="required"
  1322. onChange={e => {
  1323. record.money = e.target.value;
  1324. this.setState({ contactList: this.state.contactList });
  1325. }}
  1326. style={{ width: "120px" }}
  1327. />
  1328. </div>
  1329. );
  1330. }
  1331. }
  1332. },
  1333. {
  1334. title: "服务年限",
  1335. dataIndex: "startDate",
  1336. key: "startDate",
  1337. render: (text, record) => {
  1338. if (record.dunTypeName) {
  1339. return <span>{text}</span>;
  1340. }
  1341. return (
  1342. <Select
  1343. placeholder="请选择年限"
  1344. style={{ width: "150px" }}
  1345. disabled={this.state.yearFlag ? true : false}
  1346. onChange={e => {
  1347. record.effectiveCount = e;
  1348. }}
  1349. >
  1350. {/* <Select.Option key={null}>无</Select.Option> */}
  1351. <Select.Option key={1}>一年</Select.Option>
  1352. <Select.Option key={3}>两年</Select.Option>
  1353. <Select.Option key={5}>三年</Select.Option>
  1354. <Select.Option key={7}>四年</Select.Option>
  1355. <Select.Option key={9}>五年</Select.Option>
  1356. </Select>
  1357. );
  1358. }
  1359. },
  1360. {
  1361. title: "催款状态",
  1362. dataIndex: "status",
  1363. key: "status",
  1364. render: text => {
  1365. return <span>{text == 1 ? "已启动" : "未启动"}</span>;
  1366. }
  1367. },
  1368. {
  1369. title: "操作",
  1370. dataIndex: "dels",
  1371. key: "dels",
  1372. render: (text, record, index) => {
  1373. return (
  1374. <div>
  1375. <Popconfirm
  1376. title="是否删除?"
  1377. onConfirm={() => {
  1378. this.changeDeleteCui(record);
  1379. }}
  1380. okText="删除"
  1381. cancelText="不删除"
  1382. >
  1383. <Button
  1384. disabled={this.state.listCuiFlag}
  1385. style={{
  1386. marginRight: "10px",
  1387. display: this.state.displayList ? "none" : "block"
  1388. }}
  1389. >
  1390. 删除
  1391. </Button>
  1392. </Popconfirm>
  1393. {record.isSave ? (
  1394. <Button
  1395. type="primary"
  1396. onClick={e => {
  1397. this.changeSaveCui(record);
  1398. }}
  1399. >
  1400. 保存
  1401. </Button>
  1402. ) : (
  1403. ""
  1404. )}
  1405. </div>
  1406. );
  1407. }
  1408. }
  1409. ]
  1410. };
  1411. },
  1412. departmentList() {
  1413. this.setState({
  1414. loading: true
  1415. });
  1416. $.ajax({
  1417. method: "get",
  1418. dataType: "json",
  1419. crossDomain: false,
  1420. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  1421. data: {},
  1422. success: function (data) {
  1423. let thedata = data.data;
  1424. let theArr = [];
  1425. if (!thedata) {
  1426. if (data.error && data.error.length) {
  1427. message.warning(data.error[0].message);
  1428. }
  1429. thedata = {};
  1430. } else {
  1431. thedata.map(function (item, index) {
  1432. theArr.push({
  1433. key: index,
  1434. name: item.name,
  1435. id: item.id,
  1436. depNo: item.depNo
  1437. });
  1438. });
  1439. }
  1440. this.setState({
  1441. departmentArr: theArr
  1442. });
  1443. }.bind(this)
  1444. }).always(
  1445. function () {
  1446. this.setState({
  1447. loading: false
  1448. });
  1449. }.bind(this)
  1450. );
  1451. },
  1452. //新建订单、编辑订单保存
  1453. handleSubmit(e) {
  1454. e.preventDefault();
  1455. let theorgCodeUrl = [];
  1456. if (this.state.orgCodeUrl.length) {
  1457. let picArr = [];
  1458. this.state.orgCodeUrl.map(function (item) {
  1459. if (
  1460. item.response &&
  1461. item.response.data &&
  1462. item.response.data.length
  1463. ) {
  1464. picArr.push(item.response.data);
  1465. }
  1466. });
  1467. theorgCodeUrl = picArr.join(",");
  1468. }
  1469. if (this.props.userDetaile) {
  1470. if (this.state.totalAmount === "") {
  1471. message.warning("签单金额不能为空");
  1472. this.refs.signFirstPayment.focus();
  1473. return false;
  1474. }
  1475. if (this.state.firstAmount === "") {
  1476. message.warning("首付金额不能为空");
  1477. this.refs.signFirstPayment.focus();
  1478. return false;
  1479. }
  1480. if (moneyVerify(this.state.firstAmount)) {
  1481. return;
  1482. }
  1483. if (moneyVerify(this.state.totalAmount)) {
  1484. return;
  1485. }
  1486. if (!theorgCodeUrl) {
  1487. message.warning("图片过大,上传失败");
  1488. this.refs.signFirstPayment.focus();
  1489. return false;
  1490. }
  1491. if (!this.state.signDate) {
  1492. message.warning("签单日期不能为空");
  1493. this.refs.signFirstPayment.focus();
  1494. return false;
  1495. }
  1496. if (!this.state.orderRemarks) {
  1497. message.warning("订单留言不能为空");
  1498. this.refs.signFirstPayment.focus();
  1499. return false;
  1500. }
  1501. } else {
  1502. }
  1503. const arr = this.state.contactListNew || [];
  1504. for (let i = 0; i < arr.length; i++) {
  1505. if (
  1506. arr[i].dunType == 1 &&
  1507. arr[i].waitDay != null &&
  1508. this.state.approval == 0
  1509. ) {
  1510. message.warning(
  1511. "非特批存在填写催款节点首付时间的情况,请删除后重新填写保存"
  1512. );
  1513. return false;
  1514. } else if (
  1515. arr[i].dunType == 1 &&
  1516. arr[i].waitDay == null &&
  1517. this.state.approval == 1
  1518. ) {
  1519. message.warning(
  1520. "特批存在首付催款节点未填写时间的情况,请删除后重新填写保存"
  1521. );
  1522. return false;
  1523. }
  1524. if (!this.state.contactListNew[i].id && this.props.userDetaile) {
  1525. message.warning("请保存催款节点");
  1526. return false;
  1527. }
  1528. }
  1529. this.setState({
  1530. loading: true
  1531. });
  1532. let api = this.props.userDetaile
  1533. ? "/api/admin/newOrder/updateServiceOrderNew"
  1534. : "/api/admin/newOrder/createOrder";
  1535. $.ajax({
  1536. method: "POST",
  1537. dataType: "json",
  1538. crossDomain: false,
  1539. url: globalConfig.context + api,
  1540. data: !this.props.userDetaile
  1541. ? {
  1542. uid: this.state.autoId,
  1543. orderType: this.state.orderType
  1544. }
  1545. : {
  1546. orderNo: this.state.orderNo, //订单编号
  1547. totalAmount: this.state.totalAmount, //总金额
  1548. firstAmount: this.state.firstAmount, //首付
  1549. isSubmit: this.state.isSubmit, //保存草稿还是提交
  1550. signDate: this.state.signDate, //签单日期
  1551. contacts: this.state.contacts, //企业负责人
  1552. contactMobile: this.state.contactMobile, //负责人联系方式
  1553. legalPerson: this.state.legalPerson, //企业法人
  1554. legalPersonTel: this.state.legalPersonTel, //企业法人联系电话
  1555. approval: this.state.approval, //特批状态
  1556. orderRemarks: this.state.orderRemarks, //订单备注
  1557. contractPictureUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
  1558. orderDep: this.state.organizationSearch
  1559. }
  1560. }).done(
  1561. function (data) {
  1562. this.setState({
  1563. loading: false
  1564. });
  1565. if (!data.error.length) {
  1566. message.success("保存成功!");
  1567. this.handleOk();
  1568. if (this.state.autoId) {
  1569. this.loadData();
  1570. }
  1571. } else {
  1572. message.warning(data.error[0].message);
  1573. }
  1574. }.bind(this)
  1575. );
  1576. },
  1577. //订单详情修改
  1578. xiangqingClick(e) {
  1579. e.preventDefault();
  1580. this.setState({
  1581. loading: true
  1582. });
  1583. if (this.state.approval == 2 || this.state.approval == 3) {
  1584. message.warning("特批状态不正确");
  1585. this.setState({
  1586. loading: false
  1587. });
  1588. return;
  1589. }
  1590. $.ajax({
  1591. url: globalConfig.context + "/api/admin/newOrder/updateServiceOrderNew",
  1592. method: "post",
  1593. data: {
  1594. orderNo: this.state.orderNo, //订单编号
  1595. totalAmount: this.state.totalAmount, //总金额
  1596. firstAmount: this.state.firstAmount, //首付
  1597. isSubmit: this.state.isSubmit, //保存草稿还是提交
  1598. signDate: this.state.selTime, //签单日期
  1599. contacts: this.state.contacts, //企业负责人
  1600. contactMobile: this.state.contactMobile, //负责人联系方式
  1601. legalPerson: this.state.legalPerson, //企业法人
  1602. legalPersonTel: this.state.legalPersonTel, //企业法人联系电话
  1603. approval: this.state.approval, //特批状态
  1604. orderRemarks: this.state.orderRemarks //订单备注
  1605. }
  1606. }).done(
  1607. function (data) {
  1608. this.setState({
  1609. loading: false
  1610. });
  1611. if (!data.error.length) {
  1612. message.success("保存成功!");
  1613. this.loaduser();
  1614. } else {
  1615. message.warning(data.error[0].message);
  1616. }
  1617. }.bind(this)
  1618. );
  1619. },
  1620. //查看基本详情基本信息
  1621. loaduser(record) {
  1622. this.state.orderList = [];
  1623. $.ajax({
  1624. method: "get",
  1625. dataType: "json",
  1626. crossDomain: false,
  1627. url: globalConfig.context + "/api/admin/newOrder/getOrderNewDetail",
  1628. data: {
  1629. orderNo: record ? record.orderNo : this.props.datauser.orderNo
  1630. },
  1631. success: function (data) {
  1632. let thisData = data.data;
  1633. if (!thisData) {
  1634. if (data.error && data.error.length) {
  1635. message.warning(data.error[0].message);
  1636. }
  1637. thisData = {};
  1638. }
  1639. if (thisData.approval == 2) {
  1640. thisData.approval = "特批通过";
  1641. } else if (thisData.approval == 3) {
  1642. thisData.approval = "特批驳回";
  1643. }
  1644. this.setState({
  1645. id: thisData.id,
  1646. kehuId: thisData.buyerId,
  1647. orderNo: thisData.orderNo, //订单编号
  1648. orderType: thisData.orderType, //订单类型
  1649. firstAmount: thisData.firstAmount, //首付金额
  1650. totalAmount: thisData.totalAmount, //总金额
  1651. settlementAmount: thisData.settlementAmount, //结算金额
  1652. liquidationStatus: thisData.liquidationStatus, //清算状态
  1653. processStatus: thisData.processStatus, //流程状态
  1654. approval: thisData.approval.toString(), //特批状态
  1655. orderRemarks: thisData.orderRemarks, //订单备注
  1656. contractNo: thisData.contractNo, //合同编号
  1657. contacts: thisData.contacts, //联系人
  1658. contactMobile: thisData.contactMobile, //联系人电话
  1659. legalPerson: thisData.legalPerson, //法人
  1660. legalPersonTel: thisData.legalPersonTel, //法人电话
  1661. contractNo: thisData.contractNo, //合同编号
  1662. orgCodeUrl: thisData.contractPictureUrl
  1663. ? splitUrl(
  1664. thisData.contractPictureUrl,
  1665. ",",
  1666. globalConfig.avatarHost + "/upload"
  1667. )
  1668. : [], //图片地址
  1669. signDate: thisData.signDate, //签单时间
  1670. userName: thisData.userName, //客户名称
  1671. salesmanName: thisData.salesmanName, //营销员名称
  1672. salesmanMobile: thisData.salesmanMobile, //营销员电话
  1673. oldSalesmanName: thisData.oldSalesmanName, //营销员名称
  1674. oldSalesmanMobile: thisData.oldSalesmanMobile, //营销员电话
  1675. financeName: thisData.financeName, //财务名称
  1676. financeMobile: thisData.financeMobile, //财务电话
  1677. nowFinanceMobile: thisData.nowFinanceMobile,
  1678. nowFinance: thisData.nowFinance,
  1679. contractNo: thisData.contractNo, //合同编号
  1680. approval:
  1681. thisData.approval == 0
  1682. ? thisData.approval.toString()
  1683. : thisData.approval,
  1684. organizationSearch: thisData.orderDep,
  1685. depName: thisData.depName,
  1686. status: thisData.status,
  1687. outsource: thisData.outsource
  1688. });
  1689. // console.log("kkkk",this.state.processStatus);
  1690. }.bind(this)
  1691. }).always(
  1692. function () {
  1693. this.setState({
  1694. loading: false
  1695. });
  1696. }.bind(this)
  1697. );
  1698. },
  1699. //节点列表
  1700. jiedian(orderNos) {
  1701. $.ajax({
  1702. method: "get",
  1703. dataType: "json",
  1704. crossDomain: false,
  1705. url: globalConfig.context + "/api/admin/newOrder/selectOrderDun",
  1706. data: {
  1707. orderNo: orderNos
  1708. },
  1709. success: function (data) {
  1710. let theArr = [];
  1711. let thisData = [];
  1712. if (data.error.length || data.data.list == "") {
  1713. if (data.error && data.error.length) {
  1714. message.warning(data.error[0].message);
  1715. }
  1716. } else {
  1717. for (let i = 0; i < data.data.length; i++) {
  1718. thisData = data.data[i];
  1719. theArr.push({
  1720. key: i,
  1721. dunSubject: thisData.dunSubject
  1722. ? thisData.dunSubject.toString()
  1723. : "", //催款科目
  1724. id: thisData.id, //节点Id
  1725. money: thisData.money, //催款金额
  1726. dunStatus: thisData.dunStatus, //催款状态
  1727. orderNo: thisData.orderNo
  1728. });
  1729. }
  1730. this.setState({
  1731. contactList: theArr
  1732. });
  1733. }
  1734. }.bind(this)
  1735. }).always(
  1736. function () {
  1737. this.setState({
  1738. loading: false
  1739. });
  1740. }.bind(this)
  1741. );
  1742. },
  1743. //查看催款节点
  1744. jiedianNew(orderNos) {
  1745. $.ajax({
  1746. method: "get",
  1747. dataType: "json",
  1748. crossDomain: false,
  1749. url:
  1750. globalConfig.context + "/api/admin/newOrderDun/selectListNewOrderDun",
  1751. data: {
  1752. orderNo: orderNos
  1753. },
  1754. success: function (data) {
  1755. if (data.error && data.error.length) {
  1756. message.warning(data.error[0].message);
  1757. } else {
  1758. let theArr = [];
  1759. let thisData = [];
  1760. let arr = data.data || [];
  1761. let totalCui = 0;
  1762. for (let i = 0; i < arr.length; i++) {
  1763. thisData = arr[i];
  1764. totalCui += +thisData.money;
  1765. theArr.push({
  1766. key: i,
  1767. dunSubject: thisData.dunSubject
  1768. ? thisData.dunSubject.toString()
  1769. : "", //催款科目
  1770. id: thisData.id, //节点Id
  1771. money: thisData.money, //催款金额
  1772. // orderNo: record ? record.orderNo : this.props.datauser.orderNo,
  1773. commodityName: thisData.commodityName,
  1774. projectType: thisData.projectType,
  1775. dunTypeName: thisData.dunTypeName,
  1776. status: thisData.status,
  1777. waitDay: thisData.waitDay,
  1778. effectiveCount: thisData.effectiveCount,
  1779. startDate: thisData.startDate,
  1780. dunType: thisData.dunType,
  1781. appropriationRatio: thisData.appropriationRatio
  1782. });
  1783. }
  1784. if (!totalCui) {
  1785. totalCui = 0;
  1786. }
  1787. totalCui = (Math.round(totalCui * 10000) / 10000).toFixed(4);
  1788. this.setState({
  1789. contactListNew: theArr,
  1790. totalCui
  1791. });
  1792. }
  1793. }.bind(this)
  1794. }).always(
  1795. function () {
  1796. this.setState({
  1797. loading: false
  1798. });
  1799. }.bind(this)
  1800. );
  1801. },
  1802. //催款节点保存
  1803. contactSave(record) {
  1804. for (let i = 0; i < this.state.contactList.length; i++) {
  1805. if (moneyVerify(this.state.contactList[i].money)) {
  1806. return;
  1807. }
  1808. }
  1809. this.setState({
  1810. loading: true
  1811. });
  1812. $.ajax({
  1813. url: globalConfig.context + "/api/admin/newOrder/createOrderDun",
  1814. method: "post",
  1815. data: {
  1816. orderNo: this.state.orderNo,
  1817. orderDun: JSON.stringify(this.state.contactList)
  1818. }
  1819. }).done(
  1820. function (data) {
  1821. this.setState({
  1822. loading: false
  1823. });
  1824. if (!data.error.length) {
  1825. message.success("保存成功!");
  1826. this.jiedian(record.orderNo);
  1827. } else {
  1828. message.warning(data.error[0].message);
  1829. }
  1830. }.bind(this)
  1831. );
  1832. },
  1833. //催款节点保存
  1834. contactSaveNew(record) {
  1835. if (record.boStatus == "false") {
  1836. record.boStatus = false;
  1837. } else if (record.boStatus == "true") {
  1838. record.boStatus = true;
  1839. }
  1840. if (!this.state.yearFlag) {
  1841. if (!record.effectiveCount) {
  1842. message.warning("请选择服务年限");
  1843. return;
  1844. }
  1845. } else {
  1846. record.effectiveCount = "";
  1847. }
  1848. if (record.money == "") {
  1849. message.warning("请填写金额");
  1850. return;
  1851. }
  1852. if (record.boStatus) {
  1853. if (
  1854. typeof +record.money == "number" &&
  1855. +record.money >= 0 &&
  1856. +record.money <= 1
  1857. ) {
  1858. record.appropriationRatio = record.money;
  1859. } else {
  1860. message.warning("金额比例填写错误,比例范围0~1");
  1861. return;
  1862. }
  1863. }
  1864. if (!record.dunType) {
  1865. message.warning("请选择对应科目");
  1866. return;
  1867. }
  1868. if (record.dunType != 1) {
  1869. record.waitDay = "";
  1870. }
  1871. this.setState({
  1872. loading: true
  1873. });
  1874. if (record.boStatus) {
  1875. $.ajax({
  1876. url: globalConfig.context + "/api/admin/newOrderDun/createDun",
  1877. method: "post",
  1878. data: {
  1879. orderNo: record.orderNo,
  1880. tid: record.tid,
  1881. projectType: record.sort,
  1882. dunType: record.dunType,
  1883. appropriationRatio: record.appropriationRatio,
  1884. waitDay: record.waitDay,
  1885. effectiveCount: record.effectiveCount
  1886. }
  1887. }).done(
  1888. function (data) {
  1889. this.setState({
  1890. loading: false
  1891. });
  1892. if (!data.error.length) {
  1893. message.success("保存成功!");
  1894. this.setState({
  1895. cuiFlag: false,
  1896. boFlag: false,
  1897. addFlag: false
  1898. });
  1899. this.jiedianNew(record.orderNo);
  1900. } else {
  1901. message.warning(data.error[0].message);
  1902. }
  1903. }.bind(this)
  1904. );
  1905. } else {
  1906. $.ajax({
  1907. url: globalConfig.context + "/api/admin/newOrderDun/createDun",
  1908. method: "post",
  1909. data: {
  1910. orderNo: record.orderNo,
  1911. tid: record.tid,
  1912. projectType: record.sort,
  1913. dunType: record.dunType,
  1914. money: record.money,
  1915. waitDay: record.waitDay,
  1916. effectiveCount: record.effectiveCount
  1917. }
  1918. }).done(
  1919. function (data) {
  1920. this.setState({
  1921. loading: false
  1922. });
  1923. if (!data.error.length) {
  1924. message.success("保存成功!");
  1925. this.setState({
  1926. cuiFlag: false,
  1927. boFlag: false,
  1928. addFlag: false
  1929. });
  1930. this.jiedianNew(record.orderNo);
  1931. } else {
  1932. message.warning(data.error[0].message);
  1933. }
  1934. }.bind(this)
  1935. );
  1936. }
  1937. },
  1938. //点击新增催款节点
  1939. addcontact() {
  1940. this.state.contactList.push({
  1941. key: this.state.contactList.length,
  1942. money: "",
  1943. dunSubject: undefined,
  1944. orderNo: this.state.orderNo,
  1945. dunTarget: this.state.kehuId
  1946. });
  1947. this.setState({
  1948. contactList: this.state.contactList
  1949. });
  1950. },
  1951. //点击新增催款节点
  1952. addcontactNew() {
  1953. this.state.contactListNew.push({
  1954. key: this.state.contactListNew.length,
  1955. money: "",
  1956. dunSubject: undefined,
  1957. orderNo: this.state.orderNo,
  1958. dunTarget: this.state.kehuId
  1959. });
  1960. this.setState({
  1961. contactListNew: this.state.contactListNew,
  1962. cuiFlag: true
  1963. });
  1964. },
  1965. //删除收款节点
  1966. confirmDelet(index) {
  1967. this.state.contactList.splice(index, 1);
  1968. this.setState({
  1969. contactList: this.state.contactList
  1970. });
  1971. this.contactSave();
  1972. },
  1973. //删除收款节点
  1974. confirmDeletNew(index) {
  1975. if (index.id) {
  1976. this.state.contactListNew.splice(index.id, 1);
  1977. this.setState({
  1978. contactListNew: this.state.contactListNew,
  1979. cuiFlag: false,
  1980. addFlag: false,
  1981. boFlag: false
  1982. });
  1983. $.ajax({
  1984. url: globalConfig.context + "/api/admin/newOrderDun/deleteDun",
  1985. method: "post",
  1986. data: {
  1987. id: index.id
  1988. }
  1989. }).done(
  1990. function (data) {
  1991. this.setState({
  1992. loading: false
  1993. });
  1994. if (!data.error.length) {
  1995. message.success("删除成功!");
  1996. this.setState({
  1997. cuiFlag: false
  1998. });
  1999. this.jiedianNew(this.state.orderNo);
  2000. } else {
  2001. message.warning(data.error[0].message);
  2002. }
  2003. }.bind(this)
  2004. );
  2005. } else {
  2006. this.state.contactListNew.splice(index.key, 1);
  2007. this.setState({
  2008. contactListNew: this.state.contactListNew,
  2009. cuiFlag: false,
  2010. addFlag: false,
  2011. boFlag: false
  2012. });
  2013. }
  2014. },
  2015. handleOk() {
  2016. this.setState({
  2017. visible: false,
  2018. mark: false
  2019. });
  2020. this.props.closeDesc(false, true);
  2021. },
  2022. handleCancel() {
  2023. if (this.state.orderType == undefined) {
  2024. return false;
  2025. }
  2026. if (!this.state.autoId) {
  2027. return false;
  2028. }
  2029. this.setState({
  2030. visible: false,
  2031. mark: false
  2032. });
  2033. this.props.closeDesc(false);
  2034. },
  2035. handleCancelclose() {
  2036. this.setState(
  2037. {
  2038. visible: false,
  2039. mark: false,
  2040. cuiFlag: false,
  2041. addFlag: false,
  2042. boFlag: false,
  2043. isJilu: false
  2044. },
  2045. () => {
  2046. this.setState({
  2047. activeKey: "1"
  2048. });
  2049. }
  2050. );
  2051. this.props.closeDesc(false);
  2052. this.reset();
  2053. },
  2054. //点击签单
  2055. handleCancels() {
  2056. this.setState({
  2057. isSubmit: 1
  2058. });
  2059. },
  2060. //点击签单
  2061. handleCancelq() {
  2062. this.setState({
  2063. isSubmit: 0
  2064. });
  2065. },
  2066. //删除
  2067. delectRow(record) {
  2068. this.setState({
  2069. loading: true
  2070. });
  2071. $.ajax({
  2072. method: "post",
  2073. dataType: "json",
  2074. crossDomain: false,
  2075. url: globalConfig.context + "/api/admin/newOrder/deleteOrderTask",
  2076. data: {
  2077. id: record.id
  2078. }
  2079. }).done(
  2080. function (data) {
  2081. if (!data.error.length) {
  2082. message.success("删除成功!");
  2083. this.setState({
  2084. loading: false
  2085. });
  2086. this.jiedian(this.state.orderNo);
  2087. this.jiedianNew(this.state.orderNo);
  2088. this.loaduser();
  2089. this.loadData();
  2090. } else {
  2091. message.warning(data.error[0].message);
  2092. }
  2093. }.bind(this)
  2094. );
  2095. },
  2096. nextCancel() {
  2097. this.setState({
  2098. addnextVisible: false,
  2099. changeVisible: false
  2100. });
  2101. },
  2102. rizhi() {
  2103. this.setState({
  2104. loading: true
  2105. });
  2106. $.ajax({
  2107. method: "get",
  2108. dataType: "json",
  2109. crossDomain: false,
  2110. url: "/api/admin/newOrder/selectOrderLog",
  2111. data: {
  2112. orderNo: this.props.datauser.orderNo
  2113. },
  2114. success: function (data) {
  2115. let theArr = [];
  2116. let thisData = data.data;
  2117. if (!thisData.length) {
  2118. if (data.error && data.error.length) {
  2119. message.warning(data.error[0].message);
  2120. }
  2121. thisData = {};
  2122. } else {
  2123. for (let i = 0; i < data.data.length; i++) {
  2124. let thisdata = data.data[i];
  2125. theArr.push({
  2126. processName: thisdata.processName,
  2127. adminName: thisdata.adminName,
  2128. createDate: thisdata.createDate,
  2129. remarks: thisdata.remarks
  2130. });
  2131. }
  2132. }
  2133. this.setState({
  2134. dataSourcerizhi: theArr
  2135. });
  2136. }.bind(this)
  2137. }).always(
  2138. function () {
  2139. this.setState({
  2140. loading: false
  2141. });
  2142. }.bind(this)
  2143. );
  2144. },
  2145. //查看订单日志
  2146. getOrderLog() {
  2147. this.setState({
  2148. rizhivisible: true
  2149. });
  2150. this.rizhi();
  2151. },
  2152. closeOrderLog() {
  2153. this.setState({
  2154. rizhivisible: false
  2155. });
  2156. },
  2157. callback(key) {
  2158. this.setState({
  2159. activeKey: key
  2160. });
  2161. if (key === "1") {
  2162. this.jiedian(this.props.datauser.orderNo);
  2163. this.jiedianNew(this.props.datauser.orderNo);
  2164. this.loaduser();
  2165. // this.loaduser();
  2166. }
  2167. if (key === "3") {
  2168. this.getChangeData();
  2169. }
  2170. if (key === "2") {
  2171. let url = window.location.href.substring(7);
  2172. $.ajax({
  2173. method: "get",
  2174. dataType: "json",
  2175. crossDomain: false,
  2176. url:
  2177. globalConfig.context + "/api/admin/orderChange/orderChangeDetails",
  2178. data: {
  2179. orderNo: this.props.datauser.orderNo
  2180. },
  2181. success: function (data) {
  2182. // console.log(data.data);
  2183. if (data.data && data.data.length) {
  2184. let thisdata = data.data[data.data.length - 1];
  2185. if (thisdata.status === 0 || thisdata.processState == 0) {
  2186. this.setState({
  2187. changeId: thisdata.id,
  2188. typeChange: thisdata.type,
  2189. totalAmount: thisdata.totalAmount,
  2190. settlementAmount: thisdata.settlementAmount,
  2191. changeAmount: thisdata.changeAmount,
  2192. remarksC: thisdata.remarks,
  2193. startRemarks: thisdata.zxsRemarks,
  2194. isCaoGao: true,
  2195. changeFlag: true,
  2196. voucherUrl: thisdata.voucherUrl
  2197. ? splitUrl(
  2198. thisdata.voucherUrl,
  2199. ",",
  2200. globalConfig.avatarHost + "/upload",
  2201. url
  2202. )
  2203. : [],
  2204. processState: thisdata.processState,
  2205. status: thisdata.status
  2206. });
  2207. this.proList();
  2208. this.cuiList();
  2209. let e = thisdata.type;
  2210. console.log(e);
  2211. if (e == 1) {
  2212. this.setState({
  2213. hetongFlag: false,
  2214. listFlag: false,
  2215. listCuiFlag: false,
  2216. tuiKuanFlag: false,
  2217. displayList: false
  2218. });
  2219. } else if (e == 2) {
  2220. this.setState({
  2221. hetongFlag: true,
  2222. listFlag: false,
  2223. listCuiFlag: false,
  2224. tuiKuanFlag: true,
  2225. displayList: false
  2226. });
  2227. } else if (e == 3) {
  2228. this.setState({
  2229. listFlag: false,
  2230. hetongFlag: false,
  2231. listCuiFlag: false,
  2232. tuiKuanFlag: false,
  2233. displayList: true
  2234. });
  2235. } else if (e == 4) {
  2236. this.setState({
  2237. listFlag: false,
  2238. listCuiFlag: false,
  2239. hetongFlag: false,
  2240. tuiKuanFlag: true,
  2241. displayList: false
  2242. });
  2243. } else if (e == 5) {
  2244. this.setState({
  2245. listFlag: false,
  2246. listCuiFlag: false,
  2247. hetongFlag: true,
  2248. tuiKuanFlag: true,
  2249. displayList: false
  2250. });
  2251. } else {
  2252. this.setState({
  2253. listFlag: true,
  2254. hetongFlag: true,
  2255. listCuiFlag: true,
  2256. tuiKuanFlag: false,
  2257. displayList: false
  2258. });
  2259. }
  2260. } else {
  2261. this.setState({
  2262. listFlag: false,
  2263. hetongFlag: false,
  2264. listCuiFlag: false,
  2265. tuiKuanFlag: false,
  2266. displayList: false,
  2267. // 置空
  2268. changeId: undefined,
  2269. isCaoGao: false
  2270. });
  2271. }
  2272. } else {
  2273. this.setState({
  2274. isCaoGao: false
  2275. });
  2276. }
  2277. }.bind(this)
  2278. });
  2279. }
  2280. },
  2281. cuiList(id) {
  2282. $.ajax({
  2283. method: "get",
  2284. dataType: "json",
  2285. crossDomain: false,
  2286. url: globalConfig.context + "/api/admin/orderChange/selectChangeDun",
  2287. data: {
  2288. id: id || this.state.changeId
  2289. },
  2290. success: function (data) {
  2291. if (data.data && data.data.length) {
  2292. if (id) {
  2293. this.setState({
  2294. listCuiFlag: true
  2295. });
  2296. }
  2297. this.setState({
  2298. cuiDataSource: data.data
  2299. });
  2300. } else if (data.error && data.error.length) {
  2301. message.warning(data.error[0].message)
  2302. }
  2303. }.bind(this)
  2304. });
  2305. },
  2306. proList(id) {
  2307. $.ajax({
  2308. method: "get",
  2309. dataType: "json",
  2310. crossDomain: false,
  2311. url: globalConfig.context + "/api/admin/orderChange/selectChangeTask",
  2312. data: {
  2313. id: id || this.state.changeId
  2314. },
  2315. success: function (data) {
  2316. if (data.data && data.data.length) {
  2317. if (id) {
  2318. this.setState({
  2319. listFlag: true
  2320. });
  2321. }
  2322. this.setState({
  2323. proDataSource: data.data
  2324. });
  2325. } else if (data.error && data.error.length) {
  2326. message.warning(data.error[0].message);
  2327. }
  2328. }.bind(this)
  2329. });
  2330. },
  2331. getOrgCodeUrl(e) {
  2332. this.setState({ orgCodeUrl: e });
  2333. },
  2334. getVoucherUrl(e) {
  2335. this.setState({ voucherUrl: e });
  2336. },
  2337. //加载(自动补全)
  2338. supervisor(e, state) {
  2339. //客户名称与服务名称自动补全
  2340. let api = state
  2341. ? "/api/admin/customer/getCustomerByName"
  2342. : "/api/admin/order/getBusinessProjectByName";
  2343. $.ajax({
  2344. method: "get",
  2345. dataType: "json",
  2346. crossDomain: false,
  2347. url: globalConfig.context + api,
  2348. data: state
  2349. ? {
  2350. name: e,
  2351. type: this.state.customType
  2352. }
  2353. : {
  2354. businessName: e
  2355. },
  2356. success: function (data) {
  2357. let thedata = data.data;
  2358. if (!thedata) {
  2359. if (data.error && data.error.length) {
  2360. message.warning(data.error[0].message);
  2361. }
  2362. thedata = {};
  2363. }
  2364. this.setState({
  2365. states: state,
  2366. customerArr: thedata
  2367. });
  2368. }.bind(this)
  2369. }).always(
  2370. function () {
  2371. this.setState({
  2372. loading: false
  2373. });
  2374. }.bind(this)
  2375. );
  2376. },
  2377. supervisorCui(e) {
  2378. //客户名称与服务名称自动补全
  2379. let api = "/api/admin/order/getBusinessProjectByName";
  2380. $.ajax({
  2381. method: "get",
  2382. dataType: "json",
  2383. crossDomain: false,
  2384. url: globalConfig.context + api,
  2385. data: {
  2386. businessName: e
  2387. },
  2388. success: function (data) {
  2389. let thedata = data.data;
  2390. if (!thedata) {
  2391. if (data.error && data.error.length) {
  2392. message.warning(data.error[0].message);
  2393. }
  2394. thedata = {};
  2395. }
  2396. this.setState({
  2397. customerCuiArr: thedata
  2398. });
  2399. }.bind(this)
  2400. }).always(
  2401. function () {
  2402. this.setState({
  2403. loading: false
  2404. });
  2405. }.bind(this)
  2406. );
  2407. },
  2408. //上级主管输入框失去焦点是判断客户是否存在
  2409. selectAuto(value) {
  2410. let kid = [];
  2411. let fwList = this.state.customerArr;
  2412. fwList.map(function (item) {
  2413. if (value == item.bname) {
  2414. kid = item;
  2415. }
  2416. });
  2417. this.setState({
  2418. commodityName: value,
  2419. gid: kid.id,
  2420. //commodityPrice:kid.price==0?kid.price.toString():kid.price,
  2421. commodityFirstPayment:
  2422. kid.firstPayment == 0 ? kid.firstPayment.toString() : kid.firstPayment
  2423. });
  2424. },
  2425. selectAutoCui(value) {
  2426. let kid = [];
  2427. let fwList = this.state.customerCuiArr;
  2428. fwList.map(function (item) {
  2429. if (value == item.bname) {
  2430. kid = item;
  2431. }
  2432. });
  2433. this.setState({
  2434. commodityNameCui: value,
  2435. cid: kid.id,
  2436. //commodityPrice:kid.price==0?kid.price.toString():kid.price,
  2437. commodityFirstPayment:
  2438. kid.firstPayment == 0 ? kid.firstPayment.toString() : kid.firstPayment
  2439. });
  2440. },
  2441. //客户
  2442. selectAutoCUT(value) {
  2443. let autoIds;
  2444. let fwList = this.state.customerArr;
  2445. fwList.map(function (item) {
  2446. if (value == item.name) {
  2447. autoIds = item.id;
  2448. }
  2449. });
  2450. this.setState({
  2451. customerName: value,
  2452. autoId: autoIds
  2453. });
  2454. },
  2455. //服务值改变时请求客户名称
  2456. httpChange(e) {
  2457. this.state.gid = "";
  2458. if (e.length >= 1) {
  2459. this.supervisor(e, false);
  2460. }
  2461. this.setState({
  2462. commodityName: e
  2463. });
  2464. },
  2465. httpChangeCui(e) {
  2466. if (e.length >= 1) {
  2467. this.supervisorCui(e, false);
  2468. }
  2469. this.setState({
  2470. commodityNameCui: e
  2471. });
  2472. },
  2473. //客户名称自动补全
  2474. customerChange(e) {
  2475. if (this.state.customType) {
  2476. this.state.autoId = "";
  2477. if (e.length >= 2) {
  2478. this.supervisor(e, true);
  2479. }
  2480. this.setState({
  2481. customerName: e
  2482. });
  2483. } else {
  2484. this.setState({
  2485. customerName: ""
  2486. });
  2487. message.warning("客户所属类型必须指定");
  2488. }
  2489. },
  2490. //点击添加项目明细
  2491. addDetailed() {
  2492. this.setState({
  2493. gid: "",
  2494. customerArr: [],
  2495. commodityName: "",
  2496. commodityQuantity: "",
  2497. commodityId: "",
  2498. taskComment: "",
  2499. main: undefined,
  2500. commodityPrice: "",
  2501. addState: 1,
  2502. addnextVisible: true
  2503. });
  2504. },
  2505. //新建项目明细保存
  2506. nextSubmit(e) {
  2507. e.preventDefault();
  2508. if (this.state.gid == undefined || !this.state.gid) {
  2509. message.warning("服务名称不匹配!");
  2510. return false;
  2511. }
  2512. if (!this.state.commodityPrice) {
  2513. message.warning("请输入金额!");
  2514. this.refs.commodityPrice.focus();
  2515. return false;
  2516. }
  2517. let reg = /^([0]|[1-9][0-9]*)$/;
  2518. if (
  2519. !this.state.commodityQuantity ||
  2520. !reg.test(this.state.commodityQuantity)
  2521. ) {
  2522. message.warning("请输入正确商品数量!");
  2523. this.refs.commodityQuantity.focus();
  2524. return false;
  2525. }
  2526. if (!this.state.main) {
  2527. message.warning("请选择是否为主要项目!");
  2528. this.refs.commodityQuantity.focus();
  2529. return false;
  2530. }
  2531. this.setState({
  2532. loading: true
  2533. });
  2534. let api = this.state.addState
  2535. ? "/api/admin/newOrder/addOrderTask"
  2536. : "/api/bianji";
  2537. $.ajax({
  2538. method: "POST",
  2539. dataType: "json",
  2540. crossDomain: false,
  2541. url: globalConfig.context + api,
  2542. data: {
  2543. commodityId: this.state.gid, //商品ID
  2544. orderNo: this.props.datauser.orderNo, //订单编号
  2545. commodityName: this.state.commodityName, //商品名称
  2546. commodityQuantity: this.state.commodityQuantity, //商品数量
  2547. commodityPrice: this.state.commodityPrice, //签单总价
  2548. taskComment: this.state.taskComment, //服务说明
  2549. main: this.state.main //是否为主要项目
  2550. }
  2551. }).done(
  2552. function (data) {
  2553. this.setState({
  2554. loading: false
  2555. });
  2556. if (!data.error.length) {
  2557. message.success("保存成功!");
  2558. this.nextCancel();
  2559. //this.loaduser(this.props.datauser);
  2560. this.loadData();
  2561. } else {
  2562. message.warning(data.error[0].message);
  2563. }
  2564. }.bind(this)
  2565. );
  2566. },
  2567. //点击打卡项目详情
  2568. tableRowClick(record) {
  2569. this.setState({
  2570. jid: record.id, //项目ID
  2571. kid: record.commodityId, //商品ID
  2572. commodityName: record.commodityName, //金额
  2573. commodityPrice: record.commodityPrice, //金额
  2574. commodityQuantity: record.commodityQuantity, //数量
  2575. taskComment: record.taskComment, //备注
  2576. main: record.main.toString(), //是否为主要
  2577. addnextVisible: true,
  2578. addState: 0
  2579. });
  2580. },
  2581. //修改项目详情
  2582. tabRowSave(e) {
  2583. e.preventDefault();
  2584. if (!this.state.commodityPrice) {
  2585. message.warning("金额不能为空!");
  2586. return false;
  2587. }
  2588. let reg = /^([0]|[1-9][0-9]*)$/;
  2589. if (
  2590. !this.state.commodityQuantity ||
  2591. !reg.test(this.state.commodityQuantity)
  2592. ) {
  2593. message.warning("请输入正确商品数量!");
  2594. return false;
  2595. }
  2596. if (!this.state.main) {
  2597. message.warning("请选择是否为主要项目!");
  2598. this.refs.commodityQuantity.focus();
  2599. return false;
  2600. }
  2601. $.ajax({
  2602. method: "POST",
  2603. dataType: "json",
  2604. crossDomain: false,
  2605. url: globalConfig.context + "/api/admin/newOrder/updateOrderTask",
  2606. data: {
  2607. id: this.state.jid, //项目ID
  2608. commodityId: this.state.kid, //商品ID
  2609. orderNo: this.props.datauser.orderNo, //订单编号
  2610. main: this.state.main, //是否为主要
  2611. commodityPrice: this.state.commodityPrice, //金额
  2612. commodityQuantity: this.state.commodityQuantity, //数量
  2613. taskComment: this.state.taskComment //备注
  2614. }
  2615. }).done(
  2616. function (data) {
  2617. this.setState({
  2618. loading: false
  2619. });
  2620. if (!data.error.length) {
  2621. message.success("保存成功!");
  2622. this.nextCancel();
  2623. //this.loaduser(this.props.datauser);
  2624. this.loadData();
  2625. } else {
  2626. message.warning(data.error[0].message);
  2627. }
  2628. }.bind(this)
  2629. );
  2630. },
  2631. //签单时间选择
  2632. selTime(e, index) {
  2633. this.setState({
  2634. entryTime: e,
  2635. signDate: e,
  2636. selTime: index
  2637. });
  2638. },
  2639. //退单操作
  2640. //点击退单
  2641. tuikuan() {
  2642. this.setState({
  2643. lookVisible: true,
  2644. contractUrl: [],
  2645. applicationUrl: [],
  2646. reason: ""
  2647. });
  2648. },
  2649. //关闭退单
  2650. noCancel() {
  2651. this.setState({
  2652. lookVisible: false
  2653. });
  2654. },
  2655. //点击确认退单
  2656. tuidanOk() {
  2657. let contractUrls = [];
  2658. let applicationUrls = [];
  2659. if (this.state.contractUrl.length) {
  2660. let picArr = [];
  2661. this.state.contractUrl.map(function (item) {
  2662. if (
  2663. item.response &&
  2664. item.response.data &&
  2665. item.response.data.length
  2666. ) {
  2667. picArr.push(item.response.data);
  2668. }
  2669. });
  2670. contractUrls = picArr.join(",");
  2671. }
  2672. if (this.state.applicationUrl.length) {
  2673. let picArr = [];
  2674. this.state.applicationUrl.map(function (item) {
  2675. if (
  2676. item.response &&
  2677. item.response.data &&
  2678. item.response.data.length
  2679. ) {
  2680. picArr.push(item.response.data);
  2681. }
  2682. });
  2683. applicationUrls = picArr.join(",");
  2684. }
  2685. $.ajax({
  2686. method: "POST",
  2687. dataType: "json",
  2688. crossDomain: false,
  2689. url: globalConfig.context + "/api/admin/newOrder/addOrderRefund",
  2690. data: {
  2691. orderNo: this.state.orderNo, //订单编号
  2692. contractUrl: contractUrls.length ? contractUrls : "", //终止合同
  2693. applicationUrl: applicationUrls.length ? applicationUrls : "", //退单申请表
  2694. reason: this.state.reason //退单原因
  2695. }
  2696. }).done(
  2697. function (data) {
  2698. this.setState({
  2699. loading: false
  2700. });
  2701. if (!data.error.length) {
  2702. message.success("退单成功!");
  2703. this.noCancel();
  2704. this.handleCancelclose();
  2705. } else {
  2706. message.warning(data.error[0].message);
  2707. }
  2708. }.bind(this)
  2709. );
  2710. },
  2711. //开单选择订单类型骚操作
  2712. orderTypeFn(e) {
  2713. if (e == 0) {
  2714. this.setState({
  2715. bussStats: true,
  2716. orderType: e
  2717. });
  2718. this.category();
  2719. } else {
  2720. this.setState({
  2721. contractType: undefined,
  2722. bussStats: false,
  2723. orderType: e
  2724. });
  2725. }
  2726. },
  2727. //品类数据获取
  2728. category() {
  2729. $.ajax({
  2730. method: "get",
  2731. dataType: "json",
  2732. crossDomain: false,
  2733. url: globalConfig.context + "/api/admin/Varieties/getSuperList",
  2734. data: {},
  2735. success: function (data) {
  2736. let thedata = data.data;
  2737. let theArr = [];
  2738. if (!thedata) {
  2739. if (data.error && data.error.length) {
  2740. message.warning(data.error[0].message);
  2741. }
  2742. thedata = {};
  2743. } else {
  2744. thedata.map(function (item, index) {
  2745. theArr.push({
  2746. key: index,
  2747. name: item.cname,
  2748. id: item.id
  2749. });
  2750. });
  2751. }
  2752. this.setState({
  2753. contractType: undefined,
  2754. categoryArr: theArr
  2755. });
  2756. }.bind(this)
  2757. });
  2758. },
  2759. //变更申请
  2760. changeApply() {
  2761. if (this.state.processStatus <= 4) {
  2762. message.warning("当前订单流程不能发起变更!");
  2763. return false;
  2764. }
  2765. if (this.state.changeAmount === "") {
  2766. message.warning("申请退款金额不能为空!");
  2767. // console.log(this.state.changeAmount);
  2768. return false;
  2769. }
  2770. if (this.state.remarksC.trim() == "") {
  2771. message.warning("请正确填写变更原因");
  2772. return false;
  2773. }
  2774. if (this.state.startRemarks.trim() == "") {
  2775. message.warning("请正确填写备注信息");
  2776. return false;
  2777. }
  2778. let theorgCodeUrl = [];
  2779. if (this.state.voucherUrl.length) {
  2780. let picArr = [];
  2781. this.state.voucherUrl.map(function (item) {
  2782. if (
  2783. item.response &&
  2784. item.response.data &&
  2785. item.response.data.length
  2786. ) {
  2787. picArr.push(item.response.data);
  2788. }
  2789. });
  2790. theorgCodeUrl = picArr.join(",");
  2791. }
  2792. this.setState({
  2793. loading: true
  2794. });
  2795. if (this.state.typeChange == 0) {
  2796. $.ajax({
  2797. method: "post",
  2798. dataType: "json",
  2799. crossDomain: false,
  2800. url: globalConfig.context + "/api/admin/orderChange/addOrderChange",
  2801. data: {
  2802. orderNo: this.state.orderNo, //订单编号
  2803. processState: 1,
  2804. status: 1,
  2805. startRemarks: this.state.startRemarks,
  2806. remarks: this.state.remarksC,
  2807. voucherUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
  2808. totalAmount: this.state.totalAmount,
  2809. settlementAmount: this.state.settlementAmount,
  2810. changeAmount: this.state.changeAmount,
  2811. applicant: this.state.salesmanName,
  2812. depName: this.state.depName,
  2813. type: this.state.typeChange
  2814. }
  2815. }).done(
  2816. function (data) {
  2817. this.setState({
  2818. loading: false
  2819. });
  2820. if (!data.error.length) {
  2821. message.success("发起变更成功");
  2822. this.handleCancelclose();
  2823. } else {
  2824. message.warning(data.error[0].message);
  2825. }
  2826. }.bind(this)
  2827. );
  2828. } else {
  2829. $.ajax({
  2830. method: "post",
  2831. dataType: "json",
  2832. crossDomain: false,
  2833. url: globalConfig.context + "/api/admin/orderChange/addOrderChange",
  2834. data: {
  2835. orderNo: this.state.orderNo, //订单编号
  2836. processState: 0,
  2837. status: 0,
  2838. startRemarks: this.state.startRemarks,
  2839. remarks: this.state.remarksC,
  2840. voucherUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
  2841. totalAmount: this.state.totalAmount,
  2842. settlementAmount: this.state.settlementAmount,
  2843. changeAmount: this.state.changeAmount,
  2844. applicant: this.state.salesmanName,
  2845. depName: this.state.depName,
  2846. type: this.state.typeChange
  2847. }
  2848. }).done(
  2849. function (data) {
  2850. this.setState({
  2851. loading: false
  2852. });
  2853. if (!data.error.length) {
  2854. message.success("发起变更草稿");
  2855. this.setState(
  2856. {
  2857. isCaoGao: true,
  2858. loading: false
  2859. },
  2860. () => {
  2861. this.callback("2");
  2862. }
  2863. );
  2864. } else {
  2865. message.warning(data.error[0].message);
  2866. }
  2867. }.bind(this)
  2868. );
  2869. }
  2870. },
  2871. reset() {
  2872. this.setState({
  2873. startRemarks: "",
  2874. remarksC: "",
  2875. voucherUrl: [],
  2876. totalAmount: undefined,
  2877. settlementAmount: undefined,
  2878. changeAmount: "0",
  2879. applicant: undefined,
  2880. depNameChange: undefined,
  2881. typeChange: []
  2882. });
  2883. },
  2884. componentWillReceiveProps(nextProps) {
  2885. //props改变时触发
  2886. this.state.visible = nextProps.showDesc;
  2887. this.state.signBillVisible = nextProps.signBillVisible;
  2888. if (this.state.signBillVisible) {
  2889. this.loaduser(nextProps.uid);
  2890. }
  2891. if (nextProps.userDetaile && nextProps.showDesc) {
  2892. this.loaduser(nextProps.datauser);
  2893. this.jiedian(nextProps.datauser.orderNo);
  2894. this.jiedianNew(nextProps.datauser.orderNo);
  2895. this.loadData(nextProps.datauser);
  2896. this.getChangeData(nextProps.datauser);
  2897. } else {
  2898. this.setState({
  2899. orderType: undefined,
  2900. customerName: "",
  2901. autoId: "",
  2902. customerArr: [],
  2903. contractType: undefined,
  2904. bussStats: false,
  2905. customType: undefined
  2906. });
  2907. }
  2908. },
  2909. //查看变更记录
  2910. getChangeData(record) {
  2911. this.setState({
  2912. loading: true
  2913. });
  2914. $.ajax({
  2915. method: "get",
  2916. dataType: "json",
  2917. crossDomain: false,
  2918. url: globalConfig.context + "/api/admin/orderChange/orderChangeDetails",
  2919. data: {
  2920. orderNo: record ? record.orderNo : this.props.datauser.orderNo
  2921. },
  2922. success: function (data) {
  2923. this.setState({
  2924. loading: false
  2925. });
  2926. let url = window.location.href.substring(7);
  2927. // console.log(data.data);
  2928. if (data.data && data.data.length) {
  2929. let thisdata = data.data[data.data.length - 1];
  2930. let obj = {
  2931. id: thisdata.id,
  2932. typeChange: thisdata.type,
  2933. totalAmount: thisdata.totalAmount,
  2934. settlementAmount: thisdata.settlementAmount,
  2935. changeAmount: thisdata.changeAmount,
  2936. remarksC: thisdata.remarks,
  2937. startRemarks: thisdata.zxsRemarks,
  2938. processState: thisdata.processState,
  2939. status: thisdata.status,
  2940. voucherUrl: thisdata.voucherUrl
  2941. ? splitUrl(
  2942. thisdata.voucherUrl,
  2943. ",",
  2944. globalConfig.avatarHost + "/upload",
  2945. url
  2946. )
  2947. : []
  2948. };
  2949. this.proList(thisdata.id);
  2950. this.cuiList(thisdata.id);
  2951. this.setState({
  2952. //判断是否有合同变更记录
  2953. isJilu: true,
  2954. detailChange: obj
  2955. });
  2956. }
  2957. }.bind(this)
  2958. });
  2959. },
  2960. showConfirm(fn, record) {
  2961. confirm({
  2962. title: "确定删除此项目吗?",
  2963. content: (
  2964. <span style={{ color: "red" }}>
  2965. 删除后会将该项目下的所有催款节点自动清除!!!
  2966. </span>
  2967. ),
  2968. onOk() {
  2969. fn(record);
  2970. },
  2971. onCancel() { }
  2972. });
  2973. },
  2974. changeAddPro() {
  2975. this.setState({
  2976. changeVisible: true,
  2977. gid: "",
  2978. customerArr: [],
  2979. commodityName: "",
  2980. commodityQuantity: "",
  2981. commodityId: "",
  2982. taskComment: "",
  2983. main: undefined,
  2984. commodityPrice: ""
  2985. });
  2986. },
  2987. changeProSubmit() {
  2988. if (this.state.gid == undefined || !this.state.gid) {
  2989. message.warning("服务名称不匹配!");
  2990. return false;
  2991. }
  2992. if (!this.state.commodityPrice) {
  2993. message.warning("请输入金额!");
  2994. this.refs.commodityPrice.focus();
  2995. return false;
  2996. }
  2997. let reg = /^([0]|[1-9][0-9]*)$/;
  2998. if (
  2999. !this.state.commodityQuantity ||
  3000. !reg.test(this.state.commodityQuantity)
  3001. ) {
  3002. message.warning("请输入正确商品数量!");
  3003. this.refs.commodityQuantity.focus();
  3004. return false;
  3005. }
  3006. if (!this.state.main) {
  3007. message.warning("请选择是否为主要项目!");
  3008. this.refs.commodityQuantity.focus();
  3009. return false;
  3010. }
  3011. this.setState({
  3012. loading: true
  3013. });
  3014. let type = 0;
  3015. if (this.state.typeChange == 4 || this.state.typeChange == 5) {
  3016. type = 1;
  3017. }
  3018. $.ajax({
  3019. method: "post",
  3020. dataType: "json",
  3021. crossDomain: false,
  3022. url: globalConfig.context + "/api/admin/orderChange/addChangeTask",
  3023. data: {
  3024. commodityId: this.state.gid, //商品ID
  3025. orderNo: this.props.datauser.orderNo, //订单编号
  3026. commodityName: this.state.commodityName, //商品名称
  3027. commodityQuantity: this.state.commodityQuantity, //商品数量
  3028. commodityPrice: this.state.commodityPrice, //签单总价
  3029. taskComment: this.state.taskComment, //服务说明
  3030. main: this.state.main, //是否为主要项目
  3031. cid: this.state.changeId, //变更ID
  3032. type
  3033. },
  3034. success: function (data) {
  3035. let theArr = [];
  3036. if (data.error && data.error.length) {
  3037. message.warning(data.error[0].message);
  3038. } else {
  3039. message.success("保存成功");
  3040. this.nextCancel();
  3041. this.proList();
  3042. }
  3043. }.bind(this)
  3044. }).always(
  3045. function () {
  3046. this.setState({
  3047. loading: false
  3048. });
  3049. }.bind(this)
  3050. );
  3051. },
  3052. changeDeletePro(record) {
  3053. this.setState({
  3054. loading: true
  3055. });
  3056. $.ajax({
  3057. method: "post",
  3058. dataType: "json",
  3059. crossDomain: false,
  3060. url: globalConfig.context + "/api/admin/orderChange/updateChangeTask",
  3061. data: {
  3062. id: record.id,
  3063. type: 3,
  3064. tid: record.tid
  3065. },
  3066. success: function (data) {
  3067. let theArr = [];
  3068. if (data.error && data.error.length) {
  3069. message.warning(data.error[0].message);
  3070. } else {
  3071. message.success("删除成功");
  3072. this.proList();
  3073. this.cuiList()
  3074. }
  3075. }.bind(this)
  3076. }).always(
  3077. function () {
  3078. this.setState({
  3079. loading: false
  3080. });
  3081. }.bind(this)
  3082. );
  3083. },
  3084. //点击新增变更催款节点
  3085. changeAddCui() {
  3086. this.state.cuiDataSource.push({
  3087. key: this.state.cuiDataSource.length,
  3088. money: "",
  3089. dunSubject: undefined,
  3090. orderNo: this.state.orderNo,
  3091. dunTarget: this.state.kehuId
  3092. });
  3093. this.setState({
  3094. cuiDataSource: this.state.cuiDataSource,
  3095. cuiFlag: true
  3096. });
  3097. },
  3098. //删除变更收款节点
  3099. changeDeleteCui(index) {
  3100. if (index.id) {
  3101. this.state.cuiDataSource.splice(index.id, 1);
  3102. this.setState({
  3103. contactListNew: this.state.cuiDataSource,
  3104. cuiFlag: false,
  3105. addFlag: false,
  3106. boFlag: false
  3107. });
  3108. $.ajax({
  3109. url: globalConfig.context + "/api/admin/orderChange/updateChangeDun",
  3110. method: "post",
  3111. data: {
  3112. id: index.id,
  3113. type: 3,
  3114. tid: index.tid
  3115. }
  3116. }).done(
  3117. function (data) {
  3118. this.setState({
  3119. loading: false
  3120. });
  3121. if (!data.error.length) {
  3122. message.success("删除成功!");
  3123. this.setState({
  3124. cuiFlag: false
  3125. });
  3126. this.cuiList();
  3127. this.proList()
  3128. } else {
  3129. message.warning(data.error[0].message);
  3130. }
  3131. }.bind(this)
  3132. );
  3133. } else {
  3134. this.state.cuiDataSource.splice(index.key, 1);
  3135. this.setState({
  3136. cuiDataSource: this.state.cuiDataSource,
  3137. cuiFlag: false,
  3138. addFlag: false,
  3139. boFlag: false
  3140. });
  3141. }
  3142. },
  3143. changeSaveCui(record) {
  3144. if (record.boStatus == "false") {
  3145. record.boStatus = false;
  3146. } else if (record.boStatus == "true") {
  3147. record.boStatus = true;
  3148. }
  3149. if (!this.state.yearFlag) {
  3150. if (!record.effectiveCount) {
  3151. message.warning("请选择服务年限");
  3152. return;
  3153. }
  3154. } else {
  3155. record.effectiveCount = "";
  3156. }
  3157. if (record.money == "") {
  3158. message.warning("请填写金额");
  3159. return;
  3160. }
  3161. if (record.boStatus) {
  3162. if (
  3163. typeof +record.money == "number" &&
  3164. +record.money >= 0 &&
  3165. +record.money <= 1
  3166. ) {
  3167. record.appropriationRatio = record.money;
  3168. } else {
  3169. message.warning("金额比例填写错误,比例范围0~1");
  3170. return;
  3171. }
  3172. }
  3173. if (!record.dunType) {
  3174. message.warning("请选择对应科目");
  3175. return;
  3176. }
  3177. if (record.dunType != 1) {
  3178. record.waitDay = "";
  3179. }
  3180. this.setState({
  3181. loading: true
  3182. });
  3183. if (record.boStatus) {
  3184. $.ajax({
  3185. url: globalConfig.context + "/api/admin/orderChange/addChangeDun",
  3186. method: "post",
  3187. data: {
  3188. orderNo: record.orderNo,
  3189. ctid: record.ctid,
  3190. projectType: record.sort,
  3191. dunType: record.dunType,
  3192. appropriationRatio: record.appropriationRatio,
  3193. waitDay: record.waitDay,
  3194. effectiveCount: record.effectiveCount,
  3195. cid: this.state.changeId //变更ID
  3196. }
  3197. }).done(
  3198. function (data) {
  3199. this.setState({
  3200. loading: false
  3201. });
  3202. if (!data.error.length) {
  3203. message.success("保存成功!");
  3204. this.setState({
  3205. cuiFlag: false,
  3206. boFlag: false,
  3207. addFlag: false
  3208. });
  3209. this.cuiList();
  3210. } else {
  3211. message.warning(data.error[0].message);
  3212. }
  3213. }.bind(this)
  3214. );
  3215. } else {
  3216. $.ajax({
  3217. url: globalConfig.context + "/api/admin/orderChange/addChangeDun",
  3218. method: "post",
  3219. data: {
  3220. orderNo: record.orderNo,
  3221. ctid: record.ctid,
  3222. projectType: record.sort,
  3223. dunType: record.dunType,
  3224. money: record.money,
  3225. waitDay: record.waitDay,
  3226. effectiveCount: record.effectiveCount,
  3227. cid: this.state.changeId //变更ID
  3228. }
  3229. }).done(
  3230. function (data) {
  3231. this.setState({
  3232. loading: false
  3233. });
  3234. if (!data.error.length) {
  3235. message.success("保存成功!");
  3236. this.setState({
  3237. cuiFlag: false,
  3238. boFlag: false,
  3239. addFlag: false
  3240. });
  3241. this.cuiList();
  3242. } else {
  3243. message.warning(data.error[0].message);
  3244. }
  3245. }.bind(this)
  3246. );
  3247. }
  3248. },
  3249. submitChange() {
  3250. if (this.state.processStatus <= 4) {
  3251. message.warning("当前订单流程不能发起变更!");
  3252. return false;
  3253. }
  3254. if (this.state.changeAmount === "") {
  3255. message.warning("申请退款金额不能为空!");
  3256. return false;
  3257. }
  3258. if (this.state.remarksC.trim() == "") {
  3259. message.warning("请正确填写变更原因");
  3260. return false;
  3261. }
  3262. if (this.state.startRemarks.trim() == "") {
  3263. message.warning("请正确填写备注信息");
  3264. return false;
  3265. }
  3266. let theorgCodeUrl = [];
  3267. if (this.state.voucherUrl.length) {
  3268. let picArr = [];
  3269. this.state.voucherUrl.map(function (item) {
  3270. if (
  3271. item.response &&
  3272. item.response.data &&
  3273. item.response.data.length
  3274. ) {
  3275. picArr.push(item.response.data);
  3276. }
  3277. });
  3278. theorgCodeUrl = picArr.join(",");
  3279. }
  3280. this.setState({
  3281. loading: true
  3282. });
  3283. $.ajax({
  3284. url: globalConfig.context + "/api/admin/orderChange/updateOrderChange",
  3285. method: "post",
  3286. data: {
  3287. id: this.state.changeId,
  3288. changeType: 0,
  3289. orderNo: this.state.orderNo, //订单编号
  3290. processState: 0,
  3291. startRemarks: this.state.startRemarks,
  3292. remarks: this.state.remarksC,
  3293. voucherUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
  3294. totalAmount: this.state.totalAmount,
  3295. settlementAmount: this.state.settlementAmount,
  3296. changeAmount: this.state.changeAmount,
  3297. applicant: this.state.salesmanName,
  3298. depName: this.state.depName,
  3299. type: this.state.typeChange
  3300. }
  3301. }).done(
  3302. function (data) {
  3303. if (!data.error.length) {
  3304. this.setState({
  3305. loading: false
  3306. });
  3307. message.success("发起变更成功");
  3308. this.handleCancelclose();
  3309. } else {
  3310. message.warning(data.error[0].message);
  3311. }
  3312. }.bind(this)
  3313. );
  3314. },
  3315. editCui(record) {
  3316. this.setState({
  3317. editCuiVisible: true,
  3318. editCuiMoney: record.money,
  3319. editCuiTid: record.tid,
  3320. editCuiId: record.id,
  3321. });
  3322. console.log(record);
  3323. },
  3324. editPro(record) {
  3325. this.setState({
  3326. editProVisible: true,
  3327. editProMoney: record.commodityPrice,
  3328. editProCommodityQuantity: record.commodityQuantity,
  3329. editProTid: record.tid,
  3330. editProId: record.id
  3331. });
  3332. console.log(record);
  3333. },
  3334. submitEditCui() {
  3335. this.setState({
  3336. loading: true
  3337. })
  3338. $.ajax({
  3339. url: globalConfig.context + "/api/admin/orderChange/updateChangeDun",
  3340. method: "post",
  3341. data: {
  3342. id: this.state.editCuiId,
  3343. type: this.state.editCuiTid ? 2 : 1,
  3344. money: this.state.editCuiMoney,
  3345. tid: this.state.editCuiTid
  3346. }
  3347. }).done(
  3348. function (data) {
  3349. this.setState({
  3350. loading: false
  3351. });
  3352. if (!data.error.length) {
  3353. message.success("修改成功!");
  3354. this.cuiList();
  3355. this.proList();
  3356. this.setState({
  3357. editCuiVisible: false
  3358. });
  3359. } else {
  3360. message.warning(data.error[0].message);
  3361. }
  3362. }.bind(this)
  3363. );
  3364. },
  3365. submitEditPro() {
  3366. this.setState({
  3367. loading: true
  3368. })
  3369. $.ajax({
  3370. url: globalConfig.context + "/api/admin/orderChange/updateChangeTask",
  3371. method: "post",
  3372. data: {
  3373. id: this.state.editProId,
  3374. type: this.state.editProTid ? 2 : 1,
  3375. commodityPrice: this.state.editProMoney,
  3376. commodityQuantity: this.state.editProCommodityQuantity,
  3377. tid: this.state.editProTid
  3378. }
  3379. }).done(
  3380. function (data) {
  3381. this.setState({
  3382. loading: false
  3383. });
  3384. if (!data.error.length) {
  3385. message.success("修改成功!");
  3386. this.cuiList();
  3387. this.proList();
  3388. this.setState({
  3389. editProVisible: false
  3390. });
  3391. } else {
  3392. message.warning(data.error[0].message);
  3393. }
  3394. }.bind(this)
  3395. );
  3396. },
  3397. render() {
  3398. const FormItem = Form.Item;
  3399. const { TabPane } = Tabs;
  3400. const { TextArea } = Input;
  3401. const formItemLayout = {
  3402. labelCol: { span: 8 },
  3403. wrapperCol: { span: 14 }
  3404. };
  3405. const contractData = this.state.contractData;
  3406. const formItemList = [
  3407. {
  3408. label: "企业联系人",
  3409. content: <span>{this.state.contacts}</span>
  3410. },
  3411. {
  3412. label: "联系人电话",
  3413. content: <span>{this.state.contactMobile}</span>
  3414. },
  3415. {
  3416. label: "企业法人",
  3417. content: <span>{this.state.legalPerson}</span>
  3418. },
  3419. {
  3420. label: "法人电话",
  3421. content: <span>{this.state.legalPersonTel}</span>
  3422. }
  3423. // {
  3424. // label: "签单金额(万元)",
  3425. // content: <span>{this.state.totalAmount}</span>
  3426. // },
  3427. // {
  3428. // label: "首付金额(万元)",
  3429. // content: <span>{this.state.firstAmount}</span>
  3430. // },
  3431. // {
  3432. // label: "特批立项",
  3433. // content: <span>{getApprovedState(this.state.approval)}</span>
  3434. // },
  3435. // {
  3436. // label: "合同签订时间",
  3437. // content: <span>{this.state.signDate}</span>
  3438. // },
  3439. // {
  3440. // label: "订单部门",
  3441. // content: <span>{this.state.depName}</span>
  3442. // }
  3443. ];
  3444. const dataSources = this.state.customerArr || [];
  3445. const cuiDataList = this.state.contactList || [];
  3446. let departmentArr = this.state.departmentArr || [];
  3447. const options = this.state.states
  3448. ? dataSources.map(group => (
  3449. <Select.Option key={group.id} value={group.name}>
  3450. {group.name}
  3451. </Select.Option>
  3452. ))
  3453. : dataSources.map((group, index) => (
  3454. <Select.Option key={index} value={group.bname}>
  3455. {group.bname}
  3456. </Select.Option>
  3457. ));
  3458. return (
  3459. <div>
  3460. <Modal
  3461. maskClosable={false}
  3462. visible={this.state.visible}
  3463. onOk={this.handleOk}
  3464. onCancel={this.handleCancelclose}
  3465. width={!this.props.userDetaile ? "600px" : "900px"}
  3466. title={!this.props.userDetaile ? "创建订单" : ""}
  3467. footer=""
  3468. // width={1300}
  3469. className="admin-desc-content"
  3470. >
  3471. <Form
  3472. layout="horizontal"
  3473. onSubmit={this.handleSubmit}
  3474. // id="demand-form"
  3475. style={{ paddingBottom: "40px" }}
  3476. >
  3477. <Spin spinning={this.state.loading}>
  3478. <div className="clearfix">
  3479. {!this.props.userDetaile ? (
  3480. <div className="clearfix">
  3481. <div className="clearfix">
  3482. <FormItem {...formItemLayout} label="订单类型">
  3483. <Select
  3484. placeholder="请选择订单类型"
  3485. style={{ width: "200px" }}
  3486. value={this.state.orderType}
  3487. onChange={e => {
  3488. this.setState({ orderType: e });
  3489. }}
  3490. >
  3491. {orderTypes.map(function (item) {
  3492. return (
  3493. <Select.Option key={item.value}>
  3494. {item.key}
  3495. </Select.Option>
  3496. );
  3497. })}
  3498. </Select>
  3499. <span className="mandatory">*</span>
  3500. </FormItem>
  3501. </div>
  3502. <FormItem {...formItemLayout} label="客户所属类型">
  3503. <Select
  3504. placeholder="请选择客户所属类型"
  3505. style={{ width: "200px" }}
  3506. value={this.state.customType}
  3507. onChange={e => {
  3508. this.setState({ customType: e });
  3509. }}
  3510. >
  3511. {customerType.map(function (item) {
  3512. return (
  3513. <Select.Option key={item.value}>
  3514. {item.key}
  3515. </Select.Option>
  3516. );
  3517. })}
  3518. </Select>
  3519. </FormItem>
  3520. <div className="clearfix">
  3521. <FormItem {...formItemLayout} label="客户名称">
  3522. <AutoComplete
  3523. className="certain-category-search"
  3524. dropdownClassName="certain-category-search-dropdown"
  3525. dropdownMatchSelectWidth={false}
  3526. dropdownStyle={{ width: 200 }}
  3527. size="large"
  3528. style={{ width: "200px" }}
  3529. dataSource={options}
  3530. placeholder="输入名称"
  3531. value={this.state.customerName}
  3532. onChange={this.customerChange}
  3533. filterOption={true}
  3534. onSelect={this.selectAutoCUT}
  3535. >
  3536. <Input />
  3537. </AutoComplete>
  3538. <span className="mandatory">*</span>
  3539. </FormItem>
  3540. </div>
  3541. <div className="addSave" style={{ marginTop: "15px" }}>
  3542. <Button
  3543. className="cancel"
  3544. type="primary"
  3545. onClick={this.handleCancel}
  3546. style={{ marginLeft: "150px" }}
  3547. htmlType="submit"
  3548. >
  3549. 开单
  3550. </Button>
  3551. <Button
  3552. className="cancel"
  3553. type="ghost"
  3554. onClick={this.handleCancelclose}
  3555. style={{ marginLeft: "50px" }}
  3556. >
  3557. 取消
  3558. </Button>
  3559. </div>
  3560. </div>
  3561. ) : (
  3562. <Tabs
  3563. onChange={this.callback}
  3564. activeKey={this.state.activeKey}
  3565. >
  3566. <TabPane tab={"最新订单"} key="1">
  3567. <div className="clearfix">
  3568. <div className="clearfix">
  3569. <FormItem
  3570. className="half-item"
  3571. {...formItemLayout}
  3572. label="合同编号"
  3573. >
  3574. {<span>{this.state.contractNo}</span>}
  3575. </FormItem>
  3576. <FormItem
  3577. className="half-item"
  3578. {...formItemLayout}
  3579. label="订单编号"
  3580. >
  3581. <span>{this.state.orderNo}</span>
  3582. </FormItem>
  3583. <FormItem
  3584. className="half-item"
  3585. {...formItemLayout}
  3586. label="流程状态"
  3587. >
  3588. <span>
  3589. {getProcessStatus(this.state.processStatus)}
  3590. </span>
  3591. </FormItem>
  3592. <FormItem
  3593. className="half-item"
  3594. {...formItemLayout}
  3595. label="结算状态"
  3596. >
  3597. <span>
  3598. {getLiquidationStatus(
  3599. this.state.liquidationStatus
  3600. )}
  3601. </span>
  3602. </FormItem>
  3603. {this.state.processStatus === 0 ? (
  3604. <div className="clearfix">
  3605. <FormItem
  3606. className="half-item"
  3607. {...formItemLayout}
  3608. label="特批立项"
  3609. >
  3610. <Select
  3611. placeholder="请选择客户所属类型"
  3612. style={{ width: "240px" }}
  3613. value={getApprovedState(
  3614. this.state.approval
  3615. )}
  3616. onChange={e => {
  3617. this.setState({ approval: e });
  3618. }}
  3619. >
  3620. {/* {tepi.map(function(item) {
  3621. // if(item.key == "特批通过" || item.key == "特批驳回")
  3622. return (
  3623. <Select.Option key={item.value}>
  3624. {item.key}
  3625. </Select.Option>
  3626. );
  3627. })} */}
  3628. <Select.Option key={0}>
  3629. 非特批
  3630. </Select.Option>
  3631. <Select.Option key={1}>特批</Select.Option>
  3632. </Select>
  3633. </FormItem>
  3634. <FormItem
  3635. className="half-item"
  3636. {...formItemLayout}
  3637. label="合同签订时间"
  3638. >
  3639. <DatePicker
  3640. style={{
  3641. marginTop: "2px",
  3642. // width: "240px",
  3643. height: "32px"
  3644. }}
  3645. showTime
  3646. format="YYYY-MM-DD"
  3647. onOk={() => { }}
  3648. value={
  3649. this.state.signDate
  3650. ? moment(this.state.signDate)
  3651. : null
  3652. }
  3653. onChange={(data, dataString) => {
  3654. this.setState({ signDate: dataString });
  3655. }}
  3656. />
  3657. <span
  3658. className="mandatory"
  3659. style={{ marginLeft: 20 }}
  3660. >
  3661. *
  3662. </span>
  3663. </FormItem>
  3664. <FormItem
  3665. className="half-item"
  3666. {...formItemLayout}
  3667. label="订单部门"
  3668. >
  3669. <Select
  3670. placeholder="请输入订单部门"
  3671. style={{ width: 240 }}
  3672. value={this.state.organizationSearch}
  3673. onChange={e => {
  3674. this.setState({ organizationSearch: e });
  3675. }}
  3676. >
  3677. {departmentArr.map(function (item) {
  3678. return (
  3679. <Select.Option key={item.id}>
  3680. {item.name}
  3681. </Select.Option>
  3682. );
  3683. })}
  3684. </Select>
  3685. </FormItem>
  3686. </div>
  3687. ) : (
  3688. <div className="clearfix">
  3689. <FormItem
  3690. className="half-item"
  3691. {...formItemLayout}
  3692. label="特批立项"
  3693. >
  3694. <span>
  3695. {getApprovedState(this.state.approval)}
  3696. </span>
  3697. </FormItem>
  3698. <FormItem
  3699. className="half-item"
  3700. {...formItemLayout}
  3701. label="合同签订时间"
  3702. >
  3703. <span>{this.state.signDate}</span>
  3704. </FormItem>
  3705. <FormItem
  3706. className="half-item"
  3707. {...formItemLayout}
  3708. label="订单部门"
  3709. >
  3710. <span>{this.state.depName}</span>
  3711. </FormItem>
  3712. <FormItem
  3713. className="half-item"
  3714. {...formItemLayout}
  3715. label="是否外包"
  3716. >
  3717. <span>
  3718. {this.state.outsource == 0 ? "否" : "是"}
  3719. </span>
  3720. </FormItem>
  3721. </div>
  3722. )}
  3723. </div>
  3724. <h3
  3725. style={{
  3726. marginLeft: 10,
  3727. fontWeight: 800,
  3728. marginBottom: 10
  3729. }}
  3730. >
  3731. 收款项目
  3732. </h3>
  3733. {this.state.processStatus === 0 ? (
  3734. <div className="clearfix">
  3735. <FormItem
  3736. className="half-item"
  3737. {...formItemLayout}
  3738. label="签单金额(万元)"
  3739. >
  3740. <Input
  3741. placeholder="签单金额"
  3742. ref="signTotalAmount"
  3743. value={this.state.totalAmount}
  3744. onChange={e => {
  3745. this.setState({
  3746. totalAmount: e.target.value
  3747. });
  3748. }}
  3749. style={{ width: "240px" }}
  3750. />
  3751. {/* <span className="mandatory">*</span> */}
  3752. </FormItem>
  3753. <FormItem
  3754. className="half-item"
  3755. {...formItemLayout}
  3756. label="首付金额(万元)"
  3757. >
  3758. <Input
  3759. placeholder="请输入实签首款金额"
  3760. ref="signFirstPayment"
  3761. value={this.state.firstAmount}
  3762. onChange={e => {
  3763. this.setState({
  3764. firstAmount: e.target.value
  3765. });
  3766. }}
  3767. style={{ width: "240px" }}
  3768. />
  3769. {/* <span className="mandatory">*</span> */}
  3770. </FormItem>
  3771. <FormItem
  3772. className="half-item"
  3773. {...formItemLayout}
  3774. label="已收款项"
  3775. >
  3776. <span>
  3777. {this.state.settlementAmount + "万元"}
  3778. </span>
  3779. {/* {this.state.settlementAmount ? (
  3780. <Button
  3781. type="primary"
  3782. onClick={this.tuikuan}
  3783. style={{
  3784. float: "right",
  3785. marginRight: "50px",
  3786. marginBottom: "15px"
  3787. }}
  3788. >
  3789. 退单
  3790. </Button>
  3791. ) : (
  3792. ""
  3793. )} */}
  3794. </FormItem>
  3795. </div>
  3796. ) : (
  3797. <div className="clearfix">
  3798. <FormItem
  3799. className="half-item"
  3800. {...formItemLayout}
  3801. label="签单金额(万元)"
  3802. >
  3803. <span>{this.state.totalAmount}</span>
  3804. </FormItem>
  3805. <FormItem
  3806. className="half-item"
  3807. {...formItemLayout}
  3808. label="首付金额(万元)"
  3809. >
  3810. <span>{this.state.firstAmount}</span>
  3811. </FormItem>
  3812. <FormItem
  3813. className="half-item"
  3814. {...formItemLayout}
  3815. label="已收款项"
  3816. >
  3817. <span>
  3818. {this.state.settlementAmount + "万元"}
  3819. </span>
  3820. {/* {this.state.settlementAmount ? (
  3821. <Button
  3822. type="primary"
  3823. onClick={this.tuikuan}
  3824. style={{
  3825. float: "right",
  3826. marginRight: "50px",
  3827. marginBottom: "15px"
  3828. }}
  3829. >
  3830. 退单
  3831. </Button>
  3832. ) : (
  3833. ""
  3834. )} */}
  3835. </FormItem>
  3836. </div>
  3837. )}
  3838. <h3
  3839. style={{
  3840. marginLeft: 10,
  3841. fontWeight: 800,
  3842. marginBottom: 10
  3843. }}
  3844. >
  3845. 联系信息
  3846. </h3>
  3847. {this.state.processStatus == 0 ? (
  3848. <div className="clearfix">
  3849. <div className="clearfix">
  3850. <FormItem
  3851. className="half-item"
  3852. {...formItemLayout}
  3853. label="客户名称"
  3854. >
  3855. <span>{this.state.userName}</span>
  3856. </FormItem>
  3857. </div>
  3858. <FormItem
  3859. className="half-item"
  3860. {...formItemLayout}
  3861. label="企业联系人"
  3862. >
  3863. <Input
  3864. placeholder="请输入联系人"
  3865. ref="signTotalAmount"
  3866. value={this.state.contacts}
  3867. onChange={e => {
  3868. this.setState({ contacts: e.target.value });
  3869. }}
  3870. style={{ width: "240px" }}
  3871. />
  3872. </FormItem>
  3873. <FormItem
  3874. className="half-item"
  3875. {...formItemLayout}
  3876. label="联系人电话"
  3877. >
  3878. <Input
  3879. placeholder="请输入联系人电话"
  3880. ref="signTotalAmount"
  3881. value={this.state.contactMobile}
  3882. onChange={e => {
  3883. this.setState({
  3884. contactMobile: e.target.value
  3885. });
  3886. }}
  3887. style={{ width: "240px" }}
  3888. />
  3889. </FormItem>
  3890. <FormItem
  3891. className="half-item"
  3892. {...formItemLayout}
  3893. label="企业法人"
  3894. >
  3895. <Input
  3896. placeholder="请输入法人"
  3897. ref="signTotalAmount"
  3898. value={this.state.legalPerson}
  3899. onChange={e => {
  3900. this.setState({
  3901. legalPerson: e.target.value
  3902. });
  3903. }}
  3904. style={{ width: "240px" }}
  3905. />
  3906. </FormItem>
  3907. <FormItem
  3908. className="half-item"
  3909. {...formItemLayout}
  3910. label="法人电话"
  3911. >
  3912. <Input
  3913. placeholder="请输入法人电话"
  3914. ref="signTotalAmount"
  3915. value={this.state.legalPersonTel}
  3916. onChange={e => {
  3917. this.setState({
  3918. legalPersonTel: e.target.value
  3919. });
  3920. }}
  3921. style={{ width: "240px" }}
  3922. />
  3923. </FormItem>
  3924. </div>
  3925. ) : (
  3926. <div className="clearfix">
  3927. {formItemList.map((data, index) => {
  3928. return (
  3929. <FormItem
  3930. className="half-item"
  3931. {...formItemLayout}
  3932. key={index}
  3933. label={data.label}
  3934. >
  3935. {data.content}
  3936. </FormItem>
  3937. );
  3938. })}
  3939. </div>
  3940. )}
  3941. <div className="clearfix">
  3942. {this.state.processStatus == 0 ? (
  3943. <FormItem
  3944. labelCol={{ span: 4 }}
  3945. wrapperCol={{ span: 18 }}
  3946. label={
  3947. <span>
  3948. <strong style={{ color: "#f00" }}>*</strong>
  3949. 合同扫描件
  3950. </span>
  3951. }
  3952. >
  3953. <PicturesWall
  3954. fileList={this.getOrgCodeUrl}
  3955. pictureUrl={this.state.orgCodeUrl}
  3956. url="/api/admin/order/uploadOrderImg"
  3957. sign=""
  3958. />
  3959. <p>图片建议:要清晰。</p>
  3960. <Button
  3961. style={{
  3962. float: "right",
  3963. marginRight: "140px",
  3964. marginTop: "20px"
  3965. }}
  3966. onClick={this.getOrderLog}
  3967. >
  3968. 查看订单日志
  3969. </Button>
  3970. </FormItem>
  3971. ) : (
  3972. <FormItem
  3973. labelCol={{ span: 4 }}
  3974. wrapperCol={{ span: 18 }}
  3975. label="合同扫描件"
  3976. >
  3977. <Upload
  3978. className="demandDetailShow-upload"
  3979. listType="picture-card"
  3980. fileList={this.state.orgCodeUrl}
  3981. onPreview={file => {
  3982. this.setState({
  3983. previewImage: file.url || file.thumbUrl,
  3984. previewVisible: true
  3985. });
  3986. }}
  3987. ></Upload>
  3988. <Modal
  3989. maskClosable={false}
  3990. footer={null}
  3991. visible={this.state.previewVisible}
  3992. onCancel={() => {
  3993. this.setState({ previewVisible: false });
  3994. }}
  3995. >
  3996. <img
  3997. alt=""
  3998. style={{ width: "100%" }}
  3999. src={this.state.previewImage || ""}
  4000. />
  4001. </Modal>
  4002. <Button
  4003. style={{
  4004. float: "right",
  4005. marginRight: "140px",
  4006. marginTop: "20px"
  4007. }}
  4008. onClick={this.getOrderLog}
  4009. >
  4010. 查看订单日志
  4011. </Button>
  4012. </FormItem>
  4013. )}
  4014. </div>
  4015. <div className="clearfix">
  4016. {this.state.processStatus == 0 ? (
  4017. <div className="clearfix">
  4018. <FormItem
  4019. labelCol={{ span: 4 }}
  4020. wrapperCol={{ span: 16 }}
  4021. label="订单留言"
  4022. >
  4023. <Input
  4024. type="textarea"
  4025. placeholder="请输入订单留言"
  4026. rows={4}
  4027. value={this.state.orderRemarks}
  4028. onChange={e => {
  4029. this.setState({
  4030. orderRemarks: e.target.value
  4031. });
  4032. }}
  4033. style={{ width: "95%" }}
  4034. />
  4035. <span className="mandatory">*</span>
  4036. </FormItem>
  4037. </div>
  4038. ) : (
  4039. <FormItem
  4040. labelCol={{ span: 4 }}
  4041. wrapperCol={{ span: 16 }}
  4042. label="订单留言"
  4043. >
  4044. <p
  4045. style={{ width: 500, wordWrap: "break-word" }}
  4046. >
  4047. {this.state.orderRemarks}
  4048. </p>
  4049. </FormItem>
  4050. )}
  4051. </div>
  4052. <div className="clearfix">
  4053. <FormItem
  4054. className="half-item"
  4055. {...formItemLayout}
  4056. label="订单负责人"
  4057. >
  4058. <span>{this.state.salesmanName}</span>
  4059. </FormItem>
  4060. <FormItem
  4061. className="half-item"
  4062. {...formItemLayout}
  4063. label="订单负责人电话"
  4064. >
  4065. <span>{this.state.salesmanMobile}</span>
  4066. </FormItem>
  4067. </div>
  4068. <div className="clearfix">
  4069. <FormItem
  4070. className="half-item"
  4071. {...formItemLayout}
  4072. label="当前财务负责人"
  4073. >
  4074. <span>{this.state.nowFinance}</span>
  4075. </FormItem>
  4076. <FormItem
  4077. className="half-item"
  4078. {...formItemLayout}
  4079. label="当前财务负责人电话"
  4080. >
  4081. <span>{this.state.nowFinanceMobile}</span>
  4082. </FormItem>
  4083. </div>
  4084. <div className="clearfix">
  4085. <FormItem
  4086. className="half-item"
  4087. {...formItemLayout}
  4088. style={{ opacity: ".5" }}
  4089. label="原订单负责人"
  4090. >
  4091. <span>{this.state.oldSalesmanName}</span>
  4092. </FormItem>
  4093. <FormItem
  4094. className="half-item"
  4095. {...formItemLayout}
  4096. style={{ opacity: ".5" }}
  4097. label="原订单负责人电话"
  4098. >
  4099. <span>{this.state.oldSalesmanMobile}</span>
  4100. </FormItem>
  4101. </div>
  4102. <div className="clearfix">
  4103. <FormItem
  4104. className="half-item"
  4105. style={{ opacity: ".5" }}
  4106. {...formItemLayout}
  4107. label="实际财务操作人"
  4108. >
  4109. <span>{this.state.financeName}</span>
  4110. </FormItem>
  4111. <FormItem
  4112. className="half-item"
  4113. {...formItemLayout}
  4114. style={{ opacity: ".5" }}
  4115. label="实际财务操作人电话"
  4116. >
  4117. <span>{this.state.financeMobile}</span>
  4118. </FormItem>
  4119. </div>
  4120. <div>
  4121. <span
  4122. style={{ marginLeft: "50px", fontSize: "20px" }}
  4123. >
  4124. 项目业务
  4125. </span>
  4126. {this.state.processStatus == 0 ? (
  4127. <Button
  4128. type="primary"
  4129. onClick={this.addDetailed}
  4130. style={{
  4131. float: "right",
  4132. marginRight: "50px",
  4133. marginBottom: "15px"
  4134. }}
  4135. >
  4136. 添加项目明细
  4137. </Button>
  4138. ) : (
  4139. ""
  4140. )}
  4141. </div>
  4142. <div
  4143. className="patent-table"
  4144. style={{ marginBottom: 10 }}
  4145. >
  4146. <Spin spinning={this.state.loading}>
  4147. <Table
  4148. columns={this.state.columns}
  4149. dataSource={this.state.dataSource}
  4150. pagination={this.state.pagination}
  4151. onRowClick={this.tableRowClick}
  4152. bordered
  4153. size="small"
  4154. />
  4155. </Spin>
  4156. </div>
  4157. <div
  4158. style={{
  4159. display: cuiDataList.length ? "block" : "none"
  4160. }}
  4161. >
  4162. <span
  4163. style={{ marginLeft: "50px", fontSize: "20px" }}
  4164. >
  4165. 旧催款节点
  4166. </span>
  4167. <Button
  4168. type="primary"
  4169. // onClick={this.addcontact}
  4170. disabled
  4171. onClick={e => {
  4172. cuiDataList.length
  4173. ? this.addcontact()
  4174. : this.addcontactNew();
  4175. }}
  4176. style={{
  4177. float: "right",
  4178. marginRight: "50px",
  4179. marginBottom: "15px",
  4180. display:
  4181. this.state.processStatus == 0
  4182. ? "block"
  4183. : "none"
  4184. }}
  4185. >
  4186. 添加催款节点
  4187. </Button>
  4188. </div>
  4189. <div
  4190. className="clearfix"
  4191. style={{
  4192. display: cuiDataList.length ? "block" : "none"
  4193. }}
  4194. >
  4195. <Spin spinning={this.state.loading}>
  4196. <Form layout="horizontal">
  4197. <Table
  4198. pagination={false}
  4199. columns={this.state.ContactsLists}
  4200. dataSource={this.state.contactList}
  4201. scroll={{ x: "max-content", y: 0 }}
  4202. bordered
  4203. size="small"
  4204. />
  4205. <Col
  4206. span={24}
  4207. offset={9}
  4208. style={{ marginTop: "15px" }}
  4209. ></Col>
  4210. </Form>
  4211. </Spin>
  4212. </div>
  4213. <div
  4214. style={{
  4215. display: cuiDataList.length ? "none" : "block"
  4216. }}
  4217. >
  4218. <span
  4219. style={{
  4220. marginLeft: "50px",
  4221. fontSize: "20px"
  4222. }}
  4223. >
  4224. 新催款节点
  4225. </span>
  4226. <span
  4227. style={{
  4228. display: "inline-block",
  4229. marginLeft: 10,
  4230. color: "red"
  4231. }}
  4232. >
  4233. 金额总计(万元): {this.state.totalCui}
  4234. </span>
  4235. <Button
  4236. type="primary"
  4237. disabled={this.state.addFlag ? true : false}
  4238. // onClick={this.addcontact}
  4239. onClick={e => {
  4240. this.setState({ addFlag: true });
  4241. this.addcontactNew();
  4242. }}
  4243. style={{
  4244. float: "right",
  4245. marginRight: "50px",
  4246. marginBottom: "15px",
  4247. display:
  4248. this.state.processStatus == 0
  4249. ? "block"
  4250. : "none"
  4251. }}
  4252. >
  4253. 添加催款节点
  4254. </Button>
  4255. </div>
  4256. <div
  4257. className="clearfix"
  4258. style={{
  4259. display: cuiDataList.length ? "none" : "block"
  4260. }}
  4261. >
  4262. <Spin spinning={this.state.loading}>
  4263. <Form layout="horizontal">
  4264. <Table
  4265. pagination={false}
  4266. columns={this.state.ContactsListsNew}
  4267. dataSource={this.state.contactListNew}
  4268. scroll={{ x: "max-content", y: 0 }}
  4269. bordered
  4270. size="small"
  4271. />
  4272. <Col
  4273. span={24}
  4274. offset={9}
  4275. style={{ marginTop: "15px" }}
  4276. ></Col>
  4277. </Form>
  4278. </Spin>
  4279. </div>
  4280. {this.state.processStatus == 0 ? (
  4281. <div
  4282. className="addSave"
  4283. style={{ marginTop: "15px" }}
  4284. >
  4285. <Button
  4286. className="cancel"
  4287. type="primary"
  4288. onClick={this.handleCancels}
  4289. style={{ marginLeft: "200px" }}
  4290. htmlType="submit"
  4291. >
  4292. 签单
  4293. </Button>
  4294. <Button
  4295. className="cancel"
  4296. type="primary"
  4297. onClick={this.handleCancelq}
  4298. style={{ marginLeft: "50px" }}
  4299. htmlType="submit"
  4300. >
  4301. 保存
  4302. </Button>
  4303. <Button
  4304. className="cancel"
  4305. type="ghost"
  4306. onClick={this.handleCancelclose}
  4307. style={{ marginLeft: "50px" }}
  4308. >
  4309. 取消
  4310. </Button>
  4311. </div>
  4312. ) : (
  4313. ""
  4314. )}
  4315. </div>
  4316. </TabPane>
  4317. <TabPane tab="合同变更发起" key="2">
  4318. {
  4319. <div>
  4320. <div className="clearfix">
  4321. <FormItem
  4322. className="half-item"
  4323. {...formItemLayout}
  4324. label="客户名称"
  4325. >
  4326. <span>{this.state.userName}</span>
  4327. </FormItem>
  4328. </div>
  4329. <div className="clearfix">
  4330. <FormItem
  4331. className="half-item"
  4332. {...formItemLayout}
  4333. label="合同编号"
  4334. >
  4335. <span>{this.state.contractNo}</span>
  4336. </FormItem>
  4337. </div>
  4338. <div className="clearfix">
  4339. <FormItem
  4340. className="half-item"
  4341. {...formItemLayout}
  4342. label="申请变更部门"
  4343. >
  4344. {/* {!this.state.mark ? ( */}
  4345. <span>{this.state.depName}</span>
  4346. {/* ) : (
  4347. <span>{contractData.depName}</span>
  4348. )} */}
  4349. </FormItem>
  4350. <FormItem
  4351. className="half-item"
  4352. {...formItemLayout}
  4353. label="申请人"
  4354. >
  4355. <span>{this.state.salesmanName}</span>
  4356. </FormItem>
  4357. </div>
  4358. <div className="clearfix">
  4359. <FormItem
  4360. labelCol={{ span: 4 }}
  4361. wrapperCol={{ span: 18 }}
  4362. label="变更类型"
  4363. >
  4364. {/* {!this.state.mark ? ( */}
  4365. <Select
  4366. placeholder="选择合同变更类型"
  4367. style={{ width: 200 }}
  4368. disabled={this.state.changeFlag}
  4369. value={this.state.typeChange}
  4370. onChange={e => {
  4371. this.setState({
  4372. typeChange: e,
  4373. changeFlag: true
  4374. });
  4375. if (e == 1) {
  4376. this.setState({
  4377. hetongFlag: false,
  4378. listFlag: false,
  4379. listCuiFlag: false,
  4380. tuiKuanFlag: false,
  4381. displayList: false
  4382. });
  4383. } else if (e == 2) {
  4384. this.setState({
  4385. hetongFlag: true,
  4386. listFlag: false,
  4387. listCuiFlag: false,
  4388. tuiKuanFlag: true,
  4389. displayList: false
  4390. });
  4391. } else if (e == 3) {
  4392. this.setState({
  4393. listFlag: false,
  4394. hetongFlag: false,
  4395. listCuiFlag: false,
  4396. tuiKuanFlag: false,
  4397. displayList: true
  4398. });
  4399. } else if (e == 4) {
  4400. this.setState({
  4401. listFlag: false,
  4402. listCuiFlag: false,
  4403. hetongFlag: false,
  4404. tuiKuanFlag: true,
  4405. displayList: false
  4406. });
  4407. } else if (e == 5) {
  4408. this.setState({
  4409. listFlag: false,
  4410. listCuiFlag: false,
  4411. hetongFlag: true,
  4412. tuiKuanFlag: true,
  4413. displayList: false
  4414. });
  4415. } else {
  4416. this.setState({
  4417. listFlag: true,
  4418. hetongFlag: true,
  4419. listCuiFlag: true,
  4420. tuiKuanFlag: false,
  4421. displayList: false
  4422. });
  4423. }
  4424. }}
  4425. value={this.state.typeChange}
  4426. >
  4427. <Option value={0}>退单退款</Option>
  4428. <Option value={1}>项目及金额变更</Option>
  4429. <Option value={2}>仅项目变更</Option>
  4430. <Option value={3}>仅金额变更</Option>
  4431. <Option value={4}>重报</Option>
  4432. <Option value={5}>赠送</Option>
  4433. </Select>
  4434. <Button
  4435. style={{ marginLeft: 10 }}
  4436. onClick={e => {
  4437. this.setState({
  4438. listFlag: false,
  4439. hetongFlag: false,
  4440. listCuiFlag: false,
  4441. tuiKuanFlag: false,
  4442. displayList: false,
  4443. startRemarks: "",
  4444. remarksC: "",
  4445. voucherUrl: [],
  4446. changeAmount: "0",
  4447. applicant: undefined,
  4448. depNameChange: undefined,
  4449. typeChange: [],
  4450. changeFlag: false
  4451. });
  4452. }}
  4453. >
  4454. 重置
  4455. </Button>
  4456. </FormItem>
  4457. </div>
  4458. <div className="clearfix">
  4459. <FormItem
  4460. labelCol={{ span: 4 }}
  4461. wrapperCol={{ span: 18 }}
  4462. label="合同额(万元)"
  4463. >
  4464. {/* {!this.state.mark ? ( */}
  4465. <Input
  4466. placeholder="请输入合同额"
  4467. disabled={this.state.hetongFlag}
  4468. ref="signTotalAmount"
  4469. value={this.state.totalAmount}
  4470. onChange={e => {
  4471. this.setState({
  4472. totalAmount: e.target.value
  4473. });
  4474. }}
  4475. style={{ width: "240px" }}
  4476. />
  4477. {/* ) : (
  4478. <span>{contractData.totalAmount}</span>
  4479. )} */}
  4480. </FormItem>
  4481. <FormItem
  4482. labelCol={{ span: 4 }}
  4483. wrapperCol={{ span: 18 }}
  4484. label="已收款(万元)"
  4485. >
  4486. <span>
  4487. {this.state.settlementAmount}
  4488. &nbsp;&nbsp;&nbsp;&nbsp;
  4489. <span style={{ color: "red" }}>
  4490. (注:已收款与现实收款不符,请与财务专员联系)
  4491. </span>
  4492. </span>
  4493. </FormItem>
  4494. <FormItem
  4495. labelCol={{ span: 4 }}
  4496. wrapperCol={{ span: 18 }}
  4497. label="申请退款(万元)"
  4498. >
  4499. {/* {!this.state.mark ? ( */}
  4500. <Input
  4501. placeholder="请输入申请退款"
  4502. ref="signTotalAmount"
  4503. disabled={this.state.tuiKuanFlag}
  4504. value={this.state.changeAmount}
  4505. onChange={e => {
  4506. this.setState({
  4507. changeAmount: e.target.value
  4508. });
  4509. }}
  4510. style={{ width: "240px" }}
  4511. />
  4512. {/* ) : (
  4513. <span>{contractData.changeAmount}</span>
  4514. )} */}
  4515. </FormItem>
  4516. </div>
  4517. {/* 动态展示项目以及催款节点 */}
  4518. <div
  4519. style={{
  4520. display: this.state.isCaoGao ? "block" : "none"
  4521. }}
  4522. >
  4523. <div>
  4524. <span
  4525. style={{
  4526. marginLeft: "50px",
  4527. fontSize: "20px"
  4528. }}
  4529. >
  4530. 项目业务
  4531. </span>
  4532. <span style={{ color: "red" }}>
  4533. (注:项目删除后,此项目的全部节点、全部工时,全部被删除,请谨慎删除!)
  4534. </span>
  4535. <Button
  4536. type="primary"
  4537. onClick={this.changeAddPro}
  4538. disabled={this.state.listFlag}
  4539. style={{
  4540. float: "right",
  4541. marginRight: "50px",
  4542. marginBottom: "15px",
  4543. display: this.state.displayList
  4544. ? "none"
  4545. : "block"
  4546. }}
  4547. >
  4548. 添加项目明细
  4549. </Button>
  4550. </div>
  4551. <div
  4552. className="patent-table"
  4553. style={{ marginBottom: 10 }}
  4554. >
  4555. <Spin spinning={this.state.loading}>
  4556. <Table
  4557. columns={this.state.proColumns}
  4558. dataSource={this.state.proDataSource}
  4559. pagination={this.state.pagination}
  4560. onRowDoubleClick={
  4561. this.listFlag ? "" : this.editPro
  4562. }
  4563. bordered
  4564. size="small"
  4565. />
  4566. </Spin>
  4567. </div>
  4568. <div>
  4569. <span
  4570. style={{
  4571. marginLeft: "50px",
  4572. fontSize: "20px"
  4573. }}
  4574. >
  4575. 催款节点
  4576. </span>
  4577. <span style={{ color: "red" }}>
  4578. (注:节点删除后,无论节点是否触发,均会删除,请谨慎删除!)
  4579. </span>
  4580. {/* <span
  4581. style={{
  4582. display: "inline-block",
  4583. marginLeft: 10,
  4584. color: "red"
  4585. }}
  4586. >
  4587. 金额总计(万元): {this.state.totalCui}
  4588. </span> */}
  4589. <Button
  4590. type="primary"
  4591. onClick={e => {
  4592. this.changeAddCui();
  4593. }}
  4594. disabled={this.state.listCuiFlag}
  4595. style={{
  4596. float: "right",
  4597. marginRight: "50px",
  4598. marginBottom: "15px",
  4599. display: this.state.displayList
  4600. ? "none"
  4601. : "block"
  4602. }}
  4603. >
  4604. 添加催款节点
  4605. </Button>
  4606. </div>
  4607. <div className="clearfix">
  4608. <Spin spinning={this.state.loading}>
  4609. <Form layout="horizontal">
  4610. <Table
  4611. pagination={false}
  4612. columns={this.state.changeCuiList}
  4613. dataSource={this.state.cuiDataSource}
  4614. scroll={{ x: "max-content", y: 0 }}
  4615. onRowDoubleClick={
  4616. this.listCuiFlag ? "" : this.editCui
  4617. }
  4618. bordered
  4619. size="small"
  4620. />
  4621. <Col
  4622. span={24}
  4623. offset={9}
  4624. style={{ marginTop: "15px" }}
  4625. ></Col>
  4626. </Form>
  4627. </Spin>
  4628. </div>
  4629. </div>
  4630. <div className="clearfix">
  4631. <FormItem
  4632. style={{ height: "auto" }}
  4633. labelCol={{ span: 4 }}
  4634. wrapperCol={{ span: 18 }}
  4635. label="变更原因"
  4636. >
  4637. {/* {!this.state.mark ? ( */}
  4638. <TextArea
  4639. rows={4}
  4640. placeholder="请输入变更原因"
  4641. ref="signTotalAmount"
  4642. style={{ width: "95%" }}
  4643. value={this.state.remarksC}
  4644. onChange={e => {
  4645. this.setState({
  4646. remarksC: e.target.value
  4647. });
  4648. }}
  4649. />
  4650. {/* ) : (
  4651. <span>{contractData.remarks}</span>
  4652. )} */}
  4653. </FormItem>
  4654. </div>
  4655. <div className="clearfix">
  4656. <FormItem
  4657. style={{ height: "auto" }}
  4658. labelCol={{ span: 4 }}
  4659. wrapperCol={{ span: 18 }}
  4660. label="备注"
  4661. >
  4662. {/* {!this.state.mark ? ( */}
  4663. <TextArea
  4664. rows={4}
  4665. placeholder="请输入备注"
  4666. ref="signTotalAmount"
  4667. style={{ width: "95%" }}
  4668. value={this.state.startRemarks}
  4669. onChange={e => {
  4670. this.setState({
  4671. startRemarks: e.target.value
  4672. });
  4673. }}
  4674. />
  4675. {/* ) : (
  4676. <span>{contractData.startRemarks}</span>
  4677. )} */}
  4678. </FormItem>
  4679. </div>
  4680. {/* ---- */}
  4681. <div className="clearfix">
  4682. <FormItem
  4683. labelCol={{ span: 4 }}
  4684. wrapperCol={{ span: 18 }}
  4685. label="变更凭证"
  4686. >
  4687. {/* {!this.state.mark ? ( */}
  4688. <PicturesWall
  4689. fileList={this.getVoucherUrl}
  4690. pictureUrl={this.state.voucherUrl}
  4691. url="/api/admin/orderChange/uploadFile"
  4692. sign="order_change_file"
  4693. />
  4694. {/* ) : (
  4695. <div>
  4696. <Upload
  4697. className="demandDetailShow-upload"
  4698. listType="picture-card"
  4699. fileList={this.state.voucherUrl}
  4700. onPreview={file => {
  4701. this.setState({
  4702. previewImage:
  4703. file.url || file.thumbUrl,
  4704. previewVisible: true
  4705. });
  4706. }}
  4707. />
  4708. <Modal
  4709. maskClosable={false}
  4710. footer={null}
  4711. visible={this.state.previewVisible}
  4712. onCancel={() => {
  4713. this.setState({
  4714. previewVisible: false
  4715. });
  4716. }}
  4717. >
  4718. <img
  4719. alt=""
  4720. style={{ width: "100%" }}
  4721. src={this.state.previewImage || ""}
  4722. />
  4723. </Modal>
  4724. </div>
  4725. )} */}
  4726. <p>图片建议:要清晰。</p>
  4727. </FormItem>
  4728. </div>
  4729. {/* {!this.state.mark ? ( */}
  4730. <div className="clearfix">
  4731. <Button
  4732. type="primary"
  4733. style={{ float: "right", marginRight: 40 }}
  4734. // onClick={this.changeApply}
  4735. onClick={e => {
  4736. if (this.state.isCaoGao) {
  4737. this.submitChange();
  4738. } else {
  4739. this.changeApply();
  4740. }
  4741. }}
  4742. >
  4743. {this.state.isCaoGao
  4744. ? "发起变更申请"
  4745. : this.state.typeChange == 0
  4746. ? "发起变更申请"
  4747. : "下一步"}
  4748. </Button>
  4749. </div>
  4750. {/* ) : (
  4751. ""
  4752. )} */}
  4753. </div>
  4754. }
  4755. </TabPane>
  4756. {this.state.isJilu ? (
  4757. <TabPane tab={"最近变更记录"} key="3">
  4758. <div>
  4759. <div className="clearfix">
  4760. <FormItem
  4761. className="half-item"
  4762. {...formItemLayout}
  4763. label="客户名称"
  4764. >
  4765. <span>{this.state.userName}</span>
  4766. </FormItem>
  4767. <FormItem
  4768. className="half-item"
  4769. {...formItemLayout}
  4770. label="当前进度"
  4771. >
  4772. <span>
  4773. {getProcessStatusNew(
  4774. this.state.detailChange.processState,
  4775. this.state.detailChange.status
  4776. )}
  4777. </span>
  4778. </FormItem>
  4779. </div>
  4780. <div className="clearfix">
  4781. <FormItem
  4782. className="half-item"
  4783. {...formItemLayout}
  4784. label="合同编号"
  4785. >
  4786. <span>{this.state.contractNo}</span>
  4787. </FormItem>
  4788. </div>
  4789. <div className="clearfix">
  4790. <FormItem
  4791. className="half-item"
  4792. {...formItemLayout}
  4793. label="申请变更部门"
  4794. >
  4795. <span>{this.state.depName}</span>
  4796. </FormItem>
  4797. <FormItem
  4798. className="half-item"
  4799. {...formItemLayout}
  4800. label="申请人"
  4801. >
  4802. <span>{this.state.salesmanName}</span>
  4803. </FormItem>
  4804. </div>
  4805. <div className="clearfix">
  4806. <FormItem
  4807. labelCol={{ span: 4 }}
  4808. wrapperCol={{ span: 18 }}
  4809. label="变更类型"
  4810. >
  4811. <span>
  4812. {getChangeType(
  4813. this.state.detailChange.typeChange
  4814. )}
  4815. </span>
  4816. </FormItem>
  4817. </div>
  4818. <div className="clearfix">
  4819. <FormItem
  4820. labelCol={{ span: 4 }}
  4821. wrapperCol={{ span: 18 }}
  4822. label="合同额(万元)"
  4823. >
  4824. <span>
  4825. {this.state.detailChange.totalAmount}
  4826. </span>
  4827. </FormItem>
  4828. <FormItem
  4829. labelCol={{ span: 4 }}
  4830. wrapperCol={{ span: 18 }}
  4831. label="已收款(万元)"
  4832. >
  4833. <span>
  4834. {this.state.detailChange.settlementAmount}
  4835. </span>
  4836. </FormItem>
  4837. <FormItem
  4838. labelCol={{ span: 4 }}
  4839. wrapperCol={{ span: 18 }}
  4840. label="申请退款(万元)"
  4841. >
  4842. <span>
  4843. {this.state.detailChange.changeAmount}
  4844. </span>
  4845. </FormItem>
  4846. </div>
  4847. {/* 动态展示项目以及催款节点 */}
  4848. <div>
  4849. <div>
  4850. <span
  4851. style={{
  4852. marginLeft: "50px",
  4853. fontSize: "20px"
  4854. }}
  4855. >
  4856. 项目业务
  4857. </span>
  4858. </div>
  4859. <div
  4860. className="patent-table"
  4861. style={{ marginBottom: 10 }}
  4862. >
  4863. <Spin spinning={this.state.loading}>
  4864. <Table
  4865. columns={this.state.detailColumns}
  4866. dataSource={this.state.proDataSource}
  4867. pagination={this.state.pagination}
  4868. // onRowClick={this.tableRowClick}
  4869. bordered
  4870. size="small"
  4871. />
  4872. </Spin>
  4873. </div>
  4874. <div>
  4875. <span
  4876. style={{
  4877. marginLeft: "50px",
  4878. fontSize: "20px"
  4879. }}
  4880. >
  4881. 催款节点
  4882. </span>
  4883. {/* <span
  4884. style={{
  4885. display: "inline-block",
  4886. marginLeft: 10,
  4887. color: "red"
  4888. }}
  4889. >
  4890. 金额总计(万元): {this.state.totalCui}
  4891. </span> */}
  4892. </div>
  4893. <div className="clearfix">
  4894. <Spin spinning={this.state.loading}>
  4895. <Form layout="horizontal">
  4896. <Table
  4897. pagination={false}
  4898. columns={this.state.detailContactsLists}
  4899. dataSource={this.state.cuiDataSource}
  4900. scroll={{ x: "max-content", y: 0 }}
  4901. bordered
  4902. size="small"
  4903. />
  4904. <Col
  4905. span={24}
  4906. offset={9}
  4907. style={{ marginTop: "15px" }}
  4908. ></Col>
  4909. </Form>
  4910. </Spin>
  4911. </div>
  4912. </div>
  4913. <div className="clearfix">
  4914. <FormItem
  4915. style={{ height: "auto" }}
  4916. labelCol={{ span: 4 }}
  4917. wrapperCol={{ span: 18 }}
  4918. label="变更原因"
  4919. >
  4920. <span>{this.state.detailChange.remarksC}</span>
  4921. </FormItem>
  4922. </div>
  4923. <div className="clearfix">
  4924. <FormItem
  4925. style={{ height: "auto" }}
  4926. labelCol={{ span: 4 }}
  4927. wrapperCol={{ span: 18 }}
  4928. label="备注"
  4929. >
  4930. <span>
  4931. {this.state.detailChange.startRemarks}
  4932. </span>
  4933. </FormItem>
  4934. </div>
  4935. {/* ---- */}
  4936. <div className="clearfix">
  4937. <FormItem
  4938. labelCol={{ span: 4 }}
  4939. wrapperCol={{ span: 18 }}
  4940. label="变更凭证"
  4941. >
  4942. <div>
  4943. <Upload
  4944. className="demandDetailShow-upload"
  4945. listType="picture-card"
  4946. fileList={
  4947. this.state.detailChange.voucherUrl
  4948. }
  4949. onPreview={file => {
  4950. this.setState({
  4951. previewImage: file.url || file.thumbUrl,
  4952. previewVisible: true
  4953. });
  4954. }}
  4955. />
  4956. <Modal
  4957. maskClosable={false}
  4958. footer={null}
  4959. visible={this.state.previewVisible}
  4960. onCancel={() => {
  4961. this.setState({
  4962. previewVisible: false
  4963. });
  4964. }}
  4965. >
  4966. <img
  4967. alt=""
  4968. style={{ width: "100%" }}
  4969. src={this.state.previewImage || ""}
  4970. />
  4971. </Modal>
  4972. </div>
  4973. </FormItem>
  4974. </div>
  4975. </div>
  4976. </TabPane>
  4977. ) : (
  4978. ""
  4979. )}
  4980. </Tabs>
  4981. )}
  4982. </div>
  4983. </Spin>
  4984. </Form>
  4985. </Modal>
  4986. <Modal
  4987. maskClosable={false}
  4988. visible={this.state.addnextVisible}
  4989. onOk={this.nextCancel}
  4990. onCancel={this.nextCancel}
  4991. width="800px"
  4992. title={this.state.addState ? "添加项目任务" : "项目任务详情"}
  4993. footer=""
  4994. className="admin-desc-content"
  4995. >
  4996. <Form
  4997. layout="horizontal"
  4998. onSubmit={this.nextSubmit}
  4999. // id="demand-form"
  5000. >
  5001. <Spin spinning={this.state.loading}>
  5002. {this.state.addState ? (
  5003. <div className="clearfix">
  5004. <FormItem
  5005. className="half-item"
  5006. {...formItemLayout}
  5007. label="服务名称"
  5008. >
  5009. <AutoComplete
  5010. className="certain-category-search"
  5011. dropdownClassName="certain-category-search-dropdown"
  5012. dropdownMatchSelectWidth={false}
  5013. dropdownStyle={{ width: 200 }}
  5014. style={{ width: "200px" }}
  5015. dataSource={options}
  5016. placeholder="输入服务名称"
  5017. value={this.state.commodityName}
  5018. onChange={this.httpChange}
  5019. filterOption={true}
  5020. onSelect={this.selectAuto}
  5021. >
  5022. <Input />
  5023. </AutoComplete>
  5024. <span className="mandatory">*</span>
  5025. </FormItem>
  5026. <FormItem
  5027. className="half-item"
  5028. {...formItemLayout}
  5029. label="服务数量"
  5030. >
  5031. <Input
  5032. placeholder="请输入服务数量"
  5033. value={this.state.commodityQuantity}
  5034. style={{ width: "200px" }}
  5035. onChange={e => {
  5036. this.setState({ commodityQuantity: e.target.value });
  5037. }}
  5038. ref="commodityQuantity"
  5039. />
  5040. <span className="mandatory">*</span>
  5041. </FormItem>
  5042. <FormItem
  5043. className="half-item"
  5044. {...formItemLayout}
  5045. label="实签价格(万元)"
  5046. >
  5047. <Input
  5048. placeholder="请输入实签价格"
  5049. value={this.state.commodityPrice}
  5050. style={{ width: "200px" }}
  5051. onChange={e => {
  5052. this.setState({ commodityPrice: e.target.value });
  5053. }}
  5054. ref="commodityPrice"
  5055. />
  5056. <span className="mandatory">*</span>
  5057. </FormItem>
  5058. <FormItem
  5059. className="half-item"
  5060. {...formItemLayout}
  5061. label="主要业务"
  5062. >
  5063. <Select
  5064. placeholder="选择是否为主要业务"
  5065. style={{ width: "200px" }}
  5066. value={this.state.main}
  5067. onChange={e => {
  5068. this.setState({ main: e });
  5069. }}
  5070. >
  5071. {boutique.map(function (item) {
  5072. return (
  5073. <Select.Option key={item.value}>
  5074. {item.key}
  5075. </Select.Option>
  5076. );
  5077. })}
  5078. </Select>
  5079. <span className="mandatory">*</span>
  5080. </FormItem>
  5081. <div className="clearfix">
  5082. <FormItem
  5083. labelCol={{ span: 4 }}
  5084. wrapperCol={{ span: 16 }}
  5085. label="服务说明"
  5086. >
  5087. <Input
  5088. type="textarea"
  5089. placeholder="请输入服务说明"
  5090. value={this.state.taskComment}
  5091. onChange={e => {
  5092. this.setState({ taskComment: e.target.value });
  5093. }}
  5094. />
  5095. </FormItem>
  5096. </div>
  5097. <FormItem
  5098. wrapperCol={{ span: 12, offset: 4 }}
  5099. className="half-middle"
  5100. >
  5101. <Button
  5102. className="submitSave"
  5103. type="primary"
  5104. htmlType="submit"
  5105. >
  5106. 保存
  5107. </Button>
  5108. <Button
  5109. className="submitSave"
  5110. type="ghost"
  5111. onClick={this.nextCancel}
  5112. >
  5113. 取消
  5114. </Button>
  5115. </FormItem>
  5116. </div>
  5117. ) : (
  5118. <div className="clearfix">
  5119. {this.state.processStatus == 0 ? (
  5120. <div className="clearfix">
  5121. <FormItem
  5122. className="half-item"
  5123. {...formItemLayout}
  5124. label="项目名称"
  5125. >
  5126. <span>{this.state.commodityName}</span>
  5127. </FormItem>
  5128. <FormItem
  5129. className="half-item"
  5130. {...formItemLayout}
  5131. label="项目数量"
  5132. >
  5133. <Input
  5134. placeholder="请输入数量"
  5135. value={this.state.commodityQuantity}
  5136. style={{ width: "200px" }}
  5137. onChange={e => {
  5138. this.setState({
  5139. commodityQuantity: e.target.value
  5140. });
  5141. }}
  5142. />
  5143. <span className="mandatory">*</span>
  5144. </FormItem>
  5145. <FormItem
  5146. className="half-item"
  5147. {...formItemLayout}
  5148. label="金额(万元)"
  5149. >
  5150. <Input
  5151. placeholder="请输入签单金额"
  5152. value={this.state.commodityPrice}
  5153. style={{ width: "200px" }}
  5154. onChange={e => {
  5155. this.setState({ commodityPrice: e.target.value });
  5156. }}
  5157. />
  5158. <span className="mandatory">*</span>
  5159. </FormItem>
  5160. <FormItem
  5161. className="half-item"
  5162. {...formItemLayout}
  5163. label="主要项目"
  5164. >
  5165. <Select
  5166. placeholder="选择是否为主要业务"
  5167. style={{ width: "200px" }}
  5168. value={this.state.main}
  5169. onChange={e => {
  5170. this.setState({ main: e });
  5171. }}
  5172. >
  5173. {boutique.map(function (item) {
  5174. return (
  5175. <Select.Option key={item.value}>
  5176. {item.key}
  5177. </Select.Option>
  5178. );
  5179. })}
  5180. </Select>
  5181. <span className="mandatory">*</span>
  5182. </FormItem>
  5183. <div className="clearfix">
  5184. <FormItem
  5185. labelCol={{ span: 4 }}
  5186. wrapperCol={{ span: 16 }}
  5187. label="服务说明"
  5188. >
  5189. <Input
  5190. type="textarea"
  5191. placeholder="请输入服务说明"
  5192. value={this.state.taskComment}
  5193. onChange={e => {
  5194. this.setState({ taskComment: e.target.value });
  5195. }}
  5196. />
  5197. </FormItem>
  5198. </div>
  5199. <FormItem
  5200. wrapperCol={{ span: 12, offset: 4 }}
  5201. className="half-middle"
  5202. >
  5203. <Button
  5204. className="submitSave"
  5205. type="primary"
  5206. onClick={this.tabRowSave}
  5207. >
  5208. 保存
  5209. </Button>
  5210. <Button
  5211. className="submitSave"
  5212. type="ghost"
  5213. onClick={this.nextCancel}
  5214. >
  5215. 取消
  5216. </Button>
  5217. </FormItem>
  5218. </div>
  5219. ) : (
  5220. <div className="clearfix">
  5221. <FormItem
  5222. className="half-item"
  5223. {...formItemLayout}
  5224. label="项目名称"
  5225. >
  5226. <span>{this.state.commodityName}</span>
  5227. </FormItem>
  5228. <FormItem
  5229. className="half-item"
  5230. {...formItemLayout}
  5231. label="项目数量"
  5232. >
  5233. <span>{this.state.commodityQuantity}</span>
  5234. </FormItem>
  5235. <FormItem
  5236. className="half-item"
  5237. {...formItemLayout}
  5238. label="金额(万元)"
  5239. >
  5240. <span>{this.state.commodityPrice}</span>
  5241. </FormItem>
  5242. <FormItem
  5243. className="half-item"
  5244. {...formItemLayout}
  5245. label="主要项目"
  5246. >
  5247. <span>{getboutique(this.state.main)}</span>
  5248. </FormItem>
  5249. <div className="clearfix">
  5250. <FormItem
  5251. labelCol={{ span: 4 }}
  5252. wrapperCol={{ span: 16 }}
  5253. label="服务说明"
  5254. >
  5255. <span>{this.state.taskComment}</span>
  5256. </FormItem>
  5257. </div>
  5258. </div>
  5259. )}
  5260. </div>
  5261. )}
  5262. </Spin>
  5263. </Form>
  5264. </Modal>
  5265. <Modal
  5266. maskClosable={false}
  5267. visible={this.state.changeVisible}
  5268. onOk={this.nextCancel}
  5269. onCancel={this.nextCancel}
  5270. width="800px"
  5271. title={"添加变更项目"}
  5272. footer=""
  5273. className="admin-desc-content"
  5274. >
  5275. <Form
  5276. layout="horizontal"
  5277. // id="demand-form"
  5278. >
  5279. <Spin spinning={this.state.loading}>
  5280. <div className="clearfix">
  5281. <FormItem
  5282. className="half-item"
  5283. {...formItemLayout}
  5284. label="服务名称"
  5285. >
  5286. <AutoComplete
  5287. className="certain-category-search"
  5288. dropdownClassName="certain-category-search-dropdown"
  5289. dropdownMatchSelectWidth={false}
  5290. dropdownStyle={{ width: 200 }}
  5291. style={{ width: "200px" }}
  5292. dataSource={options}
  5293. placeholder="输入服务名称"
  5294. value={this.state.commodityName}
  5295. onChange={this.httpChange}
  5296. filterOption={true}
  5297. onSelect={this.selectAuto}
  5298. >
  5299. <Input />
  5300. </AutoComplete>
  5301. <span className="mandatory">*</span>
  5302. </FormItem>
  5303. <FormItem
  5304. className="half-item"
  5305. {...formItemLayout}
  5306. label="服务数量"
  5307. >
  5308. <Input
  5309. placeholder="请输入服务数量"
  5310. value={this.state.commodityQuantity}
  5311. style={{ width: "200px" }}
  5312. onChange={e => {
  5313. this.setState({ commodityQuantity: e.target.value });
  5314. }}
  5315. ref="commodityQuantity"
  5316. />
  5317. <span className="mandatory">*</span>
  5318. </FormItem>
  5319. <FormItem
  5320. className="half-item"
  5321. {...formItemLayout}
  5322. label="实签价格(万元)"
  5323. >
  5324. <Input
  5325. placeholder="请输入实签价格"
  5326. value={this.state.commodityPrice}
  5327. style={{ width: "200px" }}
  5328. onChange={e => {
  5329. this.setState({ commodityPrice: e.target.value });
  5330. }}
  5331. ref="commodityPrice"
  5332. />
  5333. <span className="mandatory">*</span>
  5334. </FormItem>
  5335. <FormItem
  5336. className="half-item"
  5337. {...formItemLayout}
  5338. label="主要业务"
  5339. >
  5340. <Select
  5341. placeholder="选择是否为主要业务"
  5342. style={{ width: "200px" }}
  5343. value={this.state.main}
  5344. onChange={e => {
  5345. this.setState({ main: e });
  5346. }}
  5347. >
  5348. {boutique.map(function (item) {
  5349. return (
  5350. <Select.Option key={item.value}>
  5351. {item.key}
  5352. </Select.Option>
  5353. );
  5354. })}
  5355. </Select>
  5356. <span className="mandatory">*</span>
  5357. </FormItem>
  5358. <div className="clearfix">
  5359. <FormItem
  5360. labelCol={{ span: 4 }}
  5361. wrapperCol={{ span: 16 }}
  5362. label="服务说明"
  5363. >
  5364. <Input
  5365. type="textarea"
  5366. placeholder="请输入服务说明"
  5367. value={this.state.taskComment}
  5368. onChange={e => {
  5369. this.setState({ taskComment: e.target.value });
  5370. }}
  5371. />
  5372. </FormItem>
  5373. </div>
  5374. <FormItem
  5375. wrapperCol={{ span: 12, offset: 4 }}
  5376. className="half-middle"
  5377. >
  5378. <Button
  5379. className="submitSave"
  5380. type="primary"
  5381. onClick={this.changeProSubmit}
  5382. >
  5383. 保存
  5384. </Button>
  5385. <Button
  5386. className="submitSave"
  5387. type="ghost"
  5388. onClick={this.nextCancel}
  5389. >
  5390. 取消
  5391. </Button>
  5392. </FormItem>
  5393. </div>
  5394. </Spin>
  5395. </Form>
  5396. </Modal>
  5397. <Modal
  5398. maskClosable={false}
  5399. visible={this.state.lookVisible}
  5400. onOk={this.noCancel}
  5401. onCancel={this.noCancel}
  5402. width="800px"
  5403. title={"退单申请"}
  5404. footer=""
  5405. className="admin-desc-content"
  5406. >
  5407. <Form layout="horizontal">
  5408. <Spin spinning={this.state.loading}>
  5409. <div className="clearfix">
  5410. <FormItem
  5411. labelCol={{ span: 4 }}
  5412. wrapperCol={{ span: 16 }}
  5413. label="终止合同"
  5414. >
  5415. <Picture
  5416. fileList={e => {
  5417. this.setState({ contractUrl: e });
  5418. }}
  5419. pictureUrl={this.state.contractUrl}
  5420. visible={this.props.visible}
  5421. data={{
  5422. sign: "order_refund_file",
  5423. url: "/api/admin/newOrder/uploadRefundOrderFile",
  5424. number: 8
  5425. }}
  5426. />
  5427. </FormItem>
  5428. </div>
  5429. <div className="clearfix">
  5430. <FormItem
  5431. labelCol={{ span: 4 }}
  5432. wrapperCol={{ span: 16 }}
  5433. label="退单申请表"
  5434. >
  5435. <Picture
  5436. fileList={e => {
  5437. this.setState({ applicationUrl: e });
  5438. }}
  5439. pictureUrl={this.state.applicationUrl}
  5440. visible={this.props.visible}
  5441. data={{
  5442. sign: "order_refund_file",
  5443. url: "/api/admin/newOrder/uploadRefundOrderFile",
  5444. number: 8
  5445. }}
  5446. />
  5447. </FormItem>
  5448. </div>
  5449. <div className="clearfix">
  5450. <FormItem
  5451. labelCol={{ span: 4 }}
  5452. wrapperCol={{ span: 16 }}
  5453. label="退单理由"
  5454. >
  5455. <Input
  5456. type="textarea"
  5457. placeholder="请输入退单理由"
  5458. rows={4}
  5459. value={this.state.reason}
  5460. onChange={e => {
  5461. this.setState({ reason: e.target.value });
  5462. }}
  5463. />
  5464. </FormItem>
  5465. </div>
  5466. <div className="clearfix">
  5467. <Button
  5468. className="cancel"
  5469. type="primary"
  5470. onClick={this.tuidanOk}
  5471. style={{ marginLeft: "50px" }}
  5472. htmlType="submit"
  5473. >
  5474. 确定退单
  5475. </Button>
  5476. <Button
  5477. className="cancel"
  5478. type="ghost"
  5479. onClick={this.noCancel}
  5480. style={{ marginLeft: "50px" }}
  5481. >
  5482. 取消
  5483. </Button>
  5484. </div>
  5485. </Spin>
  5486. </Form>
  5487. </Modal>
  5488. <Modal
  5489. title="修改项目金额及数量"
  5490. visible={this.state.editProVisible}
  5491. onOk={this.submitEditPro}
  5492. width={300}
  5493. okText={"保存"}
  5494. onCancel={() => {
  5495. this.setState({
  5496. editProVisible: false
  5497. });
  5498. }}
  5499. >
  5500. <div className="clearfix">
  5501. <FormItem
  5502. labelCol={{ span: 6 }}
  5503. wrapperCol={{ span: 14 }}
  5504. label="项目金额"
  5505. >
  5506. <Input
  5507. placeholder="请输入金额"
  5508. rows={4}
  5509. value={this.state.editProMoney}
  5510. onChange={e => {
  5511. this.setState({ editProMoney: e.target.value });
  5512. }}
  5513. />
  5514. </FormItem>
  5515. <FormItem
  5516. labelCol={{ span: 6 }}
  5517. wrapperCol={{ span: 14 }}
  5518. label="项目数量"
  5519. >
  5520. <Input
  5521. placeholder="请输入数量"
  5522. rows={4}
  5523. value={this.state.editProCommodityQuantity}
  5524. onChange={e => {
  5525. this.setState({ editProCommodityQuantity: e.target.value });
  5526. }}
  5527. />
  5528. </FormItem>
  5529. </div>
  5530. </Modal>
  5531. <Modal
  5532. title="修改催款节点金额"
  5533. visible={this.state.editCuiVisible}
  5534. onOk={this.submitEditCui}
  5535. okText={"保存"}
  5536. width={300}
  5537. onCancel={e => {
  5538. this.setState({
  5539. editCuiVisible: false
  5540. });
  5541. }}
  5542. >
  5543. <div className="clearfix">
  5544. <FormItem
  5545. labelCol={{ span: 6 }}
  5546. wrapperCol={{ span: 14 }}
  5547. label="催款金额"
  5548. >
  5549. <Input
  5550. placeholder="请输入金额"
  5551. rows={4}
  5552. value={this.state.editCuiMoney}
  5553. onChange={e => {
  5554. this.setState({ editCuiMoney: e.target.value });
  5555. }}
  5556. />
  5557. </FormItem>
  5558. </div>
  5559. </Modal>
  5560. <OrderRiZi
  5561. dataSourcerizhi={this.state.dataSourcerizhi}
  5562. closeOrderLog={this.closeOrderLog}
  5563. visible={this.state.rizhivisible}
  5564. loading={this.state.loading}
  5565. />
  5566. </div>
  5567. );
  5568. }
  5569. })
  5570. );
  5571. export default Form.create()(NewService);