addService.jsx 368 KB

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