addService.jsx 234 KB

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