addService.jsx 243 KB

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