addService.jsx 278 KB

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