addService.jsx 300 KB

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