addService.jsx 258 KB

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