addService.jsx 356 KB

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