addService.jsx 251 KB

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