addService.jsx 303 KB

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