addService.jsx 308 KB

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