addService.jsx 366 KB

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