addService.jsx 242 KB

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