addService.jsx 321 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708
  1. // 开单=》合同变更发起
  2. import React from "react";
  3. import {
  4. Table,
  5. Modal,
  6. message,
  7. Spin,
  8. Input,
  9. Select,
  10. Button,
  11. Form,
  12. Upload,
  13. Popconfirm,
  14. AutoComplete,
  15. DatePicker,
  16. Col,
  17. Tabs,
  18. Tag,
  19. Radio,
  20. Icon,
  21. Tooltip,
  22. Switch,
  23. } from "antd";
  24. // import $ from "jquery/src/ajax";
  25. import "../userMangagement.less";
  26. import "../billing.less";
  27. import moment from "moment";
  28. import { shenghePeo } from "@/tools.js";
  29. import Picture from "@/manageCenter/publicComponent/picture";
  30. import ResolutionDetail from "@/resolutionDetail";
  31. import quxiao from "../../../../../image/quxiao.png";
  32. import tongguo from "../../../../../image/tongguo.png";
  33. import $ from "jquery";
  34. import OrderRiZi from "@/orderRiZi.jsx";
  35. import {
  36. orderTypes,
  37. customerType,
  38. jiedian,
  39. boutique,
  40. ssalesType,
  41. qsalesType,
  42. cuiJieDian,
  43. salesList,
  44. vipYear,
  45. knowledgeList,
  46. auditList,
  47. addDeductionList,
  48. } from "@/dataDic.js";
  49. import {
  50. splitUrl,
  51. getProcessStatus,
  52. getLiquidationStatus,
  53. getboutique,
  54. getApprovedState,
  55. getjiedian,
  56. getCuikuan,
  57. getProjectName,
  58. moneyVerify,
  59. getProcessStatusNew,
  60. stopStatus,
  61. } from "../../../tools.js";
  62. import PicturesWall from "./changeComponent/picturesWall.js";
  63. import { getChangeType } from "./changeComponent/changeDetailYxgly";
  64. import ImgList from "../../../common/imgList";
  65. import OrderItemStatus from "../../../common/orderItemStatus";
  66. import EnterpriseNameChange from "../../../common/enterpriseNameChange";
  67. import ProjectOperation from "../../../common/projectOperation";
  68. import ProjectOperationVip from "../../../common/projectOperation/vip";
  69. import NewAddProject from "../../../common/projectOperation/newAddProject"
  70. import NewEditProject from "../../../common/projectOperation/newEditProject"
  71. import { instanceOf } from "prop-types";
  72. import UpdateSales from './updatesales';
  73. import SelectList from '../../../common/mysuspend/selectList'; //
  74. import FlowChart from '../../../common/flowchart'; // 流程图
  75. import Gxczx from '../../../common/orderDetail/gxczx' // 高新纯咨询合同说明详情
  76. import Property from '../../../common/orderDetail/property' // 知识产权情况
  77. const Option = AutoComplete.Option;
  78. const confirm = Modal.confirm;
  79. const RadioButton = Radio.Button;
  80. const RadioGroup = Radio.Group;
  81. const NewService = Form.create()(
  82. React.createClass({
  83. //查看项目列表
  84. loadData(record) {
  85. this.state.data = [];
  86. this.setState({
  87. loading: true,
  88. });
  89. if (!record && !this.props.datauser.orderNo) {
  90. return
  91. }
  92. $.ajax({
  93. method: "get",
  94. dataType: "json",
  95. crossDomain: false,
  96. url: globalConfig.context + "/api/admin/newOrder/getOrderTask",
  97. data: {
  98. orderNo: record ? record.orderNo : this.props.datauser.orderNo,
  99. },
  100. success: function (data) {
  101. let theArr = [];
  102. if (!data.data) {
  103. if (data.error && data.error.length) {
  104. message.warning(data.error[0].message);
  105. }
  106. } else {
  107. for (let i = 0; i < data.data.length; i++) {
  108. let thisdata = data.data[i];
  109. thisdata.key = i;
  110. thisdata.sort = thisdata.cSort;
  111. thisdata.declarationBatch =
  112. thisdata.declarationBatch || undefined; //申报批次
  113. thisdata.ifCertificationFee = isNaN(
  114. parseInt(thisdata.ifCertificationFee)
  115. )
  116. ? undefined
  117. : thisdata.ifCertificationFee; //是否包含申报批次
  118. theArr.push(thisdata);
  119. }
  120. }
  121. this.departmentList();
  122. this.setState({
  123. dataSource: theArr,
  124. pagination: false,
  125. // 禁用变更类型
  126. changeFlag: false,
  127. });
  128. }.bind(this),
  129. }).always(
  130. function () {
  131. this.setState({
  132. loading: false,
  133. });
  134. }.bind(this)
  135. );
  136. },
  137. //收款节点
  138. loadDatas(record) {
  139. this.state.data = [];
  140. this.setState({
  141. loading: true,
  142. });
  143. $.ajax({
  144. method: "get",
  145. dataType: "json",
  146. crossDomain: false,
  147. url: globalConfig.context + "/api/admin/newOrder/selectOrderDun",
  148. data: {
  149. orderNo: record ? record.orderNo : this.props.datauser.orderNo,
  150. },
  151. success: function (data) {
  152. let theArr = [];
  153. if (!data.data) {
  154. if (data.error && data.error.length) {
  155. message.warning(data.error[0].message);
  156. }
  157. } else {
  158. for (let i = 0; i < data.data.length; i++) {
  159. let thisdata = data.data[i];
  160. theArr.push({
  161. key: i,
  162. id: thisdata.id,
  163. });
  164. }
  165. }
  166. this.setState({
  167. dataSource: theArr,
  168. pagination: false,
  169. });
  170. }.bind(this),
  171. }).always(
  172. function () {
  173. this.setState({
  174. loading: false,
  175. });
  176. }.bind(this)
  177. );
  178. },
  179. getInitialState() {
  180. return {
  181. isShow: true, // 高新纯咨询合同默认填写
  182. knowledgeOther: "",
  183. auditOther: "",
  184. addDeductionOther: "",
  185. dataView: null,
  186. PublicView: null,
  187. contentView: '',
  188. remarksView: '',
  189. contentViewLength: 0,
  190. contentViewLength1: 0,
  191. columnsView: [
  192. {
  193. title: "服务时间",
  194. dataIndex: "serviceTimes",
  195. key: "serviceTimes",
  196. width: '80px'
  197. },
  198. {
  199. title: "服务内容",
  200. dataIndex: "content",
  201. key: "content",
  202. width: '300'
  203. },
  204. {
  205. title: "备注",
  206. dataIndex: "remarks",
  207. key: "remarks",
  208. width: '300'
  209. },
  210. {
  211. title: "操作",
  212. dataIndex: "cz",
  213. key: "cz",
  214. width: '100px',
  215. render: (text, record) => {
  216. return (
  217. <div>
  218. {this.state.processStatus == 0 ? (
  219. <Button
  220. onClick={(e) => {
  221. e.stopPropagation();
  222. this.viewConfirm(this.delectView, record);
  223. // this.setState({
  224. // addFlag: false,
  225. // });
  226. }}
  227. >
  228. 删除
  229. </Button>
  230. ) : (
  231. ""
  232. )}
  233. </div>
  234. );
  235. },
  236. },
  237. ],
  238. columnsRecord: [
  239. {
  240. title: "序号",
  241. dataIndex: "id",
  242. key: "id",
  243. },
  244. {
  245. title: "客户名称",
  246. dataIndex: "nickname",
  247. key: "nickname",
  248. },
  249. {
  250. title: "公出申请人",
  251. dataIndex: "aname",
  252. key: "aname",
  253. },
  254. {
  255. title: "公出时长",
  256. dataIndex: "duration",
  257. key: "duration",
  258. render: (text, record) => {
  259. return <div>{text + "小时"}</div>;
  260. },
  261. },
  262. {
  263. title: "公出地点",
  264. dataIndex: "userName",
  265. key: "userName",
  266. },
  267. {
  268. title: "公出时间",
  269. dataIndex: "releaseStarts",
  270. key: "releaseStarts",
  271. render: (text, record) => {
  272. return (
  273. <div>
  274. <div>{text}</div>
  275. <div style={{ paddingLeft: "44px" }}>至</div>
  276. <div>{record.releaseEnds}</div>
  277. </div>
  278. );
  279. },
  280. },
  281. {
  282. title: "打卡时间",
  283. dataIndex: "clockInTimes",
  284. key: "clockInTimes",
  285. },
  286. {
  287. title: "公出目标",
  288. dataIndex: "remarks",
  289. key: "remarks",
  290. width: '300'
  291. },
  292. ],
  293. dataSourceView: [],
  294. coorVisible: "none",
  295. personnel: [],
  296. viewKey: 0,
  297. modalView: false,
  298. modalRecord: false,
  299. closable: false,
  300. disabledView: "none",
  301. patentType: "",
  302. patentTypeList: [],
  303. rotateDeg: 0,
  304. isCaoGao: false,
  305. cuiFlag: false,
  306. startRemarks: "",
  307. remarksC: "",
  308. loading: false,
  309. logData: [],
  310. visible: false,
  311. cuiDataSource: [],
  312. status: 4,
  313. orgCodeUrl: [],
  314. voucherUrl: [],
  315. replenishUrl: [],
  316. contentUrl: [],
  317. newContractUrl: [],
  318. customerArr: [],
  319. declarationBatch: 1, //申报批次 默认第一批
  320. // 禁用变更类型转换
  321. changeFlag: false,
  322. // 合同额禁用
  323. hetongFlag: true,
  324. // 项目及催款禁用
  325. listFlag: true,
  326. mark: false,
  327. activeKey: "1",
  328. typeChange: undefined,
  329. bussStats: false,
  330. checkedKeys: [],
  331. lookflowList: [],
  332. contractUrl: [],
  333. applicationUrl: [],
  334. changeAmount: "0",
  335. active: {
  336. applySign: false,
  337. },
  338. lookState: false,
  339. signBillVisible: false,
  340. commod: "",
  341. columns: [
  342. {
  343. title: "业务项目名称",
  344. dataIndex: "commodityName",
  345. key: "commodityName",
  346. render: (text, record) => {
  347. return <span>{text}<span style={{ color: "red" }}>{record.patentTypeName}</span>{"-" + record.id}</span>
  348. }
  349. },
  350. {
  351. title: "项目类别",
  352. dataIndex: "cname",
  353. key: "cname",
  354. },
  355. {
  356. title: "项目数量",
  357. dataIndex: "commodityQuantity",
  358. key: "commodityQuantity",
  359. render: (text, record) => {
  360. if (record.splitStatus == 1) {
  361. return (
  362. <span>
  363. {text}{" "}
  364. </span>
  365. );
  366. } else {
  367. return text;
  368. }
  369. },
  370. },
  371. {
  372. title: "金额(万元)",
  373. dataIndex: "commodityPrice",
  374. key: "commodityPrice",
  375. width: 50,
  376. },
  377. {
  378. title: "负责人",
  379. dataIndex: "contacts",
  380. key: "contacts",
  381. },
  382. {
  383. title: "负责人电话",
  384. dataIndex: "contactsMobile",
  385. key: "contactsMobile",
  386. },
  387. {
  388. title: "项目状态",
  389. dataIndex: "projectStatus",
  390. key: "projectStatus",
  391. width: 80,
  392. render: (text) => {
  393. return getProjectName(text);
  394. },
  395. },
  396. {
  397. title: "主要项目",
  398. dataIndex: "main",
  399. key: "main",
  400. width: 50,
  401. render: (text) => {
  402. return text ? "是" : "否";
  403. },
  404. },
  405. {
  406. title: "总年限",
  407. dataIndex: "yearSum",
  408. key: "yearSum",
  409. render: (text, record) => {
  410. return (
  411. <div>{["", "一年", "二年", "三年", "四年", "五年"][text]}</div>
  412. );
  413. }
  414. },
  415. {
  416. title: "年限",
  417. dataIndex: "serviceLife",
  418. key: "serviceLife",
  419. render: (text, record) => {
  420. return (
  421. <div>{!!text && JSON.parse(text).toString()}</div>
  422. );
  423. }
  424. },
  425. {
  426. title: "本次派单",
  427. dataIndex: "serviceYear",
  428. key: "serviceYear",
  429. render: (text, record) => {
  430. return (
  431. <div>{!text ? "" : text}</div>
  432. );
  433. }
  434. },
  435. {
  436. title: "项目说明",
  437. dataIndex: "taskComment",
  438. key: "taskComment",
  439. render: (text) => {
  440. return (
  441. <Tooltip title={text}>
  442. <div
  443. style={{
  444. width: 100,
  445. overflow: "hidden",
  446. whiteSpace: "nowrap",
  447. textOverflow: "ellipsis",
  448. }}
  449. >{text}</div>
  450. </Tooltip>
  451. )
  452. },
  453. },
  454. {
  455. title: "操作",
  456. dataIndex: "ABC",
  457. key: "ABC",
  458. width: 80,
  459. render: (text, record) => {
  460. return (
  461. <div>
  462. {stopStatus(record.stopType, record.stopStatus)}
  463. {
  464. this.state.processStatus == 0 &&
  465. <div>
  466. <Button
  467. onClick={(e) => {
  468. e.stopPropagation();
  469. this.showConfirm(this.delectRow, record);
  470. this.setState({
  471. addFlag: false,
  472. });
  473. }}
  474. >
  475. 删除
  476. </Button>
  477. </div>
  478. }
  479. {
  480. this.state.processStatus == 0 &&
  481. <div>
  482. <Button
  483. onClick={(e) => {
  484. e.stopPropagation();
  485. this.tableRowClick(record)
  486. }}
  487. >
  488. 编辑
  489. </Button>
  490. </div>
  491. }
  492. </div>
  493. );
  494. },
  495. },
  496. ],
  497. proColumns: [
  498. {
  499. title: "变更状态",
  500. dataIndex: "type",
  501. key: "type",
  502. width: 70,
  503. render: (text, record) => {
  504. let str = "";
  505. let color = "";
  506. if (text == 1) {
  507. str = "增";
  508. color = "#87d068";
  509. } else if (text == 2) {
  510. str = "改";
  511. color = "#108ee9";
  512. } else if (text == 3) {
  513. str = "删";
  514. color = "#f50";
  515. }
  516. return (
  517. <span>
  518. <Tag
  519. color={color}
  520. style={{ display: text == 0 ? "none" : "inline-block" }}
  521. >
  522. {str}
  523. </Tag>
  524. {/* {record.splitStatus == 1 ? (
  525. <Tag color="#108ee9">父项目</Tag>
  526. ) : (
  527. ""
  528. )}
  529. {record.splitStatus == 2 ? (
  530. <Tag color="#108ee9">子项目</Tag>
  531. ) : (
  532. ""
  533. )} */}
  534. </span>
  535. );
  536. },
  537. },
  538. {
  539. title: "业务项目名称",
  540. dataIndex: "commodityName",
  541. key: "commodityName",
  542. render: (text, record) => {
  543. return <span>{text}<span style={{ color: "red" }}>{record.patentTypeName}</span>{"-" + record.id}</span>
  544. }
  545. },
  546. {
  547. title: "项目类别",
  548. dataIndex: "cname",
  549. key: "cname",
  550. },
  551. {
  552. title: "项目数量",
  553. dataIndex: "commodityQuantity",
  554. key: "commodityQuantity",
  555. width: 50,
  556. },
  557. {
  558. title: "金额(万元)",
  559. dataIndex: "commodityPrice",
  560. key: "commodityPrice",
  561. width: 50,
  562. render: (text, record) => {
  563. if (record.splitStatus == 2) {
  564. return "/";
  565. } else {
  566. return text;
  567. }
  568. },
  569. },
  570. {
  571. title: "主要项目",
  572. dataIndex: "main",
  573. key: "main",
  574. width: 50,
  575. render: (text) => {
  576. return text ? "是" : "否";
  577. },
  578. },
  579. {
  580. title: "项目负责人",
  581. dataIndex: "receiverName",
  582. key: "receiverName",
  583. },
  584. {
  585. title: "总年限",
  586. dataIndex: "yearSum",
  587. key: "yearSum",
  588. render: (text, record) => {
  589. return (
  590. <div>{["", "一年", "二年", "三年", "四年", "五年"][text]}</div>
  591. );
  592. }
  593. },
  594. {
  595. title: "年限",
  596. dataIndex: "serviceLife",
  597. key: "serviceLife",
  598. render: (text, record) => {
  599. return (
  600. <div>{!!text && JSON.parse(text).toString()}</div>
  601. );
  602. }
  603. },
  604. {
  605. title: "本次派单",
  606. dataIndex: "serviceYear",
  607. key: "serviceYear",
  608. render: (text, record) => {
  609. return (
  610. <div>{!text ? "" : text}</div>
  611. );
  612. }
  613. },
  614. {
  615. title: "项目说明",
  616. dataIndex: "taskComment",
  617. key: "taskComment",
  618. render: (text) => {
  619. return (
  620. <Tooltip title={text}>
  621. <div
  622. style={{
  623. width: 100,
  624. overflow: "hidden",
  625. whiteSpace: "nowrap",
  626. textOverflow: "ellipsis",
  627. }}
  628. >{text}</div>
  629. </Tooltip>
  630. )
  631. },
  632. },
  633. {
  634. title: "操作",
  635. dataIndex: "ABC",
  636. key: "ABC",
  637. width: 80,
  638. render: (text, record) => {
  639. return (
  640. <div>
  641. <div>
  642. <Button
  643. onClick={(e) => {
  644. e.stopPropagation();
  645. this.showConfirm(this.changeDeletePro, record);
  646. }}
  647. disabled={this.state.listFlag}
  648. style={{
  649. display: this.state.displayList ? "none" : "block",
  650. }}
  651. >
  652. 删除
  653. </Button>
  654. </div>
  655. <div>
  656. <Button
  657. onClick={(e) => {
  658. e.stopPropagation();
  659. this.editPro(record);
  660. }}
  661. disabled={this.state.listFlag}
  662. style={{
  663. display: this.state.displayList ? "none" : "block",
  664. }}
  665. >
  666. 编辑
  667. </Button>
  668. </div>
  669. </div>
  670. );
  671. },
  672. },
  673. ],
  674. detailColumns: [
  675. {
  676. title: "变更状态",
  677. dataIndex: "type",
  678. key: "type",
  679. render: (text, record) => {
  680. let str = "";
  681. let color = "";
  682. if (text == 1) {
  683. str = "增";
  684. color = "#87d068";
  685. } else if (text == 2) {
  686. str = "改";
  687. color = "#108ee9";
  688. } else if (text == 3) {
  689. str = "删";
  690. color = "#f50";
  691. }
  692. return (
  693. <span>
  694. <Tag
  695. color={color}
  696. style={{ display: text == 0 ? "none" : "inline-block" }}
  697. >
  698. {str}
  699. </Tag>
  700. {/* {record.splitStatus == 1 ? (
  701. <Tag color="#108ee9">父项目</Tag>
  702. ) : (
  703. ""
  704. )}
  705. {record.splitStatus == 2 ? (
  706. <Tag color="#108ee9">子项目</Tag>
  707. ) : (
  708. ""
  709. )} */}
  710. </span>
  711. );
  712. },
  713. },
  714. {
  715. title: "业务项目名称",
  716. dataIndex: "commodityName",
  717. key: "commodityName",
  718. render: (text, record) => {
  719. return <span>{text}<span style={{ color: "red" }}>{record.patentTypeName}</span>{"-" + record.id}</span>
  720. }
  721. },
  722. {
  723. title: "项目类别",
  724. dataIndex: "cname",
  725. key: "cname",
  726. },
  727. {
  728. title: "项目数量",
  729. dataIndex: "commodityQuantity",
  730. key: "commodityQuantity",
  731. width: 50,
  732. },
  733. {
  734. title: "金额(万元)",
  735. dataIndex: "commodityPrice",
  736. key: "commodityPrice",
  737. width: 50,
  738. render: (text, record) => {
  739. if (this.props.isZxs) {
  740. return <span>***</span>;
  741. } else if (record.splitStatus == 2) {
  742. return "/";
  743. } else {
  744. return <span>{text}</span>;
  745. }
  746. },
  747. },
  748. {
  749. title: "主要项目",
  750. dataIndex: "main",
  751. key: "main",
  752. width: 50,
  753. render: (text) => {
  754. return text ? "是" : "否";
  755. },
  756. },
  757. {
  758. title: "项目负责人",
  759. dataIndex: "receiverName",
  760. key: "receiverName",
  761. },
  762. {
  763. title: "总年限",
  764. dataIndex: "yearSum",
  765. key: "yearSum",
  766. render: (text, record) => {
  767. return (
  768. <div>{["", "一年", "二年", "三年", "四年", "五年"][text]}</div>
  769. );
  770. }
  771. },
  772. {
  773. title: "年限",
  774. dataIndex: "serviceLife",
  775. key: "serviceLife",
  776. render: (text, record) => {
  777. return (
  778. <div>{!!text && JSON.parse(text).toString()}</div>
  779. );
  780. }
  781. },
  782. {
  783. title: "本次派单",
  784. dataIndex: "serviceYear",
  785. key: "serviceYear",
  786. render: (text, record) => {
  787. return (
  788. <div>{!text ? "" : text}</div>
  789. );
  790. }
  791. },
  792. {
  793. title: "项目说明",
  794. dataIndex: "taskComment",
  795. key: "taskComment",
  796. render: (text) => {
  797. return (
  798. <Tooltip title={text}>
  799. <div
  800. style={{
  801. width: 100,
  802. overflow: "hidden",
  803. whiteSpace: "nowrap",
  804. textOverflow: "ellipsis",
  805. }}
  806. >{text}</div>
  807. </Tooltip>
  808. )
  809. },
  810. },
  811. ],
  812. detailContactsLists: [
  813. {
  814. title: "变更状态",
  815. dataIndex: "type",
  816. key: "type",
  817. render: (text) => {
  818. let str = "";
  819. let color = "";
  820. if (text == 1) {
  821. str = "增";
  822. color = "#87d068";
  823. } else if (text == 2) {
  824. str = "改";
  825. color = "#108ee9";
  826. } else if (text == 3) {
  827. str = "删";
  828. color = "#f50";
  829. }
  830. return (
  831. <Tag
  832. color={color}
  833. style={{ display: text == 0 ? "none" : "inline-block" }}
  834. >
  835. {str}
  836. </Tag>
  837. );
  838. },
  839. },
  840. {
  841. title: "项目名称",
  842. dataIndex: "commodityName",
  843. key: "commodityName",
  844. render: (text, record) => {
  845. let dataArr = this.state.proDataSource || [];
  846. if (record.ctid) {
  847. return <span>{text + "-" + record.ctid}</span>;
  848. } else {
  849. let tid = record.tid;
  850. let ctid = "";
  851. dataArr.forEach((item, index) => {
  852. if (item.tid == tid) {
  853. ctid = item.id;
  854. }
  855. });
  856. return <span>{text + "-" + ctid}</span>;
  857. }
  858. },
  859. },
  860. {
  861. title: "项目分类",
  862. dataIndex: "projectType",
  863. key: "projectType",
  864. render: (text) => {
  865. let arr = this.state.proDataSource || [];
  866. let str = "";
  867. for (let i = 0; i < arr.length; i++) {
  868. if (this.state.proDataSource[i].cSort == text) {
  869. str = this.state.proDataSource[i].cname;
  870. return <span>{str}</span>;
  871. }
  872. }
  873. },
  874. },
  875. {
  876. title: "催款科目",
  877. dataIndex: "dunTypeName",
  878. key: "dunTypeName",
  879. render: (text, record) => {
  880. return <span>{text}</span>;
  881. },
  882. },
  883. {
  884. title: "时间",
  885. dataIndex: "waitDay",
  886. key: "waitDay",
  887. render: (text, record) => {
  888. if (record.dunTypeName) {
  889. if (record.customizeTimes) {
  890. return record.customizeTimes;
  891. }
  892. return <span>{text}</span>;
  893. }
  894. },
  895. },
  896. {
  897. title: "金额(万元)",
  898. dataIndex: "money",
  899. key: "money",
  900. render: (text, record) => {
  901. if (record.dunTypeName) {
  902. if (record.appropriationRatio) {
  903. let percent = Number(record.appropriationRatio * 100).toFixed(2);
  904. percent += "%";
  905. return <span>{percent}(拨款比例)</span>;
  906. } else {
  907. if (this.props.isZxs) {
  908. return <span>***</span>;
  909. }
  910. return <span>{text}</span>;
  911. }
  912. }
  913. },
  914. },
  915. {
  916. title: "服务年限",
  917. dataIndex: "startDate",
  918. key: "startDate",
  919. render: (text, record) => {
  920. if (record.dunTypeName) {
  921. return <span>{text}</span>;
  922. }
  923. },
  924. },
  925. {
  926. title: "催款状态",
  927. dataIndex: "status",
  928. key: "status",
  929. render: (text) => {
  930. return <span>{text == 1 ? "已启动" : "未启动"}</span>;
  931. },
  932. },
  933. ],
  934. resVisible: false,
  935. columnsrizhi: [
  936. {
  937. title: "流程",
  938. dataIndex: "processName",
  939. key: "processName",
  940. },
  941. {
  942. title: "操作人",
  943. dataIndex: "adminName",
  944. key: "adminName",
  945. },
  946. {
  947. title: "时间",
  948. dataIndex: "createDate",
  949. key: "createDate",
  950. },
  951. ],
  952. contactList: [],
  953. ContactsLists: [
  954. {
  955. title: "催款科目",
  956. dataIndex: "dunSubject",
  957. key: "dunSubject",
  958. render: (text, record) => {
  959. return (
  960. <Select
  961. placeholder="请选择催款科目"
  962. value={record.dunSubject}
  963. style={{ width: "150px" }}
  964. disabled
  965. onChange={(e) => {
  966. record.dunSubject = e;
  967. this.setState({ contactList: this.state.contactList });
  968. }}
  969. >
  970. {jiedian.map(function (item) {
  971. return (
  972. <Select.Option key={item.value}>{item.key}</Select.Option>
  973. );
  974. })}
  975. </Select>
  976. );
  977. },
  978. },
  979. {
  980. title: "金额(万元)",
  981. dataIndex: "money",
  982. key: "money",
  983. render: (text, record) => {
  984. return (
  985. <Input
  986. type="number"
  987. value={record.money}
  988. placeholder="请输入金额(必填项)"
  989. disabled
  990. key={record.id}
  991. required="required"
  992. onChange={(e) => {
  993. record.money = e.target.value;
  994. this.setState({ contactList: this.state.contactList });
  995. }}
  996. style={{ width: "120px" }}
  997. />
  998. );
  999. },
  1000. },
  1001. {
  1002. title: "催款状态",
  1003. dataIndex: "dunStatus",
  1004. key: "dunStatus",
  1005. render: (text) => {
  1006. return getCuikuan(text);
  1007. },
  1008. },
  1009. {
  1010. title: "操作",
  1011. dataIndex: "dels",
  1012. key: "dels",
  1013. render: (text, record) => {
  1014. return (
  1015. <div>
  1016. {
  1017. <Popconfirm
  1018. title="是否删除?"
  1019. onConfirm={() => {
  1020. this.confirmDelet(record.key);
  1021. }}
  1022. okText="删除"
  1023. cancelText="不删除"
  1024. >
  1025. <Button
  1026. style={{
  1027. marginRight: "10px",
  1028. color: "#ffffff",
  1029. background: "#f00",
  1030. border: "none",
  1031. display:
  1032. this.state.processStatus == 0 ? "block" : "none",
  1033. }}
  1034. >
  1035. 删除
  1036. </Button>
  1037. </Popconfirm>
  1038. }
  1039. {record.id ? (
  1040. ""
  1041. ) : (
  1042. <Button type="primary" onClick={this.contactSave}>
  1043. 保存
  1044. </Button>
  1045. )}
  1046. </div>
  1047. );
  1048. },
  1049. },
  1050. ],
  1051. ContactsListsNew: [
  1052. {
  1053. title: "项目名称",
  1054. dataIndex: "commodityName",
  1055. key: "commodityName",
  1056. render: (text, record, index) => {
  1057. let dataArr = this.state.dataSource || [];
  1058. if (text) {
  1059. return <span>{text + "-" + record.tid}</span>;
  1060. }
  1061. return (
  1062. <Select
  1063. placeholder="请选择名称"
  1064. style={{ width: "150px" }}
  1065. disabled={
  1066. this.state.getLoad && record.sortName ? true : false
  1067. }
  1068. onChange={(e) => {
  1069. // let num = e.lastIndexOf("-");
  1070. // let ctid = e.substr(num + 1);
  1071. // record.sortName = e.substring(0, num);
  1072. // dataArr.forEach((item) => {
  1073. // if (
  1074. // item.commodityName == record.sortName &&
  1075. // ctid == item.id
  1076. // ) {
  1077. // record.cname = item.cname;
  1078. // record.tid = item.id;
  1079. // record.isSave = true;
  1080. // record.sort = item.sort;
  1081. // cuiJieDian.forEach((item) => {
  1082. // if (item.value == record.sort) {
  1083. // record.arr = item.children;
  1084. // let yearFlag = true;
  1085. // if (record.sort == 6) {
  1086. // yearFlag = false;
  1087. // }
  1088. // this.setState({
  1089. // getLoad: true,
  1090. // yearFlag,
  1091. // });
  1092. // }
  1093. // });
  1094. // }
  1095. // });
  1096. let proData = dataArr[e];
  1097. record.cname = proData.cname;
  1098. record.tid = proData.id;
  1099. record.isSave = true;
  1100. record.sort = proData.sort;
  1101. cuiJieDian.forEach((item) => {
  1102. if (item.value == record.sort) {
  1103. record.arr = item.children;
  1104. let yearFlag = true;
  1105. if (record.sort == 6) {
  1106. yearFlag = false;
  1107. }
  1108. this.setState({
  1109. getLoad: true,
  1110. yearFlag,
  1111. });
  1112. }
  1113. });
  1114. }}
  1115. >
  1116. {dataArr.map((item) => {
  1117. return (
  1118. <Select.Option key={item.id} value={item.key}>
  1119. {item.commodityName + "-" + item.id}
  1120. </Select.Option>
  1121. );
  1122. })}
  1123. </Select>
  1124. );
  1125. },
  1126. },
  1127. {
  1128. title: "项目分类",
  1129. dataIndex: "projectType",
  1130. key: "projectType",
  1131. render: (text, record) => {
  1132. if (text) {
  1133. let arr = this.state.dataSource || [];
  1134. let str = "";
  1135. for (let i = 0; i < arr.length; i++) {
  1136. if (this.state.dataSource[i].sort == text) {
  1137. str = this.state.dataSource[i].cname;
  1138. return <span>{str}</span>;
  1139. }
  1140. }
  1141. if (!str) {
  1142. return <span>未知</span>;
  1143. }
  1144. }
  1145. if (this.state.getLoad) {
  1146. return (
  1147. <Select
  1148. style={{ width: "150px" }}
  1149. placeholder="请选择分类"
  1150. value={record.cname}
  1151. >
  1152. <Select.Option key={record.sort} value={record.cname}>
  1153. {record.cname}
  1154. </Select.Option>
  1155. </Select>
  1156. );
  1157. } else {
  1158. return (
  1159. <Select style={{ width: "150px" }} placeholder="请选择分类">
  1160. <Select.Option key={record.sort} value={record.cname}>
  1161. {record.cname}
  1162. </Select.Option>
  1163. </Select>
  1164. );
  1165. }
  1166. },
  1167. },
  1168. {
  1169. title: "催款科目",
  1170. dataIndex: "dunTypeName",
  1171. key: "dunTypeName",
  1172. render: (text, record) => {
  1173. if (text) {
  1174. if (record.customizeName) {
  1175. return text + record.customizeName;
  1176. }
  1177. return <span>{text}</span>;
  1178. }
  1179. if (this.state.getLoad) {
  1180. let arr = record.arr || [];
  1181. // console.log("record==", record)
  1182. return (
  1183. <div>
  1184. <Select
  1185. style={{ width: "150px", marginRight: 5 }}
  1186. placeholder="请选择分类"
  1187. onChange={(e) => {
  1188. record.dunType = e;
  1189. if (record.dunType == 0) {
  1190. record.customizeTimes = "";
  1191. record.customizeName = "";
  1192. }
  1193. if (e == 0) {
  1194. record.dunTypeCustom = true;
  1195. } else {
  1196. record.dunTypeCustom = false;
  1197. }
  1198. if (e != 1) {
  1199. this.setState({
  1200. timeFlag: true,
  1201. });
  1202. } else {
  1203. this.setState({
  1204. timeFlag: false,
  1205. });
  1206. }
  1207. if (e == 1 && record.sort == 6) {
  1208. this.setState({
  1209. yearFlag: true,
  1210. });
  1211. } else if (e != 1 && record.sort == 6) {
  1212. this.setState({
  1213. yearFlag: false,
  1214. });
  1215. }
  1216. if (record.sort == 3 && e == 3) {
  1217. this.setState({
  1218. boFlag: true,
  1219. });
  1220. } else {
  1221. this.setState({
  1222. boFlag: false,
  1223. });
  1224. }
  1225. }}
  1226. >
  1227. {arr.map((item) => {
  1228. return (
  1229. <Select.Option key={item.value} value={item.value}>
  1230. {item.key}
  1231. </Select.Option>
  1232. );
  1233. })}
  1234. <Select.Option key={0} value={0}>
  1235. 自定义
  1236. </Select.Option>
  1237. </Select>
  1238. {record.dunType == 0 ? (
  1239. <Input
  1240. value={record.customizeName}
  1241. placeholder="请输入自定义名称"
  1242. required="required"
  1243. onChange={(e) => {
  1244. record.customizeName = e.target.value;
  1245. this.setState({
  1246. contactList: this.state.contactList,
  1247. });
  1248. }}
  1249. style={{ width: "120px" }}
  1250. />
  1251. ) : (
  1252. ""
  1253. )}
  1254. </div>
  1255. );
  1256. } else {
  1257. return (
  1258. <Select style={{ width: "150px" }} placeholder="请选择分类">
  1259. <Select.Option
  1260. key={0}
  1261. value={"请选择上一项"}
  1262. ></Select.Option>
  1263. </Select>
  1264. );
  1265. }
  1266. },
  1267. },
  1268. {
  1269. title: "收款时间(特批需选择时间)",
  1270. dataIndex: "waitDay",
  1271. key: "waitDay",
  1272. render: (text, record) => {
  1273. if (record.dunTypeName) {
  1274. if (record.customizeTimes) {
  1275. return record.customizeTimes;
  1276. }
  1277. if (text == 0) {
  1278. var str = "当天";
  1279. } else if (!text) {
  1280. var str = "";
  1281. } else {
  1282. var str = text + "天";
  1283. }
  1284. return <span>{str}</span>;
  1285. }
  1286. return (
  1287. <div>
  1288. {record.dunType == 0 ? (
  1289. <DatePicker
  1290. style={{ width: 150 }}
  1291. disabledDate={(e) => {
  1292. let time = moment(e).valueOf();
  1293. let today = Date.parse(new Date());
  1294. if (time <= today) {
  1295. return true;
  1296. }
  1297. }}
  1298. onChange={(e, t) => {
  1299. record.customizeTimes = t;
  1300. }}
  1301. />
  1302. ) : (
  1303. <Select
  1304. placeholder="请选择时间"
  1305. style={{ width: "160px" }}
  1306. disabled={
  1307. this.state.approval != 0 && !this.state.timeFlag
  1308. ? false
  1309. : true
  1310. }
  1311. onChange={(e) => {
  1312. record.waitDay = e;
  1313. }}
  1314. >
  1315. <Select.Option key={0}>当天</Select.Option>
  1316. <Select.Option key={3}>3天</Select.Option>
  1317. <Select.Option key={5}>5天</Select.Option>
  1318. <Select.Option key={7}>7天</Select.Option>
  1319. <Select.Option key={15}>15天</Select.Option>
  1320. </Select>
  1321. )}
  1322. </div>
  1323. );
  1324. },
  1325. },
  1326. {
  1327. title: "金额(万元)",
  1328. dataIndex: "money",
  1329. key: "money",
  1330. render: (text, record) => {
  1331. if (record.dunTypeName) {
  1332. if (record.appropriationRatio) {
  1333. let percent = Number(record.appropriationRatio * 100).toFixed(2);
  1334. percent += "%";
  1335. return <span>{percent}(拨款比例)</span>;
  1336. } else {
  1337. return <span>{text}</span>;
  1338. }
  1339. }
  1340. return (
  1341. <div>
  1342. <div style={{ width: 70, float: "left", marginRight: 5 }}>
  1343. <Select
  1344. placeholder="选择"
  1345. defaultValue={"金额"}
  1346. onChange={(e) => {
  1347. record.boStatus = e;
  1348. }}
  1349. >
  1350. <Select.Option key={true}>比例</Select.Option>
  1351. <Select.Option key={false}>金额</Select.Option>
  1352. </Select>
  1353. </div>
  1354. <div style={{ float: "right" }}>
  1355. <Input
  1356. type="number"
  1357. value={record.money}
  1358. key={record.id}
  1359. required="required"
  1360. onChange={(e) => {
  1361. record.money = e.target.value;
  1362. this.setState({
  1363. contactList: this.state.contactList,
  1364. });
  1365. }}
  1366. style={{ width: "120px" }}
  1367. />
  1368. </div>
  1369. </div>
  1370. )
  1371. // if (this.state.boFlag) {
  1372. // return (
  1373. // <div>
  1374. // <div style={{ width: 70, float: "left", marginRight: 5 }}>
  1375. // <Select
  1376. // placeholder="选择"
  1377. // defaultValue={"金额"}
  1378. // onChange={(e) => {
  1379. // record.boStatus = e;
  1380. // }}
  1381. // >
  1382. // <Select.Option key={true}>比例</Select.Option>
  1383. // <Select.Option key={false}>金额</Select.Option>
  1384. // </Select>
  1385. // </div>
  1386. // <div style={{ float: "right" }}>
  1387. // <Input
  1388. // type="number"
  1389. // value={record.money}
  1390. // key={record.id}
  1391. // required="required"
  1392. // onChange={(e) => {
  1393. // record.money = e.target.value;
  1394. // this.setState({
  1395. // contactList: this.state.contactList,
  1396. // });
  1397. // }}
  1398. // style={{ width: "120px" }}
  1399. // />
  1400. // </div>
  1401. // </div>
  1402. // );
  1403. // } else {
  1404. // return (
  1405. // <div>
  1406. // <Input
  1407. // type="number"
  1408. // value={record.money}
  1409. // placeholder="请输入金额(必填项)"
  1410. // key={record.id}
  1411. // required="required"
  1412. // onChange={(e) => {
  1413. // record.money = e.target.value;
  1414. // this.setState({ contactList: this.state.contactList });
  1415. // }}
  1416. // style={{ width: "120px" }}
  1417. // />
  1418. // </div>
  1419. // );
  1420. // }
  1421. },
  1422. },
  1423. {
  1424. title: "服务年限",
  1425. dataIndex: "startDate",
  1426. key: "startDate",
  1427. render: (text, record) => {
  1428. if (record.dunTypeName) {
  1429. return <span>{text}</span>;
  1430. }
  1431. return (
  1432. <div>
  1433. {record.dunType != 0 ? (
  1434. <Select
  1435. placeholder="请选择年限"
  1436. style={{ width: "150px" }}
  1437. disabled={this.state.yearFlag ? true : false}
  1438. onChange={(e) => {
  1439. record.effectiveCount = e;
  1440. }}
  1441. >
  1442. {/* <Select.Option key={null}>无</Select.Option> */}
  1443. <Select.Option key={1}>一年</Select.Option>
  1444. <Select.Option key={3}>两年</Select.Option>
  1445. <Select.Option key={5}>三年</Select.Option>
  1446. <Select.Option key={7}>四年</Select.Option>
  1447. <Select.Option key={9}>五年</Select.Option>
  1448. </Select>
  1449. ) : (
  1450. <div />
  1451. )}
  1452. </div>
  1453. );
  1454. },
  1455. },
  1456. {
  1457. title: "催款状态",
  1458. dataIndex: "status",
  1459. key: "status",
  1460. render: (text) => {
  1461. return <span>{text == 1 ? "已启动" : "未启动"}</span>;
  1462. },
  1463. },
  1464. {
  1465. title: "操作",
  1466. dataIndex: "dels",
  1467. key: "dels",
  1468. render: (text, record, index) => {
  1469. return (
  1470. <div>
  1471. {this.state.processStatus == 0 ? (
  1472. <Popconfirm
  1473. title="是否删除?"
  1474. onConfirm={() => {
  1475. this.confirmDeletNew(record);
  1476. }}
  1477. okText="删除"
  1478. cancelText="不删除"
  1479. >
  1480. <Button
  1481. style={{
  1482. marginRight: "10px",
  1483. color: "#ffffff",
  1484. background: "#f00",
  1485. border: "none",
  1486. }}
  1487. >
  1488. 删除
  1489. </Button>
  1490. </Popconfirm>
  1491. ) : (
  1492. ""
  1493. )}
  1494. {record.isSave ? (
  1495. <Button
  1496. type="primary"
  1497. onClick={(e) => {
  1498. this.contactSaveNew(record);
  1499. }}
  1500. >
  1501. 保存
  1502. </Button>
  1503. ) : (
  1504. ""
  1505. )}
  1506. </div>
  1507. );
  1508. },
  1509. },
  1510. ],
  1511. changeCuiList: [
  1512. {
  1513. title: "变更状态",
  1514. dataIndex: "type",
  1515. key: "type",
  1516. render: (text) => {
  1517. let str = "";
  1518. let color = "";
  1519. if (text == 1) {
  1520. str = "增";
  1521. color = "#87d068";
  1522. } else if (text == 2) {
  1523. str = "改";
  1524. color = "#108ee9";
  1525. } else if (text == 3) {
  1526. str = "删";
  1527. color = "#f50";
  1528. }
  1529. return (
  1530. <Tag
  1531. color={color}
  1532. style={{ display: text == 0 ? "none" : "inline-block" }}
  1533. >
  1534. {str}
  1535. </Tag>
  1536. );
  1537. },
  1538. },
  1539. {
  1540. title: "项目名称",
  1541. dataIndex: "commodityName",
  1542. key: "commodityName",
  1543. render: (text, record, index) => {
  1544. let dataArr = this.state.proDataSource || [];
  1545. if (text) {
  1546. // return <span>{text + "-" + record.ctid}</span>;
  1547. if (record.ctid) {
  1548. return <span>{text + "-" + record.ctid}</span>;
  1549. } else {
  1550. let tid = record.tid;
  1551. let ctid = "";
  1552. dataArr.forEach((item, index) => {
  1553. if (item.tid == tid) {
  1554. ctid = item.id;
  1555. }
  1556. });
  1557. return <span>{text + "-" + ctid}</span>;
  1558. }
  1559. }
  1560. return (
  1561. <Select
  1562. placeholder="请选择名称"
  1563. style={{ width: "150px" }}
  1564. disabled={
  1565. this.state.getLoad && record.sortName ? true : false
  1566. }
  1567. onChange={(e) => {
  1568. let proData = dataArr[e];
  1569. record.cname = proData.cname;
  1570. record.ctid = proData.id;
  1571. record.isSave = true;
  1572. record.sort = proData.cSort;
  1573. cuiJieDian.forEach((item) => {
  1574. if (item.value == record.sort) {
  1575. record.arr = item.children;
  1576. let yearFlag = true;
  1577. if (record.sort == 6) {
  1578. yearFlag = false;
  1579. }
  1580. this.setState({
  1581. getLoad: true,
  1582. yearFlag,
  1583. });
  1584. }
  1585. });
  1586. }}
  1587. >
  1588. {dataArr.map((item, index) => {
  1589. if (item.type == 3) {
  1590. return (
  1591. <Select.Option key={item.id} value={item.key} disabled>
  1592. {item.commodityName + "-" + item.id}
  1593. </Select.Option>
  1594. );
  1595. } else {
  1596. return (
  1597. <Select.Option key={item.id} value={item.key}>
  1598. {item.commodityName + "-" + item.id}
  1599. </Select.Option>
  1600. );
  1601. }
  1602. })}
  1603. </Select>
  1604. );
  1605. },
  1606. },
  1607. {
  1608. title: "项目分类",
  1609. dataIndex: "projectType",
  1610. key: "projectType",
  1611. render: (text, record) => {
  1612. if (text) {
  1613. let arr = this.state.proDataSource || [];
  1614. let str = "";
  1615. for (let i = 0; i < arr.length; i++) {
  1616. if (this.state.proDataSource[i].cSort == text) {
  1617. str = this.state.proDataSource[i].cname;
  1618. return <span>{str}</span>;
  1619. }
  1620. }
  1621. }
  1622. if (this.state.getLoad) {
  1623. return (
  1624. <Select
  1625. style={{ width: "150px" }}
  1626. placeholder="请选择分类"
  1627. value={record.cname}
  1628. >
  1629. <Select.Option key={record.sort} value={record.cname}>
  1630. {record.cname}
  1631. </Select.Option>
  1632. </Select>
  1633. );
  1634. } else {
  1635. return (
  1636. <Select style={{ width: "150px" }} placeholder="请选择分类">
  1637. <Select.Option key={record.sort} value={record.cname}>
  1638. {record.cname}
  1639. </Select.Option>
  1640. </Select>
  1641. );
  1642. }
  1643. },
  1644. },
  1645. {
  1646. title: "催款科目",
  1647. dataIndex: "dunTypeName",
  1648. key: "dunTypeName",
  1649. render: (text, record) => {
  1650. if (text) {
  1651. return <span>{text}</span>;
  1652. }
  1653. if (this.state.getLoad) {
  1654. let arr = record.arr || [];
  1655. return (
  1656. <div>
  1657. <Select
  1658. style={{ width: "150px", marginRight: 5 }}
  1659. placeholder="请选择分类"
  1660. onChange={(e) => {
  1661. record.dunType = e;
  1662. if (record.dunType != 0) {
  1663. record.customizeTimes = "";
  1664. record.customizeName = "";
  1665. }
  1666. if (e != 1) {
  1667. this.setState({
  1668. timeFlag: true,
  1669. });
  1670. } else {
  1671. this.setState({
  1672. timeFlag: false,
  1673. });
  1674. }
  1675. if (e == 1 && record.sort == 6) {
  1676. this.setState({
  1677. yearFlag: true,
  1678. });
  1679. } else if (e != 1 && record.sort == 6) {
  1680. this.setState({
  1681. yearFlag: false,
  1682. });
  1683. }
  1684. if (record.sort == 3 && e == 3) {
  1685. this.setState({
  1686. boFlag: true,
  1687. });
  1688. } else {
  1689. this.setState({
  1690. boFlag: false,
  1691. });
  1692. }
  1693. }}
  1694. >
  1695. {arr.map((item) => {
  1696. record;
  1697. return (
  1698. <Select.Option key={item.value} value={item.value}>
  1699. {item.key}
  1700. </Select.Option>
  1701. );
  1702. })}
  1703. <Select.Option key={0} value={0}>
  1704. 自定义
  1705. </Select.Option>
  1706. </Select>
  1707. {record.dunType == 0 ? (
  1708. <Input
  1709. value={record.customizeName}
  1710. placeholder="请输入自定义名称"
  1711. required="required"
  1712. onChange={(e) => {
  1713. record.customizeName = e.target.value;
  1714. this.setState({
  1715. contactList: this.state.contactList,
  1716. });
  1717. }}
  1718. style={{ width: "120px" }}
  1719. />
  1720. ) : (
  1721. ""
  1722. )}
  1723. </div>
  1724. );
  1725. } else {
  1726. return (
  1727. <Select style={{ width: "150px" }} placeholder="请选择分类">
  1728. <Select.Option
  1729. key={0}
  1730. value={"请选择上一项"}
  1731. ></Select.Option>
  1732. </Select>
  1733. );
  1734. }
  1735. },
  1736. },
  1737. {
  1738. title: "收款时间(特批需选择时间)",
  1739. dataIndex: "waitDay",
  1740. key: "waitDay",
  1741. render: (text, record) => {
  1742. if (record.dunTypeName) {
  1743. if (record.customizeTimes) {
  1744. return record.customizeTimes;
  1745. }
  1746. if (text == 0) {
  1747. var str = "当天";
  1748. } else if (!text) {
  1749. var str = "";
  1750. } else {
  1751. var str = text + "天";
  1752. }
  1753. return <span>{str}</span>;
  1754. }
  1755. return (
  1756. <div>
  1757. {record.dunType == 0 ? (
  1758. <DatePicker
  1759. style={{ width: 150 }}
  1760. disabledDate={(e) => {
  1761. let time = moment(e).valueOf();
  1762. let today = Date.parse(new Date());
  1763. if (time <= today) {
  1764. return true;
  1765. }
  1766. }}
  1767. onChange={(e, t) => {
  1768. record.customizeTimes = t;
  1769. }}
  1770. />
  1771. ) : (
  1772. <Select
  1773. placeholder="请选择时间"
  1774. style={{ width: "160px" }}
  1775. disabled={
  1776. this.state.approval != 0 && !this.state.timeFlag
  1777. ? false
  1778. : true
  1779. }
  1780. onChange={(e) => {
  1781. record.waitDay = e;
  1782. }}
  1783. >
  1784. <Select.Option key={0}>当天</Select.Option>
  1785. <Select.Option key={3}>3天</Select.Option>
  1786. <Select.Option key={5}>5天</Select.Option>
  1787. <Select.Option key={7}>7天</Select.Option>
  1788. <Select.Option key={15}>15天</Select.Option>
  1789. </Select>
  1790. )}
  1791. </div>
  1792. );
  1793. },
  1794. },
  1795. {
  1796. title: "金额(万元)",
  1797. dataIndex: "money",
  1798. key: "money",
  1799. render: (text, record) => {
  1800. if (record.dunTypeName) {
  1801. if (record.appropriationRatio) {
  1802. let percent = Number(record.appropriationRatio * 100).toFixed(2);
  1803. percent += "%";
  1804. return <span>{percent}(拨款比例)</span>;
  1805. } else {
  1806. return <span>{text}</span>;
  1807. }
  1808. }
  1809. return (
  1810. <div>
  1811. <div style={{ width: 70, float: "left", marginRight: 5 }}>
  1812. <Select
  1813. placeholder="选择"
  1814. defaultValue={"金额"}
  1815. onChange={(e) => {
  1816. record.boStatus = e;
  1817. }}
  1818. >
  1819. <Select.Option key={true}>比例</Select.Option>
  1820. <Select.Option key={false}>金额</Select.Option>
  1821. </Select>
  1822. </div>
  1823. <div style={{ float: "right" }}>
  1824. <Input
  1825. type="number"
  1826. value={record.money}
  1827. key={record.id}
  1828. required="required"
  1829. onChange={(e) => {
  1830. record.money = e.target.value;
  1831. this.setState({
  1832. contactList: this.state.contactList,
  1833. });
  1834. }}
  1835. style={{ width: "120px" }}
  1836. />
  1837. </div>
  1838. </div>
  1839. );
  1840. // if (this.state.boFlag) {
  1841. // return (
  1842. // <div>
  1843. // <div style={{ width: 70, float: "left", marginRight: 5 }}>
  1844. // <Select
  1845. // placeholder="选择"
  1846. // defaultValue={"金额"}
  1847. // onChange={(e) => {
  1848. // record.boStatus = e;
  1849. // }}
  1850. // >
  1851. // <Select.Option key={true}>比例</Select.Option>
  1852. // <Select.Option key={false}>金额</Select.Option>
  1853. // </Select>
  1854. // </div>
  1855. // <div style={{ float: "right" }}>
  1856. // <Input
  1857. // type="number"
  1858. // value={record.money}
  1859. // key={record.id}
  1860. // required="required"
  1861. // onChange={(e) => {
  1862. // record.money = e.target.value;
  1863. // this.setState({
  1864. // contactList: this.state.contactList,
  1865. // });
  1866. // }}
  1867. // style={{ width: "120px" }}
  1868. // />
  1869. // </div>
  1870. // </div>
  1871. // );
  1872. // } else {
  1873. // return (
  1874. // <div>
  1875. // <Input
  1876. // type="number"
  1877. // value={record.money}
  1878. // placeholder="请输入金额(必填项)"
  1879. // key={record.id}
  1880. // required="required"
  1881. // onChange={(e) => {
  1882. // record.money = e.target.value;
  1883. // this.setState({ contactList: this.state.contactList });
  1884. // }}
  1885. // style={{ width: "120px" }}
  1886. // />
  1887. // </div>
  1888. // );
  1889. // }
  1890. },
  1891. },
  1892. {
  1893. title: "服务年限",
  1894. dataIndex: "startDate",
  1895. key: "startDate",
  1896. render: (text, record) => {
  1897. if (record.dunTypeName) {
  1898. return <span>{text}</span>;
  1899. }
  1900. return (
  1901. <Select
  1902. placeholder="请选择年限"
  1903. style={{ width: "150px" }}
  1904. disabled={this.state.yearFlag ? true : false}
  1905. onChange={(e) => {
  1906. record.effectiveCount = e;
  1907. }}
  1908. >
  1909. {/* <Select.Option key={null}>无</Select.Option> */}
  1910. <Select.Option key={1}>一年</Select.Option>
  1911. <Select.Option key={3}>两年</Select.Option>
  1912. <Select.Option key={5}>三年</Select.Option>
  1913. <Select.Option key={7}>四年</Select.Option>
  1914. <Select.Option key={9}>五年</Select.Option>
  1915. </Select>
  1916. );
  1917. },
  1918. },
  1919. {
  1920. title: "催款状态",
  1921. dataIndex: "status",
  1922. key: "status",
  1923. render: (text) => {
  1924. return <span>{text == 1 ? "已启动" : "未启动"}</span>;
  1925. },
  1926. },
  1927. {
  1928. title: "操作",
  1929. dataIndex: "dels",
  1930. key: "dels",
  1931. render: (text, record, index) => {
  1932. return (
  1933. <div>
  1934. <Popconfirm
  1935. title="是否删除?"
  1936. onConfirm={() => {
  1937. this.changeDeleteCui(record);
  1938. }}
  1939. okText="删除"
  1940. cancelText="不删除"
  1941. >
  1942. <Button
  1943. disabled={this.state.listCuiFlag}
  1944. style={{
  1945. marginRight: "10px",
  1946. display: this.state.displayList ? "none" : "block",
  1947. }}
  1948. >
  1949. 删除
  1950. </Button>
  1951. </Popconfirm>
  1952. {record.isSave ? (
  1953. <Button
  1954. type="primary"
  1955. style={{ marginTop: 5 }}
  1956. onClick={(e) => {
  1957. this.changeSaveCui(record);
  1958. }}
  1959. >
  1960. 保存
  1961. </Button>
  1962. ) : (
  1963. ""
  1964. )}
  1965. </div>
  1966. );
  1967. },
  1968. },
  1969. ],
  1970. updatas: {},//销售类型修改数据
  1971. newData: {},//新建会员记忆数据
  1972. serviceLife: [],
  1973. isVip: undefined,//是否会员
  1974. isIso: undefined,//是否贯标
  1975. histYear: [],
  1976. contractTerm: [],//合同期
  1977. isEdit: false,//是否可编辑
  1978. addyear: undefined,//
  1979. isGive: 0,//是否赠送
  1980. cPeriod: false, // 合同期是否可编辑
  1981. isNew: false,// 是否替换合同
  1982. sType: "",
  1983. selectList: [],// 可操作项目集
  1984. };
  1985. },
  1986. getpatentTypeList() {
  1987. $.ajax({
  1988. method: "get",
  1989. dataType: "json",
  1990. crossDomain: false,
  1991. url: globalConfig.context + "/api/admin/orderProject/getPatentType",
  1992. success: function (data) {
  1993. if (data.error.length === 0) {
  1994. this.setState({
  1995. patentTypeList: data.data,
  1996. });
  1997. } else {
  1998. message.warning(data.error[0].message);
  1999. }
  2000. }.bind(this),
  2001. });
  2002. },
  2003. departmentList() {
  2004. this.setState({
  2005. loading: true,
  2006. });
  2007. $.ajax({
  2008. method: "get",
  2009. dataType: "json",
  2010. crossDomain: false,
  2011. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  2012. data: {},
  2013. success: function (data) {
  2014. let thedata = data.data;
  2015. let theArr = [];
  2016. if (!thedata) {
  2017. if (data.error && data.error.length) {
  2018. message.warning(data.error[0].message);
  2019. }
  2020. thedata = {};
  2021. } else {
  2022. thedata.forEach((item) => {
  2023. theArr.push({
  2024. key: item.id,
  2025. name: item.name,
  2026. id: item.id,
  2027. depNo: item.depNo,
  2028. })
  2029. if (item.list) {
  2030. item.list.forEach((itl) => {
  2031. theArr.push({
  2032. key: itl.id,
  2033. name: itl.name,
  2034. id: itl.id,
  2035. depNo: itl.depNo,
  2036. })
  2037. });
  2038. }
  2039. })
  2040. }
  2041. this.setState({
  2042. departmentArr: theArr,
  2043. });
  2044. }.bind(this),
  2045. }).always(
  2046. function () {
  2047. this.setState({
  2048. loading: false,
  2049. });
  2050. }.bind(this)
  2051. );
  2052. },
  2053. // 拆分详细
  2054. showRes(record) {
  2055. this.setState({
  2056. resVisible: true,
  2057. resRecord: record,
  2058. });
  2059. },
  2060. resCancel() {
  2061. this.setState({
  2062. resVisible: false,
  2063. });
  2064. },
  2065. //新建订单、编辑订单保存
  2066. handleSubmit(e) {
  2067. e.preventDefault();
  2068. let theorgCodeUrl = [];
  2069. if (this.state.orgCodeUrl.length) {
  2070. let picArr = [];
  2071. this.state.orgCodeUrl.map(function (item) {
  2072. if (
  2073. item.response &&
  2074. item.response.data &&
  2075. item.response.data.length
  2076. ) {
  2077. picArr.push(item.response.data);
  2078. }
  2079. });
  2080. theorgCodeUrl = picArr.join(",");
  2081. }
  2082. let theReplenishUrl = [];
  2083. if (this.state.replenishUrl.length) {
  2084. let picArr = [];
  2085. this.state.replenishUrl.map(function (item) {
  2086. if (
  2087. item.response &&
  2088. item.response.data &&
  2089. item.response.data.length
  2090. ) {
  2091. picArr.push(item.response.data);
  2092. }
  2093. });
  2094. theReplenishUrl = picArr.join(",");
  2095. }
  2096. // 服务内容上传图片
  2097. let contentUrl = [];
  2098. if (this.props.userDetaile) {
  2099. if (this.state.contentUrl.length) {
  2100. let picArr = [];
  2101. this.state.contentUrl.map(function (item) {
  2102. if (
  2103. item.response &&
  2104. item.response.data &&
  2105. item.response.data.length
  2106. ) {
  2107. picArr.push(item.response.data);
  2108. }
  2109. });
  2110. contentUrl = picArr.join(",");
  2111. } else {
  2112. message.info("请上传服务内容图片")
  2113. return
  2114. }
  2115. }
  2116. if (this.props.userDetaile) {
  2117. if (!this.state.signDate) {
  2118. message.warning("签单日期不能为空");
  2119. $(".signDateRef input").focus();
  2120. return false;
  2121. }
  2122. if (isNaN(parseInt(this.state.totalAmount))) {
  2123. message.warning("签单金额不能为空");
  2124. this.refs.totalAmountRef.focus();
  2125. return false;
  2126. }
  2127. if (isNaN(parseInt(this.state.firstAmount))) {
  2128. message.warning("首付金额不能为空");
  2129. this.refs.firstAmountRef.focus();
  2130. return false;
  2131. }
  2132. if (moneyVerify(this.state.firstAmount)) {
  2133. return;
  2134. }
  2135. if (moneyVerify(this.state.totalAmount)) {
  2136. return;
  2137. }
  2138. if (!this.state.contacts) {
  2139. message.warning("企业联系人不能为空");
  2140. return
  2141. }
  2142. if (!this.state.contactMobile) {
  2143. message.warning("企业联系人电话不能为空");
  2144. return
  2145. }
  2146. var regeX1 = /^1[3456789]\d{9}$/;
  2147. var regex2 = /^((0\d{2,3})-)?(\d{7,8})$/;
  2148. if (regeX1.test(this.state.contactMobile) == false && regex2.test(this.state.contactMobile) == false) {
  2149. message.warning("请输入正确的企业联系人电话");
  2150. return false;
  2151. }
  2152. if (!theorgCodeUrl) {
  2153. message.warning("图片过大,上传失败");
  2154. this.refs.signFirstPayment.focus();
  2155. return false;
  2156. }
  2157. if (this.state.isShow) {
  2158. if (this.state.knowledgeServices == null ||
  2159. this.state.auditServices == null ||
  2160. this.state.addDeductionServices == null) {
  2161. message.warn("请完善高新纯咨询合同说明!")
  2162. return
  2163. }
  2164. }
  2165. if (!this.state.isProperty) {
  2166. message.warn("请完善知识产权情况!")
  2167. return
  2168. }
  2169. if (this.state.isProperty == 2 && !this.state.patentStatus) {
  2170. message.warn("请完善知识产权情况!")
  2171. return
  2172. }
  2173. if (!this.state.orderRemarks) {
  2174. message.warning("订单留言不能为空");
  2175. this.refs.orderRemarksRef.focus();
  2176. return false;
  2177. }
  2178. }
  2179. const arr = this.state.contactListNew || [];
  2180. for (let i = 0; i < arr.length; i++) {
  2181. if (
  2182. arr[i].dunType == 1 &&
  2183. arr[i].waitDay != null &&
  2184. this.state.approval == 0
  2185. ) {
  2186. message.warning(
  2187. "非特批存在填写催款节点首付时间的情况,请删除后重新填写保存"
  2188. );
  2189. return false;
  2190. } else if (
  2191. arr[i].dunType == 1 &&
  2192. arr[i].waitDay == null &&
  2193. this.state.approval == 1
  2194. ) {
  2195. message.warning(
  2196. "特批存在首付催款节点未填写时间的情况,请删除后重新填写保存"
  2197. );
  2198. return false;
  2199. }
  2200. if (!this.state.contactListNew[i].id && this.props.userDetaile) {
  2201. message.warning("请保存催款节点");
  2202. return false;
  2203. }
  2204. }
  2205. this.setState({
  2206. loading: true,
  2207. });
  2208. let api = this.props.userDetaile
  2209. ? this.state.isSubmit == 1 ? "/api/admin/newOrder/submitOrder" : "/api/admin/newOrder/updateServiceOrderNew"
  2210. : "/api/admin/newOrder/createOrder";
  2211. const { selectSales, other, channelid, channelname, userType } = this.state
  2212. // 开单
  2213. let datas = {
  2214. uid: this.state.autoId,//用户id
  2215. orderType: this.state.orderType,//订单类型
  2216. salesType: selectSales,//销售类型
  2217. userType: userType,//客户所属类型
  2218. };
  2219. if (selectSales == "3") { //传渠道编号 other里面传渠道名称
  2220. datas = Object.assign(datas, {
  2221. channelId: channelid,
  2222. other: channelname,
  2223. })
  2224. } else if (selectSales == "4" || selectSales == "5") { //3,4要传描述
  2225. datas = Object.assign(datas, {
  2226. other: other,
  2227. })
  2228. }
  2229. $.ajax({
  2230. method: "POST",
  2231. dataType: "json",
  2232. crossDomain: false,
  2233. url: globalConfig.context + api,
  2234. data: !this.props.userDetaile
  2235. ? datas
  2236. : {
  2237. // 签单、保存
  2238. orderNo: this.state.orderNo, //订单编号
  2239. totalAmount: this.state.totalAmount, //总金额
  2240. firstAmount: this.state.firstAmount, //首付
  2241. isSubmit: this.state.isSubmit, //保存草稿还是提交
  2242. signDate: this.state.signDate, //签单日期
  2243. contacts: this.state.contacts, //企业负责人
  2244. contactMobile: this.state.contactMobile, //负责人联系方式
  2245. legalPerson: this.state.legalPerson, //企业法人
  2246. legalPersonTel: this.state.legalPersonTel, //企业法人联系电话
  2247. approval: this.state.approval, //特批状态
  2248. orderRemarks: this.state.orderRemarks, //订单备注
  2249. contractPictureUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
  2250. agreementUrl: theReplenishUrl.length ? theReplenishUrl : "",
  2251. serviceContent: contentUrl.length ? contentUrl : "",
  2252. orderDep: this.state.organizationSearch,
  2253. knowledgeServices: this.state.isShow ? this.state.knowledgeServices : undefined, //知识产权服务
  2254. auditServices: this.state.isShow ? this.state.auditServices : undefined, //审计服务
  2255. addDeductionServices: this.state.isShow ? this.state.addDeductionServices : undefined, //加计扣除服务
  2256. knowledgeOther: this.state.isShow ? this.state.knowledgeOther : undefined, //知识产权服务其他描述
  2257. auditOther: this.state.isShow ? this.state.auditOther : undefined, //审计服务其他描述
  2258. addDeductionOther: this.state.isShow ? this.state.addDeductionOther : undefined, //加计扣除服务其他描述
  2259. patentStatus: this.state.patentStatus, //知识产权情况
  2260. },
  2261. }).done(
  2262. function (data) {
  2263. this.setState({
  2264. loading: false,
  2265. });
  2266. if (!data.error.length) {
  2267. message.success("保存成功!");
  2268. this.handleOk();
  2269. if (this.state.autoId) {
  2270. this.loadData();
  2271. }
  2272. } else {
  2273. message.warning(data.error[0].message);
  2274. }
  2275. }.bind(this)
  2276. );
  2277. },
  2278. //订单作废
  2279. examOks() {
  2280. this.setState({
  2281. loading: true,
  2282. });
  2283. $.ajax({
  2284. method: "post",
  2285. dataType: "json",
  2286. crossDomain: false,
  2287. url: globalConfig.context + "/api/admin/newOrder/deleteOrderNew",
  2288. data: {
  2289. orderNo: this.state.orderNo, //订单编号
  2290. },
  2291. success: function (data) {
  2292. if (data.error.length || data.data.list == "") {
  2293. if (data.error && data.error.length) {
  2294. message.warning(data.error[0].message);
  2295. }
  2296. } else {
  2297. message.success("操作成功~");
  2298. this.setState({
  2299. visible: false,
  2300. loading: false,
  2301. });
  2302. this.props.closeDesc(false);
  2303. }
  2304. }.bind(this),
  2305. }).always(
  2306. function () {
  2307. this.setState({
  2308. loading: false,
  2309. });
  2310. }.bind(this)
  2311. );
  2312. },
  2313. //订单详情修改
  2314. xiangqingClick(e) {
  2315. e.preventDefault();
  2316. this.setState({
  2317. loading: true,
  2318. });
  2319. if (this.state.approval == 2 || this.state.approval == 3) {
  2320. message.warning("特批状态不正确");
  2321. this.setState({
  2322. loading: false,
  2323. });
  2324. return;
  2325. }
  2326. $.ajax({
  2327. url: globalConfig.context + this.state.isSubmit == 1 ? "/api/admin/newOrder/submitOrder" : "/api/admin/newOrder/updateServiceOrderNew",
  2328. method: "post",
  2329. data: {
  2330. orderNo: this.state.orderNo, //订单编号
  2331. totalAmount: this.state.totalAmount, //总金额
  2332. firstAmount: this.state.firstAmount, //首付
  2333. isSubmit: this.state.isSubmit, //保存草稿还是提交
  2334. signDate: this.state.selTime, //签单日期
  2335. contacts: this.state.contacts, //企业负责人
  2336. contactMobile: this.state.contactMobile, //负责人联系方式
  2337. legalPerson: this.state.legalPerson, //企业法人
  2338. legalPersonTel: this.state.legalPersonTel, //企业法人联系电话
  2339. approval: this.state.approval, //特批状态
  2340. orderRemarks: this.state.orderRemarks, //订单备注
  2341. },
  2342. }).done(
  2343. function (data) {
  2344. this.setState({
  2345. loading: false,
  2346. });
  2347. if (!data.error.length) {
  2348. message.success("保存成功!");
  2349. this.loaduser();
  2350. } else {
  2351. message.warning(data.error[0].message);
  2352. }
  2353. }.bind(this)
  2354. );
  2355. },
  2356. not() { },
  2357. //查看基本详情基本信息
  2358. loaduser(record) {
  2359. this.setState({
  2360. closable: false,
  2361. disabledView: "none",
  2362. });
  2363. this.state.orderList = [];
  2364. $.ajax({
  2365. method: "get",
  2366. dataType: "json",
  2367. crossDomain: false,
  2368. url: globalConfig.context + "/api/admin/newOrder/getOrderNewDetail",
  2369. data: {
  2370. orderNo: record ? record.orderNo : this.props.datauser.orderNo,
  2371. },
  2372. success: function (data) {
  2373. let thisData = data.data;
  2374. if (!thisData) {
  2375. if (data.error && data.error.length) {
  2376. message.warning(data.error[0].message);
  2377. }
  2378. thisData = {};
  2379. }
  2380. // if (thisData.approval == 2) {
  2381. // thisData.approval = "特批通过";
  2382. // } else if (thisData.approval == 3) {
  2383. // thisData.approval = "特批驳回";
  2384. // }
  2385. this.setState({
  2386. id: thisData.id,
  2387. kehuId: thisData.buyerId,
  2388. orderNo: thisData.orderNo, //订单编号
  2389. orderType: thisData.orderType, //订单类型
  2390. firstAmount: thisData.firstAmount, //首付金额
  2391. totalAmount: thisData.totalAmount, //总金额
  2392. settlementAmount: thisData.settlementAmount, //结算金额
  2393. liquidationStatus: thisData.liquidationStatus, //清算状态
  2394. examineName: thisData.examineName,
  2395. processStatus: thisData.processStatus, //流程状态
  2396. approval: thisData.approval, //特批状态
  2397. orderRemarks: thisData.orderRemarks, //订单备注
  2398. contractNo: thisData.contractNo, //合同编号
  2399. contacts: thisData.contacts, //联系人
  2400. contactMobile: thisData.contactMobile, //联系人电话
  2401. legalPerson: thisData.legalPerson, //法人
  2402. legalPersonTel: thisData.legalPersonTel, //法人电话
  2403. knowledgeServices: thisData.knowledgeServices, //知识产权服务
  2404. auditServices: thisData.auditServices, //审计服务
  2405. addDeductionServices: thisData.addDeductionServices, //加计扣除服务
  2406. knowledgeOther: thisData.knowledgeOther, //知识产权服务其他描述
  2407. auditOther: thisData.auditOther, //审计服务其他描述
  2408. addDeductionOther: thisData.addDeductionOther, //加计扣除服务其他描述
  2409. patentStatus: thisData.patentStatus, // 知识产权情况
  2410. isProperty: thisData.patentStatus == null ? null : thisData.patentStatus == 0 ? 1 : 2,
  2411. orgCodeUrl: thisData.contractPictureUrl
  2412. ? splitUrl(
  2413. thisData.contractPictureUrl,
  2414. ",",
  2415. globalConfig.avatarHost + "/upload"
  2416. )
  2417. : [], //图片地址
  2418. replenishUrl: thisData.agreementUrl
  2419. ? splitUrl(
  2420. thisData.agreementUrl,
  2421. ",",
  2422. globalConfig.avatarHost + "/upload"
  2423. )
  2424. : [], //图片地址
  2425. contentUrl: thisData.serviceContent
  2426. ? splitUrl(
  2427. thisData.serviceContent,
  2428. ",",
  2429. globalConfig.avatarHost + "/upload"
  2430. )
  2431. : [], //图片地址
  2432. signDate: thisData.signDate, //签单时间
  2433. userName: thisData.userName, //客户名称
  2434. salesmanName: thisData.salesmanName, //营销员名称
  2435. salesmanMobile: thisData.salesmanMobile, //营销员电话
  2436. oldSalesmanName: thisData.oldSalesmanName, //营销员名称
  2437. oldSalesmanMobile: thisData.oldSalesmanMobile, //营销员电话
  2438. financeName: thisData.financeName, //财务名称
  2439. financeMobile: thisData.financeMobile, //财务电话
  2440. nowFinanceMobile: thisData.nowFinanceMobile,
  2441. nowFinance: thisData.nowFinance,
  2442. // approval:
  2443. // thisData.approval == 0
  2444. // ? thisData.approval.toString()
  2445. // : thisData.approval,
  2446. organizationSearch: thisData.orderDep,
  2447. depName: thisData.depName,
  2448. status: thisData.status,
  2449. outsource: thisData.outsource,
  2450. deleteSign: thisData.deleteSign,
  2451. orderUid: thisData.uid,
  2452. userType: thisData.userType,
  2453. updatas: {
  2454. salesType: thisData.salesType,//销售类型
  2455. userType: thisData.userType,//客户所属类型
  2456. other: thisData.other,//3渠道名 4,5描述
  2457. },
  2458. channelName: thisData.salesType == "3" ? thisData.other : "",//销售类型为渠道的时候给编辑出的渠道名称赋值
  2459. });
  2460. // 判断状态
  2461. if (this.state.processStatus === 0) {
  2462. this.setState({
  2463. closable: true,
  2464. disabledView: "inline-block",
  2465. });
  2466. }
  2467. }.bind(this),
  2468. }).always(
  2469. function () {
  2470. this.setState({
  2471. loading: false,
  2472. });
  2473. }.bind(this)
  2474. );
  2475. },
  2476. //节点列表
  2477. jiedian(orderNos) {
  2478. this.setState({
  2479. loadData: true,
  2480. });
  2481. $.ajax({
  2482. method: "get",
  2483. dataType: "json",
  2484. crossDomain: false,
  2485. url: globalConfig.context + "/api/admin/newOrder/selectOrderDun",
  2486. data: {
  2487. orderNo: orderNos,
  2488. },
  2489. success: function (data) {
  2490. let theArr = [];
  2491. let thisData = [];
  2492. if (data.error.length || data.data.list == "") {
  2493. if (data.error && data.error.length) {
  2494. message.warning(data.error[0].message);
  2495. }
  2496. } else {
  2497. for (let i = 0; i < data.data.length; i++) {
  2498. thisData = data.data[i];
  2499. theArr.push({
  2500. key: i,
  2501. dunSubject: thisData.dunSubject
  2502. ? thisData.dunSubject.toString()
  2503. : "", //催款科目
  2504. id: thisData.id, //节点Id
  2505. money: thisData.money, //催款金额
  2506. dunStatus: thisData.dunStatus, //催款状态
  2507. orderNo: thisData.orderNo,
  2508. });
  2509. }
  2510. this.setState({
  2511. contactList: theArr,
  2512. });
  2513. }
  2514. }.bind(this),
  2515. }).always(
  2516. function () {
  2517. this.setState({
  2518. loading: false,
  2519. });
  2520. }.bind(this)
  2521. );
  2522. },
  2523. //查看催款节点
  2524. jiedianNew(orderNos) {
  2525. this.setState({
  2526. loadData: true,
  2527. });
  2528. $.ajax({
  2529. method: "get",
  2530. dataType: "json",
  2531. crossDomain: false,
  2532. url:
  2533. globalConfig.context + "/api/admin/newOrderDun/selectListNewOrderDun",
  2534. data: {
  2535. orderNo: orderNos,
  2536. },
  2537. success: function (data) {
  2538. if (data.error && data.error.length) {
  2539. message.warning(data.error[0].message);
  2540. } else {
  2541. let theArr = [];
  2542. let thisData = [];
  2543. let arr = data.data || [];
  2544. let totalCui = 0;
  2545. for (let i = 0; i < arr.length; i++) {
  2546. thisData = arr[i];
  2547. totalCui += +thisData.money;
  2548. theArr.push({
  2549. key: i,
  2550. dunSubject: thisData.dunSubject
  2551. ? thisData.dunSubject.toString()
  2552. : "", //催款科目
  2553. id: thisData.id, //节点Id
  2554. money: thisData.money, //催款金额
  2555. // orderNo: record ? record.orderNo : this.props.datauser.orderNo,
  2556. commodityName: thisData.commodityName,
  2557. projectType: thisData.projectType,
  2558. dunTypeName: thisData.dunTypeName,
  2559. status: thisData.status,
  2560. waitDay: thisData.waitDay,
  2561. effectiveCount: thisData.effectiveCount,
  2562. startDate: thisData.startDate,
  2563. dunType: thisData.dunType,
  2564. appropriationRatio: thisData.appropriationRatio,
  2565. customizeName: thisData.customizeName,
  2566. customizeTimes: thisData.customizeTimes,
  2567. tid: thisData.tid,
  2568. });
  2569. }
  2570. if (!totalCui) {
  2571. totalCui = 0;
  2572. }
  2573. totalCui = (Math.round(totalCui * 1000000) / 1000000).toFixed(6);
  2574. this.setState({
  2575. contactListNew: theArr,
  2576. totalCui: parseFloat(totalCui),
  2577. });
  2578. }
  2579. }.bind(this),
  2580. }).always(
  2581. function () {
  2582. this.setState({
  2583. loading: false,
  2584. });
  2585. }.bind(this)
  2586. );
  2587. },
  2588. //催款节点保存
  2589. contactSave(record) {
  2590. for (let i = 0; i < this.state.contactList.length; i++) {
  2591. if (moneyVerify(this.state.contactList[i].money)) {
  2592. return;
  2593. }
  2594. }
  2595. this.setState({
  2596. loading: true,
  2597. });
  2598. $.ajax({
  2599. url: globalConfig.context + "/api/admin/newOrder/createOrderDun",
  2600. method: "post",
  2601. data: {
  2602. orderNo: this.state.orderNo,
  2603. orderDun: JSON.stringify(this.state.contactList),
  2604. },
  2605. }).done(
  2606. function (data) {
  2607. this.setState({
  2608. loading: false,
  2609. });
  2610. if (!data.error.length) {
  2611. message.success("保存成功!");
  2612. this.jiedian(record.orderNo);
  2613. } else {
  2614. message.warning(data.error[0].message);
  2615. }
  2616. }.bind(this)
  2617. );
  2618. },
  2619. //催款节点保存
  2620. contactSaveNew(record) {
  2621. if (record.dunType == 0) {
  2622. if (!record.customizeTimes) {
  2623. message.warning("请输入自定义时间");
  2624. return;
  2625. } else if (!record.customizeName) {
  2626. message.warning("请输入自定义科目");
  2627. return;
  2628. }
  2629. }
  2630. if (
  2631. this.state.approval == 1 &&
  2632. record.dunType == 1 &&
  2633. !record.waitDay
  2634. ) {
  2635. message.warning("请填写收款时间");
  2636. return
  2637. }
  2638. if (record.boStatus == "false") {
  2639. record.boStatus = false;
  2640. } else if (record.boStatus == "true") {
  2641. record.boStatus = true;
  2642. }
  2643. if (!this.state.yearFlag) {
  2644. if (!record.effectiveCount && !record.dunTypeCustom) {
  2645. message.warning("请选择服务年限");
  2646. return;
  2647. }
  2648. } else {
  2649. record.effectiveCount = "";
  2650. }
  2651. if (record.money == "") {
  2652. message.warning("请填写金额");
  2653. return;
  2654. }
  2655. if (record.boStatus) {
  2656. if (
  2657. typeof +record.money == "number" &&
  2658. +record.money >= 0 &&
  2659. +record.money <= 1
  2660. ) {
  2661. record.appropriationRatio = record.money;
  2662. } else {
  2663. message.warning("金额比例填写错误,比例范围0~1");
  2664. return;
  2665. }
  2666. }
  2667. if (!record.dunType && record.dunType != 0) {
  2668. message.warning("请选择对应科目");
  2669. return;
  2670. }
  2671. if (record.dunType != 1) {
  2672. record.waitDay = "";
  2673. }
  2674. this.setState({
  2675. loading: true,
  2676. });
  2677. if (record.boStatus) {
  2678. $.ajax({
  2679. url: globalConfig.context + "/api/admin/newOrderDun/createDun",
  2680. method: "post",
  2681. data: {
  2682. orderNo: record.orderNo,
  2683. tid: record.tid,
  2684. projectType: record.sort,
  2685. dunType: record.dunType,
  2686. appropriationRatio: record.appropriationRatio,
  2687. waitDay: record.waitDay,
  2688. effectiveCount: record.effectiveCount,
  2689. customizeTimes:
  2690. record.dunType == 0 ? record.customizeTimes : undefined,
  2691. customizeName:
  2692. record.dunType == 0 ? record.customizeName : undefined,
  2693. },
  2694. }).done(
  2695. function (data) {
  2696. this.setState({
  2697. loading: false,
  2698. });
  2699. if (!data.error.length) {
  2700. message.success("保存成功!");
  2701. this.setState({
  2702. cuiFlag: false,
  2703. boFlag: false,
  2704. addFlag: false,
  2705. });
  2706. this.jiedianNew(record.orderNo);
  2707. } else {
  2708. message.warning(data.error[0].message);
  2709. }
  2710. }.bind(this)
  2711. );
  2712. } else {
  2713. $.ajax({
  2714. url: globalConfig.context + "/api/admin/newOrderDun/createDun",
  2715. method: "post",
  2716. data: {
  2717. orderNo: record.orderNo,
  2718. tid: record.tid,
  2719. projectType: record.sort,
  2720. dunType: record.dunType,
  2721. money: record.money,
  2722. waitDay: record.waitDay,
  2723. effectiveCount: record.effectiveCount,
  2724. customizeTimes:
  2725. record.dunType == 0 ? record.customizeTimes : undefined,
  2726. customizeName:
  2727. record.dunType == 0 ? record.customizeName : undefined,
  2728. },
  2729. }).done(
  2730. function (data) {
  2731. this.setState({
  2732. loading: false,
  2733. });
  2734. if (!data.error.length) {
  2735. message.success("保存成功!");
  2736. this.setState({
  2737. cuiFlag: false,
  2738. boFlag: false,
  2739. addFlag: false,
  2740. });
  2741. this.jiedianNew(record.orderNo);
  2742. } else {
  2743. message.warning(data.error[0].message);
  2744. }
  2745. }.bind(this)
  2746. );
  2747. }
  2748. },
  2749. //点击新增催款节点
  2750. addcontact() {
  2751. this.state.contactList.push({
  2752. key: this.state.contactList.length,
  2753. money: "",
  2754. dunSubject: undefined,
  2755. orderNo: this.state.orderNo,
  2756. dunTarget: this.state.kehuId,
  2757. });
  2758. this.setState({
  2759. contactList: this.state.contactList,
  2760. });
  2761. },
  2762. //点击新增催款节点
  2763. addcontactNew() {
  2764. this.state.contactListNew.push({
  2765. key: this.state.contactListNew.length,
  2766. money: "",
  2767. dunSubject: undefined,
  2768. orderNo: this.state.orderNo,
  2769. dunTarget: this.state.kehuId,
  2770. });
  2771. this.setState({
  2772. contactListNew: this.state.contactListNew,
  2773. cuiFlag: true,
  2774. });
  2775. },
  2776. //删除收款节点
  2777. confirmDelet(index) {
  2778. this.state.contactList.splice(index, 1);
  2779. this.setState({
  2780. contactList: this.state.contactList,
  2781. });
  2782. this.contactSave();
  2783. },
  2784. //删除收款节点
  2785. confirmDeletNew(index) {
  2786. if (index.id) {
  2787. this.state.contactListNew.splice(index.id, 1);
  2788. this.setState({
  2789. contactListNew: this.state.contactListNew,
  2790. cuiFlag: false,
  2791. addFlag: false,
  2792. boFlag: false,
  2793. });
  2794. $.ajax({
  2795. url: globalConfig.context + "/api/admin/newOrderDun/deleteDun",
  2796. method: "post",
  2797. data: {
  2798. id: index.id,
  2799. },
  2800. }).done(
  2801. function (data) {
  2802. this.setState({
  2803. loading: false,
  2804. });
  2805. if (!data.error.length) {
  2806. message.success("删除成功!");
  2807. this.setState({
  2808. cuiFlag: false,
  2809. });
  2810. this.jiedianNew(this.state.orderNo);
  2811. } else {
  2812. message.warning(data.error[0].message);
  2813. }
  2814. }.bind(this)
  2815. );
  2816. } else {
  2817. this.state.contactListNew.splice(index.key, 1);
  2818. this.setState({
  2819. contactListNew: this.state.contactListNew,
  2820. cuiFlag: false,
  2821. addFlag: false,
  2822. boFlag: false,
  2823. });
  2824. }
  2825. },
  2826. //
  2827. handleOk() {
  2828. this.setState({
  2829. visible: false,
  2830. mark: false,
  2831. });
  2832. this.props.closeDesc(false, true);
  2833. },
  2834. //
  2835. handleCancel() {
  2836. if (this.state.orderType == undefined) {
  2837. return false;
  2838. }
  2839. if (!this.state.autoId) {
  2840. return false;
  2841. }
  2842. this.setState({
  2843. visible: false,
  2844. mark: false,
  2845. });
  2846. this.props.closeDesc(false);
  2847. },
  2848. //
  2849. handleCancelclose() {
  2850. this.setState(
  2851. {
  2852. visible: false,
  2853. mark: false,
  2854. cuiFlag: false,
  2855. addFlag: false,
  2856. boFlag: false,
  2857. isJilu: false,
  2858. },
  2859. () => {
  2860. this.setState({
  2861. activeKey: "1",
  2862. });
  2863. }
  2864. );
  2865. this.props.closeDesc(false);
  2866. this.reset();
  2867. },
  2868. //点击签单
  2869. handleCancels() {
  2870. this.setState({
  2871. isSubmit: 1,
  2872. });
  2873. },
  2874. //点击保存
  2875. handleCancelq() {
  2876. this.setState({
  2877. isSubmit: 0,
  2878. });
  2879. },
  2880. //删除
  2881. delectRow(record) {
  2882. this.setState({
  2883. loading: true,
  2884. });
  2885. $.ajax({
  2886. method: "post",
  2887. dataType: "json",
  2888. crossDomain: false,
  2889. url: globalConfig.context + "/api/admin/newOrder/deleteOrderTask",
  2890. data: {
  2891. id: record.id,
  2892. },
  2893. }).done(
  2894. function (data) {
  2895. if (!data.error.length) {
  2896. message.success("删除成功!");
  2897. this.setState({
  2898. loading: false,
  2899. });
  2900. this.jiedian(this.state.orderNo);
  2901. this.jiedianNew(this.state.orderNo);
  2902. // this.loaduser();
  2903. this.loadData();
  2904. } else {
  2905. message.warning(data.error[0].message);
  2906. }
  2907. }.bind(this)
  2908. );
  2909. },
  2910. //
  2911. nextCancel(type) {
  2912. this.setState(
  2913. {
  2914. editProVisible: false,
  2915. changeVisible: false,
  2916. projectOperationVisible: false,
  2917. editProjectOperationVisible: false,//
  2918. vipVisible: false,
  2919. gid: "",
  2920. dataInfor: {},
  2921. addProjectType: undefined,
  2922. isVip: undefined,
  2923. isIso: undefined,
  2924. commodityQuantity: undefined,
  2925. histYear: [],
  2926. yearSum: undefined,
  2927. serviceLife: [],
  2928. serviceYear: undefined,
  2929. isEdit: false, // 可编辑
  2930. },
  2931. () => {
  2932. this.loadData();
  2933. this.proList();
  2934. }
  2935. );
  2936. },
  2937. //
  2938. rizhi() {
  2939. this.setState({
  2940. loading: true,
  2941. });
  2942. $.ajax({
  2943. method: "get",
  2944. dataType: "json",
  2945. crossDomain: false,
  2946. url: "/api/admin/newOrder/selectOrderLog",
  2947. data: {
  2948. orderNo: this.props.datauser.orderNo,
  2949. },
  2950. success: function (data) {
  2951. let theArr = [];
  2952. let thisData = data.data;
  2953. if (!thisData.length) {
  2954. if (data.error && data.error.length) {
  2955. message.warning(data.error[0].message);
  2956. }
  2957. thisData = {};
  2958. } else {
  2959. for (let i = 0; i < data.data.length; i++) {
  2960. let thisdata = data.data[i];
  2961. theArr.push({
  2962. processName: thisdata.processName,
  2963. adminName: thisdata.adminName,
  2964. createDate: thisdata.createDate,
  2965. remarks: thisdata.remarks,
  2966. });
  2967. }
  2968. }
  2969. this.setState({
  2970. dataSourcerizhi: theArr,
  2971. });
  2972. }.bind(this),
  2973. }).always(
  2974. function () {
  2975. this.setState({
  2976. loading: false,
  2977. });
  2978. }.bind(this)
  2979. );
  2980. },
  2981. //查看订单日志
  2982. getOrderLog() {
  2983. this.setState({
  2984. rizhivisible: true,
  2985. });
  2986. this.rizhi();
  2987. },
  2988. //
  2989. closeOrderLog() {
  2990. this.setState({
  2991. rizhivisible: false,
  2992. });
  2993. },
  2994. //
  2995. callback(key) {
  2996. this.setState({
  2997. activeKey: key,
  2998. });
  2999. if (key === "1") {
  3000. this.jiedian(this.props.datauser.orderNo);
  3001. this.jiedianNew(this.props.datauser.orderNo);
  3002. this.loaduser();
  3003. // this.loaduser();
  3004. }
  3005. if (key === "3") {
  3006. this.getChangeData();
  3007. }
  3008. if (key === "2" || key === "3") {
  3009. let url = window.location.href.substring(7);
  3010. $.ajax({
  3011. method: "get",
  3012. dataType: "json",
  3013. crossDomain: false,
  3014. url:
  3015. globalConfig.context + "/api/admin/orderChange/orderChangeDetails",
  3016. data: {
  3017. orderNo: this.props.datauser.orderNo,
  3018. },
  3019. success: function (data) {
  3020. if (data.data && data.data.length) {
  3021. let thisdata = data.data[data.data.length - 1];
  3022. if (
  3023. thisdata.status === 0 ||
  3024. (thisdata.processState == 0 && thisdata.status != 5)
  3025. ) {
  3026. this.setState({
  3027. changeId: thisdata.id,
  3028. typeChange: thisdata.type,
  3029. totalAmount: thisdata.totalAmount,
  3030. firstAmount: thisdata.firstAmount,
  3031. settlementAmount: thisdata.settlementAmount,
  3032. changeAmount: thisdata.changeAmount,
  3033. remarksC: thisdata.remarks,
  3034. startRemarks: thisdata.zxsRemarks,
  3035. isCaoGao: true,
  3036. arrears: thisdata.arrears,
  3037. changeFlag: true,
  3038. createTimes: thisdata.createTimes,
  3039. voucherUrl: thisdata.voucherUrl
  3040. ? splitUrl(
  3041. thisdata.voucherUrl,
  3042. ",",
  3043. globalConfig.avatarHost + "/upload",
  3044. url
  3045. )
  3046. : [],
  3047. newContractUrl: thisdata.contractPictureUrl
  3048. ? splitUrl(
  3049. thisdata.contractPictureUrl,
  3050. ",",
  3051. globalConfig.avatarHost + "/upload",
  3052. url
  3053. )
  3054. : [],
  3055. isNew: !thisdata.contractPictureUrl ? false : true,
  3056. processState: thisdata.processState,
  3057. status: thisdata.status,
  3058. contacts: thisdata.contacts, // 企业联系人
  3059. contactMobile: thisdata.contactMobile, // 企业联系方式
  3060. managerContacts: thisdata.managerContacts, // 企业总经理
  3061. managerContactMobile: thisdata.managerContactMobile, // 企业总经理联系方式
  3062. });
  3063. this.proList();
  3064. this.cuiList();
  3065. let e = thisdata.type;
  3066. if (e == 1) {
  3067. this.setState({
  3068. hetongFlag: false,
  3069. listFlag: false,
  3070. listCuiFlag: false,
  3071. tuiKuanFlag: false,
  3072. displayList: false,
  3073. });
  3074. } else if (e == 2) {
  3075. this.setState({
  3076. hetongFlag: true,
  3077. listFlag: false,
  3078. listCuiFlag: false,
  3079. tuiKuanFlag: true,
  3080. displayList: false,
  3081. });
  3082. } else if (e == 3) {
  3083. this.setState({
  3084. listFlag: false,
  3085. hetongFlag: false,
  3086. listCuiFlag: false,
  3087. tuiKuanFlag: false,
  3088. displayList: true,
  3089. });
  3090. } else if (e == 4) {
  3091. this.setState({
  3092. listFlag: false,
  3093. listCuiFlag: false,
  3094. hetongFlag: false,
  3095. tuiKuanFlag: true,
  3096. displayList: false,
  3097. });
  3098. } else if (e == 5) {
  3099. this.setState({
  3100. listFlag: false,
  3101. listCuiFlag: false,
  3102. hetongFlag: true,
  3103. tuiKuanFlag: true,
  3104. displayList: false,
  3105. });
  3106. } else if (e == 6) {
  3107. this.setState({
  3108. // listFlag: true,
  3109. // listCuiFlag: true,
  3110. // hetongFlag: true,
  3111. // tuiKuanFlag: true,
  3112. // displayList: false,
  3113. listFlag: false,
  3114. listCuiFlag: false,
  3115. hetongFlag: false,
  3116. tuiKuanFlag: false,
  3117. displayList: false,
  3118. });
  3119. } else if (e == 7) {
  3120. this.setState({
  3121. listFlag: true,
  3122. listCuiFlag: true,
  3123. hetongFlag: true,
  3124. tuiKuanFlag: true,
  3125. displayList: false,
  3126. isNew: true,
  3127. });
  3128. } else {
  3129. this.setState({
  3130. hetongFlag: false,
  3131. listFlag: false,
  3132. listCuiFlag: false,
  3133. tuiKuanFlag: false,
  3134. displayList: false,
  3135. });
  3136. }
  3137. } else {
  3138. this.setState({
  3139. listFlag: false,
  3140. hetongFlag: false,
  3141. listCuiFlag: false,
  3142. tuiKuanFlag: false,
  3143. displayList: false,
  3144. // 置空
  3145. changeId: undefined,
  3146. isCaoGao: false,
  3147. });
  3148. }
  3149. } else {
  3150. this.setState({
  3151. isCaoGao: false,
  3152. });
  3153. }
  3154. }.bind(this),
  3155. });
  3156. }
  3157. },
  3158. //
  3159. cuiList(id) {
  3160. this.setState({
  3161. loadData: true,
  3162. });
  3163. $.ajax({
  3164. method: "get",
  3165. dataType: "json",
  3166. crossDomain: false,
  3167. url: globalConfig.context + "/api/admin/orderChange/selectChangeDun",
  3168. data: {
  3169. id: id || this.state.changeId,
  3170. },
  3171. success: function (data) {
  3172. this.setState({
  3173. cuiDataSource: data.data,
  3174. });
  3175. if (data.data && data.data.length) {
  3176. if (id) {
  3177. this.setState({
  3178. listCuiFlag: true,
  3179. });
  3180. }
  3181. this.setState({
  3182. cuiDataSource: data.data,
  3183. });
  3184. this.setState({
  3185. loadData: false,
  3186. });
  3187. } else if (data.error && data.error.length) {
  3188. message.warning(data.error[0].message);
  3189. this.setState({
  3190. loadData: false,
  3191. });
  3192. }
  3193. }.bind(this),
  3194. });
  3195. },
  3196. //
  3197. proList(id) {
  3198. if (!id && !this.state.changeId) {
  3199. return
  3200. }
  3201. this.setState({
  3202. loadData: true,
  3203. });
  3204. $.ajax({
  3205. method: "get",
  3206. dataType: "json",
  3207. crossDomain: false,
  3208. url: globalConfig.context + "/api/admin/orderChange/selectChangeTask",
  3209. data: {
  3210. id: id || this.state.changeId,
  3211. },
  3212. success: function (data) {
  3213. if (data.data && data.data.length) {
  3214. if (id) {
  3215. this.setState({
  3216. listFlag: true,
  3217. });
  3218. }
  3219. data.data.forEach((item, index) => {
  3220. item.key = index;
  3221. });
  3222. this.setState({
  3223. proDataSource: data.data,
  3224. });
  3225. this.setState({
  3226. loadData: false,
  3227. });
  3228. } else if (data.error && data.error.length) {
  3229. // message.warning(data.error[0].message);
  3230. this.setState({
  3231. loadData: false,
  3232. });
  3233. }
  3234. }.bind(this),
  3235. });
  3236. },
  3237. //
  3238. logList(id) {
  3239. this.setState({
  3240. loading: true,
  3241. });
  3242. $.ajax({
  3243. method: "get",
  3244. dataType: "json",
  3245. async: false,
  3246. crossDomain: false,
  3247. url: globalConfig.context + "/api/admin/orderChange/orderChangeLogList",
  3248. data: {
  3249. changeId: id,
  3250. },
  3251. success: function (data) {
  3252. if (data.error.length || data.data.list == "") {
  3253. if (data.error && data.error.length) {
  3254. message.warning(data.error[0].message);
  3255. this.setState({
  3256. loading: false,
  3257. });
  3258. }
  3259. } else {
  3260. this.setState({
  3261. logData: data.data,
  3262. loading: false,
  3263. });
  3264. }
  3265. }.bind(this),
  3266. });
  3267. },
  3268. getOrgCodeUrl(e) {
  3269. this.setState({ orgCodeUrl: e });
  3270. },
  3271. getReplenishUrl(e) {
  3272. this.setState({ replenishUrl: e });
  3273. },
  3274. getContentUrl(e) {
  3275. this.setState({ contentUrl: e });
  3276. },
  3277. getVoucherUrl(e) {
  3278. this.setState({ voucherUrl: e });
  3279. },
  3280. getNewContractUrl(e) {
  3281. this.setState({ newContractUrl: e });
  3282. },
  3283. //加载(自动补全)
  3284. supervisor(e, state) {
  3285. //客户名称与服务名称自动补全
  3286. let api = state
  3287. ? "/api/admin/customer/getCustomerByName"
  3288. : "/api/admin/order/getBusinessProjectByName";
  3289. $.ajax({
  3290. method: "get",
  3291. dataType: "json",
  3292. crossDomain: false,
  3293. url: globalConfig.context + api,
  3294. data: state
  3295. ? {
  3296. name: e,
  3297. type: this.state.userType,
  3298. }
  3299. : {
  3300. businessName: e,
  3301. },
  3302. success: function (data) {
  3303. let thedata = data.data;
  3304. if (!thedata) {
  3305. if (data.error && data.error.length) {
  3306. message.warning(data.error[0].message);
  3307. }
  3308. thedata = {};
  3309. }
  3310. this.setState({
  3311. states: state,
  3312. customerArr: thedata,
  3313. });
  3314. }.bind(this),
  3315. }).always(
  3316. function () {
  3317. this.setState({
  3318. loading: false,
  3319. });
  3320. }.bind(this)
  3321. );
  3322. },
  3323. // 渠道查询
  3324. selectChannel(e) {
  3325. $.ajax({
  3326. method: "get",
  3327. dataType: "json",
  3328. crossDomain: false,
  3329. url: globalConfig.context + "/api/admin/customer/selectChannelUserList",
  3330. data: {
  3331. name: e,
  3332. },
  3333. success: function (data) {
  3334. let thedata = data.data;
  3335. if (!thedata) {
  3336. if (data.error && data.error.length) {
  3337. message.warning(data.error[0].message);
  3338. }
  3339. thedata = {};
  3340. }
  3341. this.setState({
  3342. channelArr: thedata,
  3343. });
  3344. }.bind(this),
  3345. }).always(
  3346. function () {
  3347. this.setState({
  3348. loading: false,
  3349. });
  3350. }.bind(this)
  3351. );
  3352. },
  3353. supervisorCui(e) {
  3354. //客户名称与服务名称自动补全
  3355. let api = "/api/admin/order/getBusinessProjectByName";
  3356. $.ajax({
  3357. method: "get",
  3358. dataType: "json",
  3359. crossDomain: false,
  3360. url: globalConfig.context + api,
  3361. data: {
  3362. businessName: e,
  3363. },
  3364. success: function (data) {
  3365. let thedata = data.data;
  3366. if (!thedata) {
  3367. if (data.error && data.error.length) {
  3368. message.warning(data.error[0].message);
  3369. }
  3370. thedata = {};
  3371. }
  3372. this.setState({
  3373. customerCuiArr: thedata,
  3374. });
  3375. }.bind(this),
  3376. }).always(
  3377. function () {
  3378. this.setState({
  3379. loading: false,
  3380. });
  3381. }.bind(this)
  3382. );
  3383. },
  3384. //上级主管输入框失去焦点是判断客户是否存在
  3385. selectAuto(value) {
  3386. const newData = this.state.proDataSource
  3387. let kid = [];
  3388. let fwList = this.state.customerArr;
  3389. fwList.map(function (item) {
  3390. if (value == item.bname) {
  3391. kid = item;
  3392. }
  3393. });
  3394. if (kid.type == "1") {
  3395. this.setState({
  3396. displayFees: "block",
  3397. });
  3398. } else {
  3399. this.setState({
  3400. displayFees: "none",
  3401. });
  3402. }
  3403. //0通用 1专利 2软著 3审计 4双软 5高新 6商标
  3404. this.setState({
  3405. commodityName: value,
  3406. gid: kid.id,
  3407. addProjectType: kid.type,
  3408. isIso: value.indexOf("贯标") !== -1, // 是否为贯标项目
  3409. //commodityPrice:kid.price==0?kid.price.toString():kid.price,
  3410. commodityFirstPayment: kid.firstPayment == 0 ? kid.firstPayment.toString() : kid.firstPayment,
  3411. isVip: kid.cSort,//暂时判断等于6的时候会员
  3412. commodityQuantity: kid.cSort == 6 ? 1 : undefined,//服务数量
  3413. histYear: [],
  3414. });
  3415. if (newData && newData.length > 0 && kid.cSort == 6) {
  3416. let llist = []
  3417. for (var i = 0; i < newData.length; i++) {
  3418. if (newData[i].commodityId == kid.id) {
  3419. llist.push(newData[i].serviceYear)
  3420. }
  3421. }
  3422. this.setState({
  3423. histYear: llist
  3424. })
  3425. for (var i = newData.length - 1; i >= 0; i--) {
  3426. if (newData[i].commodityId == kid.id) {
  3427. this.setState({
  3428. commodityPrice: newData[i].commodityPrice, // 实签价格
  3429. main: "0", // 是否为主要项目
  3430. yearSum: newData[i].yearSum.toString(), // 会员总服务年限
  3431. serviceLife: !newData[i].serviceLife ? [] : JSON.parse(newData[i].serviceLife), // 会员服务年限
  3432. contractTerm: !newData[i].contractTerm ? [] : JSON.parse(newData[i].contractTerm), // 合同期
  3433. taskComment: newData[i].taskComment, // 项目说明
  3434. // isEdit: true, // 不可编辑
  3435. isEdit: true, // 同一会员项目有且只有一条时可编辑 其他情况不可编辑
  3436. cPeriod: !newData[i].contractTerm ? false : true, //合同期
  3437. })
  3438. return
  3439. } else {
  3440. this.setState({
  3441. commodityPrice: undefined,
  3442. main: undefined,
  3443. yearSum: undefined,
  3444. serviceLife: [],
  3445. contractTerm: [],
  3446. taskComment: undefined,
  3447. isEdit: false, // 可编辑
  3448. cPeriod: false,
  3449. })
  3450. }
  3451. }
  3452. }
  3453. },
  3454. selectAutoCui(value) {
  3455. let kid = [];
  3456. let fwList = this.state.customerCuiArr;
  3457. fwList.map(function (item) {
  3458. if (value == item.bname) {
  3459. kid = item;
  3460. }
  3461. });
  3462. this.setState({
  3463. commodityNameCui: value,
  3464. cid: kid.id,
  3465. //commodityPrice:kid.price==0?kid.price.toString():kid.price,
  3466. commodityFirstPayment:
  3467. kid.firstPayment == 0
  3468. ? kid.firstPayment.toString()
  3469. : kid.firstPayment,
  3470. });
  3471. },
  3472. //客户
  3473. selectAutoCUT(value) {
  3474. let autoIds;
  3475. let fwList = this.state.customerArr;
  3476. fwList.map(function (item) {
  3477. if (value == item.name) {
  3478. autoIds = item.id;
  3479. }
  3480. });
  3481. this.setState({
  3482. customerName: value,
  3483. autoId: autoIds,
  3484. });
  3485. },
  3486. goSelect(value) {
  3487. let channelid;
  3488. let fwList = this.state.channelArr;
  3489. fwList.map(function (item) {
  3490. if (value == item.name) {
  3491. channelid = item.id;
  3492. }
  3493. });
  3494. this.setState({
  3495. channelname: value,
  3496. channelid: channelid,
  3497. });
  3498. },
  3499. //服务值改变时请求客户名称
  3500. httpChange(e) {
  3501. this.state.gid = "";
  3502. if (e.length >= 1) {
  3503. this.supervisor(e, false);
  3504. }
  3505. this.setState({
  3506. commodityName: e,
  3507. });
  3508. },
  3509. httpChangeCui(e) {
  3510. if (e.length >= 1) {
  3511. this.supervisorCui(e, false);
  3512. }
  3513. this.setState({
  3514. commodityNameCui: e,
  3515. });
  3516. },
  3517. //客户名称自动补全
  3518. customerChange(e) {
  3519. if (this.state.userType) {
  3520. this.state.autoId = "";
  3521. if (e.length >= 2) {
  3522. this.supervisor(e, true);
  3523. }
  3524. this.setState({
  3525. customerName: e,
  3526. });
  3527. } else {
  3528. this.setState({
  3529. customerName: "",
  3530. });
  3531. message.warning("客户所属类型必须指定");
  3532. }
  3533. },
  3534. //渠道名称自动补全
  3535. channelChange(e) {
  3536. this.setState({
  3537. channelName: e
  3538. })
  3539. if (e.length >= 2) {
  3540. this.selectChannel(e);
  3541. }
  3542. },
  3543. //点击添加项目明细
  3544. addDetailed() {
  3545. const { dataSource = [] } = this.state
  3546. this.setState({
  3547. projectOperationVisible: true,
  3548. newData: dataSource,
  3549. });
  3550. },
  3551. //点击添加会员项目明细
  3552. addVip() {
  3553. const { dataSource = [] } = this.state
  3554. this.setState({
  3555. vipVisible: true,
  3556. newData: dataSource,
  3557. });
  3558. },
  3559. // 可展开颜色不同
  3560. addRowColor(record) {
  3561. if (!!record.splitList && record.splitList.length > 0) {
  3562. return 'light'
  3563. } else if (!!record.list && record.list.length > 0) {
  3564. return 'light'
  3565. } else {
  3566. return 'dark'
  3567. }
  3568. },
  3569. //点击项目详情
  3570. tableRowClick(record) {
  3571. const { dataSource = [] } = this.state
  3572. this.setState({
  3573. // projectOperationVisible: true,
  3574. editProjectOperationVisible: true,
  3575. dataInfor: record,
  3576. newData: dataSource,
  3577. });
  3578. },
  3579. //签单时间选择
  3580. selTime(e, index) {
  3581. this.setState({
  3582. entryTime: e,
  3583. signDate: e,
  3584. selTime: index,
  3585. });
  3586. },
  3587. //退单操作
  3588. //点击退单
  3589. tuikuan() {
  3590. this.setState({
  3591. lookVisible: true,
  3592. contractUrl: [],
  3593. applicationUrl: [],
  3594. reason: "",
  3595. });
  3596. },
  3597. //关闭退单
  3598. noCancel() {
  3599. this.setState({
  3600. lookVisible: false,
  3601. });
  3602. },
  3603. //点击确认退单
  3604. tuidanOk() {
  3605. let contractUrls = [];
  3606. let applicationUrls = [];
  3607. if (this.state.contractUrl.length) {
  3608. let picArr = [];
  3609. this.state.contractUrl.map(function (item) {
  3610. if (
  3611. item.response &&
  3612. item.response.data &&
  3613. item.response.data.length
  3614. ) {
  3615. picArr.push(item.response.data);
  3616. }
  3617. });
  3618. contractUrls = picArr.join(",");
  3619. }
  3620. if (this.state.applicationUrl.length) {
  3621. let picArr = [];
  3622. this.state.applicationUrl.map(function (item) {
  3623. if (
  3624. item.response &&
  3625. item.response.data &&
  3626. item.response.data.length
  3627. ) {
  3628. picArr.push(item.response.data);
  3629. }
  3630. });
  3631. applicationUrls = picArr.join(",");
  3632. }
  3633. $.ajax({
  3634. method: "POST",
  3635. dataType: "json",
  3636. crossDomain: false,
  3637. url: globalConfig.context + "/api/admin/newOrder/addOrderRefund",
  3638. data: {
  3639. orderNo: this.state.orderNo, //订单编号
  3640. contractUrl: contractUrls.length ? contractUrls : "", //终止合同
  3641. applicationUrl: applicationUrls.length ? applicationUrls : "", //退单申请表
  3642. reason: this.state.reason, //退单原因
  3643. },
  3644. }).done(
  3645. function (data) {
  3646. this.setState({
  3647. loading: false,
  3648. });
  3649. if (!data.error.length) {
  3650. message.success("退单成功!");
  3651. this.noCancel();
  3652. this.handleCancelclose();
  3653. } else {
  3654. message.warning(data.error[0].message);
  3655. }
  3656. }.bind(this)
  3657. );
  3658. },
  3659. //开单选择订单类型骚操作
  3660. orderTypeFn(e) {
  3661. if (e == 0) {
  3662. this.setState({
  3663. bussStats: true,
  3664. orderType: e,
  3665. });
  3666. this.category();
  3667. } else {
  3668. this.setState({
  3669. contractType: undefined,
  3670. bussStats: false,
  3671. orderType: e,
  3672. });
  3673. }
  3674. },
  3675. //品类数据获取
  3676. category() {
  3677. $.ajax({
  3678. method: "get",
  3679. dataType: "json",
  3680. crossDomain: false,
  3681. url: globalConfig.context + "/api/admin/Varieties/getSuperList",
  3682. data: {},
  3683. success: function (data) {
  3684. let thedata = data.data;
  3685. let theArr = [];
  3686. if (!thedata) {
  3687. if (data.error && data.error.length) {
  3688. message.warning(data.error[0].message);
  3689. }
  3690. thedata = {};
  3691. } else {
  3692. thedata.map(function (item, index) {
  3693. theArr.push({
  3694. key: index,
  3695. name: item.cname,
  3696. id: item.id,
  3697. });
  3698. });
  3699. }
  3700. this.setState({
  3701. contractType: undefined,
  3702. categoryArr: theArr,
  3703. });
  3704. }.bind(this),
  3705. });
  3706. },
  3707. //变更申请
  3708. changeApply() {
  3709. if (
  3710. this.state.typeChange == undefined ||
  3711. (this.state.typeChange == "" && this.state.typeChange != 0)
  3712. ) {
  3713. message.warning("请选择变更类型");
  3714. return false;
  3715. }
  3716. if (this.state.totalAmount === "") {
  3717. message.warning("合同金额不能为空!");
  3718. return false;
  3719. }
  3720. if (this.state.firstAmount === "") {
  3721. message.warning("首付款金额不能为空!");
  3722. return false;
  3723. }
  3724. if (Number(this.state.totalAmount) < Number(this.state.firstAmount)) {
  3725. message.warning("首付款不能大于合同额!");
  3726. return;
  3727. }
  3728. if (
  3729. this.state.typeChange == 0 ||
  3730. this.state.typeChange == 1 ||
  3731. this.state.typeChange == 3 ||
  3732. this.state.typeChange == 8
  3733. ) {
  3734. if (Number(this.state.settlementAmount) < Number(this.state.changeAmount)) {
  3735. message.warning("退款金额大于已收款金额");
  3736. return;
  3737. }
  3738. }
  3739. if (this.state.processStatus != 6 && this.state.processStatus != 7) {
  3740. message.warning("当前订单流程不能发起变更!");
  3741. return false;
  3742. }
  3743. if (this.state.changeAmount === "") {
  3744. message.warning("申请退款金额不能为空!");
  3745. return false;
  3746. }
  3747. if (this.state.remarksC == "") {
  3748. message.warning("请正确填写变更原因");
  3749. return false;
  3750. }
  3751. if (this.state.startRemarks == "") {
  3752. message.warning("请正确填写备注信息");
  3753. return false;
  3754. }
  3755. let theorgCodeUrl = [];
  3756. if (this.state.voucherUrl.length) {
  3757. let picArr = [];
  3758. this.state.voucherUrl.map(function (item) {
  3759. if (
  3760. item.response &&
  3761. item.response.data &&
  3762. item.response.data.length
  3763. ) {
  3764. picArr.push(item.response.data);
  3765. }
  3766. });
  3767. theorgCodeUrl = picArr.join(",");
  3768. }
  3769. let newContractUrl = [];
  3770. if (this.state.newContractUrl.length) {
  3771. let cArr = [];
  3772. this.state.newContractUrl.map(function (item) {
  3773. if (
  3774. item.response &&
  3775. item.response.data &&
  3776. item.response.data.length
  3777. ) {
  3778. cArr.push(item.response.data);
  3779. }
  3780. });
  3781. newContractUrl = cArr.join(",");
  3782. }
  3783. if (this.state.isNew && newContractUrl.length == 0) {
  3784. message.warning("请上传新合同扫描件!");
  3785. return
  3786. }
  3787. this.setState({
  3788. loading: true,
  3789. });
  3790. $.ajax({
  3791. method: "post",
  3792. dataType: "json",
  3793. crossDomain: false,
  3794. url: globalConfig.context + "/api/admin/orderChange/addOrderChange",
  3795. data: {
  3796. orderNo: this.state.orderNo, //订单编号
  3797. processState: 0,
  3798. status: 0,
  3799. startRemarks: this.state.startRemarks,
  3800. remarks: this.state.remarksC,
  3801. voucherUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
  3802. totalAmount: this.state.totalAmount,
  3803. firstAmount: this.state.firstAmount,
  3804. settlementAmount: this.state.settlementAmount,
  3805. changeAmount: this.state.changeAmount,
  3806. applicant: this.state.salesmanName,
  3807. depName: this.state.depName,
  3808. type: this.state.typeChange,
  3809. contractPictureUrl: this.state.isNew
  3810. ? newContractUrl : undefined,//合同替换件
  3811. },
  3812. }).done(
  3813. function (data) {
  3814. this.setState({
  3815. loading: false,
  3816. });
  3817. if (!data.error.length) {
  3818. message.success("发起变更草稿");
  3819. this.setState(
  3820. {
  3821. isCaoGao: true,
  3822. loading: false,
  3823. },
  3824. () => {
  3825. this.callback("2");
  3826. }
  3827. );
  3828. } else {
  3829. message.warning(data.error[0].message);
  3830. }
  3831. }.bind(this)
  3832. );
  3833. // if (this.state.typeChange == 0) {
  3834. // $.ajax({
  3835. // method: "post",
  3836. // dataType: "json",
  3837. // crossDomain: false,
  3838. // url: globalConfig.context + "/api/admin/orderChange/addOrderChange",
  3839. // data: {
  3840. // orderNo: this.state.orderNo, //订单编号
  3841. // processState: 1,
  3842. // status: 1,
  3843. // startRemarks: this.state.startRemarks,
  3844. // remarks: this.state.remarksC,
  3845. // voucherUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
  3846. // totalAmount: this.state.totalAmount,
  3847. // firstAmount: this.state.firstAmount,
  3848. // settlementAmount: this.state.settlementAmount,
  3849. // changeAmount: this.state.changeAmount,
  3850. // applicant: this.state.salesmanName,
  3851. // depName: this.state.depName,
  3852. // type: this.state.typeChange,
  3853. // contractPictureUrl: this.state.isNew
  3854. // ? newContractUrl : undefined,//合同替换件
  3855. // },
  3856. // }).done(
  3857. // function (data) {
  3858. // this.setState({
  3859. // loading: false,
  3860. // });
  3861. // if (!data.error.length) {
  3862. // message.success("发起变更成功");
  3863. // this.handleCancelclose();
  3864. // } else {
  3865. // message.warning(data.error[0].message);
  3866. // this.setState({
  3867. // loading: false,
  3868. // });
  3869. // }
  3870. // }.bind(this)
  3871. // );
  3872. // } else {
  3873. // $.ajax({
  3874. // method: "post",
  3875. // dataType: "json",
  3876. // crossDomain: false,
  3877. // url: globalConfig.context + "/api/admin/orderChange/addOrderChange",
  3878. // data: {
  3879. // orderNo: this.state.orderNo, //订单编号
  3880. // processState: 0,
  3881. // status: 0,
  3882. // startRemarks: this.state.startRemarks,
  3883. // remarks: this.state.remarksC,
  3884. // voucherUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
  3885. // totalAmount: this.state.totalAmount,
  3886. // firstAmount: this.state.firstAmount,
  3887. // settlementAmount: this.state.settlementAmount,
  3888. // changeAmount: this.state.changeAmount,
  3889. // applicant: this.state.salesmanName,
  3890. // depName: this.state.depName,
  3891. // type: this.state.typeChange,
  3892. // contractPictureUrl: this.state.isNew
  3893. // ? newContractUrl : undefined,//合同替换件
  3894. // },
  3895. // }).done(
  3896. // function (data) {
  3897. // this.setState({
  3898. // loading: false,
  3899. // });
  3900. // if (!data.error.length) {
  3901. // message.success("发起变更草稿");
  3902. // this.setState(
  3903. // {
  3904. // isCaoGao: true,
  3905. // loading: false,
  3906. // },
  3907. // () => {
  3908. // this.callback("2");
  3909. // }
  3910. // );
  3911. // } else {
  3912. // message.warning(data.error[0].message);
  3913. // }
  3914. // }.bind(this)
  3915. // );
  3916. // }
  3917. },
  3918. reset() {
  3919. this.setState({
  3920. startRemarks: "",
  3921. remarksC: "",
  3922. voucherUrl: [],
  3923. newContractUrl: [],
  3924. totalAmount: undefined,
  3925. settlementAmount: undefined,
  3926. changeAmount: "0",
  3927. applicant: undefined,
  3928. depNameChange: undefined,
  3929. typeChange: undefined,
  3930. displayFees: "none",
  3931. officialCost: "",
  3932. costReduction: "",
  3933. });
  3934. },
  3935. componentWillMount() {
  3936. const nextProps = this.props
  3937. this.state.visible = nextProps.showDesc;
  3938. this.state.signBillVisible = nextProps.signBillVisible;
  3939. if (this.state.signBillVisible) {
  3940. this.loaduser(nextProps.uid);
  3941. this.assistList(nextProps.uid);
  3942. this.orderServiceList(nextProps.uid);
  3943. // this.publicByOrder(nextProps.uid);
  3944. }
  3945. if (nextProps.userDetaile && nextProps.showDesc) {
  3946. this.loaduser(nextProps.datauser);
  3947. this.assistList(nextProps.datauser);
  3948. this.orderServiceList(nextProps.datauser);
  3949. // this.publicByOrder(nextProps.datauser);
  3950. this.jiedian(nextProps.datauser.orderNo);
  3951. this.jiedianNew(nextProps.datauser.orderNo);
  3952. this.loadData(nextProps.datauser);
  3953. this.getChangeData(nextProps.datauser);
  3954. } else {
  3955. this.setState({
  3956. orderType: undefined,
  3957. customerName: "",
  3958. autoId: "",
  3959. customerArr: [],
  3960. contractType: undefined,
  3961. bussStats: false,
  3962. userType: undefined,
  3963. channelName: "",
  3964. channelid: "",
  3965. channelArr: [],
  3966. selectSales: undefined,
  3967. });
  3968. }
  3969. },
  3970. // componentWillReceiveProps(nextProps) {
  3971. // //props改变时触发
  3972. // },
  3973. //查看变更记录
  3974. getChangeData(record) {
  3975. this.setState({
  3976. loading: true,
  3977. });
  3978. $.ajax({
  3979. method: "get",
  3980. dataType: "json",
  3981. crossDomain: false,
  3982. url: globalConfig.context + "/api/admin/orderChange/orderChangeDetails",
  3983. data: {
  3984. orderNo: record ? record.orderNo : this.props.datauser.orderNo,
  3985. },
  3986. success: function (data) {
  3987. this.setState({
  3988. loading: false,
  3989. });
  3990. let url = window.location.href.substring(7);
  3991. if (data.data && data.data.length) {
  3992. let thisdata = data.data[data.data.length - 1];
  3993. thisdata.typeChange = thisdata.type;
  3994. thisdata.remarksC = thisdata.remarks;
  3995. thisdata.startRemarks = thisdata.zxsRemarks;
  3996. thisdata.voucherUrl = thisdata.voucherUrl
  3997. ? splitUrl(
  3998. thisdata.voucherUrl,
  3999. ",",
  4000. globalConfig.avatarHost + "/upload",
  4001. url
  4002. )
  4003. : [];
  4004. thisdata.contractPictureUrl = thisdata.contractPictureUrl
  4005. ? splitUrl(
  4006. thisdata.contractPictureUrl,
  4007. ",",
  4008. globalConfig.avatarHost + "/upload",
  4009. url
  4010. )
  4011. : [];
  4012. this.proList(thisdata.id);
  4013. this.cuiList(thisdata.id);
  4014. this.logList(thisdata.id);
  4015. this.setState({
  4016. //判断是否有合同变更记录
  4017. isJilu: true,
  4018. detailChange: thisdata,
  4019. });
  4020. }
  4021. }.bind(this),
  4022. });
  4023. },
  4024. showConfirm(fn, record) {
  4025. confirm({
  4026. title: "确定删除此项目吗?",
  4027. content: (
  4028. <span style={{ color: "red" }}>
  4029. 删除后会将该项目下的所有催款节点自动清除!!!
  4030. </span>
  4031. ),
  4032. onOk() {
  4033. fn(record);
  4034. },
  4035. onCancel() { },
  4036. });
  4037. },
  4038. viewConfirm(fn, record) {
  4039. confirm({
  4040. title: "确定删除此服务记录吗?",
  4041. // content: (
  4042. // <span style={{ color: "red" }}>
  4043. // 删除后会将该项目下的所有催款节点自动清除!!!
  4044. // </span>
  4045. // ),
  4046. onOk() {
  4047. fn(record);
  4048. },
  4049. onCancel() { },
  4050. });
  4051. },
  4052. changeAddPro() {
  4053. // this.getpatentTypeList();
  4054. this.setState({
  4055. changeVisible: true,
  4056. newData: this.state.proDataSource,
  4057. // gid: "",
  4058. // customerArr: [],
  4059. // commodityName: "",
  4060. // commodityQuantity: "",
  4061. // commodityId: "",
  4062. // taskComment: "",
  4063. // main: undefined,
  4064. // commodityPrice: "",
  4065. // displayFees: "none",
  4066. // officialCost: "",
  4067. // costReduction: "",
  4068. });
  4069. },
  4070. changeProSubmit() {
  4071. if (this.state.gid == undefined || !this.state.gid) {
  4072. message.warning("服务名称不匹配!");
  4073. return
  4074. }
  4075. let reg = /^([0]|[1-9][0-9]*)$/;
  4076. if (
  4077. !this.state.commodityQuantity ||
  4078. !reg.test(this.state.commodityQuantity)
  4079. ) {
  4080. message.warning("请输入正确商品数量!");
  4081. return
  4082. }
  4083. if (this.state.displayFees === 'block') {
  4084. if (this.state.patentType === "" && !this.state.patentTransfer) {
  4085. message.warning("请选择专利类型!");
  4086. return
  4087. }
  4088. if (this.state.officialCost === '') {
  4089. message.warning("请选择官费!");
  4090. return
  4091. }
  4092. if (this.state.costReduction === "" && (this.state.patentType === 0 || this.state.patentType === 2) && this.state.officialCost === 1) {
  4093. message.warning("请选择费减!");
  4094. return
  4095. }
  4096. }
  4097. if (isNaN(parseFloat(this.state.commodityPrice))) {
  4098. message.warning("请输入正确的金额!");
  4099. return;
  4100. }
  4101. if (this.state.addProjectType == "3") {// 3审计
  4102. if (this.state.serviceLife.length === 0) {
  4103. message.warning("请选择服务年限!");
  4104. return
  4105. }
  4106. if (this.state.serviceLife.length != this.state.commodityQuantity) {
  4107. message.warning("服务数量与服务年限不符!");
  4108. return
  4109. }
  4110. }
  4111. if (!this.state.main) {
  4112. message.warning("请选择是否为主要项目!");
  4113. return
  4114. }
  4115. if (this.state.addProjectType === 5) {// 5高新
  4116. if (!this.state.declarationBatch) {
  4117. message.warning("请选择企业要求申报批次!");
  4118. return
  4119. }
  4120. if (!this.state.serviceYear) {
  4121. message.warning("请选择申报年份!");
  4122. return
  4123. }
  4124. }
  4125. if (this.state.isVip == 6) {//会员
  4126. if (this.state.yearSum === undefined) {
  4127. message.warning("请选择会员总服务年限!");
  4128. return
  4129. }
  4130. if (this.state.serviceLife.length === 0) {
  4131. message.warning("请添加会员服务年限!");
  4132. return
  4133. }
  4134. if (this.state.serviceLife.length != this.state.yearSum) {
  4135. message.warning("会员服务年限与总年限不符合!");
  4136. return
  4137. }
  4138. if (this.state.serviceYear === undefined) {
  4139. message.warning("请选择本次派单年份!");
  4140. return
  4141. }
  4142. if (this.state.contractTerm.length === 0) {
  4143. message.warning("请填写合同期!");
  4144. return
  4145. }
  4146. }
  4147. this.setState({
  4148. loading: true,
  4149. });
  4150. let type = 0;
  4151. if (this.state.typeChange == 4 || this.state.typeChange == 5) {
  4152. type = 1;
  4153. }
  4154. let infor = {
  4155. commodityId: this.state.gid, //商品ID
  4156. orderNo: this.props.datauser.orderNo, //订单编号
  4157. commodityName: this.state.commodityName, //商品名称
  4158. commodityQuantity: this.state.commodityQuantity, //商品数量
  4159. commodityPrice: this.state.commodityPrice, //签单总价
  4160. taskComment: this.state.taskComment, //服务说明
  4161. main: this.state.main, //是否为主要项目
  4162. cid: this.state.changeId, //变更ID
  4163. type,
  4164. }
  4165. if (this.state.displayFees === 'block') {
  4166. infor.officialCost = this.state.officialCost //是否有官费
  4167. infor.costReduction = (this.state.patentType === 0 || this.state.patentType === 2) ? (this.state.officialCost === 1 ? this.state.costReduction : 0) : 0//是否有费减
  4168. infor.patentType = this.state.patentType //专利类型
  4169. }
  4170. if (this.state.isIso) {
  4171. infor.ifCertificationFee = this.state.ifCertificationFee || undefined;//是否包含认证费用
  4172. }
  4173. if (this.state.addProjectType == "3") {//审计
  4174. infor.serviceLife = JSON.stringify(this.state.serviceLife) //服务年限
  4175. }
  4176. if (this.state.addProjectType == "5") {//高新
  4177. infor.declarationBatch = this.state.declarationBatch || 1//申报批次
  4178. infor.serviceYear = this.state.serviceYear //申报年份
  4179. }
  4180. if (this.state.isVip == 6) {//会员
  4181. infor.yearSum = this.state.yearSum //会员总服务年限
  4182. infor.serviceLife = JSON.stringify(this.state.serviceLife) //会员服务年限
  4183. infor.serviceYear = this.state.serviceYear //本次派单年份
  4184. infor.contractTerm = JSON.stringify(this.state.contractTerm)//合同期
  4185. }
  4186. $.ajax({
  4187. method: "post",
  4188. dataType: "json",
  4189. crossDomain: false,
  4190. url: globalConfig.context + "/api/admin/orderChange/addChangeTask",
  4191. data: infor,
  4192. success: function (data) {
  4193. let theArr = [];
  4194. if (data.error && data.error.length) {
  4195. message.warning(data.error[0].message);
  4196. } else {
  4197. message.success("保存成功");
  4198. this.nextCancel();
  4199. this.proList();
  4200. }
  4201. }.bind(this),
  4202. }).always(
  4203. function () {
  4204. this.setState({
  4205. loading: false,
  4206. });
  4207. }.bind(this)
  4208. );
  4209. },
  4210. changeDeletePro(record) {
  4211. this.setState({
  4212. loading: true,
  4213. });
  4214. $.ajax({
  4215. method: "post",
  4216. dataType: "json",
  4217. crossDomain: false,
  4218. url: globalConfig.context + "/api/admin/orderChange/updateChangeTask",
  4219. data: {
  4220. id: record.id,
  4221. type: 3,
  4222. tid: record.tid,
  4223. splitStatus: record.splitStatus,
  4224. },
  4225. success: function (data) {
  4226. let theArr = [];
  4227. if (data.error && data.error.length) {
  4228. message.warning(data.error[0].message);
  4229. } else {
  4230. message.success("删除成功");
  4231. this.proList();
  4232. this.cuiList();
  4233. }
  4234. }.bind(this),
  4235. }).always(
  4236. function () {
  4237. this.setState({
  4238. loading: false,
  4239. });
  4240. }.bind(this)
  4241. );
  4242. },
  4243. //点击新增变更催款节点
  4244. changeAddCui() {
  4245. this.state.cuiDataSource.push({
  4246. key: this.state.cuiDataSource.length,
  4247. money: "",
  4248. dunSubject: undefined,
  4249. orderNo: this.state.orderNo,
  4250. dunTarget: this.state.kehuId,
  4251. });
  4252. this.setState({
  4253. cuiDataSource: this.state.cuiDataSource,
  4254. cuiFlag: true,
  4255. });
  4256. },
  4257. //删除变更收款节点
  4258. changeDeleteCui(index) {
  4259. if (index.id) {
  4260. this.state.cuiDataSource.splice(index.id, 1);
  4261. this.setState({
  4262. contactListNew: this.state.cuiDataSource,
  4263. cuiFlag: false,
  4264. addFlag: false,
  4265. boFlag: false,
  4266. });
  4267. $.ajax({
  4268. url: globalConfig.context + "/api/admin/orderChange/updateChangeDun",
  4269. method: "post",
  4270. data: {
  4271. id: index.id,
  4272. type: 3,
  4273. tid: index.tid,
  4274. did: index.did,
  4275. },
  4276. }).done(
  4277. function (data) {
  4278. this.setState({
  4279. loading: false,
  4280. });
  4281. if (!data.error.length) {
  4282. message.success("删除成功!");
  4283. this.setState({
  4284. cuiFlag: false,
  4285. });
  4286. this.cuiList();
  4287. this.proList();
  4288. } else {
  4289. message.warning(data.error[0].message);
  4290. }
  4291. }.bind(this)
  4292. );
  4293. } else {
  4294. this.state.cuiDataSource.splice(index.key, 1);
  4295. this.setState({
  4296. cuiDataSource: this.state.cuiDataSource,
  4297. cuiFlag: false,
  4298. addFlag: false,
  4299. boFlag: false,
  4300. });
  4301. }
  4302. },
  4303. changeSaveCui(record) {
  4304. if (record.dunType == 0) {
  4305. if (!record.customizeTimes) {
  4306. message.warning("请输入自定义时间");
  4307. return;
  4308. } else if (!record.customizeName) {
  4309. message.warning("请输入自定义科目");
  4310. return;
  4311. }
  4312. }
  4313. if (record.boStatus == "false") {
  4314. record.boStatus = false;
  4315. } else if (record.boStatus == "true") {
  4316. record.boStatus = true;
  4317. }
  4318. if (!this.state.yearFlag) {
  4319. if (!record.effectiveCount) {
  4320. message.warning("请选择服务年限");
  4321. return;
  4322. }
  4323. } else {
  4324. record.effectiveCount = "";
  4325. }
  4326. if (isNaN(parseInt(record.money)) && !record.boStatus) {
  4327. message.warning("请填写金额");
  4328. return;
  4329. } else if (isNaN(parseInt(record.money)) && record.boStatus) {
  4330. message.warning("请填写比例");
  4331. return;
  4332. }
  4333. if (record.boStatus) {
  4334. if (
  4335. typeof +record.money == "number" &&
  4336. +record.money >= 0 &&
  4337. +record.money <= 1
  4338. ) {
  4339. record.appropriationRatio = record.money;
  4340. } else {
  4341. message.warning("金额比例填写错误,比例范围0~1");
  4342. return;
  4343. }
  4344. }
  4345. if (!record.dunType && record.dunType != 0) {
  4346. message.warning("请选择对应科目");
  4347. return;
  4348. }
  4349. if (record.dunType != 1) {
  4350. record.waitDay = "";
  4351. }
  4352. this.setState({
  4353. loading: true,
  4354. });
  4355. if (record.boStatus) {
  4356. $.ajax({
  4357. url: globalConfig.context + "/api/admin/orderChange/addChangeDun",
  4358. method: "post",
  4359. data: {
  4360. orderNo: record.orderNo,
  4361. ctid: record.ctid,
  4362. projectType: record.sort,
  4363. dunType: record.dunType,
  4364. appropriationRatio: record.appropriationRatio,
  4365. waitDay: record.waitDay,
  4366. effectiveCount: record.effectiveCount,
  4367. cid: this.state.changeId, //变更ID
  4368. customizeTimes:
  4369. record.dunType == 0 ? record.customizeTimes : undefined,
  4370. customizeName:
  4371. record.dunType == 0 ? record.customizeName : undefined,
  4372. },
  4373. }).done(
  4374. function (data) {
  4375. this.setState({
  4376. loading: false,
  4377. });
  4378. if (!data.error.length) {
  4379. message.success("保存成功!");
  4380. this.setState({
  4381. cuiFlag: false,
  4382. boFlag: false,
  4383. addFlag: false,
  4384. });
  4385. this.cuiList();
  4386. } else {
  4387. message.warning(data.error[0].message);
  4388. }
  4389. }.bind(this)
  4390. );
  4391. } else {
  4392. $.ajax({
  4393. url: globalConfig.context + "/api/admin/orderChange/addChangeDun",
  4394. method: "post",
  4395. data: {
  4396. orderNo: record.orderNo,
  4397. ctid: record.ctid,
  4398. projectType: record.sort,
  4399. dunType: record.dunType,
  4400. money: record.money,
  4401. waitDay: record.waitDay,
  4402. effectiveCount: record.effectiveCount,
  4403. cid: this.state.changeId, //变更ID
  4404. customizeTimes:
  4405. record.dunType == 0 ? record.customizeTimes : undefined,
  4406. customizeName:
  4407. record.dunType == 0 ? record.customizeName : undefined,
  4408. },
  4409. }).done(
  4410. function (data) {
  4411. this.setState({
  4412. loading: false,
  4413. });
  4414. if (!data.error.length) {
  4415. message.success("保存成功!");
  4416. this.setState({
  4417. cuiFlag: false,
  4418. boFlag: false,
  4419. addFlag: false,
  4420. });
  4421. this.cuiList();
  4422. } else {
  4423. message.warning(data.error[0].message);
  4424. }
  4425. }.bind(this)
  4426. );
  4427. }
  4428. },
  4429. submitChange() {
  4430. if (
  4431. this.state.typeChange == undefined ||
  4432. (this.state.typeChange == "" && this.state.typeChange != 0)
  4433. ) {
  4434. message.warning("请选择变更类型");
  4435. return false;
  4436. }
  4437. if (this.state.totalAmount === "") {
  4438. message.warning("合同金额不能为空!");
  4439. return false;
  4440. }
  4441. if (this.state.firstAmount === "") {
  4442. message.warning("首付款金额不能为空!");
  4443. return false;
  4444. }
  4445. if (Number(this.state.totalAmount) < Number(this.state.firstAmount)) {
  4446. message.warning("首付款不能大于合同额!");
  4447. return;
  4448. }
  4449. if (
  4450. this.state.typeChange == 0 ||
  4451. this.state.typeChange == 1 ||
  4452. this.state.typeChange == 3 ||
  4453. this.state.typeChange == 8
  4454. ) {
  4455. if (Number(this.state.settlementAmount) < Number(this.state.changeAmount)) {
  4456. message.warning("退款金额大于已收款金额");
  4457. return;
  4458. }
  4459. }
  4460. if (this.state.processStatus != 6 && this.state.processStatus != 7) {
  4461. message.warning("当前订单流程不能发起变更!");
  4462. return false;
  4463. }
  4464. if (this.state.changeAmount === "") {
  4465. message.warning("申请退款金额不能为空!");
  4466. return false;
  4467. }
  4468. if (this.state.remarksC == "") {
  4469. message.warning("请正确填写变更原因");
  4470. return false;
  4471. }
  4472. if (this.state.startRemarks == "") {
  4473. message.warning("请正确填写备注信息");
  4474. return false;
  4475. }
  4476. if (this.state.typeChange == 0) {
  4477. let reg1 = /^1[3456789]\d{9}$/
  4478. let reg2 = /^0\d{2,3}-?\d{7,8}$/
  4479. let reg3 = /[^\u4E00-\u9FA5]/g
  4480. if (!this.state.managerContacts || reg3.test(this.state.managerContacts)) {
  4481. message.warning("请正确填写企业总经理姓名");
  4482. return false;
  4483. }
  4484. if (!this.state.managerContactMobile) {
  4485. message.warning("请正确填写企业总经理联系电话");
  4486. return false;
  4487. }
  4488. if (!reg1.test(this.state.managerContactMobile) && !reg2.test(this.state.managerContactMobile)) {
  4489. message.warning("请正确填写企业总经理联系电话");
  4490. return false;
  4491. }
  4492. if (!this.state.contacts || reg3.test(this.state.contacts)) {
  4493. message.warning("请正确填写企业联系人姓名");
  4494. return false;
  4495. }
  4496. if (!this.state.contactMobile) {
  4497. message.warning("请正确填写企业联系人联系方式");
  4498. return false;
  4499. }
  4500. if (!reg1.test(this.state.contactMobile) && !reg2.test(this.state.contactMobile)) {
  4501. message.warning("请正确填写企业联系人联系方式");
  4502. return false;
  4503. }
  4504. }
  4505. let theorgCodeUrl = [];
  4506. if (this.state.voucherUrl.length) {
  4507. let picArr = [];
  4508. this.state.voucherUrl.map(function (item) {
  4509. if (
  4510. item.response &&
  4511. item.response.data &&
  4512. item.response.data.length
  4513. ) {
  4514. picArr.push(item.response.data);
  4515. }
  4516. });
  4517. theorgCodeUrl = picArr.join(",");
  4518. }
  4519. let newContractUrl = [];
  4520. if (this.state.newContractUrl.length) {
  4521. let cArr = [];
  4522. this.state.newContractUrl.map(function (item) {
  4523. if (
  4524. item.response &&
  4525. item.response.data &&
  4526. item.response.data.length
  4527. ) {
  4528. cArr.push(item.response.data);
  4529. }
  4530. });
  4531. newContractUrl = cArr.join(",");
  4532. }
  4533. if (this.state.isNew && newContractUrl.length == 0) {
  4534. message.warning("请上传新合同扫描件!");
  4535. return
  4536. }
  4537. this.setState({
  4538. loading: true,
  4539. });
  4540. $.ajax({
  4541. url: globalConfig.context + "/api/admin/orderChange/updateOrderChange",
  4542. method: "post",
  4543. data: {
  4544. id: this.state.changeId,
  4545. changeType: 0,
  4546. orderNo: this.state.orderNo, //订单编号
  4547. processState: 0,
  4548. startRemarks: this.state.startRemarks,
  4549. remarks: this.state.remarksC,
  4550. voucherUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
  4551. totalAmount: this.state.totalAmount,//合同额
  4552. firstAmount: this.state.firstAmount,//首付款
  4553. settlementAmount: this.state.settlementAmount,
  4554. changeAmount: this.state.changeAmount,
  4555. applicant: this.state.salesmanName,
  4556. depName: this.state.depName,
  4557. type: this.state.typeChange,
  4558. contractPictureUrl: this.state.isNew
  4559. ? newContractUrl : undefined,//合同替换件
  4560. contacts: this.state.typeChange == 0 ? this.state.contacts : undefined,
  4561. contactMobile: this.state.typeChange == 0 ? this.state.contactMobile : undefined,
  4562. managerContacts: this.state.typeChange == 0 ? this.state.managerContacts : undefined,
  4563. managerContactMobile: this.state.typeChange == 0 ? this.state.managerContactMobile : undefined,
  4564. },
  4565. }).done(
  4566. function (data) {
  4567. if (!data.error.length) {
  4568. this.setState({
  4569. loading: false,
  4570. });
  4571. message.success("发起变更成功");
  4572. this.handleCancelclose();
  4573. } else {
  4574. message.warning(data.error[0].message);
  4575. this.setState({
  4576. loading: false,
  4577. });
  4578. }
  4579. }.bind(this)
  4580. );
  4581. },
  4582. editCui(record) {
  4583. this.setState({
  4584. editCuiVisible: true,
  4585. editCuiMoney: record.appropriationRatio
  4586. ? record.appropriationRatio
  4587. : record.money,
  4588. appropriationRatio: record.appropriationRatio,
  4589. editCuiTid: record.tid,
  4590. editCuiDid: record.did,
  4591. editCuiId: record.id,
  4592. });
  4593. },
  4594. editPro(record) {
  4595. this.setState({
  4596. editProVisible: true,
  4597. dataInfor: record,
  4598. newData: this.state.proDataSource,
  4599. });
  4600. // this.setState({
  4601. // editProVisible: true,
  4602. // editSplitStatus: record.splitStatus,
  4603. // editProMoney: record.commodityPrice,
  4604. // editProCommodityQuantity: record.commodityQuantity,
  4605. // editProTid: record.tid,
  4606. // editProId: record.id,
  4607. // });
  4608. },
  4609. submitEditCui(type) {
  4610. if (isNaN(parseFloat(this.state.editCuiMoney))) {
  4611. if (type === 1) {
  4612. message.warn("请输入比例");
  4613. } else {
  4614. message.warn("请输入金额");
  4615. }
  4616. return;
  4617. }
  4618. this.setState({
  4619. loading: true,
  4620. });
  4621. let data = {
  4622. id: this.state.editCuiId,
  4623. type: this.state.editCuiTid ? 2 : 1,
  4624. tid: this.state.editCuiTid,
  4625. };
  4626. if (type === 1) {
  4627. data.appropriationRatio = this.state.editCuiMoney;
  4628. } else {
  4629. data.money = this.state.editCuiMoney;
  4630. }
  4631. $.ajax({
  4632. url: globalConfig.context + "/api/admin/orderChange/updateChangeDun",
  4633. method: "post",
  4634. data,
  4635. }).done(
  4636. function (data) {
  4637. this.setState({
  4638. loading: false,
  4639. });
  4640. if (!data.error.length) {
  4641. message.success("修改成功!");
  4642. this.cuiList();
  4643. this.proList();
  4644. this.setState({
  4645. editCuiVisible: false,
  4646. });
  4647. } else {
  4648. message.warning(data.error[0].message);
  4649. }
  4650. }.bind(this)
  4651. );
  4652. },
  4653. submitEditPro() {
  4654. this.setState({
  4655. loading: true,
  4656. });
  4657. $.ajax({
  4658. url: globalConfig.context + "/api/admin/orderChange/updateChangeTask",
  4659. method: "post",
  4660. data: {
  4661. id: this.state.editProId,
  4662. type: this.state.editProTid ? 2 : 1,
  4663. commodityPrice: this.state.editProMoney,
  4664. commodityQuantity: this.state.editProCommodityQuantity,
  4665. tid: this.state.editProTid,
  4666. },
  4667. }).done(
  4668. function (data) {
  4669. this.setState({
  4670. loading: false,
  4671. });
  4672. if (!data.error.length) {
  4673. message.success("修改成功!");
  4674. this.cuiList();
  4675. this.proList();
  4676. this.setState({
  4677. editProVisible: false,
  4678. });
  4679. } else {
  4680. message.warning(data.error[0].message);
  4681. }
  4682. }.bind(this)
  4683. );
  4684. },
  4685. downImg() {
  4686. let num = 0;
  4687. for (let i = 0; i < this.state.orgCodeUrl.length; i++) {
  4688. if (this.state.orgCodeUrl[i].url == this.state.previewImage) {
  4689. num = i;
  4690. }
  4691. }
  4692. if (num == this.state.orgCodeUrl.length - 1) {
  4693. return message.warning("已经是最后一张了哦");
  4694. }
  4695. this.state.previewImage = this.state.orgCodeUrl[num + 1].url;
  4696. this.setState({
  4697. previewImage: this.state.previewImage,
  4698. rotateDeg: 0,
  4699. });
  4700. },
  4701. upImg() {
  4702. let num = 0;
  4703. for (let i = 0; i < this.state.orgCodeUrl.length; i++) {
  4704. if (this.state.orgCodeUrl[i].url == this.state.previewImage) {
  4705. num = i;
  4706. }
  4707. }
  4708. if (num == 0) {
  4709. return message.warning("已经是第一张了哦");
  4710. }
  4711. this.state.previewImage = this.state.orgCodeUrl[num - 1].url;
  4712. this.setState({
  4713. previewImage: this.state.previewImage,
  4714. rotateDeg: 0,
  4715. });
  4716. },
  4717. rotate() {
  4718. let rotateDeg = this.state.rotateDeg + 90;
  4719. this.setState({
  4720. rotateDeg,
  4721. });
  4722. },
  4723. downImgs() {
  4724. let num = 0;
  4725. for (let i = 0; i < this.state.replenishUrl.length; i++) {
  4726. if (this.state.replenishUrl[i].url == this.state.previewImage) {
  4727. num = i;
  4728. }
  4729. }
  4730. if (num == this.state.replenishUrl.length - 1) {
  4731. return message.warning("已经是最后一张了哦");
  4732. }
  4733. this.state.previewImage = this.state.replenishUrl[num + 1].url;
  4734. this.setState({
  4735. previewImage: this.state.previewImage,
  4736. rotateDeg: 0,
  4737. });
  4738. },
  4739. upImgs() {
  4740. let num = 0;
  4741. for (let i = 0; i < this.state.replenishUrl.length; i++) {
  4742. if (this.state.replenishUrl[i].url == this.state.previewImage) {
  4743. num = i;
  4744. }
  4745. }
  4746. if (num == 0) {
  4747. return message.warning("已经是第一张了哦");
  4748. }
  4749. this.state.previewImage = this.state.replenishUrl[num - 1].url;
  4750. this.setState({
  4751. previewImage: this.state.previewImage,
  4752. rotateDeg: 0,
  4753. });
  4754. },
  4755. rotates() {
  4756. let rotateDeg = this.state.rotateDeg + 90;
  4757. this.setState({
  4758. rotateDeg,
  4759. });
  4760. },
  4761. downImgCont() {
  4762. let num = 0;
  4763. for (let i = 0; i < this.state.contentUrl.length; i++) {
  4764. if (this.state.contentUrl[i].url == this.state.previewImage) {
  4765. num = i;
  4766. }
  4767. }
  4768. if (num == this.state.replenishUrl.length - 1) {
  4769. return message.warning("已经是最后一张了哦");
  4770. }
  4771. this.state.previewImage = this.state.contentUrl[num + 1].url;
  4772. this.setState({
  4773. previewImage: this.state.previewImage,
  4774. rotateDeg: 0,
  4775. });
  4776. },
  4777. upImgCont() {
  4778. let num = 0;
  4779. for (let i = 0; i < this.state.contentUrl.length; i++) {
  4780. if (this.state.contentUrl[i].url == this.state.previewImage) {
  4781. num = i;
  4782. }
  4783. }
  4784. if (num == 0) {
  4785. return message.warning("已经是第一张了哦");
  4786. }
  4787. this.state.previewImage = this.state.contentUrl[num - 1].url;
  4788. this.setState({
  4789. previewImage: this.state.previewImage,
  4790. rotateDeg: 0,
  4791. });
  4792. },
  4793. rotateCont() {
  4794. let rotateDeg = this.state.rotateDeg + 90;
  4795. this.setState({
  4796. rotateDeg,
  4797. });
  4798. },
  4799. showConfirmChange(fn, record) {
  4800. confirm({
  4801. title: "确定取消本次变更吗?",
  4802. content: (
  4803. <span style={{ color: "red" }}>取消后本次变更将作废!!!</span>
  4804. ),
  4805. onOk() {
  4806. fn();
  4807. },
  4808. onCancel() { },
  4809. });
  4810. },
  4811. deleteChange() {
  4812. this.setState({
  4813. loading: true,
  4814. });
  4815. $.ajax({
  4816. url: globalConfig.context + "/api/admin/orderChange/cancelOrderChange",
  4817. method: "post",
  4818. data: {
  4819. id: this.state.changeId,
  4820. status: this.state.status,
  4821. processState: this.state.processState,
  4822. orderNo: this.state.orderNo,
  4823. },
  4824. }).done(
  4825. function (data) {
  4826. this.setState({
  4827. loading: false,
  4828. });
  4829. if (!data.error.length) {
  4830. message.success("取消成功!");
  4831. this.handleCancelclose();
  4832. } else {
  4833. message.warning(data.error[0].message);
  4834. }
  4835. }.bind(this)
  4836. );
  4837. },
  4838. // 新增协单人员
  4839. submitOrder() {
  4840. if (!this.state.coor) {
  4841. message.warning("请选择协单人员");
  4842. return;
  4843. }
  4844. this.setState({
  4845. loading: true,
  4846. });
  4847. $.ajax({
  4848. method: "post",
  4849. dataType: "json",
  4850. crossDomain: false,
  4851. url: globalConfig.context + "/api/admin/newOrder/addAssist",
  4852. data: {
  4853. orderNo: this.state.orderNo,
  4854. aid: this.state.coor,
  4855. },
  4856. success: function (data) {
  4857. if (data.error.length) {
  4858. this.setState({
  4859. loading: false,
  4860. });
  4861. message.warning(data.error[0].message);
  4862. } else {
  4863. this.setState({
  4864. loading: false,
  4865. coor: '',
  4866. dataSourceView: [],
  4867. coorVisible: "none",
  4868. });
  4869. this.assistList();
  4870. message.success("添加成功");
  4871. }
  4872. }.bind(this),
  4873. }).always(
  4874. function () {
  4875. this.setState({
  4876. loading: false,
  4877. });
  4878. }.bind(this)
  4879. );
  4880. },
  4881. // // 删除协单人员
  4882. // onClosable(id) {
  4883. // $.ajax({
  4884. // method: "post",
  4885. // dataType: "json",
  4886. // crossDomain: false,
  4887. // url: globalConfig.context + "/api/admin/newOrder/deleteAssist",
  4888. // data: {
  4889. // id: id,
  4890. // },
  4891. // success: function (data) {
  4892. // if (!data.error.length) {
  4893. // message.warning(data.error[0].message);
  4894. // } else {
  4895. // message.success("删除成功");
  4896. // }
  4897. // }.bind(this),
  4898. // }).always(
  4899. // function () {
  4900. // this.setState({
  4901. // loading: false,
  4902. // });
  4903. // }.bind(this)
  4904. // );
  4905. // },
  4906. // 新增上门服务数据
  4907. submitView() {
  4908. if (!this.state.dateView) {
  4909. message.warning("请选择上门日期");
  4910. return;
  4911. } else if (!this.state.contentView) {
  4912. message.warning("请填写服务内容");
  4913. return;
  4914. }
  4915. this.setState({
  4916. loading: true,
  4917. });
  4918. $.ajax({
  4919. method: "post",
  4920. dataType: "json",
  4921. crossDomain: false,
  4922. url: globalConfig.context + "/api/admin/newOrder/addOrderService",
  4923. data: {
  4924. orderNo: this.state.orderNo,
  4925. serviceTimes: this.state.dateView,
  4926. content: this.state.contentView,
  4927. remarks: this.state.remarksView,
  4928. },
  4929. success: function (data) {
  4930. if (data.error.length) {
  4931. this.setState({
  4932. loading: false,
  4933. });
  4934. message.warning(data.error[0].message);
  4935. } else {
  4936. this.setState({
  4937. loading: false,
  4938. modalView: false,
  4939. viewKey: this.state.viewKey + 1,
  4940. dateView: '',
  4941. contentView: '',
  4942. remarksView: '',
  4943. contentViewLength: 0,
  4944. contentViewLength1: 0,
  4945. });
  4946. message.success("添加成功");
  4947. this.orderServiceList();
  4948. }
  4949. }.bind(this),
  4950. }).always(
  4951. function () {
  4952. this.setState({
  4953. loading: false,
  4954. });
  4955. }.bind(this)
  4956. );
  4957. },
  4958. //获取上门人员
  4959. assistList(record) {
  4960. this.state.orderList = [];
  4961. $.ajax({
  4962. method: "get",
  4963. dataType: "json",
  4964. crossDomain: false,
  4965. url: globalConfig.context + "/api/admin/newOrder/assistList",
  4966. data: {
  4967. orderNo: record ? record.orderNo : this.props.datauser.orderNo,
  4968. },
  4969. success: function (data) {
  4970. if (data.error.length) {
  4971. this.setState({
  4972. loading: false,
  4973. });
  4974. message.warning(data.error[0].message);
  4975. } else {
  4976. this.setState({
  4977. personnel: data.data,
  4978. });
  4979. // message.success("添加成功");
  4980. }
  4981. }.bind(this),
  4982. }).always(
  4983. function () {
  4984. this.setState({
  4985. loading: false,
  4986. });
  4987. }.bind(this)
  4988. );
  4989. },
  4990. // 上门服务列表
  4991. orderServiceList(record) {
  4992. $.ajax({
  4993. method: "get",
  4994. dataType: "json",
  4995. crossDomain: false,
  4996. url: globalConfig.context + "/api/admin/newOrder/orderServiceList",
  4997. data: {
  4998. orderNo: record ? record.orderNo : this.props.datauser.orderNo,
  4999. },
  5000. success: function (data) {
  5001. if (data.error.length) {
  5002. this.setState({
  5003. loading: false,
  5004. });
  5005. message.warning(data.error[0].message);
  5006. } else {
  5007. this.setState({
  5008. dataView: data.data,
  5009. });
  5010. // message.success("添加成功");
  5011. }
  5012. }.bind(this),
  5013. }).always(
  5014. function () {
  5015. this.setState({
  5016. loading: false,
  5017. });
  5018. }.bind(this)
  5019. );
  5020. },
  5021. // 删除上门服务列表
  5022. delectView(record) {
  5023. $.ajax({
  5024. method: "POST",
  5025. dataType: "json",
  5026. crossDomain: false,
  5027. url: globalConfig.context + "/api/admin/newOrder/deleteOrderService",
  5028. data: {
  5029. id: record.id,
  5030. },
  5031. success: function (data) {
  5032. if (data.error.length) {
  5033. this.setState({
  5034. loading: false,
  5035. });
  5036. message.warning(data.error[0].message);
  5037. } else {
  5038. // this.setState({
  5039. // publicView: data.data,
  5040. // });
  5041. this.orderServiceList();
  5042. message.success("删除成功");
  5043. }
  5044. }.bind(this),
  5045. }).always(
  5046. function () {
  5047. this.setState({
  5048. loading: false,
  5049. });
  5050. }.bind(this)
  5051. );
  5052. },
  5053. // 上门查看
  5054. publicByOrder() {
  5055. $.ajax({
  5056. method: "get",
  5057. dataType: "json",
  5058. crossDomain: false,
  5059. url: globalConfig.context + "/api/admin/release/publicByOrder",
  5060. data: {
  5061. orderNo: this.state.orderNo,
  5062. },
  5063. success: function (data) {
  5064. if (data.error.length) {
  5065. this.setState({
  5066. loading: false,
  5067. });
  5068. message.warning(data.error[0].message);
  5069. } else {
  5070. this.setState({
  5071. publicView: data.data,
  5072. });
  5073. // message.success("添加成功");
  5074. }
  5075. }.bind(this),
  5076. }).always(
  5077. function () {
  5078. this.setState({
  5079. loading: false,
  5080. });
  5081. }.bind(this)
  5082. );
  5083. },
  5084. // 获取动态数据名称
  5085. handleSearch(value) {
  5086. $.ajax({
  5087. method: "get",
  5088. dataType: "json",
  5089. crossDomain: false,
  5090. url: globalConfig.context + "/api/admin/customer/listAdminByName",
  5091. data: {
  5092. adminName: value,
  5093. },
  5094. success: function (data) {
  5095. if (data.error.length) {
  5096. this.setState({
  5097. loading: false,
  5098. });
  5099. message.warning(data.error[0].message);
  5100. } else {
  5101. this.setState({
  5102. dataSourceView: data.data,
  5103. });
  5104. // message.success("添加成功");
  5105. }
  5106. }.bind(this),
  5107. }).always(
  5108. function () {
  5109. this.setState({
  5110. loading: false,
  5111. });
  5112. }.bind(this)
  5113. );
  5114. },
  5115. //
  5116. onSelectView(v, o) {
  5117. this.setState({
  5118. coor: v,
  5119. });
  5120. },
  5121. //
  5122. handleClose(removedTag) {
  5123. let serviceLife = this.state.serviceLife.filter(tag => { return tag !== removedTag });
  5124. this.setState({ serviceLife, serviceYear: undefined });
  5125. },
  5126. onSelectChange(selectedRowKeys, selectedRows) {
  5127. this.setState({
  5128. selectedRowKeys,
  5129. selectedRows,
  5130. });
  5131. },
  5132. render() {
  5133. const expandedRowRender = (e) => {
  5134. const data = e.list;
  5135. if (e.cSort != 6) {
  5136. let columns = [];
  5137. if (data instanceof Array && data.length) {
  5138. columns = [
  5139. {
  5140. title: "变更状态",
  5141. dataIndex: "type",
  5142. key: "type",
  5143. render: (text, record) => {
  5144. let str = "";
  5145. let color = "";
  5146. if (text == 1) {
  5147. str = "增";
  5148. color = "#87d068";
  5149. } else if (text == 2) {
  5150. str = "改";
  5151. color = "#108ee9";
  5152. } else if (text == 3) {
  5153. str = "删";
  5154. color = "#f50";
  5155. }
  5156. return (
  5157. <span>
  5158. <Tag
  5159. color={color}
  5160. style={{ display: text == 0 ? "none" : "inline-block" }}
  5161. >
  5162. {str}
  5163. </Tag>
  5164. </span>
  5165. );
  5166. },
  5167. },
  5168. {
  5169. title: "业务项目名称",
  5170. dataIndex: "commodityName",
  5171. key: "commodityName",
  5172. render: (text, record) => {
  5173. return <span>{text}<span style={{ color: "red" }}>{record.patentTypeName}</span>{"-" + record.id}</span>
  5174. }
  5175. },
  5176. {
  5177. title: "项目类别",
  5178. dataIndex: "cname",
  5179. key: "cname",
  5180. },
  5181. {
  5182. title: "项目数量",
  5183. dataIndex: "commodityQuantity",
  5184. key: "commodityQuantity",
  5185. width: 50,
  5186. },
  5187. {
  5188. title: "金额(万元)",
  5189. dataIndex: "commodityPrice",
  5190. key: "commodityPrice",
  5191. width: 50,
  5192. render: (text, record) => {
  5193. if (record.splitStatus == 2) {
  5194. return "/";
  5195. } else {
  5196. return text;
  5197. }
  5198. },
  5199. },
  5200. {
  5201. title: "主要项目",
  5202. dataIndex: "main",
  5203. key: "main",
  5204. width: 50,
  5205. render: (text) => {
  5206. return text ? "是" : "否";
  5207. },
  5208. },
  5209. {
  5210. title: "项目负责人",
  5211. dataIndex: "receiverName",
  5212. key: "receiverName",
  5213. },
  5214. {
  5215. title: "项目说明",
  5216. dataIndex: "taskComment",
  5217. key: "taskComment",
  5218. render: (text) => {
  5219. return (
  5220. <Tooltip title={text}>
  5221. <div
  5222. style={{
  5223. width: 100,
  5224. overflow: "hidden",
  5225. whiteSpace: "nowrap",
  5226. textOverflow: "ellipsis",
  5227. }}
  5228. >{text}</div>
  5229. </Tooltip>
  5230. )
  5231. },
  5232. },
  5233. {
  5234. title: "操作",
  5235. dataIndex: "ABC",
  5236. key: "ABC",
  5237. render: (text, record) => {
  5238. return (
  5239. <div>
  5240. <Button
  5241. onClick={(e) => {
  5242. e.stopPropagation();
  5243. this.showConfirm(this.changeDeletePro, record);
  5244. }}
  5245. disabled={this.state.listFlag}
  5246. style={{
  5247. display: this.state.displayList ? "none" : "block",
  5248. }}
  5249. >
  5250. 删除
  5251. </Button>
  5252. </div>
  5253. );
  5254. },
  5255. },
  5256. ];
  5257. return (
  5258. <Table
  5259. columns={columns}
  5260. scroll={{ x: "max-content", y: 0 }}
  5261. dataSource={data}
  5262. pagination={false}
  5263. onRowDoubleClick={this.state.listFlag ? this.not : this.editPro}
  5264. />
  5265. );
  5266. } else {
  5267. columns = [];
  5268. return (
  5269. <p
  5270. style={{ fontWeight: "bold", color: "red", textAlign: "center" }}
  5271. >
  5272. 此项目暂未拆分
  5273. </p>
  5274. );
  5275. }
  5276. } else {
  5277. let columns = [];
  5278. if (data instanceof Array && data.length) {
  5279. columns = [
  5280. {
  5281. title: "变更状态",
  5282. dataIndex: "type",
  5283. key: "type",
  5284. render: (text, record) => {
  5285. let str = "";
  5286. let color = "";
  5287. if (text == 1) {
  5288. str = "增";
  5289. color = "#87d068";
  5290. } else if (text == 2) {
  5291. str = "改";
  5292. color = "#108ee9";
  5293. } else if (text == 3) {
  5294. str = "删";
  5295. color = "#f50";
  5296. }
  5297. return (
  5298. <span>
  5299. <Tag
  5300. color={color}
  5301. style={{ display: text == 0 ? "none" : "inline-block" }}
  5302. >
  5303. {str}
  5304. </Tag>
  5305. </span>
  5306. );
  5307. },
  5308. },
  5309. {
  5310. title: "负责人",
  5311. dataIndex: "receiverName",
  5312. key: "receiverName",
  5313. },
  5314. {
  5315. title: "负责人电话",
  5316. dataIndex: "receiverMobile",
  5317. key: "receiverMobile",
  5318. },
  5319. {
  5320. title: "项目状态",
  5321. dataIndex: "projectStatus",
  5322. key: "projectStatus",
  5323. render: (text) => {
  5324. return getProjectName(text);
  5325. },
  5326. },
  5327. {
  5328. title: "本次派单",
  5329. dataIndex: "serviceYear",
  5330. key: "serviceYear",
  5331. },
  5332. {
  5333. title: "项目说明",
  5334. dataIndex: "taskComment",
  5335. key: "taskComment",
  5336. render: (text) => {
  5337. return (
  5338. <Tooltip title={text}>
  5339. <div
  5340. // style={{
  5341. // width: 100,
  5342. // overflow: "hidden",
  5343. // whiteSpace: "nowrap",
  5344. // textOverflow: "ellipsis",
  5345. // }}
  5346. >{text}</div>
  5347. </Tooltip>
  5348. )
  5349. },
  5350. },
  5351. ];
  5352. return (
  5353. <Table
  5354. columns={columns}
  5355. dataSource={data}
  5356. pagination={false}
  5357. />
  5358. );
  5359. } else {
  5360. columns = [];
  5361. return (
  5362. <p
  5363. style={{ fontWeight: "bold", color: "red", textAlign: "center" }}
  5364. >
  5365. 暂无派单
  5366. </p>
  5367. );
  5368. }
  5369. }
  5370. };
  5371. const expandedRowRenderDetail = (e) => {
  5372. const data = e.list;
  5373. let columns = [];
  5374. if (data instanceof Array && data.length) {
  5375. if (e.cSort == 6) {
  5376. columns = [
  5377. {
  5378. title: "变更状态",
  5379. dataIndex: "type",
  5380. key: "type",
  5381. render: (text, record) => {
  5382. let str = "";
  5383. let color = "";
  5384. if (text == 1) {
  5385. str = "增";
  5386. color = "#87d068";
  5387. } else if (text == 2) {
  5388. str = "改";
  5389. color = "#108ee9";
  5390. } else if (text == 3) {
  5391. str = "删";
  5392. color = "#f50";
  5393. }
  5394. return (
  5395. <span>
  5396. <Tag
  5397. color={color}
  5398. style={{ display: text == 0 ? "none" : "inline-block" }}
  5399. >
  5400. {str}
  5401. </Tag>
  5402. {/* {record.splitStatus == 1 ? (
  5403. <Tag
  5404. color="#108ee9"
  5405. // onClick={e => {
  5406. // e.stopPropagation();
  5407. // this.showRes(record);
  5408. // }}
  5409. >
  5410. 父项目
  5411. </Tag>
  5412. ) : (
  5413. ""
  5414. )}
  5415. {record.splitStatus == 2 ? (
  5416. <Tag
  5417. color="#108ee9"
  5418. // onClick={e => {
  5419. // e.stopPropagation();
  5420. // this.showRes(record);
  5421. // }}
  5422. >
  5423. 子项目
  5424. </Tag>
  5425. ) : (
  5426. ""
  5427. )} */}
  5428. </span>
  5429. );
  5430. },
  5431. },
  5432. {
  5433. title: "负责人",
  5434. dataIndex: "receiverName",
  5435. key: "receiverName",
  5436. },
  5437. {
  5438. title: "负责人电话",
  5439. dataIndex: "receiverMobile",
  5440. key: "receiverMobile",
  5441. },
  5442. {
  5443. title: "项目状态",
  5444. dataIndex: "projectStatus",
  5445. key: "projectStatus",
  5446. render: (text) => {
  5447. return getProjectName(text);
  5448. },
  5449. },
  5450. {
  5451. title: "本次派单",
  5452. dataIndex: "serviceYear",
  5453. key: "serviceYear",
  5454. },
  5455. {
  5456. title: "项目说明",
  5457. dataIndex: "taskComment",
  5458. key: "taskComment",
  5459. render: (text) => {
  5460. return (
  5461. <Tooltip title={text}>
  5462. <div
  5463. // style={{
  5464. // width: 100,
  5465. // overflow: "hidden",
  5466. // whiteSpace: "nowrap",
  5467. // textOverflow: "ellipsis",
  5468. // }}
  5469. >{text}</div>
  5470. </Tooltip>
  5471. )
  5472. },
  5473. },
  5474. ];
  5475. } else {
  5476. columns = [
  5477. {
  5478. title: "变更状态",
  5479. dataIndex: "type",
  5480. key: "type",
  5481. render: (text, record) => {
  5482. let str = "";
  5483. let color = "";
  5484. if (text == 1) {
  5485. str = "增";
  5486. color = "#87d068";
  5487. } else if (text == 2) {
  5488. str = "改";
  5489. color = "#108ee9";
  5490. } else if (text == 3) {
  5491. str = "删";
  5492. color = "#f50";
  5493. }
  5494. return (
  5495. <span>
  5496. <Tag
  5497. color={color}
  5498. style={{ display: text == 0 ? "none" : "inline-block" }}
  5499. >
  5500. {str}
  5501. </Tag>
  5502. {/* {record.splitStatus == 1 ? (
  5503. <Tag
  5504. color="#108ee9"
  5505. // onClick={e => {
  5506. // e.stopPropagation();
  5507. // this.showRes(record);
  5508. // }}
  5509. >
  5510. 父项目
  5511. </Tag>
  5512. ) : (
  5513. ""
  5514. )}
  5515. {record.splitStatus == 2 ? (
  5516. <Tag
  5517. color="#108ee9"
  5518. // onClick={e => {
  5519. // e.stopPropagation();
  5520. // this.showRes(record);
  5521. // }}
  5522. >
  5523. 子项目
  5524. </Tag>
  5525. ) : (
  5526. ""
  5527. )} */}
  5528. </span>
  5529. );
  5530. },
  5531. },
  5532. {
  5533. title: "业务项目名称",
  5534. dataIndex: "commodityName",
  5535. key: "commodityName",
  5536. render: (text, record) => {
  5537. return (
  5538. <span>{text}<span style={{ color: "red" }}>{record.patentTypeName}</span></span>
  5539. )
  5540. }
  5541. },
  5542. {
  5543. title: "项目类别",
  5544. dataIndex: "cname",
  5545. key: "cname",
  5546. },
  5547. {
  5548. title: "项目数量",
  5549. dataIndex: "commodityQuantity",
  5550. key: "commodityQuantity",
  5551. width: 50,
  5552. },
  5553. {
  5554. title: "金额(万元)",
  5555. dataIndex: "commodityPrice",
  5556. key: "commodityPrice",
  5557. width: 50,
  5558. render: (text, record) => {
  5559. if (record.splitStatus == 2) {
  5560. return "/";
  5561. } else {
  5562. return text;
  5563. }
  5564. },
  5565. },
  5566. {
  5567. title: "主要项目",
  5568. dataIndex: "main",
  5569. key: "main",
  5570. width: 50,
  5571. render: (text) => {
  5572. return text ? "是" : "否";
  5573. },
  5574. },
  5575. {
  5576. title: "项目负责人",
  5577. dataIndex: "receiverName",
  5578. key: "receiverName",
  5579. },
  5580. {
  5581. title: "项目说明",
  5582. dataIndex: "taskComment",
  5583. key: "taskComment",
  5584. render: (text) => {
  5585. return (
  5586. <Tooltip title={text}>
  5587. <div
  5588. style={{
  5589. width: 100,
  5590. overflow: "hidden",
  5591. whiteSpace: "nowrap",
  5592. textOverflow: "ellipsis",
  5593. }}
  5594. >{text}</div>
  5595. </Tooltip>
  5596. )
  5597. },
  5598. },
  5599. ];
  5600. }
  5601. return (
  5602. <Table
  5603. columns={columns}
  5604. scroll={{ x: "max-content", y: 0 }}
  5605. dataSource={data}
  5606. pagination={false}
  5607. />
  5608. );
  5609. } else {
  5610. columns = [];
  5611. return (
  5612. <p
  5613. style={{ fontWeight: "bold", color: "red", textAlign: "center" }}
  5614. >
  5615. {e.cSort == 6 ? "暂无派单" : "此项目暂未拆分"}
  5616. </p>
  5617. );
  5618. }
  5619. };
  5620. const expandedRowRenderVip = (e) => {
  5621. const data = e.splitList;
  5622. let columns = [];
  5623. if (data instanceof Array && data.length) {
  5624. if (e.cSort == 6) {
  5625. columns = [
  5626. {
  5627. title: "负责人",
  5628. dataIndex: "receiverName",
  5629. key: "receiverName",
  5630. },
  5631. {
  5632. title: "负责人电话",
  5633. dataIndex: "receiverMobile",
  5634. key: "receiverMobile",
  5635. },
  5636. {
  5637. title: "项目状态",
  5638. dataIndex: "projectStatus",
  5639. key: "projectStatus",
  5640. render: (text) => {
  5641. return getProjectName(text);
  5642. },
  5643. },
  5644. {
  5645. title: "本次派单",
  5646. dataIndex: "serviceYear",
  5647. key: "serviceYear",
  5648. },
  5649. {
  5650. title: "项目说明",
  5651. dataIndex: "taskComment",
  5652. key: "taskComment",
  5653. render: (text) => {
  5654. return (
  5655. <Tooltip title={text}>
  5656. <div
  5657. style={{
  5658. width: 100,
  5659. overflow: "hidden",
  5660. whiteSpace: "nowrap",
  5661. textOverflow: "ellipsis",
  5662. }}
  5663. >{text}</div>
  5664. </Tooltip>
  5665. )
  5666. },
  5667. },
  5668. ];
  5669. } else {
  5670. columns = [
  5671. {
  5672. title: "子项目名称",
  5673. dataIndex: "taskName",
  5674. key: "taskName"
  5675. },
  5676. {
  5677. title: "子项目数量",
  5678. dataIndex: "commodityQuantity",
  5679. key: "commodityQuantity"
  5680. },
  5681. {
  5682. title: "拆分操作人",
  5683. dataIndex: "splitAname",
  5684. key: "splitAname"
  5685. },
  5686. {
  5687. title: "项目负责人",
  5688. dataIndex: "receiverName",
  5689. key: "receiverName"
  5690. },
  5691. {
  5692. title: "拆分时间",
  5693. dataIndex: "splitTimes",
  5694. key: "splitTimes"
  5695. }
  5696. ]
  5697. }
  5698. return (
  5699. <Table
  5700. columns={columns}
  5701. dataSource={data}
  5702. pagination={false}
  5703. />
  5704. );
  5705. } else {
  5706. columns = [];
  5707. return (
  5708. <p
  5709. style={{ fontWeight: "bold", color: "red", textAlign: "center" }}
  5710. >
  5711. {e.cSort == 6 ? "暂无派单" : "此项目暂未拆分"}
  5712. </p>
  5713. );
  5714. }
  5715. };
  5716. const FormItem = Form.Item;
  5717. const { TabPane } = Tabs;
  5718. const { TextArea } = Input;
  5719. const radioStyle = {
  5720. display: 'block',
  5721. height: '30px',
  5722. lineHeight: '30px',
  5723. };
  5724. const formItemLayout = {
  5725. labelCol: { span: 10 },
  5726. wrapperCol: { span: 14 },
  5727. };
  5728. const contractData = this.state.contractData;
  5729. const formItemList = [
  5730. {
  5731. label: "企业联系人",
  5732. content: <span>{this.state.contacts}</span>,
  5733. },
  5734. {
  5735. label: "客户名称",
  5736. content: (
  5737. <span>
  5738. {this.state.userName}
  5739. <EnterpriseNameChange
  5740. type="journal"
  5741. style={{ marginLeft: 10 }}
  5742. enterpriseId={this.state.orderUid}
  5743. />
  5744. </span>
  5745. ),
  5746. },
  5747. {
  5748. label: "联系人电话",
  5749. content: <span>{this.state.contactMobile}</span>,
  5750. },
  5751. {
  5752. label: "企业法人",
  5753. content: <span>{this.state.legalPerson}</span>,
  5754. },
  5755. {
  5756. label: "法人电话",
  5757. content: <span>{this.state.legalPersonTel}</span>,
  5758. },
  5759. // {
  5760. // label: "签单金额(万元)",
  5761. // content: <span>{this.state.totalAmount}</span>
  5762. // },
  5763. // {
  5764. // label: "首付金额(万元)",
  5765. // content: <span>{this.state.firstAmount}</span>
  5766. // },
  5767. // {
  5768. // label: "特批立项",
  5769. // content: <span>{getApprovedState(this.state.approval)}</span>
  5770. // },
  5771. // {
  5772. // label: "合同签订时间",
  5773. // content: <span>{this.state.signDate}</span>
  5774. // },
  5775. // {
  5776. // label: "订单部门",
  5777. // content: <span>{this.state.depName}</span>
  5778. // }
  5779. ];
  5780. let dataSources = this.state.customerArr || [];
  5781. let cdataSources = this.state.channelArr || [];
  5782. const cuiDataList = this.state.contactList || [];
  5783. let departmentArr = this.state.departmentArr || [];
  5784. let options = this.state.states
  5785. ? dataSources.map((group) => (
  5786. <Select.Option key={group.id} value={group.name}>
  5787. {group.name}
  5788. </Select.Option>
  5789. ))
  5790. : dataSources.map((group, index) => (
  5791. <Select.Option key={index} value={group.bname}>
  5792. {group.bname}
  5793. </Select.Option>
  5794. ));
  5795. let channeloptions = cdataSources.map((group) => (
  5796. <Select.Option key={group.id} value={group.name}>
  5797. {group.name}
  5798. </Select.Option>
  5799. ));
  5800. let dataSourceView = this.state.dataSourceView ? this.state.dataSourceView.map((group, index) => (
  5801. <Select.Option key={index} value={group.aid}>
  5802. {group.name}
  5803. </Select.Option>
  5804. )) : '';
  5805. let children = vipYear.map(its => (
  5806. <Option key={its}>{its}</Option>
  5807. ));
  5808. let { closable } = this.state;
  5809. let assistList = this.assistList;
  5810. const { addPop = "" } = this.props
  5811. return (
  5812. <div>
  5813. {this.state.resVisible ? (
  5814. <ResolutionDetail
  5815. cancel={this.resCancel}
  5816. detail={this.state.resRecord}
  5817. visible={this.state.resVisible}
  5818. id={this.state.resRecord.orderNo}
  5819. />
  5820. ) : (
  5821. ""
  5822. )}
  5823. <Modal
  5824. maskClosable={false}
  5825. visible={this.props.addPop == "add" ? this.props.showDesc : this.state.visible}
  5826. onOk={this.handleOk}
  5827. onCancel={this.handleCancelclose}
  5828. width={!this.props.userDetaile ? "600px" : "1200px"}
  5829. title={!this.props.userDetaile ? "创建订单" : ""}
  5830. footer=""
  5831. className="admin-desc-content"
  5832. >
  5833. <Form
  5834. layout="horizontal"
  5835. onSubmit={this.handleSubmit}
  5836. style={{ paddingBottom: "40px" }}
  5837. >
  5838. <Spin spinning={this.state.loading}>
  5839. <div className="clearfix">
  5840. {
  5841. addPop == "add" &&
  5842. <div className="clearfix">
  5843. <div className="clearfix">
  5844. <FormItem {...formItemLayout} label="订单类型">
  5845. <Select
  5846. placeholder="请选择订单类型"
  5847. style={{ width: "200px" }}
  5848. value={this.state.orderType}
  5849. onChange={(e) => {
  5850. this.setState({ orderType: e });
  5851. }}
  5852. >
  5853. {orderTypes.map(function (item) {
  5854. return (
  5855. <Select.Option key={item.value}>
  5856. {item.key}
  5857. </Select.Option>
  5858. );
  5859. })}
  5860. </Select>
  5861. <span className="mandatory">*</span>
  5862. </FormItem>
  5863. </div>
  5864. <FormItem {...formItemLayout} label="客户所属类型">
  5865. <Select
  5866. placeholder="请选择客户所属类型"
  5867. style={{ width: "200px" }}
  5868. value={this.state.userType}
  5869. onChange={(e) => {
  5870. this.setState({
  5871. userType: e,
  5872. customerArr: [],
  5873. autoId: "",
  5874. customerName: "",
  5875. selectSales: undefined
  5876. });
  5877. }}
  5878. >
  5879. {customerType.map(function (item) {
  5880. return (
  5881. <Select.Option key={item.value}>
  5882. {item.key}
  5883. </Select.Option>
  5884. );
  5885. })}
  5886. </Select>
  5887. </FormItem>
  5888. <div className="clearfix">
  5889. <FormItem {...formItemLayout} label="客户名称">
  5890. <AutoComplete
  5891. className="certain-category-search"
  5892. dropdownClassName="certain-category-search-dropdown"
  5893. dropdownMatchSelectWidth={false}
  5894. dropdownStyle={{ width: 200 }}
  5895. size="large"
  5896. style={{ width: "200px" }}
  5897. dataSource={options}
  5898. placeholder="输入名称"
  5899. value={this.state.customerName}
  5900. onChange={this.customerChange}
  5901. filterOption={true}
  5902. onSelect={this.selectAutoCUT}
  5903. >
  5904. <Input />
  5905. </AutoComplete>
  5906. <span className="mandatory">*</span>
  5907. </FormItem>
  5908. </div>
  5909. <FormItem {...formItemLayout} label="销售类型">
  5910. <Select
  5911. placeholder="请选择销售类型"
  5912. style={{ width: "200px" }}
  5913. value={this.state.selectSales}
  5914. onChange={(e) => {
  5915. this.setState({
  5916. selectSales: e,
  5917. });
  5918. }}
  5919. >
  5920. {(this.state.userType == "0"
  5921. ? ssalesType : this.state.userType == "1"
  5922. ? qsalesType : []).map(function (item) {
  5923. return (
  5924. <Select.Option key={item.value} disabled={item.value == "5"}>
  5925. {item.key}
  5926. </Select.Option>
  5927. );
  5928. })}
  5929. </Select>
  5930. </FormItem>
  5931. {
  5932. (this.state.selectSales == "4" || this.state.selectSales == "5") &&
  5933. <FormItem {...formItemLayout} label="描述">
  5934. <TextArea
  5935. placeholder="请填写描述"
  5936. style={{ width: 300, height: 80 }}
  5937. onChange={(e) => {
  5938. this.setState({
  5939. other: e.target.value
  5940. })
  5941. }}
  5942. />
  5943. </FormItem>
  5944. }
  5945. {
  5946. this.state.selectSales == "3" &&
  5947. <div className="clearfix">
  5948. <FormItem {...formItemLayout} label="渠道名称">
  5949. <AutoComplete
  5950. className="certain-category-search"
  5951. dropdownClassName="certain-category-search-dropdown"
  5952. dropdownMatchSelectWidth={false}
  5953. dropdownStyle={{ width: 200 }}
  5954. size="large"
  5955. style={{ width: "200px" }}
  5956. dataSource={channeloptions}
  5957. placeholder="请输入渠道关键字"
  5958. value={this.state.channelName}
  5959. onChange={this.channelChange}
  5960. filterOption={true}
  5961. onSelect={this.goSelect}
  5962. >
  5963. <Input />
  5964. </AutoComplete>
  5965. <span className="mandatory">*</span>
  5966. </FormItem>
  5967. </div>
  5968. }
  5969. <div className="addSave" style={{ marginTop: "15px" }}>
  5970. <Button
  5971. className="cancel"
  5972. type="primary"
  5973. // onClick={this.handleCancel}
  5974. style={{ marginLeft: "150px" }}
  5975. htmlType="submit"
  5976. >
  5977. 开单
  5978. </Button>
  5979. <Button
  5980. className="cancel"
  5981. type="ghost"
  5982. onClick={this.handleCancelclose}
  5983. style={{ marginLeft: "50px" }}
  5984. >
  5985. 取消
  5986. </Button>
  5987. </div>
  5988. </div>
  5989. }
  5990. {
  5991. addPop == "edit" &&
  5992. <Tabs
  5993. onChange={this.callback}
  5994. activeKey={this.state.activeKey}
  5995. tabBarExtraContent={
  5996. <div
  5997. style={{ fontWeight: "bold", paddingRight: "15px" }}
  5998. >
  5999. <OrderItemStatus deleteSign={this.state.deleteSign} />
  6000. </div>
  6001. }
  6002. >
  6003. <TabPane tab={"最新订单"} key="1">
  6004. {
  6005. this.state.activeKey == "1" &&
  6006. <div className="clearfix">
  6007. <div className="clearfix">
  6008. <FormItem
  6009. className="half-item"
  6010. {...formItemLayout}
  6011. label="合同编号"
  6012. >
  6013. {<span>{this.state.contractNo}</span>}
  6014. </FormItem>
  6015. <FormItem
  6016. className="half-item"
  6017. {...formItemLayout}
  6018. label="订单编号"
  6019. >
  6020. <span>{this.state.orderNo}</span>
  6021. </FormItem>
  6022. <FormItem
  6023. className="half-item"
  6024. {...formItemLayout}
  6025. label="流程状态"
  6026. >
  6027. <span>
  6028. {getProcessStatus(this.state.processStatus, this.state.examineName, this.state.approval)}
  6029. </span>
  6030. <FlowChart
  6031. orderNo={this.state.orderNo}
  6032. />
  6033. </FormItem>
  6034. <FormItem
  6035. className="half-item"
  6036. {...formItemLayout}
  6037. label="销售类型"
  6038. >
  6039. <span>
  6040. {(["私有客户-", "签单客户-"][this.state.updatas.userType] || " ") +
  6041. (salesList[this.state.updatas.salesType] || "")}
  6042. </span>
  6043. {
  6044. this.state.processStatus === 0 &&
  6045. <UpdateSales
  6046. orderNo={this.state.orderNo}
  6047. updatas={this.state.updatas}
  6048. onRefresh={
  6049. e => {
  6050. let ups = this.state.updatas
  6051. ups.salesType = e.salesType
  6052. if (e.salesType == "3") {
  6053. ups.channelId = e.channelId
  6054. ups.other = e.other
  6055. } else if (e.salesType == "4" || e.salesType == "5") {
  6056. ups.other = e.other
  6057. }
  6058. this.setState({
  6059. updatas: ups,
  6060. userType: ups.userType
  6061. })
  6062. }
  6063. // this.loaduser.bind(this, {orderNo: this.state.orderNo })
  6064. }
  6065. />
  6066. }
  6067. </FormItem>
  6068. <FormItem
  6069. className="half-item"
  6070. {...formItemLayout}
  6071. label="结算状态"
  6072. >
  6073. <span>
  6074. {getLiquidationStatus(
  6075. this.state.liquidationStatus
  6076. )}
  6077. </span>
  6078. </FormItem>
  6079. {this.state.processStatus === 0 ? (
  6080. <div className="clearfix">
  6081. <FormItem
  6082. className="half-item"
  6083. {...formItemLayout}
  6084. label="特批立项"
  6085. >
  6086. <Select
  6087. placeholder="请选择客户所属类型"
  6088. style={{ width: "240px" }}
  6089. value={["非特批", "特批", "特批通过", "特批驳回", "特批", "特批通过", "特批驳回"][Number(this.state.approval)]
  6090. }
  6091. onChange={(e) => {
  6092. this.setState({ approval: e });
  6093. }}
  6094. >
  6095. <Select.Option key={0}>非特批</Select.Option>
  6096. <Select.Option key={1}>特批</Select.Option>
  6097. </Select>
  6098. </FormItem>
  6099. <FormItem
  6100. className="half-item"
  6101. {...formItemLayout}
  6102. label={
  6103. <span>
  6104. <strong style={{ color: "#f00" }}>*</strong>
  6105. 合同签订时间
  6106. </span>
  6107. }
  6108. >
  6109. <DatePicker
  6110. className="signDateRef"
  6111. style={{
  6112. marginTop: "2px",
  6113. // width: "240px",
  6114. height: "27px",
  6115. }}
  6116. showTime
  6117. format="YYYY-MM-DD"
  6118. onOk={() => { }}
  6119. value={
  6120. this.state.signDate
  6121. ? moment(this.state.signDate)
  6122. : null
  6123. }
  6124. onChange={(data, dataString) => {
  6125. this.setState({ signDate: dataString });
  6126. }}
  6127. />
  6128. </FormItem>
  6129. <FormItem
  6130. className="half-item"
  6131. {...formItemLayout}
  6132. label="订单部门"
  6133. >
  6134. <Select
  6135. placeholder="请选择订单部门"
  6136. style={{ width: 240 }}
  6137. value={this.state.organizationSearch}
  6138. onChange={(e) => {
  6139. this.setState({ organizationSearch: e });
  6140. }}
  6141. >
  6142. {departmentArr.map(function (item) {
  6143. return (
  6144. <Select.Option key={item.id}>
  6145. {item.name}
  6146. </Select.Option>
  6147. );
  6148. })}
  6149. </Select>
  6150. </FormItem>
  6151. </div>
  6152. ) : (
  6153. <div className="clearfix">
  6154. <FormItem
  6155. className="half-item"
  6156. {...formItemLayout}
  6157. label="特批立项"
  6158. >
  6159. <span>
  6160. {/* {["非特批", "特批待审核", "特批通过", "特批驳回"][this.state.approval]} */}
  6161. {getApprovedState(this.state.approval)}
  6162. </span>
  6163. </FormItem>
  6164. <FormItem
  6165. className="half-item"
  6166. {...formItemLayout}
  6167. label="合同签订时间"
  6168. >
  6169. <span>{this.state.signDate}</span>
  6170. </FormItem>
  6171. <FormItem
  6172. className="half-item"
  6173. {...formItemLayout}
  6174. label="订单部门"
  6175. >
  6176. <span>{this.state.depName}</span>
  6177. </FormItem>
  6178. <FormItem
  6179. className="half-item"
  6180. {...formItemLayout}
  6181. label="是否外包"
  6182. >
  6183. <span>
  6184. {this.state.outsource == 0 ? "否" : "是"}
  6185. </span>
  6186. </FormItem>
  6187. </div>
  6188. )}
  6189. </div>
  6190. <h3
  6191. style={{
  6192. marginLeft: 10,
  6193. fontWeight: 800,
  6194. marginBottom: 10,
  6195. }}
  6196. >
  6197. 收款项目
  6198. </h3>
  6199. {this.state.processStatus === 0 ? (
  6200. <div className="clearfix">
  6201. <FormItem
  6202. className="half-item"
  6203. {...formItemLayout}
  6204. label="签单金额(万元)"
  6205. >
  6206. <Input
  6207. placeholder="签单金额"
  6208. ref="totalAmountRef"
  6209. value={this.state.totalAmount}
  6210. onChange={(e) => {
  6211. this.setState({
  6212. totalAmount: e.target.value,
  6213. });
  6214. }}
  6215. style={{ width: "240px" }}
  6216. />
  6217. </FormItem>
  6218. <FormItem
  6219. className="half-item"
  6220. {...formItemLayout}
  6221. label="首付金额(万元)"
  6222. >
  6223. <Input
  6224. placeholder="请输入实签首款金额"
  6225. ref="firstAmountRef"
  6226. value={this.state.firstAmount}
  6227. onChange={(e) => {
  6228. this.setState({
  6229. firstAmount: e.target.value,
  6230. });
  6231. }}
  6232. style={{ width: "240px" }}
  6233. />
  6234. </FormItem>
  6235. <FormItem
  6236. className="half-item"
  6237. {...formItemLayout}
  6238. label="已收款项"
  6239. >
  6240. <span>
  6241. {this.state.settlementAmount + "万元"}
  6242. </span>
  6243. {/* {this.state.settlementAmount ? (
  6244. <Button
  6245. type="primary"
  6246. onClick={this.tuikuan}
  6247. style={{
  6248. float: "right",
  6249. marginRight: "50px",
  6250. marginBottom: "15px"
  6251. }}
  6252. >
  6253. 退单
  6254. </Button>
  6255. ) : (
  6256. ""
  6257. )} */}
  6258. </FormItem>
  6259. </div>
  6260. ) : (
  6261. <div className="clearfix">
  6262. <FormItem
  6263. className="half-item"
  6264. {...formItemLayout}
  6265. label="签单金额(万元)"
  6266. >
  6267. <span>{this.state.totalAmount}</span>
  6268. </FormItem>
  6269. <FormItem
  6270. className="half-item"
  6271. {...formItemLayout}
  6272. label="首付金额(万元)"
  6273. >
  6274. <span>{this.state.firstAmount}</span>
  6275. </FormItem>
  6276. <FormItem
  6277. className="half-item"
  6278. {...formItemLayout}
  6279. label="已收款项"
  6280. >
  6281. <span>
  6282. {this.state.settlementAmount + "万元"}
  6283. </span>
  6284. {/* {this.state.settlementAmount ? (
  6285. <Button
  6286. type="primary"
  6287. onClick={this.tuikuan}
  6288. style={{
  6289. float: "right",
  6290. marginRight: "50px",
  6291. marginBottom: "15px"
  6292. }}
  6293. >
  6294. 退单
  6295. </Button>
  6296. ) : (
  6297. ""
  6298. )} */}
  6299. </FormItem>
  6300. </div>
  6301. )}
  6302. <h3
  6303. style={{
  6304. marginLeft: 10,
  6305. fontWeight: 800,
  6306. marginBottom: 10,
  6307. }}
  6308. >
  6309. 联系信息
  6310. </h3>
  6311. {this.state.processStatus == 0 ? (
  6312. <div className="clearfix">
  6313. <div className="clearfix">
  6314. <FormItem
  6315. className="half-item"
  6316. style={{ width: "100%" }}
  6317. labelCol={{ span: 5 }}
  6318. wrapperCol={{ span: 19 }}
  6319. label="客户名称"
  6320. >
  6321. <span>{this.state.userName}</span>
  6322. <EnterpriseNameChange
  6323. type="journal"
  6324. style={{ marginLeft: 10 }}
  6325. enterpriseId={this.state.orderUid}
  6326. />
  6327. </FormItem>
  6328. </div>
  6329. <FormItem
  6330. className="half-item"
  6331. {...formItemLayout}
  6332. label={
  6333. <span>
  6334. <strong style={{ color: "#f00" }}>*</strong>
  6335. 企业联系人
  6336. </span>
  6337. }
  6338. >
  6339. <Input
  6340. placeholder="请输入联系人"
  6341. ref="signTotalAmount"
  6342. value={this.state.contacts}
  6343. onChange={(e) => {
  6344. this.setState({ contacts: e.target.value });
  6345. }}
  6346. style={{ width: "240px" }}
  6347. />
  6348. </FormItem>
  6349. <FormItem
  6350. className="half-item"
  6351. {...formItemLayout}
  6352. label={
  6353. <span>
  6354. <strong style={{ color: "#f00" }}>*</strong>
  6355. 联系人电话
  6356. </span>
  6357. }
  6358. >
  6359. <Input
  6360. placeholder="请输入联系人电话"
  6361. ref="signTotalAmount"
  6362. value={this.state.contactMobile}
  6363. onChange={(e) => {
  6364. this.setState({
  6365. contactMobile: e.target.value,
  6366. });
  6367. }}
  6368. style={{ width: "240px" }}
  6369. />
  6370. </FormItem>
  6371. <FormItem
  6372. className="half-item"
  6373. {...formItemLayout}
  6374. label="企业法人"
  6375. >
  6376. <Input
  6377. placeholder="请输入法人"
  6378. ref="signTotalAmount"
  6379. value={this.state.legalPerson}
  6380. onChange={(e) => {
  6381. this.setState({
  6382. legalPerson: e.target.value,
  6383. });
  6384. }}
  6385. style={{ width: "240px" }}
  6386. />
  6387. </FormItem>
  6388. <FormItem
  6389. className="half-item"
  6390. {...formItemLayout}
  6391. label="法人电话"
  6392. >
  6393. <Input
  6394. placeholder="请输入法人电话"
  6395. ref="signTotalAmount"
  6396. value={this.state.legalPersonTel}
  6397. onChange={(e) => {
  6398. this.setState({
  6399. legalPersonTel: e.target.value,
  6400. });
  6401. }}
  6402. style={{ width: "240px" }}
  6403. />
  6404. </FormItem>
  6405. </div>
  6406. ) : (
  6407. <div className="clearfix">
  6408. {formItemList.map((data, index) => {
  6409. return (
  6410. <FormItem
  6411. className="half-item"
  6412. {...formItemLayout}
  6413. key={index}
  6414. label={data.label}
  6415. >
  6416. {data.content}
  6417. </FormItem>
  6418. );
  6419. })}
  6420. </div>
  6421. )}
  6422. <div className="clearfix">
  6423. {this.state.processStatus == 0 ? (
  6424. <div>
  6425. <FormItem
  6426. labelCol={{ span: 5 }}
  6427. wrapperCol={{ span: 19 }}
  6428. label={
  6429. <span>
  6430. <strong style={{ color: "#f00" }}>
  6431. *
  6432. </strong>
  6433. 合同扫描件
  6434. </span>
  6435. }
  6436. >
  6437. <PicturesWall
  6438. domId={"addService1"}
  6439. fileList={this.getOrgCodeUrl}
  6440. pictureUrl={this.state.orgCodeUrl}
  6441. url="/api/admin/order/uploadOrderImg"
  6442. orderNo={this.state.orderNo}
  6443. sign="contract"
  6444. deleteApi="/api/admin/order/deleteOrderImg"
  6445. />
  6446. <p>图片建议:要清晰。</p>
  6447. <Button
  6448. style={{
  6449. float: "right",
  6450. marginRight: "140px",
  6451. marginTop: "20px",
  6452. }}
  6453. onClick={this.getOrderLog}
  6454. >
  6455. 查看订单日志
  6456. </Button>
  6457. </FormItem>
  6458. <Gxczx
  6459. isShow={this.state.isShow}
  6460. isCreat={true}
  6461. knowledgeServices={this.state.knowledgeServices}
  6462. auditServices={this.state.auditServices}
  6463. addDeductionServices={this.state.addDeductionServices}
  6464. knowledgeOther={this.state.knowledgeOther}
  6465. auditOther={this.state.auditOther}
  6466. addDeductionOther={this.state.addDeductionOther}
  6467. selknowledge={e => { this.setState({ knowledgeServices: e.knowledgeServices, knowledgeOther: e.knowledgeOther }) }}
  6468. selaudit={e => { this.setState({ auditServices: e.auditServices, auditOther: e.auditOther }) }}
  6469. seladdDeduction={e => { this.setState({ addDeductionServices: e.addDeductionServices, addDeductionOther: e.addDeductionOther }) }}
  6470. onSwitch={e => { this.setState({ isShow: e }) }}
  6471. />
  6472. <FormItem
  6473. labelCol={{ span: 5 }}
  6474. wrapperCol={{ span: 19 }}
  6475. label={<span>补充协议</span>}
  6476. >
  6477. <PicturesWall
  6478. domId={"addService2"}
  6479. fileList={this.getReplenishUrl}
  6480. pictureUrl={this.state.replenishUrl}
  6481. url="/api/admin/order/uploadOrderImg"
  6482. orderNo={this.state.orderNo}
  6483. sign="supplement"
  6484. deleteApi="/api/admin/order/deleteOrderImg"
  6485. />
  6486. <p>图片建议:要清晰。</p>
  6487. </FormItem>
  6488. </div>
  6489. ) : (
  6490. <div>
  6491. <FormItem
  6492. labelCol={{ span: 5 }}
  6493. wrapperCol={{ span: 19 }}
  6494. label="合同扫描件"
  6495. >
  6496. <div
  6497. style={{
  6498. paddingTop: "10px",
  6499. paddingBottom: "10px",
  6500. }}
  6501. >
  6502. {this.state.orgCodeUrl &&
  6503. this.state.visible &&
  6504. this.state.activeKey === "1" ? (
  6505. <ImgList
  6506. domId={"addService3"}
  6507. fileList={this.state.orgCodeUrl}
  6508. ItemWidth={"96px"}
  6509. />
  6510. ) : (
  6511. <div />
  6512. )}
  6513. </div>
  6514. <Button
  6515. style={{
  6516. float: "right",
  6517. marginRight: "140px",
  6518. marginTop: "20px",
  6519. }}
  6520. onClick={this.getOrderLog}
  6521. >
  6522. 查看订单日志
  6523. </Button>
  6524. </FormItem>
  6525. {/* 高新纯咨询合同说明详情 */}
  6526. <Gxczx
  6527. knowledgeServices={this.state.knowledgeServices}
  6528. auditServices={this.state.auditServices}
  6529. addDeductionServices={this.state.addDeductionServices}
  6530. knowledgeOther={this.state.knowledgeOther}
  6531. auditOther={this.state.auditOther}
  6532. addDeductionOther={this.state.addDeductionOther}
  6533. />
  6534. <FormItem
  6535. labelCol={{ span: 5 }}
  6536. wrapperCol={{ span: 19 }}
  6537. label="补充协议"
  6538. >
  6539. <div
  6540. style={{
  6541. paddingTop: "10px",
  6542. paddingBottom: "10px",
  6543. }}
  6544. >
  6545. {this.state.visible &&
  6546. this.state.activeKey === "1" &&
  6547. this.state.replenishUrl ? (
  6548. <ImgList
  6549. domId={"addService4"}
  6550. fileList={this.state.replenishUrl}
  6551. ItemWidth={"96px"}
  6552. />
  6553. ) : (
  6554. <div />
  6555. )}
  6556. </div>
  6557. </FormItem>
  6558. </div>
  6559. )}
  6560. </div>
  6561. {/* 服务内容 */}
  6562. <div class="clearfix">
  6563. <FormItem
  6564. labelCol={{ span: 5 }}
  6565. wrapperCol={{ span: 19 }}
  6566. label={
  6567. <span>
  6568. <strong style={{ color: "#f00" }}>*</strong>
  6569. 服务内容
  6570. </span>
  6571. }
  6572. >
  6573. <div>
  6574. {this.state.processStatus == 0 ?
  6575. <div>
  6576. <PicturesWall
  6577. domId={"addServiceContent"}
  6578. fileList={this.getContentUrl}
  6579. pictureUrl={this.state.contentUrl}
  6580. url="/api/admin/order/uploadOrderImg"
  6581. orderNo={this.state.orderNo}
  6582. sign="content"
  6583. deleteApi="/api/admin/order/deleteOrderImg"
  6584. />
  6585. <p> <span style={{ color: "red", display: "inline-block" }}>(请将合同中的服务内容,截图上传!含服务年限,时间节点等;)</span>图片建议:要清晰。</p>
  6586. </div> :
  6587. this.state.contentUrl.length > 0 ?
  6588. <div>
  6589. <ImgList
  6590. domId={"addService13"}
  6591. fileList={this.state.contentUrl}
  6592. ItemWidth={"96px"}
  6593. />
  6594. </div> : "暂无附件!"}
  6595. </div>
  6596. </FormItem>
  6597. </div>
  6598. {/* 知识产权情况 */}
  6599. {this.state.processStatus == 0 ?
  6600. <Property
  6601. isCreat={true}
  6602. isProperty={this.state.isProperty}
  6603. setProperty={e => { this.setState({ isProperty: e, patentStatus: e == 1 && 0 }) }}
  6604. patentStatus={this.state.patentStatus}
  6605. setPatentS={e => { this.setState({ patentStatus: e }) }}
  6606. /> :
  6607. <Property
  6608. patentStatus={this.state.patentStatus}
  6609. />}
  6610. <div className="clearfix">
  6611. {this.state.processStatus == 0 ? (
  6612. <div className="clearfix">
  6613. <FormItem
  6614. labelCol={{ span: 5 }}
  6615. wrapperCol={{ span: 16 }}
  6616. label={
  6617. <span>
  6618. <strong style={{ color: "#f00" }}>*</strong>
  6619. 订单留言
  6620. </span>
  6621. }
  6622. >
  6623. <Input
  6624. ref="orderRemarksRef"
  6625. type="textarea"
  6626. placeholder="请输入订单留言"
  6627. rows={4}
  6628. value={this.state.orderRemarks}
  6629. onChange={(e) => {
  6630. this.setState({
  6631. orderRemarks: e.target.value,
  6632. });
  6633. }}
  6634. style={{ width: "95%" }}
  6635. />
  6636. <div className="mandatory">
  6637. 重要提示:请详细填写合同中包含的服务内容、服务年限、时间节点等
  6638. </div>
  6639. </FormItem>
  6640. </div>
  6641. ) : (
  6642. <FormItem
  6643. labelCol={{ span: 4 }}
  6644. wrapperCol={{ span: 16 }}
  6645. label="订单留言"
  6646. >
  6647. <p
  6648. style={{ width: 500, wordWrap: "break-word" }}
  6649. >
  6650. {this.state.orderRemarks}
  6651. </p>
  6652. </FormItem>
  6653. )}
  6654. </div>
  6655. <div className="clearfix">
  6656. <FormItem
  6657. className="half-item"
  6658. {...formItemLayout}
  6659. label="订单负责人"
  6660. >
  6661. <span>{this.state.salesmanName}</span>
  6662. </FormItem>
  6663. <FormItem
  6664. className="half-item"
  6665. {...formItemLayout}
  6666. label="订单负责人电话"
  6667. >
  6668. <span>{this.state.salesmanMobile}</span>
  6669. </FormItem>
  6670. </div>
  6671. <div className="clearfix">
  6672. <FormItem
  6673. className="half-item"
  6674. {...formItemLayout}
  6675. label="当前财务负责人"
  6676. >
  6677. <span>{this.state.nowFinance}</span>
  6678. </FormItem>
  6679. <FormItem
  6680. className="half-item"
  6681. {...formItemLayout}
  6682. label="当前财务负责人电话"
  6683. >
  6684. <span>{this.state.nowFinanceMobile}</span>
  6685. </FormItem>
  6686. </div>
  6687. <div className="clearfix">
  6688. <FormItem
  6689. className="half-item"
  6690. {...formItemLayout}
  6691. style={{ opacity: ".5" }}
  6692. label="原订单负责人"
  6693. >
  6694. <span>{this.state.oldSalesmanName}</span>
  6695. </FormItem>
  6696. <FormItem
  6697. className="half-item"
  6698. {...formItemLayout}
  6699. style={{ opacity: ".5" }}
  6700. label="原订单负责人电话"
  6701. >
  6702. <span>{this.state.oldSalesmanMobile}</span>
  6703. </FormItem>
  6704. </div>
  6705. <div className="clearfix">
  6706. <FormItem
  6707. className="half-item"
  6708. style={{ opacity: ".5" }}
  6709. {...formItemLayout}
  6710. label="实际财务操作人"
  6711. >
  6712. <span>{this.state.financeName}</span>
  6713. </FormItem>
  6714. <FormItem
  6715. className="half-item"
  6716. {...formItemLayout}
  6717. style={{ opacity: ".5" }}
  6718. label="实际财务操作人电话"
  6719. >
  6720. <span>{this.state.financeMobile}</span>
  6721. </FormItem>
  6722. </div>
  6723. {/* 新增协单人员 */}
  6724. <div>
  6725. <div style={{ marginLeft: "50px", display: 'flex' }}>
  6726. <div
  6727. style={{
  6728. minWidth: '66px',
  6729. maxWidth: '100px',
  6730. fontSize: "12px",
  6731. color: "red",
  6732. }}
  6733. >
  6734. 协单人员 :
  6735. </div>
  6736. <div>
  6737. {this.state.personnel.length > 0
  6738. ? this.state.personnel.map(function (value, key) {
  6739. return (
  6740. <Tag
  6741. style={{ marginBottom: '5px' }}
  6742. key={value.id}
  6743. closable={closable}
  6744. onClose={(e) => {
  6745. e.preventDefault();
  6746. confirm({
  6747. title: "确定删除此人员吗?",
  6748. // content: (
  6749. // <span style={{ color: "red" }}>
  6750. // 删除后会将该项目下的所有催款节点自动清除!!!
  6751. // </span>
  6752. // ),
  6753. onOk() {
  6754. $.ajax({
  6755. method: "post",
  6756. dataType: "json",
  6757. crossDomain: false,
  6758. url:
  6759. globalConfig.context +
  6760. "/api/admin/newOrder/deleteAssist",
  6761. data: {
  6762. id: value.id,
  6763. },
  6764. success: function (data) {
  6765. if (data.error.length) {
  6766. message.warning(
  6767. data.error[0].message
  6768. );
  6769. } else {
  6770. message.success("删除成功");
  6771. assistList();
  6772. }
  6773. }.bind(this),
  6774. }).always(
  6775. function () {
  6776. this.setState({
  6777. loading: false,
  6778. });
  6779. }.bind(this)
  6780. );
  6781. },
  6782. onCancel() { },
  6783. });
  6784. }}
  6785. >
  6786. {value.name}
  6787. </Tag>
  6788. );
  6789. })
  6790. : "无"}
  6791. </div>
  6792. </div>
  6793. <div
  6794. style={{
  6795. margin: "10px 0 0 50px",
  6796. display: this.state.disabledView,
  6797. }}
  6798. >
  6799. <Button
  6800. type="primary"
  6801. onClick={() => {
  6802. this.setState({
  6803. coorVisible: "block",
  6804. coor: "",
  6805. });
  6806. }}
  6807. >
  6808. 添加协单人员
  6809. </Button>
  6810. {/* 提示 */}
  6811. <div style={{ color: "red" }}>
  6812. 注:协单人员为技术人员,陪同营销人员进行订单协作等相关工作,填写后将统计至相关的奖金、提成等
  6813. </div>
  6814. </div>
  6815. {/*添加协单人员 */}
  6816. <div
  6817. style={{
  6818. margin: "10px 0 0 50px",
  6819. display: this.state.coorVisible,
  6820. }}
  6821. >
  6822. <Form
  6823. onSubmit={this.handleSubmit}
  6824. ref={this.formRef}
  6825. >
  6826. <Form.Item
  6827. {...formItemLayout}
  6828. label=""
  6829. name="coor"
  6830. hasFeedback
  6831. >
  6832. <AutoComplete
  6833. // autocomplete="off"
  6834. allowClear
  6835. dataSource={dataSourceView}
  6836. style={{ width: 200 }}
  6837. onSelect={this.onSelectView}
  6838. onSearch={this.handleSearch}
  6839. placeholder="请输入名称"
  6840. />
  6841. </Form.Item>
  6842. </Form>
  6843. <div style={{ marginLeft: "10px" }}>
  6844. <Button
  6845. type="primary"
  6846. style={{ marginRight: "54px" }}
  6847. onClick={this.submitOrder}
  6848. loading={this.state.loading}
  6849. >
  6850. 保存
  6851. </Button>
  6852. <Button
  6853. onClick={() => {
  6854. this.setState({
  6855. coorVisible: "none",
  6856. });
  6857. }}
  6858. >
  6859. 取消
  6860. </Button>
  6861. </div>
  6862. </div>
  6863. </div>
  6864. {/* 分界线 */}
  6865. <div
  6866. style={{
  6867. borderTop: "1px solid #333",
  6868. margin: "5px 0",
  6869. }}
  6870. ></div>
  6871. {/* 上门服务次数 */}
  6872. <div>
  6873. <div
  6874. style={{
  6875. display: "flex",
  6876. justifyContent: "space-between",
  6877. }}
  6878. >
  6879. <div
  6880. style={{ marginLeft: "50px", fontSize: "20px" }}
  6881. >
  6882. 上门服务次数
  6883. </div>
  6884. <div>
  6885. <Button
  6886. type="primary"
  6887. style={{ marginBottom: 15 }}
  6888. onClick={() => {
  6889. this.publicByOrder();
  6890. this.setState({
  6891. modalRecord: true,
  6892. });
  6893. }}
  6894. >
  6895. 查看上门记录
  6896. </Button>
  6897. <Button
  6898. style={{ marginLeft: 5, display: this.state.disabledView }}
  6899. type="primary"
  6900. onClick={() => {
  6901. this.setState({
  6902. modalView: true,
  6903. dateView: '',
  6904. contentView: '',
  6905. remarksView: '',
  6906. contentViewLength: 0,
  6907. contentViewLength1: 0,
  6908. });
  6909. }}
  6910. >
  6911. 添加上门次数
  6912. </Button>
  6913. </div>
  6914. </div>
  6915. {/* 上门服务表格 */}
  6916. <div
  6917. className="patent-table"
  6918. style={{ marginBottom: 10 }}
  6919. >
  6920. <Spin spinning={this.state.loading}>
  6921. <Table
  6922. columns={this.state.columnsView}
  6923. scroll={{ x: "max-content", y: 0 }}
  6924. dataSource={this.state.dataView}
  6925. pagination={false}
  6926. // onRowClick={this.tableRowClick}
  6927. bordered
  6928. size="small"
  6929. />
  6930. </Spin>
  6931. </div>
  6932. {/* 查看上门记录 */}
  6933. <Modal
  6934. footer=""
  6935. title="技术人员上门详细记录"
  6936. visible={this.state.modalRecord}
  6937. width="1200px"
  6938. onCancel={() => {
  6939. this.setState({
  6940. modalRecord: false,
  6941. });
  6942. }}
  6943. >
  6944. <Spin spinning={this.state.loading}>
  6945. <Table
  6946. columns={this.state.columnsRecord}
  6947. scroll={{ x: "max-content", y: 0 }}
  6948. dataSource={this.state.publicView}
  6949. pagination={false}
  6950. // onRowClick={this.tableRowClick}
  6951. bordered
  6952. size="small"
  6953. />
  6954. </Spin>
  6955. </Modal>
  6956. {/* 添加上门次数模态框 */}
  6957. <Modal
  6958. footer=""
  6959. title="新增上门次数"
  6960. visible={this.state.modalView}
  6961. key={this.state.viewKey}
  6962. onCancel={() => {
  6963. this.setState({
  6964. modalView: false,
  6965. viewKey: this.state.viewKey + 1,
  6966. });
  6967. }}
  6968. >
  6969. <Form
  6970. onSubmit={this.handleSubmit}
  6971. ref={this.formRef}
  6972. style={{ marginRight: "120px" }}
  6973. >
  6974. <Form.Item
  6975. {...formItemLayout}
  6976. label="上门时间"
  6977. name="date"
  6978. hasFeedback
  6979. >
  6980. <DatePicker
  6981. placeholder="预计技术员上门服务时间"
  6982. onChange={(date, dateString) => {
  6983. this.setState({
  6984. dateView: dateString,
  6985. });
  6986. }}
  6987. />
  6988. </Form.Item>
  6989. <Form.Item
  6990. {...formItemLayout}
  6991. label="服务内容"
  6992. name="remarks"
  6993. hasFeedback
  6994. style={{ position: 'relative' }}
  6995. >
  6996. <TextArea
  6997. rows={4}
  6998. placeholder="需要技术员上门服务内容"
  6999. onChange={(e) => {
  7000. this.setState({
  7001. contentView: e.target.value,
  7002. }, () => {
  7003. if (!this.state.contentView) {
  7004. this.setState({
  7005. contentViewLength: 0,
  7006. })
  7007. } else {
  7008. this.setState({
  7009. contentViewLength: this.state.contentView.length
  7010. })
  7011. }
  7012. });
  7013. }}
  7014. maxLength={500}
  7015. >
  7016. </TextArea>
  7017. <div style={{ position: 'absolute', right: '20px', bottom: '-5px', zIndex: '10' }}>{this.state.contentViewLength + '/500'}</div>
  7018. </Form.Item>
  7019. <Form.Item
  7020. {...formItemLayout}
  7021. label="备注"
  7022. name="remarks"
  7023. hasFeedback
  7024. style={{ position: 'relative' }}
  7025. >
  7026. <TextArea
  7027. rows={4}
  7028. maxLength={500}
  7029. placeholder="需要技术员注意事项"
  7030. onChange={(e) => {
  7031. this.setState({
  7032. remarksView: e.target.value,
  7033. }, () => {
  7034. if (!this.state.remarksView) {
  7035. this.setState({
  7036. contentViewLength1: 0,
  7037. })
  7038. } else {
  7039. this.setState({
  7040. contentViewLength1: this.state.remarksView.length
  7041. })
  7042. }
  7043. });
  7044. }}
  7045. />
  7046. <div style={{ position: 'absolute', right: '20px', bottom: '-5px', zIndex: '10' }}>{this.state.contentViewLength1 + '/500'}</div>
  7047. </Form.Item>
  7048. </Form>
  7049. <div
  7050. style={{
  7051. display: "flex",
  7052. justifyContent: "center",
  7053. }}
  7054. >
  7055. <Button
  7056. onClick={this.submitView}
  7057. type="primary"
  7058. loading={this.state.loading}
  7059. >
  7060. 提交
  7061. </Button>
  7062. <Button
  7063. type="dashed"
  7064. style={{ marginLeft: "15px" }}
  7065. onClick={() => {
  7066. this.setState({
  7067. modalView: false,
  7068. viewKey: this.state.viewKey + 1,
  7069. dateView: '',
  7070. contentView: '',
  7071. remarksView: '',
  7072. contentViewLength: 0,
  7073. contentViewLength1: 0,
  7074. });
  7075. }}
  7076. >
  7077. 取消
  7078. </Button>
  7079. </div>
  7080. </Modal>
  7081. </div>
  7082. <div>
  7083. <span
  7084. style={{ marginLeft: "50px", fontSize: "20px" }}
  7085. >
  7086. 项目业务
  7087. </span>
  7088. {
  7089. // 新需求 除湖南和内蒙古外 不让其他省操作
  7090. (adminData.province == "21" || adminData.province == "11") &&
  7091. <div>
  7092. {
  7093. this.state.processStatus == 0 &&
  7094. <Button
  7095. type="primary"
  7096. onClick={this.addDetailed}
  7097. style={{
  7098. float: "right",
  7099. marginRight: "50px",
  7100. marginBottom: "15px",
  7101. }}
  7102. >
  7103. 添加项目明细
  7104. </Button>
  7105. }
  7106. {
  7107. this.props.datauser.projectType == 1 && this.state.processStatus > 1 &&
  7108. <Button
  7109. type="primary"
  7110. onClick={this.addVip}
  7111. style={{
  7112. float: "right",
  7113. marginRight: "50px",
  7114. marginBottom: "15px",
  7115. }}
  7116. >
  7117. 添加会员项目
  7118. </Button>
  7119. }
  7120. {
  7121. (this.state.processStatus == 6 || this.state.processStatus == 7) &&
  7122. <Button
  7123. type="primary"
  7124. style={{
  7125. float: "right",
  7126. marginRight: "50px",
  7127. marginBottom: "15px",
  7128. }}
  7129. onClick={() => {
  7130. if (this.state.deleteSign == 2 || this.state.deleteSign == 3) {
  7131. message.warning("项目变更中,无法发起项目重启");
  7132. return
  7133. }
  7134. this.setState({
  7135. selectVisible: true,
  7136. sType: "restart",
  7137. })
  7138. }}
  7139. >
  7140. 项目重启
  7141. </Button>
  7142. }
  7143. {
  7144. (this.state.processStatus == 6 || this.state.processStatus == 7) &&
  7145. <Button
  7146. type="primary"
  7147. style={{
  7148. float: "right",
  7149. marginRight: "50px",
  7150. marginBottom: "15px",
  7151. }}
  7152. onClick={() => {
  7153. if (this.state.deleteSign == 2 || this.state.deleteSign == 3) {
  7154. message.warning("项目变更中,无法发起项目暂停");
  7155. return
  7156. }
  7157. this.setState({
  7158. selectVisible: true,
  7159. sType: "suspend",
  7160. })
  7161. }}
  7162. >
  7163. 项目暂停
  7164. </Button>
  7165. }
  7166. </div>
  7167. }
  7168. </div>
  7169. <div
  7170. className="patent-table"
  7171. style={{ marginBottom: 10 }}
  7172. >
  7173. <Spin spinning={this.state.loading}>
  7174. {
  7175. // 项目暂停&重启勾选
  7176. this.state.selectVisible &&
  7177. <SelectList
  7178. type={this.state.sType}
  7179. contractNo={this.state.contractNo}
  7180. orderNo={this.state.orderNo}
  7181. userName={this.state.userName}
  7182. list={this.state.dataSource}
  7183. visible={this.state.selectVisible}
  7184. subClose={() => {
  7185. this.loadData();
  7186. this.setState({
  7187. selectVisible: false,
  7188. })
  7189. }}
  7190. />
  7191. }
  7192. <Table
  7193. rowKey="id"
  7194. columns={this.state.columns}
  7195. dataSource={this.state.dataSource}
  7196. pagination={this.state.pagination}
  7197. expandedRowRender={expandedRowRenderVip}
  7198. rowClassName={this.addRowColor}
  7199. onRowClick={this.tableRowClick}
  7200. bordered
  7201. size="small"
  7202. />
  7203. </Spin>
  7204. </div>
  7205. <div
  7206. style={{
  7207. display: cuiDataList.length ? "block" : "none",
  7208. }}
  7209. >
  7210. <span
  7211. style={{ marginLeft: "50px", fontSize: "20px" }}
  7212. >
  7213. 旧催款节点
  7214. </span>
  7215. <Button
  7216. type="primary"
  7217. // onClick={this.addcontact}
  7218. disabled
  7219. onClick={(e) => {
  7220. cuiDataList.length
  7221. ? this.addcontact()
  7222. : this.addcontactNew();
  7223. }}
  7224. style={{
  7225. float: "right",
  7226. marginRight: "50px",
  7227. marginBottom: "15px",
  7228. display:
  7229. this.state.processStatus == 0
  7230. ? "block"
  7231. : "none",
  7232. }}
  7233. >
  7234. 添加催款节点
  7235. </Button>
  7236. </div>
  7237. <div
  7238. className="clearfix"
  7239. style={{
  7240. display: cuiDataList.length ? "block" : "none",
  7241. }}
  7242. >
  7243. <Spin spinning={this.state.loading}>
  7244. <Form layout="horizontal">
  7245. <Table
  7246. pagination={false}
  7247. columns={this.state.ContactsLists}
  7248. dataSource={this.state.contactList}
  7249. scroll={{ x: "max-content", y: 0 }}
  7250. bordered
  7251. size="small"
  7252. />
  7253. <Col
  7254. span={24}
  7255. offset={9}
  7256. style={{ marginTop: "15px" }}
  7257. ></Col>
  7258. </Form>
  7259. </Spin>
  7260. </div>
  7261. <div
  7262. style={{
  7263. display: cuiDataList.length ? "none" : "block",
  7264. }}
  7265. >
  7266. <span
  7267. style={{
  7268. marginLeft: "50px",
  7269. fontSize: "20px",
  7270. }}
  7271. >
  7272. 新催款节点
  7273. </span>
  7274. <span
  7275. style={{
  7276. display: "inline-block",
  7277. marginLeft: 10,
  7278. color: "red",
  7279. }}
  7280. >
  7281. 金额总计(万元): {this.state.totalCui}
  7282. </span>
  7283. <Button
  7284. type="primary"
  7285. disabled={this.state.addFlag ? true : false}
  7286. // onClick={this.addcontact}
  7287. onClick={(e) => {
  7288. this.setState({ addFlag: true });
  7289. this.addcontactNew();
  7290. }}
  7291. style={{
  7292. float: "right",
  7293. marginRight: "50px",
  7294. marginBottom: "15px",
  7295. display:
  7296. this.state.processStatus == 0
  7297. ? "block"
  7298. : "none",
  7299. }}
  7300. >
  7301. 添加催款节点
  7302. </Button>
  7303. </div>
  7304. <div
  7305. className="clearfix"
  7306. style={{
  7307. display: cuiDataList.length ? "none" : "block",
  7308. }}
  7309. >
  7310. <Spin spinning={this.state.loading}>
  7311. <Form layout="horizontal">
  7312. <Table
  7313. pagination={false}
  7314. columns={this.state.ContactsListsNew}
  7315. dataSource={this.state.contactListNew}
  7316. scroll={{ x: "max-content", y: 0 }}
  7317. bordered
  7318. size="small"
  7319. />
  7320. <Col
  7321. span={24}
  7322. offset={9}
  7323. style={{ marginTop: "15px" }}
  7324. ></Col>
  7325. </Form>
  7326. </Spin>
  7327. </div>
  7328. {this.state.processStatus == 0 &&
  7329. <div
  7330. className="addSave"
  7331. style={{
  7332. marginTop: "15px",
  7333. display: "flex",
  7334. justifyContent: "center",
  7335. }}
  7336. >
  7337. <Button
  7338. className="cancel"
  7339. type="primary"
  7340. onClick={this.handleCancels}
  7341. style={{ margin: "0 25px" }}
  7342. htmlType="submit"
  7343. loading={this.state.loading}
  7344. >
  7345. 签单
  7346. </Button>
  7347. <Button
  7348. className="cancel"
  7349. type="primary"
  7350. onClick={this.handleCancelq}
  7351. style={{ margin: "0 25px" }}
  7352. htmlType="submit"
  7353. loading={this.state.loading}
  7354. >
  7355. 保存
  7356. </Button>
  7357. <Popconfirm
  7358. title="请确认您是否作废此订单??"
  7359. onConfirm={(e) => {
  7360. this.examOks()
  7361. }}
  7362. okText="确认"
  7363. cancelText="取消"
  7364. >
  7365. <Button
  7366. className="cancel"
  7367. type="danger"
  7368. // onClick={this.examOks}
  7369. style={{ margin: "0 25px" }}
  7370. loading={this.state.loading}
  7371. >
  7372. 订单作废
  7373. </Button>
  7374. </Popconfirm>
  7375. <Button
  7376. className="cancel"
  7377. type="ghost"
  7378. onClick={this.handleCancelclose}
  7379. style={{ margin: "0 25px" }}
  7380. >
  7381. 取消
  7382. </Button>
  7383. </div>
  7384. }
  7385. </div>
  7386. }
  7387. </TabPane>
  7388. {
  7389. // 新需求 除湖南和内蒙古外 不让其他省操作
  7390. (adminData.province == "21" || adminData.province == "11") &&
  7391. <TabPane tab="合同变更发起" key="2">
  7392. {
  7393. this.state.activeKey == "2" &&
  7394. <div className="contractchange">
  7395. {
  7396. !(this.state.processStatus == 6 || this.state.processStatus == 7) &&
  7397. <div className="cmask">当前状态不能发起合同变更</div>
  7398. }
  7399. <div className="clearfix">
  7400. <FormItem
  7401. className="half-item"
  7402. {...formItemLayout}
  7403. label="客户名称"
  7404. >
  7405. <span>{this.state.userName}</span>
  7406. <EnterpriseNameChange
  7407. type="journal"
  7408. style={{ marginLeft: 10 }}
  7409. enterpriseId={this.state.orderUid}
  7410. />
  7411. </FormItem>
  7412. </div>
  7413. <div className="clearfix">
  7414. <FormItem
  7415. className="half-item"
  7416. {...formItemLayout}
  7417. label="合同编号"
  7418. >
  7419. <span>{this.state.contractNo}</span>
  7420. </FormItem>
  7421. </div>
  7422. <div className="clearfix">
  7423. <FormItem
  7424. className="half-item"
  7425. {...formItemLayout}
  7426. label="申请变更部门"
  7427. >
  7428. <span>{this.state.depName}</span>
  7429. </FormItem>
  7430. <FormItem
  7431. className="half-item"
  7432. {...formItemLayout}
  7433. label="申请人"
  7434. >
  7435. <span>{this.state.salesmanName}</span>
  7436. </FormItem>
  7437. </div>
  7438. <div className="clearfix">
  7439. <FormItem
  7440. labelCol={{ span: 5 }}
  7441. wrapperCol={{ span: 19 }}
  7442. label="变更类型"
  7443. >
  7444. <Select
  7445. placeholder="选择合同变更类型"
  7446. style={{ width: 200 }}
  7447. disabled={this.state.changeFlag}
  7448. value={this.state.typeChange}
  7449. onChange={(e) => {
  7450. this.setState({
  7451. typeChange: e,
  7452. changeFlag: true,
  7453. });
  7454. if (e == 1) {
  7455. this.setState({
  7456. hetongFlag: false,
  7457. listFlag: false,
  7458. listCuiFlag: false,
  7459. tuiKuanFlag: false,
  7460. displayList: false,
  7461. });
  7462. } else if (e == 2) {
  7463. this.setState({
  7464. hetongFlag: true,
  7465. listFlag: false,
  7466. listCuiFlag: false,
  7467. tuiKuanFlag: true,
  7468. displayList: false,
  7469. });
  7470. } else if (e == 3) {
  7471. this.setState({
  7472. listFlag: false,
  7473. hetongFlag: false,
  7474. listCuiFlag: false,
  7475. tuiKuanFlag: false,
  7476. displayList: true,
  7477. });
  7478. } else if (e == 4) {
  7479. this.setState({
  7480. listFlag: false,
  7481. listCuiFlag: false,
  7482. hetongFlag: false,
  7483. tuiKuanFlag: true,
  7484. displayList: false,
  7485. });
  7486. } else if (e == 5) {
  7487. this.setState({
  7488. listFlag: false,
  7489. listCuiFlag: false,
  7490. hetongFlag: true,
  7491. tuiKuanFlag: true,
  7492. displayList: false,
  7493. });
  7494. } else if (e == 6) {
  7495. this.setState({
  7496. // listFlag: true,
  7497. // listCuiFlag: true,
  7498. // hetongFlag: true,
  7499. // tuiKuanFlag: true,
  7500. // displayList: false,
  7501. listFlag: false,
  7502. listCuiFlag: false,
  7503. hetongFlag: false,
  7504. tuiKuanFlag: false,
  7505. displayList: false,
  7506. });
  7507. } else if (e == 7) {
  7508. this.setState({
  7509. listFlag: true,
  7510. listCuiFlag: true,
  7511. hetongFlag: true,
  7512. tuiKuanFlag: true,
  7513. displayList: false,
  7514. isNew: true, //上传替换合同
  7515. });
  7516. } else {
  7517. this.setState({
  7518. hetongFlag: false,
  7519. listFlag: false,
  7520. listCuiFlag: false,
  7521. tuiKuanFlag: false,
  7522. displayList: false,
  7523. });
  7524. }
  7525. }}
  7526. >
  7527. <Option value={0}>退单退款</Option>
  7528. <Option value={1}>项目及金额变更</Option>
  7529. <Option value={2}>仅项目变更</Option>
  7530. <Option value={3}>仅金额变更</Option>
  7531. <Option value={4}>重报</Option>
  7532. <Option value={5}>赠送</Option>
  7533. <Option value={6}>退单不退款</Option>
  7534. <Option value={7}>仅变更合同</Option>
  7535. <Option value={8}>框架协议(仅已签框架合同适用)</Option>
  7536. </Select>
  7537. <Button
  7538. style={{ marginLeft: 10 }}
  7539. onClick={(e) => {
  7540. this.setState({
  7541. listFlag: false,
  7542. hetongFlag: false,
  7543. listCuiFlag: false,
  7544. tuiKuanFlag: false,
  7545. displayList: false,
  7546. startRemarks: "",
  7547. remarksC: "",
  7548. voucherUrl: [],
  7549. newContractUrl: [],
  7550. isNew: false,
  7551. changeAmount: "0",
  7552. applicant: undefined,
  7553. depNameChange: undefined,
  7554. typeChange: undefined,
  7555. changeFlag: false,
  7556. });
  7557. }}
  7558. >
  7559. 重置
  7560. </Button>
  7561. {(this.state.status === 3 || this.state.status == 0) ? (
  7562. <Button
  7563. type="danger"
  7564. style={{
  7565. float: "right",
  7566. backgroundColor: "red",
  7567. color: "white",
  7568. position: "absolute",
  7569. right: 0,
  7570. height: 50,
  7571. borderRadius: 20,
  7572. zIndex: 100,
  7573. top: 0,
  7574. }}
  7575. onClick={(e) => {
  7576. e.stopPropagation();
  7577. this.showConfirmChange(this.deleteChange);
  7578. }}
  7579. >
  7580. 取消本次变更
  7581. </Button>
  7582. ) : (
  7583. ""
  7584. )}
  7585. </FormItem>
  7586. </div>
  7587. <div className="clearfix">
  7588. <FormItem
  7589. labelCol={{ span: 5 }}
  7590. wrapperCol={{ span: 19 }}
  7591. label="合同额(万元)"
  7592. >
  7593. <Input
  7594. placeholder="请输入合同额"
  7595. disabled={this.state.hetongFlag}
  7596. ref="signTotalAmount"
  7597. value={this.state.totalAmount}
  7598. onChange={(e) => {
  7599. this.setState({
  7600. totalAmount: e.target.value,
  7601. });
  7602. }}
  7603. style={{ width: "240px" }}
  7604. />
  7605. </FormItem>
  7606. <FormItem
  7607. labelCol={{ span: 5 }}
  7608. wrapperCol={{ span: 19 }}
  7609. label="首付款(万元)"
  7610. >
  7611. <Input
  7612. placeholder="请输入首付款"
  7613. disabled={this.state.hetongFlag}
  7614. ref="signTotalAmount"
  7615. value={this.state.firstAmount}
  7616. onChange={(e) => {
  7617. this.setState({
  7618. firstAmount: e.target.value,
  7619. });
  7620. }}
  7621. style={{ width: "240px" }}
  7622. />
  7623. </FormItem>
  7624. <FormItem
  7625. labelCol={{ span: 5 }}
  7626. wrapperCol={{ span: 19 }}
  7627. label="已收款(万元)"
  7628. >
  7629. <span>
  7630. {this.state.settlementAmount}
  7631. &nbsp;&nbsp;&nbsp;&nbsp;
  7632. <span style={{ color: "red" }}>
  7633. (注:已收款与现实收款不符,请与财务专员联系)
  7634. </span>
  7635. </span>
  7636. </FormItem>
  7637. <FormItem
  7638. labelCol={{ span: 5 }}
  7639. wrapperCol={{ span: 19 }}
  7640. label="申请退款(万元)"
  7641. >
  7642. <Input
  7643. placeholder="请输入申请退款"
  7644. ref="signTotalAmount"
  7645. disabled={this.state.tuiKuanFlag}
  7646. value={this.state.changeAmount}
  7647. onChange={(e) => {
  7648. this.setState({
  7649. changeAmount: e.target.value,
  7650. });
  7651. }}
  7652. style={{ width: "240px" }}
  7653. />
  7654. </FormItem>
  7655. </div>
  7656. {/* 退单退款 */}
  7657. {this.state.isCaoGao && this.state.typeChange == 0 &&
  7658. <div className="clearfix">
  7659. <div className="clearfix">
  7660. <FormItem
  7661. className="half-item"
  7662. {...formItemLayout}
  7663. label="企业总经理姓名"
  7664. >
  7665. <Input
  7666. placeholder="请输入企业总经理姓名"
  7667. value={this.state.managerContacts}
  7668. onChange={(e) => {
  7669. this.setState({
  7670. managerContacts: e.target.value,
  7671. });
  7672. }}
  7673. style={{ width: "240px" }}
  7674. />
  7675. </FormItem>
  7676. <FormItem
  7677. className="half-item"
  7678. {...formItemLayout}
  7679. label="企业总经理联系电话"
  7680. >
  7681. <Input
  7682. placeholder="请输入企业总经理联系电话"
  7683. value={this.state.managerContactMobile}
  7684. onChange={(e) => {
  7685. this.setState({
  7686. managerContactMobile: e.target.value,
  7687. });
  7688. }}
  7689. style={{ width: "240px" }}
  7690. />
  7691. </FormItem>
  7692. </div>
  7693. <div className="clearfix">
  7694. <FormItem
  7695. className="half-item"
  7696. {...formItemLayout}
  7697. label="企业联系人姓名"
  7698. >
  7699. <Input
  7700. placeholder="请输入企业联系人姓名"
  7701. value={this.state.contacts}
  7702. onChange={(e) => {
  7703. this.setState({
  7704. contacts: e.target.value,
  7705. });
  7706. }}
  7707. style={{ width: "240px" }}
  7708. />
  7709. </FormItem>
  7710. <FormItem
  7711. className="half-item"
  7712. {...formItemLayout}
  7713. label="企业联系人联系方式"
  7714. >
  7715. <Input
  7716. placeholder="请输入企业联系人联系方式"
  7717. value={this.state.contactMobile}
  7718. onChange={(e) => {
  7719. this.setState({
  7720. contactMobile: e.target.value,
  7721. });
  7722. }}
  7723. style={{ width: "240px" }}
  7724. />
  7725. </FormItem>
  7726. </div>
  7727. <div className="clearfix">
  7728. <FormItem
  7729. className="half-item"
  7730. {...formItemLayout}
  7731. label={<span style={{ color: "red" }}>注</span>}
  7732. >
  7733. <span style={{ color: "red" }}>
  7734. 请填写以上信息,公司总经理将与企业联系交流
  7735. </span>
  7736. </FormItem>
  7737. </div>
  7738. </div>
  7739. }
  7740. <div
  7741. style={{
  7742. display: this.state.isCaoGao ? "block" : "none",
  7743. }}
  7744. >
  7745. <div>
  7746. <span
  7747. style={{
  7748. marginLeft: "50px",
  7749. fontSize: "20px",
  7750. }}
  7751. >
  7752. 项目业务
  7753. </span>
  7754. <span style={{ color: "red" }}>
  7755. (注:项目删除后,此项目的全部节点、全部工时,全部被删除,请谨慎删除!)
  7756. </span>
  7757. <Button
  7758. type="primary"
  7759. onClick={this.changeAddPro}
  7760. disabled={this.state.listFlag}
  7761. style={{
  7762. float: "right",
  7763. marginRight: "50px",
  7764. marginBottom: "15px",
  7765. display: this.state.displayList
  7766. ? "none"
  7767. : "block",
  7768. }}
  7769. >
  7770. 添加项目明细
  7771. </Button>
  7772. </div>
  7773. <div
  7774. className="patent-table"
  7775. style={{ marginBottom: 10 }}
  7776. >
  7777. <Spin spinning={this.state.loading}>
  7778. <Table
  7779. columns={this.state.proColumns}
  7780. dataSource={this.state.proDataSource}
  7781. expandedRowRender={expandedRowRender}
  7782. pagination={this.state.pagination}
  7783. rowClassName={this.addRowColor}
  7784. // onRowDoubleClick={
  7785. // this.state.listFlag
  7786. // ? this.not
  7787. // : this.editPro
  7788. // }
  7789. bordered
  7790. size="small"
  7791. />
  7792. </Spin>
  7793. </div>
  7794. <div>
  7795. <span
  7796. style={{
  7797. marginLeft: "50px",
  7798. fontSize: "20px",
  7799. }}
  7800. >
  7801. 催款节点
  7802. </span>
  7803. <span style={{ color: "red" }}>
  7804. (注:节点删除后,无论节点是否触发,均会删除,请谨慎删除!双击可修改对应金额!)
  7805. </span>
  7806. <Button
  7807. type="primary"
  7808. onClick={(e) => {
  7809. this.changeAddCui();
  7810. }}
  7811. disabled={this.state.listCuiFlag}
  7812. style={{
  7813. float: "right",
  7814. marginRight: "50px",
  7815. marginBottom: "15px",
  7816. display: this.state.displayList
  7817. ? "none"
  7818. : "block",
  7819. }}
  7820. >
  7821. 添加催款节点
  7822. </Button>
  7823. </div>
  7824. <div className="clearfix">
  7825. <Spin spinning={this.state.loading}>
  7826. <Form layout="horizontal">
  7827. <Table
  7828. pagination={false}
  7829. columns={this.state.changeCuiList}
  7830. dataSource={this.state.cuiDataSource}
  7831. scroll={{ x: "max-content", y: 0 }}
  7832. onRowDoubleClick={
  7833. this.state.listCuiFlag
  7834. ? this.not
  7835. : this.editCui
  7836. }
  7837. bordered
  7838. size="small"
  7839. />
  7840. <Col
  7841. span={24}
  7842. offset={9}
  7843. style={{ marginTop: "15px" }}
  7844. ></Col>
  7845. </Form>
  7846. </Spin>
  7847. </div>
  7848. </div>
  7849. <div className="clearfix">
  7850. <FormItem
  7851. style={{ height: "auto" }}
  7852. labelCol={{ span: 5 }}
  7853. wrapperCol={{ span: 19 }}
  7854. label="变更原因"
  7855. >
  7856. <TextArea
  7857. rows={4}
  7858. placeholder="请输入变更原因"
  7859. ref="signTotalAmount"
  7860. style={{ width: "95%" }}
  7861. value={this.state.remarksC}
  7862. onChange={(e) => {
  7863. this.setState({
  7864. remarksC: e.target.value,
  7865. });
  7866. }}
  7867. />
  7868. </FormItem>
  7869. </div>
  7870. <div className="clearfix">
  7871. <FormItem
  7872. style={{ height: "auto" }}
  7873. labelCol={{ span: 5 }}
  7874. wrapperCol={{ span: 19 }}
  7875. label="备注"
  7876. >
  7877. <TextArea
  7878. rows={4}
  7879. placeholder="请输入备注"
  7880. ref="signTotalAmount"
  7881. style={{ width: "95%" }}
  7882. value={this.state.startRemarks}
  7883. onChange={(e) => {
  7884. this.setState({
  7885. startRemarks: e.target.value,
  7886. });
  7887. }}
  7888. />
  7889. </FormItem>
  7890. </div>
  7891. <div className="clearfix">
  7892. <FormItem
  7893. labelCol={{ span: 5 }}
  7894. wrapperCol={{ span: 19 }}
  7895. label="变更凭证"
  7896. >
  7897. <PicturesWall
  7898. domId={"addService5"}
  7899. fileList={this.getVoucherUrl}
  7900. pictureUrl={this.state.voucherUrl}
  7901. url="/api/admin/orderChange/uploadFile"
  7902. sign="order_change_file"
  7903. />
  7904. <p>图片建议:要清晰。</p>
  7905. </FormItem>
  7906. </div>
  7907. <div className="clearfix">
  7908. <FormItem
  7909. labelCol={{ span: 5 }}
  7910. wrapperCol={{ span: 19 }}
  7911. label="上传替换合同"
  7912. >
  7913. <Switch disabled={this.state.typeChange == 7} checked={this.state.isNew} onChange={e => { this.setState({ isNew: e }) }} />,
  7914. <p style={{ color: "red" }}>注:原上传合同为空或作废时,需上传替换合同</p>
  7915. </FormItem>
  7916. </div>
  7917. {
  7918. this.state.isNew &&
  7919. <div className="clearfix">
  7920. <FormItem
  7921. labelCol={{ span: 5 }}
  7922. wrapperCol={{ span: 19 }}
  7923. label="合同扫描件"
  7924. >
  7925. <PicturesWall
  7926. domId={"newcontract"}
  7927. fileList={this.getNewContractUrl}
  7928. pictureUrl={this.state.newContractUrl}
  7929. url="/api/admin/orderChange/uploadFile"
  7930. sign=""
  7931. />
  7932. <p>图片建议:要清晰。</p>
  7933. </FormItem>
  7934. </div>
  7935. }
  7936. <div className="clearfix">
  7937. <Button
  7938. type="primary"
  7939. style={{ float: "right", marginRight: 40 }}
  7940. loading={this.state.loading}
  7941. onClick={(e) => {
  7942. if (this.state.isCaoGao) {
  7943. this.submitChange();
  7944. } else {
  7945. this.changeApply();
  7946. }
  7947. }}
  7948. >
  7949. {/* {this.state.isCaoGao
  7950. ? "发起变更申请"
  7951. : this.state.typeChange == 0
  7952. ? "发起变更申请"
  7953. : "下一步"} */}
  7954. {this.state.isCaoGao ? "发起变更申请" : "下一步"}
  7955. </Button>
  7956. </div>
  7957. </div>
  7958. }
  7959. </TabPane>
  7960. }
  7961. {this.state.isJilu &&
  7962. <TabPane tab={"最近变更记录"} key="3">
  7963. {
  7964. this.state.activeKey == "3" &&
  7965. <div>
  7966. <div
  7967. style={{
  7968. borderRadius: "50%",
  7969. width: 300,
  7970. height: 300,
  7971. position: "absolute",
  7972. top: 230,
  7973. left: 525,
  7974. transform: "rotate(-5deg)",
  7975. zIndex: 1,
  7976. display:
  7977. this.state.detailChange.status == 4
  7978. ? "block"
  7979. : "none",
  7980. }}
  7981. >
  7982. <img src={tongguo} style={{ width: "100%" }} />
  7983. </div>
  7984. <div
  7985. style={{
  7986. borderRadius: "50%",
  7987. width: 300,
  7988. height: 300,
  7989. position: "absolute",
  7990. top: 284,
  7991. left: 586,
  7992. transform: "rotate(-5deg)",
  7993. zIndex: 1,
  7994. display:
  7995. this.state.detailChange.status == 5
  7996. ? "block"
  7997. : "none",
  7998. }}
  7999. >
  8000. <img src={quxiao} style={{ width: "63%" }} />
  8001. </div>
  8002. <div className="clearfix">
  8003. <FormItem
  8004. className="half-item"
  8005. {...formItemLayout}
  8006. label="客户名称"
  8007. >
  8008. <span>{this.state.userName}</span>
  8009. <EnterpriseNameChange
  8010. type="journal"
  8011. style={{ marginLeft: 10 }}
  8012. enterpriseId={this.state.orderUid}
  8013. />
  8014. </FormItem>
  8015. {/* */}
  8016. <FormItem
  8017. className="half-item"
  8018. {...formItemLayout}
  8019. label="合同编号"
  8020. >
  8021. <span>{this.state.contractNo}</span>
  8022. </FormItem>
  8023. </div>
  8024. <div className="clearfix">
  8025. <FormItem
  8026. className="half-item"
  8027. {...formItemLayout}
  8028. label="时间"
  8029. >
  8030. <span>
  8031. {this.state.detailChange.createTimes}
  8032. </span>
  8033. </FormItem>
  8034. <FormItem
  8035. className="half-item"
  8036. {...formItemLayout}
  8037. label="申请人"
  8038. >
  8039. <span>{this.state.salesmanName}</span>
  8040. </FormItem>
  8041. </div>
  8042. <div className="clearfix">
  8043. <FormItem
  8044. className="half-item"
  8045. {...formItemLayout}
  8046. label="当前进度"
  8047. >
  8048. <span>
  8049. {/*当前是进度角色是咨询师以及咨询师经理时使用shenhePeo函数,其他流程正常显示*/}
  8050. {this.state.detailChange.processState === 3 ||
  8051. this.state.detailChange.processState === 4
  8052. ? shenghePeo(this.state.detailChange.examineName, this.state.detailChange.processState)
  8053. : getProcessStatusNew(
  8054. this.state.detailChange.examineName,
  8055. this.state.detailChange.processState,
  8056. this.state.detailChange.status
  8057. )}
  8058. </span>
  8059. <FlowChart id={this.state.detailChange.id} />
  8060. </FormItem>
  8061. {/* <FormItem
  8062. className="half-item"
  8063. {...formItemLayout}
  8064. label="申请变更部门"
  8065. >
  8066. <span>{this.state.depName}</span>
  8067. </FormItem> */}
  8068. <FormItem
  8069. {...formItemLayout}
  8070. className="half-item"
  8071. label="变更类型"
  8072. >
  8073. <span>
  8074. {getChangeType(
  8075. this.state.detailChange.typeChange
  8076. )}
  8077. </span>
  8078. </FormItem>
  8079. </div>
  8080. {/* <div className="clearfix">
  8081. <FormItem
  8082. labelCol={{ span: 4 }}
  8083. wrapperCol={{ span: 18 }}
  8084. label="变更类型"
  8085. >
  8086. <span>
  8087. {getChangeType(
  8088. this.state.detailChange.typeChange
  8089. )}
  8090. </span>
  8091. </FormItem>
  8092. </div> */}
  8093. {this.state.detailChange.typeChange == 0 &&
  8094. <div className="clearfix">
  8095. <FormItem
  8096. {...formItemLayout}
  8097. className="half-item"
  8098. label="企业总经理姓名"
  8099. >
  8100. <span>
  8101. {this.state.detailChange.managerContacts}
  8102. </span>
  8103. </FormItem>
  8104. <FormItem
  8105. {...formItemLayout}
  8106. className="half-item"
  8107. label="企业总经理联系电话"
  8108. >
  8109. <span>
  8110. {this.state.detailChange.managerContactMobile}
  8111. </span>
  8112. </FormItem>
  8113. </div>
  8114. }
  8115. {this.state.detailChange.typeChange == 0 &&
  8116. <div className="clearfix">
  8117. <FormItem
  8118. {...formItemLayout}
  8119. className="half-item"
  8120. label="企业联系人姓名"
  8121. >
  8122. <span>
  8123. {this.state.detailChange.contacts}
  8124. </span>
  8125. </FormItem>
  8126. <FormItem
  8127. {...formItemLayout}
  8128. className="half-item"
  8129. label="企业联系人联系方式"
  8130. >
  8131. <span>
  8132. {this.state.detailChange.contactMobile}
  8133. </span>
  8134. </FormItem>
  8135. </div>
  8136. }
  8137. <div className="clearfix">
  8138. <FormItem
  8139. {...formItemLayout}
  8140. className="half-item"
  8141. label="合同额(万元)"
  8142. >
  8143. <span>
  8144. {this.state.detailChange.totalAmount}
  8145. </span>
  8146. </FormItem>
  8147. <FormItem
  8148. {...formItemLayout}
  8149. className="half-item"
  8150. label="已收款(万元)"
  8151. >
  8152. <span>
  8153. {this.state.detailChange.settlementAmount}
  8154. </span>
  8155. </FormItem>
  8156. </div>
  8157. <div className="clearfix">
  8158. <FormItem
  8159. {...formItemLayout}
  8160. className="half-item"
  8161. label="欠款(万元)"
  8162. >
  8163. <span>{this.state.detailChange.arrears}</span>
  8164. </FormItem>
  8165. <FormItem
  8166. {...formItemLayout}
  8167. className="half-item"
  8168. label="申请退款(万元)"
  8169. >
  8170. <span>
  8171. {this.state.detailChange.changeAmount}
  8172. </span>
  8173. </FormItem>
  8174. </div>
  8175. <div className="clearfix">
  8176. <FormItem
  8177. style={{ height: "auto" }}
  8178. labelCol={{ span: 5 }}
  8179. wrapperCol={{ span: 19 }}
  8180. label="首付款(万元)"
  8181. >
  8182. <span>{this.state.detailChange.firstAmount}</span>
  8183. </FormItem>
  8184. </div>
  8185. <div className="clearfix">
  8186. <FormItem
  8187. style={{ height: "auto" }}
  8188. labelCol={{ span: 5 }}
  8189. wrapperCol={{ span: 19 }}
  8190. label="变更原因"
  8191. >
  8192. <span>{this.state.detailChange.remarksC}</span>
  8193. </FormItem>
  8194. </div>
  8195. <div className="clearfix">
  8196. <FormItem
  8197. style={{ height: "auto" }}
  8198. labelCol={{ span: 5 }}
  8199. wrapperCol={{ span: 19 }}
  8200. label="备注"
  8201. >
  8202. <span>
  8203. {this.state.detailChange.startRemarks}
  8204. </span>
  8205. </FormItem>
  8206. </div>
  8207. {/* ---- */}
  8208. <div className="clearfix">
  8209. <FormItem
  8210. labelCol={{ span: 5 }}
  8211. wrapperCol={{ span: 19 }}
  8212. label="变更凭证"
  8213. >
  8214. <div>
  8215. <div
  8216. style={{
  8217. paddingTop: "10px",
  8218. }}
  8219. >
  8220. {this.state.detailChange &&
  8221. this.state.detailChange.voucherUrl &&
  8222. this.state.activeKey === "3" &&
  8223. this.state.visible ? (
  8224. <ImgList
  8225. fileList={
  8226. this.state.detailChange.voucherUrl
  8227. }
  8228. ItemWidth={"96px"}
  8229. />
  8230. ) : (
  8231. <div />
  8232. )}
  8233. </div>
  8234. {this.state.status === 3 ? (
  8235. <Button
  8236. type="danger"
  8237. style={{
  8238. float: "right",
  8239. backgroundColor: "red",
  8240. color: "white",
  8241. position: "absolute",
  8242. right: 0,
  8243. height: 50,
  8244. borderRadius: 20,
  8245. zIndex: 100,
  8246. top: 0,
  8247. }}
  8248. onClick={(e) => {
  8249. e.stopPropagation();
  8250. this.showConfirmChange(
  8251. this.deleteChange
  8252. );
  8253. }}
  8254. >
  8255. 取消本次变更
  8256. </Button>
  8257. ) : (
  8258. ""
  8259. )}
  8260. </div>
  8261. </FormItem>
  8262. </div>
  8263. {
  8264. this.state.detailChange.contractPictureUrl.length != 0 &&
  8265. <div className="clearfix">
  8266. <FormItem
  8267. labelCol={{ span: 5 }}
  8268. wrapperCol={{ span: 19 }}
  8269. label="最新合同"
  8270. >
  8271. <div style={{ paddingTop: 10 }}>
  8272. <ImgList
  8273. fileList={
  8274. this.state.detailChange.contractPictureUrl
  8275. }
  8276. ItemWidth={"96px"}
  8277. />
  8278. </div>
  8279. </FormItem>
  8280. </div>
  8281. }
  8282. <ul
  8283. style={{
  8284. width: "868px",
  8285. overflow: "hidden",
  8286. paddingLeft: "90px",
  8287. paddingTop: "10px",
  8288. position: "relative",
  8289. bottom: "20px",
  8290. fontSize: "12px",
  8291. color: "rgba(0, 0, 0, 0.65)",
  8292. }}
  8293. >
  8294. {/* <span>操作人:</span> */}
  8295. {this.state.logData.map((item, index) => {
  8296. if (item.status == 0) {
  8297. item.status = "发起";
  8298. } else if (item.status == 1) {
  8299. item.status = "审核中";
  8300. } else if (item.status == 2) {
  8301. item.status = "通过";
  8302. } else if (item.status == 3) {
  8303. item.status = "驳回";
  8304. } else if (item.status == 4) {
  8305. item.status = "完成";
  8306. } else if (item.status == 5) {
  8307. item.status = "撤销";
  8308. }
  8309. return (
  8310. <li
  8311. key={index}
  8312. style={{
  8313. width: "100%",
  8314. height: "auto",
  8315. wordBreak: "break-all",
  8316. marginBottom: "10px",
  8317. }}
  8318. >
  8319. {item.aname + ":" + "【" + item.status + "】" + item.remarks + "(" + item.createTimes + ")"}
  8320. </li>
  8321. );
  8322. })}
  8323. </ul>
  8324. {/* 动态展示项目以及催款节点 */}
  8325. <div>
  8326. <div>
  8327. <span
  8328. style={{
  8329. marginLeft: "50px",
  8330. fontSize: "20px",
  8331. }}
  8332. >
  8333. 项目业务
  8334. </span>
  8335. </div>
  8336. <div
  8337. className="patent-table"
  8338. style={{ marginBottom: 10 }}
  8339. >
  8340. <Spin spinning={this.state.loading}>
  8341. <Table
  8342. columns={this.state.detailColumns}
  8343. dataSource={this.state.proDataSource}
  8344. expandedRowRender={expandedRowRenderDetail}
  8345. pagination={this.state.pagination}
  8346. // onRowClick={this.tableRowClick}
  8347. onRowClick={(record) => {
  8348. this.setState({
  8349. dataInfor: record,
  8350. infoVisible: true
  8351. })
  8352. }}
  8353. rowClassName={this.addRowColor}
  8354. bordered
  8355. size="small"
  8356. />
  8357. </Spin>
  8358. </div>
  8359. <div>
  8360. <span
  8361. style={{
  8362. marginLeft: "50px",
  8363. fontSize: "20px",
  8364. }}
  8365. >
  8366. 催款节点
  8367. </span>
  8368. </div>
  8369. <div className="clearfix">
  8370. <Spin spinning={this.state.loading}>
  8371. <Form layout="horizontal">
  8372. <Table
  8373. pagination={false}
  8374. columns={this.state.detailContactsLists}
  8375. dataSource={this.state.cuiDataSource}
  8376. scroll={{ x: "max-content", y: 0 }}
  8377. bordered
  8378. size="small"
  8379. />
  8380. <Col
  8381. span={24}
  8382. offset={9}
  8383. style={{ marginTop: "15px" }}
  8384. ></Col>
  8385. </Form>
  8386. </Spin>
  8387. </div>
  8388. </div>
  8389. </div>
  8390. }
  8391. </TabPane>
  8392. }
  8393. </Tabs>
  8394. }
  8395. </div>
  8396. </Spin>
  8397. </Form>
  8398. </Modal>
  8399. {
  8400. // 添加变更项目
  8401. this.state.changeVisible &&
  8402. <NewAddProject
  8403. type="change"
  8404. children="list"
  8405. typeChange={this.state.typeChange}
  8406. cid={this.state.changeId}
  8407. readOnly={false}
  8408. orderNo={this.state.orderNo}
  8409. visible={this.state.changeVisible}
  8410. newData={this.state.newData}
  8411. onCancel={() => [this.nextCancel("change")]}
  8412. />
  8413. }
  8414. {
  8415. // 编辑变更项目
  8416. this.state.editProVisible &&
  8417. <NewEditProject
  8418. type="change"
  8419. children="list"
  8420. typeChange={this.state.typeChange}
  8421. cid={this.state.changeId}
  8422. readOnly={false}
  8423. orderNo={this.props.datauser.orderNo}
  8424. visible={this.state.editProVisible}
  8425. dataInfor={this.state.dataInfor}
  8426. newData={this.state.newData}
  8427. onCancel={() => [this.nextCancel("change")]}
  8428. />
  8429. }
  8430. {
  8431. this.state.lookVisible ? (
  8432. <Modal
  8433. maskClosable={false}
  8434. visible={this.state.lookVisible}
  8435. onOk={this.noCancel}
  8436. onCancel={this.noCancel}
  8437. width="800px"
  8438. title={"退单申请"}
  8439. footer=""
  8440. className="admin-desc-content"
  8441. >
  8442. <Form layout="horizontal">
  8443. <Spin spinning={this.state.loading}>
  8444. <div className="clearfix">
  8445. <FormItem
  8446. labelCol={{ span: 4 }}
  8447. wrapperCol={{ span: 16 }}
  8448. label="终止合同"
  8449. >
  8450. <Picture
  8451. domId={"addService6"}
  8452. fileList={(e) => {
  8453. this.setState({ contractUrl: e });
  8454. }}
  8455. pictureUrl={this.state.contractUrl}
  8456. visible={this.props.visible}
  8457. data={{
  8458. sign: "order_refund_file",
  8459. url: "/api/admin/newOrder/uploadRefundOrderFile",
  8460. number: 8,
  8461. }}
  8462. />
  8463. </FormItem>
  8464. </div>
  8465. <div className="clearfix">
  8466. <FormItem
  8467. labelCol={{ span: 4 }}
  8468. wrapperCol={{ span: 16 }}
  8469. label="退单申请表"
  8470. >
  8471. <Picture
  8472. domId={"addService7"}
  8473. fileList={(e) => {
  8474. this.setState({ applicationUrl: e });
  8475. }}
  8476. pictureUrl={this.state.applicationUrl}
  8477. visible={this.props.visible}
  8478. data={{
  8479. sign: "order_refund_file",
  8480. url: "/api/admin/newOrder/uploadRefundOrderFile",
  8481. number: 8,
  8482. }}
  8483. />
  8484. </FormItem>
  8485. </div>
  8486. <div className="clearfix">
  8487. <FormItem
  8488. labelCol={{ span: 4 }}
  8489. wrapperCol={{ span: 16 }}
  8490. label="退单理由"
  8491. >
  8492. <Input
  8493. type="textarea"
  8494. placeholder="请输入退单理由"
  8495. rows={4}
  8496. value={this.state.reason}
  8497. onChange={(e) => {
  8498. this.setState({ reason: e.target.value });
  8499. }}
  8500. />
  8501. </FormItem>
  8502. </div>
  8503. <div className="clearfix">
  8504. <Button
  8505. className="cancel"
  8506. type="primary"
  8507. onClick={this.tuidanOk}
  8508. style={{ marginLeft: "50px" }}
  8509. htmlType="submit"
  8510. >
  8511. 确定退单
  8512. </Button>
  8513. <Button
  8514. className="cancel"
  8515. type="ghost"
  8516. onClick={this.noCancel}
  8517. style={{ marginLeft: "50px" }}
  8518. >
  8519. 取消
  8520. </Button>
  8521. </div>
  8522. </Spin>
  8523. </Form>
  8524. </Modal>
  8525. ) : (
  8526. <div />
  8527. )
  8528. }
  8529. <Modal
  8530. maskClosable={false}
  8531. title={
  8532. isNaN(parseFloat(this.state.appropriationRatio))
  8533. ? "修改催款节点金额"
  8534. : "修改催款节点比例"
  8535. }
  8536. visible={this.state.editCuiVisible}
  8537. onOk={() => {
  8538. this.submitEditCui(
  8539. isNaN(parseFloat(this.state.appropriationRatio)) ? 0 : 1
  8540. );
  8541. }}
  8542. okText={"保存"}
  8543. width={300}
  8544. onCancel={(e) => {
  8545. this.setState({
  8546. editCuiVisible: false,
  8547. appropriationRatio: "",
  8548. });
  8549. }}
  8550. >
  8551. <div className="clearfix">
  8552. <FormItem
  8553. labelCol={{ span: 6 }}
  8554. wrapperCol={{ span: 14 }}
  8555. label={
  8556. isNaN(parseFloat(this.state.appropriationRatio))
  8557. ? "催款金额"
  8558. : "催款比例"
  8559. }
  8560. >
  8561. <Input
  8562. type="number"
  8563. placeholder={
  8564. isNaN(parseFloat(this.state.appropriationRatio))
  8565. ? "请输入金额"
  8566. : "请输入比例"
  8567. }
  8568. rows={4}
  8569. value={this.state.editCuiMoney}
  8570. onChange={(e) => {
  8571. this.setState({ editCuiMoney: e.target.value });
  8572. }}
  8573. />
  8574. </FormItem>
  8575. </div>
  8576. </Modal>
  8577. <OrderRiZi
  8578. dataSourcerizhi={this.state.dataSourcerizhi}
  8579. closeOrderLog={this.closeOrderLog}
  8580. visible={this.state.rizhivisible}
  8581. loading={this.state.loading}
  8582. />
  8583. {
  8584. // 添加项目
  8585. this.state.projectOperationVisible &&
  8586. <NewAddProject
  8587. readOnly={
  8588. this.state.dataInfor &&
  8589. Object.keys(this.state.dataInfor).length > 0 &&
  8590. this.state.processStatus !== 0
  8591. }
  8592. orderNo={this.props.datauser.orderNo}
  8593. visible={this.state.projectOperationVisible}
  8594. newData={this.state.newData}
  8595. onCancel={this.nextCancel}
  8596. />
  8597. }
  8598. {
  8599. // 编辑项目
  8600. this.state.editProjectOperationVisible &&
  8601. <NewEditProject
  8602. readOnly={
  8603. this.state.dataInfor &&
  8604. Object.keys(this.state.dataInfor).length > 0 &&
  8605. this.state.processStatus !== 0
  8606. }
  8607. orderNo={this.props.datauser.orderNo}
  8608. visible={this.state.editProjectOperationVisible}
  8609. dataInfor={this.state.dataInfor}
  8610. newData={this.state.newData}
  8611. onCancel={this.nextCancel}
  8612. />
  8613. }
  8614. {
  8615. // 会员项目添加
  8616. this.state.vipVisible &&
  8617. <NewAddProject
  8618. type="vipAdd"
  8619. readOnly={
  8620. this.state.dataInfor &&
  8621. Object.keys(this.state.dataInfor).length > 0 &&
  8622. this.state.processStatus !== 0
  8623. }
  8624. orderNo={this.props.datauser.orderNo}
  8625. visible={this.state.vipVisible}
  8626. newData={this.state.newData}
  8627. onCancel={this.nextCancel}
  8628. />
  8629. // <ProjectOperationVip
  8630. // readOnly={
  8631. // this.state.dataInfor &&
  8632. // Object.keys(this.state.dataInfor).length > 0 &&
  8633. // this.state.processStatus !== 0
  8634. // }
  8635. // orderNo={this.props.datauser.orderNo}
  8636. // visible={this.state.vipVisible}
  8637. // dataInfor={this.state.dataInfor}
  8638. // newData={this.state.newData}
  8639. // onCancel={this.nextCancel}
  8640. // />
  8641. }
  8642. {
  8643. // 变更记录详情
  8644. this.state.infoVisible &&
  8645. <NewEditProject
  8646. children="list"
  8647. type="change"
  8648. readOnly={
  8649. this.state.dataInfor &&
  8650. Object.keys(this.state.dataInfor).length > 0 &&
  8651. this.state.processStatus !== 0
  8652. }
  8653. visible={this.state.infoVisible}
  8654. dataInfor={this.state.dataInfor}
  8655. onCancel={() => { this.setState({ infoVisible: false }) }}
  8656. />
  8657. }
  8658. </div >
  8659. );
  8660. },
  8661. })
  8662. );
  8663. export default Form.create()(NewService);