addService.jsx 235 KB

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