addService.jsx 277 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656
  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, //特批状态
  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. userType: thisData.userType,
  2133. updatas: {
  2134. salesType: thisData.salesType,//销售类型
  2135. userType: thisData.userType,//客户所属类型
  2136. other: thisData.other,//3渠道名 4,5描述
  2137. },
  2138. channelName: thisData.salesType == "3" ? thisData.other : "",//销售类型为渠道的时候给编辑出的渠道名称赋值
  2139. });
  2140. // 判断状态
  2141. if (this.state.processStatus === 0) {
  2142. this.setState({
  2143. closable: true,
  2144. disabledView: "inline-block",
  2145. });
  2146. }
  2147. }.bind(this),
  2148. }).always(
  2149. function () {
  2150. this.setState({
  2151. loading: false,
  2152. });
  2153. }.bind(this)
  2154. );
  2155. },
  2156. //节点列表
  2157. jiedian(orderNos) {
  2158. this.setState({
  2159. loadData: true,
  2160. });
  2161. $.ajax({
  2162. method: "get",
  2163. dataType: "json",
  2164. crossDomain: false,
  2165. url: globalConfig.context + "/api/admin/newOrder/selectOrderDun",
  2166. data: {
  2167. orderNo: orderNos,
  2168. },
  2169. success: function (data) {
  2170. let theArr = [];
  2171. let thisData = [];
  2172. if (data.error.length || data.data.list == "") {
  2173. if (data.error && data.error.length) {
  2174. message.warning(data.error[0].message);
  2175. }
  2176. } else {
  2177. for (let i = 0; i < data.data.length; i++) {
  2178. thisData = data.data[i];
  2179. theArr.push({
  2180. key: i,
  2181. dunSubject: thisData.dunSubject
  2182. ? thisData.dunSubject.toString()
  2183. : "", //催款科目
  2184. id: thisData.id, //节点Id
  2185. money: thisData.money, //催款金额
  2186. dunStatus: thisData.dunStatus, //催款状态
  2187. orderNo: thisData.orderNo,
  2188. });
  2189. }
  2190. this.setState({
  2191. contactList: theArr,
  2192. });
  2193. }
  2194. }.bind(this),
  2195. }).always(
  2196. function () {
  2197. this.setState({
  2198. loading: false,
  2199. });
  2200. }.bind(this)
  2201. );
  2202. },
  2203. //查看催款节点
  2204. jiedianNew(orderNos) {
  2205. this.setState({
  2206. loadData: true,
  2207. });
  2208. $.ajax({
  2209. method: "get",
  2210. dataType: "json",
  2211. crossDomain: false,
  2212. url:
  2213. globalConfig.context + "/api/admin/newOrderDun/selectListNewOrderDun",
  2214. data: {
  2215. orderNo: orderNos,
  2216. },
  2217. success: function (data) {
  2218. if (data.error && data.error.length) {
  2219. message.warning(data.error[0].message);
  2220. } else {
  2221. let theArr = [];
  2222. let thisData = [];
  2223. let arr = data.data || [];
  2224. let totalCui = 0;
  2225. for (let i = 0; i < arr.length; i++) {
  2226. thisData = arr[i];
  2227. totalCui += +thisData.money;
  2228. theArr.push({
  2229. key: i,
  2230. dunSubject: thisData.dunSubject
  2231. ? thisData.dunSubject.toString()
  2232. : "", //催款科目
  2233. id: thisData.id, //节点Id
  2234. money: thisData.money, //催款金额
  2235. // orderNo: record ? record.orderNo : this.props.datauser.orderNo,
  2236. commodityName: thisData.commodityName,
  2237. projectType: thisData.projectType,
  2238. dunTypeName: thisData.dunTypeName,
  2239. status: thisData.status,
  2240. waitDay: thisData.waitDay,
  2241. effectiveCount: thisData.effectiveCount,
  2242. startDate: thisData.startDate,
  2243. dunType: thisData.dunType,
  2244. appropriationRatio: thisData.appropriationRatio,
  2245. customizeName: thisData.customizeName,
  2246. customizeTimes: thisData.customizeTimes,
  2247. tid: thisData.tid,
  2248. });
  2249. }
  2250. if (!totalCui) {
  2251. totalCui = 0;
  2252. }
  2253. totalCui = (Math.round(totalCui * 1000000) / 1000000).toFixed(6);
  2254. this.setState({
  2255. contactListNew: theArr,
  2256. totalCui: parseFloat(totalCui),
  2257. });
  2258. }
  2259. }.bind(this),
  2260. }).always(
  2261. function () {
  2262. this.setState({
  2263. loading: false,
  2264. });
  2265. }.bind(this)
  2266. );
  2267. },
  2268. //催款节点保存
  2269. contactSave(record) {
  2270. for (let i = 0; i < this.state.contactList.length; i++) {
  2271. if (moneyVerify(this.state.contactList[i].money)) {
  2272. return;
  2273. }
  2274. }
  2275. this.setState({
  2276. loading: true,
  2277. });
  2278. $.ajax({
  2279. url: globalConfig.context + "/api/admin/newOrder/createOrderDun",
  2280. method: "post",
  2281. data: {
  2282. orderNo: this.state.orderNo,
  2283. orderDun: JSON.stringify(this.state.contactList),
  2284. },
  2285. }).done(
  2286. function (data) {
  2287. this.setState({
  2288. loading: false,
  2289. });
  2290. if (!data.error.length) {
  2291. message.success("保存成功!");
  2292. this.jiedian(record.orderNo);
  2293. } else {
  2294. message.warning(data.error[0].message);
  2295. }
  2296. }.bind(this)
  2297. );
  2298. },
  2299. //催款节点保存
  2300. contactSaveNew(record) {
  2301. if (record.dunType == 0) {
  2302. if (!record.customizeTimes) {
  2303. message.warning("请输入自定义时间");
  2304. return;
  2305. } else if (!record.customizeName) {
  2306. message.warning("请输入自定义科目");
  2307. return;
  2308. }
  2309. }
  2310. if (record.boStatus == "false") {
  2311. record.boStatus = false;
  2312. } else if (record.boStatus == "true") {
  2313. record.boStatus = true;
  2314. }
  2315. if (!this.state.yearFlag) {
  2316. if (!record.effectiveCount && !record.dunTypeCustom) {
  2317. message.warning("请选择服务年限");
  2318. return;
  2319. }
  2320. } else {
  2321. record.effectiveCount = "";
  2322. }
  2323. if (record.money == "") {
  2324. message.warning("请填写金额");
  2325. return;
  2326. }
  2327. if (record.boStatus) {
  2328. if (
  2329. typeof +record.money == "number" &&
  2330. +record.money >= 0 &&
  2331. +record.money <= 1
  2332. ) {
  2333. record.appropriationRatio = record.money;
  2334. } else {
  2335. message.warning("金额比例填写错误,比例范围0~1");
  2336. return;
  2337. }
  2338. }
  2339. if (!record.dunType && record.dunType != 0) {
  2340. message.warning("请选择对应科目");
  2341. return;
  2342. }
  2343. if (record.dunType != 1) {
  2344. record.waitDay = "";
  2345. }
  2346. this.setState({
  2347. loading: true,
  2348. });
  2349. if (record.boStatus) {
  2350. $.ajax({
  2351. url: globalConfig.context + "/api/admin/newOrderDun/createDun",
  2352. method: "post",
  2353. data: {
  2354. orderNo: record.orderNo,
  2355. tid: record.tid,
  2356. projectType: record.sort,
  2357. dunType: record.dunType,
  2358. appropriationRatio: record.appropriationRatio,
  2359. waitDay: record.waitDay,
  2360. effectiveCount: record.effectiveCount,
  2361. customizeTimes:
  2362. record.dunType == 0 ? record.customizeTimes : undefined,
  2363. customizeName:
  2364. record.dunType == 0 ? record.customizeName : undefined,
  2365. },
  2366. }).done(
  2367. function (data) {
  2368. this.setState({
  2369. loading: false,
  2370. });
  2371. if (!data.error.length) {
  2372. message.success("保存成功!");
  2373. this.setState({
  2374. cuiFlag: false,
  2375. boFlag: false,
  2376. addFlag: false,
  2377. });
  2378. this.jiedianNew(record.orderNo);
  2379. } else {
  2380. message.warning(data.error[0].message);
  2381. }
  2382. }.bind(this)
  2383. );
  2384. } else {
  2385. $.ajax({
  2386. url: globalConfig.context + "/api/admin/newOrderDun/createDun",
  2387. method: "post",
  2388. data: {
  2389. orderNo: record.orderNo,
  2390. tid: record.tid,
  2391. projectType: record.sort,
  2392. dunType: record.dunType,
  2393. money: record.money,
  2394. waitDay: record.waitDay,
  2395. effectiveCount: record.effectiveCount,
  2396. customizeTimes:
  2397. record.dunType == 0 ? record.customizeTimes : undefined,
  2398. customizeName:
  2399. record.dunType == 0 ? record.customizeName : undefined,
  2400. },
  2401. }).done(
  2402. function (data) {
  2403. this.setState({
  2404. loading: false,
  2405. });
  2406. if (!data.error.length) {
  2407. message.success("保存成功!");
  2408. this.setState({
  2409. cuiFlag: false,
  2410. boFlag: false,
  2411. addFlag: false,
  2412. });
  2413. this.jiedianNew(record.orderNo);
  2414. } else {
  2415. message.warning(data.error[0].message);
  2416. }
  2417. }.bind(this)
  2418. );
  2419. }
  2420. },
  2421. //点击新增催款节点
  2422. addcontact() {
  2423. this.state.contactList.push({
  2424. key: this.state.contactList.length,
  2425. money: "",
  2426. dunSubject: undefined,
  2427. orderNo: this.state.orderNo,
  2428. dunTarget: this.state.kehuId,
  2429. });
  2430. this.setState({
  2431. contactList: this.state.contactList,
  2432. });
  2433. },
  2434. //点击新增催款节点
  2435. addcontactNew() {
  2436. this.state.contactListNew.push({
  2437. key: this.state.contactListNew.length,
  2438. money: "",
  2439. dunSubject: undefined,
  2440. orderNo: this.state.orderNo,
  2441. dunTarget: this.state.kehuId,
  2442. });
  2443. this.setState({
  2444. contactListNew: this.state.contactListNew,
  2445. cuiFlag: true,
  2446. });
  2447. },
  2448. //删除收款节点
  2449. confirmDelet(index) {
  2450. this.state.contactList.splice(index, 1);
  2451. this.setState({
  2452. contactList: this.state.contactList,
  2453. });
  2454. this.contactSave();
  2455. },
  2456. //删除收款节点
  2457. confirmDeletNew(index) {
  2458. if (index.id) {
  2459. this.state.contactListNew.splice(index.id, 1);
  2460. this.setState({
  2461. contactListNew: this.state.contactListNew,
  2462. cuiFlag: false,
  2463. addFlag: false,
  2464. boFlag: false,
  2465. });
  2466. $.ajax({
  2467. url: globalConfig.context + "/api/admin/newOrderDun/deleteDun",
  2468. method: "post",
  2469. data: {
  2470. id: index.id,
  2471. },
  2472. }).done(
  2473. function (data) {
  2474. this.setState({
  2475. loading: false,
  2476. });
  2477. if (!data.error.length) {
  2478. message.success("删除成功!");
  2479. this.setState({
  2480. cuiFlag: false,
  2481. });
  2482. this.jiedianNew(this.state.orderNo);
  2483. } else {
  2484. message.warning(data.error[0].message);
  2485. }
  2486. }.bind(this)
  2487. );
  2488. } else {
  2489. this.state.contactListNew.splice(index.key, 1);
  2490. this.setState({
  2491. contactListNew: this.state.contactListNew,
  2492. cuiFlag: false,
  2493. addFlag: false,
  2494. boFlag: false,
  2495. });
  2496. }
  2497. },
  2498. handleOk() {
  2499. this.setState({
  2500. visible: false,
  2501. mark: false,
  2502. });
  2503. this.props.closeDesc(false, true);
  2504. },
  2505. handleCancel() {
  2506. if (this.state.orderType == undefined) {
  2507. return false;
  2508. }
  2509. if (!this.state.autoId) {
  2510. return false;
  2511. }
  2512. this.setState({
  2513. visible: false,
  2514. mark: false,
  2515. });
  2516. this.props.closeDesc(false);
  2517. },
  2518. handleCancelclose() {
  2519. this.setState(
  2520. {
  2521. visible: false,
  2522. mark: false,
  2523. cuiFlag: false,
  2524. addFlag: false,
  2525. boFlag: false,
  2526. isJilu: false,
  2527. },
  2528. () => {
  2529. this.setState({
  2530. activeKey: "1",
  2531. });
  2532. }
  2533. );
  2534. this.props.closeDesc(false);
  2535. this.reset();
  2536. },
  2537. //点击签单
  2538. handleCancels() {
  2539. this.setState({
  2540. isSubmit: 1,
  2541. });
  2542. },
  2543. //点击保存
  2544. handleCancelq() {
  2545. this.setState({
  2546. isSubmit: 0,
  2547. });
  2548. },
  2549. //删除
  2550. delectRow(record) {
  2551. this.setState({
  2552. loading: true,
  2553. });
  2554. $.ajax({
  2555. method: "post",
  2556. dataType: "json",
  2557. crossDomain: false,
  2558. url: globalConfig.context + "/api/admin/newOrder/deleteOrderTask",
  2559. data: {
  2560. id: record.id,
  2561. },
  2562. }).done(
  2563. function (data) {
  2564. if (!data.error.length) {
  2565. message.success("删除成功!");
  2566. this.setState({
  2567. loading: false,
  2568. });
  2569. this.jiedian(this.state.orderNo);
  2570. this.jiedianNew(this.state.orderNo);
  2571. // this.loaduser();
  2572. this.loadData();
  2573. } else {
  2574. message.warning(data.error[0].message);
  2575. }
  2576. }.bind(this)
  2577. );
  2578. },
  2579. nextCancel() {
  2580. this.setState(
  2581. {
  2582. changeVisible: false,
  2583. projectOperationVisible: false,
  2584. gid: "",
  2585. dataInfor: {},
  2586. },
  2587. () => {
  2588. this.loadData();
  2589. }
  2590. );
  2591. },
  2592. rizhi() {
  2593. this.setState({
  2594. loading: true,
  2595. });
  2596. $.ajax({
  2597. method: "get",
  2598. dataType: "json",
  2599. crossDomain: false,
  2600. url: "/api/admin/newOrder/selectOrderLog",
  2601. data: {
  2602. orderNo: this.props.datauser.orderNo,
  2603. },
  2604. success: function (data) {
  2605. let theArr = [];
  2606. let thisData = data.data;
  2607. if (!thisData.length) {
  2608. if (data.error && data.error.length) {
  2609. message.warning(data.error[0].message);
  2610. }
  2611. thisData = {};
  2612. } else {
  2613. for (let i = 0; i < data.data.length; i++) {
  2614. let thisdata = data.data[i];
  2615. theArr.push({
  2616. processName: thisdata.processName,
  2617. adminName: thisdata.adminName,
  2618. createDate: thisdata.createDate,
  2619. remarks: thisdata.remarks,
  2620. });
  2621. }
  2622. }
  2623. this.setState({
  2624. dataSourcerizhi: theArr,
  2625. });
  2626. }.bind(this),
  2627. }).always(
  2628. function () {
  2629. this.setState({
  2630. loading: false,
  2631. });
  2632. }.bind(this)
  2633. );
  2634. },
  2635. //查看订单日志
  2636. getOrderLog() {
  2637. this.setState({
  2638. rizhivisible: true,
  2639. });
  2640. this.rizhi();
  2641. },
  2642. closeOrderLog() {
  2643. this.setState({
  2644. rizhivisible: false,
  2645. });
  2646. },
  2647. callback(key) {
  2648. this.setState({
  2649. activeKey: key,
  2650. });
  2651. if (key === "1") {
  2652. this.jiedian(this.props.datauser.orderNo);
  2653. this.jiedianNew(this.props.datauser.orderNo);
  2654. this.loaduser();
  2655. // this.loaduser();
  2656. }
  2657. if (key === "3") {
  2658. this.getChangeData();
  2659. }
  2660. if (key === "2" || key === "3") {
  2661. let url = window.location.href.substring(7);
  2662. $.ajax({
  2663. method: "get",
  2664. dataType: "json",
  2665. crossDomain: false,
  2666. url:
  2667. globalConfig.context + "/api/admin/orderChange/orderChangeDetails",
  2668. data: {
  2669. orderNo: this.props.datauser.orderNo,
  2670. },
  2671. success: function (data) {
  2672. if (data.data && data.data.length) {
  2673. let thisdata = data.data[data.data.length - 1];
  2674. if (
  2675. thisdata.status === 0 ||
  2676. (thisdata.processState == 0 && thisdata.status != 5)
  2677. ) {
  2678. this.setState({
  2679. changeId: thisdata.id,
  2680. typeChange: thisdata.type,
  2681. totalAmount: thisdata.totalAmount,
  2682. settlementAmount: thisdata.settlementAmount,
  2683. changeAmount: thisdata.changeAmount,
  2684. remarksC: thisdata.remarks,
  2685. startRemarks: thisdata.zxsRemarks,
  2686. isCaoGao: true,
  2687. arrears: thisdata.arrears,
  2688. changeFlag: true,
  2689. createTimes: thisdata.createTimes,
  2690. voucherUrl: thisdata.voucherUrl
  2691. ? splitUrl(
  2692. thisdata.voucherUrl,
  2693. ",",
  2694. globalConfig.avatarHost + "/upload",
  2695. url
  2696. )
  2697. : [],
  2698. processState: thisdata.processState,
  2699. status: thisdata.status,
  2700. });
  2701. this.proList();
  2702. this.cuiList();
  2703. let e = thisdata.type;
  2704. if (e == 1) {
  2705. this.setState({
  2706. hetongFlag: false,
  2707. listFlag: false,
  2708. listCuiFlag: false,
  2709. tuiKuanFlag: false,
  2710. displayList: false,
  2711. });
  2712. } else if (e == 2) {
  2713. this.setState({
  2714. hetongFlag: true,
  2715. listFlag: false,
  2716. listCuiFlag: false,
  2717. tuiKuanFlag: true,
  2718. displayList: false,
  2719. });
  2720. } else if (e == 3) {
  2721. this.setState({
  2722. listFlag: false,
  2723. hetongFlag: false,
  2724. listCuiFlag: false,
  2725. tuiKuanFlag: false,
  2726. displayList: true,
  2727. });
  2728. } else if (e == 4) {
  2729. this.setState({
  2730. listFlag: false,
  2731. listCuiFlag: false,
  2732. hetongFlag: false,
  2733. tuiKuanFlag: true,
  2734. displayList: false,
  2735. });
  2736. } else if (e == 5) {
  2737. this.setState({
  2738. listFlag: false,
  2739. listCuiFlag: false,
  2740. hetongFlag: true,
  2741. tuiKuanFlag: true,
  2742. displayList: false,
  2743. });
  2744. } else {
  2745. this.setState({
  2746. listFlag: true,
  2747. hetongFlag: true,
  2748. listCuiFlag: true,
  2749. tuiKuanFlag: false,
  2750. displayList: false,
  2751. });
  2752. }
  2753. } else {
  2754. this.setState({
  2755. listFlag: false,
  2756. hetongFlag: false,
  2757. listCuiFlag: false,
  2758. tuiKuanFlag: false,
  2759. displayList: false,
  2760. // 置空
  2761. changeId: undefined,
  2762. isCaoGao: false,
  2763. });
  2764. }
  2765. } else {
  2766. this.setState({
  2767. isCaoGao: false,
  2768. });
  2769. }
  2770. }.bind(this),
  2771. });
  2772. }
  2773. },
  2774. cuiList(id) {
  2775. this.setState({
  2776. loadData: true,
  2777. });
  2778. $.ajax({
  2779. method: "get",
  2780. dataType: "json",
  2781. crossDomain: false,
  2782. url: globalConfig.context + "/api/admin/orderChange/selectChangeDun",
  2783. data: {
  2784. id: id || this.state.changeId,
  2785. },
  2786. success: function (data) {
  2787. this.setState({
  2788. cuiDataSource: data.data,
  2789. });
  2790. if (data.data && data.data.length) {
  2791. if (id) {
  2792. this.setState({
  2793. listCuiFlag: true,
  2794. });
  2795. }
  2796. this.setState({
  2797. cuiDataSource: data.data,
  2798. });
  2799. this.setState({
  2800. loadData: false,
  2801. });
  2802. } else if (data.error && data.error.length) {
  2803. message.warning(data.error[0].message);
  2804. this.setState({
  2805. loadData: false,
  2806. });
  2807. }
  2808. }.bind(this),
  2809. });
  2810. },
  2811. proList(id) {
  2812. this.setState({
  2813. loadData: true,
  2814. });
  2815. $.ajax({
  2816. method: "get",
  2817. dataType: "json",
  2818. crossDomain: false,
  2819. url: globalConfig.context + "/api/admin/orderChange/selectChangeTask",
  2820. data: {
  2821. id: id || this.state.changeId,
  2822. },
  2823. success: function (data) {
  2824. if (data.data && data.data.length) {
  2825. if (id) {
  2826. this.setState({
  2827. listFlag: true,
  2828. });
  2829. }
  2830. data.data.forEach((item, index) => {
  2831. item.key = index;
  2832. });
  2833. this.setState({
  2834. proDataSource: data.data,
  2835. });
  2836. this.setState({
  2837. loadData: false,
  2838. });
  2839. } else if (data.error && data.error.length) {
  2840. message.warning(data.error[0].message);
  2841. this.setState({
  2842. loadData: false,
  2843. });
  2844. }
  2845. }.bind(this),
  2846. });
  2847. },
  2848. logList(id) {
  2849. this.setState({
  2850. loading: true,
  2851. });
  2852. $.ajax({
  2853. method: "get",
  2854. dataType: "json",
  2855. async: false,
  2856. crossDomain: false,
  2857. url: globalConfig.context + "/api/admin/orderChange/orderChangeLogList",
  2858. data: {
  2859. changeId: id,
  2860. },
  2861. success: function (data) {
  2862. if (data.error.length || data.data.list == "") {
  2863. if (data.error && data.error.length) {
  2864. message.warning(data.error[0].message);
  2865. this.setState({
  2866. loading: false,
  2867. });
  2868. }
  2869. } else {
  2870. this.setState({
  2871. logData: data.data,
  2872. loading: false,
  2873. });
  2874. }
  2875. }.bind(this),
  2876. });
  2877. },
  2878. getOrgCodeUrl(e) {
  2879. this.setState({ orgCodeUrl: e });
  2880. },
  2881. getReplenishUrl(e) {
  2882. this.setState({ replenishUrl: e });
  2883. },
  2884. getContentUrl(e) {
  2885. this.setState({ contentUrl: e });
  2886. },
  2887. getVoucherUrl(e) {
  2888. this.setState({ voucherUrl: e });
  2889. },
  2890. //加载(自动补全)
  2891. supervisor(e, state) {
  2892. //客户名称与服务名称自动补全
  2893. let api = state
  2894. ? "/api/admin/customer/getCustomerByName"
  2895. : "/api/admin/order/getBusinessProjectByName";
  2896. $.ajax({
  2897. method: "get",
  2898. dataType: "json",
  2899. crossDomain: false,
  2900. url: globalConfig.context + api,
  2901. data: state
  2902. ? {
  2903. name: e,
  2904. type: this.state.userType,
  2905. }
  2906. : {
  2907. businessName: e,
  2908. },
  2909. success: function (data) {
  2910. let thedata = data.data;
  2911. if (!thedata) {
  2912. if (data.error && data.error.length) {
  2913. message.warning(data.error[0].message);
  2914. }
  2915. thedata = {};
  2916. }
  2917. this.setState({
  2918. states: state,
  2919. customerArr: thedata,
  2920. });
  2921. }.bind(this),
  2922. }).always(
  2923. function () {
  2924. this.setState({
  2925. loading: false,
  2926. });
  2927. }.bind(this)
  2928. );
  2929. },
  2930. // 渠道查询
  2931. selectChannel(e) {
  2932. $.ajax({
  2933. method: "get",
  2934. dataType: "json",
  2935. crossDomain: false,
  2936. url: globalConfig.context + "/api/admin/customer/selectChannelUserList",
  2937. data: {
  2938. name: e,
  2939. },
  2940. success: function (data) {
  2941. let thedata = data.data;
  2942. if (!thedata) {
  2943. if (data.error && data.error.length) {
  2944. message.warning(data.error[0].message);
  2945. }
  2946. thedata = {};
  2947. }
  2948. this.setState({
  2949. channelArr: thedata,
  2950. });
  2951. }.bind(this),
  2952. }).always(
  2953. function () {
  2954. this.setState({
  2955. loading: false,
  2956. });
  2957. }.bind(this)
  2958. );
  2959. },
  2960. supervisorCui(e) {
  2961. //客户名称与服务名称自动补全
  2962. let api = "/api/admin/order/getBusinessProjectByName";
  2963. $.ajax({
  2964. method: "get",
  2965. dataType: "json",
  2966. crossDomain: false,
  2967. url: globalConfig.context + api,
  2968. data: {
  2969. businessName: e,
  2970. },
  2971. success: function (data) {
  2972. let thedata = data.data;
  2973. if (!thedata) {
  2974. if (data.error && data.error.length) {
  2975. message.warning(data.error[0].message);
  2976. }
  2977. thedata = {};
  2978. }
  2979. this.setState({
  2980. customerCuiArr: thedata,
  2981. });
  2982. }.bind(this),
  2983. }).always(
  2984. function () {
  2985. this.setState({
  2986. loading: false,
  2987. });
  2988. }.bind(this)
  2989. );
  2990. },
  2991. //上级主管输入框失去焦点是判断客户是否存在
  2992. selectAuto(value) {
  2993. let kid = [];
  2994. let fwList = this.state.customerArr;
  2995. fwList.map(function (item) {
  2996. if (value == item.bname) {
  2997. kid = item;
  2998. }
  2999. });
  3000. if (kid.type == "1") {
  3001. this.setState({
  3002. displayFees: "block",
  3003. });
  3004. } else {
  3005. this.setState({
  3006. displayFees: "none",
  3007. });
  3008. }
  3009. //0通用 1专利 2软著 3审计 4双软 5高新 6商标
  3010. this.setState({
  3011. commodityName: value,
  3012. gid: kid.id,
  3013. addProjectType: kid.type,
  3014. isIso: value.indexOf("贯标") !== -1, // 是否为贯标项目
  3015. //commodityPrice:kid.price==0?kid.price.toString():kid.price,
  3016. commodityFirstPayment:
  3017. kid.firstPayment == 0
  3018. ? kid.firstPayment.toString()
  3019. : kid.firstPayment,
  3020. });
  3021. },
  3022. selectAutoCui(value) {
  3023. let kid = [];
  3024. let fwList = this.state.customerCuiArr;
  3025. fwList.map(function (item) {
  3026. if (value == item.bname) {
  3027. kid = item;
  3028. }
  3029. });
  3030. this.setState({
  3031. commodityNameCui: value,
  3032. cid: kid.id,
  3033. //commodityPrice:kid.price==0?kid.price.toString():kid.price,
  3034. commodityFirstPayment:
  3035. kid.firstPayment == 0
  3036. ? kid.firstPayment.toString()
  3037. : kid.firstPayment,
  3038. });
  3039. },
  3040. //客户
  3041. selectAutoCUT(value) {
  3042. let autoIds;
  3043. let fwList = this.state.customerArr;
  3044. fwList.map(function (item) {
  3045. if (value == item.name) {
  3046. autoIds = item.id;
  3047. }
  3048. });
  3049. this.setState({
  3050. customerName: value,
  3051. autoId: autoIds,
  3052. });
  3053. },
  3054. goSelect(value) {
  3055. let channelid;
  3056. let fwList = this.state.channelArr;
  3057. fwList.map(function (item) {
  3058. if (value == item.name) {
  3059. channelid = item.id;
  3060. }
  3061. });
  3062. this.setState({
  3063. channelname: value,
  3064. channelid: channelid,
  3065. });
  3066. },
  3067. //服务值改变时请求客户名称
  3068. httpChange(e) {
  3069. this.state.gid = "";
  3070. if (e.length >= 1) {
  3071. this.supervisor(e, false);
  3072. }
  3073. this.setState({
  3074. commodityName: e,
  3075. });
  3076. },
  3077. httpChangeCui(e) {
  3078. if (e.length >= 1) {
  3079. this.supervisorCui(e, false);
  3080. }
  3081. this.setState({
  3082. commodityNameCui: e,
  3083. });
  3084. },
  3085. //客户名称自动补全
  3086. customerChange(e) {
  3087. if (this.state.userType) {
  3088. this.state.autoId = "";
  3089. if (e.length >= 2) {
  3090. this.supervisor(e, true);
  3091. }
  3092. this.setState({
  3093. customerName: e,
  3094. });
  3095. } else {
  3096. this.setState({
  3097. customerName: "",
  3098. });
  3099. message.warning("客户所属类型必须指定");
  3100. }
  3101. },
  3102. //渠道名称自动补全
  3103. channelChange(e) {
  3104. this.setState({
  3105. channelName: e
  3106. })
  3107. if (e.length >= 2) {
  3108. this.selectChannel(e);
  3109. }
  3110. },
  3111. //点击添加项目明细
  3112. addDetailed() {
  3113. this.setState({
  3114. projectOperationVisible: true,
  3115. });
  3116. },
  3117. //点击打卡项目详情
  3118. tableRowClick(record) {
  3119. this.setState({
  3120. projectOperationVisible: true,
  3121. dataInfor: record,
  3122. });
  3123. },
  3124. //签单时间选择
  3125. selTime(e, index) {
  3126. this.setState({
  3127. entryTime: e,
  3128. signDate: e,
  3129. selTime: index,
  3130. });
  3131. },
  3132. //退单操作
  3133. //点击退单
  3134. tuikuan() {
  3135. this.setState({
  3136. lookVisible: true,
  3137. contractUrl: [],
  3138. applicationUrl: [],
  3139. reason: "",
  3140. });
  3141. },
  3142. //关闭退单
  3143. noCancel() {
  3144. this.setState({
  3145. lookVisible: false,
  3146. });
  3147. },
  3148. //点击确认退单
  3149. tuidanOk() {
  3150. let contractUrls = [];
  3151. let applicationUrls = [];
  3152. if (this.state.contractUrl.length) {
  3153. let picArr = [];
  3154. this.state.contractUrl.map(function (item) {
  3155. if (
  3156. item.response &&
  3157. item.response.data &&
  3158. item.response.data.length
  3159. ) {
  3160. picArr.push(item.response.data);
  3161. }
  3162. });
  3163. contractUrls = picArr.join(",");
  3164. }
  3165. if (this.state.applicationUrl.length) {
  3166. let picArr = [];
  3167. this.state.applicationUrl.map(function (item) {
  3168. if (
  3169. item.response &&
  3170. item.response.data &&
  3171. item.response.data.length
  3172. ) {
  3173. picArr.push(item.response.data);
  3174. }
  3175. });
  3176. applicationUrls = picArr.join(",");
  3177. }
  3178. $.ajax({
  3179. method: "POST",
  3180. dataType: "json",
  3181. crossDomain: false,
  3182. url: globalConfig.context + "/api/admin/newOrder/addOrderRefund",
  3183. data: {
  3184. orderNo: this.state.orderNo, //订单编号
  3185. contractUrl: contractUrls.length ? contractUrls : "", //终止合同
  3186. applicationUrl: applicationUrls.length ? applicationUrls : "", //退单申请表
  3187. reason: this.state.reason, //退单原因
  3188. },
  3189. }).done(
  3190. function (data) {
  3191. this.setState({
  3192. loading: false,
  3193. });
  3194. if (!data.error.length) {
  3195. message.success("退单成功!");
  3196. this.noCancel();
  3197. this.handleCancelclose();
  3198. } else {
  3199. message.warning(data.error[0].message);
  3200. }
  3201. }.bind(this)
  3202. );
  3203. },
  3204. //开单选择订单类型骚操作
  3205. orderTypeFn(e) {
  3206. if (e == 0) {
  3207. this.setState({
  3208. bussStats: true,
  3209. orderType: e,
  3210. });
  3211. this.category();
  3212. } else {
  3213. this.setState({
  3214. contractType: undefined,
  3215. bussStats: false,
  3216. orderType: e,
  3217. });
  3218. }
  3219. },
  3220. //品类数据获取
  3221. category() {
  3222. $.ajax({
  3223. method: "get",
  3224. dataType: "json",
  3225. crossDomain: false,
  3226. url: globalConfig.context + "/api/admin/Varieties/getSuperList",
  3227. data: {},
  3228. success: function (data) {
  3229. let thedata = data.data;
  3230. let theArr = [];
  3231. if (!thedata) {
  3232. if (data.error && data.error.length) {
  3233. message.warning(data.error[0].message);
  3234. }
  3235. thedata = {};
  3236. } else {
  3237. thedata.map(function (item, index) {
  3238. theArr.push({
  3239. key: index,
  3240. name: item.cname,
  3241. id: item.id,
  3242. });
  3243. });
  3244. }
  3245. this.setState({
  3246. contractType: undefined,
  3247. categoryArr: theArr,
  3248. });
  3249. }.bind(this),
  3250. });
  3251. },
  3252. //变更申请
  3253. changeApply() {
  3254. if (
  3255. this.state.typeChange == undefined ||
  3256. (this.state.typeChange == "" && this.state.typeChange != 0)
  3257. ) {
  3258. message.warning("请选择变更类型");
  3259. return false;
  3260. }
  3261. if (
  3262. this.state.typeChange == 0 ||
  3263. this.state.typeChange == 1 ||
  3264. this.state.typeChange == 3
  3265. ) {
  3266. if (this.state.settlementAmount < this.state.changeAmount) {
  3267. message.warning("退款金额大于已收款金额");
  3268. return;
  3269. }
  3270. }
  3271. if (this.state.processStatus != 5 && this.state.processStatus != 6) {
  3272. message.warning("当前订单流程不能发起变更!");
  3273. return false;
  3274. }
  3275. if (this.state.changeAmount === "") {
  3276. message.warning("申请退款金额不能为空!");
  3277. return false;
  3278. }
  3279. if (this.state.remarksC == "") {
  3280. message.warning("请正确填写变更原因");
  3281. return false;
  3282. }
  3283. if (this.state.startRemarks == "") {
  3284. message.warning("请正确填写备注信息");
  3285. return false;
  3286. }
  3287. let theorgCodeUrl = [];
  3288. if (this.state.voucherUrl.length) {
  3289. let picArr = [];
  3290. this.state.voucherUrl.map(function (item) {
  3291. if (
  3292. item.response &&
  3293. item.response.data &&
  3294. item.response.data.length
  3295. ) {
  3296. picArr.push(item.response.data);
  3297. }
  3298. });
  3299. theorgCodeUrl = picArr.join(",");
  3300. }
  3301. this.setState({
  3302. loading: true,
  3303. });
  3304. if (this.state.typeChange == 0) {
  3305. $.ajax({
  3306. method: "post",
  3307. dataType: "json",
  3308. crossDomain: false,
  3309. url: globalConfig.context + "/api/admin/orderChange/addOrderChange",
  3310. data: {
  3311. orderNo: this.state.orderNo, //订单编号
  3312. processState: 1,
  3313. status: 1,
  3314. startRemarks: this.state.startRemarks,
  3315. remarks: this.state.remarksC,
  3316. voucherUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
  3317. totalAmount: this.state.totalAmount,
  3318. settlementAmount: this.state.settlementAmount,
  3319. changeAmount: this.state.changeAmount,
  3320. applicant: this.state.salesmanName,
  3321. depName: this.state.depName,
  3322. type: this.state.typeChange,
  3323. },
  3324. }).done(
  3325. function (data) {
  3326. this.setState({
  3327. loading: false,
  3328. });
  3329. if (!data.error.length) {
  3330. message.success("发起变更成功");
  3331. this.handleCancelclose();
  3332. } else {
  3333. message.warning(data.error[0].message);
  3334. this.setState({
  3335. loading: false,
  3336. });
  3337. }
  3338. }.bind(this)
  3339. );
  3340. } else {
  3341. $.ajax({
  3342. method: "post",
  3343. dataType: "json",
  3344. crossDomain: false,
  3345. url: globalConfig.context + "/api/admin/orderChange/addOrderChange",
  3346. data: {
  3347. orderNo: this.state.orderNo, //订单编号
  3348. processState: 0,
  3349. status: 0,
  3350. startRemarks: this.state.startRemarks,
  3351. remarks: this.state.remarksC,
  3352. voucherUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
  3353. totalAmount: this.state.totalAmount,
  3354. settlementAmount: this.state.settlementAmount,
  3355. changeAmount: this.state.changeAmount,
  3356. applicant: this.state.salesmanName,
  3357. depName: this.state.depName,
  3358. type: this.state.typeChange,
  3359. },
  3360. }).done(
  3361. function (data) {
  3362. this.setState({
  3363. loading: false,
  3364. });
  3365. if (!data.error.length) {
  3366. message.success("发起变更草稿");
  3367. this.setState(
  3368. {
  3369. isCaoGao: true,
  3370. loading: false,
  3371. },
  3372. () => {
  3373. this.callback("2");
  3374. }
  3375. );
  3376. } else {
  3377. message.warning(data.error[0].message);
  3378. }
  3379. }.bind(this)
  3380. );
  3381. }
  3382. },
  3383. reset() {
  3384. this.setState({
  3385. startRemarks: "",
  3386. remarksC: "",
  3387. voucherUrl: [],
  3388. totalAmount: undefined,
  3389. settlementAmount: undefined,
  3390. changeAmount: "0",
  3391. applicant: undefined,
  3392. depNameChange: undefined,
  3393. typeChange: undefined,
  3394. displayFees: "none",
  3395. officialCost: "",
  3396. costReduction: "",
  3397. });
  3398. },
  3399. componentWillReceiveProps(nextProps) {
  3400. //props改变时触发
  3401. this.state.visible = nextProps.showDesc;
  3402. this.state.signBillVisible = nextProps.signBillVisible;
  3403. if (this.state.signBillVisible) {
  3404. this.loaduser(nextProps.uid);
  3405. this.assistList(nextProps.uid);
  3406. this.orderServiceList(nextProps.uid);
  3407. // this.publicByOrder(nextProps.uid);
  3408. }
  3409. if (nextProps.userDetaile && nextProps.showDesc) {
  3410. this.loaduser(nextProps.datauser);
  3411. this.assistList(nextProps.datauser);
  3412. this.orderServiceList(nextProps.datauser);
  3413. // this.publicByOrder(nextProps.datauser);
  3414. this.jiedian(nextProps.datauser.orderNo);
  3415. this.jiedianNew(nextProps.datauser.orderNo);
  3416. this.loadData(nextProps.datauser);
  3417. this.getChangeData(nextProps.datauser);
  3418. } else {
  3419. this.setState({
  3420. orderType: undefined,
  3421. customerName: "",
  3422. autoId: "",
  3423. customerArr: [],
  3424. contractType: undefined,
  3425. bussStats: false,
  3426. userType: undefined,
  3427. channelName: "",
  3428. channelid: "",
  3429. channelArr: [],
  3430. selectSales: undefined,
  3431. });
  3432. }
  3433. },
  3434. //查看变更记录
  3435. getChangeData(record) {
  3436. this.setState({
  3437. loading: true,
  3438. });
  3439. $.ajax({
  3440. method: "get",
  3441. dataType: "json",
  3442. crossDomain: false,
  3443. url: globalConfig.context + "/api/admin/orderChange/orderChangeDetails",
  3444. data: {
  3445. orderNo: record ? record.orderNo : this.props.datauser.orderNo,
  3446. },
  3447. success: function (data) {
  3448. this.setState({
  3449. loading: false,
  3450. });
  3451. let url = window.location.href.substring(7);
  3452. if (data.data && data.data.length) {
  3453. let thisdata = data.data[data.data.length - 1];
  3454. thisdata.typeChange = thisdata.type;
  3455. thisdata.remarksC = thisdata.remarks;
  3456. thisdata.startRemarks = thisdata.zxsRemarks;
  3457. thisdata.voucherUrl = thisdata.voucherUrl
  3458. ? splitUrl(
  3459. thisdata.voucherUrl,
  3460. ",",
  3461. globalConfig.avatarHost + "/upload",
  3462. url
  3463. )
  3464. : [];
  3465. this.proList(thisdata.id);
  3466. this.cuiList(thisdata.id);
  3467. this.logList(thisdata.id);
  3468. this.setState({
  3469. //判断是否有合同变更记录
  3470. isJilu: true,
  3471. detailChange: thisdata,
  3472. });
  3473. }
  3474. }.bind(this),
  3475. });
  3476. },
  3477. showConfirm(fn, record) {
  3478. confirm({
  3479. title: "确定删除此项目吗?",
  3480. content: (
  3481. <span style={{ color: "red" }}>
  3482. 删除后会将该项目下的所有催款节点自动清除!!!
  3483. </span>
  3484. ),
  3485. onOk() {
  3486. fn(record);
  3487. },
  3488. onCancel() { },
  3489. });
  3490. },
  3491. viewConfirm(fn, record) {
  3492. confirm({
  3493. title: "确定删除此服务记录吗?",
  3494. // content: (
  3495. // <span style={{ color: "red" }}>
  3496. // 删除后会将该项目下的所有催款节点自动清除!!!
  3497. // </span>
  3498. // ),
  3499. onOk() {
  3500. fn(record);
  3501. },
  3502. onCancel() { },
  3503. });
  3504. },
  3505. changeAddPro() {
  3506. this.getpatentTypeList();
  3507. this.setState({
  3508. changeVisible: true,
  3509. gid: "",
  3510. customerArr: [],
  3511. commodityName: "",
  3512. commodityQuantity: "",
  3513. commodityId: "",
  3514. taskComment: "",
  3515. main: undefined,
  3516. commodityPrice: "",
  3517. displayFees: "none",
  3518. officialCost: "",
  3519. costReduction: "",
  3520. });
  3521. },
  3522. changeProSubmit() {
  3523. if (this.state.gid == undefined || !this.state.gid) {
  3524. message.warning("服务名称不匹配!");
  3525. return
  3526. }
  3527. let reg = /^([0]|[1-9][0-9]*)$/;
  3528. if (
  3529. !this.state.commodityQuantity ||
  3530. !reg.test(this.state.commodityQuantity)
  3531. ) {
  3532. message.warning("请输入正确商品数量!");
  3533. return
  3534. }
  3535. if (this.state.displayFees === 'block') {
  3536. if (this.state.patentType === "" && !this.state.patentTransfer) {
  3537. message.warning("请选择专利类型!");
  3538. return
  3539. }
  3540. if (this.state.officialCost === '') {
  3541. message.warning("请选择官费!");
  3542. return
  3543. }
  3544. if (this.state.costReduction === "" && (this.state.patentType === 0 || this.state.patentType === 2) && this.state.officialCost === 1) {
  3545. message.warning("请选择费减!");
  3546. return
  3547. }
  3548. }
  3549. if (!this.state.commodityPrice) {
  3550. message.warning("请输入金额!");
  3551. return
  3552. }
  3553. if (!this.state.main) {
  3554. message.warning("请选择是否为主要项目!");
  3555. return
  3556. }
  3557. this.setState({
  3558. loading: true,
  3559. });
  3560. let type = 0;
  3561. if (this.state.typeChange == 4 || this.state.typeChange == 5) {
  3562. type = 1;
  3563. }
  3564. $.ajax({
  3565. method: "post",
  3566. dataType: "json",
  3567. crossDomain: false,
  3568. url: globalConfig.context + "/api/admin/orderChange/addChangeTask",
  3569. data: {
  3570. commodityId: this.state.gid, //商品ID
  3571. orderNo: this.props.datauser.orderNo, //订单编号
  3572. commodityName: this.state.commodityName, //商品名称
  3573. commodityQuantity: this.state.commodityQuantity, //商品数量
  3574. commodityPrice: this.state.commodityPrice, //签单总价
  3575. taskComment: this.state.taskComment, //服务说明
  3576. main: this.state.main, //是否为主要项目
  3577. cid: this.state.changeId, //变更ID
  3578. officialCost:
  3579. this.state.displayFees === "block" ? this.state.officialCost : "", //是否有官费
  3580. costReduction:
  3581. this.state.displayFees === "block" ? this.state.costReduction : "", //是否有费减
  3582. type,
  3583. },
  3584. success: function (data) {
  3585. let theArr = [];
  3586. if (data.error && data.error.length) {
  3587. message.warning(data.error[0].message);
  3588. } else {
  3589. message.success("保存成功");
  3590. this.nextCancel();
  3591. this.proList();
  3592. }
  3593. }.bind(this),
  3594. }).always(
  3595. function () {
  3596. this.setState({
  3597. loading: false,
  3598. });
  3599. }.bind(this)
  3600. );
  3601. },
  3602. changeDeletePro(record) {
  3603. this.setState({
  3604. loading: true,
  3605. });
  3606. $.ajax({
  3607. method: "post",
  3608. dataType: "json",
  3609. crossDomain: false,
  3610. url: globalConfig.context + "/api/admin/orderChange/updateChangeTask",
  3611. data: {
  3612. id: record.id,
  3613. type: 3,
  3614. tid: record.tid,
  3615. splitStatus: record.splitStatus,
  3616. },
  3617. success: function (data) {
  3618. let theArr = [];
  3619. if (data.error && data.error.length) {
  3620. message.warning(data.error[0].message);
  3621. } else {
  3622. message.success("删除成功");
  3623. this.proList();
  3624. this.cuiList();
  3625. }
  3626. }.bind(this),
  3627. }).always(
  3628. function () {
  3629. this.setState({
  3630. loading: false,
  3631. });
  3632. }.bind(this)
  3633. );
  3634. },
  3635. //点击新增变更催款节点
  3636. changeAddCui() {
  3637. this.state.cuiDataSource.push({
  3638. key: this.state.cuiDataSource.length,
  3639. money: "",
  3640. dunSubject: undefined,
  3641. orderNo: this.state.orderNo,
  3642. dunTarget: this.state.kehuId,
  3643. });
  3644. this.setState({
  3645. cuiDataSource: this.state.cuiDataSource,
  3646. cuiFlag: true,
  3647. });
  3648. },
  3649. //删除变更收款节点
  3650. changeDeleteCui(index) {
  3651. if (index.id) {
  3652. this.state.cuiDataSource.splice(index.id, 1);
  3653. this.setState({
  3654. contactListNew: this.state.cuiDataSource,
  3655. cuiFlag: false,
  3656. addFlag: false,
  3657. boFlag: false,
  3658. });
  3659. $.ajax({
  3660. url: globalConfig.context + "/api/admin/orderChange/updateChangeDun",
  3661. method: "post",
  3662. data: {
  3663. id: index.id,
  3664. type: 3,
  3665. tid: index.tid,
  3666. did: index.did,
  3667. },
  3668. }).done(
  3669. function (data) {
  3670. this.setState({
  3671. loading: false,
  3672. });
  3673. if (!data.error.length) {
  3674. message.success("删除成功!");
  3675. this.setState({
  3676. cuiFlag: false,
  3677. });
  3678. this.cuiList();
  3679. this.proList();
  3680. } else {
  3681. message.warning(data.error[0].message);
  3682. }
  3683. }.bind(this)
  3684. );
  3685. } else {
  3686. this.state.cuiDataSource.splice(index.key, 1);
  3687. this.setState({
  3688. cuiDataSource: this.state.cuiDataSource,
  3689. cuiFlag: false,
  3690. addFlag: false,
  3691. boFlag: false,
  3692. });
  3693. }
  3694. },
  3695. changeSaveCui(record) {
  3696. if (record.dunType == 0) {
  3697. if (!record.customizeTimes) {
  3698. message.warning("请输入自定义时间");
  3699. return;
  3700. } else if (!record.customizeName) {
  3701. message.warning("请输入自定义科目");
  3702. return;
  3703. }
  3704. }
  3705. if (record.boStatus == "false") {
  3706. record.boStatus = false;
  3707. } else if (record.boStatus == "true") {
  3708. record.boStatus = true;
  3709. }
  3710. if (!this.state.yearFlag) {
  3711. if (!record.effectiveCount) {
  3712. message.warning("请选择服务年限");
  3713. return;
  3714. }
  3715. } else {
  3716. record.effectiveCount = "";
  3717. }
  3718. if (isNaN(parseInt(record.money)) && !record.boStatus) {
  3719. message.warning("请填写金额");
  3720. return;
  3721. } else if (isNaN(parseInt(record.money)) && record.boStatus) {
  3722. message.warning("请填写比例");
  3723. return;
  3724. }
  3725. if (record.boStatus) {
  3726. if (
  3727. typeof +record.money == "number" &&
  3728. +record.money >= 0 &&
  3729. +record.money <= 1
  3730. ) {
  3731. record.appropriationRatio = record.money;
  3732. } else {
  3733. message.warning("金额比例填写错误,比例范围0~1");
  3734. return;
  3735. }
  3736. }
  3737. if (!record.dunType && record.dunType != 0) {
  3738. message.warning("请选择对应科目");
  3739. return;
  3740. }
  3741. if (record.dunType != 1) {
  3742. record.waitDay = "";
  3743. }
  3744. this.setState({
  3745. loading: true,
  3746. });
  3747. if (record.boStatus) {
  3748. $.ajax({
  3749. url: globalConfig.context + "/api/admin/orderChange/addChangeDun",
  3750. method: "post",
  3751. data: {
  3752. orderNo: record.orderNo,
  3753. ctid: record.ctid,
  3754. projectType: record.sort,
  3755. dunType: record.dunType,
  3756. appropriationRatio: record.appropriationRatio,
  3757. waitDay: record.waitDay,
  3758. effectiveCount: record.effectiveCount,
  3759. cid: this.state.changeId, //变更ID
  3760. customizeTimes:
  3761. record.dunType == 0 ? record.customizeTimes : undefined,
  3762. customizeName:
  3763. record.dunType == 0 ? record.customizeName : undefined,
  3764. },
  3765. }).done(
  3766. function (data) {
  3767. this.setState({
  3768. loading: false,
  3769. });
  3770. if (!data.error.length) {
  3771. message.success("保存成功!");
  3772. this.setState({
  3773. cuiFlag: false,
  3774. boFlag: false,
  3775. addFlag: false,
  3776. });
  3777. this.cuiList();
  3778. } else {
  3779. message.warning(data.error[0].message);
  3780. }
  3781. }.bind(this)
  3782. );
  3783. } else {
  3784. $.ajax({
  3785. url: globalConfig.context + "/api/admin/orderChange/addChangeDun",
  3786. method: "post",
  3787. data: {
  3788. orderNo: record.orderNo,
  3789. ctid: record.ctid,
  3790. projectType: record.sort,
  3791. dunType: record.dunType,
  3792. money: record.money,
  3793. waitDay: record.waitDay,
  3794. effectiveCount: record.effectiveCount,
  3795. cid: this.state.changeId, //变更ID
  3796. customizeTimes:
  3797. record.dunType == 0 ? record.customizeTimes : undefined,
  3798. customizeName:
  3799. record.dunType == 0 ? record.customizeName : undefined,
  3800. },
  3801. }).done(
  3802. function (data) {
  3803. this.setState({
  3804. loading: false,
  3805. });
  3806. if (!data.error.length) {
  3807. message.success("保存成功!");
  3808. this.setState({
  3809. cuiFlag: false,
  3810. boFlag: false,
  3811. addFlag: false,
  3812. });
  3813. this.cuiList();
  3814. } else {
  3815. message.warning(data.error[0].message);
  3816. }
  3817. }.bind(this)
  3818. );
  3819. }
  3820. },
  3821. submitChange() {
  3822. if (
  3823. this.state.typeChange == undefined ||
  3824. (this.state.typeChange == "" && this.state.typeChange != 0)
  3825. ) {
  3826. message.warning("请选择变更类型");
  3827. return false;
  3828. }
  3829. if (
  3830. this.state.typeChange == 0 ||
  3831. this.state.typeChange == 1 ||
  3832. this.state.typeChange == 3
  3833. ) {
  3834. if (this.state.settlementAmount < this.state.changeAmount) {
  3835. message.warning("退款金额大于已收款金额");
  3836. return;
  3837. }
  3838. }
  3839. if (this.state.processStatus != 5 && this.state.processStatus != 6) {
  3840. message.warning("当前订单流程不能发起变更!");
  3841. return false;
  3842. }
  3843. if (this.state.changeAmount === "") {
  3844. message.warning("申请退款金额不能为空!");
  3845. return false;
  3846. }
  3847. if (this.state.remarksC == "") {
  3848. message.warning("请正确填写变更原因");
  3849. return false;
  3850. }
  3851. if (this.state.startRemarks == "") {
  3852. message.warning("请正确填写备注信息");
  3853. return false;
  3854. }
  3855. let theorgCodeUrl = [];
  3856. if (this.state.voucherUrl.length) {
  3857. let picArr = [];
  3858. this.state.voucherUrl.map(function (item) {
  3859. if (
  3860. item.response &&
  3861. item.response.data &&
  3862. item.response.data.length
  3863. ) {
  3864. picArr.push(item.response.data);
  3865. }
  3866. });
  3867. theorgCodeUrl = picArr.join(",");
  3868. }
  3869. this.setState({
  3870. loading: true,
  3871. });
  3872. $.ajax({
  3873. url: globalConfig.context + "/api/admin/orderChange/updateOrderChange",
  3874. method: "post",
  3875. data: {
  3876. id: this.state.changeId,
  3877. changeType: 0,
  3878. orderNo: this.state.orderNo, //订单编号
  3879. processState: 0,
  3880. startRemarks: this.state.startRemarks,
  3881. remarks: this.state.remarksC,
  3882. voucherUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
  3883. totalAmount: this.state.totalAmount,
  3884. settlementAmount: this.state.settlementAmount,
  3885. changeAmount: this.state.changeAmount,
  3886. applicant: this.state.salesmanName,
  3887. depName: this.state.depName,
  3888. type: this.state.typeChange,
  3889. },
  3890. }).done(
  3891. function (data) {
  3892. if (!data.error.length) {
  3893. this.setState({
  3894. loading: false,
  3895. });
  3896. message.success("发起变更成功");
  3897. this.handleCancelclose();
  3898. } else {
  3899. message.warning(data.error[0].message);
  3900. this.setState({
  3901. loading: false,
  3902. });
  3903. }
  3904. }.bind(this)
  3905. );
  3906. },
  3907. editCui(record) {
  3908. this.setState({
  3909. editCuiVisible: true,
  3910. editCuiMoney: record.appropriationRatio
  3911. ? record.appropriationRatio
  3912. : record.money,
  3913. appropriationRatio: record.appropriationRatio,
  3914. editCuiTid: record.tid,
  3915. editCuiDid: record.did,
  3916. editCuiId: record.id,
  3917. });
  3918. },
  3919. editPro(record) {
  3920. this.setState({
  3921. editProVisible: true,
  3922. editSplitStatus: record.splitStatus,
  3923. editProMoney: record.commodityPrice,
  3924. editProCommodityQuantity: record.commodityQuantity,
  3925. editProTid: record.tid,
  3926. editProId: record.id,
  3927. });
  3928. },
  3929. submitEditCui(type) {
  3930. if (isNaN(parseFloat(this.state.editCuiMoney))) {
  3931. if (type === 1) {
  3932. message.warn("请输入比例");
  3933. } else {
  3934. message.warn("请输入金额");
  3935. }
  3936. return;
  3937. }
  3938. this.setState({
  3939. loading: true,
  3940. });
  3941. let data = {
  3942. id: this.state.editCuiId,
  3943. type: this.state.editCuiTid ? 2 : 1,
  3944. tid: this.state.editCuiTid,
  3945. };
  3946. if (type === 1) {
  3947. data.appropriationRatio = this.state.editCuiMoney;
  3948. } else {
  3949. data.money = this.state.editCuiMoney;
  3950. }
  3951. $.ajax({
  3952. url: globalConfig.context + "/api/admin/orderChange/updateChangeDun",
  3953. method: "post",
  3954. data,
  3955. }).done(
  3956. function (data) {
  3957. this.setState({
  3958. loading: false,
  3959. });
  3960. if (!data.error.length) {
  3961. message.success("修改成功!");
  3962. this.cuiList();
  3963. this.proList();
  3964. this.setState({
  3965. editCuiVisible: false,
  3966. });
  3967. } else {
  3968. message.warning(data.error[0].message);
  3969. }
  3970. }.bind(this)
  3971. );
  3972. },
  3973. submitEditPro() {
  3974. this.setState({
  3975. loading: true,
  3976. });
  3977. $.ajax({
  3978. url: globalConfig.context + "/api/admin/orderChange/updateChangeTask",
  3979. method: "post",
  3980. data: {
  3981. id: this.state.editProId,
  3982. type: this.state.editProTid ? 2 : 1,
  3983. commodityPrice: this.state.editProMoney,
  3984. commodityQuantity: this.state.editProCommodityQuantity,
  3985. tid: this.state.editProTid,
  3986. },
  3987. }).done(
  3988. function (data) {
  3989. this.setState({
  3990. loading: false,
  3991. });
  3992. if (!data.error.length) {
  3993. message.success("修改成功!");
  3994. this.cuiList();
  3995. this.proList();
  3996. this.setState({
  3997. editProVisible: false,
  3998. });
  3999. } else {
  4000. message.warning(data.error[0].message);
  4001. }
  4002. }.bind(this)
  4003. );
  4004. },
  4005. downImg() {
  4006. let num = 0;
  4007. for (let i = 0; i < this.state.orgCodeUrl.length; i++) {
  4008. if (this.state.orgCodeUrl[i].url == this.state.previewImage) {
  4009. num = i;
  4010. }
  4011. }
  4012. if (num == this.state.orgCodeUrl.length - 1) {
  4013. return message.warning("已经是最后一张了哦");
  4014. }
  4015. this.state.previewImage = this.state.orgCodeUrl[num + 1].url;
  4016. this.setState({
  4017. previewImage: this.state.previewImage,
  4018. rotateDeg: 0,
  4019. });
  4020. },
  4021. upImg() {
  4022. let num = 0;
  4023. for (let i = 0; i < this.state.orgCodeUrl.length; i++) {
  4024. if (this.state.orgCodeUrl[i].url == this.state.previewImage) {
  4025. num = i;
  4026. }
  4027. }
  4028. if (num == 0) {
  4029. return message.warning("已经是第一张了哦");
  4030. }
  4031. this.state.previewImage = this.state.orgCodeUrl[num - 1].url;
  4032. this.setState({
  4033. previewImage: this.state.previewImage,
  4034. rotateDeg: 0,
  4035. });
  4036. },
  4037. rotate() {
  4038. let rotateDeg = this.state.rotateDeg + 90;
  4039. this.setState({
  4040. rotateDeg,
  4041. });
  4042. },
  4043. downImgs() {
  4044. let num = 0;
  4045. for (let i = 0; i < this.state.replenishUrl.length; i++) {
  4046. if (this.state.replenishUrl[i].url == this.state.previewImage) {
  4047. num = i;
  4048. }
  4049. }
  4050. if (num == this.state.replenishUrl.length - 1) {
  4051. return message.warning("已经是最后一张了哦");
  4052. }
  4053. this.state.previewImage = this.state.replenishUrl[num + 1].url;
  4054. this.setState({
  4055. previewImage: this.state.previewImage,
  4056. rotateDeg: 0,
  4057. });
  4058. },
  4059. upImgs() {
  4060. let num = 0;
  4061. for (let i = 0; i < this.state.replenishUrl.length; i++) {
  4062. if (this.state.replenishUrl[i].url == this.state.previewImage) {
  4063. num = i;
  4064. }
  4065. }
  4066. if (num == 0) {
  4067. return message.warning("已经是第一张了哦");
  4068. }
  4069. this.state.previewImage = this.state.replenishUrl[num - 1].url;
  4070. this.setState({
  4071. previewImage: this.state.previewImage,
  4072. rotateDeg: 0,
  4073. });
  4074. },
  4075. rotates() {
  4076. let rotateDeg = this.state.rotateDeg + 90;
  4077. this.setState({
  4078. rotateDeg,
  4079. });
  4080. },
  4081. downImgCont() {
  4082. let num = 0;
  4083. for (let i = 0; i < this.state.contentUrl.length; i++) {
  4084. if (this.state.contentUrl[i].url == this.state.previewImage) {
  4085. num = i;
  4086. }
  4087. }
  4088. if (num == this.state.replenishUrl.length - 1) {
  4089. return message.warning("已经是最后一张了哦");
  4090. }
  4091. this.state.previewImage = this.state.contentUrl[num + 1].url;
  4092. this.setState({
  4093. previewImage: this.state.previewImage,
  4094. rotateDeg: 0,
  4095. });
  4096. },
  4097. upImgCont() {
  4098. let num = 0;
  4099. for (let i = 0; i < this.state.contentUrl.length; i++) {
  4100. if (this.state.contentUrl[i].url == this.state.previewImage) {
  4101. num = i;
  4102. }
  4103. }
  4104. if (num == 0) {
  4105. return message.warning("已经是第一张了哦");
  4106. }
  4107. this.state.previewImage = this.state.contentUrl[num - 1].url;
  4108. this.setState({
  4109. previewImage: this.state.previewImage,
  4110. rotateDeg: 0,
  4111. });
  4112. },
  4113. rotateCont() {
  4114. let rotateDeg = this.state.rotateDeg + 90;
  4115. this.setState({
  4116. rotateDeg,
  4117. });
  4118. },
  4119. showConfirmChange(fn, record) {
  4120. confirm({
  4121. title: "确定取消本次变更吗?",
  4122. content: (
  4123. <span style={{ color: "red" }}>取消后本次变更将作废!!!</span>
  4124. ),
  4125. onOk() {
  4126. fn();
  4127. },
  4128. onCancel() { },
  4129. });
  4130. },
  4131. deleteChange() {
  4132. this.setState({
  4133. loading: true,
  4134. });
  4135. $.ajax({
  4136. url: globalConfig.context + "/api/admin/orderChange/cancelOrderChange",
  4137. method: "post",
  4138. data: {
  4139. id: this.state.changeId,
  4140. status: this.state.status,
  4141. processState: this.state.processState,
  4142. orderNo: this.state.orderNo,
  4143. },
  4144. }).done(
  4145. function (data) {
  4146. this.setState({
  4147. loading: false,
  4148. });
  4149. if (!data.error.length) {
  4150. message.success("取消成功!");
  4151. this.handleCancelclose();
  4152. } else {
  4153. message.warning(data.error[0].message);
  4154. }
  4155. }.bind(this)
  4156. );
  4157. },
  4158. // 新增协单人员
  4159. submitOrder() {
  4160. if (!this.state.coor) {
  4161. message.warning("请选择协单人员");
  4162. return;
  4163. }
  4164. this.setState({
  4165. loading: true,
  4166. });
  4167. $.ajax({
  4168. method: "post",
  4169. dataType: "json",
  4170. crossDomain: false,
  4171. url: globalConfig.context + "/api/admin/newOrder/addAssist",
  4172. data: {
  4173. orderNo: this.state.orderNo,
  4174. aid: this.state.coor,
  4175. },
  4176. success: function (data) {
  4177. if (data.error.length) {
  4178. this.setState({
  4179. loading: false,
  4180. });
  4181. message.warning(data.error[0].message);
  4182. } else {
  4183. this.setState({
  4184. loading: false,
  4185. coor: '',
  4186. dataSourceView: [],
  4187. coorVisible: "none",
  4188. });
  4189. this.assistList();
  4190. message.success("添加成功");
  4191. }
  4192. }.bind(this),
  4193. }).always(
  4194. function () {
  4195. this.setState({
  4196. loading: false,
  4197. });
  4198. }.bind(this)
  4199. );
  4200. },
  4201. // // 删除协单人员
  4202. // onClosable(id) {
  4203. // $.ajax({
  4204. // method: "post",
  4205. // dataType: "json",
  4206. // crossDomain: false,
  4207. // url: globalConfig.context + "/api/admin/newOrder/deleteAssist",
  4208. // data: {
  4209. // id: id,
  4210. // },
  4211. // success: function (data) {
  4212. // if (!data.error.length) {
  4213. // message.warning(data.error[0].message);
  4214. // } else {
  4215. // message.success("删除成功");
  4216. // }
  4217. // }.bind(this),
  4218. // }).always(
  4219. // function () {
  4220. // this.setState({
  4221. // loading: false,
  4222. // });
  4223. // }.bind(this)
  4224. // );
  4225. // },
  4226. // 新增上门服务数据
  4227. submitView() {
  4228. if (!this.state.dateView) {
  4229. message.warning("请选择上门日期");
  4230. return;
  4231. } else if (!this.state.contentView) {
  4232. message.warning("请填写服务内容");
  4233. return;
  4234. }
  4235. this.setState({
  4236. loading: true,
  4237. });
  4238. $.ajax({
  4239. method: "post",
  4240. dataType: "json",
  4241. crossDomain: false,
  4242. url: globalConfig.context + "/api/admin/newOrder/addOrderService",
  4243. data: {
  4244. orderNo: this.state.orderNo,
  4245. serviceTimes: this.state.dateView,
  4246. content: this.state.contentView,
  4247. remarks: this.state.remarksView,
  4248. },
  4249. success: function (data) {
  4250. if (data.error.length) {
  4251. this.setState({
  4252. loading: false,
  4253. });
  4254. message.warning(data.error[0].message);
  4255. } else {
  4256. this.setState({
  4257. loading: false,
  4258. modalView: false,
  4259. viewKey: this.state.viewKey + 1,
  4260. dateView: '',
  4261. contentView: '',
  4262. remarksView: '',
  4263. contentViewLength: 0,
  4264. contentViewLength1: 0,
  4265. });
  4266. message.success("添加成功");
  4267. this.orderServiceList();
  4268. }
  4269. }.bind(this),
  4270. }).always(
  4271. function () {
  4272. this.setState({
  4273. loading: false,
  4274. });
  4275. }.bind(this)
  4276. );
  4277. },
  4278. //获取上门人员
  4279. assistList(record) {
  4280. this.state.orderList = [];
  4281. $.ajax({
  4282. method: "get",
  4283. dataType: "json",
  4284. crossDomain: false,
  4285. url: globalConfig.context + "/api/admin/newOrder/assistList",
  4286. data: {
  4287. orderNo: record ? record.orderNo : this.props.datauser.orderNo,
  4288. },
  4289. success: function (data) {
  4290. if (data.error.length) {
  4291. this.setState({
  4292. loading: false,
  4293. });
  4294. message.warning(data.error[0].message);
  4295. } else {
  4296. this.setState({
  4297. personnel: data.data,
  4298. });
  4299. // message.success("添加成功");
  4300. }
  4301. }.bind(this),
  4302. }).always(
  4303. function () {
  4304. this.setState({
  4305. loading: false,
  4306. });
  4307. }.bind(this)
  4308. );
  4309. },
  4310. // 上门服务列表
  4311. orderServiceList(record) {
  4312. $.ajax({
  4313. method: "get",
  4314. dataType: "json",
  4315. crossDomain: false,
  4316. url: globalConfig.context + "/api/admin/newOrder/orderServiceList",
  4317. data: {
  4318. orderNo: record ? record.orderNo : this.props.datauser.orderNo,
  4319. },
  4320. success: function (data) {
  4321. if (data.error.length) {
  4322. this.setState({
  4323. loading: false,
  4324. });
  4325. message.warning(data.error[0].message);
  4326. } else {
  4327. this.setState({
  4328. dataView: data.data,
  4329. });
  4330. // message.success("添加成功");
  4331. }
  4332. }.bind(this),
  4333. }).always(
  4334. function () {
  4335. this.setState({
  4336. loading: false,
  4337. });
  4338. }.bind(this)
  4339. );
  4340. },
  4341. // 删除上门服务列表
  4342. delectView(record) {
  4343. $.ajax({
  4344. method: "POST",
  4345. dataType: "json",
  4346. crossDomain: false,
  4347. url: globalConfig.context + "/api/admin/newOrder/deleteOrderService",
  4348. data: {
  4349. id: record.id,
  4350. },
  4351. success: function (data) {
  4352. if (data.error.length) {
  4353. this.setState({
  4354. loading: false,
  4355. });
  4356. message.warning(data.error[0].message);
  4357. } else {
  4358. // this.setState({
  4359. // publicView: data.data,
  4360. // });
  4361. this.orderServiceList();
  4362. message.success("删除成功");
  4363. }
  4364. }.bind(this),
  4365. }).always(
  4366. function () {
  4367. this.setState({
  4368. loading: false,
  4369. });
  4370. }.bind(this)
  4371. );
  4372. },
  4373. // 上门查看
  4374. publicByOrder() {
  4375. $.ajax({
  4376. method: "get",
  4377. dataType: "json",
  4378. crossDomain: false,
  4379. url: globalConfig.context + "/api/admin/release/publicByOrder",
  4380. data: {
  4381. orderNo: this.state.orderNo,
  4382. },
  4383. success: function (data) {
  4384. if (data.error.length) {
  4385. this.setState({
  4386. loading: false,
  4387. });
  4388. message.warning(data.error[0].message);
  4389. } else {
  4390. this.setState({
  4391. publicView: data.data,
  4392. });
  4393. // message.success("添加成功");
  4394. }
  4395. }.bind(this),
  4396. }).always(
  4397. function () {
  4398. this.setState({
  4399. loading: false,
  4400. });
  4401. }.bind(this)
  4402. );
  4403. },
  4404. // 获取动态数据名称
  4405. handleSearch(value) {
  4406. $.ajax({
  4407. method: "get",
  4408. dataType: "json",
  4409. crossDomain: false,
  4410. url: globalConfig.context + "/api/admin/customer/listAdminByName",
  4411. data: {
  4412. adminName: value,
  4413. },
  4414. success: function (data) {
  4415. if (data.error.length) {
  4416. this.setState({
  4417. loading: false,
  4418. });
  4419. message.warning(data.error[0].message);
  4420. } else {
  4421. this.setState({
  4422. dataSourceView: data.data,
  4423. });
  4424. // message.success("添加成功");
  4425. }
  4426. }.bind(this),
  4427. }).always(
  4428. function () {
  4429. this.setState({
  4430. loading: false,
  4431. });
  4432. }.bind(this)
  4433. );
  4434. },
  4435. onSelectView(v, o) {
  4436. this.setState({
  4437. coor: v,
  4438. });
  4439. },
  4440. render() {
  4441. const expandedRowRender = (e) => {
  4442. const data = e.list;
  4443. data.forEach((item) => {
  4444. item.key = item.id;
  4445. });
  4446. let columns = [];
  4447. if (e.list instanceof Array && e.list.length) {
  4448. columns = [
  4449. {
  4450. title: "变更状态",
  4451. dataIndex: "type",
  4452. key: "type",
  4453. render: (text, record) => {
  4454. let str = "";
  4455. let color = "";
  4456. if (text == 1) {
  4457. str = "增";
  4458. color = "#87d068";
  4459. } else if (text == 2) {
  4460. str = "改";
  4461. color = "#108ee9";
  4462. } else if (text == 3) {
  4463. str = "删";
  4464. color = "#f50";
  4465. }
  4466. return (
  4467. <span>
  4468. <Tag
  4469. color={color}
  4470. style={{ display: text == 0 ? "none" : "inline-block" }}
  4471. >
  4472. {str}
  4473. </Tag>
  4474. {record.splitStatus == 1 ? (
  4475. <Tag
  4476. color="#108ee9"
  4477. // onClick={e => {
  4478. // e.stopPropagation();
  4479. // this.showRes(record);
  4480. // }}
  4481. >
  4482. 父项目
  4483. </Tag>
  4484. ) : (
  4485. ""
  4486. )}
  4487. {record.splitStatus == 2 ? (
  4488. <Tag
  4489. color="#108ee9"
  4490. // onClick={e => {
  4491. // e.stopPropagation();
  4492. // this.showRes(record);
  4493. // }}
  4494. >
  4495. 子项目
  4496. </Tag>
  4497. ) : (
  4498. ""
  4499. )}
  4500. </span>
  4501. );
  4502. },
  4503. },
  4504. {
  4505. title: "业务项目名称",
  4506. dataIndex: "commodityName",
  4507. key: "commodityName",
  4508. render: (text, record) => {
  4509. return <span>{text}<span style={{ color: "red" }}>{record.patentTypeName}</span>{"-" + record.id}</span>
  4510. }
  4511. },
  4512. {
  4513. title: "项目类别",
  4514. dataIndex: "cname",
  4515. key: "cname",
  4516. },
  4517. {
  4518. title: "项目数量",
  4519. dataIndex: "commodityQuantity",
  4520. key: "commodityQuantity",
  4521. },
  4522. {
  4523. title: "金额(万元)",
  4524. dataIndex: "commodityPrice",
  4525. key: "commodityPrice",
  4526. render: (text, record) => {
  4527. if (record.splitStatus == 2) {
  4528. return "/";
  4529. } else {
  4530. return text;
  4531. }
  4532. },
  4533. },
  4534. {
  4535. title: "主要项目",
  4536. dataIndex: "main",
  4537. key: "main",
  4538. render: (text) => {
  4539. return text ? "是" : "否";
  4540. },
  4541. },
  4542. {
  4543. title: "项目负责人",
  4544. dataIndex: "receiverName",
  4545. key: "receiverName",
  4546. },
  4547. {
  4548. title: "项目说明",
  4549. dataIndex: "taskComment",
  4550. key: "taskComment",
  4551. render: (text) => {
  4552. return text && text.length > 8 ? text.substr(0, 8) + "…" : text;
  4553. },
  4554. },
  4555. {
  4556. title: "操作",
  4557. dataIndex: "ABC",
  4558. key: "ABC",
  4559. render: (text, record) => {
  4560. return (
  4561. <div>
  4562. <Button
  4563. onClick={(e) => {
  4564. e.stopPropagation();
  4565. this.showConfirm(this.changeDeletePro, record);
  4566. }}
  4567. disabled={this.state.listFlag}
  4568. style={{
  4569. display: this.state.displayList ? "none" : "block",
  4570. }}
  4571. >
  4572. 删除
  4573. </Button>
  4574. </div>
  4575. );
  4576. },
  4577. },
  4578. ];
  4579. return (
  4580. <Table
  4581. columns={columns}
  4582. scroll={{ x: "max-content", y: 0 }}
  4583. dataSource={data}
  4584. pagination={false}
  4585. onRowDoubleClick={this.state.listFlag ? this.not : this.editPro}
  4586. />
  4587. );
  4588. } else {
  4589. columns = [];
  4590. return (
  4591. <p
  4592. style={{ fontWeight: "bold", color: "red", textAlign: "center" }}
  4593. >
  4594. 此项目暂未拆分
  4595. </p>
  4596. );
  4597. }
  4598. };
  4599. const expandedRowRenderDetail = (e) => {
  4600. const data = e.list;
  4601. data.forEach((item) => {
  4602. item.key = item.id;
  4603. });
  4604. let columns = [];
  4605. if (e.list instanceof Array && e.list.length) {
  4606. columns = [
  4607. {
  4608. title: "变更状态",
  4609. dataIndex: "type",
  4610. key: "type",
  4611. render: (text, record) => {
  4612. let str = "";
  4613. let color = "";
  4614. if (text == 1) {
  4615. str = "增";
  4616. color = "#87d068";
  4617. } else if (text == 2) {
  4618. str = "改";
  4619. color = "#108ee9";
  4620. } else if (text == 3) {
  4621. str = "删";
  4622. color = "#f50";
  4623. }
  4624. return (
  4625. <span>
  4626. <Tag
  4627. color={color}
  4628. style={{ display: text == 0 ? "none" : "inline-block" }}
  4629. >
  4630. {str}
  4631. </Tag>
  4632. {record.splitStatus == 1 ? (
  4633. <Tag
  4634. color="#108ee9"
  4635. // onClick={e => {
  4636. // e.stopPropagation();
  4637. // this.showRes(record);
  4638. // }}
  4639. >
  4640. 父项目
  4641. </Tag>
  4642. ) : (
  4643. ""
  4644. )}
  4645. {record.splitStatus == 2 ? (
  4646. <Tag
  4647. color="#108ee9"
  4648. // onClick={e => {
  4649. // e.stopPropagation();
  4650. // this.showRes(record);
  4651. // }}
  4652. >
  4653. 子项目
  4654. </Tag>
  4655. ) : (
  4656. ""
  4657. )}
  4658. </span>
  4659. );
  4660. },
  4661. },
  4662. {
  4663. title: "业务项目名称",
  4664. dataIndex: "commodityName",
  4665. key: "commodityName",
  4666. render: (text, record) => {
  4667. return (
  4668. <span>{text}<span style={{ color: "red" }}>{record.patentTypeName}</span></span>
  4669. )
  4670. }
  4671. },
  4672. {
  4673. title: "项目类别",
  4674. dataIndex: "cname",
  4675. key: "cname",
  4676. },
  4677. {
  4678. title: "项目数量",
  4679. dataIndex: "commodityQuantity",
  4680. key: "commodityQuantity",
  4681. },
  4682. {
  4683. title: "金额(万元)",
  4684. dataIndex: "commodityPrice",
  4685. key: "commodityPrice",
  4686. render: (text, record) => {
  4687. if (record.splitStatus == 2) {
  4688. return "/";
  4689. } else {
  4690. return text;
  4691. }
  4692. },
  4693. },
  4694. {
  4695. title: "主要项目",
  4696. dataIndex: "main",
  4697. key: "main",
  4698. render: (text) => {
  4699. return text ? "是" : "否";
  4700. },
  4701. },
  4702. {
  4703. title: "项目负责人",
  4704. dataIndex: "receiverName",
  4705. key: "receiverName",
  4706. },
  4707. {
  4708. title: "项目说明",
  4709. dataIndex: "taskComment",
  4710. key: "taskComment",
  4711. render: (text) => {
  4712. return text && text.length > 8 ? text.substr(0, 8) + "…" : text;
  4713. },
  4714. },
  4715. ];
  4716. return (
  4717. <Table
  4718. columns={columns}
  4719. scroll={{ x: "max-content", y: 0 }}
  4720. dataSource={data}
  4721. pagination={false}
  4722. />
  4723. );
  4724. } else {
  4725. columns = [];
  4726. return (
  4727. <p
  4728. style={{ fontWeight: "bold", color: "red", textAlign: "center" }}
  4729. >
  4730. 此项目暂未拆分
  4731. </p>
  4732. );
  4733. }
  4734. };
  4735. const FormItem = Form.Item;
  4736. const { TabPane } = Tabs;
  4737. const { TextArea } = Input;
  4738. const formItemLayout = {
  4739. labelCol: { span: 8 },
  4740. wrapperCol: { span: 14 },
  4741. };
  4742. const contractData = this.state.contractData;
  4743. const formItemList = [
  4744. {
  4745. label: "企业联系人",
  4746. content: <span>{this.state.contacts}</span>,
  4747. },
  4748. {
  4749. label: "客户名称",
  4750. content: (
  4751. <span>
  4752. {this.state.userName}
  4753. <EnterpriseNameChange
  4754. type="journal"
  4755. style={{ marginLeft: 10 }}
  4756. enterpriseId={this.state.orderUid}
  4757. />
  4758. </span>
  4759. ),
  4760. },
  4761. {
  4762. label: "联系人电话",
  4763. content: <span>{this.state.contactMobile}</span>,
  4764. },
  4765. {
  4766. label: "企业法人",
  4767. content: <span>{this.state.legalPerson}</span>,
  4768. },
  4769. {
  4770. label: "法人电话",
  4771. content: <span>{this.state.legalPersonTel}</span>,
  4772. },
  4773. // {
  4774. // label: "签单金额(万元)",
  4775. // content: <span>{this.state.totalAmount}</span>
  4776. // },
  4777. // {
  4778. // label: "首付金额(万元)",
  4779. // content: <span>{this.state.firstAmount}</span>
  4780. // },
  4781. // {
  4782. // label: "特批立项",
  4783. // content: <span>{getApprovedState(this.state.approval)}</span>
  4784. // },
  4785. // {
  4786. // label: "合同签订时间",
  4787. // content: <span>{this.state.signDate}</span>
  4788. // },
  4789. // {
  4790. // label: "订单部门",
  4791. // content: <span>{this.state.depName}</span>
  4792. // }
  4793. ];
  4794. let dataSources = this.state.customerArr || [];
  4795. let cdataSources = this.state.channelArr || [];
  4796. const cuiDataList = this.state.contactList || [];
  4797. let departmentArr = this.state.departmentArr || [];
  4798. let options = this.state.states
  4799. ? dataSources.map((group) => (
  4800. <Select.Option key={group.id} value={group.name}>
  4801. {group.name}
  4802. </Select.Option>
  4803. ))
  4804. : dataSources.map((group, index) => (
  4805. <Select.Option key={index} value={group.bname}>
  4806. {group.bname}
  4807. </Select.Option>
  4808. ));
  4809. let channeloptions = cdataSources.map((group) => (
  4810. <Select.Option key={group.id} value={group.name}>
  4811. {group.name}
  4812. </Select.Option>
  4813. ));
  4814. let dataSourceView = this.state.dataSourceView ? this.state.dataSourceView.map((group, index) => (
  4815. <Select.Option key={index} value={group.aid}>
  4816. {group.name}
  4817. </Select.Option>
  4818. )) : '';
  4819. let { closable } = this.state;
  4820. let assistList = this.assistList;
  4821. const { addPop = "" } = this.props
  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. className="admin-desc-content"
  4843. >
  4844. <Form
  4845. layout="horizontal"
  4846. onSubmit={this.handleSubmit}
  4847. style={{ paddingBottom: "40px" }}
  4848. >
  4849. <Spin spinning={this.state.loading}>
  4850. <div className="clearfix">
  4851. {
  4852. addPop == "add" &&
  4853. <div className="clearfix">
  4854. <div className="clearfix">
  4855. <FormItem {...formItemLayout} label="订单类型">
  4856. <Select
  4857. placeholder="请选择订单类型"
  4858. style={{ width: "200px" }}
  4859. value={this.state.orderType}
  4860. onChange={(e) => {
  4861. this.setState({ orderType: e });
  4862. }}
  4863. >
  4864. {orderTypes.map(function (item) {
  4865. return (
  4866. <Select.Option key={item.value}>
  4867. {item.key}
  4868. </Select.Option>
  4869. );
  4870. })}
  4871. </Select>
  4872. <span className="mandatory">*</span>
  4873. </FormItem>
  4874. </div>
  4875. <FormItem {...formItemLayout} label="客户所属类型">
  4876. <Select
  4877. placeholder="请选择客户所属类型"
  4878. style={{ width: "200px" }}
  4879. value={this.state.userType}
  4880. onChange={(e) => {
  4881. this.setState({
  4882. userType: e,
  4883. customerArr: [],
  4884. autoId: "",
  4885. customerName: "",
  4886. selectSales: undefined
  4887. });
  4888. }}
  4889. >
  4890. {customerType.map(function (item) {
  4891. return (
  4892. <Select.Option key={item.value}>
  4893. {item.key}
  4894. </Select.Option>
  4895. );
  4896. })}
  4897. </Select>
  4898. </FormItem>
  4899. <div className="clearfix">
  4900. <FormItem {...formItemLayout} label="客户名称">
  4901. <AutoComplete
  4902. className="certain-category-search"
  4903. dropdownClassName="certain-category-search-dropdown"
  4904. dropdownMatchSelectWidth={false}
  4905. dropdownStyle={{ width: 200 }}
  4906. size="large"
  4907. style={{ width: "200px" }}
  4908. dataSource={options}
  4909. placeholder="输入名称"
  4910. value={this.state.customerName}
  4911. onChange={this.customerChange}
  4912. filterOption={true}
  4913. onSelect={this.selectAutoCUT}
  4914. >
  4915. <Input />
  4916. </AutoComplete>
  4917. <span className="mandatory">*</span>
  4918. </FormItem>
  4919. </div>
  4920. <FormItem {...formItemLayout} label="销售类型">
  4921. <Select
  4922. placeholder="请选择销售类型"
  4923. style={{ width: "200px" }}
  4924. value={this.state.selectSales}
  4925. onChange={(e) => {
  4926. this.setState({
  4927. selectSales: e,
  4928. });
  4929. }}
  4930. >
  4931. {(this.state.userType == "0"
  4932. ? ssalesType : this.state.userType == "1"
  4933. ? qsalesType : []).map(function (item) {
  4934. return (
  4935. <Select.Option key={item.value}>
  4936. {item.key}
  4937. </Select.Option>
  4938. );
  4939. })}
  4940. </Select>
  4941. </FormItem>
  4942. {
  4943. (this.state.selectSales == "4" || this.state.selectSales == "5") &&
  4944. <FormItem {...formItemLayout} label="描述">
  4945. <TextArea
  4946. placeholder="请填写描述"
  4947. style={{ width: 300, height: 80 }}
  4948. onChange={(e) => {
  4949. this.setState({
  4950. other: e.target.value
  4951. })
  4952. }}
  4953. />
  4954. </FormItem>
  4955. }
  4956. {
  4957. this.state.selectSales == "3" &&
  4958. <div className="clearfix">
  4959. <FormItem {...formItemLayout} label="渠道名称">
  4960. <AutoComplete
  4961. className="certain-category-search"
  4962. dropdownClassName="certain-category-search-dropdown"
  4963. dropdownMatchSelectWidth={false}
  4964. dropdownStyle={{ width: 200 }}
  4965. size="large"
  4966. style={{ width: "200px" }}
  4967. dataSource={channeloptions}
  4968. placeholder="请输入渠道关键字"
  4969. value={this.state.channelName}
  4970. onChange={this.channelChange}
  4971. filterOption={true}
  4972. onSelect={this.goSelect}
  4973. >
  4974. <Input />
  4975. </AutoComplete>
  4976. <span className="mandatory">*</span>
  4977. </FormItem>
  4978. </div>
  4979. }
  4980. <div className="addSave" style={{ marginTop: "15px" }}>
  4981. <Button
  4982. className="cancel"
  4983. type="primary"
  4984. // onClick={this.handleCancel}
  4985. style={{ marginLeft: "150px" }}
  4986. htmlType="submit"
  4987. >
  4988. 开单
  4989. </Button>
  4990. <Button
  4991. className="cancel"
  4992. type="ghost"
  4993. onClick={this.handleCancelclose}
  4994. style={{ marginLeft: "50px" }}
  4995. >
  4996. 取消
  4997. </Button>
  4998. </div>
  4999. </div>
  5000. }
  5001. {
  5002. addPop == "edit" &&
  5003. <Tabs
  5004. onChange={this.callback}
  5005. activeKey={this.state.activeKey}
  5006. tabBarExtraContent={
  5007. <div
  5008. style={{ fontWeight: "bold", paddingRight: "15px" }}
  5009. >
  5010. <OrderItemStatus deleteSign={this.state.deleteSign} />
  5011. </div>
  5012. }
  5013. >
  5014. <TabPane tab={"最新订单"} key="1">
  5015. <div className="clearfix">
  5016. <div className="clearfix">
  5017. <FormItem
  5018. className="half-item"
  5019. {...formItemLayout}
  5020. label="合同编号"
  5021. >
  5022. {<span>{this.state.contractNo}</span>}
  5023. </FormItem>
  5024. <FormItem
  5025. className="half-item"
  5026. {...formItemLayout}
  5027. label="订单编号"
  5028. >
  5029. <span>{this.state.orderNo}</span>
  5030. </FormItem>
  5031. <FormItem
  5032. className="half-item"
  5033. {...formItemLayout}
  5034. label="流程状态"
  5035. >
  5036. <span>
  5037. {getProcessStatus(this.state.processStatus)}
  5038. </span>
  5039. </FormItem>
  5040. <FormItem
  5041. className="half-item"
  5042. {...formItemLayout}
  5043. label="销售类型"
  5044. >
  5045. <span>
  5046. {(["私有客户-", "签单客户-"][this.state.updatas.userType] || " ") +
  5047. (salesList[this.state.updatas.salesType] || "")}
  5048. </span>
  5049. {
  5050. this.state.processStatus === 0 &&
  5051. <UpdateSales
  5052. orderNo={this.state.orderNo}
  5053. updatas={this.state.updatas}
  5054. onRefresh={
  5055. e => {
  5056. let ups = this.state.updatas
  5057. ups.salesType = e.salesType
  5058. if (e.salesType == "3") {
  5059. ups.channelId = e.channelId
  5060. ups.other = e.other
  5061. } else if (e.salesType == "4" || e.salesType == "5") {
  5062. ups.other = e.other
  5063. }
  5064. this.setState({
  5065. updatas: ups,
  5066. userType: ups.userType
  5067. })
  5068. }
  5069. // this.loaduser.bind(this, {orderNo: this.state.orderNo })
  5070. }
  5071. />
  5072. }
  5073. </FormItem>
  5074. <FormItem
  5075. className="half-item"
  5076. {...formItemLayout}
  5077. label="结算状态"
  5078. >
  5079. <span>
  5080. {getLiquidationStatus(
  5081. this.state.liquidationStatus
  5082. )}
  5083. </span>
  5084. </FormItem>
  5085. {this.state.processStatus === 0 ? (
  5086. <div className="clearfix">
  5087. <FormItem
  5088. className="half-item"
  5089. {...formItemLayout}
  5090. label="特批立项"
  5091. >
  5092. <Select
  5093. placeholder="请选择客户所属类型"
  5094. style={{ width: "240px" }}
  5095. value={getApprovedState(this.state.approval)}
  5096. onChange={(e) => {
  5097. this.setState({ approval: e });
  5098. }}
  5099. >
  5100. <Select.Option key={0}>非特批</Select.Option>
  5101. <Select.Option key={1}>特批</Select.Option>
  5102. </Select>
  5103. </FormItem>
  5104. <FormItem
  5105. className="half-item"
  5106. {...formItemLayout}
  5107. label={
  5108. <span>
  5109. <strong style={{ color: "#f00" }}>*</strong>
  5110. 合同签订时间
  5111. </span>
  5112. }
  5113. >
  5114. <DatePicker
  5115. className="signDateRef"
  5116. style={{
  5117. marginTop: "2px",
  5118. // width: "240px",
  5119. height: "32px",
  5120. }}
  5121. showTime
  5122. format="YYYY-MM-DD"
  5123. onOk={() => { }}
  5124. value={
  5125. this.state.signDate
  5126. ? moment(this.state.signDate)
  5127. : null
  5128. }
  5129. onChange={(data, dataString) => {
  5130. this.setState({ signDate: dataString });
  5131. }}
  5132. />
  5133. </FormItem>
  5134. <FormItem
  5135. className="half-item"
  5136. {...formItemLayout}
  5137. label="订单部门"
  5138. >
  5139. <Select
  5140. placeholder="请选择订单部门"
  5141. style={{ width: 240 }}
  5142. value={this.state.organizationSearch}
  5143. onChange={(e) => {
  5144. this.setState({ organizationSearch: e });
  5145. }}
  5146. >
  5147. {departmentArr.map(function (item) {
  5148. return (
  5149. <Select.Option key={item.id}>
  5150. {item.name}
  5151. </Select.Option>
  5152. );
  5153. })}
  5154. </Select>
  5155. </FormItem>
  5156. </div>
  5157. ) : (
  5158. <div className="clearfix">
  5159. <FormItem
  5160. className="half-item"
  5161. {...formItemLayout}
  5162. label="特批立项"
  5163. >
  5164. <span>
  5165. {["非特批", "特批待审核", "特批通过", "特批驳回"][this.state.approval]}
  5166. {/* {getApprovedState(this.state.approval)} */}
  5167. </span>
  5168. </FormItem>
  5169. <FormItem
  5170. className="half-item"
  5171. {...formItemLayout}
  5172. label="合同签订时间"
  5173. >
  5174. <span>{this.state.signDate}</span>
  5175. </FormItem>
  5176. <FormItem
  5177. className="half-item"
  5178. {...formItemLayout}
  5179. label="订单部门"
  5180. >
  5181. <span>{this.state.depName}</span>
  5182. </FormItem>
  5183. <FormItem
  5184. className="half-item"
  5185. {...formItemLayout}
  5186. label="是否外包"
  5187. >
  5188. <span>
  5189. {this.state.outsource == 0 ? "否" : "是"}
  5190. </span>
  5191. </FormItem>
  5192. </div>
  5193. )}
  5194. </div>
  5195. <h3
  5196. style={{
  5197. marginLeft: 10,
  5198. fontWeight: 800,
  5199. marginBottom: 10,
  5200. }}
  5201. >
  5202. 收款项目
  5203. </h3>
  5204. {this.state.processStatus === 0 ? (
  5205. <div className="clearfix">
  5206. <FormItem
  5207. className="half-item"
  5208. {...formItemLayout}
  5209. label="签单金额(万元)"
  5210. >
  5211. <Input
  5212. placeholder="签单金额"
  5213. ref="totalAmountRef"
  5214. value={this.state.totalAmount}
  5215. onChange={(e) => {
  5216. this.setState({
  5217. totalAmount: e.target.value,
  5218. });
  5219. }}
  5220. style={{ width: "240px" }}
  5221. />
  5222. </FormItem>
  5223. <FormItem
  5224. className="half-item"
  5225. {...formItemLayout}
  5226. label="首付金额(万元)"
  5227. >
  5228. <Input
  5229. placeholder="请输入实签首款金额"
  5230. ref="firstAmountRef"
  5231. value={this.state.firstAmount}
  5232. onChange={(e) => {
  5233. this.setState({
  5234. firstAmount: e.target.value,
  5235. });
  5236. }}
  5237. style={{ width: "240px" }}
  5238. />
  5239. </FormItem>
  5240. <FormItem
  5241. className="half-item"
  5242. {...formItemLayout}
  5243. label="已收款项"
  5244. >
  5245. <span>
  5246. {this.state.settlementAmount + "万元"}
  5247. </span>
  5248. {/* {this.state.settlementAmount ? (
  5249. <Button
  5250. type="primary"
  5251. onClick={this.tuikuan}
  5252. style={{
  5253. float: "right",
  5254. marginRight: "50px",
  5255. marginBottom: "15px"
  5256. }}
  5257. >
  5258. 退单
  5259. </Button>
  5260. ) : (
  5261. ""
  5262. )} */}
  5263. </FormItem>
  5264. </div>
  5265. ) : (
  5266. <div className="clearfix">
  5267. <FormItem
  5268. className="half-item"
  5269. {...formItemLayout}
  5270. label="签单金额(万元)"
  5271. >
  5272. <span>{this.state.totalAmount}</span>
  5273. </FormItem>
  5274. <FormItem
  5275. className="half-item"
  5276. {...formItemLayout}
  5277. label="首付金额(万元)"
  5278. >
  5279. <span>{this.state.firstAmount}</span>
  5280. </FormItem>
  5281. <FormItem
  5282. className="half-item"
  5283. {...formItemLayout}
  5284. label="已收款项"
  5285. >
  5286. <span>
  5287. {this.state.settlementAmount + "万元"}
  5288. </span>
  5289. {/* {this.state.settlementAmount ? (
  5290. <Button
  5291. type="primary"
  5292. onClick={this.tuikuan}
  5293. style={{
  5294. float: "right",
  5295. marginRight: "50px",
  5296. marginBottom: "15px"
  5297. }}
  5298. >
  5299. 退单
  5300. </Button>
  5301. ) : (
  5302. ""
  5303. )} */}
  5304. </FormItem>
  5305. </div>
  5306. )}
  5307. <h3
  5308. style={{
  5309. marginLeft: 10,
  5310. fontWeight: 800,
  5311. marginBottom: 10,
  5312. }}
  5313. >
  5314. 联系信息
  5315. </h3>
  5316. {this.state.processStatus == 0 ? (
  5317. <div className="clearfix">
  5318. <div className="clearfix">
  5319. <FormItem
  5320. className="half-item"
  5321. style={{ width: "80%" }}
  5322. labelCol={{ span: 5 }}
  5323. wrapperCol={{ span: 18 }}
  5324. label="客户名称"
  5325. >
  5326. <span>{this.state.userName}</span>
  5327. <EnterpriseNameChange
  5328. type="journal"
  5329. style={{ marginLeft: 10 }}
  5330. enterpriseId={this.state.orderUid}
  5331. />
  5332. </FormItem>
  5333. </div>
  5334. <FormItem
  5335. className="half-item"
  5336. {...formItemLayout}
  5337. label="企业联系人"
  5338. >
  5339. <Input
  5340. placeholder="请输入联系人"
  5341. ref="signTotalAmount"
  5342. value={this.state.contacts}
  5343. onChange={(e) => {
  5344. this.setState({ contacts: e.target.value });
  5345. }}
  5346. style={{ width: "240px" }}
  5347. />
  5348. </FormItem>
  5349. <FormItem
  5350. className="half-item"
  5351. {...formItemLayout}
  5352. label="联系人电话"
  5353. >
  5354. <Input
  5355. placeholder="请输入联系人电话"
  5356. ref="signTotalAmount"
  5357. value={this.state.contactMobile}
  5358. onChange={(e) => {
  5359. this.setState({
  5360. contactMobile: e.target.value,
  5361. });
  5362. }}
  5363. style={{ width: "240px" }}
  5364. />
  5365. </FormItem>
  5366. <FormItem
  5367. className="half-item"
  5368. {...formItemLayout}
  5369. label="企业法人"
  5370. >
  5371. <Input
  5372. placeholder="请输入法人"
  5373. ref="signTotalAmount"
  5374. value={this.state.legalPerson}
  5375. onChange={(e) => {
  5376. this.setState({
  5377. legalPerson: e.target.value,
  5378. });
  5379. }}
  5380. style={{ width: "240px" }}
  5381. />
  5382. </FormItem>
  5383. <FormItem
  5384. className="half-item"
  5385. {...formItemLayout}
  5386. label="法人电话"
  5387. >
  5388. <Input
  5389. placeholder="请输入法人电话"
  5390. ref="signTotalAmount"
  5391. value={this.state.legalPersonTel}
  5392. onChange={(e) => {
  5393. this.setState({
  5394. legalPersonTel: e.target.value,
  5395. });
  5396. }}
  5397. style={{ width: "240px" }}
  5398. />
  5399. </FormItem>
  5400. </div>
  5401. ) : (
  5402. <div className="clearfix">
  5403. {formItemList.map((data, index) => {
  5404. return (
  5405. <FormItem
  5406. className="half-item"
  5407. {...formItemLayout}
  5408. key={index}
  5409. label={data.label}
  5410. >
  5411. {data.content}
  5412. </FormItem>
  5413. );
  5414. })}
  5415. </div>
  5416. )}
  5417. <div className="clearfix">
  5418. {this.state.processStatus == 0 ? (
  5419. <div>
  5420. <FormItem
  5421. labelCol={{ span: 4 }}
  5422. wrapperCol={{ span: 18 }}
  5423. label={
  5424. <span>
  5425. <strong style={{ color: "#f00" }}>
  5426. *
  5427. </strong>
  5428. 合同扫描件
  5429. </span>
  5430. }
  5431. >
  5432. <PicturesWall
  5433. domId={"addService1"}
  5434. fileList={this.getOrgCodeUrl}
  5435. pictureUrl={this.state.orgCodeUrl}
  5436. url="/api/admin/order/uploadOrderImg"
  5437. sign=""
  5438. />
  5439. <p>图片建议:要清晰。</p>
  5440. <Button
  5441. style={{
  5442. float: "right",
  5443. marginRight: "140px",
  5444. marginTop: "20px",
  5445. }}
  5446. onClick={this.getOrderLog}
  5447. >
  5448. 查看订单日志
  5449. </Button>
  5450. </FormItem>
  5451. <FormItem
  5452. labelCol={{ span: 4 }}
  5453. wrapperCol={{ span: 18 }}
  5454. label={<span>补充协议</span>}
  5455. >
  5456. <PicturesWall
  5457. domId={"addService2"}
  5458. fileList={this.getReplenishUrl}
  5459. pictureUrl={this.state.replenishUrl}
  5460. url="/api/admin/order/uploadOrderImg"
  5461. sign=""
  5462. />
  5463. <p>图片建议:要清晰。</p>
  5464. </FormItem>
  5465. </div>
  5466. ) : (
  5467. <div>
  5468. <FormItem
  5469. labelCol={{ span: 4 }}
  5470. wrapperCol={{ span: 18 }}
  5471. label="合同扫描件"
  5472. >
  5473. <div
  5474. style={{
  5475. paddingTop: "10px",
  5476. paddingBottom: "10px",
  5477. }}
  5478. >
  5479. {this.state.orgCodeUrl &&
  5480. this.state.visible &&
  5481. this.state.activeKey === "1" ? (
  5482. <ImgList
  5483. domId={"addService3"}
  5484. fileList={this.state.orgCodeUrl}
  5485. ItemWidth={"96px"}
  5486. />
  5487. ) : (
  5488. <div />
  5489. )}
  5490. </div>
  5491. <Modal
  5492. maskClosable={false}
  5493. footer={null}
  5494. width={"50%"}
  5495. visible={this.state.previewVisible}
  5496. onCancel={() => {
  5497. this.setState({
  5498. previewVisible: false,
  5499. rotateDeg: 0,
  5500. });
  5501. }}
  5502. >
  5503. <img
  5504. alt=""
  5505. style={{
  5506. width: "100%",
  5507. transform: `rotate(${this.state.rotateDeg}deg)`,
  5508. }}
  5509. src={this.state.previewImage || ""}
  5510. />
  5511. <Button
  5512. onClick={this.rotate}
  5513. style={{
  5514. position: "relative",
  5515. left: "50%",
  5516. transform: "translateX(-50%)",
  5517. }}
  5518. >
  5519. 旋转
  5520. </Button>
  5521. <Button
  5522. onClick={this.upImg}
  5523. style={{
  5524. position: "absolute",
  5525. left: -81,
  5526. top: "50%",
  5527. transform: "translateY(-50%)",
  5528. }}
  5529. >
  5530. 上一张
  5531. </Button>
  5532. <Button
  5533. onClick={this.downImg}
  5534. style={{
  5535. position: "absolute",
  5536. right: -81,
  5537. top: "50%",
  5538. transform: "translateY(-50%)",
  5539. }}
  5540. >
  5541. 下一张
  5542. </Button>
  5543. </Modal>
  5544. <Button
  5545. style={{
  5546. float: "right",
  5547. marginRight: "140px",
  5548. marginTop: "20px",
  5549. }}
  5550. onClick={this.getOrderLog}
  5551. >
  5552. 查看订单日志
  5553. </Button>
  5554. </FormItem>
  5555. <FormItem
  5556. labelCol={{ span: 4 }}
  5557. wrapperCol={{ span: 18 }}
  5558. label="补充协议"
  5559. >
  5560. <div
  5561. style={{
  5562. paddingTop: "10px",
  5563. paddingBottom: "10px",
  5564. }}
  5565. >
  5566. {this.state.visible &&
  5567. this.state.activeKey === "1" &&
  5568. this.state.replenishUrl ? (
  5569. <ImgList
  5570. domId={"addService4"}
  5571. fileList={this.state.replenishUrl}
  5572. ItemWidth={"96px"}
  5573. />
  5574. ) : (
  5575. <div />
  5576. )}
  5577. </div>
  5578. <Modal
  5579. maskClosable={false}
  5580. footer={null}
  5581. width={"50%"}
  5582. visible={this.state.previewVisibles}
  5583. onCancel={() => {
  5584. this.setState({
  5585. previewVisibles: false,
  5586. rotateDeg: 0,
  5587. });
  5588. }}
  5589. >
  5590. <img
  5591. alt=""
  5592. style={{
  5593. width: "100%",
  5594. transform: `rotate(${this.state.rotateDeg}deg)`,
  5595. }}
  5596. src={this.state.previewImage || ""}
  5597. />
  5598. <Button
  5599. onClick={this.rotates}
  5600. style={{
  5601. position: "relative",
  5602. left: "50%",
  5603. transform: "translateX(-50%)",
  5604. }}
  5605. >
  5606. 旋转
  5607. </Button>
  5608. <Button
  5609. onClick={this.upImgs}
  5610. style={{
  5611. position: "absolute",
  5612. left: -81,
  5613. top: "50%",
  5614. transform: "translateY(-50%)",
  5615. }}
  5616. >
  5617. 上一张
  5618. </Button>
  5619. <Button
  5620. onClick={this.downImgs}
  5621. style={{
  5622. position: "absolute",
  5623. right: -81,
  5624. top: "50%",
  5625. transform: "translateY(-50%)",
  5626. }}
  5627. >
  5628. 下一张
  5629. </Button>
  5630. </Modal>
  5631. </FormItem>
  5632. </div>
  5633. )}
  5634. </div>
  5635. {/* 服务内容 */}
  5636. <div class="clearfix" style={{ display: "flex", margin: " 0 0 10px 80px" }}>
  5637. <div style={{ marginRight: "6px" }}>
  5638. <div style={{ display: "flex" }}><span style={{ color: 'red' }}>*</span><span style={{ color: "#333" }}>服务内容:</span></div>
  5639. </div>
  5640. <div>
  5641. {this.state.processStatus == 0 ?
  5642. <div>
  5643. <PicturesWall
  5644. domId={"addServiceContent"}
  5645. fileList={this.getContentUrl}
  5646. pictureUrl={this.state.contentUrl}
  5647. url="/api/admin/order/uploadOrderImg"
  5648. sign=""
  5649. />
  5650. <p> <span style={{ color: "red", display: "inline-block" }}>(请将合同中的服务内容,截图上传!含服务年限,时间节点等;)</span>图片建议:要清晰。</p>
  5651. </div> :
  5652. this.state.contentUrl.length > 0 ?
  5653. <div>
  5654. <ImgList
  5655. domId={"addService13"}
  5656. fileList={this.state.contentUrl}
  5657. ItemWidth={"96px"}
  5658. />
  5659. <Modal
  5660. maskClosable={false}
  5661. footer={null}
  5662. width={"50%"}
  5663. visible={this.state.previewVisibleCont}
  5664. onCancel={() => {
  5665. this.setState({
  5666. previewVisibleCont: false,
  5667. rotateDeg: 0,
  5668. });
  5669. }}
  5670. >
  5671. <img
  5672. alt=""
  5673. style={{
  5674. width: "100%",
  5675. transform: `rotate(${this.state.rotateDeg}deg)`,
  5676. }}
  5677. src={this.state.previewImage || ""}
  5678. />
  5679. <Button
  5680. onClick={this.rotateCont}
  5681. style={{
  5682. position: "relative",
  5683. left: "50%",
  5684. transform: "translateX(-50%)",
  5685. }}
  5686. >
  5687. 旋转
  5688. </Button>
  5689. <Button
  5690. onClick={this.upImgCont}
  5691. style={{
  5692. position: "absolute",
  5693. left: -81,
  5694. top: "50%",
  5695. transform: "translateY(-50%)",
  5696. }}
  5697. >
  5698. 上一张
  5699. </Button>
  5700. <Button
  5701. onClick={this.downImgCont}
  5702. style={{
  5703. position: "absolute",
  5704. right: -81,
  5705. top: "50%",
  5706. transform: "translateY(-50%)",
  5707. }}
  5708. >
  5709. 下一张
  5710. </Button>
  5711. </Modal>
  5712. </div> : "暂无附件!"}
  5713. </div>
  5714. </div>
  5715. {/* 服务内容结束 */}
  5716. <div className="clearfix">
  5717. {this.state.processStatus == 0 ? (
  5718. <div className="clearfix">
  5719. <FormItem
  5720. labelCol={{ span: 4 }}
  5721. wrapperCol={{ span: 16 }}
  5722. label={
  5723. <span>
  5724. <strong style={{ color: "#f00" }}>*</strong>
  5725. 订单留言
  5726. </span>
  5727. }
  5728. >
  5729. <Input
  5730. ref="orderRemarksRef"
  5731. type="textarea"
  5732. placeholder="请输入订单留言"
  5733. rows={4}
  5734. value={this.state.orderRemarks}
  5735. onChange={(e) => {
  5736. this.setState({
  5737. orderRemarks: e.target.value,
  5738. });
  5739. }}
  5740. style={{ width: "95%" }}
  5741. />
  5742. <div className="mandatory">
  5743. 重要提示:请详细填写合同中包含的服务内容、服务年限、时间节点等
  5744. </div>
  5745. </FormItem>
  5746. </div>
  5747. ) : (
  5748. <FormItem
  5749. labelCol={{ span: 4 }}
  5750. wrapperCol={{ span: 16 }}
  5751. label="订单留言"
  5752. >
  5753. <p
  5754. style={{ width: 500, wordWrap: "break-word" }}
  5755. >
  5756. {this.state.orderRemarks}
  5757. </p>
  5758. </FormItem>
  5759. )}
  5760. </div>
  5761. <div className="clearfix">
  5762. <FormItem
  5763. className="half-item"
  5764. {...formItemLayout}
  5765. label="订单负责人"
  5766. >
  5767. <span>{this.state.salesmanName}</span>
  5768. </FormItem>
  5769. <FormItem
  5770. className="half-item"
  5771. {...formItemLayout}
  5772. label="订单负责人电话"
  5773. >
  5774. <span>{this.state.salesmanMobile}</span>
  5775. </FormItem>
  5776. </div>
  5777. <div className="clearfix">
  5778. <FormItem
  5779. className="half-item"
  5780. {...formItemLayout}
  5781. label="当前财务负责人"
  5782. >
  5783. <span>{this.state.nowFinance}</span>
  5784. </FormItem>
  5785. <FormItem
  5786. className="half-item"
  5787. {...formItemLayout}
  5788. label="当前财务负责人电话"
  5789. >
  5790. <span>{this.state.nowFinanceMobile}</span>
  5791. </FormItem>
  5792. </div>
  5793. <div className="clearfix">
  5794. <FormItem
  5795. className="half-item"
  5796. {...formItemLayout}
  5797. style={{ opacity: ".5" }}
  5798. label="原订单负责人"
  5799. >
  5800. <span>{this.state.oldSalesmanName}</span>
  5801. </FormItem>
  5802. <FormItem
  5803. className="half-item"
  5804. {...formItemLayout}
  5805. style={{ opacity: ".5" }}
  5806. label="原订单负责人电话"
  5807. >
  5808. <span>{this.state.oldSalesmanMobile}</span>
  5809. </FormItem>
  5810. </div>
  5811. <div className="clearfix">
  5812. <FormItem
  5813. className="half-item"
  5814. style={{ opacity: ".5" }}
  5815. {...formItemLayout}
  5816. label="实际财务操作人"
  5817. >
  5818. <span>{this.state.financeName}</span>
  5819. </FormItem>
  5820. <FormItem
  5821. className="half-item"
  5822. {...formItemLayout}
  5823. style={{ opacity: ".5" }}
  5824. label="实际财务操作人电话"
  5825. >
  5826. <span>{this.state.financeMobile}</span>
  5827. </FormItem>
  5828. </div>
  5829. {/* 新增协单人员 */}
  5830. <div>
  5831. <div style={{ marginLeft: "50px", display: 'flex' }}>
  5832. <div
  5833. style={{
  5834. minWidth: '66px',
  5835. maxWidth: '100px',
  5836. fontSize: "12px",
  5837. color: "red",
  5838. }}
  5839. >
  5840. 协单人员 :
  5841. </div>
  5842. <div>
  5843. {this.state.personnel.length > 0
  5844. ? this.state.personnel.map(function (value, key) {
  5845. return (
  5846. <Tag
  5847. style={{ marginBottom: '5px' }}
  5848. key={value.id}
  5849. closable={closable}
  5850. onClose={(e) => {
  5851. e.preventDefault();
  5852. confirm({
  5853. title: "确定删除此人员吗?",
  5854. // content: (
  5855. // <span style={{ color: "red" }}>
  5856. // 删除后会将该项目下的所有催款节点自动清除!!!
  5857. // </span>
  5858. // ),
  5859. onOk() {
  5860. $.ajax({
  5861. method: "post",
  5862. dataType: "json",
  5863. crossDomain: false,
  5864. url:
  5865. globalConfig.context +
  5866. "/api/admin/newOrder/deleteAssist",
  5867. data: {
  5868. id: value.id,
  5869. },
  5870. success: function (data) {
  5871. if (data.error.length) {
  5872. message.warning(
  5873. data.error[0].message
  5874. );
  5875. } else {
  5876. message.success("删除成功");
  5877. assistList();
  5878. }
  5879. }.bind(this),
  5880. }).always(
  5881. function () {
  5882. this.setState({
  5883. loading: false,
  5884. });
  5885. }.bind(this)
  5886. );
  5887. },
  5888. onCancel() { },
  5889. });
  5890. }}
  5891. >
  5892. {value.name}
  5893. </Tag>
  5894. );
  5895. })
  5896. : "无"}
  5897. </div>
  5898. </div>
  5899. <div
  5900. style={{
  5901. margin: "10px 0 0 50px",
  5902. display: this.state.disabledView,
  5903. }}
  5904. >
  5905. <Button
  5906. type="primary"
  5907. onClick={() => {
  5908. this.setState({
  5909. coorVisible: "block",
  5910. coor: "",
  5911. });
  5912. }}
  5913. >
  5914. 添加协单人员
  5915. </Button>
  5916. {/* 提示 */}
  5917. <div style={{ color: "red" }}>
  5918. 注:协单人员为技术人员,陪同营销人员进行订单协作等相关工作,填写后将统计至相关的奖金、提成等
  5919. </div>
  5920. </div>
  5921. {/*添加协单人员 */}
  5922. <div
  5923. style={{
  5924. margin: "10px 0 0 50px",
  5925. display: this.state.coorVisible,
  5926. }}
  5927. >
  5928. <Form
  5929. onSubmit={this.handleSubmit}
  5930. ref={this.formRef}
  5931. >
  5932. <Form.Item
  5933. {...formItemLayout}
  5934. label=""
  5935. name="coor"
  5936. hasFeedback
  5937. >
  5938. <AutoComplete
  5939. // autocomplete="off"
  5940. allowClear
  5941. dataSource={dataSourceView}
  5942. style={{ width: 200 }}
  5943. onSelect={this.onSelectView}
  5944. onSearch={this.handleSearch}
  5945. placeholder="请输入名称"
  5946. />
  5947. </Form.Item>
  5948. </Form>
  5949. <div style={{ marginLeft: "10px" }}>
  5950. <Button
  5951. type="primary"
  5952. style={{ marginRight: "54px" }}
  5953. onClick={this.submitOrder}
  5954. loading={this.state.loading}
  5955. >
  5956. 保存
  5957. </Button>
  5958. <Button
  5959. onClick={() => {
  5960. this.setState({
  5961. coorVisible: "none",
  5962. });
  5963. }}
  5964. >
  5965. 取消
  5966. </Button>
  5967. </div>
  5968. </div>
  5969. </div>
  5970. {/* 分界线 */}
  5971. <div
  5972. style={{
  5973. borderTop: "1px solid #333",
  5974. margin: "5px 0",
  5975. }}
  5976. ></div>
  5977. {/* 上门服务次数 */}
  5978. <div>
  5979. <div
  5980. style={{
  5981. display: "flex",
  5982. justifyContent: "space-between",
  5983. }}
  5984. >
  5985. <div
  5986. style={{ marginLeft: "50px", fontSize: "20px" }}
  5987. >
  5988. 上门服务次数
  5989. </div>
  5990. <div>
  5991. <Button
  5992. type="primary"
  5993. style={{ marginRight: "5px" }}
  5994. onClick={() => {
  5995. this.publicByOrder();
  5996. this.setState({
  5997. modalRecord: true,
  5998. });
  5999. }}
  6000. >
  6001. 查看上门记录
  6002. </Button>
  6003. <Button
  6004. style={{ display: this.state.disabledView }}
  6005. type="primary"
  6006. onClick={() => {
  6007. this.setState({
  6008. modalView: true,
  6009. dateView: '',
  6010. contentView: '',
  6011. remarksView: '',
  6012. contentViewLength: 0,
  6013. contentViewLength1: 0,
  6014. });
  6015. }}
  6016. >
  6017. 添加上门次数
  6018. </Button>
  6019. </div>
  6020. </div>
  6021. {/* 上门服务表格 */}
  6022. <div
  6023. className="patent-table"
  6024. style={{ marginBottom: 10 }}
  6025. >
  6026. <Spin spinning={this.state.loading}>
  6027. <Table
  6028. columns={this.state.columnsView}
  6029. scroll={{ x: "max-content", y: 0 }}
  6030. dataSource={this.state.dataView}
  6031. pagination={false}
  6032. // onRowClick={this.tableRowClick}
  6033. bordered
  6034. size="small"
  6035. />
  6036. </Spin>
  6037. </div>
  6038. {/* 查看上门记录 */}
  6039. <Modal
  6040. footer=""
  6041. title="技术人员上门详细记录"
  6042. visible={this.state.modalRecord}
  6043. width="900px"
  6044. onCancel={() => {
  6045. this.setState({
  6046. modalRecord: false,
  6047. });
  6048. }}
  6049. >
  6050. <Spin spinning={this.state.loading}>
  6051. <Table
  6052. columns={this.state.columnsRecord}
  6053. scroll={{ x: "max-content", y: 0 }}
  6054. dataSource={this.state.publicView}
  6055. pagination={false}
  6056. // onRowClick={this.tableRowClick}
  6057. bordered
  6058. size="small"
  6059. />
  6060. </Spin>
  6061. </Modal>
  6062. {/* 添加上门次数模态框 */}
  6063. <Modal
  6064. footer=""
  6065. title="新增上门次数"
  6066. visible={this.state.modalView}
  6067. key={this.state.viewKey}
  6068. onCancel={() => {
  6069. this.setState({
  6070. modalView: false,
  6071. viewKey: this.state.viewKey + 1,
  6072. });
  6073. }}
  6074. >
  6075. <Form
  6076. onSubmit={this.handleSubmit}
  6077. ref={this.formRef}
  6078. style={{ marginRight: "120px" }}
  6079. >
  6080. <Form.Item
  6081. {...formItemLayout}
  6082. label="上门时间"
  6083. name="date"
  6084. hasFeedback
  6085. >
  6086. <DatePicker
  6087. placeholder="预计技术员上门服务时间"
  6088. onChange={(date, dateString) => {
  6089. this.setState({
  6090. dateView: dateString,
  6091. });
  6092. }}
  6093. />
  6094. </Form.Item>
  6095. <Form.Item
  6096. {...formItemLayout}
  6097. label="服务内容"
  6098. name="remarks"
  6099. hasFeedback
  6100. style={{ position: 'relative' }}
  6101. >
  6102. <TextArea
  6103. rows={4}
  6104. placeholder="需要技术员上门服务内容"
  6105. onChange={(e) => {
  6106. this.setState({
  6107. contentView: e.target.value,
  6108. }, () => {
  6109. if (!this.state.contentView) {
  6110. this.setState({
  6111. contentViewLength: 0,
  6112. })
  6113. } else {
  6114. this.setState({
  6115. contentViewLength: this.state.contentView.length
  6116. })
  6117. }
  6118. });
  6119. }}
  6120. maxLength={500}
  6121. >
  6122. </TextArea>
  6123. <div style={{ position: 'absolute', right: '20px', bottom: '-5px', zIndex: '10' }}>{this.state.contentViewLength + '/500'}</div>
  6124. </Form.Item>
  6125. <Form.Item
  6126. {...formItemLayout}
  6127. label="备注"
  6128. name="remarks"
  6129. hasFeedback
  6130. style={{ position: 'relative' }}
  6131. >
  6132. <TextArea
  6133. rows={4}
  6134. maxLength={500}
  6135. placeholder="需要技术员注意事项"
  6136. onChange={(e) => {
  6137. this.setState({
  6138. remarksView: e.target.value,
  6139. }, () => {
  6140. if (!this.state.remarksView) {
  6141. this.setState({
  6142. contentViewLength1: 0,
  6143. })
  6144. } else {
  6145. this.setState({
  6146. contentViewLength1: this.state.remarksView.length
  6147. })
  6148. }
  6149. });
  6150. }}
  6151. />
  6152. <div style={{ position: 'absolute', right: '20px', bottom: '-5px', zIndex: '10' }}>{this.state.contentViewLength1 + '/500'}</div>
  6153. </Form.Item>
  6154. </Form>
  6155. <div
  6156. style={{
  6157. display: "flex",
  6158. justifyContent: "center",
  6159. }}
  6160. >
  6161. <Button
  6162. onClick={this.submitView}
  6163. type="primary"
  6164. loading={this.state.loading}
  6165. >
  6166. 提交
  6167. </Button>
  6168. <Button
  6169. type="dashed"
  6170. style={{ marginLeft: "15px" }}
  6171. onClick={() => {
  6172. this.setState({
  6173. modalView: false,
  6174. viewKey: this.state.viewKey + 1,
  6175. dateView: '',
  6176. contentView: '',
  6177. remarksView: '',
  6178. contentViewLength: 0,
  6179. contentViewLength1: 0,
  6180. });
  6181. }}
  6182. >
  6183. 取消
  6184. </Button>
  6185. </div>
  6186. </Modal>
  6187. </div>
  6188. <div>
  6189. <span
  6190. style={{ marginLeft: "50px", fontSize: "20px" }}
  6191. >
  6192. 项目业务
  6193. </span>
  6194. {this.state.processStatus == 0 ? (
  6195. <Button
  6196. type="primary"
  6197. onClick={this.addDetailed}
  6198. style={{
  6199. float: "right",
  6200. marginRight: "50px",
  6201. marginBottom: "15px",
  6202. }}
  6203. >
  6204. 添加项目明细
  6205. </Button>
  6206. ) : (
  6207. ""
  6208. )}
  6209. </div>
  6210. <div
  6211. className="patent-table"
  6212. style={{ marginBottom: 10 }}
  6213. >
  6214. <Spin spinning={this.state.loading}>
  6215. <Table
  6216. columns={this.state.columns}
  6217. scroll={{ x: "max-content", y: 0 }}
  6218. dataSource={this.state.dataSource}
  6219. pagination={this.state.pagination}
  6220. onRowClick={this.tableRowClick}
  6221. bordered
  6222. size="small"
  6223. />
  6224. </Spin>
  6225. </div>
  6226. <div
  6227. style={{
  6228. display: cuiDataList.length ? "block" : "none",
  6229. }}
  6230. >
  6231. <span
  6232. style={{ marginLeft: "50px", fontSize: "20px" }}
  6233. >
  6234. 旧催款节点
  6235. </span>
  6236. <Button
  6237. type="primary"
  6238. // onClick={this.addcontact}
  6239. disabled
  6240. onClick={(e) => {
  6241. cuiDataList.length
  6242. ? this.addcontact()
  6243. : this.addcontactNew();
  6244. }}
  6245. style={{
  6246. float: "right",
  6247. marginRight: "50px",
  6248. marginBottom: "15px",
  6249. display:
  6250. this.state.processStatus == 0
  6251. ? "block"
  6252. : "none",
  6253. }}
  6254. >
  6255. 添加催款节点
  6256. </Button>
  6257. </div>
  6258. <div
  6259. className="clearfix"
  6260. style={{
  6261. display: cuiDataList.length ? "block" : "none",
  6262. }}
  6263. >
  6264. <Spin spinning={this.state.loading}>
  6265. <Form layout="horizontal">
  6266. <Table
  6267. pagination={false}
  6268. columns={this.state.ContactsLists}
  6269. dataSource={this.state.contactList}
  6270. scroll={{ x: "max-content", y: 0 }}
  6271. bordered
  6272. size="small"
  6273. />
  6274. <Col
  6275. span={24}
  6276. offset={9}
  6277. style={{ marginTop: "15px" }}
  6278. ></Col>
  6279. </Form>
  6280. </Spin>
  6281. </div>
  6282. <div
  6283. style={{
  6284. display: cuiDataList.length ? "none" : "block",
  6285. }}
  6286. >
  6287. <span
  6288. style={{
  6289. marginLeft: "50px",
  6290. fontSize: "20px",
  6291. }}
  6292. >
  6293. 新催款节点
  6294. </span>
  6295. <span
  6296. style={{
  6297. display: "inline-block",
  6298. marginLeft: 10,
  6299. color: "red",
  6300. }}
  6301. >
  6302. 金额总计(万元): {this.state.totalCui}
  6303. </span>
  6304. <Button
  6305. type="primary"
  6306. disabled={this.state.addFlag ? true : false}
  6307. // onClick={this.addcontact}
  6308. onClick={(e) => {
  6309. this.setState({ addFlag: true });
  6310. this.addcontactNew();
  6311. }}
  6312. style={{
  6313. float: "right",
  6314. marginRight: "50px",
  6315. marginBottom: "15px",
  6316. display:
  6317. this.state.processStatus == 0
  6318. ? "block"
  6319. : "none",
  6320. }}
  6321. >
  6322. 添加催款节点
  6323. </Button>
  6324. </div>
  6325. <div
  6326. className="clearfix"
  6327. style={{
  6328. display: cuiDataList.length ? "none" : "block",
  6329. }}
  6330. >
  6331. <Spin spinning={this.state.loading}>
  6332. <Form layout="horizontal">
  6333. <Table
  6334. pagination={false}
  6335. columns={this.state.ContactsListsNew}
  6336. dataSource={this.state.contactListNew}
  6337. scroll={{ x: "max-content", y: 0 }}
  6338. bordered
  6339. size="small"
  6340. />
  6341. <Col
  6342. span={24}
  6343. offset={9}
  6344. style={{ marginTop: "15px" }}
  6345. ></Col>
  6346. </Form>
  6347. </Spin>
  6348. </div>
  6349. {this.state.processStatus == 0 &&
  6350. <div
  6351. className="addSave"
  6352. style={{ marginTop: "15px" }}
  6353. >
  6354. <Button
  6355. className="cancel"
  6356. type="primary"
  6357. onClick={this.handleCancels}
  6358. style={{ marginLeft: "200px" }}
  6359. htmlType="submit"
  6360. loading={this.state.loading}
  6361. >
  6362. 签单
  6363. </Button>
  6364. <Button
  6365. className="cancel"
  6366. type="primary"
  6367. onClick={this.handleCancelq}
  6368. style={{ marginLeft: "50px" }}
  6369. htmlType="submit"
  6370. loading={this.state.loading}
  6371. >
  6372. 保存
  6373. </Button>
  6374. <Popconfirm
  6375. title="请确认您是否作废此订单??"
  6376. onConfirm={(e) => {
  6377. this.examOks()
  6378. }}
  6379. okText="确认"
  6380. cancelText="取消"
  6381. >
  6382. <Button
  6383. className="cancel"
  6384. type="danger"
  6385. // onClick={this.examOks}
  6386. style={{ marginLeft: "50px" }}
  6387. loading={this.state.loading}
  6388. >
  6389. 订单作废
  6390. </Button>
  6391. </Popconfirm>
  6392. <Button
  6393. className="cancel"
  6394. type="ghost"
  6395. onClick={this.handleCancelclose}
  6396. style={{ marginLeft: "50px" }}
  6397. >
  6398. 取消
  6399. </Button>
  6400. </div>
  6401. }
  6402. </div>
  6403. </TabPane>
  6404. <TabPane tab="合同变更发起" key="2">
  6405. {
  6406. <div>
  6407. <div className="clearfix">
  6408. <FormItem
  6409. className="half-item"
  6410. {...formItemLayout}
  6411. label="客户名称"
  6412. >
  6413. <span>{this.state.userName}</span>
  6414. <EnterpriseNameChange
  6415. type="journal"
  6416. style={{ marginLeft: 10 }}
  6417. enterpriseId={this.state.orderUid}
  6418. />
  6419. </FormItem>
  6420. </div>
  6421. <div className="clearfix">
  6422. <FormItem
  6423. className="half-item"
  6424. {...formItemLayout}
  6425. label="合同编号"
  6426. >
  6427. <span>{this.state.contractNo}</span>
  6428. </FormItem>
  6429. </div>
  6430. <div className="clearfix">
  6431. <FormItem
  6432. className="half-item"
  6433. {...formItemLayout}
  6434. label="申请变更部门"
  6435. >
  6436. <span>{this.state.depName}</span>
  6437. </FormItem>
  6438. <FormItem
  6439. className="half-item"
  6440. {...formItemLayout}
  6441. label="申请人"
  6442. >
  6443. <span>{this.state.salesmanName}</span>
  6444. </FormItem>
  6445. </div>
  6446. <div className="clearfix">
  6447. <FormItem
  6448. labelCol={{ span: 4 }}
  6449. wrapperCol={{ span: 18 }}
  6450. label="变更类型"
  6451. >
  6452. <Select
  6453. placeholder="选择合同变更类型"
  6454. style={{ width: 200 }}
  6455. disabled={this.state.changeFlag}
  6456. value={this.state.typeChange}
  6457. onChange={(e) => {
  6458. this.setState({
  6459. typeChange: e,
  6460. changeFlag: true,
  6461. });
  6462. if (e == 1) {
  6463. this.setState({
  6464. hetongFlag: false,
  6465. listFlag: false,
  6466. listCuiFlag: false,
  6467. tuiKuanFlag: false,
  6468. displayList: false,
  6469. });
  6470. } else if (e == 2) {
  6471. this.setState({
  6472. hetongFlag: true,
  6473. listFlag: false,
  6474. listCuiFlag: false,
  6475. tuiKuanFlag: true,
  6476. displayList: false,
  6477. });
  6478. } else if (e == 3) {
  6479. this.setState({
  6480. listFlag: false,
  6481. hetongFlag: false,
  6482. listCuiFlag: false,
  6483. tuiKuanFlag: false,
  6484. displayList: true,
  6485. });
  6486. } else if (e == 4) {
  6487. this.setState({
  6488. listFlag: false,
  6489. listCuiFlag: false,
  6490. hetongFlag: false,
  6491. tuiKuanFlag: true,
  6492. displayList: false,
  6493. });
  6494. } else if (e == 5) {
  6495. this.setState({
  6496. listFlag: false,
  6497. listCuiFlag: false,
  6498. hetongFlag: true,
  6499. tuiKuanFlag: true,
  6500. displayList: false,
  6501. });
  6502. } else {
  6503. this.setState({
  6504. listFlag: true,
  6505. hetongFlag: true,
  6506. listCuiFlag: true,
  6507. tuiKuanFlag: false,
  6508. displayList: false,
  6509. });
  6510. }
  6511. }}
  6512. >
  6513. <Option value={0}>退单退款</Option>
  6514. <Option value={1}>项目及金额变更</Option>
  6515. <Option value={2}>仅项目变更</Option>
  6516. <Option value={3}>仅金额变更</Option>
  6517. <Option value={4}>重报</Option>
  6518. <Option value={5}>赠送</Option>
  6519. </Select>
  6520. <Button
  6521. style={{ marginLeft: 10 }}
  6522. onClick={(e) => {
  6523. this.setState({
  6524. listFlag: false,
  6525. hetongFlag: false,
  6526. listCuiFlag: false,
  6527. tuiKuanFlag: false,
  6528. displayList: false,
  6529. startRemarks: "",
  6530. remarksC: "",
  6531. voucherUrl: [],
  6532. changeAmount: "0",
  6533. applicant: undefined,
  6534. depNameChange: undefined,
  6535. typeChange: undefined,
  6536. changeFlag: false,
  6537. });
  6538. }}
  6539. >
  6540. 重置
  6541. </Button>
  6542. {this.state.status === 3 ? (
  6543. <Button
  6544. type="danger"
  6545. style={{
  6546. float: "right",
  6547. backgroundColor: "red",
  6548. color: "white",
  6549. position: "absolute",
  6550. right: 0,
  6551. height: 50,
  6552. borderRadius: 20,
  6553. zIndex: 100,
  6554. top: 0,
  6555. }}
  6556. onClick={(e) => {
  6557. e.stopPropagation();
  6558. this.showConfirmChange(this.deleteChange);
  6559. }}
  6560. >
  6561. 取消本次变更
  6562. </Button>
  6563. ) : (
  6564. ""
  6565. )}
  6566. </FormItem>
  6567. </div>
  6568. <div className="clearfix">
  6569. <FormItem
  6570. labelCol={{ span: 4 }}
  6571. wrapperCol={{ span: 18 }}
  6572. label="合同额(万元)"
  6573. >
  6574. <Input
  6575. placeholder="请输入合同额"
  6576. disabled={this.state.hetongFlag}
  6577. ref="signTotalAmount"
  6578. value={this.state.totalAmount}
  6579. onChange={(e) => {
  6580. this.setState({
  6581. totalAmount: e.target.value,
  6582. });
  6583. }}
  6584. style={{ width: "240px" }}
  6585. />
  6586. </FormItem>
  6587. <FormItem
  6588. labelCol={{ span: 4 }}
  6589. wrapperCol={{ span: 18 }}
  6590. label="已收款(万元)"
  6591. >
  6592. <span>
  6593. {this.state.settlementAmount}
  6594. &nbsp;&nbsp;&nbsp;&nbsp;
  6595. <span style={{ color: "red" }}>
  6596. (注:已收款与现实收款不符,请与财务专员联系)
  6597. </span>
  6598. </span>
  6599. </FormItem>
  6600. <FormItem
  6601. labelCol={{ span: 4 }}
  6602. wrapperCol={{ span: 18 }}
  6603. label="申请退款(万元)"
  6604. >
  6605. <Input
  6606. placeholder="请输入申请退款"
  6607. ref="signTotalAmount"
  6608. disabled={this.state.tuiKuanFlag}
  6609. value={this.state.changeAmount}
  6610. onChange={(e) => {
  6611. this.setState({
  6612. changeAmount: e.target.value,
  6613. });
  6614. }}
  6615. style={{ width: "240px" }}
  6616. />
  6617. </FormItem>
  6618. </div>
  6619. <div
  6620. style={{
  6621. display: this.state.isCaoGao ? "block" : "none",
  6622. }}
  6623. >
  6624. <div>
  6625. <span
  6626. style={{
  6627. marginLeft: "50px",
  6628. fontSize: "20px",
  6629. }}
  6630. >
  6631. 项目业务
  6632. </span>
  6633. <span style={{ color: "red" }}>
  6634. (注:项目删除后,此项目的全部节点、全部工时,全部被删除,请谨慎删除!双击可修改对应金额数量!)
  6635. </span>
  6636. <Button
  6637. type="primary"
  6638. onClick={this.changeAddPro}
  6639. disabled={this.state.listFlag}
  6640. style={{
  6641. float: "right",
  6642. marginRight: "50px",
  6643. marginBottom: "15px",
  6644. display: this.state.displayList
  6645. ? "none"
  6646. : "block",
  6647. }}
  6648. >
  6649. 添加项目明细
  6650. </Button>
  6651. </div>
  6652. <div
  6653. className="patent-table"
  6654. style={{ marginBottom: 10 }}
  6655. >
  6656. <Spin spinning={this.state.loading}>
  6657. <Table
  6658. columns={this.state.proColumns}
  6659. dataSource={this.state.proDataSource}
  6660. scroll={{ x: "max-content", y: 0 }}
  6661. expandedRowRender={expandedRowRender}
  6662. pagination={this.state.pagination}
  6663. onRowDoubleClick={
  6664. this.state.listFlag
  6665. ? this.not
  6666. : this.editPro
  6667. }
  6668. bordered
  6669. size="small"
  6670. />
  6671. </Spin>
  6672. </div>
  6673. <div>
  6674. <span
  6675. style={{
  6676. marginLeft: "50px",
  6677. fontSize: "20px",
  6678. }}
  6679. >
  6680. 催款节点
  6681. </span>
  6682. <span style={{ color: "red" }}>
  6683. (注:节点删除后,无论节点是否触发,均会删除,请谨慎删除!双击可修改对应金额!)
  6684. </span>
  6685. <Button
  6686. type="primary"
  6687. onClick={(e) => {
  6688. this.changeAddCui();
  6689. }}
  6690. disabled={this.state.listCuiFlag}
  6691. style={{
  6692. float: "right",
  6693. marginRight: "50px",
  6694. marginBottom: "15px",
  6695. display: this.state.displayList
  6696. ? "none"
  6697. : "block",
  6698. }}
  6699. >
  6700. 添加催款节点
  6701. </Button>
  6702. </div>
  6703. <div className="clearfix">
  6704. <Spin spinning={this.state.loading}>
  6705. <Form layout="horizontal">
  6706. <Table
  6707. pagination={false}
  6708. columns={this.state.changeCuiList}
  6709. dataSource={this.state.cuiDataSource}
  6710. scroll={{ x: "max-content", y: 0 }}
  6711. onRowDoubleClick={
  6712. this.state.listCuiFlag
  6713. ? this.not
  6714. : this.editCui
  6715. }
  6716. bordered
  6717. size="small"
  6718. />
  6719. <Col
  6720. span={24}
  6721. offset={9}
  6722. style={{ marginTop: "15px" }}
  6723. ></Col>
  6724. </Form>
  6725. </Spin>
  6726. </div>
  6727. </div>
  6728. <div className="clearfix">
  6729. <FormItem
  6730. style={{ height: "auto" }}
  6731. labelCol={{ span: 4 }}
  6732. wrapperCol={{ span: 18 }}
  6733. label="变更原因"
  6734. >
  6735. <TextArea
  6736. rows={4}
  6737. placeholder="请输入变更原因"
  6738. ref="signTotalAmount"
  6739. style={{ width: "95%" }}
  6740. value={this.state.remarksC}
  6741. onChange={(e) => {
  6742. this.setState({
  6743. remarksC: e.target.value,
  6744. });
  6745. }}
  6746. />
  6747. </FormItem>
  6748. </div>
  6749. <div className="clearfix">
  6750. <FormItem
  6751. style={{ height: "auto" }}
  6752. labelCol={{ span: 4 }}
  6753. wrapperCol={{ span: 18 }}
  6754. label="备注"
  6755. >
  6756. <TextArea
  6757. rows={4}
  6758. placeholder="请输入备注"
  6759. ref="signTotalAmount"
  6760. style={{ width: "95%" }}
  6761. value={this.state.startRemarks}
  6762. onChange={(e) => {
  6763. this.setState({
  6764. startRemarks: e.target.value,
  6765. });
  6766. }}
  6767. />
  6768. </FormItem>
  6769. </div>
  6770. <div className="clearfix">
  6771. <FormItem
  6772. labelCol={{ span: 4 }}
  6773. wrapperCol={{ span: 18 }}
  6774. label="变更凭证"
  6775. >
  6776. <PicturesWall
  6777. domId={"addService5"}
  6778. fileList={this.getVoucherUrl}
  6779. pictureUrl={this.state.voucherUrl}
  6780. url="/api/admin/orderChange/uploadFile"
  6781. sign="order_change_file"
  6782. />
  6783. <p>图片建议:要清晰。</p>
  6784. </FormItem>
  6785. </div>
  6786. <div className="clearfix">
  6787. <Button
  6788. type="primary"
  6789. style={{ float: "right", marginRight: 40 }}
  6790. // onClick={this.changeApply}
  6791. loading={this.state.loading}
  6792. onClick={(e) => {
  6793. if (this.state.isCaoGao) {
  6794. this.submitChange();
  6795. } else {
  6796. this.changeApply();
  6797. }
  6798. }}
  6799. >
  6800. {this.state.isCaoGao
  6801. ? "发起变更申请"
  6802. : this.state.typeChange == 0
  6803. ? "发起变更申请"
  6804. : "下一步"}
  6805. </Button>
  6806. </div>
  6807. {/* ) : (
  6808. ""
  6809. )} */}
  6810. </div>
  6811. }
  6812. </TabPane>
  6813. {this.state.isJilu ? (
  6814. <TabPane tab={"最近变更记录"} key="3">
  6815. <div>
  6816. <div
  6817. style={{
  6818. borderRadius: "50%",
  6819. width: 300,
  6820. height: 300,
  6821. position: "absolute",
  6822. top: 230,
  6823. left: 525,
  6824. transform: "rotate(-5deg)",
  6825. zIndex: 1,
  6826. display:
  6827. this.state.detailChange.status == 4
  6828. ? "block"
  6829. : "none",
  6830. }}
  6831. >
  6832. <img src={tongguo} style={{ width: "100%" }} />
  6833. </div>
  6834. <div
  6835. style={{
  6836. borderRadius: "50%",
  6837. width: 300,
  6838. height: 300,
  6839. position: "absolute",
  6840. top: 284,
  6841. left: 586,
  6842. transform: "rotate(-5deg)",
  6843. zIndex: 1,
  6844. display:
  6845. this.state.detailChange.status == 5
  6846. ? "block"
  6847. : "none",
  6848. }}
  6849. >
  6850. <img src={quxiao} style={{ width: "63%" }} />
  6851. </div>
  6852. <div className="clearfix">
  6853. <FormItem
  6854. className="half-item"
  6855. {...formItemLayout}
  6856. label="客户名称"
  6857. >
  6858. <span>{this.state.userName}</span>
  6859. <EnterpriseNameChange
  6860. type="journal"
  6861. style={{ marginLeft: 10 }}
  6862. enterpriseId={this.state.orderUid}
  6863. />
  6864. </FormItem>
  6865. {/* */}
  6866. <FormItem
  6867. className="half-item"
  6868. {...formItemLayout}
  6869. label="合同编号"
  6870. >
  6871. <span>{this.state.contractNo}</span>
  6872. </FormItem>
  6873. </div>
  6874. <div className="clearfix">
  6875. <FormItem
  6876. className="half-item"
  6877. {...formItemLayout}
  6878. label="时间"
  6879. >
  6880. <span>
  6881. {this.state.detailChange.createTimes}
  6882. </span>
  6883. </FormItem>
  6884. <FormItem
  6885. className="half-item"
  6886. {...formItemLayout}
  6887. label="申请人"
  6888. >
  6889. <span>{this.state.salesmanName}</span>
  6890. </FormItem>
  6891. </div>
  6892. <div className="clearfix">
  6893. <FormItem
  6894. className="half-item"
  6895. {...formItemLayout}
  6896. label="当前进度"
  6897. >
  6898. <span>
  6899. {/*当前是进度角色是咨询师以及咨询师经理时使用shenhePeo函数,其他流程正常显示*/}
  6900. {this.state.detailChange.processState === 2 ||
  6901. this.state.detailChange.processState === 3
  6902. ? shenghePeo(
  6903. this.state.detailChange.processState ===
  6904. 2
  6905. ? this.state.detailChange
  6906. .consultantExamine
  6907. : this.state.detailChange
  6908. .managerExamine,
  6909. this.state.detailChange.processState
  6910. )
  6911. : getProcessStatusNew(
  6912. this.state.detailChange.processState,
  6913. this.state.detailChange.status
  6914. )}
  6915. </span>
  6916. </FormItem>
  6917. {/* <FormItem
  6918. className="half-item"
  6919. {...formItemLayout}
  6920. label="申请变更部门"
  6921. >
  6922. <span>{this.state.depName}</span>
  6923. </FormItem> */}
  6924. <FormItem
  6925. {...formItemLayout}
  6926. className="half-item"
  6927. label="变更类型"
  6928. >
  6929. <span>
  6930. {getChangeType(
  6931. this.state.detailChange.typeChange
  6932. )}
  6933. </span>
  6934. </FormItem>
  6935. </div>
  6936. {/* <div className="clearfix">
  6937. <FormItem
  6938. labelCol={{ span: 4 }}
  6939. wrapperCol={{ span: 18 }}
  6940. label="变更类型"
  6941. >
  6942. <span>
  6943. {getChangeType(
  6944. this.state.detailChange.typeChange
  6945. )}
  6946. </span>
  6947. </FormItem>
  6948. </div> */}
  6949. <div className="clearfix">
  6950. <FormItem
  6951. {...formItemLayout}
  6952. className="half-item"
  6953. label="合同额(万元)"
  6954. >
  6955. <span>
  6956. {this.state.detailChange.totalAmount}
  6957. </span>
  6958. </FormItem>
  6959. <FormItem
  6960. {...formItemLayout}
  6961. className="half-item"
  6962. label="已收款(万元)"
  6963. >
  6964. <span>
  6965. {this.state.detailChange.settlementAmount}
  6966. </span>
  6967. </FormItem>
  6968. </div>
  6969. <div className="clearfix">
  6970. <FormItem
  6971. {...formItemLayout}
  6972. className="half-item"
  6973. label="欠款(万元)"
  6974. >
  6975. <span>{this.state.detailChange.arrears}</span>
  6976. </FormItem>
  6977. <FormItem
  6978. {...formItemLayout}
  6979. className="half-item"
  6980. label="申请退款(万元)"
  6981. >
  6982. <span>
  6983. {this.state.detailChange.changeAmount}
  6984. </span>
  6985. </FormItem>
  6986. </div>
  6987. <div className="clearfix">
  6988. <FormItem
  6989. style={{ height: "auto" }}
  6990. labelCol={{ span: 4 }}
  6991. wrapperCol={{ span: 18 }}
  6992. label="变更原因"
  6993. >
  6994. <span>{this.state.detailChange.remarksC}</span>
  6995. </FormItem>
  6996. </div>
  6997. <div className="clearfix">
  6998. <FormItem
  6999. style={{ height: "auto" }}
  7000. labelCol={{ span: 4 }}
  7001. wrapperCol={{ span: 18 }}
  7002. label="备注"
  7003. >
  7004. <span>
  7005. {this.state.detailChange.startRemarks}
  7006. </span>
  7007. </FormItem>
  7008. </div>
  7009. {/* ---- */}
  7010. <div className="clearfix">
  7011. <FormItem
  7012. labelCol={{ span: 4 }}
  7013. wrapperCol={{ span: 18 }}
  7014. label="变更凭证"
  7015. >
  7016. <div>
  7017. {/*<Upload*/}
  7018. {/* className="demandDetailShow-upload"*/}
  7019. {/* listType="picture-card"*/}
  7020. {/* fileList={*/}
  7021. {/* this.state.detailChange.voucherUrl*/}
  7022. {/* }*/}
  7023. {/* onPreview={(file) => {*/}
  7024. {/* this.setState({*/}
  7025. {/* previewImage: file.url || file.thumbUrl,*/}
  7026. {/* previewVisible: true,*/}
  7027. {/* });*/}
  7028. {/* }}*/}
  7029. {/*/>*/}
  7030. <div
  7031. style={{
  7032. paddingTop: "10px",
  7033. paddingBottom: "10px",
  7034. }}
  7035. >
  7036. {this.state.detailChange &&
  7037. this.state.detailChange.voucherUrl &&
  7038. this.state.activeKey === "3" &&
  7039. this.state.visible ? (
  7040. <ImgList
  7041. fileList={
  7042. this.state.detailChange.voucherUrl
  7043. }
  7044. ItemWidth={"96px"}
  7045. />
  7046. ) : (
  7047. <div />
  7048. )}
  7049. </div>
  7050. {/*<Modal*/}
  7051. {/* maskClosable={false}*/}
  7052. {/* footer={null}*/}
  7053. {/* visible={this.state.previewVisible}*/}
  7054. {/* onCancel={() => {*/}
  7055. {/* this.setState({*/}
  7056. {/* previewVisible: false,*/}
  7057. {/* });*/}
  7058. {/* }}*/}
  7059. {/*>*/}
  7060. {/* <img*/}
  7061. {/* alt=""*/}
  7062. {/* style={{ width: "100%" }}*/}
  7063. {/* src={this.state.previewImage || ""}*/}
  7064. {/* />*/}
  7065. {/*</Modal>*/}
  7066. {this.state.status === 3 ? (
  7067. <Button
  7068. type="danger"
  7069. style={{
  7070. float: "right",
  7071. backgroundColor: "red",
  7072. color: "white",
  7073. position: "absolute",
  7074. right: 0,
  7075. height: 50,
  7076. borderRadius: 20,
  7077. zIndex: 100,
  7078. top: 0,
  7079. }}
  7080. onClick={(e) => {
  7081. e.stopPropagation();
  7082. this.showConfirmChange(
  7083. this.deleteChange
  7084. );
  7085. }}
  7086. >
  7087. 取消本次变更
  7088. </Button>
  7089. ) : (
  7090. ""
  7091. )}
  7092. </div>
  7093. </FormItem>
  7094. </div>
  7095. <ul
  7096. style={{
  7097. width: "868px",
  7098. overflow: "hidden",
  7099. paddingLeft: "90px",
  7100. paddingTop: "10px",
  7101. position: "relative",
  7102. bottom: "20px",
  7103. fontSize: "12px",
  7104. color: "rgba(0, 0, 0, 0.65)",
  7105. }}
  7106. >
  7107. {/* <span>操作人:</span> */}
  7108. {this.state.logData.map((item, index) => {
  7109. if (item.status == 0) {
  7110. item.status = "发起";
  7111. } else if (item.status == 1) {
  7112. item.status = "审核中";
  7113. } else if (item.status == 2) {
  7114. item.status = "通过";
  7115. } else if (item.status == 3) {
  7116. item.status = "驳回";
  7117. } else if (item.status == 4) {
  7118. item.status = "完成";
  7119. }
  7120. return (
  7121. <li
  7122. key={index}
  7123. style={{
  7124. width: "100%",
  7125. height: "auto",
  7126. wordBreak: "break-all",
  7127. marginBottom: "10px",
  7128. }}
  7129. >
  7130. {item.aname +
  7131. ":" +
  7132. "(" +
  7133. item.status +
  7134. ")" +
  7135. item.remarks}
  7136. </li>
  7137. );
  7138. })}
  7139. </ul>
  7140. {/* 动态展示项目以及催款节点 */}
  7141. <div>
  7142. <div>
  7143. <span
  7144. style={{
  7145. marginLeft: "50px",
  7146. fontSize: "20px",
  7147. }}
  7148. >
  7149. 项目业务
  7150. </span>
  7151. </div>
  7152. <div
  7153. className="patent-table"
  7154. style={{ marginBottom: 10 }}
  7155. >
  7156. <Spin spinning={this.state.loading}>
  7157. <Table
  7158. columns={this.state.detailColumns}
  7159. dataSource={this.state.proDataSource}
  7160. expandedRowRender={expandedRowRenderDetail}
  7161. pagination={this.state.pagination}
  7162. // onRowClick={this.tableRowClick}
  7163. bordered
  7164. size="small"
  7165. />
  7166. </Spin>
  7167. </div>
  7168. <div>
  7169. <span
  7170. style={{
  7171. marginLeft: "50px",
  7172. fontSize: "20px",
  7173. }}
  7174. >
  7175. 催款节点
  7176. </span>
  7177. </div>
  7178. <div className="clearfix">
  7179. <Spin spinning={this.state.loading}>
  7180. <Form layout="horizontal">
  7181. <Table
  7182. pagination={false}
  7183. columns={this.state.detailContactsLists}
  7184. dataSource={this.state.cuiDataSource}
  7185. scroll={{ x: "max-content", y: 0 }}
  7186. bordered
  7187. size="small"
  7188. />
  7189. <Col
  7190. span={24}
  7191. offset={9}
  7192. style={{ marginTop: "15px" }}
  7193. ></Col>
  7194. </Form>
  7195. </Spin>
  7196. </div>
  7197. </div>
  7198. </div>
  7199. </TabPane>
  7200. ) : (
  7201. ""
  7202. )}
  7203. </Tabs>
  7204. }
  7205. </div>
  7206. </Spin>
  7207. </Form>
  7208. </Modal>
  7209. <Modal
  7210. maskClosable={false}
  7211. visible={this.state.changeVisible}
  7212. onOk={this.nextCancel}
  7213. onCancel={this.nextCancel}
  7214. width="900px"
  7215. title={"添加变更项目"}
  7216. footer=""
  7217. className="admin-desc-content"
  7218. >
  7219. <Form
  7220. layout="horizontal"
  7221. // id="demand-form"
  7222. >
  7223. <Spin spinning={this.state.loading}>
  7224. <div className="clearfix">
  7225. <FormItem
  7226. className="half-item"
  7227. {...formItemLayout}
  7228. label="服务名称"
  7229. >
  7230. <AutoComplete
  7231. className="certain-category-search"
  7232. dropdownClassName="certain-category-search-dropdown"
  7233. dropdownMatchSelectWidth={false}
  7234. dropdownStyle={{ width: 200 }}
  7235. style={{ width: "200px" }}
  7236. dataSource={options}
  7237. placeholder="输入服务名称"
  7238. value={this.state.commodityName}
  7239. onChange={this.httpChange}
  7240. filterOption={true}
  7241. onSelect={this.selectAuto}
  7242. >
  7243. <Input />
  7244. </AutoComplete>
  7245. <span className="mandatory">*</span>
  7246. </FormItem>
  7247. <FormItem
  7248. className="half-item"
  7249. {...formItemLayout}
  7250. label="服务数量"
  7251. >
  7252. <Input
  7253. placeholder="请输入服务数量"
  7254. value={this.state.commodityQuantity}
  7255. style={{ width: "200px" }}
  7256. onChange={(e) => {
  7257. this.setState({ commodityQuantity: e.target.value });
  7258. }}
  7259. ref="commodityQuantity"
  7260. />
  7261. <span className="mandatory">*</span>
  7262. </FormItem>
  7263. <div style={{ marginTop: "33px", color: "red", textAlign: "right", position: "relative", top: "-8", left: "0" }}>如会员项目,服务一年,请填写1,服务二年,请填写2,依次类推</div>
  7264. <FormItem
  7265. className="half-item"
  7266. labelCol={{ span: 4 }}
  7267. wrapperCol={{ span: 14 }}
  7268. label="专利类型:"
  7269. style={{
  7270. display: this.state.displayFees,
  7271. marginLeft: "55px",
  7272. }}
  7273. >
  7274. <Select
  7275. placeholder="请选择专利类型"
  7276. style={{ width: "200px" }}
  7277. value={this.state.patentType}
  7278. onChange={(e) => {
  7279. this.setState({ patentType: e });
  7280. if (e !== 0 && e !== 2) {
  7281. this.setState({
  7282. costReduction: "",
  7283. });
  7284. }
  7285. }}
  7286. >
  7287. {this.state.patentTypeList.map(function (v, k) {
  7288. return (
  7289. <Select.Option key={k} value={v.id}>
  7290. {v.name}
  7291. </Select.Option>
  7292. );
  7293. })}
  7294. </Select>
  7295. <span style={{ color: "red", marginLeft: "8px" }}>*</span>
  7296. </FormItem>
  7297. <FormItem
  7298. className="half-item"
  7299. labelCol={{ span: 3 }}
  7300. wrapperCol={{ span: 14 }}
  7301. label="官费:"
  7302. style={{
  7303. display: this.state.displayFees,
  7304. marginLeft: "55px",
  7305. }}
  7306. >
  7307. <span style={{ color: "red", marginRight: "27px" }}>*</span>
  7308. <Radio.Group
  7309. value={this.state.officialCost}
  7310. onChange={(e) => {
  7311. this.setState({ officialCost: e.target.value });
  7312. if (e.target.value === "0") {
  7313. this.setState({
  7314. costReduction: "",
  7315. });
  7316. }
  7317. }}
  7318. >
  7319. <Radio value={1}>含官费</Radio>
  7320. <Radio value={0}>不含官费</Radio>
  7321. </Radio.Group>
  7322. </FormItem>
  7323. {
  7324. (this.state.patentType === 0 || this.state.patentType === 2) && this.state.officialCost === 1 &&
  7325. <FormItem
  7326. className="half-item"
  7327. labelCol={{ span: 3 }}
  7328. wrapperCol={{ span: 14 }}
  7329. label="费减:"
  7330. style={{
  7331. display: this.state.displayFees,
  7332. marginLeft: "55px",
  7333. }}
  7334. >
  7335. <span style={{ color: "red", marginRight: "27px" }}>*</span>
  7336. <Radio.Group
  7337. //disabled={this.state.officialCost === "0" || this.state.patentType === 1}
  7338. disabled={this.state.officialCost === 0 || (this.state.patentType !== 0 && this.state.patentType !== 2)}
  7339. value={this.state.costReduction}
  7340. onChange={(e) => {
  7341. this.setState({ costReduction: e.target.value });
  7342. }}
  7343. >
  7344. <Radio value={1}>有费减</Radio>
  7345. <Radio value={0}>无费减</Radio>
  7346. </Radio.Group>
  7347. </FormItem>
  7348. }
  7349. <FormItem
  7350. className="half-item"
  7351. {...formItemLayout}
  7352. label="实签价格(万元)"
  7353. >
  7354. <Input
  7355. placeholder="请输入实签价格"
  7356. value={this.state.commodityPrice}
  7357. style={{ width: "200px" }}
  7358. onChange={(e) => {
  7359. this.setState({ commodityPrice: e.target.value });
  7360. }}
  7361. ref="commodityPrice"
  7362. />
  7363. <span className="mandatory">*</span>
  7364. </FormItem>
  7365. <FormItem
  7366. className="half-item"
  7367. {...formItemLayout}
  7368. label="主要业务"
  7369. >
  7370. <Select
  7371. placeholder="选择是否为主要业务"
  7372. style={{ width: "200px" }}
  7373. value={this.state.main}
  7374. onChange={(e) => {
  7375. this.setState({ main: e });
  7376. }}
  7377. >
  7378. {boutique.map(function (item) {
  7379. return (
  7380. <Select.Option key={item.value}>
  7381. {item.key}
  7382. </Select.Option>
  7383. );
  7384. })}
  7385. </Select>
  7386. <span className="mandatory">*</span>
  7387. </FormItem>
  7388. <div className="clearfix">
  7389. <FormItem
  7390. labelCol={{ span: 4 }}
  7391. wrapperCol={{ span: 16 }}
  7392. label="项目说明"
  7393. >
  7394. <Input
  7395. type="textarea"
  7396. placeholder="如会员项目请详细描写会员项目的服务年限、详细服务时间段段,如第一年从2021年1月至2021年12月31日止,第二年从。。。"
  7397. value={this.state.taskComment}
  7398. onChange={(e) => {
  7399. this.setState({ taskComment: e.target.value });
  7400. }}
  7401. />
  7402. </FormItem>
  7403. </div>
  7404. <FormItem
  7405. wrapperCol={{ span: 12, offset: 4 }}
  7406. className="half-middle"
  7407. >
  7408. <Button
  7409. className="submitSave"
  7410. type="primary"
  7411. onClick={this.changeProSubmit}
  7412. >
  7413. 保存
  7414. </Button>
  7415. <Button
  7416. className="submitSave"
  7417. type="ghost"
  7418. onClick={this.nextCancel}
  7419. >
  7420. 取消
  7421. </Button>
  7422. </FormItem>
  7423. </div>
  7424. </Spin>
  7425. </Form>
  7426. </Modal>
  7427. {this.state.lookVisible ? (
  7428. <Modal
  7429. maskClosable={false}
  7430. visible={this.state.lookVisible}
  7431. onOk={this.noCancel}
  7432. onCancel={this.noCancel}
  7433. width="800px"
  7434. title={"退单申请"}
  7435. footer=""
  7436. className="admin-desc-content"
  7437. >
  7438. <Form layout="horizontal">
  7439. <Spin spinning={this.state.loading}>
  7440. <div className="clearfix">
  7441. <FormItem
  7442. labelCol={{ span: 4 }}
  7443. wrapperCol={{ span: 16 }}
  7444. label="终止合同"
  7445. >
  7446. <Picture
  7447. domId={"addService6"}
  7448. fileList={(e) => {
  7449. this.setState({ contractUrl: e });
  7450. }}
  7451. pictureUrl={this.state.contractUrl}
  7452. visible={this.props.visible}
  7453. data={{
  7454. sign: "order_refund_file",
  7455. url: "/api/admin/newOrder/uploadRefundOrderFile",
  7456. number: 8,
  7457. }}
  7458. />
  7459. </FormItem>
  7460. </div>
  7461. <div className="clearfix">
  7462. <FormItem
  7463. labelCol={{ span: 4 }}
  7464. wrapperCol={{ span: 16 }}
  7465. label="退单申请表"
  7466. >
  7467. <Picture
  7468. domId={"addService7"}
  7469. fileList={(e) => {
  7470. this.setState({ applicationUrl: e });
  7471. }}
  7472. pictureUrl={this.state.applicationUrl}
  7473. visible={this.props.visible}
  7474. data={{
  7475. sign: "order_refund_file",
  7476. url: "/api/admin/newOrder/uploadRefundOrderFile",
  7477. number: 8,
  7478. }}
  7479. />
  7480. </FormItem>
  7481. </div>
  7482. <div className="clearfix">
  7483. <FormItem
  7484. labelCol={{ span: 4 }}
  7485. wrapperCol={{ span: 16 }}
  7486. label="退单理由"
  7487. >
  7488. <Input
  7489. type="textarea"
  7490. placeholder="请输入退单理由"
  7491. rows={4}
  7492. value={this.state.reason}
  7493. onChange={(e) => {
  7494. this.setState({ reason: e.target.value });
  7495. }}
  7496. />
  7497. </FormItem>
  7498. </div>
  7499. <div className="clearfix">
  7500. <Button
  7501. className="cancel"
  7502. type="primary"
  7503. onClick={this.tuidanOk}
  7504. style={{ marginLeft: "50px" }}
  7505. htmlType="submit"
  7506. >
  7507. 确定退单
  7508. </Button>
  7509. <Button
  7510. className="cancel"
  7511. type="ghost"
  7512. onClick={this.noCancel}
  7513. style={{ marginLeft: "50px" }}
  7514. >
  7515. 取消
  7516. </Button>
  7517. </div>
  7518. </Spin>
  7519. </Form>
  7520. </Modal>
  7521. ) : (
  7522. <div />
  7523. )}
  7524. <Modal
  7525. title="修改项目金额及数量"
  7526. visible={this.state.editProVisible}
  7527. onOk={this.submitEditPro}
  7528. width={300}
  7529. okText={"保存"}
  7530. onCancel={() => {
  7531. this.setState({
  7532. editProVisible: false,
  7533. });
  7534. }}
  7535. >
  7536. <div className="clearfix">
  7537. <FormItem
  7538. labelCol={{ span: 6 }}
  7539. wrapperCol={{ span: 14 }}
  7540. label="项目金额"
  7541. style={{
  7542. display: this.state.editSplitStatus == 2 ? "none" : "block",
  7543. }}
  7544. >
  7545. <Input
  7546. placeholder="请输入金额"
  7547. rows={4}
  7548. // disabled={this.state.editSplitStatus == 0 ? true : false}
  7549. value={this.state.editProMoney}
  7550. onChange={(e) => {
  7551. this.setState({ editProMoney: e.target.value });
  7552. }}
  7553. />
  7554. </FormItem>
  7555. <FormItem
  7556. labelCol={{ span: 6 }}
  7557. wrapperCol={{ span: 14 }}
  7558. label="项目数量"
  7559. >
  7560. <Input
  7561. placeholder="请输入数量"
  7562. rows={4}
  7563. value={this.state.editProCommodityQuantity}
  7564. onChange={(e) => {
  7565. this.setState({ editProCommodityQuantity: e.target.value });
  7566. }}
  7567. />
  7568. </FormItem>
  7569. </div>
  7570. </Modal>
  7571. <Modal
  7572. maskClosable={false}
  7573. title={
  7574. isNaN(parseFloat(this.state.appropriationRatio))
  7575. ? "修改催款节点金额"
  7576. : "修改催款节点比例"
  7577. }
  7578. visible={this.state.editCuiVisible}
  7579. onOk={() => {
  7580. this.submitEditCui(
  7581. isNaN(parseFloat(this.state.appropriationRatio)) ? 0 : 1
  7582. );
  7583. }}
  7584. okText={"保存"}
  7585. width={300}
  7586. onCancel={(e) => {
  7587. this.setState({
  7588. editCuiVisible: false,
  7589. appropriationRatio: "",
  7590. });
  7591. }}
  7592. >
  7593. <div className="clearfix">
  7594. <FormItem
  7595. labelCol={{ span: 6 }}
  7596. wrapperCol={{ span: 14 }}
  7597. label={
  7598. isNaN(parseFloat(this.state.appropriationRatio))
  7599. ? "催款金额"
  7600. : "催款比例"
  7601. }
  7602. >
  7603. <Input
  7604. type="number"
  7605. placeholder={
  7606. isNaN(parseFloat(this.state.appropriationRatio))
  7607. ? "请输入金额"
  7608. : "请输入比例"
  7609. }
  7610. rows={4}
  7611. value={this.state.editCuiMoney}
  7612. onChange={(e) => {
  7613. this.setState({ editCuiMoney: e.target.value });
  7614. }}
  7615. />
  7616. </FormItem>
  7617. </div>
  7618. </Modal>
  7619. <OrderRiZi
  7620. dataSourcerizhi={this.state.dataSourcerizhi}
  7621. closeOrderLog={this.closeOrderLog}
  7622. visible={this.state.rizhivisible}
  7623. loading={this.state.loading}
  7624. />
  7625. {this.state.projectOperationVisible ? (
  7626. <ProjectOperation
  7627. readOnly={
  7628. this.state.dataInfor &&
  7629. Object.keys(this.state.dataInfor).length > 0 &&
  7630. this.state.processStatus !== 0
  7631. }
  7632. orderNo={this.props.datauser.orderNo}
  7633. visible={this.state.projectOperationVisible}
  7634. dataInfor={this.state.dataInfor}
  7635. onCancel={this.nextCancel}
  7636. />
  7637. ) : null}
  7638. </div>
  7639. );
  7640. },
  7641. })
  7642. );
  7643. export default Form.create()(NewService);