addService.jsx 283 KB

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