addService.jsx 324 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772
  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: <Input
  5839. type="text"
  5840. style={{ width: 150, borderStyle: "none none solid none" }}
  5841. value={this.state.typeExplain}
  5842. disabled={this.state.approvaType.indexOf(0) === -1 ? true : false}
  5843. placeholder="其他"
  5844. onChange={e => {
  5845. this.setState({
  5846. typeExplain: e.target.value
  5847. })
  5848. }}
  5849. />, value: 0
  5850. },
  5851. ];
  5852. let { closable } = this.state;
  5853. let assistList = this.assistList;
  5854. const { addPop = "" } = this.props
  5855. return (
  5856. <div>
  5857. {this.state.resVisible ? (
  5858. <ResolutionDetail
  5859. cancel={this.resCancel}
  5860. detail={this.state.resRecord}
  5861. visible={this.state.resVisible}
  5862. id={this.state.resRecord.orderNo}
  5863. />
  5864. ) : (
  5865. ""
  5866. )}
  5867. <Modal
  5868. maskClosable={false}
  5869. visible={this.props.addPop == "add" ? this.props.showDesc : this.state.visible}
  5870. onOk={this.handleOk}
  5871. onCancel={this.handleCancelclose}
  5872. width={!this.props.userDetaile ? "600px" : "1200px"}
  5873. title={!this.props.userDetaile ? "创建订单" : ""}
  5874. footer=""
  5875. className="admin-desc-content"
  5876. >
  5877. <Form
  5878. layout="horizontal"
  5879. onSubmit={this.handleSubmit}
  5880. style={{ paddingBottom: "40px" }}
  5881. >
  5882. <Spin spinning={this.state.loading}>
  5883. <div className="clearfix">
  5884. {
  5885. addPop == "add" &&
  5886. <div className="clearfix">
  5887. <div className="clearfix">
  5888. <FormItem {...formItemLayout} label="订单类型">
  5889. <Select
  5890. placeholder="请选择订单类型"
  5891. style={{ width: "200px" }}
  5892. value={this.state.orderType}
  5893. onChange={(e) => {
  5894. this.setState({ orderType: e });
  5895. }}
  5896. >
  5897. {orderTypes.map(function (item) {
  5898. return (
  5899. <Select.Option key={item.value}>
  5900. {item.key}
  5901. </Select.Option>
  5902. );
  5903. })}
  5904. </Select>
  5905. <span className="mandatory">*</span>
  5906. </FormItem>
  5907. </div>
  5908. <FormItem {...formItemLayout} label="客户所属类型">
  5909. <Select
  5910. placeholder="请选择客户所属类型"
  5911. style={{ width: "200px" }}
  5912. value={this.state.userType}
  5913. onChange={(e) => {
  5914. this.setState({
  5915. userType: e,
  5916. customerArr: [],
  5917. autoId: "",
  5918. customerName: "",
  5919. selectSales: undefined
  5920. });
  5921. }}
  5922. >
  5923. {customerType.map(function (item) {
  5924. return (
  5925. <Select.Option key={item.value}>
  5926. {item.key}
  5927. </Select.Option>
  5928. );
  5929. })}
  5930. </Select>
  5931. </FormItem>
  5932. <div className="clearfix">
  5933. <FormItem {...formItemLayout} label="客户名称">
  5934. <AutoComplete
  5935. className="certain-category-search"
  5936. dropdownClassName="certain-category-search-dropdown"
  5937. dropdownMatchSelectWidth={false}
  5938. dropdownStyle={{ width: 200 }}
  5939. size="large"
  5940. style={{ width: "200px" }}
  5941. dataSource={options}
  5942. placeholder="输入名称"
  5943. value={this.state.customerName}
  5944. onChange={this.customerChange}
  5945. filterOption={true}
  5946. onSelect={this.selectAutoCUT}
  5947. >
  5948. <Input />
  5949. </AutoComplete>
  5950. <span className="mandatory">*</span>
  5951. </FormItem>
  5952. </div>
  5953. <FormItem {...formItemLayout} label="销售类型">
  5954. <Select
  5955. placeholder="请选择销售类型"
  5956. style={{ width: "200px" }}
  5957. value={this.state.selectSales}
  5958. onChange={(e) => {
  5959. this.setState({
  5960. selectSales: e,
  5961. });
  5962. }}
  5963. >
  5964. {(this.state.userType == "0"
  5965. ? ssalesType : this.state.userType == "1"
  5966. ? qsalesType : this.state.userType == "2"
  5967. ? wsalesType : this.state.userType == "3"
  5968. ? qsalesType : []).map(function (item) {
  5969. return (
  5970. <Select.Option key={item.value} disabled={item.value == "5"}>
  5971. {item.key}
  5972. </Select.Option>
  5973. );
  5974. })}
  5975. </Select>
  5976. <span className="mandatory">*</span>
  5977. </FormItem>
  5978. {
  5979. (this.state.selectSales == "4" || this.state.selectSales == "5") &&
  5980. <FormItem {...formItemLayout} label="描述">
  5981. <TextArea
  5982. placeholder="请填写描述"
  5983. style={{ width: 300, height: 80 }}
  5984. onChange={(e) => {
  5985. this.setState({
  5986. other: e.target.value
  5987. })
  5988. }}
  5989. />
  5990. </FormItem>
  5991. }
  5992. {
  5993. this.state.selectSales == "3" &&
  5994. <div className="clearfix">
  5995. <FormItem {...formItemLayout} label="渠道名称">
  5996. <AutoComplete
  5997. className="certain-category-search"
  5998. dropdownClassName="certain-category-search-dropdown"
  5999. dropdownMatchSelectWidth={false}
  6000. dropdownStyle={{ width: 200 }}
  6001. size="large"
  6002. style={{ width: "200px" }}
  6003. dataSource={channeloptions}
  6004. placeholder="请输入渠道关键字"
  6005. value={this.state.channelName}
  6006. onChange={this.channelChange}
  6007. filterOption={true}
  6008. onSelect={this.goSelect}
  6009. >
  6010. <Input />
  6011. </AutoComplete>
  6012. <span className="mandatory">*</span>
  6013. </FormItem>
  6014. </div>
  6015. }
  6016. <div className="addSave" style={{ marginTop: "30px" }}>
  6017. <Button
  6018. className="cancel"
  6019. type="primary"
  6020. // onClick={this.handleCancel}
  6021. style={{ marginLeft: "220px" }}
  6022. htmlType="submit"
  6023. >
  6024. 开单
  6025. </Button>
  6026. <Button
  6027. className="cancel"
  6028. type="ghost"
  6029. onClick={this.handleCancelclose}
  6030. style={{ marginLeft: "50px" }}
  6031. >
  6032. 取消
  6033. </Button>
  6034. </div>
  6035. </div>
  6036. }
  6037. {
  6038. addPop == "edit" &&
  6039. <Tabs
  6040. onChange={this.callback}
  6041. activeKey={this.state.activeKey}
  6042. tabBarExtraContent={
  6043. <div
  6044. style={{ fontWeight: "bold", paddingRight: "15px" }}
  6045. >
  6046. <OrderItemStatus deleteSign={this.state.deleteSign} />
  6047. </div>
  6048. }
  6049. >
  6050. <TabPane tab={"最新订单"} key="1">
  6051. {
  6052. this.state.activeKey == "1" &&
  6053. <div className="clearfix">
  6054. <div className="clearfix">
  6055. <FormItem
  6056. className="half-item"
  6057. {...formItemLayout}
  6058. label="合同编号"
  6059. >
  6060. {<span>{this.state.contractNo}</span>}
  6061. </FormItem>
  6062. <FormItem
  6063. className="half-item"
  6064. {...formItemLayout}
  6065. label="订单编号"
  6066. >
  6067. <span>{this.state.orderNo}</span>
  6068. </FormItem>
  6069. <FormItem
  6070. className="half-item"
  6071. {...formItemLayout}
  6072. label="流程状态"
  6073. >
  6074. <span>
  6075. {getProcessStatus(this.state.processStatus, this.state.examineName, this.state.approval)}
  6076. </span>
  6077. <FlowChart
  6078. orderNo={this.state.orderNo}
  6079. />
  6080. </FormItem>
  6081. <FormItem
  6082. className="half-item"
  6083. {...formItemLayout}
  6084. label="销售类型"
  6085. >
  6086. <span>
  6087. {(["私有客户-", "签单客户-"][this.state.updatas.userType] || " ") +
  6088. (salesList[this.state.updatas.salesType] || "")}
  6089. </span>
  6090. {
  6091. this.state.processStatus === 0 &&
  6092. <UpdateSales
  6093. orderNo={this.state.orderNo}
  6094. updatas={this.state.updatas}
  6095. onRefresh={
  6096. e => {
  6097. let ups = this.state.updatas
  6098. ups.salesType = e.salesType
  6099. if (e.salesType == "3") {
  6100. ups.channelId = e.channelId
  6101. ups.other = e.other
  6102. } else if (e.salesType == "4" || e.salesType == "5") {
  6103. ups.other = e.other
  6104. }
  6105. this.setState({
  6106. updatas: ups,
  6107. userType: ups.userType
  6108. })
  6109. }
  6110. // this.loaduser.bind(this, {orderNo: this.state.orderNo })
  6111. }
  6112. />
  6113. }
  6114. </FormItem>
  6115. <FormItem
  6116. className="half-item"
  6117. {...formItemLayout}
  6118. label="结算状态"
  6119. >
  6120. <span>
  6121. {getLiquidationStatus(
  6122. this.state.liquidationStatus
  6123. )}
  6124. </span>
  6125. </FormItem>
  6126. {this.state.processStatus === 0 ? (
  6127. <div className="clearfix">
  6128. <FormItem
  6129. className="half-item"
  6130. {...formItemLayout}
  6131. label="特批立项"
  6132. >
  6133. <Select
  6134. placeholder="请选择客户所属类型"
  6135. style={{ width: "240px" }}
  6136. value={["非特批", "特批", "特批通过", "特批驳回", "特批", "特批通过", "特批驳回"][Number(this.state.approval)]
  6137. }
  6138. onChange={(e) => {
  6139. this.setState({ approval: e });
  6140. }}
  6141. >
  6142. <Select.Option key={0}>非特批</Select.Option>
  6143. <Select.Option key={1}>特批</Select.Option>
  6144. </Select>
  6145. {
  6146. this.state.approval == 1 &&
  6147. <div>
  6148. <CheckboxGroup
  6149. options={approvalOptions}
  6150. value={this.state.approvaType}
  6151. onChange={e => {
  6152. this.setState({
  6153. approvaType: e
  6154. })
  6155. }}
  6156. />
  6157. </div>
  6158. }
  6159. </FormItem>
  6160. <FormItem
  6161. className="half-item"
  6162. {...formItemLayout}
  6163. label={
  6164. <span>
  6165. <strong style={{ color: "#f00" }}>*</strong>
  6166. 合同签订时间
  6167. </span>
  6168. }
  6169. >
  6170. <DatePicker
  6171. className="signDateRef"
  6172. style={{
  6173. marginTop: "2px",
  6174. // width: "240px",
  6175. height: "27px",
  6176. }}
  6177. showTime
  6178. format="YYYY-MM-DD"
  6179. onOk={() => { }}
  6180. value={
  6181. this.state.signDate
  6182. ? moment(this.state.signDate)
  6183. : null
  6184. }
  6185. onChange={(data, dataString) => {
  6186. this.setState({ signDate: dataString });
  6187. }}
  6188. />
  6189. </FormItem>
  6190. <div className="clearfix">
  6191. <FormItem
  6192. className="half-item"
  6193. {...formItemLayout}
  6194. label="订单部门"
  6195. >
  6196. <Select
  6197. placeholder="请选择订单部门"
  6198. style={{ width: 240 }}
  6199. value={this.state.organizationSearch}
  6200. onChange={(e) => {
  6201. this.setState({ organizationSearch: e });
  6202. }}
  6203. >
  6204. {departmentArr.map(function (item) {
  6205. return (
  6206. <Select.Option key={item.id}>
  6207. {item.name}
  6208. </Select.Option>
  6209. );
  6210. })}
  6211. </Select>
  6212. </FormItem>
  6213. </div>
  6214. </div>
  6215. ) : (
  6216. <div className="clearfix">
  6217. <FormItem
  6218. className="half-item"
  6219. {...formItemLayout}
  6220. label="特批立项"
  6221. >
  6222. <span>
  6223. {/* {["非特批", "特批待审核", "特批通过", "特批驳回"][this.state.approval]} */}
  6224. {getApprovedState(this.state.approval)}
  6225. {getApprovedType(this.state.approvaType, this.state.typeExplain, 1)}
  6226. </span>
  6227. </FormItem>
  6228. <FormItem
  6229. className="half-item"
  6230. {...formItemLayout}
  6231. label="合同签订时间"
  6232. >
  6233. <span>{this.state.signDate}</span>
  6234. </FormItem>
  6235. <FormItem
  6236. className="half-item"
  6237. {...formItemLayout}
  6238. label="订单部门"
  6239. >
  6240. <span>{this.state.depName}</span>
  6241. </FormItem>
  6242. <FormItem
  6243. className="half-item"
  6244. {...formItemLayout}
  6245. label="是否外包"
  6246. >
  6247. <span>
  6248. {this.state.outsource == 0 ? "否" : "是"}
  6249. </span>
  6250. </FormItem>
  6251. </div>
  6252. )}
  6253. </div>
  6254. <h3
  6255. style={{
  6256. marginLeft: 10,
  6257. fontWeight: 800,
  6258. marginBottom: 10,
  6259. }}
  6260. >
  6261. 收款项目
  6262. </h3>
  6263. {this.state.processStatus === 0 ? (
  6264. <div className="clearfix">
  6265. <FormItem
  6266. className="half-item"
  6267. {...formItemLayout}
  6268. label="签单金额(万元)"
  6269. >
  6270. <Input
  6271. placeholder="签单金额"
  6272. ref="totalAmountRef"
  6273. value={this.state.totalAmount}
  6274. onChange={(e) => {
  6275. this.setState({
  6276. totalAmount: e.target.value,
  6277. });
  6278. }}
  6279. style={{ width: "240px" }}
  6280. />
  6281. </FormItem>
  6282. <FormItem
  6283. className="half-item"
  6284. {...formItemLayout}
  6285. label="首付金额(万元)"
  6286. >
  6287. <Input
  6288. placeholder="请输入实签首款金额"
  6289. ref="firstAmountRef"
  6290. value={this.state.firstAmount}
  6291. onChange={(e) => {
  6292. this.setState({
  6293. firstAmount: e.target.value,
  6294. });
  6295. }}
  6296. style={{ width: "240px" }}
  6297. />
  6298. </FormItem>
  6299. <FormItem
  6300. className="half-item"
  6301. {...formItemLayout}
  6302. label="已收款项"
  6303. >
  6304. <span>
  6305. {this.state.settlementAmount + "万元"}
  6306. </span>
  6307. {/* {this.state.settlementAmount ? (
  6308. <Button
  6309. type="primary"
  6310. onClick={this.tuikuan}
  6311. style={{
  6312. float: "right",
  6313. marginRight: "50px",
  6314. marginBottom: "15px"
  6315. }}
  6316. >
  6317. 退单
  6318. </Button>
  6319. ) : (
  6320. ""
  6321. )} */}
  6322. </FormItem>
  6323. </div>
  6324. ) : (
  6325. <div className="clearfix">
  6326. <FormItem
  6327. className="half-item"
  6328. {...formItemLayout}
  6329. label="签单金额(万元)"
  6330. >
  6331. <span>{this.state.totalAmount}</span>
  6332. </FormItem>
  6333. <FormItem
  6334. className="half-item"
  6335. {...formItemLayout}
  6336. label="首付金额(万元)"
  6337. >
  6338. <span>{this.state.firstAmount}</span>
  6339. </FormItem>
  6340. <FormItem
  6341. className="half-item"
  6342. {...formItemLayout}
  6343. label="已收款项"
  6344. >
  6345. <span>
  6346. {this.state.settlementAmount + "万元"}
  6347. </span>
  6348. {/* {this.state.settlementAmount ? (
  6349. <Button
  6350. type="primary"
  6351. onClick={this.tuikuan}
  6352. style={{
  6353. float: "right",
  6354. marginRight: "50px",
  6355. marginBottom: "15px"
  6356. }}
  6357. >
  6358. 退单
  6359. </Button>
  6360. ) : (
  6361. ""
  6362. )} */}
  6363. </FormItem>
  6364. </div>
  6365. )}
  6366. <h3
  6367. style={{
  6368. marginLeft: 10,
  6369. fontWeight: 800,
  6370. marginBottom: 10,
  6371. }}
  6372. >
  6373. 联系信息
  6374. </h3>
  6375. {this.state.processStatus == 0 ? (
  6376. <div className="clearfix">
  6377. <div className="clearfix">
  6378. <FormItem
  6379. className="half-item"
  6380. style={{ width: "100%" }}
  6381. labelCol={{ span: 5 }}
  6382. wrapperCol={{ span: 19 }}
  6383. label="客户名称"
  6384. >
  6385. <span>{this.state.userName}</span>
  6386. <EnterpriseNameChange
  6387. type="journal"
  6388. style={{ marginLeft: 10 }}
  6389. enterpriseId={this.state.orderUid}
  6390. />
  6391. </FormItem>
  6392. </div>
  6393. <FormItem
  6394. className="half-item"
  6395. {...formItemLayout}
  6396. label={
  6397. <span>
  6398. <strong style={{ color: "#f00" }}>*</strong>
  6399. 企业联系人
  6400. </span>
  6401. }
  6402. >
  6403. <Input
  6404. placeholder="请输入联系人"
  6405. ref="signTotalAmount"
  6406. value={this.state.contacts}
  6407. onChange={(e) => {
  6408. this.setState({ contacts: e.target.value });
  6409. }}
  6410. style={{ width: "240px" }}
  6411. />
  6412. </FormItem>
  6413. <FormItem
  6414. className="half-item"
  6415. {...formItemLayout}
  6416. label={
  6417. <span>
  6418. <strong style={{ color: "#f00" }}>*</strong>
  6419. 联系人电话
  6420. </span>
  6421. }
  6422. >
  6423. <Input
  6424. placeholder="请输入联系人电话"
  6425. ref="signTotalAmount"
  6426. value={this.state.contactMobile}
  6427. onChange={(e) => {
  6428. this.setState({
  6429. contactMobile: e.target.value,
  6430. });
  6431. }}
  6432. style={{ width: "240px" }}
  6433. />
  6434. </FormItem>
  6435. <FormItem
  6436. className="half-item"
  6437. {...formItemLayout}
  6438. label="企业法人"
  6439. >
  6440. <Input
  6441. placeholder="请输入法人"
  6442. ref="signTotalAmount"
  6443. value={this.state.legalPerson}
  6444. onChange={(e) => {
  6445. this.setState({
  6446. legalPerson: e.target.value,
  6447. });
  6448. }}
  6449. style={{ width: "240px" }}
  6450. />
  6451. </FormItem>
  6452. <FormItem
  6453. className="half-item"
  6454. {...formItemLayout}
  6455. label="法人电话"
  6456. >
  6457. <Input
  6458. placeholder="请输入法人电话"
  6459. ref="signTotalAmount"
  6460. value={this.state.legalPersonTel}
  6461. onChange={(e) => {
  6462. this.setState({
  6463. legalPersonTel: e.target.value,
  6464. });
  6465. }}
  6466. style={{ width: "240px" }}
  6467. />
  6468. </FormItem>
  6469. </div>
  6470. ) : (
  6471. <div className="clearfix">
  6472. {formItemList.map((data, index) => {
  6473. return (
  6474. <FormItem
  6475. className="half-item"
  6476. {...formItemLayout}
  6477. key={index}
  6478. label={data.label}
  6479. >
  6480. {data.content}
  6481. </FormItem>
  6482. );
  6483. })}
  6484. </div>
  6485. )}
  6486. <div className="clearfix">
  6487. {this.state.processStatus == 0 ? (
  6488. <div>
  6489. <FormItem
  6490. labelCol={{ span: 5 }}
  6491. wrapperCol={{ span: 19 }}
  6492. label={
  6493. <span>
  6494. <strong style={{ color: "#f00" }}>
  6495. *
  6496. </strong>
  6497. 合同扫描件
  6498. </span>
  6499. }
  6500. >
  6501. <PicturesWall
  6502. domId={"addService1"}
  6503. fileList={this.getOrgCodeUrl}
  6504. pictureUrl={this.state.orgCodeUrl}
  6505. url="/api/admin/order/uploadOrderImg"
  6506. orderNo={this.state.orderNo}
  6507. sign="contract"
  6508. deleteApi="/api/admin/order/deleteOrderImg"
  6509. />
  6510. <p>图片建议:要清晰。</p>
  6511. <Button
  6512. style={{
  6513. float: "right",
  6514. marginRight: "140px",
  6515. marginTop: "20px",
  6516. }}
  6517. onClick={this.getOrderLog}
  6518. >
  6519. 查看订单日志
  6520. </Button>
  6521. </FormItem>
  6522. <Gxczx
  6523. isShow={this.state.isShow}
  6524. isCreat={true}
  6525. knowledgeServices={this.state.knowledgeServices}
  6526. auditServices={this.state.auditServices}
  6527. addDeductionServices={this.state.addDeductionServices}
  6528. knowledgeOther={this.state.knowledgeOther}
  6529. auditOther={this.state.auditOther}
  6530. addDeductionOther={this.state.addDeductionOther}
  6531. selknowledge={e => { this.setState({ knowledgeServices: e.knowledgeServices, knowledgeOther: e.knowledgeOther }) }}
  6532. selaudit={e => { this.setState({ auditServices: e.auditServices, auditOther: e.auditOther }) }}
  6533. seladdDeduction={e => { this.setState({ addDeductionServices: e.addDeductionServices, addDeductionOther: e.addDeductionOther }) }}
  6534. onSwitch={e => { this.setState({ isShow: e }) }}
  6535. />
  6536. <FormItem
  6537. labelCol={{ span: 5 }}
  6538. wrapperCol={{ span: 19 }}
  6539. label={<span>补充协议</span>}
  6540. >
  6541. <PicturesWall
  6542. domId={"addService2"}
  6543. fileList={this.getReplenishUrl}
  6544. pictureUrl={this.state.replenishUrl}
  6545. url="/api/admin/order/uploadOrderImg"
  6546. orderNo={this.state.orderNo}
  6547. sign="supplement"
  6548. deleteApi="/api/admin/order/deleteOrderImg"
  6549. />
  6550. <p>图片建议:要清晰。</p>
  6551. </FormItem>
  6552. </div>
  6553. ) : (
  6554. <div>
  6555. <FormItem
  6556. labelCol={{ span: 5 }}
  6557. wrapperCol={{ span: 19 }}
  6558. label="合同扫描件"
  6559. >
  6560. <div
  6561. style={{
  6562. paddingTop: "10px",
  6563. paddingBottom: "10px",
  6564. }}
  6565. >
  6566. {this.state.orgCodeUrl &&
  6567. this.state.visible &&
  6568. this.state.activeKey === "1" ? (
  6569. <ImgList
  6570. domId={"addService3"}
  6571. fileList={this.state.orgCodeUrl}
  6572. ItemWidth={"96px"}
  6573. />
  6574. ) : (
  6575. <div />
  6576. )}
  6577. </div>
  6578. <Button
  6579. style={{
  6580. float: "right",
  6581. marginRight: "140px",
  6582. marginTop: "20px",
  6583. }}
  6584. onClick={this.getOrderLog}
  6585. >
  6586. 查看订单日志
  6587. </Button>
  6588. </FormItem>
  6589. {/* 高新纯咨询合同说明详情 */}
  6590. <Gxczx
  6591. knowledgeServices={this.state.knowledgeServices}
  6592. auditServices={this.state.auditServices}
  6593. addDeductionServices={this.state.addDeductionServices}
  6594. knowledgeOther={this.state.knowledgeOther}
  6595. auditOther={this.state.auditOther}
  6596. addDeductionOther={this.state.addDeductionOther}
  6597. />
  6598. <FormItem
  6599. labelCol={{ span: 5 }}
  6600. wrapperCol={{ span: 19 }}
  6601. label="补充协议"
  6602. >
  6603. <div
  6604. style={{
  6605. paddingTop: "10px",
  6606. paddingBottom: "10px",
  6607. }}
  6608. >
  6609. {this.state.visible &&
  6610. this.state.activeKey === "1" &&
  6611. this.state.replenishUrl ? (
  6612. <ImgList
  6613. domId={"addService4"}
  6614. fileList={this.state.replenishUrl}
  6615. ItemWidth={"96px"}
  6616. />
  6617. ) : (
  6618. <div />
  6619. )}
  6620. </div>
  6621. </FormItem>
  6622. </div>
  6623. )}
  6624. </div>
  6625. {/* 服务内容 */}
  6626. <div class="clearfix">
  6627. <FormItem
  6628. labelCol={{ span: 5 }}
  6629. wrapperCol={{ span: 19 }}
  6630. label={
  6631. <span>
  6632. <strong style={{ color: "#f00" }}>*</strong>
  6633. 服务内容
  6634. </span>
  6635. }
  6636. >
  6637. <div>
  6638. {this.state.processStatus == 0 ?
  6639. <div>
  6640. <PicturesWall
  6641. domId={"addServiceContent"}
  6642. fileList={this.getContentUrl}
  6643. pictureUrl={this.state.contentUrl}
  6644. url="/api/admin/order/uploadOrderImg"
  6645. orderNo={this.state.orderNo}
  6646. sign="content"
  6647. deleteApi="/api/admin/order/deleteOrderImg"
  6648. />
  6649. <p> <span style={{ color: "red", display: "inline-block" }}>(请将合同中的服务内容,截图上传!含服务年限,时间节点等;)</span>图片建议:要清晰。</p>
  6650. </div> :
  6651. this.state.contentUrl.length > 0 ?
  6652. <div>
  6653. <ImgList
  6654. domId={"addService13"}
  6655. fileList={this.state.contentUrl}
  6656. ItemWidth={"96px"}
  6657. />
  6658. </div> : "暂无附件!"}
  6659. </div>
  6660. </FormItem>
  6661. </div>
  6662. {/* 知识产权情况 */}
  6663. {this.state.processStatus == 0 ?
  6664. <Property
  6665. isCreat={true}
  6666. isProperty={this.state.isProperty}
  6667. setProperty={e => { this.setState({ isProperty: e, patentStatus: e == 1 && 0 }) }}
  6668. patentStatus={this.state.patentStatus}
  6669. setPatentS={e => { this.setState({ patentStatus: e }) }}
  6670. /> :
  6671. <Property
  6672. patentStatus={this.state.patentStatus}
  6673. />}
  6674. <div className="clearfix">
  6675. {this.state.processStatus == 0 ? (
  6676. <div className="clearfix">
  6677. <FormItem
  6678. labelCol={{ span: 5 }}
  6679. wrapperCol={{ span: 16 }}
  6680. label={
  6681. <span>
  6682. <strong style={{ color: "#f00" }}>*</strong>
  6683. 订单留言
  6684. </span>
  6685. }
  6686. >
  6687. <Input
  6688. ref="orderRemarksRef"
  6689. type="textarea"
  6690. placeholder="请输入订单留言"
  6691. rows={4}
  6692. value={this.state.orderRemarks}
  6693. onChange={(e) => {
  6694. this.setState({
  6695. orderRemarks: e.target.value,
  6696. });
  6697. }}
  6698. style={{ width: "95%" }}
  6699. />
  6700. <div className="mandatory">
  6701. 重要提示:请详细填写合同中包含的服务内容、服务年限、时间节点等
  6702. </div>
  6703. </FormItem>
  6704. </div>
  6705. ) : (
  6706. <FormItem
  6707. labelCol={{ span: 4 }}
  6708. wrapperCol={{ span: 16 }}
  6709. label="订单留言"
  6710. >
  6711. <p
  6712. style={{ width: 500, wordWrap: "break-word" }}
  6713. >
  6714. {this.state.orderRemarks}
  6715. </p>
  6716. </FormItem>
  6717. )}
  6718. </div>
  6719. <div className="clearfix">
  6720. <FormItem
  6721. className="half-item"
  6722. {...formItemLayout}
  6723. label="订单负责人"
  6724. >
  6725. <span>{this.state.salesmanName}</span>
  6726. </FormItem>
  6727. <FormItem
  6728. className="half-item"
  6729. {...formItemLayout}
  6730. label="订单负责人电话"
  6731. >
  6732. <span>{this.state.salesmanMobile}</span>
  6733. </FormItem>
  6734. </div>
  6735. <div className="clearfix">
  6736. <FormItem
  6737. className="half-item"
  6738. {...formItemLayout}
  6739. label="当前财务负责人"
  6740. >
  6741. <span>{this.state.nowFinance}</span>
  6742. </FormItem>
  6743. <FormItem
  6744. className="half-item"
  6745. {...formItemLayout}
  6746. label="当前财务负责人电话"
  6747. >
  6748. <span>{this.state.nowFinanceMobile}</span>
  6749. </FormItem>
  6750. </div>
  6751. <div className="clearfix">
  6752. <FormItem
  6753. className="half-item"
  6754. {...formItemLayout}
  6755. style={{ opacity: ".5" }}
  6756. label="原订单负责人"
  6757. >
  6758. <span>{this.state.oldSalesmanName}</span>
  6759. </FormItem>
  6760. <FormItem
  6761. className="half-item"
  6762. {...formItemLayout}
  6763. style={{ opacity: ".5" }}
  6764. label="原订单负责人电话"
  6765. >
  6766. <span>{this.state.oldSalesmanMobile}</span>
  6767. </FormItem>
  6768. </div>
  6769. <div className="clearfix">
  6770. <FormItem
  6771. className="half-item"
  6772. style={{ opacity: ".5" }}
  6773. {...formItemLayout}
  6774. label="实际财务操作人"
  6775. >
  6776. <span>{this.state.financeName}</span>
  6777. </FormItem>
  6778. <FormItem
  6779. className="half-item"
  6780. {...formItemLayout}
  6781. style={{ opacity: ".5" }}
  6782. label="实际财务操作人电话"
  6783. >
  6784. <span>{this.state.financeMobile}</span>
  6785. </FormItem>
  6786. </div>
  6787. {/* 新增协单人员 */}
  6788. <div>
  6789. <div style={{ marginLeft: "50px", display: 'flex' }}>
  6790. <div
  6791. style={{
  6792. minWidth: '66px',
  6793. maxWidth: '100px',
  6794. fontSize: "12px",
  6795. color: "red",
  6796. }}
  6797. >
  6798. 协单人员 :
  6799. </div>
  6800. <div>
  6801. {this.state.personnel.length > 0
  6802. ? this.state.personnel.map(function (value, key) {
  6803. return (
  6804. <Tag
  6805. style={{ marginBottom: '5px' }}
  6806. key={value.id}
  6807. closable={closable}
  6808. onClose={(e) => {
  6809. e.preventDefault();
  6810. confirm({
  6811. title: "确定删除此人员吗?",
  6812. // content: (
  6813. // <span style={{ color: "red" }}>
  6814. // 删除后会将该项目下的所有催款节点自动清除!!!
  6815. // </span>
  6816. // ),
  6817. onOk() {
  6818. $.ajax({
  6819. method: "post",
  6820. dataType: "json",
  6821. crossDomain: false,
  6822. url:
  6823. globalConfig.context +
  6824. "/api/admin/newOrder/deleteAssist",
  6825. data: {
  6826. id: value.id,
  6827. },
  6828. success: function (data) {
  6829. if (data.error.length) {
  6830. message.warning(
  6831. data.error[0].message
  6832. );
  6833. } else {
  6834. message.success("删除成功");
  6835. assistList();
  6836. }
  6837. }.bind(this),
  6838. }).always(
  6839. function () {
  6840. this.setState({
  6841. loading: false,
  6842. });
  6843. }.bind(this)
  6844. );
  6845. },
  6846. onCancel() { },
  6847. });
  6848. }}
  6849. >
  6850. {value.name}
  6851. </Tag>
  6852. );
  6853. })
  6854. : "无"}
  6855. </div>
  6856. </div>
  6857. <div
  6858. style={{
  6859. margin: "10px 0 0 50px",
  6860. display: this.state.disabledView,
  6861. }}
  6862. >
  6863. <Button
  6864. type="primary"
  6865. onClick={() => {
  6866. this.setState({
  6867. coorVisible: "block",
  6868. coor: "",
  6869. });
  6870. }}
  6871. >
  6872. 添加协单人员
  6873. </Button>
  6874. {/* 提示 */}
  6875. <div style={{ color: "red" }}>
  6876. 注:协单人员为技术人员,陪同营销人员进行订单协作等相关工作,填写后将统计至相关的奖金、提成等
  6877. </div>
  6878. </div>
  6879. {/*添加协单人员 */}
  6880. <div
  6881. style={{
  6882. margin: "10px 0 0 50px",
  6883. display: this.state.coorVisible,
  6884. }}
  6885. >
  6886. <Form
  6887. onSubmit={this.handleSubmit}
  6888. ref={this.formRef}
  6889. >
  6890. <Form.Item
  6891. {...formItemLayout}
  6892. label=""
  6893. name="coor"
  6894. hasFeedback
  6895. >
  6896. <AutoComplete
  6897. // autocomplete="off"
  6898. allowClear
  6899. dataSource={dataSourceView}
  6900. style={{ width: 200 }}
  6901. onSelect={this.onSelectView}
  6902. onSearch={this.handleSearch}
  6903. placeholder="请输入名称"
  6904. />
  6905. </Form.Item>
  6906. </Form>
  6907. <div style={{ marginLeft: "10px" }}>
  6908. <Button
  6909. type="primary"
  6910. style={{ marginRight: "54px" }}
  6911. onClick={this.submitOrder}
  6912. loading={this.state.loading}
  6913. >
  6914. 保存
  6915. </Button>
  6916. <Button
  6917. onClick={() => {
  6918. this.setState({
  6919. coorVisible: "none",
  6920. });
  6921. }}
  6922. >
  6923. 取消
  6924. </Button>
  6925. </div>
  6926. </div>
  6927. </div>
  6928. {/* 分界线 */}
  6929. <div
  6930. style={{
  6931. borderTop: "1px solid #333",
  6932. margin: "5px 0",
  6933. }}
  6934. ></div>
  6935. {/* 上门服务次数 */}
  6936. <div>
  6937. <div
  6938. style={{
  6939. display: "flex",
  6940. justifyContent: "space-between",
  6941. }}
  6942. >
  6943. <div
  6944. style={{ marginLeft: "50px", fontSize: "20px" }}
  6945. >
  6946. 上门服务次数
  6947. </div>
  6948. <div>
  6949. <Button
  6950. type="primary"
  6951. style={{ marginBottom: 15 }}
  6952. onClick={() => {
  6953. this.publicByOrder();
  6954. this.setState({
  6955. modalRecord: true,
  6956. });
  6957. }}
  6958. >
  6959. 查看上门记录
  6960. </Button>
  6961. <Button
  6962. style={{ marginLeft: 5, display: this.state.disabledView }}
  6963. type="primary"
  6964. onClick={() => {
  6965. this.setState({
  6966. modalView: true,
  6967. dateView: '',
  6968. contentView: '',
  6969. remarksView: '',
  6970. contentViewLength: 0,
  6971. contentViewLength1: 0,
  6972. });
  6973. }}
  6974. >
  6975. 添加上门次数
  6976. </Button>
  6977. </div>
  6978. </div>
  6979. {/* 上门服务表格 */}
  6980. <div
  6981. className="patent-table"
  6982. style={{ marginBottom: 10 }}
  6983. >
  6984. <Spin spinning={this.state.loading}>
  6985. <Table
  6986. columns={this.state.columnsView}
  6987. scroll={{ x: "max-content", y: 0 }}
  6988. dataSource={this.state.dataView}
  6989. pagination={false}
  6990. // onRowClick={this.tableRowClick}
  6991. bordered
  6992. size="small"
  6993. />
  6994. </Spin>
  6995. </div>
  6996. {/* 查看上门记录 */}
  6997. <Modal
  6998. footer=""
  6999. title="技术人员上门详细记录"
  7000. visible={this.state.modalRecord}
  7001. width="1200px"
  7002. onCancel={() => {
  7003. this.setState({
  7004. modalRecord: false,
  7005. });
  7006. }}
  7007. >
  7008. <Spin spinning={this.state.loading}>
  7009. <Table
  7010. columns={this.state.columnsRecord}
  7011. scroll={{ x: "max-content", y: 0 }}
  7012. dataSource={this.state.publicView}
  7013. pagination={false}
  7014. // onRowClick={this.tableRowClick}
  7015. bordered
  7016. size="small"
  7017. />
  7018. </Spin>
  7019. </Modal>
  7020. {/* 添加上门次数模态框 */}
  7021. <Modal
  7022. footer=""
  7023. title="新增上门次数"
  7024. visible={this.state.modalView}
  7025. key={this.state.viewKey}
  7026. onCancel={() => {
  7027. this.setState({
  7028. modalView: false,
  7029. viewKey: this.state.viewKey + 1,
  7030. });
  7031. }}
  7032. >
  7033. <Form
  7034. onSubmit={this.handleSubmit}
  7035. ref={this.formRef}
  7036. style={{ marginRight: "120px" }}
  7037. >
  7038. <Form.Item
  7039. {...formItemLayout}
  7040. label="上门时间"
  7041. name="date"
  7042. hasFeedback
  7043. >
  7044. <DatePicker
  7045. placeholder="预计技术员上门服务时间"
  7046. onChange={(date, dateString) => {
  7047. this.setState({
  7048. dateView: dateString,
  7049. });
  7050. }}
  7051. />
  7052. </Form.Item>
  7053. <Form.Item
  7054. {...formItemLayout}
  7055. label="服务内容"
  7056. name="remarks"
  7057. hasFeedback
  7058. style={{ position: 'relative' }}
  7059. >
  7060. <TextArea
  7061. rows={4}
  7062. placeholder="需要技术员上门服务内容"
  7063. onChange={(e) => {
  7064. this.setState({
  7065. contentView: e.target.value,
  7066. }, () => {
  7067. if (!this.state.contentView) {
  7068. this.setState({
  7069. contentViewLength: 0,
  7070. })
  7071. } else {
  7072. this.setState({
  7073. contentViewLength: this.state.contentView.length
  7074. })
  7075. }
  7076. });
  7077. }}
  7078. maxLength={500}
  7079. >
  7080. </TextArea>
  7081. <div style={{ position: 'absolute', right: '20px', bottom: '-5px', zIndex: '10' }}>{this.state.contentViewLength + '/500'}</div>
  7082. </Form.Item>
  7083. <Form.Item
  7084. {...formItemLayout}
  7085. label="备注"
  7086. name="remarks"
  7087. hasFeedback
  7088. style={{ position: 'relative' }}
  7089. >
  7090. <TextArea
  7091. rows={4}
  7092. maxLength={500}
  7093. placeholder="需要技术员注意事项"
  7094. onChange={(e) => {
  7095. this.setState({
  7096. remarksView: e.target.value,
  7097. }, () => {
  7098. if (!this.state.remarksView) {
  7099. this.setState({
  7100. contentViewLength1: 0,
  7101. })
  7102. } else {
  7103. this.setState({
  7104. contentViewLength1: this.state.remarksView.length
  7105. })
  7106. }
  7107. });
  7108. }}
  7109. />
  7110. <div style={{ position: 'absolute', right: '20px', bottom: '-5px', zIndex: '10' }}>{this.state.contentViewLength1 + '/500'}</div>
  7111. </Form.Item>
  7112. </Form>
  7113. <div
  7114. style={{
  7115. display: "flex",
  7116. justifyContent: "center",
  7117. }}
  7118. >
  7119. <Button
  7120. onClick={this.submitView}
  7121. type="primary"
  7122. loading={this.state.loading}
  7123. >
  7124. 提交
  7125. </Button>
  7126. <Button
  7127. type="dashed"
  7128. style={{ marginLeft: "15px" }}
  7129. onClick={() => {
  7130. this.setState({
  7131. modalView: false,
  7132. viewKey: this.state.viewKey + 1,
  7133. dateView: '',
  7134. contentView: '',
  7135. remarksView: '',
  7136. contentViewLength: 0,
  7137. contentViewLength1: 0,
  7138. });
  7139. }}
  7140. >
  7141. 取消
  7142. </Button>
  7143. </div>
  7144. </Modal>
  7145. </div>
  7146. <div>
  7147. <span
  7148. style={{ marginLeft: "50px", fontSize: "20px" }}
  7149. >
  7150. 项目业务
  7151. </span>
  7152. {
  7153. // 新需求 除湖南和内蒙古外 不让其他省操作
  7154. (adminData.province == "21" || adminData.province == "11") &&
  7155. <div>
  7156. {
  7157. this.state.processStatus == 0 &&
  7158. <Button
  7159. type="primary"
  7160. onClick={this.addDetailed}
  7161. style={{
  7162. float: "right",
  7163. marginRight: "50px",
  7164. marginBottom: "15px",
  7165. }}
  7166. >
  7167. 添加项目明细
  7168. </Button>
  7169. }
  7170. {
  7171. this.props.datauser.projectType == 1 && this.state.processStatus > 1 &&
  7172. <Button
  7173. type="primary"
  7174. onClick={this.addVip}
  7175. style={{
  7176. float: "right",
  7177. marginRight: "50px",
  7178. marginBottom: "15px",
  7179. }}
  7180. >
  7181. 添加会员项目
  7182. </Button>
  7183. }
  7184. {
  7185. (this.state.processStatus == 7 || this.state.processStatus == 8) &&
  7186. <Button
  7187. type="primary"
  7188. style={{
  7189. float: "right",
  7190. marginRight: "50px",
  7191. marginBottom: "15px",
  7192. }}
  7193. onClick={() => {
  7194. if (this.state.deleteSign == 2 || this.state.deleteSign == 3) {
  7195. message.warning("项目变更中,无法发起项目重启");
  7196. return
  7197. }
  7198. this.setState({
  7199. selectVisible: true,
  7200. sType: "restart",
  7201. })
  7202. }}
  7203. >
  7204. 项目重启
  7205. </Button>
  7206. }
  7207. {
  7208. (this.state.processStatus == 7 || this.state.processStatus == 8) &&
  7209. <Button
  7210. type="primary"
  7211. style={{
  7212. float: "right",
  7213. marginRight: "50px",
  7214. marginBottom: "15px",
  7215. }}
  7216. onClick={() => {
  7217. if (this.state.deleteSign == 2 || this.state.deleteSign == 3) {
  7218. message.warning("项目变更中,无法发起项目暂停");
  7219. return
  7220. }
  7221. this.setState({
  7222. selectVisible: true,
  7223. sType: "suspend",
  7224. })
  7225. }}
  7226. >
  7227. 项目暂停
  7228. </Button>
  7229. }
  7230. </div>
  7231. }
  7232. </div>
  7233. <div
  7234. className="patent-table"
  7235. style={{ marginBottom: 10 }}
  7236. >
  7237. <Spin spinning={this.state.loading}>
  7238. {
  7239. // 项目暂停&重启勾选
  7240. this.state.selectVisible &&
  7241. <SelectList
  7242. type={this.state.sType}
  7243. contractNo={this.state.contractNo}
  7244. orderNo={this.state.orderNo}
  7245. userName={this.state.userName}
  7246. list={this.state.dataSource}
  7247. visible={this.state.selectVisible}
  7248. subClose={() => {
  7249. this.loadData();
  7250. this.setState({
  7251. selectVisible: false,
  7252. })
  7253. }}
  7254. />
  7255. }
  7256. <Table
  7257. rowKey="id"
  7258. columns={this.state.columns}
  7259. dataSource={this.state.dataSource}
  7260. pagination={this.state.pagination}
  7261. expandedRowRender={expandedRowRenderVip}
  7262. rowClassName={this.addRowColor}
  7263. onRowClick={this.tableRowClick}
  7264. bordered
  7265. size="small"
  7266. />
  7267. </Spin>
  7268. </div>
  7269. <div
  7270. style={{
  7271. display: cuiDataList.length ? "block" : "none",
  7272. }}
  7273. >
  7274. <span
  7275. style={{ marginLeft: "50px", fontSize: "20px" }}
  7276. >
  7277. 旧催款节点
  7278. </span>
  7279. <Button
  7280. type="primary"
  7281. // onClick={this.addcontact}
  7282. disabled
  7283. onClick={(e) => {
  7284. cuiDataList.length
  7285. ? this.addcontact()
  7286. : this.addcontactNew();
  7287. }}
  7288. style={{
  7289. float: "right",
  7290. marginRight: "50px",
  7291. marginBottom: "15px",
  7292. display:
  7293. this.state.processStatus == 0
  7294. ? "block"
  7295. : "none",
  7296. }}
  7297. >
  7298. 添加催款节点
  7299. </Button>
  7300. </div>
  7301. <div
  7302. className="clearfix"
  7303. style={{
  7304. display: cuiDataList.length ? "block" : "none",
  7305. }}
  7306. >
  7307. <Spin spinning={this.state.loading}>
  7308. <Form layout="horizontal">
  7309. <Table
  7310. pagination={false}
  7311. columns={this.state.ContactsLists}
  7312. dataSource={this.state.contactList}
  7313. scroll={{ x: "max-content", y: 0 }}
  7314. bordered
  7315. size="small"
  7316. />
  7317. <Col
  7318. span={24}
  7319. offset={9}
  7320. style={{ marginTop: "15px" }}
  7321. ></Col>
  7322. </Form>
  7323. </Spin>
  7324. </div>
  7325. <div
  7326. style={{
  7327. display: cuiDataList.length ? "none" : "block",
  7328. }}
  7329. >
  7330. <span
  7331. style={{
  7332. marginLeft: "50px",
  7333. fontSize: "20px",
  7334. }}
  7335. >
  7336. 新催款节点
  7337. </span>
  7338. <span
  7339. style={{
  7340. display: "inline-block",
  7341. marginLeft: 10,
  7342. color: "red",
  7343. }}
  7344. >
  7345. 金额总计(万元): {this.state.totalCui}
  7346. </span>
  7347. <Button
  7348. type="primary"
  7349. disabled={this.state.addFlag ? true : false}
  7350. // onClick={this.addcontact}
  7351. onClick={(e) => {
  7352. this.setState({ addFlag: true });
  7353. this.addcontactNew();
  7354. }}
  7355. style={{
  7356. float: "right",
  7357. marginRight: "50px",
  7358. marginBottom: "15px",
  7359. display:
  7360. this.state.processStatus == 0
  7361. ? "block"
  7362. : "none",
  7363. }}
  7364. >
  7365. 添加催款节点
  7366. </Button>
  7367. </div>
  7368. <div
  7369. className="clearfix"
  7370. style={{
  7371. display: cuiDataList.length ? "none" : "block",
  7372. }}
  7373. >
  7374. <Spin spinning={this.state.loading}>
  7375. <Form layout="horizontal">
  7376. <Table
  7377. pagination={false}
  7378. columns={this.state.ContactsListsNew}
  7379. dataSource={this.state.contactListNew}
  7380. scroll={{ x: "max-content", y: 0 }}
  7381. bordered
  7382. size="small"
  7383. />
  7384. <Col
  7385. span={24}
  7386. offset={9}
  7387. style={{ marginTop: "15px" }}
  7388. ></Col>
  7389. </Form>
  7390. </Spin>
  7391. </div>
  7392. {this.state.processStatus == 0 &&
  7393. <div
  7394. className="addSave"
  7395. style={{
  7396. marginTop: "15px",
  7397. display: "flex",
  7398. justifyContent: "center",
  7399. }}
  7400. >
  7401. <Button
  7402. className="cancel"
  7403. type="primary"
  7404. onClick={this.handleCancels}
  7405. style={{ margin: "0 25px" }}
  7406. htmlType="submit"
  7407. loading={this.state.loading}
  7408. >
  7409. 签单
  7410. </Button>
  7411. <Button
  7412. className="cancel"
  7413. type="primary"
  7414. onClick={this.handleCancelq}
  7415. style={{ margin: "0 25px" }}
  7416. htmlType="submit"
  7417. loading={this.state.loading}
  7418. >
  7419. 保存
  7420. </Button>
  7421. <Popconfirm
  7422. title="请确认您是否作废此订单??"
  7423. onConfirm={(e) => {
  7424. this.examOks()
  7425. }}
  7426. okText="确认"
  7427. cancelText="取消"
  7428. >
  7429. <Button
  7430. className="cancel"
  7431. type="danger"
  7432. // onClick={this.examOks}
  7433. style={{ margin: "0 25px" }}
  7434. loading={this.state.loading}
  7435. >
  7436. 订单作废
  7437. </Button>
  7438. </Popconfirm>
  7439. <Button
  7440. className="cancel"
  7441. type="ghost"
  7442. onClick={this.handleCancelclose}
  7443. style={{ margin: "0 25px" }}
  7444. >
  7445. 取消
  7446. </Button>
  7447. </div>
  7448. }
  7449. </div>
  7450. }
  7451. </TabPane>
  7452. {
  7453. // 新需求 除湖南和内蒙古外 不让其他省操作
  7454. (adminData.province == "21" || adminData.province == "11") &&
  7455. <TabPane tab="合同变更发起" key="2">
  7456. {
  7457. this.state.activeKey == "2" &&
  7458. <div className="contractchange">
  7459. {
  7460. !(this.state.processStatus == 7 || this.state.processStatus == 8) &&
  7461. <div className="cmask">当前状态不能发起合同变更</div>
  7462. }
  7463. <div className="clearfix">
  7464. <FormItem
  7465. className="half-item"
  7466. {...formItemLayout}
  7467. label="客户名称"
  7468. >
  7469. <span>{this.state.userName}</span>
  7470. <EnterpriseNameChange
  7471. type="journal"
  7472. style={{ marginLeft: 10 }}
  7473. enterpriseId={this.state.orderUid}
  7474. />
  7475. </FormItem>
  7476. </div>
  7477. <div className="clearfix">
  7478. <FormItem
  7479. className="half-item"
  7480. {...formItemLayout}
  7481. label="合同编号"
  7482. >
  7483. <span>{this.state.contractNo}</span>
  7484. </FormItem>
  7485. </div>
  7486. <div className="clearfix">
  7487. <FormItem
  7488. className="half-item"
  7489. {...formItemLayout}
  7490. label="申请变更部门"
  7491. >
  7492. <span>{this.state.depName}</span>
  7493. </FormItem>
  7494. <FormItem
  7495. className="half-item"
  7496. {...formItemLayout}
  7497. label="申请人"
  7498. >
  7499. <span>{this.state.salesmanName}</span>
  7500. </FormItem>
  7501. </div>
  7502. <div className="clearfix">
  7503. <FormItem
  7504. labelCol={{ span: 5 }}
  7505. wrapperCol={{ span: 19 }}
  7506. label="变更类型"
  7507. >
  7508. <Select
  7509. placeholder="选择合同变更类型"
  7510. style={{ width: 200 }}
  7511. disabled={this.state.changeFlag}
  7512. value={this.state.typeChange}
  7513. onChange={(e) => {
  7514. this.setState({
  7515. typeChange: e,
  7516. changeFlag: true,
  7517. });
  7518. if (e == 1) {
  7519. this.setState({
  7520. hetongFlag: false,
  7521. listFlag: false,
  7522. listCuiFlag: false,
  7523. tuiKuanFlag: false,
  7524. displayList: false,
  7525. });
  7526. } else if (e == 2) {
  7527. this.setState({
  7528. hetongFlag: true,
  7529. listFlag: false,
  7530. listCuiFlag: false,
  7531. tuiKuanFlag: true,
  7532. displayList: false,
  7533. });
  7534. } else if (e == 3) {
  7535. this.setState({
  7536. listFlag: false,
  7537. hetongFlag: false,
  7538. listCuiFlag: false,
  7539. tuiKuanFlag: false,
  7540. displayList: true,
  7541. });
  7542. } else if (e == 4) {
  7543. this.setState({
  7544. listFlag: false,
  7545. listCuiFlag: false,
  7546. hetongFlag: false,
  7547. tuiKuanFlag: true,
  7548. displayList: false,
  7549. });
  7550. } else if (e == 5) {
  7551. this.setState({
  7552. listFlag: false,
  7553. listCuiFlag: false,
  7554. hetongFlag: true,
  7555. tuiKuanFlag: true,
  7556. displayList: false,
  7557. });
  7558. } else if (e == 6) {
  7559. this.setState({
  7560. // listFlag: true,
  7561. // listCuiFlag: true,
  7562. // hetongFlag: true,
  7563. // tuiKuanFlag: true,
  7564. // displayList: false,
  7565. listFlag: false,
  7566. listCuiFlag: false,
  7567. hetongFlag: false,
  7568. tuiKuanFlag: false,
  7569. displayList: false,
  7570. });
  7571. } else if (e == 7) {
  7572. this.setState({
  7573. listFlag: true,
  7574. listCuiFlag: true,
  7575. hetongFlag: true,
  7576. tuiKuanFlag: true,
  7577. displayList: false,
  7578. isNew: true, //上传替换合同
  7579. });
  7580. } else {
  7581. this.setState({
  7582. hetongFlag: false,
  7583. listFlag: false,
  7584. listCuiFlag: false,
  7585. tuiKuanFlag: false,
  7586. displayList: false,
  7587. });
  7588. }
  7589. }}
  7590. >
  7591. <Option value={0}>退单退款</Option>
  7592. <Option value={1}>项目及金额变更</Option>
  7593. <Option value={2}>仅项目变更</Option>
  7594. <Option value={3}>仅金额变更</Option>
  7595. <Option value={4}>重报</Option>
  7596. <Option value={5}>赠送</Option>
  7597. <Option value={6}>退单不退款</Option>
  7598. <Option value={7}>仅变更合同</Option>
  7599. <Option value={8}>框架协议(仅已签框架合同适用)</Option>
  7600. </Select>
  7601. <Button
  7602. style={{ marginLeft: 10 }}
  7603. onClick={(e) => {
  7604. this.setState({
  7605. listFlag: false,
  7606. hetongFlag: false,
  7607. listCuiFlag: false,
  7608. tuiKuanFlag: false,
  7609. displayList: false,
  7610. startRemarks: "",
  7611. remarksC: "",
  7612. voucherUrl: [],
  7613. newContractUrl: [],
  7614. isNew: false,
  7615. changeAmount: "0",
  7616. applicant: undefined,
  7617. depNameChange: undefined,
  7618. typeChange: undefined,
  7619. changeFlag: false,
  7620. });
  7621. }}
  7622. >
  7623. 重置
  7624. </Button>
  7625. {(this.state.status === 3 || this.state.status == 0) ? (
  7626. <Button
  7627. type="danger"
  7628. style={{
  7629. float: "right",
  7630. backgroundColor: "red",
  7631. color: "white",
  7632. position: "absolute",
  7633. right: 0,
  7634. height: 50,
  7635. borderRadius: 20,
  7636. zIndex: 100,
  7637. top: 0,
  7638. }}
  7639. onClick={(e) => {
  7640. e.stopPropagation();
  7641. this.showConfirmChange(this.deleteChange);
  7642. }}
  7643. >
  7644. 取消本次变更
  7645. </Button>
  7646. ) : (
  7647. ""
  7648. )}
  7649. </FormItem>
  7650. </div>
  7651. <div className="clearfix">
  7652. <FormItem
  7653. labelCol={{ span: 5 }}
  7654. wrapperCol={{ span: 19 }}
  7655. label="合同额(万元)"
  7656. >
  7657. <Input
  7658. placeholder="请输入合同额"
  7659. disabled={this.state.hetongFlag}
  7660. ref="signTotalAmount"
  7661. value={this.state.totalAmount}
  7662. onChange={(e) => {
  7663. this.setState({
  7664. totalAmount: e.target.value,
  7665. });
  7666. }}
  7667. style={{ width: "240px" }}
  7668. />
  7669. </FormItem>
  7670. <FormItem
  7671. labelCol={{ span: 5 }}
  7672. wrapperCol={{ span: 19 }}
  7673. label="首付款(万元)"
  7674. >
  7675. <Input
  7676. placeholder="请输入首付款"
  7677. disabled={this.state.hetongFlag}
  7678. ref="signTotalAmount"
  7679. value={this.state.firstAmount}
  7680. onChange={(e) => {
  7681. this.setState({
  7682. firstAmount: e.target.value,
  7683. });
  7684. }}
  7685. style={{ width: "240px" }}
  7686. />
  7687. </FormItem>
  7688. <FormItem
  7689. labelCol={{ span: 5 }}
  7690. wrapperCol={{ span: 19 }}
  7691. label="已收款(万元)"
  7692. >
  7693. <span>
  7694. {this.state.settlementAmount}
  7695. &nbsp;&nbsp;&nbsp;&nbsp;
  7696. <span style={{ color: "red" }}>
  7697. (注:已收款与现实收款不符,请与财务专员联系)
  7698. </span>
  7699. </span>
  7700. </FormItem>
  7701. <FormItem
  7702. labelCol={{ span: 5 }}
  7703. wrapperCol={{ span: 19 }}
  7704. label="申请退款(万元)"
  7705. >
  7706. <Input
  7707. placeholder="请输入申请退款"
  7708. ref="signTotalAmount"
  7709. disabled={this.state.tuiKuanFlag}
  7710. value={this.state.changeAmount}
  7711. onChange={(e) => {
  7712. this.setState({
  7713. changeAmount: e.target.value,
  7714. });
  7715. }}
  7716. style={{ width: "240px" }}
  7717. />
  7718. </FormItem>
  7719. </div>
  7720. {/* 退单退款 */}
  7721. {this.state.isCaoGao && this.state.typeChange == 0 &&
  7722. <div className="clearfix">
  7723. <div className="clearfix">
  7724. <FormItem
  7725. className="half-item"
  7726. {...formItemLayout}
  7727. label="企业总经理姓名"
  7728. >
  7729. <Input
  7730. placeholder="请输入企业总经理姓名"
  7731. value={this.state.managerContacts}
  7732. onChange={(e) => {
  7733. this.setState({
  7734. managerContacts: e.target.value,
  7735. });
  7736. }}
  7737. style={{ width: "240px" }}
  7738. />
  7739. </FormItem>
  7740. <FormItem
  7741. className="half-item"
  7742. {...formItemLayout}
  7743. label="企业总经理联系电话"
  7744. >
  7745. <Input
  7746. placeholder="请输入企业总经理联系电话"
  7747. value={this.state.managerContactMobile}
  7748. onChange={(e) => {
  7749. this.setState({
  7750. managerContactMobile: e.target.value,
  7751. });
  7752. }}
  7753. style={{ width: "240px" }}
  7754. />
  7755. </FormItem>
  7756. </div>
  7757. <div className="clearfix">
  7758. <FormItem
  7759. className="half-item"
  7760. {...formItemLayout}
  7761. label="企业联系人姓名"
  7762. >
  7763. <Input
  7764. placeholder="请输入企业联系人姓名"
  7765. value={this.state.contacts}
  7766. onChange={(e) => {
  7767. this.setState({
  7768. contacts: e.target.value,
  7769. });
  7770. }}
  7771. style={{ width: "240px" }}
  7772. />
  7773. </FormItem>
  7774. <FormItem
  7775. className="half-item"
  7776. {...formItemLayout}
  7777. label="企业联系人联系方式"
  7778. >
  7779. <Input
  7780. placeholder="请输入企业联系人联系方式"
  7781. value={this.state.contactMobile}
  7782. onChange={(e) => {
  7783. this.setState({
  7784. contactMobile: e.target.value,
  7785. });
  7786. }}
  7787. style={{ width: "240px" }}
  7788. />
  7789. </FormItem>
  7790. </div>
  7791. <div className="clearfix">
  7792. <FormItem
  7793. className="half-item"
  7794. {...formItemLayout}
  7795. label={<span style={{ color: "red" }}>注</span>}
  7796. >
  7797. <span style={{ color: "red" }}>
  7798. 请填写以上信息,公司总经理将与企业联系交流
  7799. </span>
  7800. </FormItem>
  7801. </div>
  7802. </div>
  7803. }
  7804. <div
  7805. style={{
  7806. display: this.state.isCaoGao ? "block" : "none",
  7807. }}
  7808. >
  7809. <div>
  7810. <span
  7811. style={{
  7812. marginLeft: "50px",
  7813. fontSize: "20px",
  7814. }}
  7815. >
  7816. 项目业务
  7817. </span>
  7818. <span style={{ color: "red" }}>
  7819. (注:项目删除后,此项目的全部节点、全部工时,全部被删除,请谨慎删除!)
  7820. </span>
  7821. <Button
  7822. type="primary"
  7823. onClick={this.changeAddPro}
  7824. disabled={this.state.listFlag}
  7825. style={{
  7826. float: "right",
  7827. marginRight: "50px",
  7828. marginBottom: "15px",
  7829. display: this.state.displayList
  7830. ? "none"
  7831. : "block",
  7832. }}
  7833. >
  7834. 添加项目明细
  7835. </Button>
  7836. </div>
  7837. <div
  7838. className="patent-table"
  7839. style={{ marginBottom: 10 }}
  7840. >
  7841. <Spin spinning={this.state.loading}>
  7842. <Table
  7843. columns={this.state.proColumns}
  7844. dataSource={this.state.proDataSource}
  7845. expandedRowRender={expandedRowRender}
  7846. pagination={this.state.pagination}
  7847. rowClassName={this.addRowColor}
  7848. // onRowDoubleClick={
  7849. // this.state.listFlag
  7850. // ? this.not
  7851. // : this.editPro
  7852. // }
  7853. bordered
  7854. size="small"
  7855. />
  7856. </Spin>
  7857. </div>
  7858. <div>
  7859. <span
  7860. style={{
  7861. marginLeft: "50px",
  7862. fontSize: "20px",
  7863. }}
  7864. >
  7865. 催款节点
  7866. </span>
  7867. <span style={{ color: "red" }}>
  7868. (注:节点删除后,无论节点是否触发,均会删除,请谨慎删除!双击可修改对应金额!)
  7869. </span>
  7870. <Button
  7871. type="primary"
  7872. onClick={(e) => {
  7873. this.changeAddCui();
  7874. }}
  7875. disabled={this.state.listCuiFlag}
  7876. style={{
  7877. float: "right",
  7878. marginRight: "50px",
  7879. marginBottom: "15px",
  7880. display: this.state.displayList
  7881. ? "none"
  7882. : "block",
  7883. }}
  7884. >
  7885. 添加催款节点
  7886. </Button>
  7887. </div>
  7888. <div className="clearfix">
  7889. <Spin spinning={this.state.loading}>
  7890. <Form layout="horizontal">
  7891. <Table
  7892. pagination={false}
  7893. columns={this.state.changeCuiList}
  7894. dataSource={this.state.cuiDataSource}
  7895. scroll={{ x: "max-content", y: 0 }}
  7896. onRowDoubleClick={
  7897. this.state.listCuiFlag
  7898. ? this.not
  7899. : this.editCui
  7900. }
  7901. bordered
  7902. size="small"
  7903. />
  7904. <Col
  7905. span={24}
  7906. offset={9}
  7907. style={{ marginTop: "15px" }}
  7908. ></Col>
  7909. </Form>
  7910. </Spin>
  7911. </div>
  7912. </div>
  7913. <div className="clearfix">
  7914. <FormItem
  7915. style={{ height: "auto" }}
  7916. labelCol={{ span: 5 }}
  7917. wrapperCol={{ span: 19 }}
  7918. label="变更原因"
  7919. >
  7920. <TextArea
  7921. rows={4}
  7922. placeholder="请输入变更原因"
  7923. ref="signTotalAmount"
  7924. style={{ width: "95%" }}
  7925. value={this.state.remarksC}
  7926. onChange={(e) => {
  7927. this.setState({
  7928. remarksC: e.target.value,
  7929. });
  7930. }}
  7931. />
  7932. </FormItem>
  7933. </div>
  7934. <div className="clearfix">
  7935. <FormItem
  7936. style={{ height: "auto" }}
  7937. labelCol={{ span: 5 }}
  7938. wrapperCol={{ span: 19 }}
  7939. label="备注"
  7940. >
  7941. <TextArea
  7942. rows={4}
  7943. placeholder="请输入备注"
  7944. ref="signTotalAmount"
  7945. style={{ width: "95%" }}
  7946. value={this.state.startRemarks}
  7947. onChange={(e) => {
  7948. this.setState({
  7949. startRemarks: e.target.value,
  7950. });
  7951. }}
  7952. />
  7953. </FormItem>
  7954. </div>
  7955. <div className="clearfix">
  7956. <FormItem
  7957. labelCol={{ span: 5 }}
  7958. wrapperCol={{ span: 19 }}
  7959. label="变更凭证"
  7960. >
  7961. <PicturesWall
  7962. domId={"addService5"}
  7963. fileList={this.getVoucherUrl}
  7964. pictureUrl={this.state.voucherUrl}
  7965. url="/api/admin/orderChange/uploadFile"
  7966. sign="order_change_file"
  7967. />
  7968. <p>图片建议:要清晰。</p>
  7969. </FormItem>
  7970. </div>
  7971. <div className="clearfix">
  7972. <FormItem
  7973. labelCol={{ span: 5 }}
  7974. wrapperCol={{ span: 19 }}
  7975. label="上传替换合同"
  7976. >
  7977. <Switch disabled={this.state.typeChange == 7} checked={this.state.isNew} onChange={e => { this.setState({ isNew: e }) }} />,
  7978. <p style={{ color: "red" }}>注:原上传合同为空或作废时,需上传替换合同</p>
  7979. </FormItem>
  7980. </div>
  7981. {
  7982. this.state.isNew &&
  7983. <div className="clearfix">
  7984. <FormItem
  7985. labelCol={{ span: 5 }}
  7986. wrapperCol={{ span: 19 }}
  7987. label="合同扫描件"
  7988. >
  7989. <PicturesWall
  7990. domId={"newcontract"}
  7991. fileList={this.getNewContractUrl}
  7992. pictureUrl={this.state.newContractUrl}
  7993. url="/api/admin/orderChange/uploadFile"
  7994. sign=""
  7995. />
  7996. <p>图片建议:要清晰。</p>
  7997. </FormItem>
  7998. </div>
  7999. }
  8000. <div className="clearfix">
  8001. <Button
  8002. type="primary"
  8003. style={{ float: "right", marginRight: 40 }}
  8004. loading={this.state.loading}
  8005. onClick={(e) => {
  8006. if (this.state.isCaoGao) {
  8007. this.submitChange();
  8008. } else {
  8009. this.changeApply();
  8010. }
  8011. }}
  8012. >
  8013. {/* {this.state.isCaoGao
  8014. ? "发起变更申请"
  8015. : this.state.typeChange == 0
  8016. ? "发起变更申请"
  8017. : "下一步"} */}
  8018. {this.state.isCaoGao ? "发起变更申请" : "下一步"}
  8019. </Button>
  8020. </div>
  8021. </div>
  8022. }
  8023. </TabPane>
  8024. }
  8025. {this.state.isJilu &&
  8026. <TabPane tab={"最近变更记录"} key="3">
  8027. {
  8028. this.state.activeKey == "3" &&
  8029. <div>
  8030. <div
  8031. style={{
  8032. borderRadius: "50%",
  8033. width: 300,
  8034. height: 300,
  8035. position: "absolute",
  8036. top: 230,
  8037. left: 525,
  8038. transform: "rotate(-5deg)",
  8039. zIndex: 1,
  8040. display:
  8041. this.state.detailChange.status == 4
  8042. ? "block"
  8043. : "none",
  8044. }}
  8045. >
  8046. <img src={tongguo} style={{ width: "100%" }} />
  8047. </div>
  8048. <div
  8049. style={{
  8050. borderRadius: "50%",
  8051. width: 300,
  8052. height: 300,
  8053. position: "absolute",
  8054. top: 284,
  8055. left: 586,
  8056. transform: "rotate(-5deg)",
  8057. zIndex: 1,
  8058. display:
  8059. this.state.detailChange.status == 5
  8060. ? "block"
  8061. : "none",
  8062. }}
  8063. >
  8064. <img src={quxiao} style={{ width: "63%" }} />
  8065. </div>
  8066. <div className="clearfix">
  8067. <FormItem
  8068. className="half-item"
  8069. {...formItemLayout}
  8070. label="客户名称"
  8071. >
  8072. <span>{this.state.userName}</span>
  8073. <EnterpriseNameChange
  8074. type="journal"
  8075. style={{ marginLeft: 10 }}
  8076. enterpriseId={this.state.orderUid}
  8077. />
  8078. </FormItem>
  8079. {/* */}
  8080. <FormItem
  8081. className="half-item"
  8082. {...formItemLayout}
  8083. label="合同编号"
  8084. >
  8085. <span>{this.state.contractNo}</span>
  8086. </FormItem>
  8087. </div>
  8088. <div className="clearfix">
  8089. <FormItem
  8090. className="half-item"
  8091. {...formItemLayout}
  8092. label="时间"
  8093. >
  8094. <span>
  8095. {this.state.detailChange.createTimes}
  8096. </span>
  8097. </FormItem>
  8098. <FormItem
  8099. className="half-item"
  8100. {...formItemLayout}
  8101. label="申请人"
  8102. >
  8103. <span>{this.state.salesmanName}</span>
  8104. </FormItem>
  8105. </div>
  8106. <div className="clearfix">
  8107. <FormItem
  8108. className="half-item"
  8109. {...formItemLayout}
  8110. label="当前进度"
  8111. >
  8112. <span>
  8113. {/*当前是进度角色是咨询师以及咨询师经理时使用shenhePeo函数,其他流程正常显示*/}
  8114. {this.state.detailChange.processState === 3 ||
  8115. this.state.detailChange.processState === 4
  8116. ? shenghePeo(this.state.detailChange.examineName, this.state.detailChange.processState)
  8117. : getProcessStatusNew(
  8118. this.state.detailChange.examineName,
  8119. this.state.detailChange.processState,
  8120. this.state.detailChange.status
  8121. )}
  8122. </span>
  8123. <FlowChart id={this.state.detailChange.id} />
  8124. </FormItem>
  8125. {/* <FormItem
  8126. className="half-item"
  8127. {...formItemLayout}
  8128. label="申请变更部门"
  8129. >
  8130. <span>{this.state.depName}</span>
  8131. </FormItem> */}
  8132. <FormItem
  8133. {...formItemLayout}
  8134. className="half-item"
  8135. label="变更类型"
  8136. >
  8137. <span>
  8138. {getChangeType(
  8139. this.state.detailChange.typeChange
  8140. )}
  8141. </span>
  8142. </FormItem>
  8143. </div>
  8144. {/* <div className="clearfix">
  8145. <FormItem
  8146. labelCol={{ span: 4 }}
  8147. wrapperCol={{ span: 18 }}
  8148. label="变更类型"
  8149. >
  8150. <span>
  8151. {getChangeType(
  8152. this.state.detailChange.typeChange
  8153. )}
  8154. </span>
  8155. </FormItem>
  8156. </div> */}
  8157. {this.state.detailChange.typeChange == 0 &&
  8158. <div className="clearfix">
  8159. <FormItem
  8160. {...formItemLayout}
  8161. className="half-item"
  8162. label="企业总经理姓名"
  8163. >
  8164. <span>
  8165. {this.state.detailChange.managerContacts}
  8166. </span>
  8167. </FormItem>
  8168. <FormItem
  8169. {...formItemLayout}
  8170. className="half-item"
  8171. label="企业总经理联系电话"
  8172. >
  8173. <span>
  8174. {this.state.detailChange.managerContactMobile}
  8175. </span>
  8176. </FormItem>
  8177. </div>
  8178. }
  8179. {this.state.detailChange.typeChange == 0 &&
  8180. <div className="clearfix">
  8181. <FormItem
  8182. {...formItemLayout}
  8183. className="half-item"
  8184. label="企业联系人姓名"
  8185. >
  8186. <span>
  8187. {this.state.detailChange.contacts}
  8188. </span>
  8189. </FormItem>
  8190. <FormItem
  8191. {...formItemLayout}
  8192. className="half-item"
  8193. label="企业联系人联系方式"
  8194. >
  8195. <span>
  8196. {this.state.detailChange.contactMobile}
  8197. </span>
  8198. </FormItem>
  8199. </div>
  8200. }
  8201. <div className="clearfix">
  8202. <FormItem
  8203. {...formItemLayout}
  8204. className="half-item"
  8205. label="合同额(万元)"
  8206. >
  8207. <span>
  8208. {this.state.detailChange.totalAmount}
  8209. </span>
  8210. </FormItem>
  8211. <FormItem
  8212. {...formItemLayout}
  8213. className="half-item"
  8214. label="已收款(万元)"
  8215. >
  8216. <span>
  8217. {this.state.detailChange.settlementAmount}
  8218. </span>
  8219. </FormItem>
  8220. </div>
  8221. <div className="clearfix">
  8222. <FormItem
  8223. {...formItemLayout}
  8224. className="half-item"
  8225. label="欠款(万元)"
  8226. >
  8227. <span>{this.state.detailChange.arrears}</span>
  8228. </FormItem>
  8229. <FormItem
  8230. {...formItemLayout}
  8231. className="half-item"
  8232. label="申请退款(万元)"
  8233. >
  8234. <span>
  8235. {this.state.detailChange.changeAmount}
  8236. </span>
  8237. </FormItem>
  8238. </div>
  8239. <div className="clearfix">
  8240. <FormItem
  8241. style={{ height: "auto" }}
  8242. labelCol={{ span: 5 }}
  8243. wrapperCol={{ span: 19 }}
  8244. label="首付款(万元)"
  8245. >
  8246. <span>{this.state.detailChange.firstAmount}</span>
  8247. </FormItem>
  8248. </div>
  8249. <div className="clearfix">
  8250. <FormItem
  8251. style={{ height: "auto" }}
  8252. labelCol={{ span: 5 }}
  8253. wrapperCol={{ span: 19 }}
  8254. label="变更原因"
  8255. >
  8256. <span>{this.state.detailChange.remarksC}</span>
  8257. </FormItem>
  8258. </div>
  8259. <div className="clearfix">
  8260. <FormItem
  8261. style={{ height: "auto" }}
  8262. labelCol={{ span: 5 }}
  8263. wrapperCol={{ span: 19 }}
  8264. label="备注"
  8265. >
  8266. <span>
  8267. {this.state.detailChange.startRemarks}
  8268. </span>
  8269. </FormItem>
  8270. </div>
  8271. {/* ---- */}
  8272. <div className="clearfix">
  8273. <FormItem
  8274. labelCol={{ span: 5 }}
  8275. wrapperCol={{ span: 19 }}
  8276. label="变更凭证"
  8277. >
  8278. <div>
  8279. <div
  8280. style={{
  8281. paddingTop: "10px",
  8282. }}
  8283. >
  8284. {this.state.detailChange &&
  8285. this.state.detailChange.voucherUrl &&
  8286. this.state.activeKey === "3" &&
  8287. this.state.visible ? (
  8288. <ImgList
  8289. fileList={
  8290. this.state.detailChange.voucherUrl
  8291. }
  8292. ItemWidth={"96px"}
  8293. />
  8294. ) : (
  8295. <div />
  8296. )}
  8297. </div>
  8298. {this.state.status === 3 ? (
  8299. <Button
  8300. type="danger"
  8301. style={{
  8302. float: "right",
  8303. backgroundColor: "red",
  8304. color: "white",
  8305. position: "absolute",
  8306. right: 0,
  8307. height: 50,
  8308. borderRadius: 20,
  8309. zIndex: 100,
  8310. top: 0,
  8311. }}
  8312. onClick={(e) => {
  8313. e.stopPropagation();
  8314. this.showConfirmChange(
  8315. this.deleteChange
  8316. );
  8317. }}
  8318. >
  8319. 取消本次变更
  8320. </Button>
  8321. ) : (
  8322. ""
  8323. )}
  8324. </div>
  8325. </FormItem>
  8326. </div>
  8327. {
  8328. this.state.detailChange.contractPictureUrl.length != 0 &&
  8329. <div className="clearfix">
  8330. <FormItem
  8331. labelCol={{ span: 5 }}
  8332. wrapperCol={{ span: 19 }}
  8333. label="最新合同"
  8334. >
  8335. <div style={{ paddingTop: 10 }}>
  8336. <ImgList
  8337. fileList={
  8338. this.state.detailChange.contractPictureUrl
  8339. }
  8340. ItemWidth={"96px"}
  8341. />
  8342. </div>
  8343. </FormItem>
  8344. </div>
  8345. }
  8346. <ul
  8347. style={{
  8348. width: "868px",
  8349. overflow: "hidden",
  8350. paddingLeft: "90px",
  8351. paddingTop: "10px",
  8352. position: "relative",
  8353. bottom: "20px",
  8354. fontSize: "12px",
  8355. color: "rgba(0, 0, 0, 0.65)",
  8356. }}
  8357. >
  8358. {/* <span>操作人:</span> */}
  8359. {this.state.logData.map((item, index) => {
  8360. if (item.status == 0) {
  8361. item.status = "发起";
  8362. } else if (item.status == 1) {
  8363. item.status = "审核中";
  8364. } else if (item.status == 2) {
  8365. item.status = "通过";
  8366. } else if (item.status == 3) {
  8367. item.status = "驳回";
  8368. } else if (item.status == 4) {
  8369. item.status = "完成";
  8370. } else if (item.status == 5) {
  8371. item.status = "撤销";
  8372. }
  8373. return (
  8374. <li
  8375. key={index}
  8376. style={{
  8377. width: "100%",
  8378. height: "auto",
  8379. wordBreak: "break-all",
  8380. marginBottom: "10px",
  8381. }}
  8382. >
  8383. {item.aname + ":" + "【" + item.status + "】" + item.remarks + "(" + item.createTimes + ")"}
  8384. </li>
  8385. );
  8386. })}
  8387. </ul>
  8388. {/* 动态展示项目以及催款节点 */}
  8389. <div>
  8390. <div>
  8391. <span
  8392. style={{
  8393. marginLeft: "50px",
  8394. fontSize: "20px",
  8395. }}
  8396. >
  8397. 项目业务
  8398. </span>
  8399. </div>
  8400. <div
  8401. className="patent-table"
  8402. style={{ marginBottom: 10 }}
  8403. >
  8404. <Spin spinning={this.state.loading}>
  8405. <Table
  8406. columns={this.state.detailColumns}
  8407. dataSource={this.state.proDataSource}
  8408. expandedRowRender={expandedRowRenderDetail}
  8409. pagination={this.state.pagination}
  8410. // onRowClick={this.tableRowClick}
  8411. onRowClick={(record) => {
  8412. this.setState({
  8413. dataInfor: record,
  8414. infoVisible: true
  8415. })
  8416. }}
  8417. rowClassName={this.addRowColor}
  8418. bordered
  8419. size="small"
  8420. />
  8421. </Spin>
  8422. </div>
  8423. <div>
  8424. <span
  8425. style={{
  8426. marginLeft: "50px",
  8427. fontSize: "20px",
  8428. }}
  8429. >
  8430. 催款节点
  8431. </span>
  8432. </div>
  8433. <div className="clearfix">
  8434. <Spin spinning={this.state.loading}>
  8435. <Form layout="horizontal">
  8436. <Table
  8437. pagination={false}
  8438. columns={this.state.detailContactsLists}
  8439. dataSource={this.state.cuiDataSource}
  8440. scroll={{ x: "max-content", y: 0 }}
  8441. bordered
  8442. size="small"
  8443. />
  8444. <Col
  8445. span={24}
  8446. offset={9}
  8447. style={{ marginTop: "15px" }}
  8448. ></Col>
  8449. </Form>
  8450. </Spin>
  8451. </div>
  8452. </div>
  8453. </div>
  8454. }
  8455. </TabPane>
  8456. }
  8457. </Tabs>
  8458. }
  8459. </div>
  8460. </Spin>
  8461. </Form>
  8462. </Modal>
  8463. {
  8464. // 添加变更项目
  8465. this.state.changeVisible &&
  8466. <NewAddProject
  8467. type="change"
  8468. children="list"
  8469. typeChange={this.state.typeChange}
  8470. cid={this.state.changeId}
  8471. readOnly={false}
  8472. orderNo={this.state.orderNo}
  8473. visible={this.state.changeVisible}
  8474. newData={this.state.newData}
  8475. onCancel={() => [this.nextCancel("change")]}
  8476. />
  8477. }
  8478. {
  8479. // 编辑变更项目
  8480. this.state.editProVisible &&
  8481. <NewEditProject
  8482. type="change"
  8483. children="list"
  8484. typeChange={this.state.typeChange}
  8485. cid={this.state.changeId}
  8486. readOnly={false}
  8487. orderNo={this.props.datauser.orderNo}
  8488. visible={this.state.editProVisible}
  8489. dataInfor={this.state.dataInfor}
  8490. newData={this.state.newData}
  8491. onCancel={() => [this.nextCancel("change")]}
  8492. />
  8493. }
  8494. {
  8495. this.state.lookVisible ? (
  8496. <Modal
  8497. maskClosable={false}
  8498. visible={this.state.lookVisible}
  8499. onOk={this.noCancel}
  8500. onCancel={this.noCancel}
  8501. width="800px"
  8502. title={"退单申请"}
  8503. footer=""
  8504. className="admin-desc-content"
  8505. >
  8506. <Form layout="horizontal">
  8507. <Spin spinning={this.state.loading}>
  8508. <div className="clearfix">
  8509. <FormItem
  8510. labelCol={{ span: 4 }}
  8511. wrapperCol={{ span: 16 }}
  8512. label="终止合同"
  8513. >
  8514. <Picture
  8515. domId={"addService6"}
  8516. fileList={(e) => {
  8517. this.setState({ contractUrl: e });
  8518. }}
  8519. pictureUrl={this.state.contractUrl}
  8520. visible={this.props.visible}
  8521. data={{
  8522. sign: "order_refund_file",
  8523. url: "/api/admin/newOrder/uploadRefundOrderFile",
  8524. number: 8,
  8525. }}
  8526. />
  8527. </FormItem>
  8528. </div>
  8529. <div className="clearfix">
  8530. <FormItem
  8531. labelCol={{ span: 4 }}
  8532. wrapperCol={{ span: 16 }}
  8533. label="退单申请表"
  8534. >
  8535. <Picture
  8536. domId={"addService7"}
  8537. fileList={(e) => {
  8538. this.setState({ applicationUrl: e });
  8539. }}
  8540. pictureUrl={this.state.applicationUrl}
  8541. visible={this.props.visible}
  8542. data={{
  8543. sign: "order_refund_file",
  8544. url: "/api/admin/newOrder/uploadRefundOrderFile",
  8545. number: 8,
  8546. }}
  8547. />
  8548. </FormItem>
  8549. </div>
  8550. <div className="clearfix">
  8551. <FormItem
  8552. labelCol={{ span: 4 }}
  8553. wrapperCol={{ span: 16 }}
  8554. label="退单理由"
  8555. >
  8556. <Input
  8557. type="textarea"
  8558. placeholder="请输入退单理由"
  8559. rows={4}
  8560. value={this.state.reason}
  8561. onChange={(e) => {
  8562. this.setState({ reason: e.target.value });
  8563. }}
  8564. />
  8565. </FormItem>
  8566. </div>
  8567. <div className="clearfix">
  8568. <Button
  8569. className="cancel"
  8570. type="primary"
  8571. onClick={this.tuidanOk}
  8572. style={{ marginLeft: "50px" }}
  8573. htmlType="submit"
  8574. >
  8575. 确定退单
  8576. </Button>
  8577. <Button
  8578. className="cancel"
  8579. type="ghost"
  8580. onClick={this.noCancel}
  8581. style={{ marginLeft: "50px" }}
  8582. >
  8583. 取消
  8584. </Button>
  8585. </div>
  8586. </Spin>
  8587. </Form>
  8588. </Modal>
  8589. ) : (
  8590. <div />
  8591. )
  8592. }
  8593. <Modal
  8594. maskClosable={false}
  8595. title={
  8596. isNaN(parseFloat(this.state.appropriationRatio))
  8597. ? "修改催款节点金额"
  8598. : "修改催款节点比例"
  8599. }
  8600. visible={this.state.editCuiVisible}
  8601. onOk={() => {
  8602. this.submitEditCui(
  8603. isNaN(parseFloat(this.state.appropriationRatio)) ? 0 : 1
  8604. );
  8605. }}
  8606. okText={"保存"}
  8607. width={300}
  8608. onCancel={(e) => {
  8609. this.setState({
  8610. editCuiVisible: false,
  8611. appropriationRatio: "",
  8612. });
  8613. }}
  8614. >
  8615. <div className="clearfix">
  8616. <FormItem
  8617. labelCol={{ span: 6 }}
  8618. wrapperCol={{ span: 14 }}
  8619. label={
  8620. isNaN(parseFloat(this.state.appropriationRatio))
  8621. ? "催款金额"
  8622. : "催款比例"
  8623. }
  8624. >
  8625. <Input
  8626. type="number"
  8627. placeholder={
  8628. isNaN(parseFloat(this.state.appropriationRatio))
  8629. ? "请输入金额"
  8630. : "请输入比例"
  8631. }
  8632. rows={4}
  8633. value={this.state.editCuiMoney}
  8634. onChange={(e) => {
  8635. this.setState({ editCuiMoney: e.target.value });
  8636. }}
  8637. />
  8638. </FormItem>
  8639. </div>
  8640. </Modal>
  8641. <OrderRiZi
  8642. dataSourcerizhi={this.state.dataSourcerizhi}
  8643. closeOrderLog={this.closeOrderLog}
  8644. visible={this.state.rizhivisible}
  8645. loading={this.state.loading}
  8646. />
  8647. {
  8648. // 添加项目
  8649. this.state.projectOperationVisible &&
  8650. <NewAddProject
  8651. readOnly={
  8652. this.state.dataInfor &&
  8653. Object.keys(this.state.dataInfor).length > 0 &&
  8654. this.state.processStatus !== 0
  8655. }
  8656. orderNo={this.props.datauser.orderNo}
  8657. visible={this.state.projectOperationVisible}
  8658. newData={this.state.newData}
  8659. onCancel={this.nextCancel}
  8660. />
  8661. }
  8662. {
  8663. // 编辑项目
  8664. this.state.editProjectOperationVisible &&
  8665. <NewEditProject
  8666. readOnly={
  8667. this.state.dataInfor &&
  8668. Object.keys(this.state.dataInfor).length > 0 &&
  8669. this.state.processStatus !== 0
  8670. }
  8671. orderNo={this.props.datauser.orderNo}
  8672. visible={this.state.editProjectOperationVisible}
  8673. dataInfor={this.state.dataInfor}
  8674. newData={this.state.newData}
  8675. onCancel={this.nextCancel}
  8676. />
  8677. }
  8678. {
  8679. // 会员项目添加
  8680. this.state.vipVisible &&
  8681. <NewAddProject
  8682. type="vipAdd"
  8683. readOnly={
  8684. this.state.dataInfor &&
  8685. Object.keys(this.state.dataInfor).length > 0 &&
  8686. this.state.processStatus !== 0
  8687. }
  8688. orderNo={this.props.datauser.orderNo}
  8689. visible={this.state.vipVisible}
  8690. newData={this.state.newData}
  8691. onCancel={this.nextCancel}
  8692. />
  8693. // <ProjectOperationVip
  8694. // readOnly={
  8695. // this.state.dataInfor &&
  8696. // Object.keys(this.state.dataInfor).length > 0 &&
  8697. // this.state.processStatus !== 0
  8698. // }
  8699. // orderNo={this.props.datauser.orderNo}
  8700. // visible={this.state.vipVisible}
  8701. // dataInfor={this.state.dataInfor}
  8702. // newData={this.state.newData}
  8703. // onCancel={this.nextCancel}
  8704. // />
  8705. }
  8706. {
  8707. // 变更记录详情
  8708. this.state.infoVisible &&
  8709. <NewEditProject
  8710. children="list"
  8711. type="change"
  8712. readOnly={
  8713. this.state.dataInfor &&
  8714. Object.keys(this.state.dataInfor).length > 0 &&
  8715. this.state.processStatus !== 0
  8716. }
  8717. visible={this.state.infoVisible}
  8718. dataInfor={this.state.dataInfor}
  8719. onCancel={() => { this.setState({ infoVisible: false }) }}
  8720. />
  8721. }
  8722. </div >
  8723. );
  8724. },
  8725. })
  8726. );
  8727. export default Form.create()(NewService);