addService.jsx 273 KB

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