addService.jsx 247 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858
  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. } else {
  1743. }
  1744. const arr = this.state.contactListNew || [];
  1745. for (let i = 0; i < arr.length; i++) {
  1746. if (
  1747. arr[i].dunType == 1 &&
  1748. arr[i].waitDay != null &&
  1749. this.state.approval == 0
  1750. ) {
  1751. message.warning(
  1752. "非特批存在填写催款节点首付时间的情况,请删除后重新填写保存"
  1753. );
  1754. return false;
  1755. } else if (
  1756. arr[i].dunType == 1 &&
  1757. arr[i].waitDay == null &&
  1758. this.state.approval == 1
  1759. ) {
  1760. message.warning(
  1761. "特批存在首付催款节点未填写时间的情况,请删除后重新填写保存"
  1762. );
  1763. return false;
  1764. }
  1765. if (!this.state.contactListNew[i].id && this.props.userDetaile) {
  1766. message.warning("请保存催款节点");
  1767. return false;
  1768. }
  1769. }
  1770. this.setState({
  1771. loading: true,
  1772. });
  1773. let api = this.props.userDetaile
  1774. ? "/api/admin/newOrder/updateServiceOrderNew"
  1775. : "/api/admin/newOrder/createOrder";
  1776. $.ajax({
  1777. method: "POST",
  1778. dataType: "json",
  1779. crossDomain: false,
  1780. url: globalConfig.context + api,
  1781. data: !this.props.userDetaile
  1782. ? {
  1783. uid: this.state.autoId,
  1784. orderType: this.state.orderType,
  1785. }
  1786. : {
  1787. orderNo: this.state.orderNo, //订单编号
  1788. totalAmount: this.state.totalAmount, //总金额
  1789. firstAmount: this.state.firstAmount, //首付
  1790. isSubmit: this.state.isSubmit, //保存草稿还是提交
  1791. signDate: this.state.signDate, //签单日期
  1792. contacts: this.state.contacts, //企业负责人
  1793. contactMobile: this.state.contactMobile, //负责人联系方式
  1794. legalPerson: this.state.legalPerson, //企业法人
  1795. legalPersonTel: this.state.legalPersonTel, //企业法人联系电话
  1796. approval: this.state.approval, //特批状态
  1797. orderRemarks: this.state.orderRemarks, //订单备注
  1798. contractPictureUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
  1799. agreementUrl: theReplenishUrl.length ? theReplenishUrl : "",
  1800. orderDep: this.state.organizationSearch,
  1801. },
  1802. }).done(
  1803. function (data) {
  1804. this.setState({
  1805. loading: false,
  1806. });
  1807. if (!data.error.length) {
  1808. message.success("保存成功!");
  1809. this.handleOk();
  1810. if (this.state.autoId) {
  1811. this.loadData();
  1812. }
  1813. } else {
  1814. message.warning(data.error[0].message);
  1815. }
  1816. }.bind(this)
  1817. );
  1818. },
  1819. //订单详情修改
  1820. xiangqingClick(e) {
  1821. e.preventDefault();
  1822. this.setState({
  1823. loading: true,
  1824. });
  1825. if (this.state.approval == 2 || this.state.approval == 3) {
  1826. message.warning("特批状态不正确");
  1827. this.setState({
  1828. loading: false,
  1829. });
  1830. return;
  1831. }
  1832. $.ajax({
  1833. url: globalConfig.context + "/api/admin/newOrder/updateServiceOrderNew",
  1834. method: "post",
  1835. data: {
  1836. orderNo: this.state.orderNo, //订单编号
  1837. totalAmount: this.state.totalAmount, //总金额
  1838. firstAmount: this.state.firstAmount, //首付
  1839. isSubmit: this.state.isSubmit, //保存草稿还是提交
  1840. signDate: this.state.selTime, //签单日期
  1841. contacts: this.state.contacts, //企业负责人
  1842. contactMobile: this.state.contactMobile, //负责人联系方式
  1843. legalPerson: this.state.legalPerson, //企业法人
  1844. legalPersonTel: this.state.legalPersonTel, //企业法人联系电话
  1845. approval: this.state.approval, //特批状态
  1846. orderRemarks: this.state.orderRemarks, //订单备注
  1847. },
  1848. }).done(
  1849. function (data) {
  1850. this.setState({
  1851. loading: false,
  1852. });
  1853. if (!data.error.length) {
  1854. message.success("保存成功!");
  1855. this.loaduser();
  1856. } else {
  1857. message.warning(data.error[0].message);
  1858. }
  1859. }.bind(this)
  1860. );
  1861. },
  1862. not() {},
  1863. //查看基本详情基本信息
  1864. loaduser(record) {
  1865. this.state.orderList = [];
  1866. $.ajax({
  1867. method: "get",
  1868. dataType: "json",
  1869. crossDomain: false,
  1870. url: globalConfig.context + "/api/admin/newOrder/getOrderNewDetail",
  1871. data: {
  1872. orderNo: record ? record.orderNo : this.props.datauser.orderNo,
  1873. },
  1874. success: function (data) {
  1875. let thisData = data.data;
  1876. if (!thisData) {
  1877. if (data.error && data.error.length) {
  1878. message.warning(data.error[0].message);
  1879. }
  1880. thisData = {};
  1881. }
  1882. if (thisData.approval == 2) {
  1883. thisData.approval = "特批通过";
  1884. } else if (thisData.approval == 3) {
  1885. thisData.approval = "特批驳回";
  1886. }
  1887. this.setState({
  1888. id: thisData.id,
  1889. kehuId: thisData.buyerId,
  1890. orderNo: thisData.orderNo, //订单编号
  1891. orderType: thisData.orderType, //订单类型
  1892. firstAmount: thisData.firstAmount, //首付金额
  1893. totalAmount: thisData.totalAmount, //总金额
  1894. settlementAmount: thisData.settlementAmount, //结算金额
  1895. liquidationStatus: thisData.liquidationStatus, //清算状态
  1896. processStatus: thisData.processStatus, //流程状态
  1897. approval: thisData.approval.toString(), //特批状态
  1898. orderRemarks: thisData.orderRemarks, //订单备注
  1899. contractNo: thisData.contractNo, //合同编号
  1900. contacts: thisData.contacts, //联系人
  1901. contactMobile: thisData.contactMobile, //联系人电话
  1902. legalPerson: thisData.legalPerson, //法人
  1903. legalPersonTel: thisData.legalPersonTel, //法人电话
  1904. orgCodeUrl: thisData.contractPictureUrl
  1905. ? splitUrl(
  1906. thisData.contractPictureUrl,
  1907. ",",
  1908. globalConfig.avatarHost + "/upload"
  1909. )
  1910. : [], //图片地址
  1911. replenishUrl: thisData.agreementUrl
  1912. ? splitUrl(
  1913. thisData.agreementUrl,
  1914. ",",
  1915. globalConfig.avatarHost + "/upload"
  1916. )
  1917. : [], //图片地址
  1918. signDate: thisData.signDate, //签单时间
  1919. userName: thisData.userName, //客户名称
  1920. salesmanName: thisData.salesmanName, //营销员名称
  1921. salesmanMobile: thisData.salesmanMobile, //营销员电话
  1922. oldSalesmanName: thisData.oldSalesmanName, //营销员名称
  1923. oldSalesmanMobile: thisData.oldSalesmanMobile, //营销员电话
  1924. financeName: thisData.financeName, //财务名称
  1925. financeMobile: thisData.financeMobile, //财务电话
  1926. nowFinanceMobile: thisData.nowFinanceMobile,
  1927. nowFinance: thisData.nowFinance,
  1928. approval:
  1929. thisData.approval == 0
  1930. ? thisData.approval.toString()
  1931. : thisData.approval,
  1932. organizationSearch: thisData.orderDep,
  1933. depName: thisData.depName,
  1934. status: thisData.status,
  1935. outsource: thisData.outsource,
  1936. });
  1937. // console.log("kkkk",this.state.processStatus);
  1938. }.bind(this),
  1939. }).always(
  1940. function () {
  1941. this.setState({
  1942. loading: false,
  1943. });
  1944. }.bind(this)
  1945. );
  1946. },
  1947. //节点列表
  1948. jiedian(orderNos) {
  1949. this.setState({
  1950. loadData: true,
  1951. });
  1952. $.ajax({
  1953. method: "get",
  1954. dataType: "json",
  1955. crossDomain: false,
  1956. url: globalConfig.context + "/api/admin/newOrder/selectOrderDun",
  1957. data: {
  1958. orderNo: orderNos,
  1959. },
  1960. success: function (data) {
  1961. let theArr = [];
  1962. let thisData = [];
  1963. if (data.error.length || data.data.list == "") {
  1964. if (data.error && data.error.length) {
  1965. message.warning(data.error[0].message);
  1966. }
  1967. } else {
  1968. for (let i = 0; i < data.data.length; i++) {
  1969. thisData = data.data[i];
  1970. theArr.push({
  1971. key: i,
  1972. dunSubject: thisData.dunSubject
  1973. ? thisData.dunSubject.toString()
  1974. : "", //催款科目
  1975. id: thisData.id, //节点Id
  1976. money: thisData.money, //催款金额
  1977. dunStatus: thisData.dunStatus, //催款状态
  1978. orderNo: thisData.orderNo,
  1979. });
  1980. }
  1981. this.setState({
  1982. contactList: theArr,
  1983. });
  1984. }
  1985. }.bind(this),
  1986. }).always(
  1987. function () {
  1988. this.setState({
  1989. loading: false,
  1990. });
  1991. }.bind(this)
  1992. );
  1993. },
  1994. //查看催款节点
  1995. jiedianNew(orderNos) {
  1996. this.setState({
  1997. loadData: true,
  1998. });
  1999. $.ajax({
  2000. method: "get",
  2001. dataType: "json",
  2002. crossDomain: false,
  2003. url:
  2004. globalConfig.context + "/api/admin/newOrderDun/selectListNewOrderDun",
  2005. data: {
  2006. orderNo: orderNos,
  2007. },
  2008. success: function (data) {
  2009. if (data.error && data.error.length) {
  2010. message.warning(data.error[0].message);
  2011. } else {
  2012. let theArr = [];
  2013. let thisData = [];
  2014. let arr = data.data || [];
  2015. let totalCui = 0;
  2016. for (let i = 0; i < arr.length; i++) {
  2017. thisData = arr[i];
  2018. totalCui += +thisData.money;
  2019. theArr.push({
  2020. key: i,
  2021. dunSubject: thisData.dunSubject
  2022. ? thisData.dunSubject.toString()
  2023. : "", //催款科目
  2024. id: thisData.id, //节点Id
  2025. money: thisData.money, //催款金额
  2026. // orderNo: record ? record.orderNo : this.props.datauser.orderNo,
  2027. commodityName: thisData.commodityName,
  2028. projectType: thisData.projectType,
  2029. dunTypeName: thisData.dunTypeName,
  2030. status: thisData.status,
  2031. waitDay: thisData.waitDay,
  2032. effectiveCount: thisData.effectiveCount,
  2033. startDate: thisData.startDate,
  2034. dunType: thisData.dunType,
  2035. appropriationRatio: thisData.appropriationRatio,
  2036. customizeName: thisData.customizeName,
  2037. customizeTimes: thisData.customizeTimes,
  2038. tid: thisData.tid
  2039. });
  2040. }
  2041. if (!totalCui) {
  2042. totalCui = 0;
  2043. }
  2044. totalCui = (Math.round(totalCui * 1000000) / 1000000).toFixed(6);
  2045. this.setState({
  2046. contactListNew: theArr,
  2047. totalCui:parseFloat(totalCui),
  2048. });
  2049. }
  2050. }.bind(this),
  2051. }).always(
  2052. function () {
  2053. this.setState({
  2054. loading: false,
  2055. });
  2056. }.bind(this)
  2057. );
  2058. },
  2059. //催款节点保存
  2060. contactSave(record) {
  2061. for (let i = 0; i < this.state.contactList.length; i++) {
  2062. if (moneyVerify(this.state.contactList[i].money)) {
  2063. return;
  2064. }
  2065. }
  2066. this.setState({
  2067. loading: true,
  2068. });
  2069. $.ajax({
  2070. url: globalConfig.context + "/api/admin/newOrder/createOrderDun",
  2071. method: "post",
  2072. data: {
  2073. orderNo: this.state.orderNo,
  2074. orderDun: JSON.stringify(this.state.contactList),
  2075. },
  2076. }).done(
  2077. function (data) {
  2078. this.setState({
  2079. loading: false,
  2080. });
  2081. if (!data.error.length) {
  2082. message.success("保存成功!");
  2083. this.jiedian(record.orderNo);
  2084. } else {
  2085. message.warning(data.error[0].message);
  2086. }
  2087. }.bind(this)
  2088. );
  2089. },
  2090. //催款节点保存
  2091. contactSaveNew(record) {
  2092. if(record.dunType == 0) {
  2093. if(!record.customizeTimes) {
  2094. message.warning("请输入自定义时间")
  2095. return
  2096. }else if(!record.customizeName) {
  2097. message.warning("请输入自定义科目")
  2098. return
  2099. }
  2100. }
  2101. if (record.boStatus == "false") {
  2102. record.boStatus = false;
  2103. } else if (record.boStatus == "true") {
  2104. record.boStatus = true;
  2105. }
  2106. if (!this.state.yearFlag) {
  2107. if (!record.effectiveCount && !record.dunTypeCustom) {
  2108. message.warning("请选择服务年限");
  2109. return;
  2110. }
  2111. } else {
  2112. record.effectiveCount = "";
  2113. }
  2114. if (record.money == "") {
  2115. message.warning("请填写金额");
  2116. return;
  2117. }
  2118. if (record.boStatus) {
  2119. if (
  2120. typeof +record.money == "number" &&
  2121. +record.money >= 0 &&
  2122. +record.money <= 1
  2123. ) {
  2124. record.appropriationRatio = record.money;
  2125. } else {
  2126. message.warning("金额比例填写错误,比例范围0~1");
  2127. return;
  2128. }
  2129. }
  2130. if (!record.dunType && record.dunType != 0) {
  2131. message.warning("请选择对应科目");
  2132. return;
  2133. }
  2134. if (record.dunType != 1) {
  2135. record.waitDay = "";
  2136. }
  2137. this.setState({
  2138. loading: true,
  2139. });
  2140. if (record.boStatus) {
  2141. $.ajax({
  2142. url: globalConfig.context + "/api/admin/newOrderDun/createDun",
  2143. method: "post",
  2144. data: {
  2145. orderNo: record.orderNo,
  2146. tid: record.tid,
  2147. projectType: record.sort,
  2148. dunType: record.dunType,
  2149. appropriationRatio: record.appropriationRatio,
  2150. waitDay: record.waitDay,
  2151. effectiveCount: record.effectiveCount,
  2152. customizeTimes:
  2153. record.dunType == 0 ? record.customizeTimes : undefined,
  2154. customizeName:
  2155. record.dunType == 0 ? record.customizeName : undefined,
  2156. },
  2157. }).done(
  2158. function (data) {
  2159. this.setState({
  2160. loading: false,
  2161. });
  2162. if (!data.error.length) {
  2163. message.success("保存成功!");
  2164. this.setState({
  2165. cuiFlag: false,
  2166. boFlag: false,
  2167. addFlag: false,
  2168. });
  2169. this.jiedianNew(record.orderNo);
  2170. } else {
  2171. message.warning(data.error[0].message);
  2172. }
  2173. }.bind(this)
  2174. );
  2175. } else {
  2176. $.ajax({
  2177. url: globalConfig.context + "/api/admin/newOrderDun/createDun",
  2178. method: "post",
  2179. data: {
  2180. orderNo: record.orderNo,
  2181. tid: record.tid,
  2182. projectType: record.sort,
  2183. dunType: record.dunType,
  2184. money: record.money,
  2185. waitDay: record.waitDay,
  2186. effectiveCount: record.effectiveCount,
  2187. customizeTimes:
  2188. record.dunType == 0 ? record.customizeTimes : undefined,
  2189. customizeName:
  2190. record.dunType == 0 ? record.customizeName : undefined,
  2191. },
  2192. }).done(
  2193. function (data) {
  2194. this.setState({
  2195. loading: false,
  2196. });
  2197. if (!data.error.length) {
  2198. message.success("保存成功!");
  2199. this.setState({
  2200. cuiFlag: false,
  2201. boFlag: false,
  2202. addFlag: false,
  2203. });
  2204. this.jiedianNew(record.orderNo);
  2205. } else {
  2206. message.warning(data.error[0].message);
  2207. }
  2208. }.bind(this)
  2209. );
  2210. }
  2211. },
  2212. //点击新增催款节点
  2213. addcontact() {
  2214. this.state.contactList.push({
  2215. key: this.state.contactList.length,
  2216. money: "",
  2217. dunSubject: undefined,
  2218. orderNo: this.state.orderNo,
  2219. dunTarget: this.state.kehuId,
  2220. });
  2221. this.setState({
  2222. contactList: this.state.contactList,
  2223. });
  2224. },
  2225. //点击新增催款节点
  2226. addcontactNew() {
  2227. this.state.contactListNew.push({
  2228. key: this.state.contactListNew.length,
  2229. money: "",
  2230. dunSubject: undefined,
  2231. orderNo: this.state.orderNo,
  2232. dunTarget: this.state.kehuId,
  2233. });
  2234. this.setState({
  2235. contactListNew: this.state.contactListNew,
  2236. cuiFlag: true,
  2237. });
  2238. },
  2239. //删除收款节点
  2240. confirmDelet(index) {
  2241. this.state.contactList.splice(index, 1);
  2242. this.setState({
  2243. contactList: this.state.contactList,
  2244. });
  2245. this.contactSave();
  2246. },
  2247. //删除收款节点
  2248. confirmDeletNew(index) {
  2249. if (index.id) {
  2250. this.state.contactListNew.splice(index.id, 1);
  2251. this.setState({
  2252. contactListNew: this.state.contactListNew,
  2253. cuiFlag: false,
  2254. addFlag: false,
  2255. boFlag: false,
  2256. });
  2257. $.ajax({
  2258. url: globalConfig.context + "/api/admin/newOrderDun/deleteDun",
  2259. method: "post",
  2260. data: {
  2261. id: index.id,
  2262. },
  2263. }).done(
  2264. function (data) {
  2265. this.setState({
  2266. loading: false,
  2267. });
  2268. if (!data.error.length) {
  2269. message.success("删除成功!");
  2270. this.setState({
  2271. cuiFlag: false,
  2272. });
  2273. this.jiedianNew(this.state.orderNo);
  2274. } else {
  2275. message.warning(data.error[0].message);
  2276. }
  2277. }.bind(this)
  2278. );
  2279. } else {
  2280. this.state.contactListNew.splice(index.key, 1);
  2281. this.setState({
  2282. contactListNew: this.state.contactListNew,
  2283. cuiFlag: false,
  2284. addFlag: false,
  2285. boFlag: false,
  2286. });
  2287. }
  2288. },
  2289. handleOk() {
  2290. this.setState({
  2291. visible: false,
  2292. mark: false,
  2293. });
  2294. this.props.closeDesc(false, true);
  2295. },
  2296. handleCancel() {
  2297. if (this.state.orderType == undefined) {
  2298. return false;
  2299. }
  2300. if (!this.state.autoId) {
  2301. return false;
  2302. }
  2303. this.setState({
  2304. visible: false,
  2305. mark: false,
  2306. });
  2307. this.props.closeDesc(false);
  2308. },
  2309. handleCancelclose() {
  2310. this.setState(
  2311. {
  2312. visible: false,
  2313. mark: false,
  2314. cuiFlag: false,
  2315. addFlag: false,
  2316. boFlag: false,
  2317. isJilu: false,
  2318. },
  2319. () => {
  2320. this.setState({
  2321. activeKey: "1",
  2322. });
  2323. }
  2324. );
  2325. this.props.closeDesc(false);
  2326. this.reset();
  2327. },
  2328. //点击签单
  2329. handleCancels() {
  2330. this.setState({
  2331. isSubmit: 1,
  2332. });
  2333. },
  2334. //点击签单
  2335. handleCancelq() {
  2336. this.setState({
  2337. isSubmit: 0,
  2338. });
  2339. },
  2340. //删除
  2341. delectRow(record) {
  2342. this.setState({
  2343. loading: true,
  2344. });
  2345. $.ajax({
  2346. method: "post",
  2347. dataType: "json",
  2348. crossDomain: false,
  2349. url: globalConfig.context + "/api/admin/newOrder/deleteOrderTask",
  2350. data: {
  2351. id: record.id,
  2352. },
  2353. }).done(
  2354. function (data) {
  2355. if (!data.error.length) {
  2356. message.success("删除成功!");
  2357. this.setState({
  2358. loading: false,
  2359. });
  2360. this.jiedian(this.state.orderNo);
  2361. this.jiedianNew(this.state.orderNo);
  2362. this.loaduser();
  2363. this.loadData();
  2364. } else {
  2365. message.warning(data.error[0].message);
  2366. }
  2367. }.bind(this)
  2368. );
  2369. },
  2370. nextCancel() {
  2371. this.setState({
  2372. addnextVisible: false,
  2373. changeVisible: false,
  2374. displayFees: "none",
  2375. officialCost: "", //是否有官费
  2376. costReduction: "", //是否有费减
  2377. });
  2378. },
  2379. rizhi() {
  2380. this.setState({
  2381. loading: true,
  2382. });
  2383. $.ajax({
  2384. method: "get",
  2385. dataType: "json",
  2386. crossDomain: false,
  2387. url: "/api/admin/newOrder/selectOrderLog",
  2388. data: {
  2389. orderNo: this.props.datauser.orderNo,
  2390. },
  2391. success: function (data) {
  2392. let theArr = [];
  2393. let thisData = data.data;
  2394. if (!thisData.length) {
  2395. if (data.error && data.error.length) {
  2396. message.warning(data.error[0].message);
  2397. }
  2398. thisData = {};
  2399. } else {
  2400. for (let i = 0; i < data.data.length; i++) {
  2401. let thisdata = data.data[i];
  2402. theArr.push({
  2403. processName: thisdata.processName,
  2404. adminName: thisdata.adminName,
  2405. createDate: thisdata.createDate,
  2406. remarks: thisdata.remarks,
  2407. });
  2408. }
  2409. }
  2410. this.setState({
  2411. dataSourcerizhi: theArr,
  2412. });
  2413. }.bind(this),
  2414. }).always(
  2415. function () {
  2416. this.setState({
  2417. loading: false,
  2418. });
  2419. }.bind(this)
  2420. );
  2421. },
  2422. //查看订单日志
  2423. getOrderLog() {
  2424. this.setState({
  2425. rizhivisible: true,
  2426. });
  2427. this.rizhi();
  2428. },
  2429. closeOrderLog() {
  2430. this.setState({
  2431. rizhivisible: false,
  2432. });
  2433. },
  2434. callback(key) {
  2435. this.setState({
  2436. activeKey: key,
  2437. });
  2438. if (key === "1") {
  2439. this.jiedian(this.props.datauser.orderNo);
  2440. this.jiedianNew(this.props.datauser.orderNo);
  2441. this.loaduser();
  2442. // this.loaduser();
  2443. }
  2444. if (key === "3") {
  2445. this.getChangeData();
  2446. }
  2447. if (key === "2") {
  2448. let url = window.location.href.substring(7);
  2449. $.ajax({
  2450. method: "get",
  2451. dataType: "json",
  2452. crossDomain: false,
  2453. url:
  2454. globalConfig.context + "/api/admin/orderChange/orderChangeDetails",
  2455. data: {
  2456. orderNo: this.props.datauser.orderNo,
  2457. },
  2458. success: function (data) {
  2459. // console.log(data.data);
  2460. if (data.data && data.data.length) {
  2461. let thisdata = data.data[data.data.length - 1];
  2462. if (
  2463. thisdata.status === 0 ||
  2464. (thisdata.processState == 0 && thisdata.status != 5)
  2465. ) {
  2466. this.setState({
  2467. changeId: thisdata.id,
  2468. typeChange: thisdata.type,
  2469. totalAmount: thisdata.totalAmount,
  2470. settlementAmount: thisdata.settlementAmount,
  2471. changeAmount: thisdata.changeAmount,
  2472. remarksC: thisdata.remarks,
  2473. startRemarks: thisdata.zxsRemarks,
  2474. isCaoGao: true,
  2475. arrears: thisdata.arrears,
  2476. changeFlag: true,
  2477. createTimes: thisdata.createTimes,
  2478. voucherUrl: thisdata.voucherUrl
  2479. ? splitUrl(
  2480. thisdata.voucherUrl,
  2481. ",",
  2482. globalConfig.avatarHost + "/upload",
  2483. url
  2484. )
  2485. : [],
  2486. processState: thisdata.processState,
  2487. status: thisdata.status,
  2488. });
  2489. this.proList();
  2490. this.cuiList();
  2491. let e = thisdata.type;
  2492. if (e == 1) {
  2493. this.setState({
  2494. hetongFlag: false,
  2495. listFlag: false,
  2496. listCuiFlag: false,
  2497. tuiKuanFlag: false,
  2498. displayList: false,
  2499. });
  2500. } else if (e == 2) {
  2501. this.setState({
  2502. hetongFlag: true,
  2503. listFlag: false,
  2504. listCuiFlag: false,
  2505. tuiKuanFlag: true,
  2506. displayList: false,
  2507. });
  2508. } else if (e == 3) {
  2509. this.setState({
  2510. listFlag: false,
  2511. hetongFlag: false,
  2512. listCuiFlag: false,
  2513. tuiKuanFlag: false,
  2514. displayList: true,
  2515. });
  2516. } else if (e == 4) {
  2517. this.setState({
  2518. listFlag: false,
  2519. listCuiFlag: false,
  2520. hetongFlag: false,
  2521. tuiKuanFlag: true,
  2522. displayList: false,
  2523. });
  2524. } else if (e == 5) {
  2525. this.setState({
  2526. listFlag: false,
  2527. listCuiFlag: false,
  2528. hetongFlag: true,
  2529. tuiKuanFlag: true,
  2530. displayList: false,
  2531. });
  2532. } else {
  2533. this.setState({
  2534. listFlag: true,
  2535. hetongFlag: true,
  2536. listCuiFlag: true,
  2537. tuiKuanFlag: false,
  2538. displayList: false,
  2539. });
  2540. }
  2541. } else {
  2542. this.setState({
  2543. listFlag: false,
  2544. hetongFlag: false,
  2545. listCuiFlag: false,
  2546. tuiKuanFlag: false,
  2547. displayList: false,
  2548. // 置空
  2549. changeId: undefined,
  2550. isCaoGao: false,
  2551. });
  2552. }
  2553. } else {
  2554. this.setState({
  2555. isCaoGao: false,
  2556. });
  2557. }
  2558. }.bind(this),
  2559. });
  2560. }
  2561. },
  2562. cuiList(id) {
  2563. this.setState({
  2564. loadData: true,
  2565. });
  2566. $.ajax({
  2567. method: "get",
  2568. dataType: "json",
  2569. crossDomain: false,
  2570. url: globalConfig.context + "/api/admin/orderChange/selectChangeDun",
  2571. data: {
  2572. id: id || this.state.changeId,
  2573. },
  2574. success: function (data) {
  2575. this.setState({
  2576. cuiDataSource: data.data,
  2577. });
  2578. if (data.data && data.data.length) {
  2579. if (id) {
  2580. this.setState({
  2581. listCuiFlag: true,
  2582. });
  2583. }
  2584. this.setState({
  2585. cuiDataSource: data.data,
  2586. });
  2587. this.setState({
  2588. loadData: false,
  2589. });
  2590. } else if (data.error && data.error.length) {
  2591. message.warning(data.error[0].message);
  2592. this.setState({
  2593. loadData: false,
  2594. });
  2595. }
  2596. }.bind(this),
  2597. });
  2598. },
  2599. proList(id) {
  2600. this.setState({
  2601. loadData: true,
  2602. });
  2603. $.ajax({
  2604. method: "get",
  2605. dataType: "json",
  2606. crossDomain: false,
  2607. url: globalConfig.context + "/api/admin/orderChange/selectChangeTask",
  2608. data: {
  2609. id: id || this.state.changeId,
  2610. },
  2611. success: function (data) {
  2612. if (data.data && data.data.length) {
  2613. if (id) {
  2614. this.setState({
  2615. listFlag: true,
  2616. });
  2617. }
  2618. data.data.forEach((item,index) => {
  2619. item.key = index;
  2620. });
  2621. this.setState({
  2622. proDataSource: data.data,
  2623. });
  2624. this.setState({
  2625. loadData: false,
  2626. });
  2627. } else if (data.error && data.error.length) {
  2628. message.warning(data.error[0].message);
  2629. this.setState({
  2630. loadData: false,
  2631. });
  2632. }
  2633. }.bind(this),
  2634. });
  2635. },
  2636. logList(id) {
  2637. this.setState({
  2638. loading: true,
  2639. });
  2640. $.ajax({
  2641. method: "get",
  2642. dataType: "json",
  2643. async: false,
  2644. crossDomain: false,
  2645. url: globalConfig.context + "/api/admin/orderChange/orderChangeLogList",
  2646. data: {
  2647. changeId: id,
  2648. },
  2649. success: function (data) {
  2650. if (data.error.length || data.data.list == "") {
  2651. if (data.error && data.error.length) {
  2652. message.warning(data.error[0].message);
  2653. this.setState({
  2654. loading: false,
  2655. });
  2656. }
  2657. } else {
  2658. this.setState({
  2659. logData: data.data,
  2660. loading: false,
  2661. });
  2662. }
  2663. }.bind(this),
  2664. });
  2665. },
  2666. getOrgCodeUrl(e) {
  2667. this.setState({ orgCodeUrl: e });
  2668. },
  2669. getReplenishUrl(e) {
  2670. this.setState({ replenishUrl: e });
  2671. },
  2672. getVoucherUrl(e) {
  2673. this.setState({ voucherUrl: e });
  2674. },
  2675. //加载(自动补全)
  2676. supervisor(e, state) {
  2677. //客户名称与服务名称自动补全
  2678. let api = state
  2679. ? "/api/admin/customer/getCustomerByName"
  2680. : "/api/admin/order/getBusinessProjectByName";
  2681. $.ajax({
  2682. method: "get",
  2683. dataType: "json",
  2684. crossDomain: false,
  2685. url: globalConfig.context + api,
  2686. data: state
  2687. ? {
  2688. name: e,
  2689. type: this.state.customType,
  2690. }
  2691. : {
  2692. businessName: e,
  2693. },
  2694. success: function (data) {
  2695. let thedata = data.data;
  2696. if (!thedata) {
  2697. if (data.error && data.error.length) {
  2698. message.warning(data.error[0].message);
  2699. }
  2700. thedata = {};
  2701. }
  2702. this.setState({
  2703. states: state,
  2704. customerArr: thedata,
  2705. });
  2706. }.bind(this),
  2707. }).always(
  2708. function () {
  2709. this.setState({
  2710. loading: false,
  2711. });
  2712. }.bind(this)
  2713. );
  2714. },
  2715. supervisorCui(e) {
  2716. //客户名称与服务名称自动补全
  2717. let api = "/api/admin/order/getBusinessProjectByName";
  2718. $.ajax({
  2719. method: "get",
  2720. dataType: "json",
  2721. crossDomain: false,
  2722. url: globalConfig.context + api,
  2723. data: {
  2724. businessName: e,
  2725. },
  2726. success: function (data) {
  2727. let thedata = data.data;
  2728. if (!thedata) {
  2729. if (data.error && data.error.length) {
  2730. message.warning(data.error[0].message);
  2731. }
  2732. thedata = {};
  2733. }
  2734. this.setState({
  2735. customerCuiArr: thedata,
  2736. });
  2737. }.bind(this),
  2738. }).always(
  2739. function () {
  2740. this.setState({
  2741. loading: false,
  2742. });
  2743. }.bind(this)
  2744. );
  2745. },
  2746. //上级主管输入框失去焦点是判断客户是否存在
  2747. selectAuto(value) {
  2748. let kid = [];
  2749. let fwList = this.state.customerArr;
  2750. fwList.map(function (item) {
  2751. if (value == item.bname) {
  2752. kid = item;
  2753. console.log(item);
  2754. }
  2755. });
  2756. if (kid.type == "1") {
  2757. this.setState({
  2758. displayFees: "block",
  2759. });
  2760. } else {
  2761. this.setState({
  2762. displayFees: "none",
  2763. });
  2764. }
  2765. this.setState({
  2766. commodityName: value,
  2767. gid: kid.id,
  2768. //commodityPrice:kid.price==0?kid.price.toString():kid.price,
  2769. commodityFirstPayment:
  2770. kid.firstPayment == 0
  2771. ? kid.firstPayment.toString()
  2772. : kid.firstPayment,
  2773. });
  2774. },
  2775. selectAutoCui(value) {
  2776. let kid = [];
  2777. let fwList = this.state.customerCuiArr;
  2778. fwList.map(function (item) {
  2779. if (value == item.bname) {
  2780. kid = item;
  2781. }
  2782. });
  2783. this.setState({
  2784. commodityNameCui: value,
  2785. cid: kid.id,
  2786. //commodityPrice:kid.price==0?kid.price.toString():kid.price,
  2787. commodityFirstPayment:
  2788. kid.firstPayment == 0
  2789. ? kid.firstPayment.toString()
  2790. : kid.firstPayment,
  2791. });
  2792. },
  2793. //客户
  2794. selectAutoCUT(value) {
  2795. let autoIds;
  2796. let fwList = this.state.customerArr;
  2797. fwList.map(function (item) {
  2798. if (value == item.name) {
  2799. autoIds = item.id;
  2800. }
  2801. });
  2802. this.setState({
  2803. customerName: value,
  2804. autoId: autoIds,
  2805. });
  2806. },
  2807. //服务值改变时请求客户名称
  2808. httpChange(e) {
  2809. this.state.gid = "";
  2810. if (e.length >= 1) {
  2811. this.supervisor(e, false);
  2812. }
  2813. this.setState({
  2814. commodityName: e,
  2815. });
  2816. },
  2817. httpChangeCui(e) {
  2818. if (e.length >= 1) {
  2819. this.supervisorCui(e, false);
  2820. }
  2821. this.setState({
  2822. commodityNameCui: e,
  2823. });
  2824. },
  2825. //客户名称自动补全
  2826. customerChange(e) {
  2827. if (this.state.customType) {
  2828. this.state.autoId = "";
  2829. if (e.length >= 2) {
  2830. this.supervisor(e, true);
  2831. }
  2832. this.setState({
  2833. customerName: e,
  2834. });
  2835. } else {
  2836. this.setState({
  2837. customerName: "",
  2838. });
  2839. message.warning("客户所属类型必须指定");
  2840. }
  2841. },
  2842. //点击添加项目明细
  2843. addDetailed() {
  2844. this.setState({
  2845. gid: "",
  2846. customerArr: [],
  2847. commodityName: "",
  2848. commodityQuantity: "",
  2849. commodityId: "",
  2850. taskComment: "",
  2851. main: undefined,
  2852. commodityPrice: "",
  2853. addState: 1,
  2854. addnextVisible: true,
  2855. displayFees: "none",
  2856. officialCost: "",
  2857. costReduction: "",
  2858. });
  2859. },
  2860. //新建项目明细保存
  2861. nextSubmit(e) {
  2862. e.preventDefault();
  2863. if (this.state.gid == undefined || !this.state.gid) {
  2864. message.warning("服务名称不匹配!");
  2865. return false;
  2866. }
  2867. if (this.state.displayFees=='block') {
  2868. if(this.state.officialCost==''){
  2869. message.warning("请选择官费!");
  2870. return false;
  2871. }
  2872. if (this.state.costReduction == "") {
  2873. message.warning("请选择费减!");
  2874. return false;
  2875. }
  2876. }
  2877. if (!this.state.commodityPrice) {
  2878. message.warning("请输入金额!");
  2879. this.refs.commodityPrice.focus();
  2880. return false;
  2881. }
  2882. let reg = /^([0]|[1-9][0-9]*)$/;
  2883. if (
  2884. !this.state.commodityQuantity ||
  2885. !reg.test(this.state.commodityQuantity)
  2886. ) {
  2887. message.warning("请输入正确商品数量!");
  2888. this.refs.commodityQuantity.focus();
  2889. return false;
  2890. }
  2891. if (!this.state.main) {
  2892. message.warning("请选择是否为主要项目!");
  2893. this.refs.commodityQuantity.focus();
  2894. return false;
  2895. }
  2896. this.setState({
  2897. loading: true,
  2898. });
  2899. let api = this.state.addState
  2900. ? "/api/admin/newOrder/addOrderTask"
  2901. : "/api/bianji";
  2902. $.ajax({
  2903. method: "POST",
  2904. dataType: "json",
  2905. crossDomain: false,
  2906. url: globalConfig.context + api,
  2907. data: {
  2908. commodityId: this.state.gid, //商品ID
  2909. orderNo: this.props.datauser.orderNo, //订单编号
  2910. commodityName: this.state.commodityName, //商品名称
  2911. commodityQuantity: this.state.commodityQuantity, //商品数量
  2912. commodityPrice: this.state.commodityPrice, //签单总价
  2913. taskComment: this.state.taskComment, //服务说明
  2914. main: this.state.main, //是否为主要项目
  2915. officialCost: this.state.displayFees==='block' ? this.state.officialCost : '', //是否有官费
  2916. costReduction: this.state.displayFees==='block' ?this.state.costReduction : '', //是否有费减
  2917. },
  2918. }).done(
  2919. function (data) {
  2920. this.setState({
  2921. loading: false,
  2922. });
  2923. if (!data.error.length) {
  2924. message.success("保存成功!");
  2925. this.nextCancel();
  2926. //this.loaduser(this.props.datauser);
  2927. this.loadData();
  2928. } else {
  2929. message.warning(data.error[0].message);
  2930. }
  2931. }.bind(this)
  2932. );
  2933. },
  2934. //点击打卡项目详情
  2935. tableRowClick(record) {
  2936. console.log(record);
  2937. if (record.type=='1'){
  2938. this.setState({
  2939. displayFees: "block",
  2940. costReduction: record.costReduction,
  2941. officialCost: record.officialCost,
  2942. });
  2943. }
  2944. this.setState({
  2945. jid: record.id, //项目ID
  2946. kid: record.commodityId, //商品ID
  2947. commodityName: record.commodityName, //金额
  2948. commodityPrice: record.commodityPrice, //金额
  2949. commodityQuantity: record.commodityQuantity, //数量
  2950. taskComment: record.taskComment, //备注
  2951. main: record.main.toString(), //是否为主要
  2952. addState: 0,
  2953. addnextVisible: true,
  2954. });
  2955. },
  2956. //修改项目详情
  2957. tabRowSave(e) {
  2958. e.preventDefault();
  2959. if (!this.state.commodityPrice) {
  2960. message.warning("金额不能为空!");
  2961. return false;
  2962. }
  2963. let reg = /^([0]|[1-9][0-9]*)$/;
  2964. if (
  2965. !this.state.commodityQuantity ||
  2966. !reg.test(this.state.commodityQuantity)
  2967. ) {
  2968. message.warning("请输入正确商品数量!");
  2969. return false;
  2970. }
  2971. if (!this.state.main) {
  2972. message.warning("请选择是否为主要项目!");
  2973. this.refs.commodityQuantity.focus();
  2974. return false;
  2975. }
  2976. $.ajax({
  2977. method: "POST",
  2978. dataType: "json",
  2979. crossDomain: false,
  2980. url: globalConfig.context + "/api/admin/newOrder/updateOrderTask",
  2981. data: {
  2982. id: this.state.jid, //项目ID
  2983. commodityId: this.state.kid, //商品ID
  2984. orderNo: this.props.datauser.orderNo, //订单编号
  2985. main: this.state.main, //是否为主要
  2986. commodityPrice: this.state.commodityPrice, //金额
  2987. commodityQuantity: this.state.commodityQuantity, //数量
  2988. taskComment: this.state.taskComment, //备注
  2989. officialCost: this.state.officialCost, //是否有官费
  2990. costReduction: this.state.costReduction, //是否有费减
  2991. },
  2992. }).done(
  2993. function (data) {
  2994. this.setState({
  2995. loading: false,
  2996. });
  2997. if (!data.error.length) {
  2998. message.success("保存成功!");
  2999. this.nextCancel();
  3000. //this.loaduser(this.props.datauser);
  3001. this.loadData();
  3002. } else {
  3003. message.warning(data.error[0].message);
  3004. }
  3005. }.bind(this)
  3006. );
  3007. },
  3008. //签单时间选择
  3009. selTime(e, index) {
  3010. this.setState({
  3011. entryTime: e,
  3012. signDate: e,
  3013. selTime: index,
  3014. });
  3015. },
  3016. //退单操作
  3017. //点击退单
  3018. tuikuan() {
  3019. this.setState({
  3020. lookVisible: true,
  3021. contractUrl: [],
  3022. applicationUrl: [],
  3023. reason: "",
  3024. });
  3025. },
  3026. //关闭退单
  3027. noCancel() {
  3028. this.setState({
  3029. lookVisible: false,
  3030. });
  3031. },
  3032. //点击确认退单
  3033. tuidanOk() {
  3034. let contractUrls = [];
  3035. let applicationUrls = [];
  3036. if (this.state.contractUrl.length) {
  3037. let picArr = [];
  3038. this.state.contractUrl.map(function (item) {
  3039. if (
  3040. item.response &&
  3041. item.response.data &&
  3042. item.response.data.length
  3043. ) {
  3044. picArr.push(item.response.data);
  3045. }
  3046. });
  3047. contractUrls = picArr.join(",");
  3048. }
  3049. if (this.state.applicationUrl.length) {
  3050. let picArr = [];
  3051. this.state.applicationUrl.map(function (item) {
  3052. if (
  3053. item.response &&
  3054. item.response.data &&
  3055. item.response.data.length
  3056. ) {
  3057. picArr.push(item.response.data);
  3058. }
  3059. });
  3060. applicationUrls = picArr.join(",");
  3061. }
  3062. $.ajax({
  3063. method: "POST",
  3064. dataType: "json",
  3065. crossDomain: false,
  3066. url: globalConfig.context + "/api/admin/newOrder/addOrderRefund",
  3067. data: {
  3068. orderNo: this.state.orderNo, //订单编号
  3069. contractUrl: contractUrls.length ? contractUrls : "", //终止合同
  3070. applicationUrl: applicationUrls.length ? applicationUrls : "", //退单申请表
  3071. reason: this.state.reason, //退单原因
  3072. },
  3073. }).done(
  3074. function (data) {
  3075. this.setState({
  3076. loading: false,
  3077. });
  3078. if (!data.error.length) {
  3079. message.success("退单成功!");
  3080. this.noCancel();
  3081. this.handleCancelclose();
  3082. } else {
  3083. message.warning(data.error[0].message);
  3084. }
  3085. }.bind(this)
  3086. );
  3087. },
  3088. //开单选择订单类型骚操作
  3089. orderTypeFn(e) {
  3090. if (e == 0) {
  3091. this.setState({
  3092. bussStats: true,
  3093. orderType: e,
  3094. });
  3095. this.category();
  3096. } else {
  3097. this.setState({
  3098. contractType: undefined,
  3099. bussStats: false,
  3100. orderType: e,
  3101. });
  3102. }
  3103. },
  3104. //品类数据获取
  3105. category() {
  3106. $.ajax({
  3107. method: "get",
  3108. dataType: "json",
  3109. crossDomain: false,
  3110. url: globalConfig.context + "/api/admin/Varieties/getSuperList",
  3111. data: {},
  3112. success: function (data) {
  3113. let thedata = data.data;
  3114. let theArr = [];
  3115. if (!thedata) {
  3116. if (data.error && data.error.length) {
  3117. message.warning(data.error[0].message);
  3118. }
  3119. thedata = {};
  3120. } else {
  3121. thedata.map(function (item, index) {
  3122. theArr.push({
  3123. key: index,
  3124. name: item.cname,
  3125. id: item.id,
  3126. });
  3127. });
  3128. }
  3129. this.setState({
  3130. contractType: undefined,
  3131. categoryArr: theArr,
  3132. });
  3133. }.bind(this),
  3134. });
  3135. },
  3136. //变更申请
  3137. changeApply() {
  3138. if (
  3139. this.state.typeChange == undefined ||
  3140. (this.state.typeChange == "" && this.state.typeChange != 0)
  3141. ) {
  3142. message.warning("请选择变更类型");
  3143. return false;
  3144. }
  3145. if (
  3146. this.state.typeChange == 0 ||
  3147. this.state.typeChange == 1 ||
  3148. this.state.typeChange == 3
  3149. ) {
  3150. if (this.state.settlementAmount < this.state.changeAmount) {
  3151. message.warning("退款金额大于已收款金额");
  3152. return;
  3153. }
  3154. }
  3155. if (this.state.processStatus != 5 && this.state.processStatus != 6) {
  3156. message.warning("当前订单流程不能发起变更!");
  3157. return false;
  3158. }
  3159. if (this.state.changeAmount === "") {
  3160. message.warning("申请退款金额不能为空!");
  3161. // console.log(this.state.changeAmount);
  3162. return false;
  3163. }
  3164. if (this.state.remarksC == "") {
  3165. message.warning("请正确填写变更原因");
  3166. return false;
  3167. }
  3168. if (this.state.startRemarks == "") {
  3169. message.warning("请正确填写备注信息");
  3170. return false;
  3171. }
  3172. let theorgCodeUrl = [];
  3173. if (this.state.voucherUrl.length) {
  3174. let picArr = [];
  3175. this.state.voucherUrl.map(function (item) {
  3176. if (
  3177. item.response &&
  3178. item.response.data &&
  3179. item.response.data.length
  3180. ) {
  3181. picArr.push(item.response.data);
  3182. }
  3183. });
  3184. theorgCodeUrl = picArr.join(",");
  3185. }
  3186. this.setState({
  3187. loading: true,
  3188. });
  3189. if (this.state.typeChange == 0) {
  3190. $.ajax({
  3191. method: "post",
  3192. dataType: "json",
  3193. crossDomain: false,
  3194. url: globalConfig.context + "/api/admin/orderChange/addOrderChange",
  3195. data: {
  3196. orderNo: this.state.orderNo, //订单编号
  3197. processState: 1,
  3198. status: 1,
  3199. startRemarks: this.state.startRemarks,
  3200. remarks: this.state.remarksC,
  3201. voucherUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
  3202. totalAmount: this.state.totalAmount,
  3203. settlementAmount: this.state.settlementAmount,
  3204. changeAmount: this.state.changeAmount,
  3205. applicant: this.state.salesmanName,
  3206. depName: this.state.depName,
  3207. type: this.state.typeChange,
  3208. },
  3209. }).done(
  3210. function (data) {
  3211. this.setState({
  3212. loading: false,
  3213. });
  3214. if (!data.error.length) {
  3215. message.success("发起变更成功");
  3216. this.handleCancelclose();
  3217. } else {
  3218. message.warning(data.error[0].message);
  3219. this.setState({
  3220. loading: false,
  3221. });
  3222. }
  3223. }.bind(this)
  3224. );
  3225. } else {
  3226. $.ajax({
  3227. method: "post",
  3228. dataType: "json",
  3229. crossDomain: false,
  3230. url: globalConfig.context + "/api/admin/orderChange/addOrderChange",
  3231. data: {
  3232. orderNo: this.state.orderNo, //订单编号
  3233. processState: 0,
  3234. status: 0,
  3235. startRemarks: this.state.startRemarks,
  3236. remarks: this.state.remarksC,
  3237. voucherUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
  3238. totalAmount: this.state.totalAmount,
  3239. settlementAmount: this.state.settlementAmount,
  3240. changeAmount: this.state.changeAmount,
  3241. applicant: this.state.salesmanName,
  3242. depName: this.state.depName,
  3243. type: this.state.typeChange,
  3244. },
  3245. }).done(
  3246. function (data) {
  3247. this.setState({
  3248. loading: false,
  3249. });
  3250. if (!data.error.length) {
  3251. message.success("发起变更草稿");
  3252. this.setState(
  3253. {
  3254. isCaoGao: true,
  3255. loading: false,
  3256. },
  3257. () => {
  3258. this.callback("2");
  3259. }
  3260. );
  3261. } else {
  3262. message.warning(data.error[0].message);
  3263. }
  3264. }.bind(this)
  3265. );
  3266. }
  3267. },
  3268. reset() {
  3269. this.setState({
  3270. startRemarks: "",
  3271. remarksC: "",
  3272. voucherUrl: [],
  3273. totalAmount: undefined,
  3274. settlementAmount: undefined,
  3275. changeAmount: "0",
  3276. applicant: undefined,
  3277. depNameChange: undefined,
  3278. typeChange: undefined,
  3279. displayFees: "none",
  3280. officialCost: "",
  3281. costReduction: "",
  3282. });
  3283. },
  3284. componentWillReceiveProps(nextProps) {
  3285. //props改变时触发
  3286. this.state.visible = nextProps.showDesc;
  3287. this.state.signBillVisible = nextProps.signBillVisible;
  3288. if (this.state.signBillVisible) {
  3289. this.loaduser(nextProps.uid);
  3290. }
  3291. if (nextProps.userDetaile && nextProps.showDesc) {
  3292. this.loaduser(nextProps.datauser);
  3293. this.jiedian(nextProps.datauser.orderNo);
  3294. this.jiedianNew(nextProps.datauser.orderNo);
  3295. this.loadData(nextProps.datauser);
  3296. this.getChangeData(nextProps.datauser);
  3297. } else {
  3298. this.setState({
  3299. orderType: undefined,
  3300. customerName: "",
  3301. autoId: "",
  3302. customerArr: [],
  3303. contractType: undefined,
  3304. bussStats: false,
  3305. customType: undefined,
  3306. });
  3307. }
  3308. },
  3309. //查看变更记录
  3310. getChangeData(record) {
  3311. this.setState({
  3312. loading: true,
  3313. });
  3314. $.ajax({
  3315. method: "get",
  3316. dataType: "json",
  3317. crossDomain: false,
  3318. url: globalConfig.context + "/api/admin/orderChange/orderChangeDetails",
  3319. data: {
  3320. orderNo: record ? record.orderNo : this.props.datauser.orderNo,
  3321. },
  3322. success: function (data) {
  3323. this.setState({
  3324. loading: false,
  3325. });
  3326. let url = window.location.href.substring(7);
  3327. // console.log(data.data);
  3328. if (data.data && data.data.length) {
  3329. let thisdata = data.data[data.data.length - 1];
  3330. let obj = {
  3331. id: thisdata.id,
  3332. typeChange: thisdata.type,
  3333. totalAmount: thisdata.totalAmount,
  3334. settlementAmount: thisdata.settlementAmount,
  3335. changeAmount: thisdata.changeAmount,
  3336. remarksC: thisdata.remarks,
  3337. startRemarks: thisdata.zxsRemarks,
  3338. processState: thisdata.processState,
  3339. status: thisdata.status,
  3340. arrears: thisdata.arrears,
  3341. createTimes: thisdata.createTimes,
  3342. voucherUrl: thisdata.voucherUrl
  3343. ? splitUrl(
  3344. thisdata.voucherUrl,
  3345. ",",
  3346. globalConfig.avatarHost + "/upload",
  3347. url
  3348. )
  3349. : [],
  3350. };
  3351. this.proList(thisdata.id);
  3352. this.cuiList(thisdata.id);
  3353. this.logList(thisdata.id);
  3354. this.setState({
  3355. //判断是否有合同变更记录
  3356. isJilu: true,
  3357. detailChange: obj,
  3358. });
  3359. }
  3360. }.bind(this),
  3361. });
  3362. },
  3363. showConfirm(fn, record) {
  3364. confirm({
  3365. title: "确定删除此项目吗?",
  3366. content: (
  3367. <span style={{ color: "red" }}>
  3368. 删除后会将该项目下的所有催款节点自动清除!!!
  3369. </span>
  3370. ),
  3371. onOk() {
  3372. fn(record);
  3373. },
  3374. onCancel() {},
  3375. });
  3376. },
  3377. changeAddPro() {
  3378. this.setState({
  3379. changeVisible: true,
  3380. gid: "",
  3381. customerArr: [],
  3382. commodityName: "",
  3383. commodityQuantity: "",
  3384. commodityId: "",
  3385. taskComment: "",
  3386. main: undefined,
  3387. commodityPrice: "",
  3388. displayFees: "none",
  3389. officialCost: "",
  3390. costReduction: "",
  3391. });
  3392. },
  3393. changeProSubmit() {
  3394. if (this.state.gid == undefined || !this.state.gid) {
  3395. message.warning("服务名称不匹配!");
  3396. return false;
  3397. }
  3398. if (this.state.displayFees==='block') {
  3399. if(this.state.officialCost===''){
  3400. message.warning("请选择官费!");
  3401. return false;
  3402. }
  3403. if (this.state.costReduction==='') {
  3404. message.warning("请选择费减!");
  3405. return false;
  3406. }
  3407. }
  3408. if (!this.state.commodityPrice) {
  3409. message.warning("请输入金额!");
  3410. this.refs.commodityPrice.focus();
  3411. return false;
  3412. }
  3413. let reg = /^([0]|[1-9][0-9]*)$/;
  3414. if (
  3415. !this.state.commodityQuantity ||
  3416. !reg.test(this.state.commodityQuantity)
  3417. ) {
  3418. message.warning("请输入正确商品数量!");
  3419. this.refs.commodityQuantity.focus();
  3420. return false;
  3421. }
  3422. if (!this.state.main) {
  3423. message.warning("请选择是否为主要项目!");
  3424. this.refs.commodityQuantity.focus();
  3425. return false;
  3426. }
  3427. this.setState({
  3428. loading: true,
  3429. });
  3430. let type = 0;
  3431. if (this.state.typeChange == 4 || this.state.typeChange == 5) {
  3432. type = 1;
  3433. }
  3434. $.ajax({
  3435. method: "post",
  3436. dataType: "json",
  3437. crossDomain: false,
  3438. url: globalConfig.context + "/api/admin/orderChange/addChangeTask",
  3439. data: {
  3440. commodityId: this.state.gid, //商品ID
  3441. orderNo: this.props.datauser.orderNo, //订单编号
  3442. commodityName: this.state.commodityName, //商品名称
  3443. commodityQuantity: this.state.commodityQuantity, //商品数量
  3444. commodityPrice: this.state.commodityPrice, //签单总价
  3445. taskComment: this.state.taskComment, //服务说明
  3446. main: this.state.main, //是否为主要项目
  3447. cid: this.state.changeId, //变更ID
  3448. officialCost: this.state.displayFees==='block' ? this.state.officialCost : '', //是否有官费
  3449. costReduction: this.state.displayFees==='block' ?this.state.costReduction : '', //是否有费减
  3450. type,
  3451. },
  3452. success: function (data) {
  3453. let theArr = [];
  3454. if (data.error && data.error.length) {
  3455. message.warning(data.error[0].message);
  3456. } else {
  3457. message.success("保存成功");
  3458. this.nextCancel();
  3459. this.proList();
  3460. }
  3461. }.bind(this),
  3462. }).always(
  3463. function () {
  3464. this.setState({
  3465. loading: false,
  3466. });
  3467. }.bind(this)
  3468. );
  3469. },
  3470. changeDeletePro(record) {
  3471. this.setState({
  3472. loading: true,
  3473. });
  3474. $.ajax({
  3475. method: "post",
  3476. dataType: "json",
  3477. crossDomain: false,
  3478. url: globalConfig.context + "/api/admin/orderChange/updateChangeTask",
  3479. data: {
  3480. id: record.id,
  3481. type: 3,
  3482. tid: record.tid,
  3483. splitStatus: record.splitStatus,
  3484. },
  3485. success: function (data) {
  3486. let theArr = [];
  3487. if (data.error && data.error.length) {
  3488. message.warning(data.error[0].message);
  3489. } else {
  3490. message.success("删除成功");
  3491. this.proList();
  3492. this.cuiList();
  3493. }
  3494. }.bind(this),
  3495. }).always(
  3496. function () {
  3497. this.setState({
  3498. loading: false,
  3499. });
  3500. }.bind(this)
  3501. );
  3502. },
  3503. //点击新增变更催款节点
  3504. changeAddCui() {
  3505. this.state.cuiDataSource.push({
  3506. key: this.state.cuiDataSource.length,
  3507. money: "",
  3508. dunSubject: undefined,
  3509. orderNo: this.state.orderNo,
  3510. dunTarget: this.state.kehuId,
  3511. });
  3512. this.setState({
  3513. cuiDataSource: this.state.cuiDataSource,
  3514. cuiFlag: true,
  3515. });
  3516. },
  3517. //删除变更收款节点
  3518. changeDeleteCui(index) {
  3519. if (index.id) {
  3520. this.state.cuiDataSource.splice(index.id, 1);
  3521. this.setState({
  3522. contactListNew: this.state.cuiDataSource,
  3523. cuiFlag: false,
  3524. addFlag: false,
  3525. boFlag: false,
  3526. });
  3527. $.ajax({
  3528. url: globalConfig.context + "/api/admin/orderChange/updateChangeDun",
  3529. method: "post",
  3530. data: {
  3531. id: index.id,
  3532. type: 3,
  3533. tid: index.tid,
  3534. did: index.did,
  3535. },
  3536. }).done(
  3537. function (data) {
  3538. this.setState({
  3539. loading: false,
  3540. });
  3541. if (!data.error.length) {
  3542. message.success("删除成功!");
  3543. this.setState({
  3544. cuiFlag: false,
  3545. });
  3546. this.cuiList();
  3547. this.proList();
  3548. } else {
  3549. message.warning(data.error[0].message);
  3550. }
  3551. }.bind(this)
  3552. );
  3553. } else {
  3554. this.state.cuiDataSource.splice(index.key, 1);
  3555. this.setState({
  3556. cuiDataSource: this.state.cuiDataSource,
  3557. cuiFlag: false,
  3558. addFlag: false,
  3559. boFlag: false,
  3560. });
  3561. }
  3562. },
  3563. changeSaveCui(record) {
  3564. if (record.dunType == 0) {
  3565. if (!record.customizeTimes) {
  3566. message.warning("请输入自定义时间");
  3567. return;
  3568. } else if (!record.customizeName) {
  3569. message.warning("请输入自定义科目");
  3570. return;
  3571. }
  3572. }
  3573. if (record.boStatus == "false") {
  3574. record.boStatus = false;
  3575. } else if (record.boStatus == "true") {
  3576. record.boStatus = true;
  3577. }
  3578. if (!this.state.yearFlag) {
  3579. if (!record.effectiveCount) {
  3580. message.warning("请选择服务年限");
  3581. return;
  3582. }
  3583. } else {
  3584. record.effectiveCount = "";
  3585. }
  3586. if (record.money == "") {
  3587. message.warning("请填写金额");
  3588. return;
  3589. }
  3590. if (record.boStatus) {
  3591. if (
  3592. typeof +record.money == "number" &&
  3593. +record.money >= 0 &&
  3594. +record.money <= 1
  3595. ) {
  3596. record.appropriationRatio = record.money;
  3597. } else {
  3598. message.warning("金额比例填写错误,比例范围0~1");
  3599. return;
  3600. }
  3601. }
  3602. if (!record.dunType && record.dunType != 0) {
  3603. message.warning("请选择对应科目");
  3604. return;
  3605. }
  3606. if (record.dunType != 1) {
  3607. record.waitDay = "";
  3608. }
  3609. this.setState({
  3610. loading: true,
  3611. });
  3612. if (record.boStatus) {
  3613. $.ajax({
  3614. url: globalConfig.context + "/api/admin/orderChange/addChangeDun",
  3615. method: "post",
  3616. data: {
  3617. orderNo: record.orderNo,
  3618. ctid: record.ctid,
  3619. projectType: record.sort,
  3620. dunType: record.dunType,
  3621. appropriationRatio: record.appropriationRatio,
  3622. waitDay: record.waitDay,
  3623. effectiveCount: record.effectiveCount,
  3624. cid: this.state.changeId, //变更ID
  3625. customizeTimes:
  3626. record.dunType == 0 ? record.customizeTimes : undefined,
  3627. customizeName:
  3628. record.dunType == 0 ? record.customizeName : undefined,
  3629. },
  3630. }).done(
  3631. function (data) {
  3632. this.setState({
  3633. loading: false,
  3634. });
  3635. if (!data.error.length) {
  3636. message.success("保存成功!");
  3637. this.setState({
  3638. cuiFlag: false,
  3639. boFlag: false,
  3640. addFlag: false,
  3641. });
  3642. this.cuiList();
  3643. } else {
  3644. message.warning(data.error[0].message);
  3645. }
  3646. }.bind(this)
  3647. );
  3648. } else {
  3649. $.ajax({
  3650. url: globalConfig.context + "/api/admin/orderChange/addChangeDun",
  3651. method: "post",
  3652. data: {
  3653. orderNo: record.orderNo,
  3654. ctid: record.ctid,
  3655. projectType: record.sort,
  3656. dunType: record.dunType,
  3657. money: record.money,
  3658. waitDay: record.waitDay,
  3659. effectiveCount: record.effectiveCount,
  3660. cid: this.state.changeId, //变更ID
  3661. customizeTimes:
  3662. record.dunType == 0 ? record.customizeTimes : undefined,
  3663. customizeName:
  3664. record.dunType == 0 ? record.customizeName : undefined,
  3665. },
  3666. }).done(
  3667. function (data) {
  3668. this.setState({
  3669. loading: false,
  3670. });
  3671. if (!data.error.length) {
  3672. message.success("保存成功!");
  3673. this.setState({
  3674. cuiFlag: false,
  3675. boFlag: false,
  3676. addFlag: false,
  3677. });
  3678. this.cuiList();
  3679. } else {
  3680. message.warning(data.error[0].message);
  3681. }
  3682. }.bind(this)
  3683. );
  3684. }
  3685. },
  3686. submitChange() {
  3687. if (
  3688. this.state.typeChange == undefined ||
  3689. (this.state.typeChange == "" && this.state.typeChange != 0)
  3690. ) {
  3691. message.warning("请选择变更类型");
  3692. return false;
  3693. }
  3694. if (
  3695. this.state.typeChange == 0 ||
  3696. this.state.typeChange == 1 ||
  3697. this.state.typeChange == 3
  3698. ) {
  3699. if (this.state.settlementAmount < this.state.changeAmount) {
  3700. message.warning("退款金额大于已收款金额");
  3701. return;
  3702. }
  3703. }
  3704. if (this.state.processStatus != 5 && this.state.processStatus != 6) {
  3705. message.warning("当前订单流程不能发起变更!");
  3706. return false;
  3707. }
  3708. if (this.state.changeAmount === "") {
  3709. message.warning("申请退款金额不能为空!");
  3710. return false;
  3711. }
  3712. if (this.state.remarksC == "") {
  3713. message.warning("请正确填写变更原因");
  3714. return false;
  3715. }
  3716. if (this.state.startRemarks == "") {
  3717. message.warning("请正确填写备注信息");
  3718. return false;
  3719. }
  3720. let theorgCodeUrl = [];
  3721. if (this.state.voucherUrl.length) {
  3722. let picArr = [];
  3723. this.state.voucherUrl.map(function (item) {
  3724. if (
  3725. item.response &&
  3726. item.response.data &&
  3727. item.response.data.length
  3728. ) {
  3729. picArr.push(item.response.data);
  3730. }
  3731. });
  3732. theorgCodeUrl = picArr.join(",");
  3733. }
  3734. this.setState({
  3735. loading: true,
  3736. });
  3737. $.ajax({
  3738. url: globalConfig.context + "/api/admin/orderChange/updateOrderChange",
  3739. method: "post",
  3740. data: {
  3741. id: this.state.changeId,
  3742. changeType: 0,
  3743. orderNo: this.state.orderNo, //订单编号
  3744. processState: 0,
  3745. startRemarks: this.state.startRemarks,
  3746. remarks: this.state.remarksC,
  3747. voucherUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
  3748. totalAmount: this.state.totalAmount,
  3749. settlementAmount: this.state.settlementAmount,
  3750. changeAmount: this.state.changeAmount,
  3751. applicant: this.state.salesmanName,
  3752. depName: this.state.depName,
  3753. type: this.state.typeChange,
  3754. },
  3755. }).done(
  3756. function (data) {
  3757. if (!data.error.length) {
  3758. this.setState({
  3759. loading: false,
  3760. });
  3761. message.success("发起变更成功");
  3762. this.handleCancelclose();
  3763. } else {
  3764. message.warning(data.error[0].message);
  3765. this.setState({
  3766. loading: false,
  3767. });
  3768. }
  3769. }.bind(this)
  3770. );
  3771. },
  3772. editCui(record) {
  3773. this.setState({
  3774. editCuiVisible: true,
  3775. editCuiMoney: record.money,
  3776. editCuiTid: record.tid,
  3777. editCuiDid: record.did,
  3778. editCuiId: record.id,
  3779. });
  3780. },
  3781. editPro(record) {
  3782. this.setState({
  3783. editProVisible: true,
  3784. editSplitStatus: record.splitStatus,
  3785. editProMoney: record.commodityPrice,
  3786. editProCommodityQuantity: record.commodityQuantity,
  3787. editProTid: record.tid,
  3788. editProId: record.id,
  3789. });
  3790. },
  3791. submitEditCui() {
  3792. this.setState({
  3793. loading: true,
  3794. });
  3795. $.ajax({
  3796. url: globalConfig.context + "/api/admin/orderChange/updateChangeDun",
  3797. method: "post",
  3798. data: {
  3799. id: this.state.editCuiId,
  3800. type: this.state.editCuiDid ? 2 : 1,
  3801. money: this.state.editCuiMoney,
  3802. tid: this.state.editCuiTid,
  3803. },
  3804. }).done(
  3805. function (data) {
  3806. this.setState({
  3807. loading: false,
  3808. });
  3809. if (!data.error.length) {
  3810. message.success("修改成功!");
  3811. this.cuiList();
  3812. this.proList();
  3813. this.setState({
  3814. editCuiVisible: false,
  3815. });
  3816. } else {
  3817. message.warning(data.error[0].message);
  3818. }
  3819. }.bind(this)
  3820. );
  3821. },
  3822. submitEditPro() {
  3823. this.setState({
  3824. loading: true,
  3825. });
  3826. $.ajax({
  3827. url: globalConfig.context + "/api/admin/orderChange/updateChangeTask",
  3828. method: "post",
  3829. data: {
  3830. id: this.state.editProId,
  3831. type: this.state.editProTid ? 2 : 1,
  3832. commodityPrice: this.state.editProMoney,
  3833. commodityQuantity: this.state.editProCommodityQuantity,
  3834. tid: this.state.editProTid,
  3835. },
  3836. }).done(
  3837. function (data) {
  3838. this.setState({
  3839. loading: false,
  3840. });
  3841. if (!data.error.length) {
  3842. message.success("修改成功!");
  3843. this.cuiList();
  3844. this.proList();
  3845. this.setState({
  3846. editProVisible: false,
  3847. });
  3848. } else {
  3849. message.warning(data.error[0].message);
  3850. }
  3851. }.bind(this)
  3852. );
  3853. },
  3854. downImg() {
  3855. let num = 0;
  3856. for (let i = 0; i < this.state.orgCodeUrl.length; i++) {
  3857. if (this.state.orgCodeUrl[i].url == this.state.previewImage) {
  3858. num = i;
  3859. }
  3860. }
  3861. if (num == this.state.orgCodeUrl.length - 1) {
  3862. return message.warning("已经是最后一张了哦");
  3863. }
  3864. this.state.previewImage = this.state.orgCodeUrl[num + 1].url;
  3865. this.setState({
  3866. previewImage: this.state.previewImage,
  3867. rotateDeg: 0,
  3868. });
  3869. },
  3870. upImg() {
  3871. let num = 0;
  3872. for (let i = 0; i < this.state.orgCodeUrl.length; i++) {
  3873. if (this.state.orgCodeUrl[i].url == this.state.previewImage) {
  3874. num = i;
  3875. }
  3876. }
  3877. if (num == 0) {
  3878. return message.warning("已经是第一张了哦");
  3879. }
  3880. this.state.previewImage = this.state.orgCodeUrl[num - 1].url;
  3881. this.setState({
  3882. previewImage: this.state.previewImage,
  3883. rotateDeg: 0,
  3884. });
  3885. },
  3886. rotate() {
  3887. let rotateDeg = this.state.rotateDeg + 90;
  3888. this.setState({
  3889. rotateDeg,
  3890. });
  3891. },
  3892. downImgs() {
  3893. let num = 0;
  3894. for (let i = 0; i < this.state.replenishUrl.length; i++) {
  3895. if (this.state.replenishUrl[i].url == this.state.previewImage) {
  3896. num = i;
  3897. }
  3898. }
  3899. if (num == this.state.replenishUrl.length - 1) {
  3900. return message.warning("已经是最后一张了哦");
  3901. }
  3902. this.state.previewImage = this.state.replenishUrl[num + 1].url;
  3903. this.setState({
  3904. previewImage: this.state.previewImage,
  3905. rotateDeg: 0,
  3906. });
  3907. },
  3908. upImgs() {
  3909. let num = 0;
  3910. for (let i = 0; i < this.state.replenishUrl.length; i++) {
  3911. if (this.state.replenishUrl[i].url == this.state.previewImage) {
  3912. num = i;
  3913. }
  3914. }
  3915. if (num == 0) {
  3916. return message.warning("已经是第一张了哦");
  3917. }
  3918. this.state.previewImage = this.state.replenishUrl[num - 1].url;
  3919. this.setState({
  3920. previewImage: this.state.previewImage,
  3921. rotateDeg: 0,
  3922. });
  3923. },
  3924. rotates() {
  3925. let rotateDeg = this.state.rotateDeg + 90;
  3926. this.setState({
  3927. rotateDeg,
  3928. });
  3929. },
  3930. render() {
  3931. const expandedRowRender = (e) => {
  3932. const data = e.list;
  3933. data.forEach((item) => {
  3934. item.key = item.id;
  3935. });
  3936. let columns = [];
  3937. if (e.list instanceof Array && e.list.length) {
  3938. columns = [
  3939. {
  3940. title: "变更状态",
  3941. dataIndex: "type",
  3942. key: "type",
  3943. render: (text, record) => {
  3944. let str = "";
  3945. let color = "";
  3946. if (text == 1) {
  3947. str = "增";
  3948. color = "#87d068";
  3949. } else if (text == 2) {
  3950. str = "改";
  3951. color = "#108ee9";
  3952. } else if (text == 3) {
  3953. str = "删";
  3954. color = "#f50";
  3955. }
  3956. return (
  3957. <span>
  3958. <Tag
  3959. color={color}
  3960. style={{ display: text == 0 ? "none" : "inline-block" }}
  3961. >
  3962. {str}
  3963. </Tag>
  3964. {record.splitStatus == 1 ? (
  3965. <Tag
  3966. color="#108ee9"
  3967. // onClick={e => {
  3968. // e.stopPropagation();
  3969. // this.showRes(record);
  3970. // }}
  3971. >
  3972. 父项目
  3973. </Tag>
  3974. ) : (
  3975. ""
  3976. )}
  3977. {record.splitStatus == 2 ? (
  3978. <Tag
  3979. color="#108ee9"
  3980. // onClick={e => {
  3981. // e.stopPropagation();
  3982. // this.showRes(record);
  3983. // }}
  3984. >
  3985. 子项目
  3986. </Tag>
  3987. ) : (
  3988. ""
  3989. )}
  3990. </span>
  3991. );
  3992. },
  3993. },
  3994. {
  3995. title: "业务项目名称",
  3996. dataIndex: "commodityName",
  3997. key: "commodityName",
  3998. render: (text, record) => {
  3999. return text + "-" + record.id;
  4000. },
  4001. },
  4002. {
  4003. title: "项目类别",
  4004. dataIndex: "cname",
  4005. key: "cname",
  4006. },
  4007. {
  4008. title: "项目数量",
  4009. dataIndex: "commodityQuantity",
  4010. key: "commodityQuantity",
  4011. },
  4012. {
  4013. title: "金额(万元)",
  4014. dataIndex: "commodityPrice",
  4015. key: "commodityPrice",
  4016. render: (text, record) => {
  4017. if (record.splitStatus == 2) {
  4018. return "/";
  4019. } else {
  4020. return text;
  4021. }
  4022. },
  4023. },
  4024. {
  4025. title: "主要项目",
  4026. dataIndex: "main",
  4027. key: "main",
  4028. render: (text) => {
  4029. return text ? "是" : "否";
  4030. },
  4031. },
  4032. {
  4033. title: "项目负责人",
  4034. dataIndex: "receiverName",
  4035. key: "receiverName",
  4036. },
  4037. {
  4038. title: "项目说明",
  4039. dataIndex: "taskComment",
  4040. key: "taskComment",
  4041. render: (text) => {
  4042. return text && text.length > 8 ? text.substr(0, 8) + "…" : text;
  4043. },
  4044. },
  4045. {
  4046. title: "操作",
  4047. dataIndex: "ABC",
  4048. key: "ABC",
  4049. render: (text, record) => {
  4050. return (
  4051. <div>
  4052. <Button
  4053. onClick={(e) => {
  4054. e.stopPropagation();
  4055. this.showConfirm(this.changeDeletePro, record);
  4056. }}
  4057. disabled={this.state.listFlag}
  4058. style={{
  4059. display: this.state.displayList ? "none" : "block",
  4060. }}
  4061. >
  4062. 删除
  4063. </Button>
  4064. </div>
  4065. );
  4066. },
  4067. },
  4068. ];
  4069. return (
  4070. <Table
  4071. columns={columns}
  4072. scroll={{ x: "max-content", y: 0 }}
  4073. dataSource={data}
  4074. pagination={false}
  4075. onRowDoubleClick={this.state.listFlag ? this.not : this.editPro}
  4076. />
  4077. );
  4078. } else {
  4079. columns = [];
  4080. return (
  4081. <p
  4082. style={{ fontWeight: "bold", color: "red", textAlign: "center" }}
  4083. >
  4084. 此项目暂未拆分
  4085. </p>
  4086. );
  4087. }
  4088. };
  4089. const expandedRowRenderDetail = (e) => {
  4090. const data = e.list;
  4091. data.forEach((item) => {
  4092. item.key = item.id;
  4093. });
  4094. let columns = [];
  4095. if (e.list instanceof Array && e.list.length) {
  4096. columns = [
  4097. {
  4098. title: "变更状态",
  4099. dataIndex: "type",
  4100. key: "type",
  4101. render: (text, record) => {
  4102. let str = "";
  4103. let color = "";
  4104. if (text == 1) {
  4105. str = "增";
  4106. color = "#87d068";
  4107. } else if (text == 2) {
  4108. str = "改";
  4109. color = "#108ee9";
  4110. } else if (text == 3) {
  4111. str = "删";
  4112. color = "#f50";
  4113. }
  4114. return (
  4115. <span>
  4116. <Tag
  4117. color={color}
  4118. style={{ display: text == 0 ? "none" : "inline-block" }}
  4119. >
  4120. {str}
  4121. </Tag>
  4122. {record.splitStatus == 1 ? (
  4123. <Tag
  4124. color="#108ee9"
  4125. // onClick={e => {
  4126. // e.stopPropagation();
  4127. // this.showRes(record);
  4128. // }}
  4129. >
  4130. 父项目
  4131. </Tag>
  4132. ) : (
  4133. ""
  4134. )}
  4135. {record.splitStatus == 2 ? (
  4136. <Tag
  4137. color="#108ee9"
  4138. // onClick={e => {
  4139. // e.stopPropagation();
  4140. // this.showRes(record);
  4141. // }}
  4142. >
  4143. 子项目
  4144. </Tag>
  4145. ) : (
  4146. ""
  4147. )}
  4148. </span>
  4149. );
  4150. },
  4151. },
  4152. {
  4153. title: "业务项目名称",
  4154. dataIndex: "commodityName",
  4155. key: "commodityName",
  4156. },
  4157. {
  4158. title: "项目类别",
  4159. dataIndex: "cname",
  4160. key: "cname",
  4161. },
  4162. {
  4163. title: "项目数量",
  4164. dataIndex: "commodityQuantity",
  4165. key: "commodityQuantity",
  4166. },
  4167. {
  4168. title: "金额(万元)",
  4169. dataIndex: "commodityPrice",
  4170. key: "commodityPrice",
  4171. render: (text, record) => {
  4172. if (record.splitStatus == 2) {
  4173. return "/";
  4174. } else {
  4175. return text;
  4176. }
  4177. },
  4178. },
  4179. {
  4180. title: "主要项目",
  4181. dataIndex: "main",
  4182. key: "main",
  4183. render: (text) => {
  4184. return text ? "是" : "否";
  4185. },
  4186. },
  4187. {
  4188. title: "项目负责人",
  4189. dataIndex: "receiverName",
  4190. key: "receiverName",
  4191. },
  4192. {
  4193. title: "项目说明",
  4194. dataIndex: "taskComment",
  4195. key: "taskComment",
  4196. render: (text) => {
  4197. return text && text.length > 8 ? text.substr(0, 8) + "…" : text;
  4198. },
  4199. },
  4200. ];
  4201. return (
  4202. <Table
  4203. columns={columns}
  4204. scroll={{ x: "max-content", y: 0 }}
  4205. dataSource={data}
  4206. pagination={false}
  4207. />
  4208. );
  4209. } else {
  4210. columns = [];
  4211. return (
  4212. <p
  4213. style={{ fontWeight: "bold", color: "red", textAlign: "center" }}
  4214. >
  4215. 此项目暂未拆分
  4216. </p>
  4217. );
  4218. }
  4219. };
  4220. const FormItem = Form.Item;
  4221. const { TabPane } = Tabs;
  4222. const { TextArea } = Input;
  4223. const formItemLayout = {
  4224. labelCol: { span: 8 },
  4225. wrapperCol: { span: 14 },
  4226. };
  4227. const contractData = this.state.contractData;
  4228. const formItemList = [
  4229. {
  4230. label: "企业联系人",
  4231. content: <span>{this.state.contacts}</span>,
  4232. },
  4233. {
  4234. label: "联系人电话",
  4235. content: <span>{this.state.contactMobile}</span>,
  4236. },
  4237. {
  4238. label: "企业法人",
  4239. content: <span>{this.state.legalPerson}</span>,
  4240. },
  4241. {
  4242. label: "法人电话",
  4243. content: <span>{this.state.legalPersonTel}</span>,
  4244. },
  4245. // {
  4246. // label: "签单金额(万元)",
  4247. // content: <span>{this.state.totalAmount}</span>
  4248. // },
  4249. // {
  4250. // label: "首付金额(万元)",
  4251. // content: <span>{this.state.firstAmount}</span>
  4252. // },
  4253. // {
  4254. // label: "特批立项",
  4255. // content: <span>{getApprovedState(this.state.approval)}</span>
  4256. // },
  4257. // {
  4258. // label: "合同签订时间",
  4259. // content: <span>{this.state.signDate}</span>
  4260. // },
  4261. // {
  4262. // label: "订单部门",
  4263. // content: <span>{this.state.depName}</span>
  4264. // }
  4265. ];
  4266. const dataSources = this.state.customerArr || [];
  4267. const cuiDataList = this.state.contactList || [];
  4268. let departmentArr = this.state.departmentArr || [];
  4269. const options = this.state.states
  4270. ? dataSources.map((group) => (
  4271. <Select.Option key={group.id} value={group.name}>
  4272. {group.name}
  4273. </Select.Option>
  4274. ))
  4275. : dataSources.map((group, index) => (
  4276. <Select.Option key={index} value={group.bname}>
  4277. {group.bname}
  4278. </Select.Option>
  4279. ));
  4280. return (
  4281. <div>
  4282. {this.state.resVisible ? (
  4283. <ResolutionDetail
  4284. cancel={this.resCancel}
  4285. detail={this.state.resRecord}
  4286. visible={this.state.resVisible}
  4287. id={this.state.resRecord.orderNo}
  4288. />
  4289. ) : (
  4290. ""
  4291. )}
  4292. <Modal
  4293. maskClosable={false}
  4294. visible={this.state.visible}
  4295. onOk={this.handleOk}
  4296. onCancel={this.handleCancelclose}
  4297. width={!this.props.userDetaile ? "600px" : "900px"}
  4298. title={!this.props.userDetaile ? "创建订单" : ""}
  4299. footer=""
  4300. // width={1300}
  4301. className="admin-desc-content"
  4302. >
  4303. <Form
  4304. layout="horizontal"
  4305. onSubmit={this.handleSubmit}
  4306. // id="demand-form"
  4307. style={{ paddingBottom: "40px" }}
  4308. >
  4309. <Spin spinning={this.state.loading}>
  4310. <div className="clearfix">
  4311. {!this.props.userDetaile ? (
  4312. <div className="clearfix">
  4313. <div className="clearfix">
  4314. <FormItem {...formItemLayout} label="订单类型">
  4315. <Select
  4316. placeholder="请选择订单类型"
  4317. style={{ width: "200px" }}
  4318. value={this.state.orderType}
  4319. onChange={(e) => {
  4320. this.setState({ orderType: e });
  4321. }}
  4322. >
  4323. {orderTypes.map(function (item) {
  4324. return (
  4325. <Select.Option key={item.value}>
  4326. {item.key}
  4327. </Select.Option>
  4328. );
  4329. })}
  4330. </Select>
  4331. <span className="mandatory">*</span>
  4332. </FormItem>
  4333. </div>
  4334. <FormItem {...formItemLayout} label="客户所属类型">
  4335. <Select
  4336. placeholder="请选择客户所属类型"
  4337. style={{ width: "200px" }}
  4338. value={this.state.customType}
  4339. onChange={(e) => {
  4340. this.setState({ customType: e });
  4341. }}
  4342. >
  4343. {customerType.map(function (item) {
  4344. return (
  4345. <Select.Option key={item.value}>
  4346. {item.key}
  4347. </Select.Option>
  4348. );
  4349. })}
  4350. </Select>
  4351. </FormItem>
  4352. <div className="clearfix">
  4353. <FormItem {...formItemLayout} label="客户名称">
  4354. <AutoComplete
  4355. className="certain-category-search"
  4356. dropdownClassName="certain-category-search-dropdown"
  4357. dropdownMatchSelectWidth={false}
  4358. dropdownStyle={{ width: 200 }}
  4359. size="large"
  4360. style={{ width: "200px" }}
  4361. dataSource={options}
  4362. placeholder="输入名称"
  4363. value={this.state.customerName}
  4364. onChange={this.customerChange}
  4365. filterOption={true}
  4366. onSelect={this.selectAutoCUT}
  4367. >
  4368. <Input />
  4369. </AutoComplete>
  4370. <span className="mandatory">*</span>
  4371. </FormItem>
  4372. </div>
  4373. <div className="addSave" style={{ marginTop: "15px" }}>
  4374. <Button
  4375. className="cancel"
  4376. type="primary"
  4377. onClick={this.handleCancel}
  4378. style={{ marginLeft: "150px" }}
  4379. htmlType="submit"
  4380. >
  4381. 开单
  4382. </Button>
  4383. <Button
  4384. className="cancel"
  4385. type="ghost"
  4386. onClick={this.handleCancelclose}
  4387. style={{ marginLeft: "50px" }}
  4388. >
  4389. 取消
  4390. </Button>
  4391. </div>
  4392. </div>
  4393. ) : (
  4394. <Tabs
  4395. onChange={this.callback}
  4396. activeKey={this.state.activeKey}
  4397. >
  4398. <TabPane tab={"最新订单"} key="1">
  4399. <div className="clearfix">
  4400. <div className="clearfix">
  4401. <FormItem
  4402. className="half-item"
  4403. {...formItemLayout}
  4404. label="合同编号"
  4405. >
  4406. {<span>{this.state.contractNo}</span>}
  4407. </FormItem>
  4408. <FormItem
  4409. className="half-item"
  4410. {...formItemLayout}
  4411. label="订单编号"
  4412. >
  4413. <span>{this.state.orderNo}</span>
  4414. </FormItem>
  4415. <FormItem
  4416. className="half-item"
  4417. {...formItemLayout}
  4418. label="流程状态"
  4419. >
  4420. <span>
  4421. {getProcessStatus(this.state.processStatus)}
  4422. </span>
  4423. </FormItem>
  4424. <FormItem
  4425. className="half-item"
  4426. {...formItemLayout}
  4427. label="结算状态"
  4428. >
  4429. <span>
  4430. {getLiquidationStatus(
  4431. this.state.liquidationStatus
  4432. )}
  4433. </span>
  4434. </FormItem>
  4435. {this.state.processStatus === 0 ? (
  4436. <div className="clearfix">
  4437. <FormItem
  4438. className="half-item"
  4439. {...formItemLayout}
  4440. label="特批立项"
  4441. >
  4442. <Select
  4443. placeholder="请选择客户所属类型"
  4444. style={{ width: "240px" }}
  4445. value={getApprovedState(
  4446. this.state.approval
  4447. )}
  4448. onChange={(e) => {
  4449. this.setState({ approval: e });
  4450. }}
  4451. >
  4452. {/* {tepi.map(function(item) {
  4453. // if(item.key == "特批通过" || item.key == "特批驳回")
  4454. return (
  4455. <Select.Option key={item.value}>
  4456. {item.key}
  4457. </Select.Option>
  4458. );
  4459. })} */}
  4460. <Select.Option key={0}>
  4461. 非特批
  4462. </Select.Option>
  4463. <Select.Option key={1}>特批</Select.Option>
  4464. </Select>
  4465. </FormItem>
  4466. <FormItem
  4467. className="half-item"
  4468. {...formItemLayout}
  4469. label="合同签订时间"
  4470. >
  4471. <DatePicker
  4472. style={{
  4473. marginTop: "2px",
  4474. // width: "240px",
  4475. height: "32px",
  4476. }}
  4477. showTime
  4478. format="YYYY-MM-DD"
  4479. onOk={() => {}}
  4480. value={
  4481. this.state.signDate
  4482. ? moment(this.state.signDate)
  4483. : null
  4484. }
  4485. onChange={(data, dataString) => {
  4486. this.setState({ signDate: dataString });
  4487. }}
  4488. />
  4489. <span
  4490. className="mandatory"
  4491. style={{ marginLeft: 20 }}
  4492. >
  4493. *
  4494. </span>
  4495. </FormItem>
  4496. <FormItem
  4497. className="half-item"
  4498. {...formItemLayout}
  4499. label="订单部门"
  4500. >
  4501. <Select
  4502. placeholder="请输入订单部门"
  4503. style={{ width: 240 }}
  4504. value={this.state.organizationSearch}
  4505. onChange={(e) => {
  4506. this.setState({ organizationSearch: e });
  4507. }}
  4508. >
  4509. {departmentArr.map(function (item) {
  4510. return (
  4511. <Select.Option key={item.id}>
  4512. {item.name}
  4513. </Select.Option>
  4514. );
  4515. })}
  4516. </Select>
  4517. </FormItem>
  4518. </div>
  4519. ) : (
  4520. <div className="clearfix">
  4521. <FormItem
  4522. className="half-item"
  4523. {...formItemLayout}
  4524. label="特批立项"
  4525. >
  4526. <span>
  4527. {getApprovedState(this.state.approval)}
  4528. </span>
  4529. </FormItem>
  4530. <FormItem
  4531. className="half-item"
  4532. {...formItemLayout}
  4533. label="合同签订时间"
  4534. >
  4535. <span>{this.state.signDate}</span>
  4536. </FormItem>
  4537. <FormItem
  4538. className="half-item"
  4539. {...formItemLayout}
  4540. label="订单部门"
  4541. >
  4542. <span>{this.state.depName}</span>
  4543. </FormItem>
  4544. <FormItem
  4545. className="half-item"
  4546. {...formItemLayout}
  4547. label="是否外包"
  4548. >
  4549. <span>
  4550. {this.state.outsource == 0 ? "否" : "是"}
  4551. </span>
  4552. </FormItem>
  4553. </div>
  4554. )}
  4555. </div>
  4556. <h3
  4557. style={{
  4558. marginLeft: 10,
  4559. fontWeight: 800,
  4560. marginBottom: 10,
  4561. }}
  4562. >
  4563. 收款项目
  4564. </h3>
  4565. {this.state.processStatus === 0 ? (
  4566. <div className="clearfix">
  4567. <FormItem
  4568. className="half-item"
  4569. {...formItemLayout}
  4570. label="签单金额(万元)"
  4571. >
  4572. <Input
  4573. placeholder="签单金额"
  4574. ref="signTotalAmount"
  4575. value={this.state.totalAmount}
  4576. onChange={(e) => {
  4577. this.setState({
  4578. totalAmount: e.target.value,
  4579. });
  4580. }}
  4581. style={{ width: "240px" }}
  4582. />
  4583. {/* <span className="mandatory">*</span> */}
  4584. </FormItem>
  4585. <FormItem
  4586. className="half-item"
  4587. {...formItemLayout}
  4588. label="首付金额(万元)"
  4589. >
  4590. <Input
  4591. placeholder="请输入实签首款金额"
  4592. ref="signFirstPayment"
  4593. value={this.state.firstAmount}
  4594. onChange={(e) => {
  4595. this.setState({
  4596. firstAmount: e.target.value,
  4597. });
  4598. }}
  4599. style={{ width: "240px" }}
  4600. />
  4601. {/* <span className="mandatory">*</span> */}
  4602. </FormItem>
  4603. <FormItem
  4604. className="half-item"
  4605. {...formItemLayout}
  4606. label="已收款项"
  4607. >
  4608. <span>
  4609. {this.state.settlementAmount + "万元"}
  4610. </span>
  4611. {/* {this.state.settlementAmount ? (
  4612. <Button
  4613. type="primary"
  4614. onClick={this.tuikuan}
  4615. style={{
  4616. float: "right",
  4617. marginRight: "50px",
  4618. marginBottom: "15px"
  4619. }}
  4620. >
  4621. 退单
  4622. </Button>
  4623. ) : (
  4624. ""
  4625. )} */}
  4626. </FormItem>
  4627. </div>
  4628. ) : (
  4629. <div className="clearfix">
  4630. <FormItem
  4631. className="half-item"
  4632. {...formItemLayout}
  4633. label="签单金额(万元)"
  4634. >
  4635. <span>{this.state.totalAmount}</span>
  4636. </FormItem>
  4637. <FormItem
  4638. className="half-item"
  4639. {...formItemLayout}
  4640. label="首付金额(万元)"
  4641. >
  4642. <span>{this.state.firstAmount}</span>
  4643. </FormItem>
  4644. <FormItem
  4645. className="half-item"
  4646. {...formItemLayout}
  4647. label="已收款项"
  4648. >
  4649. <span>
  4650. {this.state.settlementAmount + "万元"}
  4651. </span>
  4652. {/* {this.state.settlementAmount ? (
  4653. <Button
  4654. type="primary"
  4655. onClick={this.tuikuan}
  4656. style={{
  4657. float: "right",
  4658. marginRight: "50px",
  4659. marginBottom: "15px"
  4660. }}
  4661. >
  4662. 退单
  4663. </Button>
  4664. ) : (
  4665. ""
  4666. )} */}
  4667. </FormItem>
  4668. </div>
  4669. )}
  4670. <h3
  4671. style={{
  4672. marginLeft: 10,
  4673. fontWeight: 800,
  4674. marginBottom: 10,
  4675. }}
  4676. >
  4677. 联系信息
  4678. </h3>
  4679. {this.state.processStatus == 0 ? (
  4680. <div className="clearfix">
  4681. <div className="clearfix">
  4682. <FormItem
  4683. className="half-item"
  4684. {...formItemLayout}
  4685. label="客户名称"
  4686. >
  4687. <span>{this.state.userName}</span>
  4688. </FormItem>
  4689. </div>
  4690. <FormItem
  4691. className="half-item"
  4692. {...formItemLayout}
  4693. label="企业联系人"
  4694. >
  4695. <Input
  4696. placeholder="请输入联系人"
  4697. ref="signTotalAmount"
  4698. value={this.state.contacts}
  4699. onChange={(e) => {
  4700. this.setState({ contacts: e.target.value });
  4701. }}
  4702. style={{ width: "240px" }}
  4703. />
  4704. </FormItem>
  4705. <FormItem
  4706. className="half-item"
  4707. {...formItemLayout}
  4708. label="联系人电话"
  4709. >
  4710. <Input
  4711. placeholder="请输入联系人电话"
  4712. ref="signTotalAmount"
  4713. value={this.state.contactMobile}
  4714. onChange={(e) => {
  4715. this.setState({
  4716. contactMobile: e.target.value,
  4717. });
  4718. }}
  4719. style={{ width: "240px" }}
  4720. />
  4721. </FormItem>
  4722. <FormItem
  4723. className="half-item"
  4724. {...formItemLayout}
  4725. label="企业法人"
  4726. >
  4727. <Input
  4728. placeholder="请输入法人"
  4729. ref="signTotalAmount"
  4730. value={this.state.legalPerson}
  4731. onChange={(e) => {
  4732. this.setState({
  4733. legalPerson: e.target.value,
  4734. });
  4735. }}
  4736. style={{ width: "240px" }}
  4737. />
  4738. </FormItem>
  4739. <FormItem
  4740. className="half-item"
  4741. {...formItemLayout}
  4742. label="法人电话"
  4743. >
  4744. <Input
  4745. placeholder="请输入法人电话"
  4746. ref="signTotalAmount"
  4747. value={this.state.legalPersonTel}
  4748. onChange={(e) => {
  4749. this.setState({
  4750. legalPersonTel: e.target.value,
  4751. });
  4752. }}
  4753. style={{ width: "240px" }}
  4754. />
  4755. </FormItem>
  4756. </div>
  4757. ) : (
  4758. <div className="clearfix">
  4759. {formItemList.map((data, index) => {
  4760. return (
  4761. <FormItem
  4762. className="half-item"
  4763. {...formItemLayout}
  4764. key={index}
  4765. label={data.label}
  4766. >
  4767. {data.content}
  4768. </FormItem>
  4769. );
  4770. })}
  4771. </div>
  4772. )}
  4773. <div className="clearfix">
  4774. {this.state.processStatus == 0 ? (
  4775. <div>
  4776. <FormItem
  4777. labelCol={{ span: 4 }}
  4778. wrapperCol={{ span: 18 }}
  4779. label={
  4780. <span>
  4781. <strong style={{ color: "#f00" }}>
  4782. *
  4783. </strong>
  4784. 合同扫描件
  4785. </span>
  4786. }
  4787. >
  4788. <PicturesWall
  4789. domId={'addService1'}
  4790. fileList={this.getOrgCodeUrl}
  4791. pictureUrl={this.state.orgCodeUrl}
  4792. url="/api/admin/order/uploadOrderImg"
  4793. sign=""
  4794. />
  4795. <p>图片建议:要清晰。</p>
  4796. <Button
  4797. style={{
  4798. float: "right",
  4799. marginRight: "140px",
  4800. marginTop: "20px",
  4801. }}
  4802. onClick={this.getOrderLog}
  4803. >
  4804. 查看订单日志
  4805. </Button>
  4806. </FormItem>
  4807. <FormItem
  4808. labelCol={{ span: 4 }}
  4809. wrapperCol={{ span: 18 }}
  4810. label={<span>补充协议</span>}
  4811. >
  4812. <PicturesWall
  4813. domId={'addService2'}
  4814. fileList={this.getReplenishUrl}
  4815. pictureUrl={this.state.replenishUrl}
  4816. url="/api/admin/order/uploadOrderImg"
  4817. sign=""
  4818. />
  4819. <p>图片建议:要清晰。</p>
  4820. </FormItem>
  4821. </div>
  4822. ) : (
  4823. <div>
  4824. <FormItem
  4825. labelCol={{ span: 4 }}
  4826. wrapperCol={{ span: 18 }}
  4827. label="合同扫描件"
  4828. >
  4829. {/*<Upload*/}
  4830. {/* className="demandDetailShow-upload"*/}
  4831. {/* listType="picture-card"*/}
  4832. {/* fileList={this.state.orgCodeUrl}*/}
  4833. {/* onPreview={(file) => {*/}
  4834. {/* this.setState({*/}
  4835. {/* previewImage: file.url || file.thumbUrl,*/}
  4836. {/* previewVisible: true,*/}
  4837. {/* });*/}
  4838. {/* }}*/}
  4839. {/*/>*/}
  4840. <div style={{paddingTop:'10px',paddingBottom:'10px'}}>
  4841. {this.state.orgCodeUrl && this.state.visible && this.state.activeKey === '1'? <ImgList fileList={this.state.orgCodeUrl} ItemWidth={'96px'}/> : <div/>}
  4842. </div>
  4843. <Modal
  4844. maskClosable={false}
  4845. footer={null}
  4846. width={"50%"}
  4847. visible={this.state.previewVisible}
  4848. onCancel={() => {
  4849. this.setState({
  4850. previewVisible: false,
  4851. rotateDeg: 0,
  4852. });
  4853. }}
  4854. >
  4855. <img
  4856. alt=""
  4857. style={{
  4858. width: "100%",
  4859. transform: `rotate(${this.state.rotateDeg}deg)`,
  4860. }}
  4861. src={this.state.previewImage || ""}
  4862. />
  4863. <Button
  4864. onClick={this.rotate}
  4865. style={{
  4866. position: "relative",
  4867. left: "50%",
  4868. transform: "translateX(-50%)",
  4869. }}
  4870. >
  4871. 旋转
  4872. </Button>
  4873. <Button
  4874. onClick={this.upImg}
  4875. style={{
  4876. position: "absolute",
  4877. left: -81,
  4878. top: "50%",
  4879. transform: "translateY(-50%)",
  4880. }}
  4881. >
  4882. 上一张
  4883. </Button>
  4884. <Button
  4885. onClick={this.downImg}
  4886. style={{
  4887. position: "absolute",
  4888. right: -81,
  4889. top: "50%",
  4890. transform: "translateY(-50%)",
  4891. }}
  4892. >
  4893. 下一张
  4894. </Button>
  4895. </Modal>
  4896. <Button
  4897. style={{
  4898. float: "right",
  4899. marginRight: "140px",
  4900. marginTop: "20px",
  4901. }}
  4902. onClick={this.getOrderLog}
  4903. >
  4904. 查看订单日志
  4905. </Button>
  4906. </FormItem>
  4907. <FormItem
  4908. labelCol={{ span: 4 }}
  4909. wrapperCol={{ span: 18 }}
  4910. label="补充协议"
  4911. >
  4912. {/*<Upload*/}
  4913. {/* className="demandDetailShow-upload"*/}
  4914. {/* listType="picture-card"*/}
  4915. {/* fileList={this.state.replenishUrl}*/}
  4916. {/* onPreview={(file) => {*/}
  4917. {/* this.setState({*/}
  4918. {/* previewImage: file.url || file.thumbUrl,*/}
  4919. {/* previewVisibles: true,*/}
  4920. {/* });*/}
  4921. {/* }}*/}
  4922. {/*/>*/}
  4923. <div style={{paddingTop:'10px',paddingBottom:'10px'}}>
  4924. {
  4925. this.state.visible && this.state.activeKey === '1' && this.state.replenishUrl?
  4926. <ImgList fileList={this.state.replenishUrl} ItemWidth={'96px'}/> :
  4927. <div/>
  4928. }
  4929. </div>
  4930. <Modal
  4931. maskClosable={false}
  4932. footer={null}
  4933. width={"50%"}
  4934. visible={this.state.previewVisibles}
  4935. onCancel={() => {
  4936. this.setState({
  4937. previewVisibles: false,
  4938. rotateDeg: 0,
  4939. });
  4940. }}
  4941. >
  4942. <img
  4943. alt=""
  4944. style={{
  4945. width: "100%",
  4946. transform: `rotate(${this.state.rotateDeg}deg)`,
  4947. }}
  4948. src={this.state.previewImage || ""}
  4949. />
  4950. <Button
  4951. onClick={this.rotates}
  4952. style={{
  4953. position: "relative",
  4954. left: "50%",
  4955. transform: "translateX(-50%)",
  4956. }}
  4957. >
  4958. 旋转
  4959. </Button>
  4960. <Button
  4961. onClick={this.upImgs}
  4962. style={{
  4963. position: "absolute",
  4964. left: -81,
  4965. top: "50%",
  4966. transform: "translateY(-50%)",
  4967. }}
  4968. >
  4969. 上一张
  4970. </Button>
  4971. <Button
  4972. onClick={this.downImgs}
  4973. style={{
  4974. position: "absolute",
  4975. right: -81,
  4976. top: "50%",
  4977. transform: "translateY(-50%)",
  4978. }}
  4979. >
  4980. 下一张
  4981. </Button>
  4982. </Modal>
  4983. </FormItem>
  4984. </div>
  4985. )}
  4986. </div>
  4987. <div className="clearfix">
  4988. {this.state.processStatus == 0 ? (
  4989. <div className="clearfix">
  4990. <FormItem
  4991. labelCol={{ span: 4 }}
  4992. wrapperCol={{ span: 16 }}
  4993. label="订单留言"
  4994. >
  4995. <Input
  4996. type="textarea"
  4997. placeholder="请输入订单留言"
  4998. rows={4}
  4999. value={this.state.orderRemarks}
  5000. onChange={(e) => {
  5001. this.setState({
  5002. orderRemarks: e.target.value,
  5003. });
  5004. }}
  5005. style={{ width: "95%" }}
  5006. />
  5007. <span className="mandatory">*</span>
  5008. </FormItem>
  5009. </div>
  5010. ) : (
  5011. <FormItem
  5012. labelCol={{ span: 4 }}
  5013. wrapperCol={{ span: 16 }}
  5014. label="订单留言"
  5015. >
  5016. <p
  5017. style={{ width: 500, wordWrap: "break-word" }}
  5018. >
  5019. {this.state.orderRemarks}
  5020. </p>
  5021. </FormItem>
  5022. )}
  5023. </div>
  5024. <div className="clearfix">
  5025. <FormItem
  5026. className="half-item"
  5027. {...formItemLayout}
  5028. label="订单负责人"
  5029. >
  5030. <span>{this.state.salesmanName}</span>
  5031. </FormItem>
  5032. <FormItem
  5033. className="half-item"
  5034. {...formItemLayout}
  5035. label="订单负责人电话"
  5036. >
  5037. <span>{this.state.salesmanMobile}</span>
  5038. </FormItem>
  5039. </div>
  5040. <div className="clearfix">
  5041. <FormItem
  5042. className="half-item"
  5043. {...formItemLayout}
  5044. label="当前财务负责人"
  5045. >
  5046. <span>{this.state.nowFinance}</span>
  5047. </FormItem>
  5048. <FormItem
  5049. className="half-item"
  5050. {...formItemLayout}
  5051. label="当前财务负责人电话"
  5052. >
  5053. <span>{this.state.nowFinanceMobile}</span>
  5054. </FormItem>
  5055. </div>
  5056. <div className="clearfix">
  5057. <FormItem
  5058. className="half-item"
  5059. {...formItemLayout}
  5060. style={{ opacity: ".5" }}
  5061. label="原订单负责人"
  5062. >
  5063. <span>{this.state.oldSalesmanName}</span>
  5064. </FormItem>
  5065. <FormItem
  5066. className="half-item"
  5067. {...formItemLayout}
  5068. style={{ opacity: ".5" }}
  5069. label="原订单负责人电话"
  5070. >
  5071. <span>{this.state.oldSalesmanMobile}</span>
  5072. </FormItem>
  5073. </div>
  5074. <div className="clearfix">
  5075. <FormItem
  5076. className="half-item"
  5077. style={{ opacity: ".5" }}
  5078. {...formItemLayout}
  5079. label="实际财务操作人"
  5080. >
  5081. <span>{this.state.financeName}</span>
  5082. </FormItem>
  5083. <FormItem
  5084. className="half-item"
  5085. {...formItemLayout}
  5086. style={{ opacity: ".5" }}
  5087. label="实际财务操作人电话"
  5088. >
  5089. <span>{this.state.financeMobile}</span>
  5090. </FormItem>
  5091. </div>
  5092. <div>
  5093. <span
  5094. style={{ marginLeft: "50px", fontSize: "20px" }}
  5095. >
  5096. 项目业务
  5097. </span>
  5098. {this.state.processStatus == 0 ? (
  5099. <Button
  5100. type="primary"
  5101. onClick={this.addDetailed}
  5102. style={{
  5103. float: "right",
  5104. marginRight: "50px",
  5105. marginBottom: "15px",
  5106. }}
  5107. >
  5108. 添加项目明细
  5109. </Button>
  5110. ) : (
  5111. ""
  5112. )}
  5113. </div>
  5114. <div
  5115. className="patent-table"
  5116. style={{ marginBottom: 10 }}
  5117. >
  5118. <Spin spinning={this.state.loading}>
  5119. <Table
  5120. columns={this.state.columns}
  5121. scroll={{ x: "max-content", y: 0 }}
  5122. dataSource={this.state.dataSource}
  5123. pagination={this.state.pagination}
  5124. onRowClick={this.tableRowClick}
  5125. bordered
  5126. size="small"
  5127. />
  5128. </Spin>
  5129. </div>
  5130. <div
  5131. style={{
  5132. display: cuiDataList.length ? "block" : "none",
  5133. }}
  5134. >
  5135. <span
  5136. style={{ marginLeft: "50px", fontSize: "20px" }}
  5137. >
  5138. 旧催款节点
  5139. </span>
  5140. <Button
  5141. type="primary"
  5142. // onClick={this.addcontact}
  5143. disabled
  5144. onClick={(e) => {
  5145. cuiDataList.length
  5146. ? this.addcontact()
  5147. : this.addcontactNew();
  5148. }}
  5149. style={{
  5150. float: "right",
  5151. marginRight: "50px",
  5152. marginBottom: "15px",
  5153. display:
  5154. this.state.processStatus == 0
  5155. ? "block"
  5156. : "none",
  5157. }}
  5158. >
  5159. 添加催款节点
  5160. </Button>
  5161. </div>
  5162. <div
  5163. className="clearfix"
  5164. style={{
  5165. display: cuiDataList.length ? "block" : "none",
  5166. }}
  5167. >
  5168. <Spin spinning={this.state.loading}>
  5169. <Form layout="horizontal">
  5170. <Table
  5171. pagination={false}
  5172. columns={this.state.ContactsLists}
  5173. dataSource={this.state.contactList}
  5174. scroll={{ x: "max-content", y: 0 }}
  5175. bordered
  5176. size="small"
  5177. />
  5178. <Col
  5179. span={24}
  5180. offset={9}
  5181. style={{ marginTop: "15px" }}
  5182. ></Col>
  5183. </Form>
  5184. </Spin>
  5185. </div>
  5186. <div
  5187. style={{
  5188. display: cuiDataList.length ? "none" : "block",
  5189. }}
  5190. >
  5191. <span
  5192. style={{
  5193. marginLeft: "50px",
  5194. fontSize: "20px",
  5195. }}
  5196. >
  5197. 新催款节点
  5198. </span>
  5199. <span
  5200. style={{
  5201. display: "inline-block",
  5202. marginLeft: 10,
  5203. color: "red",
  5204. }}
  5205. >
  5206. 金额总计(万元): {this.state.totalCui}
  5207. </span>
  5208. <Button
  5209. type="primary"
  5210. disabled={this.state.addFlag ? true : false}
  5211. // onClick={this.addcontact}
  5212. onClick={(e) => {
  5213. this.setState({ addFlag: true });
  5214. this.addcontactNew();
  5215. }}
  5216. style={{
  5217. float: "right",
  5218. marginRight: "50px",
  5219. marginBottom: "15px",
  5220. display:
  5221. this.state.processStatus == 0
  5222. ? "block"
  5223. : "none",
  5224. }}
  5225. >
  5226. 添加催款节点
  5227. </Button>
  5228. </div>
  5229. <div
  5230. className="clearfix"
  5231. style={{
  5232. display: cuiDataList.length ? "none" : "block",
  5233. }}
  5234. >
  5235. <Spin spinning={this.state.loading}>
  5236. <Form layout="horizontal">
  5237. <Table
  5238. pagination={false}
  5239. columns={this.state.ContactsListsNew}
  5240. dataSource={this.state.contactListNew}
  5241. scroll={{ x: "max-content", y: 0 }}
  5242. bordered
  5243. size="small"
  5244. />
  5245. <Col
  5246. span={24}
  5247. offset={9}
  5248. style={{ marginTop: "15px" }}
  5249. ></Col>
  5250. </Form>
  5251. </Spin>
  5252. </div>
  5253. {this.state.processStatus == 0 ? (
  5254. <div
  5255. className="addSave"
  5256. style={{ marginTop: "15px" }}
  5257. >
  5258. <Button
  5259. className="cancel"
  5260. type="primary"
  5261. onClick={this.handleCancels}
  5262. style={{ marginLeft: "200px" }}
  5263. htmlType="submit"
  5264. >
  5265. 签单
  5266. </Button>
  5267. <Button
  5268. className="cancel"
  5269. type="primary"
  5270. onClick={this.handleCancelq}
  5271. style={{ marginLeft: "50px" }}
  5272. htmlType="submit"
  5273. >
  5274. 保存
  5275. </Button>
  5276. <Button
  5277. className="cancel"
  5278. type="ghost"
  5279. onClick={this.handleCancelclose}
  5280. style={{ marginLeft: "50px" }}
  5281. >
  5282. 取消
  5283. </Button>
  5284. </div>
  5285. ) : (
  5286. ""
  5287. )}
  5288. </div>
  5289. </TabPane>
  5290. <TabPane tab="合同变更发起" key="2">
  5291. {
  5292. <div>
  5293. <div className="clearfix">
  5294. <FormItem
  5295. className="half-item"
  5296. {...formItemLayout}
  5297. label="客户名称"
  5298. >
  5299. <span>{this.state.userName}</span>
  5300. </FormItem>
  5301. </div>
  5302. <div className="clearfix">
  5303. <FormItem
  5304. className="half-item"
  5305. {...formItemLayout}
  5306. label="合同编号"
  5307. >
  5308. <span>{this.state.contractNo}</span>
  5309. </FormItem>
  5310. </div>
  5311. <div className="clearfix">
  5312. <FormItem
  5313. className="half-item"
  5314. {...formItemLayout}
  5315. label="申请变更部门"
  5316. >
  5317. {/* {!this.state.mark ? ( */}
  5318. <span>{this.state.depName}</span>
  5319. {/* ) : (
  5320. <span>{contractData.depName}</span>
  5321. )} */}
  5322. </FormItem>
  5323. <FormItem
  5324. className="half-item"
  5325. {...formItemLayout}
  5326. label="申请人"
  5327. >
  5328. <span>{this.state.salesmanName}</span>
  5329. </FormItem>
  5330. </div>
  5331. <div className="clearfix">
  5332. <FormItem
  5333. labelCol={{ span: 4 }}
  5334. wrapperCol={{ span: 18 }}
  5335. label="变更类型"
  5336. >
  5337. {/* {!this.state.mark ? ( */}
  5338. <Select
  5339. placeholder="选择合同变更类型"
  5340. style={{ width: 200 }}
  5341. disabled={this.state.changeFlag}
  5342. value={this.state.typeChange}
  5343. onChange={(e) => {
  5344. this.setState({
  5345. typeChange: e,
  5346. changeFlag: true,
  5347. });
  5348. if (e == 1) {
  5349. this.setState({
  5350. hetongFlag: false,
  5351. listFlag: false,
  5352. listCuiFlag: false,
  5353. tuiKuanFlag: false,
  5354. displayList: false,
  5355. });
  5356. } else if (e == 2) {
  5357. this.setState({
  5358. hetongFlag: true,
  5359. listFlag: false,
  5360. listCuiFlag: false,
  5361. tuiKuanFlag: true,
  5362. displayList: false,
  5363. });
  5364. } else if (e == 3) {
  5365. this.setState({
  5366. listFlag: false,
  5367. hetongFlag: false,
  5368. listCuiFlag: false,
  5369. tuiKuanFlag: false,
  5370. displayList: true,
  5371. });
  5372. } else if (e == 4) {
  5373. this.setState({
  5374. listFlag: false,
  5375. listCuiFlag: false,
  5376. hetongFlag: false,
  5377. tuiKuanFlag: true,
  5378. displayList: false,
  5379. });
  5380. } else if (e == 5) {
  5381. this.setState({
  5382. listFlag: false,
  5383. listCuiFlag: false,
  5384. hetongFlag: true,
  5385. tuiKuanFlag: true,
  5386. displayList: false,
  5387. });
  5388. } else {
  5389. this.setState({
  5390. listFlag: true,
  5391. hetongFlag: true,
  5392. listCuiFlag: true,
  5393. tuiKuanFlag: false,
  5394. displayList: false,
  5395. });
  5396. }
  5397. }}
  5398. value={this.state.typeChange}
  5399. >
  5400. <Option value={0}>退单退款</Option>
  5401. <Option value={1}>项目及金额变更</Option>
  5402. <Option value={2}>仅项目变更</Option>
  5403. <Option value={3}>仅金额变更</Option>
  5404. <Option value={4}>重报</Option>
  5405. <Option value={5}>赠送</Option>
  5406. </Select>
  5407. <Button
  5408. style={{ marginLeft: 10 }}
  5409. onClick={(e) => {
  5410. this.setState({
  5411. listFlag: false,
  5412. hetongFlag: false,
  5413. listCuiFlag: false,
  5414. tuiKuanFlag: false,
  5415. displayList: false,
  5416. startRemarks: "",
  5417. remarksC: "",
  5418. voucherUrl: [],
  5419. changeAmount: "0",
  5420. applicant: undefined,
  5421. depNameChange: undefined,
  5422. typeChange: undefined,
  5423. changeFlag: false,
  5424. });
  5425. }}
  5426. >
  5427. 重置
  5428. </Button>
  5429. {/* <Button type="danger" >取消本次变更</Button> */}
  5430. </FormItem>
  5431. </div>
  5432. <div className="clearfix">
  5433. <FormItem
  5434. labelCol={{ span: 4 }}
  5435. wrapperCol={{ span: 18 }}
  5436. label="合同额(万元)"
  5437. >
  5438. {/* {!this.state.mark ? ( */}
  5439. <Input
  5440. placeholder="请输入合同额"
  5441. disabled={this.state.hetongFlag}
  5442. ref="signTotalAmount"
  5443. value={this.state.totalAmount}
  5444. onChange={(e) => {
  5445. this.setState({
  5446. totalAmount: e.target.value,
  5447. });
  5448. }}
  5449. style={{ width: "240px" }}
  5450. />
  5451. {/* ) : (
  5452. <span>{contractData.totalAmount}</span>
  5453. )} */}
  5454. </FormItem>
  5455. <FormItem
  5456. labelCol={{ span: 4 }}
  5457. wrapperCol={{ span: 18 }}
  5458. label="已收款(万元)"
  5459. >
  5460. <span>
  5461. {this.state.settlementAmount}
  5462. &nbsp;&nbsp;&nbsp;&nbsp;
  5463. <span style={{ color: "red" }}>
  5464. (注:已收款与现实收款不符,请与财务专员联系)
  5465. </span>
  5466. </span>
  5467. </FormItem>
  5468. <FormItem
  5469. labelCol={{ span: 4 }}
  5470. wrapperCol={{ span: 18 }}
  5471. label="申请退款(万元)"
  5472. >
  5473. {/* {!this.state.mark ? ( */}
  5474. <Input
  5475. placeholder="请输入申请退款"
  5476. ref="signTotalAmount"
  5477. disabled={this.state.tuiKuanFlag}
  5478. value={this.state.changeAmount}
  5479. onChange={(e) => {
  5480. this.setState({
  5481. changeAmount: e.target.value,
  5482. });
  5483. }}
  5484. style={{ width: "240px" }}
  5485. />
  5486. {/* ) : (
  5487. <span>{contractData.changeAmount}</span>
  5488. )} */}
  5489. </FormItem>
  5490. </div>
  5491. {/* 动态展示项目以及催款节点 */}
  5492. <div
  5493. style={{
  5494. display: this.state.isCaoGao ? "block" : "none",
  5495. }}
  5496. >
  5497. <div>
  5498. <span
  5499. style={{
  5500. marginLeft: "50px",
  5501. fontSize: "20px",
  5502. }}
  5503. >
  5504. 项目业务
  5505. </span>
  5506. <span style={{ color: "red" }}>
  5507. (注:项目删除后,此项目的全部节点、全部工时,全部被删除,请谨慎删除!双击可修改对应金额数量!)
  5508. </span>
  5509. <Button
  5510. type="primary"
  5511. onClick={this.changeAddPro}
  5512. disabled={this.state.listFlag}
  5513. style={{
  5514. float: "right",
  5515. marginRight: "50px",
  5516. marginBottom: "15px",
  5517. display: this.state.displayList
  5518. ? "none"
  5519. : "block",
  5520. }}
  5521. >
  5522. 添加项目明细
  5523. </Button>
  5524. </div>
  5525. <div
  5526. className="patent-table"
  5527. style={{ marginBottom: 10 }}
  5528. >
  5529. <Spin spinning={this.state.loading}>
  5530. <Table
  5531. columns={this.state.proColumns}
  5532. dataSource={this.state.proDataSource}
  5533. scroll={{ x: "max-content", y: 0 }}
  5534. expandedRowRender={expandedRowRender}
  5535. pagination={this.state.pagination}
  5536. onRowDoubleClick={
  5537. this.state.listFlag
  5538. ? this.not
  5539. : this.editPro
  5540. }
  5541. bordered
  5542. size="small"
  5543. />
  5544. </Spin>
  5545. </div>
  5546. <div>
  5547. <span
  5548. style={{
  5549. marginLeft: "50px",
  5550. fontSize: "20px",
  5551. }}
  5552. >
  5553. 催款节点
  5554. </span>
  5555. <span style={{ color: "red" }}>
  5556. (注:节点删除后,无论节点是否触发,均会删除,请谨慎删除!双击可修改对应金额!)
  5557. </span>
  5558. {/* <span
  5559. style={{
  5560. display: "inline-block",
  5561. marginLeft: 10,
  5562. color: "red"
  5563. }}
  5564. >
  5565. 金额总计(万元): {this.state.totalCui}
  5566. </span> */}
  5567. <Button
  5568. type="primary"
  5569. onClick={(e) => {
  5570. this.changeAddCui();
  5571. }}
  5572. disabled={this.state.listCuiFlag}
  5573. style={{
  5574. float: "right",
  5575. marginRight: "50px",
  5576. marginBottom: "15px",
  5577. display: this.state.displayList
  5578. ? "none"
  5579. : "block",
  5580. }}
  5581. >
  5582. 添加催款节点
  5583. </Button>
  5584. </div>
  5585. <div className="clearfix">
  5586. <Spin spinning={this.state.loading}>
  5587. <Form layout="horizontal">
  5588. <Table
  5589. pagination={false}
  5590. columns={this.state.changeCuiList}
  5591. dataSource={this.state.cuiDataSource}
  5592. scroll={{ x: "max-content", y: 0 }}
  5593. onRowDoubleClick={
  5594. this.state.listCuiFlag
  5595. ? this.not
  5596. : this.editCui
  5597. }
  5598. bordered
  5599. size="small"
  5600. />
  5601. <Col
  5602. span={24}
  5603. offset={9}
  5604. style={{ marginTop: "15px" }}
  5605. ></Col>
  5606. </Form>
  5607. </Spin>
  5608. </div>
  5609. </div>
  5610. <div className="clearfix">
  5611. <FormItem
  5612. style={{ height: "auto" }}
  5613. labelCol={{ span: 4 }}
  5614. wrapperCol={{ span: 18 }}
  5615. label="变更原因"
  5616. >
  5617. {/* {!this.state.mark ? ( */}
  5618. <TextArea
  5619. rows={4}
  5620. placeholder="请输入变更原因"
  5621. ref="signTotalAmount"
  5622. style={{ width: "95%" }}
  5623. value={this.state.remarksC}
  5624. onChange={(e) => {
  5625. this.setState({
  5626. remarksC: e.target.value,
  5627. });
  5628. }}
  5629. />
  5630. {/* ) : (
  5631. <span>{contractData.remarks}</span>
  5632. )} */}
  5633. </FormItem>
  5634. </div>
  5635. <div className="clearfix">
  5636. <FormItem
  5637. style={{ height: "auto" }}
  5638. labelCol={{ span: 4 }}
  5639. wrapperCol={{ span: 18 }}
  5640. label="备注"
  5641. >
  5642. {/* {!this.state.mark ? ( */}
  5643. <TextArea
  5644. rows={4}
  5645. placeholder="请输入备注"
  5646. ref="signTotalAmount"
  5647. style={{ width: "95%" }}
  5648. value={this.state.startRemarks}
  5649. onChange={(e) => {
  5650. this.setState({
  5651. startRemarks: e.target.value,
  5652. });
  5653. }}
  5654. />
  5655. {/* ) : (
  5656. <span>{contractData.startRemarks}</span>
  5657. )} */}
  5658. </FormItem>
  5659. </div>
  5660. {/* ---- */}
  5661. <div className="clearfix">
  5662. <FormItem
  5663. labelCol={{ span: 4 }}
  5664. wrapperCol={{ span: 18 }}
  5665. label="变更凭证"
  5666. >
  5667. {/* {!this.state.mark ? ( */}
  5668. <PicturesWall
  5669. domId={'addService3'}
  5670. fileList={this.getVoucherUrl}
  5671. pictureUrl={this.state.voucherUrl}
  5672. url="/api/admin/orderChange/uploadFile"
  5673. sign="order_change_file"
  5674. />
  5675. {/* ) : (
  5676. <div>
  5677. <Upload
  5678. className="demandDetailShow-upload"
  5679. listType="picture-card"
  5680. fileList={this.state.voucherUrl}
  5681. onPreview={file => {
  5682. this.setState({
  5683. previewImage:
  5684. file.url || file.thumbUrl,
  5685. previewVisible: true
  5686. });
  5687. }}
  5688. />
  5689. <Modal
  5690. maskClosable={false}
  5691. footer={null}
  5692. visible={this.state.previewVisible}
  5693. onCancel={() => {
  5694. this.setState({
  5695. previewVisible: false
  5696. });
  5697. }}
  5698. >
  5699. <img
  5700. alt=""
  5701. style={{ width: "100%" }}
  5702. src={this.state.previewImage || ""}
  5703. />
  5704. </Modal>
  5705. </div>
  5706. )} */}
  5707. <p>图片建议:要清晰。</p>
  5708. </FormItem>
  5709. </div>
  5710. {/* {!this.state.mark ? ( */}
  5711. <div className="clearfix">
  5712. <Button
  5713. type="primary"
  5714. style={{ float: "right", marginRight: 40 }}
  5715. // onClick={this.changeApply}
  5716. onClick={(e) => {
  5717. if (this.state.isCaoGao) {
  5718. this.submitChange();
  5719. } else {
  5720. this.changeApply();
  5721. }
  5722. }}
  5723. >
  5724. {this.state.isCaoGao
  5725. ? "发起变更申请"
  5726. : this.state.typeChange == 0
  5727. ? "发起变更申请"
  5728. : "下一步"}
  5729. </Button>
  5730. </div>
  5731. {/* ) : (
  5732. ""
  5733. )} */}
  5734. </div>
  5735. }
  5736. </TabPane>
  5737. {this.state.isJilu ? (
  5738. <TabPane tab={"最近变更记录"} key="3">
  5739. <div>
  5740. <div
  5741. style={{
  5742. borderRadius: "50%",
  5743. width: 300,
  5744. height: 300,
  5745. position: "absolute",
  5746. top: 230,
  5747. left: 525,
  5748. transform: "rotate(-5deg)",
  5749. zIndex: 1,
  5750. display:
  5751. this.state.detailChange.status == 4
  5752. ? "block"
  5753. : "none",
  5754. }}
  5755. >
  5756. <img src={tongguo} style={{ width: "100%" }} />
  5757. </div>
  5758. <div
  5759. style={{
  5760. borderRadius: "50%",
  5761. width: 300,
  5762. height: 300,
  5763. position: "absolute",
  5764. top: 284,
  5765. left: 586,
  5766. transform: "rotate(-5deg)",
  5767. zIndex: 1,
  5768. display:
  5769. this.state.detailChange.status == 5
  5770. ? "block"
  5771. : "none",
  5772. }}
  5773. >
  5774. <img src={quxiao} style={{ width: "63%" }} />
  5775. </div>
  5776. <div className="clearfix">
  5777. <FormItem
  5778. className="half-item"
  5779. {...formItemLayout}
  5780. label="客户名称"
  5781. >
  5782. <span>{this.state.userName}</span>
  5783. </FormItem>
  5784. {/* */}
  5785. <FormItem
  5786. className="half-item"
  5787. {...formItemLayout}
  5788. label="合同编号"
  5789. >
  5790. <span>{this.state.contractNo}</span>
  5791. </FormItem>
  5792. </div>
  5793. <div className="clearfix">
  5794. <FormItem
  5795. className="half-item"
  5796. {...formItemLayout}
  5797. label="时间"
  5798. >
  5799. <span>
  5800. {this.state.detailChange.createTimes}
  5801. </span>
  5802. </FormItem>
  5803. <FormItem
  5804. className="half-item"
  5805. {...formItemLayout}
  5806. label="申请人"
  5807. >
  5808. <span>{this.state.salesmanName}</span>
  5809. </FormItem>
  5810. </div>
  5811. <div className="clearfix">
  5812. <FormItem
  5813. className="half-item"
  5814. {...formItemLayout}
  5815. label="当前进度"
  5816. >
  5817. <span>
  5818. {getProcessStatusNew(
  5819. this.state.detailChange.processState,
  5820. this.state.detailChange.status
  5821. )}
  5822. </span>
  5823. </FormItem>
  5824. {/* <FormItem
  5825. className="half-item"
  5826. {...formItemLayout}
  5827. label="申请变更部门"
  5828. >
  5829. <span>{this.state.depName}</span>
  5830. </FormItem> */}
  5831. <FormItem
  5832. {...formItemLayout}
  5833. className="half-item"
  5834. label="变更类型"
  5835. >
  5836. <span>
  5837. {getChangeType(
  5838. this.state.detailChange.typeChange
  5839. )}
  5840. </span>
  5841. </FormItem>
  5842. </div>
  5843. {/* <div className="clearfix">
  5844. <FormItem
  5845. labelCol={{ span: 4 }}
  5846. wrapperCol={{ span: 18 }}
  5847. label="变更类型"
  5848. >
  5849. <span>
  5850. {getChangeType(
  5851. this.state.detailChange.typeChange
  5852. )}
  5853. </span>
  5854. </FormItem>
  5855. </div> */}
  5856. <div className="clearfix">
  5857. <FormItem
  5858. {...formItemLayout}
  5859. className="half-item"
  5860. label="合同额(万元)"
  5861. >
  5862. <span>
  5863. {this.state.detailChange.totalAmount}
  5864. </span>
  5865. </FormItem>
  5866. <FormItem
  5867. {...formItemLayout}
  5868. className="half-item"
  5869. label="已收款(万元)"
  5870. >
  5871. <span>
  5872. {this.state.detailChange.settlementAmount}
  5873. </span>
  5874. </FormItem>
  5875. </div>
  5876. <div className="clearfix">
  5877. <FormItem
  5878. {...formItemLayout}
  5879. className="half-item"
  5880. label="欠款(万元)"
  5881. >
  5882. <span>{this.state.detailChange.arrears}</span>
  5883. </FormItem>
  5884. <FormItem
  5885. {...formItemLayout}
  5886. className="half-item"
  5887. label="申请退款(万元)"
  5888. >
  5889. <span>
  5890. {this.state.detailChange.changeAmount}
  5891. </span>
  5892. </FormItem>
  5893. </div>
  5894. <div className="clearfix">
  5895. <FormItem
  5896. style={{ height: "auto" }}
  5897. labelCol={{ span: 4 }}
  5898. wrapperCol={{ span: 18 }}
  5899. label="变更原因"
  5900. >
  5901. <span>{this.state.detailChange.remarksC}</span>
  5902. </FormItem>
  5903. </div>
  5904. <div className="clearfix">
  5905. <FormItem
  5906. style={{ height: "auto" }}
  5907. labelCol={{ span: 4 }}
  5908. wrapperCol={{ span: 18 }}
  5909. label="备注"
  5910. >
  5911. <span>
  5912. {this.state.detailChange.startRemarks}
  5913. </span>
  5914. </FormItem>
  5915. </div>
  5916. {/* ---- */}
  5917. <div className="clearfix">
  5918. <FormItem
  5919. labelCol={{ span: 4 }}
  5920. wrapperCol={{ span: 18 }}
  5921. label="变更凭证"
  5922. >
  5923. <div>
  5924. {/*<Upload*/}
  5925. {/* className="demandDetailShow-upload"*/}
  5926. {/* listType="picture-card"*/}
  5927. {/* fileList={*/}
  5928. {/* this.state.detailChange.voucherUrl*/}
  5929. {/* }*/}
  5930. {/* onPreview={(file) => {*/}
  5931. {/* this.setState({*/}
  5932. {/* previewImage: file.url || file.thumbUrl,*/}
  5933. {/* previewVisible: true,*/}
  5934. {/* });*/}
  5935. {/* }}*/}
  5936. {/*/>*/}
  5937. <div style={{paddingTop:'10px',paddingBottom:'10px'}}>
  5938. {
  5939. this.state.detailChange &&
  5940. this.state.detailChange.voucherUrl &&
  5941. this.state.activeKey === '3' &&
  5942. this.state.visible?
  5943. <ImgList fileList={this.state.detailChange.voucherUrl} ItemWidth={'96px'}/>
  5944. : <div/>
  5945. }
  5946. </div>
  5947. {/*<Modal*/}
  5948. {/* maskClosable={false}*/}
  5949. {/* footer={null}*/}
  5950. {/* visible={this.state.previewVisible}*/}
  5951. {/* onCancel={() => {*/}
  5952. {/* this.setState({*/}
  5953. {/* previewVisible: false,*/}
  5954. {/* });*/}
  5955. {/* }}*/}
  5956. {/*>*/}
  5957. {/* <img*/}
  5958. {/* alt=""*/}
  5959. {/* style={{ width: "100%" }}*/}
  5960. {/* src={this.state.previewImage || ""}*/}
  5961. {/* />*/}
  5962. {/*</Modal>*/}
  5963. </div>
  5964. </FormItem>
  5965. </div>
  5966. <ul
  5967. style={{
  5968. width: "868px",
  5969. overflow: "hidden",
  5970. paddingLeft: "90px",
  5971. paddingTop: "10px",
  5972. position: "relative",
  5973. bottom: "20px",
  5974. fontSize: "12px",
  5975. color: "rgba(0, 0, 0, 0.65)",
  5976. }}
  5977. >
  5978. {/* <span>操作人:</span> */}
  5979. {this.state.logData.map((item, index) => {
  5980. if (item.status == 0) {
  5981. item.status = "发起";
  5982. } else if (item.status == 1) {
  5983. item.status = "审核中";
  5984. } else if (item.status == 2) {
  5985. item.status = "通过";
  5986. } else if (item.status == 3) {
  5987. item.status = "驳回";
  5988. } else if (item.status == 4) {
  5989. item.status = "完成";
  5990. }
  5991. return (
  5992. <li
  5993. key={index}
  5994. style={{
  5995. width: "100%",
  5996. height: "auto",
  5997. wordBreak: "break-all",
  5998. marginBottom: "10px",
  5999. }}
  6000. >
  6001. {item.aname +
  6002. ":" +
  6003. "(" +
  6004. item.status +
  6005. ")" +
  6006. item.remarks}
  6007. </li>
  6008. );
  6009. })}
  6010. </ul>
  6011. {/* 动态展示项目以及催款节点 */}
  6012. <div>
  6013. <div>
  6014. <span
  6015. style={{
  6016. marginLeft: "50px",
  6017. fontSize: "20px",
  6018. }}
  6019. >
  6020. 项目业务
  6021. </span>
  6022. </div>
  6023. <div
  6024. className="patent-table"
  6025. style={{ marginBottom: 10 }}
  6026. >
  6027. <Spin spinning={this.state.loading}>
  6028. <Table
  6029. columns={this.state.detailColumns}
  6030. dataSource={this.state.proDataSource}
  6031. expandedRowRender={expandedRowRenderDetail}
  6032. pagination={this.state.pagination}
  6033. // onRowClick={this.tableRowClick}
  6034. bordered
  6035. size="small"
  6036. />
  6037. </Spin>
  6038. </div>
  6039. <div>
  6040. <span
  6041. style={{
  6042. marginLeft: "50px",
  6043. fontSize: "20px",
  6044. }}
  6045. >
  6046. 催款节点
  6047. </span>
  6048. </div>
  6049. <div className="clearfix">
  6050. <Spin spinning={this.state.loading}>
  6051. <Form layout="horizontal">
  6052. <Table
  6053. pagination={false}
  6054. columns={this.state.detailContactsLists}
  6055. dataSource={this.state.cuiDataSource}
  6056. scroll={{ x: "max-content", y: 0 }}
  6057. bordered
  6058. size="small"
  6059. />
  6060. <Col
  6061. span={24}
  6062. offset={9}
  6063. style={{ marginTop: "15px" }}
  6064. ></Col>
  6065. </Form>
  6066. </Spin>
  6067. </div>
  6068. </div>
  6069. </div>
  6070. </TabPane>
  6071. ) : (
  6072. ""
  6073. )}
  6074. </Tabs>
  6075. )}
  6076. </div>
  6077. </Spin>
  6078. </Form>
  6079. </Modal>
  6080. <Modal
  6081. maskClosable={false}
  6082. visible={this.state.addnextVisible}
  6083. onOk={this.nextCancel}
  6084. onCancel={this.nextCancel}
  6085. width="800px"
  6086. title={this.state.addState ? "添加项目任务" : "项目任务详情"}
  6087. footer=""
  6088. className="admin-desc-content"
  6089. >
  6090. <Form
  6091. layout="horizontal"
  6092. onSubmit={this.nextSubmit}
  6093. // id="demand-form"
  6094. >
  6095. <Spin spinning={this.state.loading}>
  6096. {this.state.addState ? (
  6097. <div className="clearfix">
  6098. <FormItem
  6099. className="half-item"
  6100. {...formItemLayout}
  6101. label="服务名称"
  6102. >
  6103. <AutoComplete
  6104. className="certain-category-search"
  6105. dropdownClassName="certain-category-search-dropdown"
  6106. dropdownMatchSelectWidth={false}
  6107. dropdownStyle={{ width: 200 }}
  6108. style={{ width: "200px" }}
  6109. dataSource={options}
  6110. placeholder="输入服务名称"
  6111. value={this.state.commodityName}
  6112. onChange={this.httpChange}
  6113. filterOption={true}
  6114. onSelect={this.selectAuto}
  6115. >
  6116. <Input />
  6117. </AutoComplete>
  6118. <span className="mandatory">*</span>
  6119. </FormItem>
  6120. <FormItem
  6121. className="half-item"
  6122. {...formItemLayout}
  6123. label="服务数量"
  6124. >
  6125. <Input
  6126. placeholder="请输入服务数量"
  6127. value={this.state.commodityQuantity}
  6128. style={{ width: "200px" }}
  6129. onChange={(e) => {
  6130. this.setState({ commodityQuantity: e.target.value });
  6131. }}
  6132. ref="commodityQuantity"
  6133. />
  6134. <span className="mandatory">*</span>
  6135. </FormItem>
  6136. <FormItem
  6137. className="half-item"
  6138. labelCol={{ span: 3 }}
  6139. wrapperCol={{ span: 14 }}
  6140. label="官费:"
  6141. style={{
  6142. display: this.state.displayFees,
  6143. marginLeft: "55px",
  6144. }}
  6145. >
  6146. <span style={{ color: "red", marginRight: "27px" }}>
  6147. *
  6148. </span>
  6149. <Radio.Group
  6150. value={this.state.officialCost}
  6151. onChange={(e) => {
  6152. this.setState({ officialCost: e.target.value });
  6153. }}
  6154. >
  6155. <Radio value="1">含官费</Radio>
  6156. <Radio value="0">不含官费</Radio>
  6157. </Radio.Group>
  6158. </FormItem>
  6159. <FormItem
  6160. className="half-item"
  6161. labelCol={{ span: 3 }}
  6162. wrapperCol={{ span: 14 }}
  6163. label="费减:"
  6164. style={{
  6165. display: this.state.displayFees,
  6166. marginLeft: "55px",
  6167. }}
  6168. >
  6169. <span style={{ color: "red", marginRight: "27px" }}>
  6170. *
  6171. </span>
  6172. <Radio.Group
  6173. value={this.state.costReduction}
  6174. onChange={(e) => {
  6175. this.setState({ costReduction: e.target.value });
  6176. }}
  6177. >
  6178. <Radio value="1">有费减</Radio>
  6179. <Radio value="0">无费减</Radio>
  6180. </Radio.Group>
  6181. </FormItem>
  6182. <FormItem
  6183. className="half-item"
  6184. {...formItemLayout}
  6185. label="实签价格(万元)"
  6186. >
  6187. <Input
  6188. placeholder="请输入实签价格"
  6189. value={this.state.commodityPrice}
  6190. style={{ width: "200px" }}
  6191. onChange={(e) => {
  6192. this.setState({ commodityPrice: e.target.value });
  6193. }}
  6194. ref="commodityPrice"
  6195. />
  6196. <span className="mandatory">*</span>
  6197. </FormItem>
  6198. <FormItem
  6199. className="half-item"
  6200. {...formItemLayout}
  6201. label="主要业务"
  6202. >
  6203. <Select
  6204. placeholder="选择是否为主要业务"
  6205. style={{ width: "200px" }}
  6206. value={this.state.main}
  6207. onChange={(e) => {
  6208. this.setState({ main: e });
  6209. }}
  6210. >
  6211. {boutique.map(function (item) {
  6212. return (
  6213. <Select.Option key={item.value}>
  6214. {item.key}
  6215. </Select.Option>
  6216. );
  6217. })}
  6218. </Select>
  6219. <span className="mandatory">*</span>
  6220. </FormItem>
  6221. <div className="clearfix">
  6222. <FormItem
  6223. labelCol={{ span: 4 }}
  6224. wrapperCol={{ span: 16 }}
  6225. label="服务说明"
  6226. >
  6227. <Input
  6228. type="textarea"
  6229. placeholder="请输入服务说明"
  6230. value={this.state.taskComment}
  6231. onChange={(e) => {
  6232. this.setState({ taskComment: e.target.value });
  6233. }}
  6234. />
  6235. </FormItem>
  6236. </div>
  6237. <FormItem
  6238. wrapperCol={{ span: 12, offset: 4 }}
  6239. className="half-middle"
  6240. >
  6241. <Button
  6242. className="submitSave"
  6243. type="primary"
  6244. htmlType="submit"
  6245. >
  6246. 保存
  6247. </Button>
  6248. <Button
  6249. className="submitSave"
  6250. type="ghost"
  6251. onClick={this.nextCancel}
  6252. >
  6253. 取消
  6254. </Button>
  6255. </FormItem>
  6256. </div>
  6257. ) : (
  6258. <div className="clearfix">
  6259. {this.state.processStatus == 0 ? (
  6260. <div className="clearfix">
  6261. <FormItem
  6262. className="half-item"
  6263. {...formItemLayout}
  6264. label="项目名称"
  6265. >
  6266. <span>{this.state.commodityName}</span>
  6267. </FormItem>
  6268. <FormItem
  6269. className="half-item"
  6270. {...formItemLayout}
  6271. label="项目数量"
  6272. >
  6273. <Input
  6274. placeholder="请输入数量"
  6275. value={this.state.commodityQuantity}
  6276. style={{ width: "200px" }}
  6277. onChange={(e) => {
  6278. this.setState({
  6279. commodityQuantity: e.target.value,
  6280. });
  6281. }}
  6282. />
  6283. <span className="mandatory">*</span>
  6284. </FormItem>
  6285. <FormItem
  6286. className="half-item"
  6287. labelCol={{ span: 3 }}
  6288. wrapperCol={{ span: 14 }}
  6289. label="官费:"
  6290. style={{
  6291. display: this.state.displayFees,
  6292. marginLeft: "55px",
  6293. }}
  6294. >
  6295. <span style={{ color: "red", marginRight: "27px" }}>
  6296. *
  6297. </span>
  6298. <Radio.Group
  6299. value={this.state.officialCost}
  6300. onChange={(e) => {
  6301. this.setState({ officialCost: e.target.value });
  6302. }}
  6303. >
  6304. <Radio value={1}>含官费</Radio>
  6305. <Radio value={0}>不含官费</Radio>
  6306. </Radio.Group>
  6307. </FormItem>
  6308. <FormItem
  6309. className="half-item"
  6310. labelCol={{ span: 3 }}
  6311. wrapperCol={{ span: 14 }}
  6312. label="费减:"
  6313. style={{
  6314. display: this.state.displayFees,
  6315. marginLeft: "55px",
  6316. }}
  6317. >
  6318. <span style={{ color: "red", marginRight: "27px" }}>
  6319. *
  6320. </span>
  6321. <Radio.Group
  6322. value={this.state.costReduction}
  6323. onChange={(e) => {
  6324. this.setState({ costReduction: e.target.value });
  6325. }}
  6326. >
  6327. <Radio value={1}>有费减</Radio>
  6328. <Radio value={0}>无费减</Radio>
  6329. </Radio.Group>
  6330. </FormItem>
  6331. <FormItem
  6332. className="half-item"
  6333. {...formItemLayout}
  6334. label="金额(万元)"
  6335. >
  6336. <Input
  6337. placeholder="请输入签单金额"
  6338. value={this.state.commodityPrice}
  6339. style={{ width: "200px" }}
  6340. onChange={(e) => {
  6341. this.setState({ commodityPrice: e.target.value });
  6342. }}
  6343. />
  6344. <span className="mandatory">*</span>
  6345. </FormItem>
  6346. <FormItem
  6347. className="half-item"
  6348. {...formItemLayout}
  6349. label="主要项目"
  6350. >
  6351. <Select
  6352. placeholder="选择是否为主要业务"
  6353. style={{ width: "200px" }}
  6354. value={this.state.main}
  6355. onChange={(e) => {
  6356. this.setState({ main: e });
  6357. }}
  6358. >
  6359. {boutique.map(function (item) {
  6360. return (
  6361. <Select.Option key={item.value}>
  6362. {item.key}
  6363. </Select.Option>
  6364. );
  6365. })}
  6366. </Select>
  6367. <span className="mandatory">*</span>
  6368. </FormItem>
  6369. <div className="clearfix">
  6370. <FormItem
  6371. labelCol={{ span: 4 }}
  6372. wrapperCol={{ span: 16 }}
  6373. label="服务说明"
  6374. >
  6375. <Input
  6376. type="textarea"
  6377. placeholder="请输入服务说明"
  6378. value={this.state.taskComment}
  6379. onChange={(e) => {
  6380. this.setState({ taskComment: e.target.value });
  6381. }}
  6382. />
  6383. </FormItem>
  6384. </div>
  6385. <FormItem
  6386. wrapperCol={{ span: 12, offset: 4 }}
  6387. className="half-middle"
  6388. >
  6389. <Button
  6390. className="submitSave"
  6391. type="primary"
  6392. onClick={this.tabRowSave}
  6393. >
  6394. 保存
  6395. </Button>
  6396. <Button
  6397. className="submitSave"
  6398. type="ghost"
  6399. onClick={this.nextCancel}
  6400. >
  6401. 取消
  6402. </Button>
  6403. </FormItem>
  6404. </div>
  6405. ) : (
  6406. <div className="clearfix">
  6407. <FormItem
  6408. className="half-item"
  6409. {...formItemLayout}
  6410. label="项目名称"
  6411. >
  6412. <span>{this.state.commodityName}</span>
  6413. </FormItem>
  6414. <FormItem
  6415. className="half-item"
  6416. {...formItemLayout}
  6417. label="项目数量"
  6418. >
  6419. <span>{this.state.commodityQuantity}</span>
  6420. </FormItem>
  6421. <FormItem
  6422. className="half-item"
  6423. {...formItemLayout}
  6424. label="官费"
  6425. style={{ display: this.state.displayFees }}
  6426. >
  6427. <span>
  6428. {this.state.officialCost == 0 ? "无官费" : "有官费"}
  6429. </span>
  6430. </FormItem>
  6431. <FormItem
  6432. className="half-item"
  6433. {...formItemLayout}
  6434. label="费减"
  6435. style={{ display: this.state.displayFees }}
  6436. >
  6437. <span>
  6438. {this.state.costReduction == 0
  6439. ? "无费减"
  6440. : "有费减"}
  6441. </span>
  6442. </FormItem>
  6443. <FormItem
  6444. className="half-item"
  6445. {...formItemLayout}
  6446. label="金额(万元)"
  6447. >
  6448. <span>{this.state.commodityPrice}</span>
  6449. </FormItem>
  6450. <FormItem
  6451. className="half-item"
  6452. {...formItemLayout}
  6453. label="主要项目"
  6454. >
  6455. <span>{getboutique(this.state.main)}</span>
  6456. </FormItem>
  6457. <div className="clearfix">
  6458. <FormItem
  6459. labelCol={{ span: 4 }}
  6460. wrapperCol={{ span: 16 }}
  6461. label="服务说明"
  6462. >
  6463. <span>{this.state.taskComment}</span>
  6464. </FormItem>
  6465. </div>
  6466. </div>
  6467. )}
  6468. </div>
  6469. )}
  6470. </Spin>
  6471. </Form>
  6472. </Modal>
  6473. <Modal
  6474. maskClosable={false}
  6475. visible={this.state.changeVisible}
  6476. onOk={this.nextCancel}
  6477. onCancel={this.nextCancel}
  6478. width="800px"
  6479. title={"添加变更项目"}
  6480. footer=""
  6481. className="admin-desc-content"
  6482. >
  6483. <Form
  6484. layout="horizontal"
  6485. // id="demand-form"
  6486. >
  6487. <Spin spinning={this.state.loading}>
  6488. <div className="clearfix">
  6489. <FormItem
  6490. className="half-item"
  6491. {...formItemLayout}
  6492. label="服务名称"
  6493. >
  6494. <AutoComplete
  6495. className="certain-category-search"
  6496. dropdownClassName="certain-category-search-dropdown"
  6497. dropdownMatchSelectWidth={false}
  6498. dropdownStyle={{ width: 200 }}
  6499. style={{ width: "200px" }}
  6500. dataSource={options}
  6501. placeholder="输入服务名称"
  6502. value={this.state.commodityName}
  6503. onChange={this.httpChange}
  6504. filterOption={true}
  6505. onSelect={this.selectAuto}
  6506. >
  6507. <Input />
  6508. </AutoComplete>
  6509. <span className="mandatory">*</span>
  6510. </FormItem>
  6511. <FormItem
  6512. className="half-item"
  6513. {...formItemLayout}
  6514. label="服务数量"
  6515. >
  6516. <Input
  6517. placeholder="请输入服务数量"
  6518. value={this.state.commodityQuantity}
  6519. style={{ width: "200px" }}
  6520. onChange={(e) => {
  6521. this.setState({ commodityQuantity: e.target.value });
  6522. }}
  6523. ref="commodityQuantity"
  6524. />
  6525. <span className="mandatory">*</span>
  6526. </FormItem>
  6527. <FormItem
  6528. className="half-item"
  6529. labelCol={{ span: 3 }}
  6530. wrapperCol={{ span: 14 }}
  6531. label="官费:"
  6532. style={{
  6533. display: this.state.displayFees,
  6534. marginLeft: "55px",
  6535. }}
  6536. >
  6537. <span style={{ color: "red", marginRight: "27px" }}>
  6538. *
  6539. </span>
  6540. <Radio.Group
  6541. value={this.state.officialCost}
  6542. onChange={(e) => {
  6543. this.setState({ officialCost: e.target.value });
  6544. }}
  6545. >
  6546. <Radio value="1">含官费</Radio>
  6547. <Radio value="0">不含官费</Radio>
  6548. </Radio.Group>
  6549. </FormItem>
  6550. <FormItem
  6551. className="half-item"
  6552. labelCol={{ span: 3 }}
  6553. wrapperCol={{ span: 14 }}
  6554. label="费减:"
  6555. style={{
  6556. display: this.state.displayFees,
  6557. marginLeft: "55px",
  6558. }}
  6559. >
  6560. <span style={{ color: "red", marginRight: "27px" }}>
  6561. *
  6562. </span>
  6563. <Radio.Group
  6564. value={this.state.costReduction}
  6565. onChange={(e) => {
  6566. this.setState({ costReduction: e.target.value });
  6567. }}
  6568. >
  6569. <Radio value="1">有费减</Radio>
  6570. <Radio value="0">无费减</Radio>
  6571. </Radio.Group>
  6572. </FormItem>
  6573. <FormItem
  6574. className="half-item"
  6575. {...formItemLayout}
  6576. label="实签价格(万元)"
  6577. >
  6578. <Input
  6579. placeholder="请输入实签价格"
  6580. value={this.state.commodityPrice}
  6581. style={{ width: "200px" }}
  6582. onChange={(e) => {
  6583. this.setState({ commodityPrice: e.target.value });
  6584. }}
  6585. ref="commodityPrice"
  6586. />
  6587. <span className="mandatory">*</span>
  6588. </FormItem>
  6589. <FormItem
  6590. className="half-item"
  6591. {...formItemLayout}
  6592. label="主要业务"
  6593. >
  6594. <Select
  6595. placeholder="选择是否为主要业务"
  6596. style={{ width: "200px" }}
  6597. value={this.state.main}
  6598. onChange={(e) => {
  6599. this.setState({ main: e });
  6600. }}
  6601. >
  6602. {boutique.map(function (item) {
  6603. return (
  6604. <Select.Option key={item.value}>
  6605. {item.key}
  6606. </Select.Option>
  6607. );
  6608. })}
  6609. </Select>
  6610. <span className="mandatory">*</span>
  6611. </FormItem>
  6612. <div className="clearfix">
  6613. <FormItem
  6614. labelCol={{ span: 4 }}
  6615. wrapperCol={{ span: 16 }}
  6616. label="服务说明"
  6617. >
  6618. <Input
  6619. type="textarea"
  6620. placeholder="请输入服务说明"
  6621. value={this.state.taskComment}
  6622. onChange={(e) => {
  6623. this.setState({ taskComment: e.target.value });
  6624. }}
  6625. />
  6626. </FormItem>
  6627. </div>
  6628. <FormItem
  6629. wrapperCol={{ span: 12, offset: 4 }}
  6630. className="half-middle"
  6631. >
  6632. <Button
  6633. className="submitSave"
  6634. type="primary"
  6635. onClick={this.changeProSubmit}
  6636. >
  6637. 保存
  6638. </Button>
  6639. <Button
  6640. className="submitSave"
  6641. type="ghost"
  6642. onClick={this.nextCancel}
  6643. >
  6644. 取消
  6645. </Button>
  6646. </FormItem>
  6647. </div>
  6648. </Spin>
  6649. </Form>
  6650. </Modal>
  6651. {this.state.lookVisible ? <Modal
  6652. maskClosable={false}
  6653. visible={this.state.lookVisible}
  6654. onOk={this.noCancel}
  6655. onCancel={this.noCancel}
  6656. width="800px"
  6657. title={"退单申请"}
  6658. footer=""
  6659. className="admin-desc-content"
  6660. >
  6661. <Form layout="horizontal">
  6662. <Spin spinning={this.state.loading}>
  6663. <div className="clearfix">
  6664. <FormItem
  6665. labelCol={{ span: 4 }}
  6666. wrapperCol={{ span: 16 }}
  6667. label="终止合同"
  6668. >
  6669. <Picture
  6670. domId={'addService4'}
  6671. fileList={(e) => {
  6672. this.setState({ contractUrl: e });
  6673. }}
  6674. pictureUrl={this.state.contractUrl}
  6675. visible={this.props.visible}
  6676. data={{
  6677. sign: "order_refund_file",
  6678. url: "/api/admin/newOrder/uploadRefundOrderFile",
  6679. number: 8,
  6680. }}
  6681. />
  6682. </FormItem>
  6683. </div>
  6684. <div className="clearfix">
  6685. <FormItem
  6686. labelCol={{ span: 4 }}
  6687. wrapperCol={{ span: 16 }}
  6688. label="退单申请表"
  6689. >
  6690. <Picture
  6691. domId={'addService5'}
  6692. fileList={(e) => {
  6693. this.setState({ applicationUrl: e });
  6694. }}
  6695. pictureUrl={this.state.applicationUrl}
  6696. visible={this.props.visible}
  6697. data={{
  6698. sign: "order_refund_file",
  6699. url: "/api/admin/newOrder/uploadRefundOrderFile",
  6700. number: 8,
  6701. }}
  6702. />
  6703. </FormItem>
  6704. </div>
  6705. <div className="clearfix">
  6706. <FormItem
  6707. labelCol={{ span: 4 }}
  6708. wrapperCol={{ span: 16 }}
  6709. label="退单理由"
  6710. >
  6711. <Input
  6712. type="textarea"
  6713. placeholder="请输入退单理由"
  6714. rows={4}
  6715. value={this.state.reason}
  6716. onChange={(e) => {
  6717. this.setState({ reason: e.target.value });
  6718. }}
  6719. />
  6720. </FormItem>
  6721. </div>
  6722. <div className="clearfix">
  6723. <Button
  6724. className="cancel"
  6725. type="primary"
  6726. onClick={this.tuidanOk}
  6727. style={{ marginLeft: "50px" }}
  6728. htmlType="submit"
  6729. >
  6730. 确定退单
  6731. </Button>
  6732. <Button
  6733. className="cancel"
  6734. type="ghost"
  6735. onClick={this.noCancel}
  6736. style={{ marginLeft: "50px" }}
  6737. >
  6738. 取消
  6739. </Button>
  6740. </div>
  6741. </Spin>
  6742. </Form>
  6743. </Modal> : <div/>}
  6744. <Modal
  6745. title="修改项目金额及数量"
  6746. visible={this.state.editProVisible}
  6747. onOk={this.submitEditPro}
  6748. width={300}
  6749. okText={"保存"}
  6750. onCancel={() => {
  6751. this.setState({
  6752. editProVisible: false,
  6753. });
  6754. }}
  6755. >
  6756. <div className="clearfix">
  6757. <FormItem
  6758. labelCol={{ span: 6 }}
  6759. wrapperCol={{ span: 14 }}
  6760. label="项目金额"
  6761. style={{
  6762. display: this.state.editSplitStatus == 2 ? "none" : "block",
  6763. }}
  6764. >
  6765. <Input
  6766. placeholder="请输入金额"
  6767. rows={4}
  6768. // disabled={this.state.editSplitStatus == 0 ? true : false}
  6769. value={this.state.editProMoney}
  6770. onChange={(e) => {
  6771. this.setState({ editProMoney: e.target.value });
  6772. }}
  6773. />
  6774. </FormItem>
  6775. <FormItem
  6776. labelCol={{ span: 6 }}
  6777. wrapperCol={{ span: 14 }}
  6778. label="项目数量"
  6779. >
  6780. <Input
  6781. placeholder="请输入数量"
  6782. rows={4}
  6783. value={this.state.editProCommodityQuantity}
  6784. onChange={(e) => {
  6785. this.setState({ editProCommodityQuantity: e.target.value });
  6786. }}
  6787. />
  6788. </FormItem>
  6789. </div>
  6790. </Modal>
  6791. <Modal
  6792. title="修改催款节点金额"
  6793. visible={this.state.editCuiVisible}
  6794. onOk={this.submitEditCui}
  6795. okText={"保存"}
  6796. width={300}
  6797. onCancel={(e) => {
  6798. this.setState({
  6799. editCuiVisible: false,
  6800. });
  6801. }}
  6802. >
  6803. <div className="clearfix">
  6804. <FormItem
  6805. labelCol={{ span: 6 }}
  6806. wrapperCol={{ span: 14 }}
  6807. label="催款金额"
  6808. >
  6809. <Input
  6810. placeholder="请输入金额"
  6811. rows={4}
  6812. value={this.state.editCuiMoney}
  6813. onChange={(e) => {
  6814. this.setState({ editCuiMoney: e.target.value });
  6815. }}
  6816. />
  6817. </FormItem>
  6818. </div>
  6819. </Modal>
  6820. <OrderRiZi
  6821. dataSourcerizhi={this.state.dataSourcerizhi}
  6822. closeOrderLog={this.closeOrderLog}
  6823. visible={this.state.rizhivisible}
  6824. loading={this.state.loading}
  6825. />
  6826. </div>
  6827. );
  6828. },
  6829. })
  6830. );
  6831. export default Form.create()(NewService);