addService.jsx 296 KB

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