addService.jsx 324 KB

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