addService.jsx 237 KB

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