addService.jsx 366 KB

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