addService.jsx 234 KB

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