addService.jsx 247 KB

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