addService.jsx 277 KB

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