addService.jsx 284 KB

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