addService.jsx 244 KB

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