addService.jsx 309 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481
  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. this.state.typeChange == 8
  3704. ) {
  3705. if (Number(this.state.settlementAmount) < Number(this.state.changeAmount)) {
  3706. message.warning("退款金额大于已收款金额");
  3707. return;
  3708. }
  3709. }
  3710. if (this.state.processStatus != 6 && this.state.processStatus != 7) {
  3711. message.warning("当前订单流程不能发起变更!");
  3712. return false;
  3713. }
  3714. if (this.state.changeAmount === "") {
  3715. message.warning("申请退款金额不能为空!");
  3716. return false;
  3717. }
  3718. if (this.state.remarksC == "") {
  3719. message.warning("请正确填写变更原因");
  3720. return false;
  3721. }
  3722. if (this.state.startRemarks == "") {
  3723. message.warning("请正确填写备注信息");
  3724. return false;
  3725. }
  3726. let theorgCodeUrl = [];
  3727. if (this.state.voucherUrl.length) {
  3728. let picArr = [];
  3729. this.state.voucherUrl.map(function (item) {
  3730. if (
  3731. item.response &&
  3732. item.response.data &&
  3733. item.response.data.length
  3734. ) {
  3735. picArr.push(item.response.data);
  3736. }
  3737. });
  3738. theorgCodeUrl = picArr.join(",");
  3739. }
  3740. let newContractUrl = [];
  3741. if (this.state.newContractUrl.length) {
  3742. let cArr = [];
  3743. this.state.newContractUrl.map(function (item) {
  3744. if (
  3745. item.response &&
  3746. item.response.data &&
  3747. item.response.data.length
  3748. ) {
  3749. cArr.push(item.response.data);
  3750. }
  3751. });
  3752. newContractUrl = cArr.join(",");
  3753. }
  3754. if (this.state.isNew && newContractUrl.length == 0) {
  3755. message.warning("请上传新合同扫描件!");
  3756. return
  3757. }
  3758. this.setState({
  3759. loading: true,
  3760. });
  3761. $.ajax({
  3762. method: "post",
  3763. dataType: "json",
  3764. crossDomain: false,
  3765. url: globalConfig.context + "/api/admin/orderChange/addOrderChange",
  3766. data: {
  3767. orderNo: this.state.orderNo, //订单编号
  3768. processState: 0,
  3769. status: 0,
  3770. startRemarks: this.state.startRemarks,
  3771. remarks: this.state.remarksC,
  3772. voucherUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
  3773. totalAmount: this.state.totalAmount,
  3774. firstAmount: this.state.firstAmount,
  3775. settlementAmount: this.state.settlementAmount,
  3776. changeAmount: this.state.changeAmount,
  3777. applicant: this.state.salesmanName,
  3778. depName: this.state.depName,
  3779. type: this.state.typeChange,
  3780. contractPictureUrl: this.state.isNew
  3781. ? newContractUrl : undefined,//合同替换件
  3782. },
  3783. }).done(
  3784. function (data) {
  3785. this.setState({
  3786. loading: false,
  3787. });
  3788. if (!data.error.length) {
  3789. message.success("发起变更草稿");
  3790. this.setState(
  3791. {
  3792. isCaoGao: true,
  3793. loading: false,
  3794. },
  3795. () => {
  3796. this.callback("2");
  3797. }
  3798. );
  3799. } else {
  3800. message.warning(data.error[0].message);
  3801. }
  3802. }.bind(this)
  3803. );
  3804. // if (this.state.typeChange == 0) {
  3805. // $.ajax({
  3806. // method: "post",
  3807. // dataType: "json",
  3808. // crossDomain: false,
  3809. // url: globalConfig.context + "/api/admin/orderChange/addOrderChange",
  3810. // data: {
  3811. // orderNo: this.state.orderNo, //订单编号
  3812. // processState: 1,
  3813. // status: 1,
  3814. // startRemarks: this.state.startRemarks,
  3815. // remarks: this.state.remarksC,
  3816. // voucherUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
  3817. // totalAmount: this.state.totalAmount,
  3818. // firstAmount: this.state.firstAmount,
  3819. // settlementAmount: this.state.settlementAmount,
  3820. // changeAmount: this.state.changeAmount,
  3821. // applicant: this.state.salesmanName,
  3822. // depName: this.state.depName,
  3823. // type: this.state.typeChange,
  3824. // contractPictureUrl: this.state.isNew
  3825. // ? newContractUrl : undefined,//合同替换件
  3826. // },
  3827. // }).done(
  3828. // function (data) {
  3829. // this.setState({
  3830. // loading: false,
  3831. // });
  3832. // if (!data.error.length) {
  3833. // message.success("发起变更成功");
  3834. // this.handleCancelclose();
  3835. // } else {
  3836. // message.warning(data.error[0].message);
  3837. // this.setState({
  3838. // loading: false,
  3839. // });
  3840. // }
  3841. // }.bind(this)
  3842. // );
  3843. // } else {
  3844. // $.ajax({
  3845. // method: "post",
  3846. // dataType: "json",
  3847. // crossDomain: false,
  3848. // url: globalConfig.context + "/api/admin/orderChange/addOrderChange",
  3849. // data: {
  3850. // orderNo: this.state.orderNo, //订单编号
  3851. // processState: 0,
  3852. // status: 0,
  3853. // startRemarks: this.state.startRemarks,
  3854. // remarks: this.state.remarksC,
  3855. // voucherUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
  3856. // totalAmount: this.state.totalAmount,
  3857. // firstAmount: this.state.firstAmount,
  3858. // settlementAmount: this.state.settlementAmount,
  3859. // changeAmount: this.state.changeAmount,
  3860. // applicant: this.state.salesmanName,
  3861. // depName: this.state.depName,
  3862. // type: this.state.typeChange,
  3863. // contractPictureUrl: this.state.isNew
  3864. // ? newContractUrl : undefined,//合同替换件
  3865. // },
  3866. // }).done(
  3867. // function (data) {
  3868. // this.setState({
  3869. // loading: false,
  3870. // });
  3871. // if (!data.error.length) {
  3872. // message.success("发起变更草稿");
  3873. // this.setState(
  3874. // {
  3875. // isCaoGao: true,
  3876. // loading: false,
  3877. // },
  3878. // () => {
  3879. // this.callback("2");
  3880. // }
  3881. // );
  3882. // } else {
  3883. // message.warning(data.error[0].message);
  3884. // }
  3885. // }.bind(this)
  3886. // );
  3887. // }
  3888. },
  3889. reset() {
  3890. this.setState({
  3891. startRemarks: "",
  3892. remarksC: "",
  3893. voucherUrl: [],
  3894. newContractUrl: [],
  3895. totalAmount: undefined,
  3896. settlementAmount: undefined,
  3897. changeAmount: "0",
  3898. applicant: undefined,
  3899. depNameChange: undefined,
  3900. typeChange: undefined,
  3901. displayFees: "none",
  3902. officialCost: "",
  3903. costReduction: "",
  3904. });
  3905. },
  3906. componentWillMount() {
  3907. const nextProps = this.props
  3908. this.state.visible = nextProps.showDesc;
  3909. this.state.signBillVisible = nextProps.signBillVisible;
  3910. if (this.state.signBillVisible) {
  3911. this.loaduser(nextProps.uid);
  3912. this.assistList(nextProps.uid);
  3913. this.orderServiceList(nextProps.uid);
  3914. // this.publicByOrder(nextProps.uid);
  3915. }
  3916. if (nextProps.userDetaile && nextProps.showDesc) {
  3917. this.loaduser(nextProps.datauser);
  3918. this.assistList(nextProps.datauser);
  3919. this.orderServiceList(nextProps.datauser);
  3920. // this.publicByOrder(nextProps.datauser);
  3921. this.jiedian(nextProps.datauser.orderNo);
  3922. this.jiedianNew(nextProps.datauser.orderNo);
  3923. this.loadData(nextProps.datauser);
  3924. this.getChangeData(nextProps.datauser);
  3925. } else {
  3926. this.setState({
  3927. orderType: undefined,
  3928. customerName: "",
  3929. autoId: "",
  3930. customerArr: [],
  3931. contractType: undefined,
  3932. bussStats: false,
  3933. userType: undefined,
  3934. channelName: "",
  3935. channelid: "",
  3936. channelArr: [],
  3937. selectSales: undefined,
  3938. });
  3939. }
  3940. },
  3941. // componentWillReceiveProps(nextProps) {
  3942. // //props改变时触发
  3943. // },
  3944. //查看变更记录
  3945. getChangeData(record) {
  3946. this.setState({
  3947. loading: true,
  3948. });
  3949. $.ajax({
  3950. method: "get",
  3951. dataType: "json",
  3952. crossDomain: false,
  3953. url: globalConfig.context + "/api/admin/orderChange/orderChangeDetails",
  3954. data: {
  3955. orderNo: record ? record.orderNo : this.props.datauser.orderNo,
  3956. },
  3957. success: function (data) {
  3958. this.setState({
  3959. loading: false,
  3960. });
  3961. let url = window.location.href.substring(7);
  3962. if (data.data && data.data.length) {
  3963. let thisdata = data.data[data.data.length - 1];
  3964. thisdata.typeChange = thisdata.type;
  3965. thisdata.remarksC = thisdata.remarks;
  3966. thisdata.startRemarks = thisdata.zxsRemarks;
  3967. thisdata.voucherUrl = thisdata.voucherUrl
  3968. ? splitUrl(
  3969. thisdata.voucherUrl,
  3970. ",",
  3971. globalConfig.avatarHost + "/upload",
  3972. url
  3973. )
  3974. : [];
  3975. thisdata.contractPictureUrl = thisdata.contractPictureUrl
  3976. ? splitUrl(
  3977. thisdata.contractPictureUrl,
  3978. ",",
  3979. globalConfig.avatarHost + "/upload",
  3980. url
  3981. )
  3982. : [];
  3983. this.proList(thisdata.id);
  3984. this.cuiList(thisdata.id);
  3985. this.logList(thisdata.id);
  3986. this.setState({
  3987. //判断是否有合同变更记录
  3988. isJilu: true,
  3989. detailChange: thisdata,
  3990. });
  3991. }
  3992. }.bind(this),
  3993. });
  3994. },
  3995. showConfirm(fn, record) {
  3996. confirm({
  3997. title: "确定删除此项目吗?",
  3998. content: (
  3999. <span style={{ color: "red" }}>
  4000. 删除后会将该项目下的所有催款节点自动清除!!!
  4001. </span>
  4002. ),
  4003. onOk() {
  4004. fn(record);
  4005. },
  4006. onCancel() { },
  4007. });
  4008. },
  4009. viewConfirm(fn, record) {
  4010. confirm({
  4011. title: "确定删除此服务记录吗?",
  4012. // content: (
  4013. // <span style={{ color: "red" }}>
  4014. // 删除后会将该项目下的所有催款节点自动清除!!!
  4015. // </span>
  4016. // ),
  4017. onOk() {
  4018. fn(record);
  4019. },
  4020. onCancel() { },
  4021. });
  4022. },
  4023. changeAddPro() {
  4024. // this.getpatentTypeList();
  4025. this.setState({
  4026. changeVisible: true,
  4027. newData: this.state.proDataSource,
  4028. // gid: "",
  4029. // customerArr: [],
  4030. // commodityName: "",
  4031. // commodityQuantity: "",
  4032. // commodityId: "",
  4033. // taskComment: "",
  4034. // main: undefined,
  4035. // commodityPrice: "",
  4036. // displayFees: "none",
  4037. // officialCost: "",
  4038. // costReduction: "",
  4039. });
  4040. },
  4041. changeProSubmit() {
  4042. if (this.state.gid == undefined || !this.state.gid) {
  4043. message.warning("服务名称不匹配!");
  4044. return
  4045. }
  4046. let reg = /^([0]|[1-9][0-9]*)$/;
  4047. if (
  4048. !this.state.commodityQuantity ||
  4049. !reg.test(this.state.commodityQuantity)
  4050. ) {
  4051. message.warning("请输入正确商品数量!");
  4052. return
  4053. }
  4054. if (this.state.displayFees === 'block') {
  4055. if (this.state.patentType === "" && !this.state.patentTransfer) {
  4056. message.warning("请选择专利类型!");
  4057. return
  4058. }
  4059. if (this.state.officialCost === '') {
  4060. message.warning("请选择官费!");
  4061. return
  4062. }
  4063. if (this.state.costReduction === "" && (this.state.patentType === 0 || this.state.patentType === 2) && this.state.officialCost === 1) {
  4064. message.warning("请选择费减!");
  4065. return
  4066. }
  4067. }
  4068. if (isNaN(parseFloat(this.state.commodityPrice))) {
  4069. message.warning("请输入正确的金额!");
  4070. return;
  4071. }
  4072. if (this.state.addProjectType == "3") {// 3审计
  4073. if (this.state.serviceLife.length === 0) {
  4074. message.warning("请选择服务年限!");
  4075. return
  4076. }
  4077. if (this.state.serviceLife.length != this.state.commodityQuantity) {
  4078. message.warning("服务数量与服务年限不符!");
  4079. return
  4080. }
  4081. }
  4082. if (!this.state.main) {
  4083. message.warning("请选择是否为主要项目!");
  4084. return
  4085. }
  4086. if (this.state.addProjectType === 5) {// 5高新
  4087. if (!this.state.declarationBatch) {
  4088. message.warning("请选择企业要求申报批次!");
  4089. return
  4090. }
  4091. if (!this.state.serviceYear) {
  4092. message.warning("请选择申报年份!");
  4093. return
  4094. }
  4095. }
  4096. if (this.state.isVip == 6) {//会员
  4097. if (this.state.yearSum === undefined) {
  4098. message.warning("请选择会员总服务年限!");
  4099. return
  4100. }
  4101. if (this.state.serviceLife.length === 0) {
  4102. message.warning("请添加会员服务年限!");
  4103. return
  4104. }
  4105. if (this.state.serviceLife.length != this.state.yearSum) {
  4106. message.warning("会员服务年限与总年限不符合!");
  4107. return
  4108. }
  4109. if (this.state.serviceYear === undefined) {
  4110. message.warning("请选择本次派单年份!");
  4111. return
  4112. }
  4113. if (this.state.contractTerm.length === 0) {
  4114. message.warning("请填写合同期!");
  4115. return
  4116. }
  4117. }
  4118. this.setState({
  4119. loading: true,
  4120. });
  4121. let type = 0;
  4122. if (this.state.typeChange == 4 || this.state.typeChange == 5) {
  4123. type = 1;
  4124. }
  4125. let infor = {
  4126. commodityId: this.state.gid, //商品ID
  4127. orderNo: this.props.datauser.orderNo, //订单编号
  4128. commodityName: this.state.commodityName, //商品名称
  4129. commodityQuantity: this.state.commodityQuantity, //商品数量
  4130. commodityPrice: this.state.commodityPrice, //签单总价
  4131. taskComment: this.state.taskComment, //服务说明
  4132. main: this.state.main, //是否为主要项目
  4133. cid: this.state.changeId, //变更ID
  4134. type,
  4135. }
  4136. if (this.state.displayFees === 'block') {
  4137. infor.officialCost = this.state.officialCost //是否有官费
  4138. infor.costReduction = (this.state.patentType === 0 || this.state.patentType === 2) ? (this.state.officialCost === 1 ? this.state.costReduction : 0) : 0//是否有费减
  4139. infor.patentType = this.state.patentType //专利类型
  4140. }
  4141. if (this.state.isIso) {
  4142. infor.ifCertificationFee = this.state.ifCertificationFee || undefined;//是否包含认证费用
  4143. }
  4144. if (this.state.addProjectType == "3") {//审计
  4145. infor.serviceLife = JSON.stringify(this.state.serviceLife) //服务年限
  4146. }
  4147. if (this.state.addProjectType == "5") {//高新
  4148. infor.declarationBatch = this.state.declarationBatch || 1//申报批次
  4149. infor.serviceYear = this.state.serviceYear //申报年份
  4150. }
  4151. if (this.state.isVip == 6) {//会员
  4152. infor.yearSum = this.state.yearSum //会员总服务年限
  4153. infor.serviceLife = JSON.stringify(this.state.serviceLife) //会员服务年限
  4154. infor.serviceYear = this.state.serviceYear //本次派单年份
  4155. infor.contractTerm = JSON.stringify(this.state.contractTerm)//合同期
  4156. }
  4157. $.ajax({
  4158. method: "post",
  4159. dataType: "json",
  4160. crossDomain: false,
  4161. url: globalConfig.context + "/api/admin/orderChange/addChangeTask",
  4162. data: infor,
  4163. success: function (data) {
  4164. let theArr = [];
  4165. if (data.error && data.error.length) {
  4166. message.warning(data.error[0].message);
  4167. } else {
  4168. message.success("保存成功");
  4169. this.nextCancel();
  4170. this.proList();
  4171. }
  4172. }.bind(this),
  4173. }).always(
  4174. function () {
  4175. this.setState({
  4176. loading: false,
  4177. });
  4178. }.bind(this)
  4179. );
  4180. },
  4181. changeDeletePro(record) {
  4182. this.setState({
  4183. loading: true,
  4184. });
  4185. $.ajax({
  4186. method: "post",
  4187. dataType: "json",
  4188. crossDomain: false,
  4189. url: globalConfig.context + "/api/admin/orderChange/updateChangeTask",
  4190. data: {
  4191. id: record.id,
  4192. type: 3,
  4193. tid: record.tid,
  4194. splitStatus: record.splitStatus,
  4195. },
  4196. success: function (data) {
  4197. let theArr = [];
  4198. if (data.error && data.error.length) {
  4199. message.warning(data.error[0].message);
  4200. } else {
  4201. message.success("删除成功");
  4202. this.proList();
  4203. this.cuiList();
  4204. }
  4205. }.bind(this),
  4206. }).always(
  4207. function () {
  4208. this.setState({
  4209. loading: false,
  4210. });
  4211. }.bind(this)
  4212. );
  4213. },
  4214. //点击新增变更催款节点
  4215. changeAddCui() {
  4216. this.state.cuiDataSource.push({
  4217. key: this.state.cuiDataSource.length,
  4218. money: "",
  4219. dunSubject: undefined,
  4220. orderNo: this.state.orderNo,
  4221. dunTarget: this.state.kehuId,
  4222. });
  4223. this.setState({
  4224. cuiDataSource: this.state.cuiDataSource,
  4225. cuiFlag: true,
  4226. });
  4227. },
  4228. //删除变更收款节点
  4229. changeDeleteCui(index) {
  4230. if (index.id) {
  4231. this.state.cuiDataSource.splice(index.id, 1);
  4232. this.setState({
  4233. contactListNew: this.state.cuiDataSource,
  4234. cuiFlag: false,
  4235. addFlag: false,
  4236. boFlag: false,
  4237. });
  4238. $.ajax({
  4239. url: globalConfig.context + "/api/admin/orderChange/updateChangeDun",
  4240. method: "post",
  4241. data: {
  4242. id: index.id,
  4243. type: 3,
  4244. tid: index.tid,
  4245. did: index.did,
  4246. },
  4247. }).done(
  4248. function (data) {
  4249. this.setState({
  4250. loading: false,
  4251. });
  4252. if (!data.error.length) {
  4253. message.success("删除成功!");
  4254. this.setState({
  4255. cuiFlag: false,
  4256. });
  4257. this.cuiList();
  4258. this.proList();
  4259. } else {
  4260. message.warning(data.error[0].message);
  4261. }
  4262. }.bind(this)
  4263. );
  4264. } else {
  4265. this.state.cuiDataSource.splice(index.key, 1);
  4266. this.setState({
  4267. cuiDataSource: this.state.cuiDataSource,
  4268. cuiFlag: false,
  4269. addFlag: false,
  4270. boFlag: false,
  4271. });
  4272. }
  4273. },
  4274. changeSaveCui(record) {
  4275. if (record.dunType == 0) {
  4276. if (!record.customizeTimes) {
  4277. message.warning("请输入自定义时间");
  4278. return;
  4279. } else if (!record.customizeName) {
  4280. message.warning("请输入自定义科目");
  4281. return;
  4282. }
  4283. }
  4284. if (record.boStatus == "false") {
  4285. record.boStatus = false;
  4286. } else if (record.boStatus == "true") {
  4287. record.boStatus = true;
  4288. }
  4289. if (!this.state.yearFlag) {
  4290. if (!record.effectiveCount) {
  4291. message.warning("请选择服务年限");
  4292. return;
  4293. }
  4294. } else {
  4295. record.effectiveCount = "";
  4296. }
  4297. if (isNaN(parseInt(record.money)) && !record.boStatus) {
  4298. message.warning("请填写金额");
  4299. return;
  4300. } else if (isNaN(parseInt(record.money)) && record.boStatus) {
  4301. message.warning("请填写比例");
  4302. return;
  4303. }
  4304. if (record.boStatus) {
  4305. if (
  4306. typeof +record.money == "number" &&
  4307. +record.money >= 0 &&
  4308. +record.money <= 1
  4309. ) {
  4310. record.appropriationRatio = record.money;
  4311. } else {
  4312. message.warning("金额比例填写错误,比例范围0~1");
  4313. return;
  4314. }
  4315. }
  4316. if (!record.dunType && record.dunType != 0) {
  4317. message.warning("请选择对应科目");
  4318. return;
  4319. }
  4320. if (record.dunType != 1) {
  4321. record.waitDay = "";
  4322. }
  4323. this.setState({
  4324. loading: true,
  4325. });
  4326. if (record.boStatus) {
  4327. $.ajax({
  4328. url: globalConfig.context + "/api/admin/orderChange/addChangeDun",
  4329. method: "post",
  4330. data: {
  4331. orderNo: record.orderNo,
  4332. ctid: record.ctid,
  4333. projectType: record.sort,
  4334. dunType: record.dunType,
  4335. appropriationRatio: record.appropriationRatio,
  4336. waitDay: record.waitDay,
  4337. effectiveCount: record.effectiveCount,
  4338. cid: this.state.changeId, //变更ID
  4339. customizeTimes:
  4340. record.dunType == 0 ? record.customizeTimes : undefined,
  4341. customizeName:
  4342. record.dunType == 0 ? record.customizeName : undefined,
  4343. },
  4344. }).done(
  4345. function (data) {
  4346. this.setState({
  4347. loading: false,
  4348. });
  4349. if (!data.error.length) {
  4350. message.success("保存成功!");
  4351. this.setState({
  4352. cuiFlag: false,
  4353. boFlag: false,
  4354. addFlag: false,
  4355. });
  4356. this.cuiList();
  4357. } else {
  4358. message.warning(data.error[0].message);
  4359. }
  4360. }.bind(this)
  4361. );
  4362. } else {
  4363. $.ajax({
  4364. url: globalConfig.context + "/api/admin/orderChange/addChangeDun",
  4365. method: "post",
  4366. data: {
  4367. orderNo: record.orderNo,
  4368. ctid: record.ctid,
  4369. projectType: record.sort,
  4370. dunType: record.dunType,
  4371. money: record.money,
  4372. waitDay: record.waitDay,
  4373. effectiveCount: record.effectiveCount,
  4374. cid: this.state.changeId, //变更ID
  4375. customizeTimes:
  4376. record.dunType == 0 ? record.customizeTimes : undefined,
  4377. customizeName:
  4378. record.dunType == 0 ? record.customizeName : undefined,
  4379. },
  4380. }).done(
  4381. function (data) {
  4382. this.setState({
  4383. loading: false,
  4384. });
  4385. if (!data.error.length) {
  4386. message.success("保存成功!");
  4387. this.setState({
  4388. cuiFlag: false,
  4389. boFlag: false,
  4390. addFlag: false,
  4391. });
  4392. this.cuiList();
  4393. } else {
  4394. message.warning(data.error[0].message);
  4395. }
  4396. }.bind(this)
  4397. );
  4398. }
  4399. },
  4400. submitChange() {
  4401. if (
  4402. this.state.typeChange == undefined ||
  4403. (this.state.typeChange == "" && this.state.typeChange != 0)
  4404. ) {
  4405. message.warning("请选择变更类型");
  4406. return false;
  4407. }
  4408. if (this.state.totalAmount === "") {
  4409. message.warning("合同金额不能为空!");
  4410. return false;
  4411. }
  4412. if (this.state.firstAmount === "") {
  4413. message.warning("首付款金额不能为空!");
  4414. return false;
  4415. }
  4416. if (Number(this.state.totalAmount) < Number(this.state.firstAmount)) {
  4417. message.warning("首付款不能大于合同额!");
  4418. return;
  4419. }
  4420. if (
  4421. this.state.typeChange == 0 ||
  4422. this.state.typeChange == 1 ||
  4423. this.state.typeChange == 3 ||
  4424. this.state.typeChange == 8
  4425. ) {
  4426. if (Number(this.state.settlementAmount) < Number(this.state.changeAmount)) {
  4427. message.warning("退款金额大于已收款金额");
  4428. return;
  4429. }
  4430. }
  4431. if (this.state.processStatus != 6 && this.state.processStatus != 7) {
  4432. message.warning("当前订单流程不能发起变更!");
  4433. return false;
  4434. }
  4435. if (this.state.changeAmount === "") {
  4436. message.warning("申请退款金额不能为空!");
  4437. return false;
  4438. }
  4439. if (this.state.remarksC == "") {
  4440. message.warning("请正确填写变更原因");
  4441. return false;
  4442. }
  4443. if (this.state.startRemarks == "") {
  4444. message.warning("请正确填写备注信息");
  4445. return false;
  4446. }
  4447. let theorgCodeUrl = [];
  4448. if (this.state.voucherUrl.length) {
  4449. let picArr = [];
  4450. this.state.voucherUrl.map(function (item) {
  4451. if (
  4452. item.response &&
  4453. item.response.data &&
  4454. item.response.data.length
  4455. ) {
  4456. picArr.push(item.response.data);
  4457. }
  4458. });
  4459. theorgCodeUrl = picArr.join(",");
  4460. }
  4461. let newContractUrl = [];
  4462. if (this.state.newContractUrl.length) {
  4463. let cArr = [];
  4464. this.state.newContractUrl.map(function (item) {
  4465. if (
  4466. item.response &&
  4467. item.response.data &&
  4468. item.response.data.length
  4469. ) {
  4470. cArr.push(item.response.data);
  4471. }
  4472. });
  4473. newContractUrl = cArr.join(",");
  4474. }
  4475. if (this.state.isNew && newContractUrl.length == 0) {
  4476. message.warning("请上传新合同扫描件!");
  4477. return
  4478. }
  4479. this.setState({
  4480. loading: true,
  4481. });
  4482. $.ajax({
  4483. url: globalConfig.context + "/api/admin/orderChange/updateOrderChange",
  4484. method: "post",
  4485. data: {
  4486. id: this.state.changeId,
  4487. changeType: 0,
  4488. orderNo: this.state.orderNo, //订单编号
  4489. processState: 0,
  4490. startRemarks: this.state.startRemarks,
  4491. remarks: this.state.remarksC,
  4492. voucherUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
  4493. totalAmount: this.state.totalAmount,//合同额
  4494. firstAmount: this.state.firstAmount,//首付款
  4495. settlementAmount: this.state.settlementAmount,
  4496. changeAmount: this.state.changeAmount,
  4497. applicant: this.state.salesmanName,
  4498. depName: this.state.depName,
  4499. type: this.state.typeChange,
  4500. contractPictureUrl: this.state.isNew
  4501. ? newContractUrl : undefined,//合同替换件
  4502. },
  4503. }).done(
  4504. function (data) {
  4505. if (!data.error.length) {
  4506. this.setState({
  4507. loading: false,
  4508. });
  4509. message.success("发起变更成功");
  4510. this.handleCancelclose();
  4511. } else {
  4512. message.warning(data.error[0].message);
  4513. this.setState({
  4514. loading: false,
  4515. });
  4516. }
  4517. }.bind(this)
  4518. );
  4519. },
  4520. editCui(record) {
  4521. this.setState({
  4522. editCuiVisible: true,
  4523. editCuiMoney: record.appropriationRatio
  4524. ? record.appropriationRatio
  4525. : record.money,
  4526. appropriationRatio: record.appropriationRatio,
  4527. editCuiTid: record.tid,
  4528. editCuiDid: record.did,
  4529. editCuiId: record.id,
  4530. });
  4531. },
  4532. editPro(record) {
  4533. this.setState({
  4534. editProVisible: true,
  4535. dataInfor: record,
  4536. newData: this.state.proDataSource,
  4537. });
  4538. // this.setState({
  4539. // editProVisible: true,
  4540. // editSplitStatus: record.splitStatus,
  4541. // editProMoney: record.commodityPrice,
  4542. // editProCommodityQuantity: record.commodityQuantity,
  4543. // editProTid: record.tid,
  4544. // editProId: record.id,
  4545. // });
  4546. },
  4547. submitEditCui(type) {
  4548. if (isNaN(parseFloat(this.state.editCuiMoney))) {
  4549. if (type === 1) {
  4550. message.warn("请输入比例");
  4551. } else {
  4552. message.warn("请输入金额");
  4553. }
  4554. return;
  4555. }
  4556. this.setState({
  4557. loading: true,
  4558. });
  4559. let data = {
  4560. id: this.state.editCuiId,
  4561. type: this.state.editCuiTid ? 2 : 1,
  4562. tid: this.state.editCuiTid,
  4563. };
  4564. if (type === 1) {
  4565. data.appropriationRatio = this.state.editCuiMoney;
  4566. } else {
  4567. data.money = this.state.editCuiMoney;
  4568. }
  4569. $.ajax({
  4570. url: globalConfig.context + "/api/admin/orderChange/updateChangeDun",
  4571. method: "post",
  4572. data,
  4573. }).done(
  4574. function (data) {
  4575. this.setState({
  4576. loading: false,
  4577. });
  4578. if (!data.error.length) {
  4579. message.success("修改成功!");
  4580. this.cuiList();
  4581. this.proList();
  4582. this.setState({
  4583. editCuiVisible: false,
  4584. });
  4585. } else {
  4586. message.warning(data.error[0].message);
  4587. }
  4588. }.bind(this)
  4589. );
  4590. },
  4591. submitEditPro() {
  4592. this.setState({
  4593. loading: true,
  4594. });
  4595. $.ajax({
  4596. url: globalConfig.context + "/api/admin/orderChange/updateChangeTask",
  4597. method: "post",
  4598. data: {
  4599. id: this.state.editProId,
  4600. type: this.state.editProTid ? 2 : 1,
  4601. commodityPrice: this.state.editProMoney,
  4602. commodityQuantity: this.state.editProCommodityQuantity,
  4603. tid: this.state.editProTid,
  4604. },
  4605. }).done(
  4606. function (data) {
  4607. this.setState({
  4608. loading: false,
  4609. });
  4610. if (!data.error.length) {
  4611. message.success("修改成功!");
  4612. this.cuiList();
  4613. this.proList();
  4614. this.setState({
  4615. editProVisible: false,
  4616. });
  4617. } else {
  4618. message.warning(data.error[0].message);
  4619. }
  4620. }.bind(this)
  4621. );
  4622. },
  4623. downImg() {
  4624. let num = 0;
  4625. for (let i = 0; i < this.state.orgCodeUrl.length; i++) {
  4626. if (this.state.orgCodeUrl[i].url == this.state.previewImage) {
  4627. num = i;
  4628. }
  4629. }
  4630. if (num == this.state.orgCodeUrl.length - 1) {
  4631. return message.warning("已经是最后一张了哦");
  4632. }
  4633. this.state.previewImage = this.state.orgCodeUrl[num + 1].url;
  4634. this.setState({
  4635. previewImage: this.state.previewImage,
  4636. rotateDeg: 0,
  4637. });
  4638. },
  4639. upImg() {
  4640. let num = 0;
  4641. for (let i = 0; i < this.state.orgCodeUrl.length; i++) {
  4642. if (this.state.orgCodeUrl[i].url == this.state.previewImage) {
  4643. num = i;
  4644. }
  4645. }
  4646. if (num == 0) {
  4647. return message.warning("已经是第一张了哦");
  4648. }
  4649. this.state.previewImage = this.state.orgCodeUrl[num - 1].url;
  4650. this.setState({
  4651. previewImage: this.state.previewImage,
  4652. rotateDeg: 0,
  4653. });
  4654. },
  4655. rotate() {
  4656. let rotateDeg = this.state.rotateDeg + 90;
  4657. this.setState({
  4658. rotateDeg,
  4659. });
  4660. },
  4661. downImgs() {
  4662. let num = 0;
  4663. for (let i = 0; i < this.state.replenishUrl.length; i++) {
  4664. if (this.state.replenishUrl[i].url == this.state.previewImage) {
  4665. num = i;
  4666. }
  4667. }
  4668. if (num == this.state.replenishUrl.length - 1) {
  4669. return message.warning("已经是最后一张了哦");
  4670. }
  4671. this.state.previewImage = this.state.replenishUrl[num + 1].url;
  4672. this.setState({
  4673. previewImage: this.state.previewImage,
  4674. rotateDeg: 0,
  4675. });
  4676. },
  4677. upImgs() {
  4678. let num = 0;
  4679. for (let i = 0; i < this.state.replenishUrl.length; i++) {
  4680. if (this.state.replenishUrl[i].url == this.state.previewImage) {
  4681. num = i;
  4682. }
  4683. }
  4684. if (num == 0) {
  4685. return message.warning("已经是第一张了哦");
  4686. }
  4687. this.state.previewImage = this.state.replenishUrl[num - 1].url;
  4688. this.setState({
  4689. previewImage: this.state.previewImage,
  4690. rotateDeg: 0,
  4691. });
  4692. },
  4693. rotates() {
  4694. let rotateDeg = this.state.rotateDeg + 90;
  4695. this.setState({
  4696. rotateDeg,
  4697. });
  4698. },
  4699. downImgCont() {
  4700. let num = 0;
  4701. for (let i = 0; i < this.state.contentUrl.length; i++) {
  4702. if (this.state.contentUrl[i].url == this.state.previewImage) {
  4703. num = i;
  4704. }
  4705. }
  4706. if (num == this.state.replenishUrl.length - 1) {
  4707. return message.warning("已经是最后一张了哦");
  4708. }
  4709. this.state.previewImage = this.state.contentUrl[num + 1].url;
  4710. this.setState({
  4711. previewImage: this.state.previewImage,
  4712. rotateDeg: 0,
  4713. });
  4714. },
  4715. upImgCont() {
  4716. let num = 0;
  4717. for (let i = 0; i < this.state.contentUrl.length; i++) {
  4718. if (this.state.contentUrl[i].url == this.state.previewImage) {
  4719. num = i;
  4720. }
  4721. }
  4722. if (num == 0) {
  4723. return message.warning("已经是第一张了哦");
  4724. }
  4725. this.state.previewImage = this.state.contentUrl[num - 1].url;
  4726. this.setState({
  4727. previewImage: this.state.previewImage,
  4728. rotateDeg: 0,
  4729. });
  4730. },
  4731. rotateCont() {
  4732. let rotateDeg = this.state.rotateDeg + 90;
  4733. this.setState({
  4734. rotateDeg,
  4735. });
  4736. },
  4737. showConfirmChange(fn, record) {
  4738. confirm({
  4739. title: "确定取消本次变更吗?",
  4740. content: (
  4741. <span style={{ color: "red" }}>取消后本次变更将作废!!!</span>
  4742. ),
  4743. onOk() {
  4744. fn();
  4745. },
  4746. onCancel() { },
  4747. });
  4748. },
  4749. deleteChange() {
  4750. this.setState({
  4751. loading: true,
  4752. });
  4753. $.ajax({
  4754. url: globalConfig.context + "/api/admin/orderChange/cancelOrderChange",
  4755. method: "post",
  4756. data: {
  4757. id: this.state.changeId,
  4758. status: this.state.status,
  4759. processState: this.state.processState,
  4760. orderNo: this.state.orderNo,
  4761. },
  4762. }).done(
  4763. function (data) {
  4764. this.setState({
  4765. loading: false,
  4766. });
  4767. if (!data.error.length) {
  4768. message.success("取消成功!");
  4769. this.handleCancelclose();
  4770. } else {
  4771. message.warning(data.error[0].message);
  4772. }
  4773. }.bind(this)
  4774. );
  4775. },
  4776. // 新增协单人员
  4777. submitOrder() {
  4778. if (!this.state.coor) {
  4779. message.warning("请选择协单人员");
  4780. return;
  4781. }
  4782. this.setState({
  4783. loading: true,
  4784. });
  4785. $.ajax({
  4786. method: "post",
  4787. dataType: "json",
  4788. crossDomain: false,
  4789. url: globalConfig.context + "/api/admin/newOrder/addAssist",
  4790. data: {
  4791. orderNo: this.state.orderNo,
  4792. aid: this.state.coor,
  4793. },
  4794. success: function (data) {
  4795. if (data.error.length) {
  4796. this.setState({
  4797. loading: false,
  4798. });
  4799. message.warning(data.error[0].message);
  4800. } else {
  4801. this.setState({
  4802. loading: false,
  4803. coor: '',
  4804. dataSourceView: [],
  4805. coorVisible: "none",
  4806. });
  4807. this.assistList();
  4808. message.success("添加成功");
  4809. }
  4810. }.bind(this),
  4811. }).always(
  4812. function () {
  4813. this.setState({
  4814. loading: false,
  4815. });
  4816. }.bind(this)
  4817. );
  4818. },
  4819. // // 删除协单人员
  4820. // onClosable(id) {
  4821. // $.ajax({
  4822. // method: "post",
  4823. // dataType: "json",
  4824. // crossDomain: false,
  4825. // url: globalConfig.context + "/api/admin/newOrder/deleteAssist",
  4826. // data: {
  4827. // id: id,
  4828. // },
  4829. // success: function (data) {
  4830. // if (!data.error.length) {
  4831. // message.warning(data.error[0].message);
  4832. // } else {
  4833. // message.success("删除成功");
  4834. // }
  4835. // }.bind(this),
  4836. // }).always(
  4837. // function () {
  4838. // this.setState({
  4839. // loading: false,
  4840. // });
  4841. // }.bind(this)
  4842. // );
  4843. // },
  4844. // 新增上门服务数据
  4845. submitView() {
  4846. if (!this.state.dateView) {
  4847. message.warning("请选择上门日期");
  4848. return;
  4849. } else if (!this.state.contentView) {
  4850. message.warning("请填写服务内容");
  4851. return;
  4852. }
  4853. this.setState({
  4854. loading: true,
  4855. });
  4856. $.ajax({
  4857. method: "post",
  4858. dataType: "json",
  4859. crossDomain: false,
  4860. url: globalConfig.context + "/api/admin/newOrder/addOrderService",
  4861. data: {
  4862. orderNo: this.state.orderNo,
  4863. serviceTimes: this.state.dateView,
  4864. content: this.state.contentView,
  4865. remarks: this.state.remarksView,
  4866. },
  4867. success: function (data) {
  4868. if (data.error.length) {
  4869. this.setState({
  4870. loading: false,
  4871. });
  4872. message.warning(data.error[0].message);
  4873. } else {
  4874. this.setState({
  4875. loading: false,
  4876. modalView: false,
  4877. viewKey: this.state.viewKey + 1,
  4878. dateView: '',
  4879. contentView: '',
  4880. remarksView: '',
  4881. contentViewLength: 0,
  4882. contentViewLength1: 0,
  4883. });
  4884. message.success("添加成功");
  4885. this.orderServiceList();
  4886. }
  4887. }.bind(this),
  4888. }).always(
  4889. function () {
  4890. this.setState({
  4891. loading: false,
  4892. });
  4893. }.bind(this)
  4894. );
  4895. },
  4896. //获取上门人员
  4897. assistList(record) {
  4898. this.state.orderList = [];
  4899. $.ajax({
  4900. method: "get",
  4901. dataType: "json",
  4902. crossDomain: false,
  4903. url: globalConfig.context + "/api/admin/newOrder/assistList",
  4904. data: {
  4905. orderNo: record ? record.orderNo : this.props.datauser.orderNo,
  4906. },
  4907. success: function (data) {
  4908. if (data.error.length) {
  4909. this.setState({
  4910. loading: false,
  4911. });
  4912. message.warning(data.error[0].message);
  4913. } else {
  4914. this.setState({
  4915. personnel: data.data,
  4916. });
  4917. // message.success("添加成功");
  4918. }
  4919. }.bind(this),
  4920. }).always(
  4921. function () {
  4922. this.setState({
  4923. loading: false,
  4924. });
  4925. }.bind(this)
  4926. );
  4927. },
  4928. // 上门服务列表
  4929. orderServiceList(record) {
  4930. $.ajax({
  4931. method: "get",
  4932. dataType: "json",
  4933. crossDomain: false,
  4934. url: globalConfig.context + "/api/admin/newOrder/orderServiceList",
  4935. data: {
  4936. orderNo: record ? record.orderNo : this.props.datauser.orderNo,
  4937. },
  4938. success: function (data) {
  4939. if (data.error.length) {
  4940. this.setState({
  4941. loading: false,
  4942. });
  4943. message.warning(data.error[0].message);
  4944. } else {
  4945. this.setState({
  4946. dataView: data.data,
  4947. });
  4948. // message.success("添加成功");
  4949. }
  4950. }.bind(this),
  4951. }).always(
  4952. function () {
  4953. this.setState({
  4954. loading: false,
  4955. });
  4956. }.bind(this)
  4957. );
  4958. },
  4959. // 删除上门服务列表
  4960. delectView(record) {
  4961. $.ajax({
  4962. method: "POST",
  4963. dataType: "json",
  4964. crossDomain: false,
  4965. url: globalConfig.context + "/api/admin/newOrder/deleteOrderService",
  4966. data: {
  4967. id: record.id,
  4968. },
  4969. success: function (data) {
  4970. if (data.error.length) {
  4971. this.setState({
  4972. loading: false,
  4973. });
  4974. message.warning(data.error[0].message);
  4975. } else {
  4976. // this.setState({
  4977. // publicView: data.data,
  4978. // });
  4979. this.orderServiceList();
  4980. message.success("删除成功");
  4981. }
  4982. }.bind(this),
  4983. }).always(
  4984. function () {
  4985. this.setState({
  4986. loading: false,
  4987. });
  4988. }.bind(this)
  4989. );
  4990. },
  4991. // 上门查看
  4992. publicByOrder() {
  4993. $.ajax({
  4994. method: "get",
  4995. dataType: "json",
  4996. crossDomain: false,
  4997. url: globalConfig.context + "/api/admin/release/publicByOrder",
  4998. data: {
  4999. orderNo: this.state.orderNo,
  5000. },
  5001. success: function (data) {
  5002. if (data.error.length) {
  5003. this.setState({
  5004. loading: false,
  5005. });
  5006. message.warning(data.error[0].message);
  5007. } else {
  5008. this.setState({
  5009. publicView: data.data,
  5010. });
  5011. // message.success("添加成功");
  5012. }
  5013. }.bind(this),
  5014. }).always(
  5015. function () {
  5016. this.setState({
  5017. loading: false,
  5018. });
  5019. }.bind(this)
  5020. );
  5021. },
  5022. // 获取动态数据名称
  5023. handleSearch(value) {
  5024. $.ajax({
  5025. method: "get",
  5026. dataType: "json",
  5027. crossDomain: false,
  5028. url: globalConfig.context + "/api/admin/customer/listAdminByName",
  5029. data: {
  5030. adminName: value,
  5031. },
  5032. success: function (data) {
  5033. if (data.error.length) {
  5034. this.setState({
  5035. loading: false,
  5036. });
  5037. message.warning(data.error[0].message);
  5038. } else {
  5039. this.setState({
  5040. dataSourceView: data.data,
  5041. });
  5042. // message.success("添加成功");
  5043. }
  5044. }.bind(this),
  5045. }).always(
  5046. function () {
  5047. this.setState({
  5048. loading: false,
  5049. });
  5050. }.bind(this)
  5051. );
  5052. },
  5053. //
  5054. onSelectView(v, o) {
  5055. this.setState({
  5056. coor: v,
  5057. });
  5058. },
  5059. //
  5060. handleClose(removedTag) {
  5061. let serviceLife = this.state.serviceLife.filter(tag => { return tag !== removedTag });
  5062. this.setState({ serviceLife, serviceYear: undefined });
  5063. },
  5064. onSelectChange(selectedRowKeys, selectedRows) {
  5065. this.setState({
  5066. selectedRowKeys,
  5067. selectedRows,
  5068. });
  5069. },
  5070. render() {
  5071. const expandedRowRender = (e) => {
  5072. const data = e.list;
  5073. if (e.cSort != 6) {
  5074. let columns = [];
  5075. if (data instanceof Array && data.length) {
  5076. columns = [
  5077. {
  5078. title: "变更状态",
  5079. dataIndex: "type",
  5080. key: "type",
  5081. render: (text, record) => {
  5082. let str = "";
  5083. let color = "";
  5084. if (text == 1) {
  5085. str = "增";
  5086. color = "#87d068";
  5087. } else if (text == 2) {
  5088. str = "改";
  5089. color = "#108ee9";
  5090. } else if (text == 3) {
  5091. str = "删";
  5092. color = "#f50";
  5093. }
  5094. return (
  5095. <span>
  5096. <Tag
  5097. color={color}
  5098. style={{ display: text == 0 ? "none" : "inline-block" }}
  5099. >
  5100. {str}
  5101. </Tag>
  5102. </span>
  5103. );
  5104. },
  5105. },
  5106. {
  5107. title: "业务项目名称",
  5108. dataIndex: "commodityName",
  5109. key: "commodityName",
  5110. render: (text, record) => {
  5111. return <span>{text}<span style={{ color: "red" }}>{record.patentTypeName}</span>{"-" + record.id}</span>
  5112. }
  5113. },
  5114. {
  5115. title: "项目类别",
  5116. dataIndex: "cname",
  5117. key: "cname",
  5118. },
  5119. {
  5120. title: "项目数量",
  5121. dataIndex: "commodityQuantity",
  5122. key: "commodityQuantity",
  5123. width: 50,
  5124. },
  5125. {
  5126. title: "金额(万元)",
  5127. dataIndex: "commodityPrice",
  5128. key: "commodityPrice",
  5129. width: 50,
  5130. render: (text, record) => {
  5131. if (record.splitStatus == 2) {
  5132. return "/";
  5133. } else {
  5134. return text;
  5135. }
  5136. },
  5137. },
  5138. {
  5139. title: "主要项目",
  5140. dataIndex: "main",
  5141. key: "main",
  5142. width: 50,
  5143. render: (text) => {
  5144. return text ? "是" : "否";
  5145. },
  5146. },
  5147. {
  5148. title: "项目负责人",
  5149. dataIndex: "receiverName",
  5150. key: "receiverName",
  5151. },
  5152. {
  5153. title: "项目说明",
  5154. dataIndex: "taskComment",
  5155. key: "taskComment",
  5156. render: (text) => {
  5157. return (
  5158. <Tooltip title={text}>
  5159. <div
  5160. style={{
  5161. width: 100,
  5162. overflow: "hidden",
  5163. whiteSpace: "nowrap",
  5164. textOverflow: "ellipsis",
  5165. }}
  5166. >{text}</div>
  5167. </Tooltip>
  5168. )
  5169. },
  5170. },
  5171. {
  5172. title: "操作",
  5173. dataIndex: "ABC",
  5174. key: "ABC",
  5175. render: (text, record) => {
  5176. return (
  5177. <div>
  5178. <Button
  5179. onClick={(e) => {
  5180. e.stopPropagation();
  5181. this.showConfirm(this.changeDeletePro, record);
  5182. }}
  5183. disabled={this.state.listFlag}
  5184. style={{
  5185. display: this.state.displayList ? "none" : "block",
  5186. }}
  5187. >
  5188. 删除
  5189. </Button>
  5190. </div>
  5191. );
  5192. },
  5193. },
  5194. ];
  5195. return (
  5196. <Table
  5197. columns={columns}
  5198. scroll={{ x: "max-content", y: 0 }}
  5199. dataSource={data}
  5200. pagination={false}
  5201. onRowDoubleClick={this.state.listFlag ? this.not : this.editPro}
  5202. />
  5203. );
  5204. } else {
  5205. columns = [];
  5206. return (
  5207. <p
  5208. style={{ fontWeight: "bold", color: "red", textAlign: "center" }}
  5209. >
  5210. 此项目暂未拆分
  5211. </p>
  5212. );
  5213. }
  5214. } else {
  5215. let columns = [];
  5216. if (data instanceof Array && data.length) {
  5217. columns = [
  5218. {
  5219. title: "变更状态",
  5220. dataIndex: "type",
  5221. key: "type",
  5222. render: (text, record) => {
  5223. let str = "";
  5224. let color = "";
  5225. if (text == 1) {
  5226. str = "增";
  5227. color = "#87d068";
  5228. } else if (text == 2) {
  5229. str = "改";
  5230. color = "#108ee9";
  5231. } else if (text == 3) {
  5232. str = "删";
  5233. color = "#f50";
  5234. }
  5235. return (
  5236. <span>
  5237. <Tag
  5238. color={color}
  5239. style={{ display: text == 0 ? "none" : "inline-block" }}
  5240. >
  5241. {str}
  5242. </Tag>
  5243. </span>
  5244. );
  5245. },
  5246. },
  5247. {
  5248. title: "负责人",
  5249. dataIndex: "receiverName",
  5250. key: "receiverName",
  5251. },
  5252. {
  5253. title: "负责人电话",
  5254. dataIndex: "receiverMobile",
  5255. key: "receiverMobile",
  5256. },
  5257. {
  5258. title: "项目状态",
  5259. dataIndex: "projectStatus",
  5260. key: "projectStatus",
  5261. render: (text) => {
  5262. return getProjectName(text);
  5263. },
  5264. },
  5265. {
  5266. title: "本次派单",
  5267. dataIndex: "serviceYear",
  5268. key: "serviceYear",
  5269. },
  5270. {
  5271. title: "项目说明",
  5272. dataIndex: "taskComment",
  5273. key: "taskComment",
  5274. render: (text) => {
  5275. return (
  5276. <Tooltip title={text}>
  5277. <div
  5278. // style={{
  5279. // width: 100,
  5280. // overflow: "hidden",
  5281. // whiteSpace: "nowrap",
  5282. // textOverflow: "ellipsis",
  5283. // }}
  5284. >{text}</div>
  5285. </Tooltip>
  5286. )
  5287. },
  5288. },
  5289. ];
  5290. return (
  5291. <Table
  5292. columns={columns}
  5293. dataSource={data}
  5294. pagination={false}
  5295. />
  5296. );
  5297. } else {
  5298. columns = [];
  5299. return (
  5300. <p
  5301. style={{ fontWeight: "bold", color: "red", textAlign: "center" }}
  5302. >
  5303. 暂无派单
  5304. </p>
  5305. );
  5306. }
  5307. }
  5308. };
  5309. const expandedRowRenderDetail = (e) => {
  5310. const data = e.list;
  5311. let columns = [];
  5312. if (data instanceof Array && data.length) {
  5313. if (e.cSort == 6) {
  5314. columns = [
  5315. {
  5316. title: "变更状态",
  5317. dataIndex: "type",
  5318. key: "type",
  5319. render: (text, record) => {
  5320. let str = "";
  5321. let color = "";
  5322. if (text == 1) {
  5323. str = "增";
  5324. color = "#87d068";
  5325. } else if (text == 2) {
  5326. str = "改";
  5327. color = "#108ee9";
  5328. } else if (text == 3) {
  5329. str = "删";
  5330. color = "#f50";
  5331. }
  5332. return (
  5333. <span>
  5334. <Tag
  5335. color={color}
  5336. style={{ display: text == 0 ? "none" : "inline-block" }}
  5337. >
  5338. {str}
  5339. </Tag>
  5340. {/* {record.splitStatus == 1 ? (
  5341. <Tag
  5342. color="#108ee9"
  5343. // onClick={e => {
  5344. // e.stopPropagation();
  5345. // this.showRes(record);
  5346. // }}
  5347. >
  5348. 父项目
  5349. </Tag>
  5350. ) : (
  5351. ""
  5352. )}
  5353. {record.splitStatus == 2 ? (
  5354. <Tag
  5355. color="#108ee9"
  5356. // onClick={e => {
  5357. // e.stopPropagation();
  5358. // this.showRes(record);
  5359. // }}
  5360. >
  5361. 子项目
  5362. </Tag>
  5363. ) : (
  5364. ""
  5365. )} */}
  5366. </span>
  5367. );
  5368. },
  5369. },
  5370. {
  5371. title: "负责人",
  5372. dataIndex: "receiverName",
  5373. key: "receiverName",
  5374. },
  5375. {
  5376. title: "负责人电话",
  5377. dataIndex: "receiverMobile",
  5378. key: "receiverMobile",
  5379. },
  5380. {
  5381. title: "项目状态",
  5382. dataIndex: "projectStatus",
  5383. key: "projectStatus",
  5384. render: (text) => {
  5385. return getProjectName(text);
  5386. },
  5387. },
  5388. {
  5389. title: "本次派单",
  5390. dataIndex: "serviceYear",
  5391. key: "serviceYear",
  5392. },
  5393. {
  5394. title: "项目说明",
  5395. dataIndex: "taskComment",
  5396. key: "taskComment",
  5397. render: (text) => {
  5398. return (
  5399. <Tooltip title={text}>
  5400. <div
  5401. // style={{
  5402. // width: 100,
  5403. // overflow: "hidden",
  5404. // whiteSpace: "nowrap",
  5405. // textOverflow: "ellipsis",
  5406. // }}
  5407. >{text}</div>
  5408. </Tooltip>
  5409. )
  5410. },
  5411. },
  5412. ];
  5413. } else {
  5414. columns = [
  5415. {
  5416. title: "变更状态",
  5417. dataIndex: "type",
  5418. key: "type",
  5419. render: (text, record) => {
  5420. let str = "";
  5421. let color = "";
  5422. if (text == 1) {
  5423. str = "增";
  5424. color = "#87d068";
  5425. } else if (text == 2) {
  5426. str = "改";
  5427. color = "#108ee9";
  5428. } else if (text == 3) {
  5429. str = "删";
  5430. color = "#f50";
  5431. }
  5432. return (
  5433. <span>
  5434. <Tag
  5435. color={color}
  5436. style={{ display: text == 0 ? "none" : "inline-block" }}
  5437. >
  5438. {str}
  5439. </Tag>
  5440. {/* {record.splitStatus == 1 ? (
  5441. <Tag
  5442. color="#108ee9"
  5443. // onClick={e => {
  5444. // e.stopPropagation();
  5445. // this.showRes(record);
  5446. // }}
  5447. >
  5448. 父项目
  5449. </Tag>
  5450. ) : (
  5451. ""
  5452. )}
  5453. {record.splitStatus == 2 ? (
  5454. <Tag
  5455. color="#108ee9"
  5456. // onClick={e => {
  5457. // e.stopPropagation();
  5458. // this.showRes(record);
  5459. // }}
  5460. >
  5461. 子项目
  5462. </Tag>
  5463. ) : (
  5464. ""
  5465. )} */}
  5466. </span>
  5467. );
  5468. },
  5469. },
  5470. {
  5471. title: "业务项目名称",
  5472. dataIndex: "commodityName",
  5473. key: "commodityName",
  5474. render: (text, record) => {
  5475. return (
  5476. <span>{text}<span style={{ color: "red" }}>{record.patentTypeName}</span></span>
  5477. )
  5478. }
  5479. },
  5480. {
  5481. title: "项目类别",
  5482. dataIndex: "cname",
  5483. key: "cname",
  5484. },
  5485. {
  5486. title: "项目数量",
  5487. dataIndex: "commodityQuantity",
  5488. key: "commodityQuantity",
  5489. width: 50,
  5490. },
  5491. {
  5492. title: "金额(万元)",
  5493. dataIndex: "commodityPrice",
  5494. key: "commodityPrice",
  5495. width: 50,
  5496. render: (text, record) => {
  5497. if (record.splitStatus == 2) {
  5498. return "/";
  5499. } else {
  5500. return text;
  5501. }
  5502. },
  5503. },
  5504. {
  5505. title: "主要项目",
  5506. dataIndex: "main",
  5507. key: "main",
  5508. width: 50,
  5509. render: (text) => {
  5510. return text ? "是" : "否";
  5511. },
  5512. },
  5513. {
  5514. title: "项目负责人",
  5515. dataIndex: "receiverName",
  5516. key: "receiverName",
  5517. },
  5518. {
  5519. title: "项目说明",
  5520. dataIndex: "taskComment",
  5521. key: "taskComment",
  5522. render: (text) => {
  5523. return (
  5524. <Tooltip title={text}>
  5525. <div
  5526. style={{
  5527. width: 100,
  5528. overflow: "hidden",
  5529. whiteSpace: "nowrap",
  5530. textOverflow: "ellipsis",
  5531. }}
  5532. >{text}</div>
  5533. </Tooltip>
  5534. )
  5535. },
  5536. },
  5537. ];
  5538. }
  5539. return (
  5540. <Table
  5541. columns={columns}
  5542. scroll={{ x: "max-content", y: 0 }}
  5543. dataSource={data}
  5544. pagination={false}
  5545. />
  5546. );
  5547. } else {
  5548. columns = [];
  5549. return (
  5550. <p
  5551. style={{ fontWeight: "bold", color: "red", textAlign: "center" }}
  5552. >
  5553. {e.cSort == 6 ? "暂无派单" : "此项目暂未拆分"}
  5554. </p>
  5555. );
  5556. }
  5557. };
  5558. const expandedRowRenderVip = (e) => {
  5559. const data = e.splitList;
  5560. let columns = [];
  5561. if (data instanceof Array && data.length) {
  5562. if (e.cSort == 6) {
  5563. columns = [
  5564. {
  5565. title: "负责人",
  5566. dataIndex: "receiverName",
  5567. key: "receiverName",
  5568. },
  5569. {
  5570. title: "负责人电话",
  5571. dataIndex: "receiverMobile",
  5572. key: "receiverMobile",
  5573. },
  5574. {
  5575. title: "项目状态",
  5576. dataIndex: "projectStatus",
  5577. key: "projectStatus",
  5578. render: (text) => {
  5579. return getProjectName(text);
  5580. },
  5581. },
  5582. {
  5583. title: "本次派单",
  5584. dataIndex: "serviceYear",
  5585. key: "serviceYear",
  5586. },
  5587. {
  5588. title: "项目说明",
  5589. dataIndex: "taskComment",
  5590. key: "taskComment",
  5591. render: (text) => {
  5592. return (
  5593. <Tooltip title={text}>
  5594. <div
  5595. style={{
  5596. width: 100,
  5597. overflow: "hidden",
  5598. whiteSpace: "nowrap",
  5599. textOverflow: "ellipsis",
  5600. }}
  5601. >{text}</div>
  5602. </Tooltip>
  5603. )
  5604. },
  5605. },
  5606. ];
  5607. } else {
  5608. columns = [
  5609. {
  5610. title: "子项目名称",
  5611. dataIndex: "taskName",
  5612. key: "taskName"
  5613. },
  5614. {
  5615. title: "子项目数量",
  5616. dataIndex: "commodityQuantity",
  5617. key: "commodityQuantity"
  5618. },
  5619. {
  5620. title: "拆分操作人",
  5621. dataIndex: "splitAname",
  5622. key: "splitAname"
  5623. },
  5624. {
  5625. title: "项目负责人",
  5626. dataIndex: "receiverName",
  5627. key: "receiverName"
  5628. },
  5629. {
  5630. title: "拆分时间",
  5631. dataIndex: "splitTimes",
  5632. key: "splitTimes"
  5633. }
  5634. ]
  5635. }
  5636. return (
  5637. <Table
  5638. columns={columns}
  5639. dataSource={data}
  5640. pagination={false}
  5641. />
  5642. );
  5643. } else {
  5644. columns = [];
  5645. return (
  5646. <p
  5647. style={{ fontWeight: "bold", color: "red", textAlign: "center" }}
  5648. >
  5649. {e.cSort == 6 ? "暂无派单" : "此项目暂未拆分"}
  5650. </p>
  5651. );
  5652. }
  5653. };
  5654. const FormItem = Form.Item;
  5655. const { TabPane } = Tabs;
  5656. const { TextArea } = Input;
  5657. const radioStyle = {
  5658. display: 'block',
  5659. height: '30px',
  5660. lineHeight: '30px',
  5661. };
  5662. const formItemLayout = {
  5663. labelCol: { span: 10 },
  5664. wrapperCol: { span: 14 },
  5665. };
  5666. const contractData = this.state.contractData;
  5667. const formItemList = [
  5668. {
  5669. label: "企业联系人",
  5670. content: <span>{this.state.contacts}</span>,
  5671. },
  5672. {
  5673. label: "客户名称",
  5674. content: (
  5675. <span>
  5676. {this.state.userName}
  5677. <EnterpriseNameChange
  5678. type="journal"
  5679. style={{ marginLeft: 10 }}
  5680. enterpriseId={this.state.orderUid}
  5681. />
  5682. </span>
  5683. ),
  5684. },
  5685. {
  5686. label: "联系人电话",
  5687. content: <span>{this.state.contactMobile}</span>,
  5688. },
  5689. {
  5690. label: "企业法人",
  5691. content: <span>{this.state.legalPerson}</span>,
  5692. },
  5693. {
  5694. label: "法人电话",
  5695. content: <span>{this.state.legalPersonTel}</span>,
  5696. },
  5697. // {
  5698. // label: "签单金额(万元)",
  5699. // content: <span>{this.state.totalAmount}</span>
  5700. // },
  5701. // {
  5702. // label: "首付金额(万元)",
  5703. // content: <span>{this.state.firstAmount}</span>
  5704. // },
  5705. // {
  5706. // label: "特批立项",
  5707. // content: <span>{getApprovedState(this.state.approval)}</span>
  5708. // },
  5709. // {
  5710. // label: "合同签订时间",
  5711. // content: <span>{this.state.signDate}</span>
  5712. // },
  5713. // {
  5714. // label: "订单部门",
  5715. // content: <span>{this.state.depName}</span>
  5716. // }
  5717. ];
  5718. let dataSources = this.state.customerArr || [];
  5719. let cdataSources = this.state.channelArr || [];
  5720. const cuiDataList = this.state.contactList || [];
  5721. let departmentArr = this.state.departmentArr || [];
  5722. let options = this.state.states
  5723. ? dataSources.map((group) => (
  5724. <Select.Option key={group.id} value={group.name}>
  5725. {group.name}
  5726. </Select.Option>
  5727. ))
  5728. : dataSources.map((group, index) => (
  5729. <Select.Option key={index} value={group.bname}>
  5730. {group.bname}
  5731. </Select.Option>
  5732. ));
  5733. let channeloptions = cdataSources.map((group) => (
  5734. <Select.Option key={group.id} value={group.name}>
  5735. {group.name}
  5736. </Select.Option>
  5737. ));
  5738. let dataSourceView = this.state.dataSourceView ? this.state.dataSourceView.map((group, index) => (
  5739. <Select.Option key={index} value={group.aid}>
  5740. {group.name}
  5741. </Select.Option>
  5742. )) : '';
  5743. let children = vipYear.map(its => (
  5744. <Option key={its}>{its}</Option>
  5745. ));
  5746. let { closable } = this.state;
  5747. let assistList = this.assistList;
  5748. const { addPop = "" } = this.props
  5749. return (
  5750. <div>
  5751. {this.state.resVisible ? (
  5752. <ResolutionDetail
  5753. cancel={this.resCancel}
  5754. detail={this.state.resRecord}
  5755. visible={this.state.resVisible}
  5756. id={this.state.resRecord.orderNo}
  5757. />
  5758. ) : (
  5759. ""
  5760. )}
  5761. <Modal
  5762. maskClosable={false}
  5763. visible={this.props.addPop == "add" ? this.props.showDesc : this.state.visible}
  5764. onOk={this.handleOk}
  5765. onCancel={this.handleCancelclose}
  5766. width={!this.props.userDetaile ? "600px" : "1200px"}
  5767. title={!this.props.userDetaile ? "创建订单" : ""}
  5768. footer=""
  5769. className="admin-desc-content"
  5770. >
  5771. <Form
  5772. layout="horizontal"
  5773. onSubmit={this.handleSubmit}
  5774. style={{ paddingBottom: "40px" }}
  5775. >
  5776. <Spin spinning={this.state.loading}>
  5777. <div className="clearfix">
  5778. {
  5779. addPop == "add" &&
  5780. <div className="clearfix">
  5781. <div className="clearfix">
  5782. <FormItem {...formItemLayout} label="订单类型">
  5783. <Select
  5784. placeholder="请选择订单类型"
  5785. style={{ width: "200px" }}
  5786. value={this.state.orderType}
  5787. onChange={(e) => {
  5788. this.setState({ orderType: e });
  5789. }}
  5790. >
  5791. {orderTypes.map(function (item) {
  5792. return (
  5793. <Select.Option key={item.value}>
  5794. {item.key}
  5795. </Select.Option>
  5796. );
  5797. })}
  5798. </Select>
  5799. <span className="mandatory">*</span>
  5800. </FormItem>
  5801. </div>
  5802. <FormItem {...formItemLayout} label="客户所属类型">
  5803. <Select
  5804. placeholder="请选择客户所属类型"
  5805. style={{ width: "200px" }}
  5806. value={this.state.userType}
  5807. onChange={(e) => {
  5808. this.setState({
  5809. userType: e,
  5810. customerArr: [],
  5811. autoId: "",
  5812. customerName: "",
  5813. selectSales: undefined
  5814. });
  5815. }}
  5816. >
  5817. {customerType.map(function (item) {
  5818. return (
  5819. <Select.Option key={item.value}>
  5820. {item.key}
  5821. </Select.Option>
  5822. );
  5823. })}
  5824. </Select>
  5825. </FormItem>
  5826. <div className="clearfix">
  5827. <FormItem {...formItemLayout} label="客户名称">
  5828. <AutoComplete
  5829. className="certain-category-search"
  5830. dropdownClassName="certain-category-search-dropdown"
  5831. dropdownMatchSelectWidth={false}
  5832. dropdownStyle={{ width: 200 }}
  5833. size="large"
  5834. style={{ width: "200px" }}
  5835. dataSource={options}
  5836. placeholder="输入名称"
  5837. value={this.state.customerName}
  5838. onChange={this.customerChange}
  5839. filterOption={true}
  5840. onSelect={this.selectAutoCUT}
  5841. >
  5842. <Input />
  5843. </AutoComplete>
  5844. <span className="mandatory">*</span>
  5845. </FormItem>
  5846. </div>
  5847. <FormItem {...formItemLayout} label="销售类型">
  5848. <Select
  5849. placeholder="请选择销售类型"
  5850. style={{ width: "200px" }}
  5851. value={this.state.selectSales}
  5852. onChange={(e) => {
  5853. this.setState({
  5854. selectSales: e,
  5855. });
  5856. }}
  5857. >
  5858. {(this.state.userType == "0"
  5859. ? ssalesType : this.state.userType == "1"
  5860. ? qsalesType : []).map(function (item) {
  5861. return (
  5862. <Select.Option key={item.value} disabled={item.value == "5"}>
  5863. {item.key}
  5864. </Select.Option>
  5865. );
  5866. })}
  5867. </Select>
  5868. </FormItem>
  5869. {
  5870. (this.state.selectSales == "4" || this.state.selectSales == "5") &&
  5871. <FormItem {...formItemLayout} label="描述">
  5872. <TextArea
  5873. placeholder="请填写描述"
  5874. style={{ width: 300, height: 80 }}
  5875. onChange={(e) => {
  5876. this.setState({
  5877. other: e.target.value
  5878. })
  5879. }}
  5880. />
  5881. </FormItem>
  5882. }
  5883. {
  5884. this.state.selectSales == "3" &&
  5885. <div className="clearfix">
  5886. <FormItem {...formItemLayout} label="渠道名称">
  5887. <AutoComplete
  5888. className="certain-category-search"
  5889. dropdownClassName="certain-category-search-dropdown"
  5890. dropdownMatchSelectWidth={false}
  5891. dropdownStyle={{ width: 200 }}
  5892. size="large"
  5893. style={{ width: "200px" }}
  5894. dataSource={channeloptions}
  5895. placeholder="请输入渠道关键字"
  5896. value={this.state.channelName}
  5897. onChange={this.channelChange}
  5898. filterOption={true}
  5899. onSelect={this.goSelect}
  5900. >
  5901. <Input />
  5902. </AutoComplete>
  5903. <span className="mandatory">*</span>
  5904. </FormItem>
  5905. </div>
  5906. }
  5907. <div className="addSave" style={{ marginTop: "15px" }}>
  5908. <Button
  5909. className="cancel"
  5910. type="primary"
  5911. // onClick={this.handleCancel}
  5912. style={{ marginLeft: "150px" }}
  5913. htmlType="submit"
  5914. >
  5915. 开单
  5916. </Button>
  5917. <Button
  5918. className="cancel"
  5919. type="ghost"
  5920. onClick={this.handleCancelclose}
  5921. style={{ marginLeft: "50px" }}
  5922. >
  5923. 取消
  5924. </Button>
  5925. </div>
  5926. </div>
  5927. }
  5928. {
  5929. addPop == "edit" &&
  5930. <Tabs
  5931. onChange={this.callback}
  5932. activeKey={this.state.activeKey}
  5933. tabBarExtraContent={
  5934. <div
  5935. style={{ fontWeight: "bold", paddingRight: "15px" }}
  5936. >
  5937. <OrderItemStatus deleteSign={this.state.deleteSign} />
  5938. </div>
  5939. }
  5940. >
  5941. <TabPane tab={"最新订单"} key="1">
  5942. {
  5943. this.state.activeKey == "1" &&
  5944. <div className="clearfix">
  5945. <div className="clearfix">
  5946. <FormItem
  5947. className="half-item"
  5948. {...formItemLayout}
  5949. label="合同编号"
  5950. >
  5951. {<span>{this.state.contractNo}</span>}
  5952. </FormItem>
  5953. <FormItem
  5954. className="half-item"
  5955. {...formItemLayout}
  5956. label="订单编号"
  5957. >
  5958. <span>{this.state.orderNo}</span>
  5959. </FormItem>
  5960. <FormItem
  5961. className="half-item"
  5962. {...formItemLayout}
  5963. label="流程状态"
  5964. >
  5965. <span>
  5966. {getProcessStatus(this.state.processStatus, this.state.examineName, this.state.approval)}
  5967. </span>
  5968. <FlowChart
  5969. orderNo={this.state.orderNo}
  5970. />
  5971. </FormItem>
  5972. <FormItem
  5973. className="half-item"
  5974. {...formItemLayout}
  5975. label="销售类型"
  5976. >
  5977. <span>
  5978. {(["私有客户-", "签单客户-"][this.state.updatas.userType] || " ") +
  5979. (salesList[this.state.updatas.salesType] || "")}
  5980. </span>
  5981. {
  5982. this.state.processStatus === 0 &&
  5983. <UpdateSales
  5984. orderNo={this.state.orderNo}
  5985. updatas={this.state.updatas}
  5986. onRefresh={
  5987. e => {
  5988. let ups = this.state.updatas
  5989. ups.salesType = e.salesType
  5990. if (e.salesType == "3") {
  5991. ups.channelId = e.channelId
  5992. ups.other = e.other
  5993. } else if (e.salesType == "4" || e.salesType == "5") {
  5994. ups.other = e.other
  5995. }
  5996. this.setState({
  5997. updatas: ups,
  5998. userType: ups.userType
  5999. })
  6000. }
  6001. // this.loaduser.bind(this, {orderNo: this.state.orderNo })
  6002. }
  6003. />
  6004. }
  6005. </FormItem>
  6006. <FormItem
  6007. className="half-item"
  6008. {...formItemLayout}
  6009. label="结算状态"
  6010. >
  6011. <span>
  6012. {getLiquidationStatus(
  6013. this.state.liquidationStatus
  6014. )}
  6015. </span>
  6016. </FormItem>
  6017. {this.state.processStatus === 0 ? (
  6018. <div className="clearfix">
  6019. <FormItem
  6020. className="half-item"
  6021. {...formItemLayout}
  6022. label="特批立项"
  6023. >
  6024. <Select
  6025. placeholder="请选择客户所属类型"
  6026. style={{ width: "240px" }}
  6027. value={["非特批", "特批", "特批通过", "特批驳回", "特批", "特批通过", "特批驳回"][Number(this.state.approval)]
  6028. }
  6029. onChange={(e) => {
  6030. this.setState({ approval: e });
  6031. }}
  6032. >
  6033. <Select.Option key={0}>非特批</Select.Option>
  6034. <Select.Option key={1}>特批</Select.Option>
  6035. </Select>
  6036. </FormItem>
  6037. <FormItem
  6038. className="half-item"
  6039. {...formItemLayout}
  6040. label={
  6041. <span>
  6042. <strong style={{ color: "#f00" }}>*</strong>
  6043. 合同签订时间
  6044. </span>
  6045. }
  6046. >
  6047. <DatePicker
  6048. className="signDateRef"
  6049. style={{
  6050. marginTop: "2px",
  6051. // width: "240px",
  6052. height: "27px",
  6053. }}
  6054. showTime
  6055. format="YYYY-MM-DD"
  6056. onOk={() => { }}
  6057. value={
  6058. this.state.signDate
  6059. ? moment(this.state.signDate)
  6060. : null
  6061. }
  6062. onChange={(data, dataString) => {
  6063. this.setState({ signDate: dataString });
  6064. }}
  6065. />
  6066. </FormItem>
  6067. <FormItem
  6068. className="half-item"
  6069. {...formItemLayout}
  6070. label="订单部门"
  6071. >
  6072. <Select
  6073. placeholder="请选择订单部门"
  6074. style={{ width: 240 }}
  6075. value={this.state.organizationSearch}
  6076. onChange={(e) => {
  6077. this.setState({ organizationSearch: e });
  6078. }}
  6079. >
  6080. {departmentArr.map(function (item) {
  6081. return (
  6082. <Select.Option key={item.id}>
  6083. {item.name}
  6084. </Select.Option>
  6085. );
  6086. })}
  6087. </Select>
  6088. </FormItem>
  6089. </div>
  6090. ) : (
  6091. <div className="clearfix">
  6092. <FormItem
  6093. className="half-item"
  6094. {...formItemLayout}
  6095. label="特批立项"
  6096. >
  6097. <span>
  6098. {/* {["非特批", "特批待审核", "特批通过", "特批驳回"][this.state.approval]} */}
  6099. {getApprovedState(this.state.approval)}
  6100. </span>
  6101. </FormItem>
  6102. <FormItem
  6103. className="half-item"
  6104. {...formItemLayout}
  6105. label="合同签订时间"
  6106. >
  6107. <span>{this.state.signDate}</span>
  6108. </FormItem>
  6109. <FormItem
  6110. className="half-item"
  6111. {...formItemLayout}
  6112. label="订单部门"
  6113. >
  6114. <span>{this.state.depName}</span>
  6115. </FormItem>
  6116. <FormItem
  6117. className="half-item"
  6118. {...formItemLayout}
  6119. label="是否外包"
  6120. >
  6121. <span>
  6122. {this.state.outsource == 0 ? "否" : "是"}
  6123. </span>
  6124. </FormItem>
  6125. </div>
  6126. )}
  6127. </div>
  6128. <h3
  6129. style={{
  6130. marginLeft: 10,
  6131. fontWeight: 800,
  6132. marginBottom: 10,
  6133. }}
  6134. >
  6135. 收款项目
  6136. </h3>
  6137. {this.state.processStatus === 0 ? (
  6138. <div className="clearfix">
  6139. <FormItem
  6140. className="half-item"
  6141. {...formItemLayout}
  6142. label="签单金额(万元)"
  6143. >
  6144. <Input
  6145. placeholder="签单金额"
  6146. ref="totalAmountRef"
  6147. value={this.state.totalAmount}
  6148. onChange={(e) => {
  6149. this.setState({
  6150. totalAmount: e.target.value,
  6151. });
  6152. }}
  6153. style={{ width: "240px" }}
  6154. />
  6155. </FormItem>
  6156. <FormItem
  6157. className="half-item"
  6158. {...formItemLayout}
  6159. label="首付金额(万元)"
  6160. >
  6161. <Input
  6162. placeholder="请输入实签首款金额"
  6163. ref="firstAmountRef"
  6164. value={this.state.firstAmount}
  6165. onChange={(e) => {
  6166. this.setState({
  6167. firstAmount: e.target.value,
  6168. });
  6169. }}
  6170. style={{ width: "240px" }}
  6171. />
  6172. </FormItem>
  6173. <FormItem
  6174. className="half-item"
  6175. {...formItemLayout}
  6176. label="已收款项"
  6177. >
  6178. <span>
  6179. {this.state.settlementAmount + "万元"}
  6180. </span>
  6181. {/* {this.state.settlementAmount ? (
  6182. <Button
  6183. type="primary"
  6184. onClick={this.tuikuan}
  6185. style={{
  6186. float: "right",
  6187. marginRight: "50px",
  6188. marginBottom: "15px"
  6189. }}
  6190. >
  6191. 退单
  6192. </Button>
  6193. ) : (
  6194. ""
  6195. )} */}
  6196. </FormItem>
  6197. </div>
  6198. ) : (
  6199. <div className="clearfix">
  6200. <FormItem
  6201. className="half-item"
  6202. {...formItemLayout}
  6203. label="签单金额(万元)"
  6204. >
  6205. <span>{this.state.totalAmount}</span>
  6206. </FormItem>
  6207. <FormItem
  6208. className="half-item"
  6209. {...formItemLayout}
  6210. label="首付金额(万元)"
  6211. >
  6212. <span>{this.state.firstAmount}</span>
  6213. </FormItem>
  6214. <FormItem
  6215. className="half-item"
  6216. {...formItemLayout}
  6217. label="已收款项"
  6218. >
  6219. <span>
  6220. {this.state.settlementAmount + "万元"}
  6221. </span>
  6222. {/* {this.state.settlementAmount ? (
  6223. <Button
  6224. type="primary"
  6225. onClick={this.tuikuan}
  6226. style={{
  6227. float: "right",
  6228. marginRight: "50px",
  6229. marginBottom: "15px"
  6230. }}
  6231. >
  6232. 退单
  6233. </Button>
  6234. ) : (
  6235. ""
  6236. )} */}
  6237. </FormItem>
  6238. </div>
  6239. )}
  6240. <h3
  6241. style={{
  6242. marginLeft: 10,
  6243. fontWeight: 800,
  6244. marginBottom: 10,
  6245. }}
  6246. >
  6247. 联系信息
  6248. </h3>
  6249. {this.state.processStatus == 0 ? (
  6250. <div className="clearfix">
  6251. <div className="clearfix">
  6252. <FormItem
  6253. className="half-item"
  6254. style={{ width: "100%" }}
  6255. labelCol={{ span: 5 }}
  6256. wrapperCol={{ span: 19 }}
  6257. label="客户名称"
  6258. >
  6259. <span>{this.state.userName}</span>
  6260. <EnterpriseNameChange
  6261. type="journal"
  6262. style={{ marginLeft: 10 }}
  6263. enterpriseId={this.state.orderUid}
  6264. />
  6265. </FormItem>
  6266. </div>
  6267. <FormItem
  6268. className="half-item"
  6269. {...formItemLayout}
  6270. label={
  6271. <span>
  6272. <strong style={{ color: "#f00" }}>*</strong>
  6273. 企业联系人
  6274. </span>
  6275. }
  6276. >
  6277. <Input
  6278. placeholder="请输入联系人"
  6279. ref="signTotalAmount"
  6280. value={this.state.contacts}
  6281. onChange={(e) => {
  6282. this.setState({ contacts: e.target.value });
  6283. }}
  6284. style={{ width: "240px" }}
  6285. />
  6286. </FormItem>
  6287. <FormItem
  6288. className="half-item"
  6289. {...formItemLayout}
  6290. label={
  6291. <span>
  6292. <strong style={{ color: "#f00" }}>*</strong>
  6293. 联系人电话
  6294. </span>
  6295. }
  6296. >
  6297. <Input
  6298. placeholder="请输入联系人电话"
  6299. ref="signTotalAmount"
  6300. value={this.state.contactMobile}
  6301. onChange={(e) => {
  6302. this.setState({
  6303. contactMobile: e.target.value,
  6304. });
  6305. }}
  6306. style={{ width: "240px" }}
  6307. />
  6308. </FormItem>
  6309. <FormItem
  6310. className="half-item"
  6311. {...formItemLayout}
  6312. label="企业法人"
  6313. >
  6314. <Input
  6315. placeholder="请输入法人"
  6316. ref="signTotalAmount"
  6317. value={this.state.legalPerson}
  6318. onChange={(e) => {
  6319. this.setState({
  6320. legalPerson: e.target.value,
  6321. });
  6322. }}
  6323. style={{ width: "240px" }}
  6324. />
  6325. </FormItem>
  6326. <FormItem
  6327. className="half-item"
  6328. {...formItemLayout}
  6329. label="法人电话"
  6330. >
  6331. <Input
  6332. placeholder="请输入法人电话"
  6333. ref="signTotalAmount"
  6334. value={this.state.legalPersonTel}
  6335. onChange={(e) => {
  6336. this.setState({
  6337. legalPersonTel: e.target.value,
  6338. });
  6339. }}
  6340. style={{ width: "240px" }}
  6341. />
  6342. </FormItem>
  6343. </div>
  6344. ) : (
  6345. <div className="clearfix">
  6346. {formItemList.map((data, index) => {
  6347. return (
  6348. <FormItem
  6349. className="half-item"
  6350. {...formItemLayout}
  6351. key={index}
  6352. label={data.label}
  6353. >
  6354. {data.content}
  6355. </FormItem>
  6356. );
  6357. })}
  6358. </div>
  6359. )}
  6360. <div className="clearfix">
  6361. {this.state.processStatus == 0 ? (
  6362. <div>
  6363. <FormItem
  6364. labelCol={{ span: 5 }}
  6365. wrapperCol={{ span: 19 }}
  6366. label={
  6367. <span>
  6368. <strong style={{ color: "#f00" }}>
  6369. *
  6370. </strong>
  6371. 合同扫描件
  6372. </span>
  6373. }
  6374. >
  6375. <PicturesWall
  6376. domId={"addService1"}
  6377. fileList={this.getOrgCodeUrl}
  6378. pictureUrl={this.state.orgCodeUrl}
  6379. url="/api/admin/order/uploadOrderImg"
  6380. orderNo={this.state.orderNo}
  6381. sign="contract"
  6382. deleteApi="/api/admin/order/deleteOrderImg"
  6383. />
  6384. <p>图片建议:要清晰。</p>
  6385. <Button
  6386. style={{
  6387. float: "right",
  6388. marginRight: "140px",
  6389. marginTop: "20px",
  6390. }}
  6391. onClick={this.getOrderLog}
  6392. >
  6393. 查看订单日志
  6394. </Button>
  6395. </FormItem>
  6396. <Gxczx
  6397. isShow={this.state.isShow}
  6398. isCreat={true}
  6399. knowledgeServices={this.state.knowledgeServices}
  6400. auditServices={this.state.auditServices}
  6401. addDeductionServices={this.state.addDeductionServices}
  6402. knowledgeOther={this.state.knowledgeOther}
  6403. auditOther={this.state.auditOther}
  6404. addDeductionOther={this.state.addDeductionOther}
  6405. selknowledge={e => { this.setState({ knowledgeServices: e.knowledgeServices, knowledgeOther: e.knowledgeOther }) }}
  6406. selaudit={e => { this.setState({ auditServices: e.auditServices, auditOther: e.auditOther }) }}
  6407. seladdDeduction={e => { this.setState({ addDeductionServices: e.addDeductionServices, addDeductionOther: e.addDeductionOther }) }}
  6408. onSwitch={e => { this.setState({ isShow: e }) }}
  6409. />
  6410. <FormItem
  6411. labelCol={{ span: 5 }}
  6412. wrapperCol={{ span: 19 }}
  6413. label={<span>补充协议</span>}
  6414. >
  6415. <PicturesWall
  6416. domId={"addService2"}
  6417. fileList={this.getReplenishUrl}
  6418. pictureUrl={this.state.replenishUrl}
  6419. url="/api/admin/order/uploadOrderImg"
  6420. orderNo={this.state.orderNo}
  6421. sign="supplement"
  6422. deleteApi="/api/admin/order/deleteOrderImg"
  6423. />
  6424. <p>图片建议:要清晰。</p>
  6425. </FormItem>
  6426. </div>
  6427. ) : (
  6428. <div>
  6429. <FormItem
  6430. labelCol={{ span: 5 }}
  6431. wrapperCol={{ span: 19 }}
  6432. label="合同扫描件"
  6433. >
  6434. <div
  6435. style={{
  6436. paddingTop: "10px",
  6437. paddingBottom: "10px",
  6438. }}
  6439. >
  6440. {this.state.orgCodeUrl &&
  6441. this.state.visible &&
  6442. this.state.activeKey === "1" ? (
  6443. <ImgList
  6444. domId={"addService3"}
  6445. fileList={this.state.orgCodeUrl}
  6446. ItemWidth={"96px"}
  6447. />
  6448. ) : (
  6449. <div />
  6450. )}
  6451. </div>
  6452. <Button
  6453. style={{
  6454. float: "right",
  6455. marginRight: "140px",
  6456. marginTop: "20px",
  6457. }}
  6458. onClick={this.getOrderLog}
  6459. >
  6460. 查看订单日志
  6461. </Button>
  6462. </FormItem>
  6463. {/* 高新纯咨询合同说明详情 */}
  6464. <Gxczx
  6465. knowledgeServices={this.state.knowledgeServices}
  6466. auditServices={this.state.auditServices}
  6467. addDeductionServices={this.state.addDeductionServices}
  6468. knowledgeOther={this.state.knowledgeOther}
  6469. auditOther={this.state.auditOther}
  6470. addDeductionOther={this.state.addDeductionOther}
  6471. />
  6472. <FormItem
  6473. labelCol={{ span: 5 }}
  6474. wrapperCol={{ span: 19 }}
  6475. label="补充协议"
  6476. >
  6477. <div
  6478. style={{
  6479. paddingTop: "10px",
  6480. paddingBottom: "10px",
  6481. }}
  6482. >
  6483. {this.state.visible &&
  6484. this.state.activeKey === "1" &&
  6485. this.state.replenishUrl ? (
  6486. <ImgList
  6487. domId={"addService4"}
  6488. fileList={this.state.replenishUrl}
  6489. ItemWidth={"96px"}
  6490. />
  6491. ) : (
  6492. <div />
  6493. )}
  6494. </div>
  6495. </FormItem>
  6496. </div>
  6497. )}
  6498. </div>
  6499. {/* 服务内容 */}
  6500. <div class="clearfix">
  6501. <FormItem
  6502. labelCol={{ span: 5 }}
  6503. wrapperCol={{ span: 19 }}
  6504. label={
  6505. <span>
  6506. <strong style={{ color: "#f00" }}>*</strong>
  6507. 服务内容
  6508. </span>
  6509. }
  6510. >
  6511. <div>
  6512. {this.state.processStatus == 0 ?
  6513. <div>
  6514. <PicturesWall
  6515. domId={"addServiceContent"}
  6516. fileList={this.getContentUrl}
  6517. pictureUrl={this.state.contentUrl}
  6518. url="/api/admin/order/uploadOrderImg"
  6519. orderNo={this.state.orderNo}
  6520. sign="content"
  6521. deleteApi="/api/admin/order/deleteOrderImg"
  6522. />
  6523. <p> <span style={{ color: "red", display: "inline-block" }}>(请将合同中的服务内容,截图上传!含服务年限,时间节点等;)</span>图片建议:要清晰。</p>
  6524. </div> :
  6525. this.state.contentUrl.length > 0 ?
  6526. <div>
  6527. <ImgList
  6528. domId={"addService13"}
  6529. fileList={this.state.contentUrl}
  6530. ItemWidth={"96px"}
  6531. />
  6532. </div> : "暂无附件!"}
  6533. </div>
  6534. </FormItem>
  6535. </div>
  6536. {/* 服务内容结束 */}
  6537. <div className="clearfix">
  6538. {this.state.processStatus == 0 ? (
  6539. <div className="clearfix">
  6540. <FormItem
  6541. labelCol={{ span: 5 }}
  6542. wrapperCol={{ span: 16 }}
  6543. label={
  6544. <span>
  6545. <strong style={{ color: "#f00" }}>*</strong>
  6546. 订单留言
  6547. </span>
  6548. }
  6549. >
  6550. <Input
  6551. ref="orderRemarksRef"
  6552. type="textarea"
  6553. placeholder="请输入订单留言"
  6554. rows={4}
  6555. value={this.state.orderRemarks}
  6556. onChange={(e) => {
  6557. this.setState({
  6558. orderRemarks: e.target.value,
  6559. });
  6560. }}
  6561. style={{ width: "95%" }}
  6562. />
  6563. <div className="mandatory">
  6564. 重要提示:请详细填写合同中包含的服务内容、服务年限、时间节点等
  6565. </div>
  6566. </FormItem>
  6567. </div>
  6568. ) : (
  6569. <FormItem
  6570. labelCol={{ span: 4 }}
  6571. wrapperCol={{ span: 16 }}
  6572. label="订单留言"
  6573. >
  6574. <p
  6575. style={{ width: 500, wordWrap: "break-word" }}
  6576. >
  6577. {this.state.orderRemarks}
  6578. </p>
  6579. </FormItem>
  6580. )}
  6581. </div>
  6582. <div className="clearfix">
  6583. <FormItem
  6584. className="half-item"
  6585. {...formItemLayout}
  6586. label="订单负责人"
  6587. >
  6588. <span>{this.state.salesmanName}</span>
  6589. </FormItem>
  6590. <FormItem
  6591. className="half-item"
  6592. {...formItemLayout}
  6593. label="订单负责人电话"
  6594. >
  6595. <span>{this.state.salesmanMobile}</span>
  6596. </FormItem>
  6597. </div>
  6598. <div className="clearfix">
  6599. <FormItem
  6600. className="half-item"
  6601. {...formItemLayout}
  6602. label="当前财务负责人"
  6603. >
  6604. <span>{this.state.nowFinance}</span>
  6605. </FormItem>
  6606. <FormItem
  6607. className="half-item"
  6608. {...formItemLayout}
  6609. label="当前财务负责人电话"
  6610. >
  6611. <span>{this.state.nowFinanceMobile}</span>
  6612. </FormItem>
  6613. </div>
  6614. <div className="clearfix">
  6615. <FormItem
  6616. className="half-item"
  6617. {...formItemLayout}
  6618. style={{ opacity: ".5" }}
  6619. label="原订单负责人"
  6620. >
  6621. <span>{this.state.oldSalesmanName}</span>
  6622. </FormItem>
  6623. <FormItem
  6624. className="half-item"
  6625. {...formItemLayout}
  6626. style={{ opacity: ".5" }}
  6627. label="原订单负责人电话"
  6628. >
  6629. <span>{this.state.oldSalesmanMobile}</span>
  6630. </FormItem>
  6631. </div>
  6632. <div className="clearfix">
  6633. <FormItem
  6634. className="half-item"
  6635. style={{ opacity: ".5" }}
  6636. {...formItemLayout}
  6637. label="实际财务操作人"
  6638. >
  6639. <span>{this.state.financeName}</span>
  6640. </FormItem>
  6641. <FormItem
  6642. className="half-item"
  6643. {...formItemLayout}
  6644. style={{ opacity: ".5" }}
  6645. label="实际财务操作人电话"
  6646. >
  6647. <span>{this.state.financeMobile}</span>
  6648. </FormItem>
  6649. </div>
  6650. {/* 新增协单人员 */}
  6651. <div>
  6652. <div style={{ marginLeft: "50px", display: 'flex' }}>
  6653. <div
  6654. style={{
  6655. minWidth: '66px',
  6656. maxWidth: '100px',
  6657. fontSize: "12px",
  6658. color: "red",
  6659. }}
  6660. >
  6661. 协单人员 :
  6662. </div>
  6663. <div>
  6664. {this.state.personnel.length > 0
  6665. ? this.state.personnel.map(function (value, key) {
  6666. return (
  6667. <Tag
  6668. style={{ marginBottom: '5px' }}
  6669. key={value.id}
  6670. closable={closable}
  6671. onClose={(e) => {
  6672. e.preventDefault();
  6673. confirm({
  6674. title: "确定删除此人员吗?",
  6675. // content: (
  6676. // <span style={{ color: "red" }}>
  6677. // 删除后会将该项目下的所有催款节点自动清除!!!
  6678. // </span>
  6679. // ),
  6680. onOk() {
  6681. $.ajax({
  6682. method: "post",
  6683. dataType: "json",
  6684. crossDomain: false,
  6685. url:
  6686. globalConfig.context +
  6687. "/api/admin/newOrder/deleteAssist",
  6688. data: {
  6689. id: value.id,
  6690. },
  6691. success: function (data) {
  6692. if (data.error.length) {
  6693. message.warning(
  6694. data.error[0].message
  6695. );
  6696. } else {
  6697. message.success("删除成功");
  6698. assistList();
  6699. }
  6700. }.bind(this),
  6701. }).always(
  6702. function () {
  6703. this.setState({
  6704. loading: false,
  6705. });
  6706. }.bind(this)
  6707. );
  6708. },
  6709. onCancel() { },
  6710. });
  6711. }}
  6712. >
  6713. {value.name}
  6714. </Tag>
  6715. );
  6716. })
  6717. : "无"}
  6718. </div>
  6719. </div>
  6720. <div
  6721. style={{
  6722. margin: "10px 0 0 50px",
  6723. display: this.state.disabledView,
  6724. }}
  6725. >
  6726. <Button
  6727. type="primary"
  6728. onClick={() => {
  6729. this.setState({
  6730. coorVisible: "block",
  6731. coor: "",
  6732. });
  6733. }}
  6734. >
  6735. 添加协单人员
  6736. </Button>
  6737. {/* 提示 */}
  6738. <div style={{ color: "red" }}>
  6739. 注:协单人员为技术人员,陪同营销人员进行订单协作等相关工作,填写后将统计至相关的奖金、提成等
  6740. </div>
  6741. </div>
  6742. {/*添加协单人员 */}
  6743. <div
  6744. style={{
  6745. margin: "10px 0 0 50px",
  6746. display: this.state.coorVisible,
  6747. }}
  6748. >
  6749. <Form
  6750. onSubmit={this.handleSubmit}
  6751. ref={this.formRef}
  6752. >
  6753. <Form.Item
  6754. {...formItemLayout}
  6755. label=""
  6756. name="coor"
  6757. hasFeedback
  6758. >
  6759. <AutoComplete
  6760. // autocomplete="off"
  6761. allowClear
  6762. dataSource={dataSourceView}
  6763. style={{ width: 200 }}
  6764. onSelect={this.onSelectView}
  6765. onSearch={this.handleSearch}
  6766. placeholder="请输入名称"
  6767. />
  6768. </Form.Item>
  6769. </Form>
  6770. <div style={{ marginLeft: "10px" }}>
  6771. <Button
  6772. type="primary"
  6773. style={{ marginRight: "54px" }}
  6774. onClick={this.submitOrder}
  6775. loading={this.state.loading}
  6776. >
  6777. 保存
  6778. </Button>
  6779. <Button
  6780. onClick={() => {
  6781. this.setState({
  6782. coorVisible: "none",
  6783. });
  6784. }}
  6785. >
  6786. 取消
  6787. </Button>
  6788. </div>
  6789. </div>
  6790. </div>
  6791. {/* 分界线 */}
  6792. <div
  6793. style={{
  6794. borderTop: "1px solid #333",
  6795. margin: "5px 0",
  6796. }}
  6797. ></div>
  6798. {/* 上门服务次数 */}
  6799. <div>
  6800. <div
  6801. style={{
  6802. display: "flex",
  6803. justifyContent: "space-between",
  6804. }}
  6805. >
  6806. <div
  6807. style={{ marginLeft: "50px", fontSize: "20px" }}
  6808. >
  6809. 上门服务次数
  6810. </div>
  6811. <div>
  6812. <Button
  6813. type="primary"
  6814. style={{ marginBottom: 15 }}
  6815. onClick={() => {
  6816. this.publicByOrder();
  6817. this.setState({
  6818. modalRecord: true,
  6819. });
  6820. }}
  6821. >
  6822. 查看上门记录
  6823. </Button>
  6824. <Button
  6825. style={{ marginLeft: 5, display: this.state.disabledView }}
  6826. type="primary"
  6827. onClick={() => {
  6828. this.setState({
  6829. modalView: true,
  6830. dateView: '',
  6831. contentView: '',
  6832. remarksView: '',
  6833. contentViewLength: 0,
  6834. contentViewLength1: 0,
  6835. });
  6836. }}
  6837. >
  6838. 添加上门次数
  6839. </Button>
  6840. </div>
  6841. </div>
  6842. {/* 上门服务表格 */}
  6843. <div
  6844. className="patent-table"
  6845. style={{ marginBottom: 10 }}
  6846. >
  6847. <Spin spinning={this.state.loading}>
  6848. <Table
  6849. columns={this.state.columnsView}
  6850. scroll={{ x: "max-content", y: 0 }}
  6851. dataSource={this.state.dataView}
  6852. pagination={false}
  6853. // onRowClick={this.tableRowClick}
  6854. bordered
  6855. size="small"
  6856. />
  6857. </Spin>
  6858. </div>
  6859. {/* 查看上门记录 */}
  6860. <Modal
  6861. footer=""
  6862. title="技术人员上门详细记录"
  6863. visible={this.state.modalRecord}
  6864. width="1200px"
  6865. onCancel={() => {
  6866. this.setState({
  6867. modalRecord: false,
  6868. });
  6869. }}
  6870. >
  6871. <Spin spinning={this.state.loading}>
  6872. <Table
  6873. columns={this.state.columnsRecord}
  6874. scroll={{ x: "max-content", y: 0 }}
  6875. dataSource={this.state.publicView}
  6876. pagination={false}
  6877. // onRowClick={this.tableRowClick}
  6878. bordered
  6879. size="small"
  6880. />
  6881. </Spin>
  6882. </Modal>
  6883. {/* 添加上门次数模态框 */}
  6884. <Modal
  6885. footer=""
  6886. title="新增上门次数"
  6887. visible={this.state.modalView}
  6888. key={this.state.viewKey}
  6889. onCancel={() => {
  6890. this.setState({
  6891. modalView: false,
  6892. viewKey: this.state.viewKey + 1,
  6893. });
  6894. }}
  6895. >
  6896. <Form
  6897. onSubmit={this.handleSubmit}
  6898. ref={this.formRef}
  6899. style={{ marginRight: "120px" }}
  6900. >
  6901. <Form.Item
  6902. {...formItemLayout}
  6903. label="上门时间"
  6904. name="date"
  6905. hasFeedback
  6906. >
  6907. <DatePicker
  6908. placeholder="预计技术员上门服务时间"
  6909. onChange={(date, dateString) => {
  6910. this.setState({
  6911. dateView: dateString,
  6912. });
  6913. }}
  6914. />
  6915. </Form.Item>
  6916. <Form.Item
  6917. {...formItemLayout}
  6918. label="服务内容"
  6919. name="remarks"
  6920. hasFeedback
  6921. style={{ position: 'relative' }}
  6922. >
  6923. <TextArea
  6924. rows={4}
  6925. placeholder="需要技术员上门服务内容"
  6926. onChange={(e) => {
  6927. this.setState({
  6928. contentView: e.target.value,
  6929. }, () => {
  6930. if (!this.state.contentView) {
  6931. this.setState({
  6932. contentViewLength: 0,
  6933. })
  6934. } else {
  6935. this.setState({
  6936. contentViewLength: this.state.contentView.length
  6937. })
  6938. }
  6939. });
  6940. }}
  6941. maxLength={500}
  6942. >
  6943. </TextArea>
  6944. <div style={{ position: 'absolute', right: '20px', bottom: '-5px', zIndex: '10' }}>{this.state.contentViewLength + '/500'}</div>
  6945. </Form.Item>
  6946. <Form.Item
  6947. {...formItemLayout}
  6948. label="备注"
  6949. name="remarks"
  6950. hasFeedback
  6951. style={{ position: 'relative' }}
  6952. >
  6953. <TextArea
  6954. rows={4}
  6955. maxLength={500}
  6956. placeholder="需要技术员注意事项"
  6957. onChange={(e) => {
  6958. this.setState({
  6959. remarksView: e.target.value,
  6960. }, () => {
  6961. if (!this.state.remarksView) {
  6962. this.setState({
  6963. contentViewLength1: 0,
  6964. })
  6965. } else {
  6966. this.setState({
  6967. contentViewLength1: this.state.remarksView.length
  6968. })
  6969. }
  6970. });
  6971. }}
  6972. />
  6973. <div style={{ position: 'absolute', right: '20px', bottom: '-5px', zIndex: '10' }}>{this.state.contentViewLength1 + '/500'}</div>
  6974. </Form.Item>
  6975. </Form>
  6976. <div
  6977. style={{
  6978. display: "flex",
  6979. justifyContent: "center",
  6980. }}
  6981. >
  6982. <Button
  6983. onClick={this.submitView}
  6984. type="primary"
  6985. loading={this.state.loading}
  6986. >
  6987. 提交
  6988. </Button>
  6989. <Button
  6990. type="dashed"
  6991. style={{ marginLeft: "15px" }}
  6992. onClick={() => {
  6993. this.setState({
  6994. modalView: false,
  6995. viewKey: this.state.viewKey + 1,
  6996. dateView: '',
  6997. contentView: '',
  6998. remarksView: '',
  6999. contentViewLength: 0,
  7000. contentViewLength1: 0,
  7001. });
  7002. }}
  7003. >
  7004. 取消
  7005. </Button>
  7006. </div>
  7007. </Modal>
  7008. </div>
  7009. <div>
  7010. <span
  7011. style={{ marginLeft: "50px", fontSize: "20px" }}
  7012. >
  7013. 项目业务
  7014. </span>
  7015. {
  7016. this.state.processStatus == 0 &&
  7017. <Button
  7018. type="primary"
  7019. onClick={this.addDetailed}
  7020. style={{
  7021. float: "right",
  7022. marginRight: "50px",
  7023. marginBottom: "15px",
  7024. }}
  7025. >
  7026. 添加项目明细
  7027. </Button>
  7028. }
  7029. {
  7030. this.props.datauser.projectType == 1 && this.state.processStatus > 1 &&
  7031. <Button
  7032. type="primary"
  7033. onClick={this.addVip}
  7034. style={{
  7035. float: "right",
  7036. marginRight: "50px",
  7037. marginBottom: "15px",
  7038. }}
  7039. >
  7040. 添加会员项目
  7041. </Button>
  7042. }
  7043. {
  7044. (this.state.processStatus == 6 || this.state.processStatus == 7) &&
  7045. <Button
  7046. type="primary"
  7047. style={{
  7048. float: "right",
  7049. marginRight: "50px",
  7050. marginBottom: "15px",
  7051. }}
  7052. onClick={() => {
  7053. if (this.state.deleteSign == 2 || this.state.deleteSign == 3) {
  7054. message.warning("项目变更中,无法发起项目重启");
  7055. return
  7056. }
  7057. this.setState({
  7058. selectVisible: true,
  7059. sType: "restart",
  7060. })
  7061. }}
  7062. >
  7063. 项目重启
  7064. </Button>
  7065. }
  7066. {
  7067. (this.state.processStatus == 6 || this.state.processStatus == 7) &&
  7068. <Button
  7069. type="primary"
  7070. style={{
  7071. float: "right",
  7072. marginRight: "50px",
  7073. marginBottom: "15px",
  7074. }}
  7075. onClick={() => {
  7076. if (this.state.deleteSign == 2 || this.state.deleteSign == 3) {
  7077. message.warning("项目变更中,无法发起项目暂停");
  7078. return
  7079. }
  7080. this.setState({
  7081. selectVisible: true,
  7082. sType: "suspend",
  7083. })
  7084. }}
  7085. >
  7086. 项目暂停
  7087. </Button>
  7088. }
  7089. </div>
  7090. <div
  7091. className="patent-table"
  7092. style={{ marginBottom: 10 }}
  7093. >
  7094. <Spin spinning={this.state.loading}>
  7095. {
  7096. // 项目暂停&重启勾选
  7097. this.state.selectVisible &&
  7098. <SelectList
  7099. type={this.state.sType}
  7100. contractNo={this.state.contractNo}
  7101. orderNo={this.state.orderNo}
  7102. userName={this.state.userName}
  7103. list={this.state.dataSource}
  7104. visible={this.state.selectVisible}
  7105. subClose={() => {
  7106. this.loadData();
  7107. this.setState({
  7108. selectVisible: false,
  7109. })
  7110. }}
  7111. />
  7112. }
  7113. <Table
  7114. rowKey="id"
  7115. columns={this.state.columns}
  7116. dataSource={this.state.dataSource}
  7117. pagination={this.state.pagination}
  7118. expandedRowRender={expandedRowRenderVip}
  7119. rowClassName={this.addRowColor}
  7120. onRowClick={this.tableRowClick}
  7121. bordered
  7122. size="small"
  7123. />
  7124. </Spin>
  7125. </div>
  7126. <div
  7127. style={{
  7128. display: cuiDataList.length ? "block" : "none",
  7129. }}
  7130. >
  7131. <span
  7132. style={{ marginLeft: "50px", fontSize: "20px" }}
  7133. >
  7134. 旧催款节点
  7135. </span>
  7136. <Button
  7137. type="primary"
  7138. // onClick={this.addcontact}
  7139. disabled
  7140. onClick={(e) => {
  7141. cuiDataList.length
  7142. ? this.addcontact()
  7143. : this.addcontactNew();
  7144. }}
  7145. style={{
  7146. float: "right",
  7147. marginRight: "50px",
  7148. marginBottom: "15px",
  7149. display:
  7150. this.state.processStatus == 0
  7151. ? "block"
  7152. : "none",
  7153. }}
  7154. >
  7155. 添加催款节点
  7156. </Button>
  7157. </div>
  7158. <div
  7159. className="clearfix"
  7160. style={{
  7161. display: cuiDataList.length ? "block" : "none",
  7162. }}
  7163. >
  7164. <Spin spinning={this.state.loading}>
  7165. <Form layout="horizontal">
  7166. <Table
  7167. pagination={false}
  7168. columns={this.state.ContactsLists}
  7169. dataSource={this.state.contactList}
  7170. scroll={{ x: "max-content", y: 0 }}
  7171. bordered
  7172. size="small"
  7173. />
  7174. <Col
  7175. span={24}
  7176. offset={9}
  7177. style={{ marginTop: "15px" }}
  7178. ></Col>
  7179. </Form>
  7180. </Spin>
  7181. </div>
  7182. <div
  7183. style={{
  7184. display: cuiDataList.length ? "none" : "block",
  7185. }}
  7186. >
  7187. <span
  7188. style={{
  7189. marginLeft: "50px",
  7190. fontSize: "20px",
  7191. }}
  7192. >
  7193. 新催款节点
  7194. </span>
  7195. <span
  7196. style={{
  7197. display: "inline-block",
  7198. marginLeft: 10,
  7199. color: "red",
  7200. }}
  7201. >
  7202. 金额总计(万元): {this.state.totalCui}
  7203. </span>
  7204. <Button
  7205. type="primary"
  7206. disabled={this.state.addFlag ? true : false}
  7207. // onClick={this.addcontact}
  7208. onClick={(e) => {
  7209. this.setState({ addFlag: true });
  7210. this.addcontactNew();
  7211. }}
  7212. style={{
  7213. float: "right",
  7214. marginRight: "50px",
  7215. marginBottom: "15px",
  7216. display:
  7217. this.state.processStatus == 0
  7218. ? "block"
  7219. : "none",
  7220. }}
  7221. >
  7222. 添加催款节点
  7223. </Button>
  7224. </div>
  7225. <div
  7226. className="clearfix"
  7227. style={{
  7228. display: cuiDataList.length ? "none" : "block",
  7229. }}
  7230. >
  7231. <Spin spinning={this.state.loading}>
  7232. <Form layout="horizontal">
  7233. <Table
  7234. pagination={false}
  7235. columns={this.state.ContactsListsNew}
  7236. dataSource={this.state.contactListNew}
  7237. scroll={{ x: "max-content", y: 0 }}
  7238. bordered
  7239. size="small"
  7240. />
  7241. <Col
  7242. span={24}
  7243. offset={9}
  7244. style={{ marginTop: "15px" }}
  7245. ></Col>
  7246. </Form>
  7247. </Spin>
  7248. </div>
  7249. {this.state.processStatus == 0 &&
  7250. <div
  7251. className="addSave"
  7252. style={{
  7253. marginTop: "15px",
  7254. display: "flex",
  7255. justifyContent: "center",
  7256. }}
  7257. >
  7258. <Button
  7259. className="cancel"
  7260. type="primary"
  7261. onClick={this.handleCancels}
  7262. style={{ margin: "0 25px" }}
  7263. htmlType="submit"
  7264. loading={this.state.loading}
  7265. >
  7266. 签单
  7267. </Button>
  7268. <Button
  7269. className="cancel"
  7270. type="primary"
  7271. onClick={this.handleCancelq}
  7272. style={{ margin: "0 25px" }}
  7273. htmlType="submit"
  7274. loading={this.state.loading}
  7275. >
  7276. 保存
  7277. </Button>
  7278. <Popconfirm
  7279. title="请确认您是否作废此订单??"
  7280. onConfirm={(e) => {
  7281. this.examOks()
  7282. }}
  7283. okText="确认"
  7284. cancelText="取消"
  7285. >
  7286. <Button
  7287. className="cancel"
  7288. type="danger"
  7289. // onClick={this.examOks}
  7290. style={{ margin: "0 25px" }}
  7291. loading={this.state.loading}
  7292. >
  7293. 订单作废
  7294. </Button>
  7295. </Popconfirm>
  7296. <Button
  7297. className="cancel"
  7298. type="ghost"
  7299. onClick={this.handleCancelclose}
  7300. style={{ margin: "0 25px" }}
  7301. >
  7302. 取消
  7303. </Button>
  7304. </div>
  7305. }
  7306. </div>
  7307. }
  7308. </TabPane>
  7309. <TabPane tab="合同变更发起" key="2">
  7310. {
  7311. this.state.activeKey == "2" &&
  7312. <div className="contractchange">
  7313. {
  7314. !(this.state.processStatus == 6 || this.state.processStatus == 7) &&
  7315. <div className="cmask">当前状态不能发起合同变更</div>
  7316. }
  7317. <div className="clearfix">
  7318. <FormItem
  7319. className="half-item"
  7320. {...formItemLayout}
  7321. label="客户名称"
  7322. >
  7323. <span>{this.state.userName}</span>
  7324. <EnterpriseNameChange
  7325. type="journal"
  7326. style={{ marginLeft: 10 }}
  7327. enterpriseId={this.state.orderUid}
  7328. />
  7329. </FormItem>
  7330. </div>
  7331. <div className="clearfix">
  7332. <FormItem
  7333. className="half-item"
  7334. {...formItemLayout}
  7335. label="合同编号"
  7336. >
  7337. <span>{this.state.contractNo}</span>
  7338. </FormItem>
  7339. </div>
  7340. <div className="clearfix">
  7341. <FormItem
  7342. className="half-item"
  7343. {...formItemLayout}
  7344. label="申请变更部门"
  7345. >
  7346. <span>{this.state.depName}</span>
  7347. </FormItem>
  7348. <FormItem
  7349. className="half-item"
  7350. {...formItemLayout}
  7351. label="申请人"
  7352. >
  7353. <span>{this.state.salesmanName}</span>
  7354. </FormItem>
  7355. </div>
  7356. <div className="clearfix">
  7357. <FormItem
  7358. labelCol={{ span: 5 }}
  7359. wrapperCol={{ span: 19 }}
  7360. label="变更类型"
  7361. >
  7362. <Select
  7363. placeholder="选择合同变更类型"
  7364. style={{ width: 200 }}
  7365. disabled={this.state.changeFlag}
  7366. value={this.state.typeChange}
  7367. onChange={(e) => {
  7368. this.setState({
  7369. typeChange: e,
  7370. changeFlag: true,
  7371. });
  7372. if (e == 1) {
  7373. this.setState({
  7374. hetongFlag: false,
  7375. listFlag: false,
  7376. listCuiFlag: false,
  7377. tuiKuanFlag: false,
  7378. displayList: false,
  7379. });
  7380. } else if (e == 2) {
  7381. this.setState({
  7382. hetongFlag: true,
  7383. listFlag: false,
  7384. listCuiFlag: false,
  7385. tuiKuanFlag: true,
  7386. displayList: false,
  7387. });
  7388. } else if (e == 3) {
  7389. this.setState({
  7390. listFlag: false,
  7391. hetongFlag: false,
  7392. listCuiFlag: false,
  7393. tuiKuanFlag: false,
  7394. displayList: true,
  7395. });
  7396. } else if (e == 4) {
  7397. this.setState({
  7398. listFlag: false,
  7399. listCuiFlag: false,
  7400. hetongFlag: false,
  7401. tuiKuanFlag: true,
  7402. displayList: false,
  7403. });
  7404. } else if (e == 5) {
  7405. this.setState({
  7406. listFlag: false,
  7407. listCuiFlag: false,
  7408. hetongFlag: true,
  7409. tuiKuanFlag: true,
  7410. displayList: false,
  7411. });
  7412. } else if (e == 6) {
  7413. this.setState({
  7414. listFlag: true,
  7415. listCuiFlag: true,
  7416. hetongFlag: true,
  7417. tuiKuanFlag: true,
  7418. displayList: false,
  7419. });
  7420. } else if (e == 7) {
  7421. this.setState({
  7422. listFlag: true,
  7423. listCuiFlag: true,
  7424. hetongFlag: true,
  7425. tuiKuanFlag: true,
  7426. displayList: false,
  7427. isNew: true, //上传替换合同
  7428. });
  7429. } else {
  7430. this.setState({
  7431. hetongFlag: false,
  7432. listFlag: false,
  7433. listCuiFlag: false,
  7434. tuiKuanFlag: false,
  7435. displayList: false,
  7436. });
  7437. }
  7438. }}
  7439. >
  7440. <Option value={0}>退单退款</Option>
  7441. <Option value={1}>项目及金额变更</Option>
  7442. <Option value={2}>仅项目变更</Option>
  7443. <Option value={3}>仅金额变更</Option>
  7444. <Option value={4}>重报</Option>
  7445. <Option value={5}>赠送</Option>
  7446. <Option value={6}>退单不退款</Option>
  7447. <Option value={7}>仅变更合同</Option>
  7448. <Option value={8}>框架协议(仅已签框架合同适用)</Option>
  7449. </Select>
  7450. <Button
  7451. style={{ marginLeft: 10 }}
  7452. onClick={(e) => {
  7453. this.setState({
  7454. listFlag: false,
  7455. hetongFlag: false,
  7456. listCuiFlag: false,
  7457. tuiKuanFlag: false,
  7458. displayList: false,
  7459. startRemarks: "",
  7460. remarksC: "",
  7461. voucherUrl: [],
  7462. newContractUrl: [],
  7463. isNew: false,
  7464. changeAmount: "0",
  7465. applicant: undefined,
  7466. depNameChange: undefined,
  7467. typeChange: undefined,
  7468. changeFlag: false,
  7469. });
  7470. }}
  7471. >
  7472. 重置
  7473. </Button>
  7474. {(this.state.status === 3 || this.state.status == 0) ? (
  7475. <Button
  7476. type="danger"
  7477. style={{
  7478. float: "right",
  7479. backgroundColor: "red",
  7480. color: "white",
  7481. position: "absolute",
  7482. right: 0,
  7483. height: 50,
  7484. borderRadius: 20,
  7485. zIndex: 100,
  7486. top: 0,
  7487. }}
  7488. onClick={(e) => {
  7489. e.stopPropagation();
  7490. this.showConfirmChange(this.deleteChange);
  7491. }}
  7492. >
  7493. 取消本次变更
  7494. </Button>
  7495. ) : (
  7496. ""
  7497. )}
  7498. </FormItem>
  7499. </div>
  7500. <div className="clearfix">
  7501. <FormItem
  7502. labelCol={{ span: 5 }}
  7503. wrapperCol={{ span: 19 }}
  7504. label="合同额(万元)"
  7505. >
  7506. <Input
  7507. placeholder="请输入合同额"
  7508. disabled={this.state.hetongFlag}
  7509. ref="signTotalAmount"
  7510. value={this.state.totalAmount}
  7511. onChange={(e) => {
  7512. this.setState({
  7513. totalAmount: e.target.value,
  7514. });
  7515. }}
  7516. style={{ width: "240px" }}
  7517. />
  7518. </FormItem>
  7519. <FormItem
  7520. labelCol={{ span: 5 }}
  7521. wrapperCol={{ span: 19 }}
  7522. label="首付款(万元)"
  7523. >
  7524. <Input
  7525. placeholder="请输入首付款"
  7526. disabled={this.state.hetongFlag}
  7527. ref="signTotalAmount"
  7528. value={this.state.firstAmount}
  7529. onChange={(e) => {
  7530. this.setState({
  7531. firstAmount: e.target.value,
  7532. });
  7533. }}
  7534. style={{ width: "240px" }}
  7535. />
  7536. </FormItem>
  7537. <FormItem
  7538. labelCol={{ span: 5 }}
  7539. wrapperCol={{ span: 19 }}
  7540. label="已收款(万元)"
  7541. >
  7542. <span>
  7543. {this.state.settlementAmount}
  7544. &nbsp;&nbsp;&nbsp;&nbsp;
  7545. <span style={{ color: "red" }}>
  7546. (注:已收款与现实收款不符,请与财务专员联系)
  7547. </span>
  7548. </span>
  7549. </FormItem>
  7550. <FormItem
  7551. labelCol={{ span: 5 }}
  7552. wrapperCol={{ span: 19 }}
  7553. label="申请退款(万元)"
  7554. >
  7555. <Input
  7556. placeholder="请输入申请退款"
  7557. ref="signTotalAmount"
  7558. disabled={this.state.tuiKuanFlag}
  7559. value={this.state.changeAmount}
  7560. onChange={(e) => {
  7561. this.setState({
  7562. changeAmount: e.target.value,
  7563. });
  7564. }}
  7565. style={{ width: "240px" }}
  7566. />
  7567. </FormItem>
  7568. </div>
  7569. <div
  7570. style={{
  7571. display: this.state.isCaoGao ? "block" : "none",
  7572. }}
  7573. >
  7574. <div>
  7575. <span
  7576. style={{
  7577. marginLeft: "50px",
  7578. fontSize: "20px",
  7579. }}
  7580. >
  7581. 项目业务
  7582. </span>
  7583. <span style={{ color: "red" }}>
  7584. (注:项目删除后,此项目的全部节点、全部工时,全部被删除,请谨慎删除!)
  7585. </span>
  7586. <Button
  7587. type="primary"
  7588. onClick={this.changeAddPro}
  7589. disabled={this.state.listFlag}
  7590. style={{
  7591. float: "right",
  7592. marginRight: "50px",
  7593. marginBottom: "15px",
  7594. display: this.state.displayList
  7595. ? "none"
  7596. : "block",
  7597. }}
  7598. >
  7599. 添加项目明细
  7600. </Button>
  7601. </div>
  7602. <div
  7603. className="patent-table"
  7604. style={{ marginBottom: 10 }}
  7605. >
  7606. <Spin spinning={this.state.loading}>
  7607. <Table
  7608. columns={this.state.proColumns}
  7609. dataSource={this.state.proDataSource}
  7610. expandedRowRender={expandedRowRender}
  7611. pagination={this.state.pagination}
  7612. rowClassName={this.addRowColor}
  7613. // onRowDoubleClick={
  7614. // this.state.listFlag
  7615. // ? this.not
  7616. // : this.editPro
  7617. // }
  7618. bordered
  7619. size="small"
  7620. />
  7621. </Spin>
  7622. </div>
  7623. <div>
  7624. <span
  7625. style={{
  7626. marginLeft: "50px",
  7627. fontSize: "20px",
  7628. }}
  7629. >
  7630. 催款节点
  7631. </span>
  7632. <span style={{ color: "red" }}>
  7633. (注:节点删除后,无论节点是否触发,均会删除,请谨慎删除!双击可修改对应金额!)
  7634. </span>
  7635. <Button
  7636. type="primary"
  7637. onClick={(e) => {
  7638. this.changeAddCui();
  7639. }}
  7640. disabled={this.state.listCuiFlag}
  7641. style={{
  7642. float: "right",
  7643. marginRight: "50px",
  7644. marginBottom: "15px",
  7645. display: this.state.displayList
  7646. ? "none"
  7647. : "block",
  7648. }}
  7649. >
  7650. 添加催款节点
  7651. </Button>
  7652. </div>
  7653. <div className="clearfix">
  7654. <Spin spinning={this.state.loading}>
  7655. <Form layout="horizontal">
  7656. <Table
  7657. pagination={false}
  7658. columns={this.state.changeCuiList}
  7659. dataSource={this.state.cuiDataSource}
  7660. scroll={{ x: "max-content", y: 0 }}
  7661. onRowDoubleClick={
  7662. this.state.listCuiFlag
  7663. ? this.not
  7664. : this.editCui
  7665. }
  7666. bordered
  7667. size="small"
  7668. />
  7669. <Col
  7670. span={24}
  7671. offset={9}
  7672. style={{ marginTop: "15px" }}
  7673. ></Col>
  7674. </Form>
  7675. </Spin>
  7676. </div>
  7677. </div>
  7678. <div className="clearfix">
  7679. <FormItem
  7680. style={{ height: "auto" }}
  7681. labelCol={{ span: 5 }}
  7682. wrapperCol={{ span: 19 }}
  7683. label="变更原因"
  7684. >
  7685. <TextArea
  7686. rows={4}
  7687. placeholder="请输入变更原因"
  7688. ref="signTotalAmount"
  7689. style={{ width: "95%" }}
  7690. value={this.state.remarksC}
  7691. onChange={(e) => {
  7692. this.setState({
  7693. remarksC: e.target.value,
  7694. });
  7695. }}
  7696. />
  7697. </FormItem>
  7698. </div>
  7699. <div className="clearfix">
  7700. <FormItem
  7701. style={{ height: "auto" }}
  7702. labelCol={{ span: 5 }}
  7703. wrapperCol={{ span: 19 }}
  7704. label="备注"
  7705. >
  7706. <TextArea
  7707. rows={4}
  7708. placeholder="请输入备注"
  7709. ref="signTotalAmount"
  7710. style={{ width: "95%" }}
  7711. value={this.state.startRemarks}
  7712. onChange={(e) => {
  7713. this.setState({
  7714. startRemarks: e.target.value,
  7715. });
  7716. }}
  7717. />
  7718. </FormItem>
  7719. </div>
  7720. <div className="clearfix">
  7721. <FormItem
  7722. labelCol={{ span: 5 }}
  7723. wrapperCol={{ span: 19 }}
  7724. label="变更凭证"
  7725. >
  7726. <PicturesWall
  7727. domId={"addService5"}
  7728. fileList={this.getVoucherUrl}
  7729. pictureUrl={this.state.voucherUrl}
  7730. url="/api/admin/orderChange/uploadFile"
  7731. sign="order_change_file"
  7732. />
  7733. <p>图片建议:要清晰。</p>
  7734. </FormItem>
  7735. </div>
  7736. <div className="clearfix">
  7737. <FormItem
  7738. labelCol={{ span: 5 }}
  7739. wrapperCol={{ span: 19 }}
  7740. label="上传替换合同"
  7741. >
  7742. <Switch disabled={this.state.typeChange == 7} checked={this.state.isNew} onChange={e => { this.setState({ isNew: e }) }} />,
  7743. <p style={{ color: "red" }}>注:原上传合同为空或作废时,需上传替换合同</p>
  7744. </FormItem>
  7745. </div>
  7746. {
  7747. this.state.isNew &&
  7748. <div className="clearfix">
  7749. <FormItem
  7750. labelCol={{ span: 5 }}
  7751. wrapperCol={{ span: 19 }}
  7752. label="合同扫描件"
  7753. >
  7754. <PicturesWall
  7755. domId={"newcontract"}
  7756. fileList={this.getNewContractUrl}
  7757. pictureUrl={this.state.newContractUrl}
  7758. url="/api/admin/orderChange/uploadFile"
  7759. sign=""
  7760. />
  7761. <p>图片建议:要清晰。</p>
  7762. </FormItem>
  7763. </div>
  7764. }
  7765. <div className="clearfix">
  7766. <Button
  7767. type="primary"
  7768. style={{ float: "right", marginRight: 40 }}
  7769. loading={this.state.loading}
  7770. onClick={(e) => {
  7771. if (this.state.isCaoGao) {
  7772. this.submitChange();
  7773. } else {
  7774. this.changeApply();
  7775. }
  7776. }}
  7777. >
  7778. {/* {this.state.isCaoGao
  7779. ? "发起变更申请"
  7780. : this.state.typeChange == 0
  7781. ? "发起变更申请"
  7782. : "下一步"} */}
  7783. {this.state.isCaoGao ? "发起变更申请" : "下一步"}
  7784. </Button>
  7785. </div>
  7786. </div>
  7787. }
  7788. </TabPane>
  7789. {this.state.isJilu &&
  7790. <TabPane tab={"最近变更记录"} key="3">
  7791. {
  7792. this.state.activeKey == "3" &&
  7793. <div>
  7794. <div
  7795. style={{
  7796. borderRadius: "50%",
  7797. width: 300,
  7798. height: 300,
  7799. position: "absolute",
  7800. top: 230,
  7801. left: 525,
  7802. transform: "rotate(-5deg)",
  7803. zIndex: 1,
  7804. display:
  7805. this.state.detailChange.status == 4
  7806. ? "block"
  7807. : "none",
  7808. }}
  7809. >
  7810. <img src={tongguo} style={{ width: "100%" }} />
  7811. </div>
  7812. <div
  7813. style={{
  7814. borderRadius: "50%",
  7815. width: 300,
  7816. height: 300,
  7817. position: "absolute",
  7818. top: 284,
  7819. left: 586,
  7820. transform: "rotate(-5deg)",
  7821. zIndex: 1,
  7822. display:
  7823. this.state.detailChange.status == 5
  7824. ? "block"
  7825. : "none",
  7826. }}
  7827. >
  7828. <img src={quxiao} style={{ width: "63%" }} />
  7829. </div>
  7830. <div className="clearfix">
  7831. <FormItem
  7832. className="half-item"
  7833. {...formItemLayout}
  7834. label="客户名称"
  7835. >
  7836. <span>{this.state.userName}</span>
  7837. <EnterpriseNameChange
  7838. type="journal"
  7839. style={{ marginLeft: 10 }}
  7840. enterpriseId={this.state.orderUid}
  7841. />
  7842. </FormItem>
  7843. {/* */}
  7844. <FormItem
  7845. className="half-item"
  7846. {...formItemLayout}
  7847. label="合同编号"
  7848. >
  7849. <span>{this.state.contractNo}</span>
  7850. </FormItem>
  7851. </div>
  7852. <div className="clearfix">
  7853. <FormItem
  7854. className="half-item"
  7855. {...formItemLayout}
  7856. label="时间"
  7857. >
  7858. <span>
  7859. {this.state.detailChange.createTimes}
  7860. </span>
  7861. </FormItem>
  7862. <FormItem
  7863. className="half-item"
  7864. {...formItemLayout}
  7865. label="申请人"
  7866. >
  7867. <span>{this.state.salesmanName}</span>
  7868. </FormItem>
  7869. </div>
  7870. <div className="clearfix">
  7871. <FormItem
  7872. className="half-item"
  7873. {...formItemLayout}
  7874. label="当前进度"
  7875. >
  7876. <span>
  7877. {/*当前是进度角色是咨询师以及咨询师经理时使用shenhePeo函数,其他流程正常显示*/}
  7878. {this.state.detailChange.processState === 3 ||
  7879. this.state.detailChange.processState === 4
  7880. ? shenghePeo(this.state.detailChange.examineName, this.state.detailChange.processState)
  7881. : getProcessStatusNew(
  7882. this.state.detailChange.examineName,
  7883. this.state.detailChange.processState,
  7884. this.state.detailChange.status
  7885. )}
  7886. </span>
  7887. <FlowChart id={this.state.detailChange.id} />
  7888. </FormItem>
  7889. {/* <FormItem
  7890. className="half-item"
  7891. {...formItemLayout}
  7892. label="申请变更部门"
  7893. >
  7894. <span>{this.state.depName}</span>
  7895. </FormItem> */}
  7896. <FormItem
  7897. {...formItemLayout}
  7898. className="half-item"
  7899. label="变更类型"
  7900. >
  7901. <span>
  7902. {getChangeType(
  7903. this.state.detailChange.typeChange
  7904. )}
  7905. </span>
  7906. </FormItem>
  7907. </div>
  7908. {/* <div className="clearfix">
  7909. <FormItem
  7910. labelCol={{ span: 4 }}
  7911. wrapperCol={{ span: 18 }}
  7912. label="变更类型"
  7913. >
  7914. <span>
  7915. {getChangeType(
  7916. this.state.detailChange.typeChange
  7917. )}
  7918. </span>
  7919. </FormItem>
  7920. </div> */}
  7921. <div className="clearfix">
  7922. <FormItem
  7923. {...formItemLayout}
  7924. className="half-item"
  7925. label="合同额(万元)"
  7926. >
  7927. <span>
  7928. {this.state.detailChange.totalAmount}
  7929. </span>
  7930. </FormItem>
  7931. <FormItem
  7932. {...formItemLayout}
  7933. className="half-item"
  7934. label="已收款(万元)"
  7935. >
  7936. <span>
  7937. {this.state.detailChange.settlementAmount}
  7938. </span>
  7939. </FormItem>
  7940. </div>
  7941. <div className="clearfix">
  7942. <FormItem
  7943. {...formItemLayout}
  7944. className="half-item"
  7945. label="欠款(万元)"
  7946. >
  7947. <span>{this.state.detailChange.arrears}</span>
  7948. </FormItem>
  7949. <FormItem
  7950. {...formItemLayout}
  7951. className="half-item"
  7952. label="申请退款(万元)"
  7953. >
  7954. <span>
  7955. {this.state.detailChange.changeAmount}
  7956. </span>
  7957. </FormItem>
  7958. </div>
  7959. <div className="clearfix">
  7960. <FormItem
  7961. style={{ height: "auto" }}
  7962. labelCol={{ span: 5 }}
  7963. wrapperCol={{ span: 19 }}
  7964. label="首付款(万元)"
  7965. >
  7966. <span>{this.state.detailChange.firstAmount}</span>
  7967. </FormItem>
  7968. </div>
  7969. <div className="clearfix">
  7970. <FormItem
  7971. style={{ height: "auto" }}
  7972. labelCol={{ span: 5 }}
  7973. wrapperCol={{ span: 19 }}
  7974. label="变更原因"
  7975. >
  7976. <span>{this.state.detailChange.remarksC}</span>
  7977. </FormItem>
  7978. </div>
  7979. <div className="clearfix">
  7980. <FormItem
  7981. style={{ height: "auto" }}
  7982. labelCol={{ span: 5 }}
  7983. wrapperCol={{ span: 19 }}
  7984. label="备注"
  7985. >
  7986. <span>
  7987. {this.state.detailChange.startRemarks}
  7988. </span>
  7989. </FormItem>
  7990. </div>
  7991. {/* ---- */}
  7992. <div className="clearfix">
  7993. <FormItem
  7994. labelCol={{ span: 5 }}
  7995. wrapperCol={{ span: 19 }}
  7996. label="变更凭证"
  7997. >
  7998. <div>
  7999. <div
  8000. style={{
  8001. paddingTop: "10px",
  8002. }}
  8003. >
  8004. {this.state.detailChange &&
  8005. this.state.detailChange.voucherUrl &&
  8006. this.state.activeKey === "3" &&
  8007. this.state.visible ? (
  8008. <ImgList
  8009. fileList={
  8010. this.state.detailChange.voucherUrl
  8011. }
  8012. ItemWidth={"96px"}
  8013. />
  8014. ) : (
  8015. <div />
  8016. )}
  8017. </div>
  8018. {this.state.status === 3 ? (
  8019. <Button
  8020. type="danger"
  8021. style={{
  8022. float: "right",
  8023. backgroundColor: "red",
  8024. color: "white",
  8025. position: "absolute",
  8026. right: 0,
  8027. height: 50,
  8028. borderRadius: 20,
  8029. zIndex: 100,
  8030. top: 0,
  8031. }}
  8032. onClick={(e) => {
  8033. e.stopPropagation();
  8034. this.showConfirmChange(
  8035. this.deleteChange
  8036. );
  8037. }}
  8038. >
  8039. 取消本次变更
  8040. </Button>
  8041. ) : (
  8042. ""
  8043. )}
  8044. </div>
  8045. </FormItem>
  8046. </div>
  8047. {
  8048. this.state.detailChange.contractPictureUrl.length != 0 &&
  8049. <div className="clearfix">
  8050. <FormItem
  8051. labelCol={{ span: 5 }}
  8052. wrapperCol={{ span: 19 }}
  8053. label="最新合同"
  8054. >
  8055. <div style={{ paddingTop: 10 }}>
  8056. <ImgList
  8057. fileList={
  8058. this.state.detailChange.contractPictureUrl
  8059. }
  8060. ItemWidth={"96px"}
  8061. />
  8062. </div>
  8063. </FormItem>
  8064. </div>
  8065. }
  8066. <ul
  8067. style={{
  8068. width: "868px",
  8069. overflow: "hidden",
  8070. paddingLeft: "90px",
  8071. paddingTop: "10px",
  8072. position: "relative",
  8073. bottom: "20px",
  8074. fontSize: "12px",
  8075. color: "rgba(0, 0, 0, 0.65)",
  8076. }}
  8077. >
  8078. {/* <span>操作人:</span> */}
  8079. {this.state.logData.map((item, index) => {
  8080. if (item.status == 0) {
  8081. item.status = "发起";
  8082. } else if (item.status == 1) {
  8083. item.status = "审核中";
  8084. } else if (item.status == 2) {
  8085. item.status = "通过";
  8086. } else if (item.status == 3) {
  8087. item.status = "驳回";
  8088. } else if (item.status == 4) {
  8089. item.status = "完成";
  8090. } else if (item.status == 5) {
  8091. item.status = "撤销";
  8092. }
  8093. return (
  8094. <li
  8095. key={index}
  8096. style={{
  8097. width: "100%",
  8098. height: "auto",
  8099. wordBreak: "break-all",
  8100. marginBottom: "10px",
  8101. }}
  8102. >
  8103. {item.aname + ":" + "【" + item.status + "】" + item.remarks + "(" + item.createTimes + ")"}
  8104. </li>
  8105. );
  8106. })}
  8107. </ul>
  8108. {/* 动态展示项目以及催款节点 */}
  8109. <div>
  8110. <div>
  8111. <span
  8112. style={{
  8113. marginLeft: "50px",
  8114. fontSize: "20px",
  8115. }}
  8116. >
  8117. 项目业务
  8118. </span>
  8119. </div>
  8120. <div
  8121. className="patent-table"
  8122. style={{ marginBottom: 10 }}
  8123. >
  8124. <Spin spinning={this.state.loading}>
  8125. <Table
  8126. columns={this.state.detailColumns}
  8127. dataSource={this.state.proDataSource}
  8128. expandedRowRender={expandedRowRenderDetail}
  8129. pagination={this.state.pagination}
  8130. // onRowClick={this.tableRowClick}
  8131. onRowClick={(record) => {
  8132. this.setState({
  8133. dataInfor: record,
  8134. infoVisible: true
  8135. })
  8136. }}
  8137. rowClassName={this.addRowColor}
  8138. bordered
  8139. size="small"
  8140. />
  8141. </Spin>
  8142. </div>
  8143. <div>
  8144. <span
  8145. style={{
  8146. marginLeft: "50px",
  8147. fontSize: "20px",
  8148. }}
  8149. >
  8150. 催款节点
  8151. </span>
  8152. </div>
  8153. <div className="clearfix">
  8154. <Spin spinning={this.state.loading}>
  8155. <Form layout="horizontal">
  8156. <Table
  8157. pagination={false}
  8158. columns={this.state.detailContactsLists}
  8159. dataSource={this.state.cuiDataSource}
  8160. scroll={{ x: "max-content", y: 0 }}
  8161. bordered
  8162. size="small"
  8163. />
  8164. <Col
  8165. span={24}
  8166. offset={9}
  8167. style={{ marginTop: "15px" }}
  8168. ></Col>
  8169. </Form>
  8170. </Spin>
  8171. </div>
  8172. </div>
  8173. </div>
  8174. }
  8175. </TabPane>
  8176. }
  8177. </Tabs>
  8178. }
  8179. </div>
  8180. </Spin>
  8181. </Form>
  8182. </Modal>
  8183. {
  8184. // 添加变更项目
  8185. this.state.changeVisible &&
  8186. <NewAddProject
  8187. type="change"
  8188. children="list"
  8189. typeChange={this.state.typeChange}
  8190. cid={this.state.changeId}
  8191. readOnly={false}
  8192. orderNo={this.state.orderNo}
  8193. visible={this.state.changeVisible}
  8194. newData={this.state.newData}
  8195. onCancel={() => [this.nextCancel("change")]}
  8196. />
  8197. }
  8198. {
  8199. // 编辑变更项目
  8200. this.state.editProVisible &&
  8201. <NewEditProject
  8202. type="change"
  8203. children="list"
  8204. typeChange={this.state.typeChange}
  8205. cid={this.state.changeId}
  8206. readOnly={false}
  8207. orderNo={this.props.datauser.orderNo}
  8208. visible={this.state.editProVisible}
  8209. dataInfor={this.state.dataInfor}
  8210. newData={this.state.newData}
  8211. onCancel={() => [this.nextCancel("change")]}
  8212. />
  8213. }
  8214. {
  8215. this.state.lookVisible ? (
  8216. <Modal
  8217. maskClosable={false}
  8218. visible={this.state.lookVisible}
  8219. onOk={this.noCancel}
  8220. onCancel={this.noCancel}
  8221. width="800px"
  8222. title={"退单申请"}
  8223. footer=""
  8224. className="admin-desc-content"
  8225. >
  8226. <Form layout="horizontal">
  8227. <Spin spinning={this.state.loading}>
  8228. <div className="clearfix">
  8229. <FormItem
  8230. labelCol={{ span: 4 }}
  8231. wrapperCol={{ span: 16 }}
  8232. label="终止合同"
  8233. >
  8234. <Picture
  8235. domId={"addService6"}
  8236. fileList={(e) => {
  8237. this.setState({ contractUrl: e });
  8238. }}
  8239. pictureUrl={this.state.contractUrl}
  8240. visible={this.props.visible}
  8241. data={{
  8242. sign: "order_refund_file",
  8243. url: "/api/admin/newOrder/uploadRefundOrderFile",
  8244. number: 8,
  8245. }}
  8246. />
  8247. </FormItem>
  8248. </div>
  8249. <div className="clearfix">
  8250. <FormItem
  8251. labelCol={{ span: 4 }}
  8252. wrapperCol={{ span: 16 }}
  8253. label="退单申请表"
  8254. >
  8255. <Picture
  8256. domId={"addService7"}
  8257. fileList={(e) => {
  8258. this.setState({ applicationUrl: e });
  8259. }}
  8260. pictureUrl={this.state.applicationUrl}
  8261. visible={this.props.visible}
  8262. data={{
  8263. sign: "order_refund_file",
  8264. url: "/api/admin/newOrder/uploadRefundOrderFile",
  8265. number: 8,
  8266. }}
  8267. />
  8268. </FormItem>
  8269. </div>
  8270. <div className="clearfix">
  8271. <FormItem
  8272. labelCol={{ span: 4 }}
  8273. wrapperCol={{ span: 16 }}
  8274. label="退单理由"
  8275. >
  8276. <Input
  8277. type="textarea"
  8278. placeholder="请输入退单理由"
  8279. rows={4}
  8280. value={this.state.reason}
  8281. onChange={(e) => {
  8282. this.setState({ reason: e.target.value });
  8283. }}
  8284. />
  8285. </FormItem>
  8286. </div>
  8287. <div className="clearfix">
  8288. <Button
  8289. className="cancel"
  8290. type="primary"
  8291. onClick={this.tuidanOk}
  8292. style={{ marginLeft: "50px" }}
  8293. htmlType="submit"
  8294. >
  8295. 确定退单
  8296. </Button>
  8297. <Button
  8298. className="cancel"
  8299. type="ghost"
  8300. onClick={this.noCancel}
  8301. style={{ marginLeft: "50px" }}
  8302. >
  8303. 取消
  8304. </Button>
  8305. </div>
  8306. </Spin>
  8307. </Form>
  8308. </Modal>
  8309. ) : (
  8310. <div />
  8311. )
  8312. }
  8313. <Modal
  8314. maskClosable={false}
  8315. title={
  8316. isNaN(parseFloat(this.state.appropriationRatio))
  8317. ? "修改催款节点金额"
  8318. : "修改催款节点比例"
  8319. }
  8320. visible={this.state.editCuiVisible}
  8321. onOk={() => {
  8322. this.submitEditCui(
  8323. isNaN(parseFloat(this.state.appropriationRatio)) ? 0 : 1
  8324. );
  8325. }}
  8326. okText={"保存"}
  8327. width={300}
  8328. onCancel={(e) => {
  8329. this.setState({
  8330. editCuiVisible: false,
  8331. appropriationRatio: "",
  8332. });
  8333. }}
  8334. >
  8335. <div className="clearfix">
  8336. <FormItem
  8337. labelCol={{ span: 6 }}
  8338. wrapperCol={{ span: 14 }}
  8339. label={
  8340. isNaN(parseFloat(this.state.appropriationRatio))
  8341. ? "催款金额"
  8342. : "催款比例"
  8343. }
  8344. >
  8345. <Input
  8346. type="number"
  8347. placeholder={
  8348. isNaN(parseFloat(this.state.appropriationRatio))
  8349. ? "请输入金额"
  8350. : "请输入比例"
  8351. }
  8352. rows={4}
  8353. value={this.state.editCuiMoney}
  8354. onChange={(e) => {
  8355. this.setState({ editCuiMoney: e.target.value });
  8356. }}
  8357. />
  8358. </FormItem>
  8359. </div>
  8360. </Modal>
  8361. <OrderRiZi
  8362. dataSourcerizhi={this.state.dataSourcerizhi}
  8363. closeOrderLog={this.closeOrderLog}
  8364. visible={this.state.rizhivisible}
  8365. loading={this.state.loading}
  8366. />
  8367. {
  8368. // 添加项目
  8369. this.state.projectOperationVisible &&
  8370. <NewAddProject
  8371. readOnly={
  8372. this.state.dataInfor &&
  8373. Object.keys(this.state.dataInfor).length > 0 &&
  8374. this.state.processStatus !== 0
  8375. }
  8376. orderNo={this.props.datauser.orderNo}
  8377. visible={this.state.projectOperationVisible}
  8378. newData={this.state.newData}
  8379. onCancel={this.nextCancel}
  8380. />
  8381. }
  8382. {
  8383. // 编辑项目
  8384. this.state.editProjectOperationVisible &&
  8385. <NewEditProject
  8386. readOnly={
  8387. this.state.dataInfor &&
  8388. Object.keys(this.state.dataInfor).length > 0 &&
  8389. this.state.processStatus !== 0
  8390. }
  8391. orderNo={this.props.datauser.orderNo}
  8392. visible={this.state.editProjectOperationVisible}
  8393. dataInfor={this.state.dataInfor}
  8394. newData={this.state.newData}
  8395. onCancel={this.nextCancel}
  8396. />
  8397. }
  8398. {
  8399. // 会员项目添加
  8400. this.state.vipVisible &&
  8401. <NewAddProject
  8402. type="vipAdd"
  8403. readOnly={
  8404. this.state.dataInfor &&
  8405. Object.keys(this.state.dataInfor).length > 0 &&
  8406. this.state.processStatus !== 0
  8407. }
  8408. orderNo={this.props.datauser.orderNo}
  8409. visible={this.state.vipVisible}
  8410. newData={this.state.newData}
  8411. onCancel={this.nextCancel}
  8412. />
  8413. // <ProjectOperationVip
  8414. // readOnly={
  8415. // this.state.dataInfor &&
  8416. // Object.keys(this.state.dataInfor).length > 0 &&
  8417. // this.state.processStatus !== 0
  8418. // }
  8419. // orderNo={this.props.datauser.orderNo}
  8420. // visible={this.state.vipVisible}
  8421. // dataInfor={this.state.dataInfor}
  8422. // newData={this.state.newData}
  8423. // onCancel={this.nextCancel}
  8424. // />
  8425. }
  8426. {
  8427. // 变更记录详情
  8428. this.state.infoVisible &&
  8429. <NewEditProject
  8430. children="list"
  8431. type="change"
  8432. readOnly={
  8433. this.state.dataInfor &&
  8434. Object.keys(this.state.dataInfor).length > 0 &&
  8435. this.state.processStatus !== 0
  8436. }
  8437. visible={this.state.infoVisible}
  8438. dataInfor={this.state.dataInfor}
  8439. onCancel={() => { this.setState({ infoVisible: false }) }}
  8440. />
  8441. }
  8442. </div >
  8443. );
  8444. },
  8445. })
  8446. );
  8447. export default Form.create()(NewService);