addService.jsx 275 KB

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