addService.jsx 284 KB

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