app-service.js 1.2 MB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700267012670226703267042670526706267072670826709267102671126712267132671426715267162671726718267192672026721267222672326724267252672626727267282672926730267312673226733267342673526736267372673826739267402674126742267432674426745267462674726748267492675026751267522675326754267552675626757267582675926760267612676226763267642676526766267672676826769267702677126772267732677426775267762677726778267792678026781267822678326784267852678626787267882678926790267912679226793267942679526796267972679826799268002680126802268032680426805268062680726808268092681026811268122681326814268152681626817268182681926820268212682226823268242682526826268272682826829268302683126832268332683426835268362683726838268392684026841268422684326844268452684626847268482684926850268512685226853268542685526856268572685826859268602686126862268632686426865268662686726868268692687026871268722687326874268752687626877268782687926880268812688226883268842688526886268872688826889268902689126892268932689426895268962689726898268992690026901269022690326904269052690626907269082690926910269112691226913269142691526916269172691826919269202692126922269232692426925269262692726928269292693026931269322693326934269352693626937269382693926940269412694226943269442694526946269472694826949269502695126952269532695426955269562695726958269592696026961269622696326964269652696626967269682696926970269712697226973269742697526976269772697826979269802698126982269832698426985269862698726988269892699026991269922699326994269952699626997269982699927000270012700227003270042700527006270072700827009270102701127012270132701427015270162701727018270192702027021270222702327024270252702627027270282702927030270312703227033270342703527036270372703827039270402704127042270432704427045270462704727048270492705027051270522705327054270552705627057270582705927060270612706227063270642706527066270672706827069270702707127072270732707427075270762707727078270792708027081270822708327084270852708627087270882708927090270912709227093270942709527096270972709827099271002710127102271032710427105271062710727108271092711027111271122711327114271152711627117271182711927120271212712227123271242712527126271272712827129271302713127132271332713427135271362713727138271392714027141271422714327144271452714627147271482714927150271512715227153271542715527156271572715827159271602716127162271632716427165271662716727168271692717027171271722717327174271752717627177271782717927180271812718227183271842718527186271872718827189271902719127192271932719427195271962719727198271992720027201272022720327204272052720627207272082720927210272112721227213272142721527216272172721827219272202722127222272232722427225272262722727228272292723027231272322723327234272352723627237272382723927240272412724227243272442724527246272472724827249272502725127252272532725427255272562725727258272592726027261272622726327264272652726627267272682726927270272712727227273272742727527276272772727827279272802728127282272832728427285272862728727288272892729027291272922729327294272952729627297272982729927300273012730227303273042730527306273072730827309273102731127312273132731427315273162731727318273192732027321273222732327324273252732627327273282732927330273312733227333273342733527336273372733827339273402734127342273432734427345273462734727348273492735027351273522735327354273552735627357273582735927360273612736227363273642736527366273672736827369273702737127372273732737427375273762737727378273792738027381273822738327384273852738627387273882738927390273912739227393273942739527396273972739827399274002740127402274032740427405274062740727408274092741027411274122741327414274152741627417274182741927420274212742227423274242742527426274272742827429274302743127432274332743427435274362743727438274392744027441274422744327444274452744627447274482744927450274512745227453274542745527456274572745827459274602746127462274632746427465274662746727468274692747027471274722747327474274752747627477274782747927480274812748227483274842748527486274872748827489274902749127492274932749427495274962749727498274992750027501275022750327504275052750627507275082750927510275112751227513275142751527516275172751827519275202752127522275232752427525275262752727528275292753027531275322753327534275352753627537275382753927540275412754227543275442754527546275472754827549275502755127552275532755427555275562755727558275592756027561275622756327564275652756627567275682756927570275712757227573275742757527576275772757827579275802758127582275832758427585275862758727588275892759027591275922759327594275952759627597275982759927600276012760227603276042760527606276072760827609276102761127612276132761427615276162761727618276192762027621276222762327624276252762627627276282762927630276312763227633276342763527636276372763827639276402764127642276432764427645276462764727648276492765027651276522765327654276552765627657276582765927660276612766227663276642766527666276672766827669276702767127672276732767427675276762767727678276792768027681276822768327684276852768627687276882768927690276912769227693276942769527696276972769827699277002770127702277032770427705277062770727708277092771027711277122771327714277152771627717277182771927720277212772227723277242772527726277272772827729277302773127732277332773427735277362773727738277392774027741277422774327744277452774627747277482774927750277512775227753277542775527756277572775827759277602776127762277632776427765277662776727768277692777027771277722777327774277752777627777277782777927780277812778227783277842778527786277872778827789277902779127792277932779427795277962779727798277992780027801278022780327804278052780627807278082780927810278112781227813278142781527816278172781827819278202782127822278232782427825278262782727828278292783027831278322783327834278352783627837278382783927840278412784227843278442784527846278472784827849278502785127852278532785427855278562785727858278592786027861278622786327864278652786627867278682786927870278712787227873278742787527876278772787827879278802788127882278832788427885278862788727888278892789027891278922789327894278952789627897278982789927900279012790227903279042790527906279072790827909279102791127912279132791427915279162791727918279192792027921279222792327924279252792627927279282792927930279312793227933279342793527936279372793827939279402794127942279432794427945279462794727948279492795027951279522795327954279552795627957279582795927960279612796227963279642796527966279672796827969279702797127972279732797427975279762797727978279792798027981279822798327984279852798627987279882798927990279912799227993279942799527996279972799827999280002800128002280032800428005280062800728008280092801028011280122801328014280152801628017280182801928020280212802228023280242802528026280272802828029280302803128032280332803428035280362803728038280392804028041280422804328044280452804628047280482804928050280512805228053280542805528056280572805828059280602806128062280632806428065280662806728068280692807028071280722807328074280752807628077280782807928080280812808228083280842808528086280872808828089280902809128092280932809428095280962809728098280992810028101281022810328104281052810628107281082810928110281112811228113281142811528116281172811828119281202812128122281232812428125281262812728128281292813028131281322813328134281352813628137281382813928140281412814228143281442814528146281472814828149281502815128152281532815428155281562815728158281592816028161281622816328164281652816628167281682816928170281712817228173281742817528176281772817828179281802818128182281832818428185281862818728188281892819028191281922819328194281952819628197281982819928200282012820228203282042820528206282072820828209282102821128212282132821428215282162821728218282192822028221282222822328224282252822628227282282822928230282312823228233282342823528236282372823828239282402824128242282432824428245282462824728248282492825028251282522825328254282552825628257282582825928260282612826228263282642826528266282672826828269282702827128272282732827428275282762827728278282792828028281282822828328284282852828628287282882828928290282912829228293282942829528296282972829828299283002830128302283032830428305283062830728308283092831028311283122831328314283152831628317283182831928320283212832228323283242832528326283272832828329283302833128332283332833428335283362833728338283392834028341283422834328344283452834628347283482834928350283512835228353283542835528356283572835828359283602836128362283632836428365283662836728368283692837028371283722837328374283752837628377283782837928380283812838228383283842838528386283872838828389283902839128392283932839428395283962839728398283992840028401284022840328404284052840628407284082840928410284112841228413284142841528416284172841828419284202842128422284232842428425284262842728428284292843028431284322843328434284352843628437284382843928440284412844228443284442844528446284472844828449284502845128452284532845428455284562845728458284592846028461284622846328464284652846628467284682846928470284712847228473284742847528476284772847828479284802848128482284832848428485284862848728488284892849028491284922849328494284952849628497284982849928500285012850228503285042850528506285072850828509285102851128512285132851428515285162851728518285192852028521285222852328524285252852628527285282852928530285312853228533285342853528536285372853828539285402854128542285432854428545285462854728548285492855028551285522855328554285552855628557285582855928560285612856228563285642856528566285672856828569285702857128572285732857428575285762857728578285792858028581285822858328584285852858628587285882858928590285912859228593285942859528596285972859828599286002860128602286032860428605286062860728608286092861028611286122861328614286152861628617286182861928620286212862228623286242862528626286272862828629286302863128632286332863428635286362863728638286392864028641286422864328644286452864628647286482864928650286512865228653286542865528656286572865828659286602866128662286632866428665286662866728668286692867028671286722867328674286752867628677286782867928680286812868228683286842868528686286872868828689286902869128692286932869428695286962869728698286992870028701287022870328704287052870628707287082870928710287112871228713287142871528716287172871828719287202872128722287232872428725287262872728728287292873028731287322873328734287352873628737287382873928740287412874228743287442874528746287472874828749287502875128752287532875428755287562875728758287592876028761287622876328764287652876628767287682876928770287712877228773287742877528776287772877828779287802878128782287832878428785287862878728788287892879028791287922879328794287952879628797287982879928800288012880228803288042880528806288072880828809288102881128812288132881428815288162881728818288192882028821288222882328824288252882628827288282882928830288312883228833288342883528836288372883828839288402884128842288432884428845288462884728848288492885028851288522885328854288552885628857288582885928860288612886228863288642886528866288672886828869288702887128872288732887428875288762887728878288792888028881288822888328884288852888628887288882888928890288912889228893288942889528896288972889828899289002890128902289032890428905289062890728908289092891028911289122891328914289152891628917289182891928920289212892228923289242892528926289272892828929289302893128932289332893428935289362893728938289392894028941289422894328944289452894628947289482894928950289512895228953289542895528956289572895828959289602896128962289632896428965289662896728968289692897028971289722897328974289752897628977289782897928980289812898228983289842898528986289872898828989289902899128992289932899428995289962899728998289992900029001290022900329004290052900629007290082900929010290112901229013290142901529016290172901829019290202902129022290232902429025290262902729028290292903029031290322903329034290352903629037290382903929040290412904229043290442904529046290472904829049290502905129052290532905429055290562905729058290592906029061290622906329064290652906629067290682906929070290712907229073290742907529076290772907829079290802908129082290832908429085290862908729088290892909029091290922909329094290952909629097290982909929100291012910229103291042910529106291072910829109291102911129112291132911429115291162911729118291192912029121291222912329124291252912629127291282912929130291312913229133291342913529136291372913829139291402914129142291432914429145291462914729148291492915029151291522915329154291552915629157291582915929160291612916229163291642916529166291672916829169291702917129172291732917429175291762917729178291792918029181291822918329184291852918629187291882918929190291912919229193291942919529196291972919829199292002920129202292032920429205292062920729208292092921029211292122921329214292152921629217292182921929220292212922229223292242922529226292272922829229292302923129232292332923429235292362923729238292392924029241292422924329244292452924629247292482924929250292512925229253292542925529256292572925829259292602926129262292632926429265292662926729268292692927029271292722927329274292752927629277292782927929280292812928229283292842928529286292872928829289292902929129292292932929429295292962929729298292992930029301293022930329304293052930629307293082930929310293112931229313293142931529316293172931829319293202932129322293232932429325293262932729328293292933029331293322933329334293352933629337293382933929340293412934229343293442934529346293472934829349293502935129352293532935429355293562935729358293592936029361293622936329364293652936629367293682936929370293712937229373293742937529376293772937829379293802938129382293832938429385293862938729388293892939029391293922939329394293952939629397293982939929400294012940229403294042940529406294072940829409294102941129412294132941429415294162941729418294192942029421294222942329424294252942629427294282942929430294312943229433294342943529436294372943829439294402944129442294432944429445294462944729448294492945029451294522945329454294552945629457294582945929460294612946229463294642946529466294672946829469294702947129472294732947429475294762947729478294792948029481294822948329484294852948629487294882948929490294912949229493294942949529496294972949829499295002950129502295032950429505295062950729508295092951029511295122951329514295152951629517295182951929520295212952229523295242952529526295272952829529295302953129532295332953429535295362953729538295392954029541295422954329544295452954629547295482954929550295512955229553295542955529556295572955829559295602956129562295632956429565295662956729568295692957029571295722957329574295752957629577295782957929580295812958229583295842958529586295872958829589295902959129592295932959429595295962959729598295992960029601296022960329604296052960629607296082960929610296112961229613296142961529616296172961829619296202962129622296232962429625296262962729628296292963029631296322963329634296352963629637296382963929640296412964229643296442964529646296472964829649296502965129652296532965429655296562965729658296592966029661296622966329664296652966629667296682966929670296712967229673296742967529676296772967829679296802968129682296832968429685296862968729688296892969029691296922969329694296952969629697296982969929700297012970229703297042970529706297072970829709297102971129712297132971429715297162971729718297192972029721297222972329724297252972629727297282972929730297312973229733297342973529736297372973829739297402974129742297432974429745297462974729748297492975029751297522975329754297552975629757297582975929760297612976229763297642976529766297672976829769297702977129772297732977429775297762977729778297792978029781297822978329784297852978629787297882978929790297912979229793297942979529796297972979829799298002980129802298032980429805298062980729808298092981029811298122981329814298152981629817298182981929820298212982229823298242982529826298272982829829298302983129832298332983429835298362983729838298392984029841298422984329844298452984629847298482984929850298512985229853298542985529856298572985829859298602986129862298632986429865298662986729868298692987029871298722987329874298752987629877298782987929880298812988229883298842988529886298872988829889298902989129892298932989429895298962989729898298992990029901299022990329904299052990629907299082990929910299112991229913299142991529916299172991829919299202992129922299232992429925299262992729928299292993029931299322993329934299352993629937299382993929940299412994229943299442994529946299472994829949299502995129952299532995429955299562995729958299592996029961299622996329964299652996629967299682996929970299712997229973299742997529976299772997829979299802998129982299832998429985299862998729988299892999029991299922999329994299952999629997299982999930000300013000230003300043000530006300073000830009300103001130012300133001430015300163001730018300193002030021300223002330024300253002630027300283002930030300313003230033300343003530036300373003830039300403004130042300433004430045300463004730048300493005030051300523005330054300553005630057300583005930060300613006230063300643006530066300673006830069300703007130072300733007430075300763007730078300793008030081300823008330084300853008630087300883008930090300913009230093300943009530096300973009830099301003010130102301033010430105301063010730108301093011030111301123011330114301153011630117301183011930120301213012230123301243012530126301273012830129301303013130132301333013430135301363013730138301393014030141301423014330144301453014630147301483014930150301513015230153301543015530156301573015830159301603016130162301633016430165301663016730168301693017030171301723017330174301753017630177301783017930180301813018230183301843018530186301873018830189301903019130192301933019430195301963019730198301993020030201302023020330204302053020630207302083020930210302113021230213302143021530216302173021830219302203022130222302233022430225302263022730228302293023030231302323023330234302353023630237302383023930240302413024230243302443024530246302473024830249302503025130252302533025430255302563025730258302593026030261302623026330264302653026630267302683026930270302713027230273302743027530276302773027830279302803028130282302833028430285302863028730288302893029030291302923029330294302953029630297302983029930300303013030230303303043030530306303073030830309303103031130312303133031430315303163031730318303193032030321303223032330324303253032630327303283032930330303313033230333303343033530336303373033830339303403034130342303433034430345303463034730348303493035030351303523035330354303553035630357303583035930360303613036230363303643036530366303673036830369303703037130372303733037430375303763037730378303793038030381303823038330384303853038630387303883038930390303913039230393303943039530396303973039830399304003040130402304033040430405304063040730408304093041030411304123041330414304153041630417304183041930420304213042230423304243042530426304273042830429304303043130432304333043430435304363043730438304393044030441304423044330444304453044630447304483044930450304513045230453304543045530456304573045830459304603046130462304633046430465304663046730468304693047030471304723047330474304753047630477304783047930480304813048230483304843048530486304873048830489304903049130492304933049430495304963049730498304993050030501305023050330504305053050630507305083050930510305113051230513305143051530516305173051830519305203052130522305233052430525305263052730528305293053030531305323053330534305353053630537305383053930540305413054230543305443054530546305473054830549305503055130552305533055430555305563055730558305593056030561305623056330564305653056630567305683056930570305713057230573305743057530576305773057830579305803058130582305833058430585305863058730588305893059030591305923059330594305953059630597305983059930600306013060230603306043060530606306073060830609306103061130612306133061430615306163061730618306193062030621306223062330624306253062630627306283062930630306313063230633306343063530636306373063830639306403064130642306433064430645306463064730648306493065030651306523065330654306553065630657306583065930660306613066230663306643066530666306673066830669306703067130672306733067430675306763067730678306793068030681306823068330684306853068630687306883068930690306913069230693306943069530696306973069830699307003070130702307033070430705307063070730708307093071030711307123071330714307153071630717307183071930720307213072230723307243072530726307273072830729307303073130732307333073430735307363073730738307393074030741307423074330744307453074630747307483074930750307513075230753307543075530756307573075830759307603076130762307633076430765307663076730768307693077030771307723077330774307753077630777307783077930780307813078230783307843078530786307873078830789307903079130792307933079430795307963079730798307993080030801308023080330804308053080630807308083080930810308113081230813308143081530816308173081830819308203082130822308233082430825308263082730828308293083030831308323083330834308353083630837308383083930840308413084230843308443084530846308473084830849308503085130852308533085430855308563085730858308593086030861308623086330864308653086630867308683086930870308713087230873308743087530876308773087830879308803088130882308833088430885308863088730888308893089030891308923089330894308953089630897308983089930900309013090230903309043090530906309073090830909309103091130912309133091430915309163091730918309193092030921309223092330924309253092630927309283092930930309313093230933309343093530936309373093830939309403094130942309433094430945309463094730948309493095030951309523095330954309553095630957309583095930960309613096230963309643096530966309673096830969309703097130972309733097430975309763097730978309793098030981309823098330984309853098630987309883098930990309913099230993309943099530996309973099830999310003100131002310033100431005310063100731008310093101031011310123101331014310153101631017310183101931020310213102231023310243102531026310273102831029310303103131032310333103431035310363103731038310393104031041310423104331044310453104631047310483104931050310513105231053310543105531056310573105831059310603106131062310633106431065310663106731068310693107031071310723107331074310753107631077310783107931080310813108231083310843108531086310873108831089310903109131092310933109431095310963109731098310993110031101311023110331104311053110631107311083110931110311113111231113311143111531116311173111831119311203112131122311233112431125311263112731128311293113031131311323113331134311353113631137311383113931140311413114231143311443114531146311473114831149311503115131152311533115431155311563115731158311593116031161311623116331164311653116631167311683116931170311713117231173311743117531176311773117831179311803118131182311833118431185311863118731188311893119031191311923119331194311953119631197311983119931200312013120231203312043120531206312073120831209312103121131212312133121431215312163121731218312193122031221312223122331224312253122631227312283122931230312313123231233312343123531236312373123831239312403124131242312433124431245312463124731248312493125031251312523125331254312553125631257312583125931260312613126231263312643126531266312673126831269312703127131272312733127431275312763127731278312793128031281312823128331284312853128631287312883128931290312913129231293312943129531296312973129831299313003130131302313033130431305313063130731308313093131031311313123131331314313153131631317313183131931320313213132231323313243132531326313273132831329313303133131332313333133431335313363133731338313393134031341313423134331344313453134631347313483134931350313513135231353313543135531356313573135831359313603136131362313633136431365313663136731368313693137031371313723137331374313753137631377313783137931380313813138231383313843138531386313873138831389313903139131392313933139431395313963139731398313993140031401314023140331404314053140631407314083140931410314113141231413314143141531416314173141831419314203142131422314233142431425314263142731428314293143031431314323143331434314353143631437314383143931440314413144231443314443144531446314473144831449314503145131452314533145431455314563145731458314593146031461314623146331464314653146631467314683146931470314713147231473314743147531476314773147831479314803148131482314833148431485314863148731488314893149031491314923149331494314953149631497314983149931500315013150231503315043150531506315073150831509315103151131512315133151431515315163151731518315193152031521315223152331524315253152631527315283152931530315313153231533315343153531536315373153831539315403154131542315433154431545315463154731548315493155031551315523155331554315553155631557315583155931560315613156231563315643156531566315673156831569315703157131572315733157431575315763157731578315793158031581315823158331584315853158631587315883158931590315913159231593315943159531596315973159831599316003160131602316033160431605316063160731608316093161031611316123161331614316153161631617316183161931620316213162231623316243162531626316273162831629316303163131632316333163431635316363163731638316393164031641316423164331644316453164631647316483164931650316513165231653316543165531656316573165831659316603166131662316633166431665316663166731668316693167031671316723167331674316753167631677316783167931680316813168231683316843168531686316873168831689316903169131692316933169431695316963169731698316993170031701317023170331704317053170631707317083170931710317113171231713317143171531716317173171831719317203172131722317233172431725317263172731728317293173031731317323173331734317353173631737317383173931740317413174231743317443174531746317473174831749317503175131752317533175431755317563175731758317593176031761317623176331764317653176631767317683176931770317713177231773317743177531776317773177831779317803178131782317833178431785317863178731788317893179031791317923179331794317953179631797317983179931800318013180231803318043180531806318073180831809318103181131812318133181431815318163181731818318193182031821318223182331824318253182631827318283182931830318313183231833318343183531836318373183831839318403184131842318433184431845318463184731848318493185031851318523185331854318553185631857318583185931860318613186231863318643186531866318673186831869318703187131872318733187431875318763187731878318793188031881318823188331884318853188631887318883188931890318913189231893318943189531896318973189831899319003190131902319033190431905319063190731908319093191031911319123191331914319153191631917319183191931920319213192231923319243192531926319273192831929319303193131932319333193431935319363193731938319393194031941319423194331944319453194631947319483194931950319513195231953319543195531956319573195831959319603196131962319633196431965319663196731968319693197031971319723197331974319753197631977319783197931980319813198231983319843198531986319873198831989319903199131992319933199431995319963199731998319993200032001320023200332004320053200632007320083200932010320113201232013320143201532016320173201832019320203202132022320233202432025320263202732028320293203032031320323203332034320353203632037320383203932040320413204232043320443204532046320473204832049320503205132052320533205432055320563205732058320593206032061320623206332064320653206632067320683206932070320713207232073320743207532076320773207832079320803208132082320833208432085320863208732088320893209032091320923209332094320953209632097320983209932100321013210232103321043210532106321073210832109321103211132112321133211432115321163211732118321193212032121321223212332124321253212632127321283212932130321313213232133321343213532136321373213832139321403214132142321433214432145321463214732148321493215032151321523215332154321553215632157321583215932160321613216232163321643216532166321673216832169321703217132172321733217432175321763217732178321793218032181321823218332184321853218632187321883218932190321913219232193321943219532196321973219832199322003220132202322033220432205322063220732208322093221032211322123221332214322153221632217322183221932220322213222232223322243222532226322273222832229322303223132232322333223432235322363223732238322393224032241322423224332244322453224632247322483224932250322513225232253322543225532256322573225832259322603226132262322633226432265322663226732268322693227032271322723227332274322753227632277322783227932280322813228232283322843228532286322873228832289322903229132292322933229432295322963229732298322993230032301323023230332304323053230632307323083230932310323113231232313323143231532316323173231832319323203232132322323233232432325323263232732328323293233032331323323233332334323353233632337323383233932340323413234232343323443234532346323473234832349323503235132352323533235432355323563235732358323593236032361323623236332364323653236632367323683236932370323713237232373323743237532376323773237832379323803238132382323833238432385323863238732388323893239032391323923239332394323953239632397323983239932400324013240232403324043240532406324073240832409324103241132412324133241432415324163241732418324193242032421324223242332424324253242632427324283242932430324313243232433324343243532436324373243832439324403244132442324433244432445324463244732448324493245032451324523245332454324553245632457324583245932460324613246232463324643246532466324673246832469324703247132472324733247432475324763247732478324793248032481324823248332484324853248632487324883248932490324913249232493324943249532496324973249832499325003250132502325033250432505325063250732508325093251032511325123251332514325153251632517325183251932520325213252232523325243252532526325273252832529325303253132532325333253432535325363253732538325393254032541325423254332544325453254632547325483254932550325513255232553325543255532556325573255832559325603256132562325633256432565325663256732568325693257032571325723257332574325753257632577325783257932580325813258232583325843258532586325873258832589325903259132592325933259432595325963259732598325993260032601326023260332604326053260632607326083260932610326113261232613326143261532616326173261832619326203262132622326233262432625326263262732628326293263032631326323263332634326353263632637326383263932640326413264232643326443264532646326473264832649326503265132652326533265432655326563265732658326593266032661326623266332664326653266632667326683266932670326713267232673326743267532676326773267832679326803268132682326833268432685326863268732688326893269032691326923269332694326953269632697326983269932700327013270232703327043270532706327073270832709327103271132712327133271432715327163271732718327193272032721327223272332724327253272632727327283272932730327313273232733327343273532736327373273832739327403274132742327433274432745327463274732748327493275032751327523275332754327553275632757327583275932760327613276232763327643276532766327673276832769327703277132772327733277432775327763277732778327793278032781327823278332784327853278632787327883278932790327913279232793327943279532796327973279832799328003280132802328033280432805328063280732808328093281032811328123281332814328153281632817328183281932820328213282232823328243282532826328273282832829328303283132832328333283432835328363283732838328393284032841328423284332844328453284632847328483284932850328513285232853328543285532856328573285832859328603286132862328633286432865328663286732868328693287032871328723287332874328753287632877328783287932880328813288232883328843288532886328873288832889328903289132892328933289432895328963289732898328993290032901329023290332904329053290632907329083290932910329113291232913329143291532916329173291832919329203292132922329233292432925329263292732928329293293032931329323293332934329353293632937329383293932940329413294232943329443294532946329473294832949329503295132952329533295432955329563295732958329593296032961329623296332964329653296632967329683296932970329713297232973329743297532976329773297832979329803298132982329833298432985329863298732988329893299032991329923299332994329953299632997329983299933000330013300233003330043300533006330073300833009330103301133012330133301433015330163301733018330193302033021330223302333024330253302633027330283302933030330313303233033330343303533036330373303833039330403304133042330433304433045330463304733048330493305033051330523305333054330553305633057330583305933060330613306233063330643306533066330673306833069330703307133072330733307433075330763307733078330793308033081330823308333084330853308633087330883308933090330913309233093330943309533096330973309833099331003310133102331033310433105331063310733108331093311033111331123311333114331153311633117331183311933120331213312233123331243312533126331273312833129331303313133132331333313433135331363313733138331393314033141331423314333144331453314633147331483314933150331513315233153331543315533156331573315833159331603316133162331633316433165331663316733168331693317033171331723317333174331753317633177331783317933180331813318233183331843318533186331873318833189331903319133192331933319433195331963319733198331993320033201332023320333204332053320633207332083320933210332113321233213332143321533216332173321833219332203322133222332233322433225332263322733228332293323033231332323323333234332353323633237332383323933240332413324233243332443324533246332473324833249332503325133252332533325433255332563325733258332593326033261332623326333264332653326633267332683326933270332713327233273332743327533276332773327833279332803328133282332833328433285332863328733288332893329033291332923329333294332953329633297332983329933300333013330233303333043330533306333073330833309333103331133312333133331433315333163331733318333193332033321333223332333324333253332633327333283332933330333313333233333333343333533336333373333833339333403334133342333433334433345333463334733348333493335033351333523335333354333553335633357333583335933360333613336233363333643336533366333673336833369333703337133372333733337433375333763337733378333793338033381333823338333384333853338633387333883338933390333913339233393333943339533396333973339833399334003340133402334033340433405334063340733408334093341033411334123341333414334153341633417334183341933420334213342233423334243342533426334273342833429334303343133432334333343433435334363343733438334393344033441334423344333444334453344633447334483344933450334513345233453334543345533456334573345833459334603346133462334633346433465334663346733468334693347033471334723347333474334753347633477334783347933480334813348233483334843348533486334873348833489334903349133492334933349433495334963349733498334993350033501335023350333504335053350633507335083350933510335113351233513335143351533516335173351833519335203352133522335233352433525335263352733528335293353033531335323353333534335353353633537335383353933540335413354233543335443354533546335473354833549335503355133552335533355433555335563355733558335593356033561335623356333564335653356633567335683356933570335713357233573335743357533576335773357833579335803358133582335833358433585335863358733588335893359033591335923359333594335953359633597335983359933600336013360233603336043360533606336073360833609336103361133612336133361433615336163361733618336193362033621336223362333624336253362633627336283362933630336313363233633336343363533636336373363833639336403364133642336433364433645336463364733648336493365033651336523365333654336553365633657336583365933660336613366233663336643366533666336673366833669336703367133672336733367433675336763367733678336793368033681336823368333684336853368633687336883368933690336913369233693336943369533696336973369833699337003370133702337033370433705337063370733708337093371033711337123371333714337153371633717337183371933720337213372233723337243372533726337273372833729337303373133732337333373433735337363373733738337393374033741337423374333744337453374633747337483374933750337513375233753337543375533756337573375833759337603376133762337633376433765337663376733768337693377033771337723377333774337753377633777337783377933780337813378233783337843378533786337873378833789337903379133792337933379433795337963379733798337993380033801338023380333804338053380633807338083380933810338113381233813338143381533816338173381833819338203382133822338233382433825338263382733828338293383033831338323383333834338353383633837338383383933840338413384233843338443384533846338473384833849338503385133852338533385433855338563385733858338593386033861338623386333864338653386633867338683386933870338713387233873338743387533876338773387833879338803388133882338833388433885338863388733888338893389033891338923389333894338953389633897338983389933900339013390233903339043390533906339073390833909339103391133912339133391433915339163391733918339193392033921339223392333924339253392633927339283392933930339313393233933339343393533936339373393833939339403394133942339433394433945339463394733948339493395033951339523395333954339553395633957339583395933960339613396233963339643396533966339673396833969339703397133972339733397433975339763397733978339793398033981339823398333984339853398633987339883398933990339913399233993339943399533996339973399833999340003400134002340033400434005340063400734008340093401034011340123401334014340153401634017340183401934020340213402234023340243402534026340273402834029340303403134032340333403434035340363403734038340393404034041340423404334044340453404634047340483404934050340513405234053340543405534056340573405834059340603406134062340633406434065340663406734068340693407034071340723407334074340753407634077340783407934080340813408234083340843408534086340873408834089340903409134092340933409434095340963409734098340993410034101341023410334104341053410634107341083410934110341113411234113341143411534116341173411834119341203412134122341233412434125341263412734128341293413034131341323413334134341353413634137341383413934140341413414234143341443414534146341473414834149341503415134152341533415434155341563415734158341593416034161341623416334164341653416634167341683416934170341713417234173341743417534176341773417834179341803418134182341833418434185341863418734188341893419034191341923419334194341953419634197341983419934200342013420234203342043420534206342073420834209342103421134212342133421434215342163421734218342193422034221342223422334224342253422634227342283422934230342313423234233342343423534236342373423834239342403424134242342433424434245342463424734248342493425034251342523425334254342553425634257342583425934260342613426234263342643426534266342673426834269342703427134272342733427434275342763427734278342793428034281342823428334284342853428634287342883428934290342913429234293342943429534296342973429834299343003430134302343033430434305343063430734308343093431034311343123431334314343153431634317343183431934320343213432234323343243432534326343273432834329343303433134332343333433434335343363433734338343393434034341343423434334344343453434634347343483434934350343513435234353343543435534356343573435834359343603436134362343633436434365343663436734368343693437034371343723437334374343753437634377343783437934380343813438234383343843438534386343873438834389343903439134392343933439434395343963439734398343993440034401344023440334404344053440634407344083440934410344113441234413344143441534416344173441834419344203442134422344233442434425344263442734428344293443034431344323443334434344353443634437344383443934440344413444234443344443444534446344473444834449344503445134452344533445434455344563445734458344593446034461344623446334464344653446634467344683446934470344713447234473344743447534476344773447834479344803448134482344833448434485344863448734488344893449034491344923449334494344953449634497344983449934500345013450234503345043450534506345073450834509345103451134512345133451434515345163451734518345193452034521345223452334524345253452634527345283452934530
  1. var __defProp = Object.defineProperty;
  2. var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
  3. var __publicField = (obj, key, value) => {
  4. __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
  5. return value;
  6. };
  7. if (typeof Promise !== "undefined" && !Promise.prototype.finally) {
  8. Promise.prototype.finally = function(callback) {
  9. const promise = this.constructor;
  10. return this.then(
  11. (value) => promise.resolve(callback()).then(() => value),
  12. (reason) => promise.resolve(callback()).then(() => {
  13. throw reason;
  14. })
  15. );
  16. };
  17. }
  18. ;
  19. if (typeof uni !== "undefined" && uni && uni.requireGlobal) {
  20. const global2 = uni.requireGlobal();
  21. ArrayBuffer = global2.ArrayBuffer;
  22. Int8Array = global2.Int8Array;
  23. Uint8Array = global2.Uint8Array;
  24. Uint8ClampedArray = global2.Uint8ClampedArray;
  25. Int16Array = global2.Int16Array;
  26. Uint16Array = global2.Uint16Array;
  27. Int32Array = global2.Int32Array;
  28. Uint32Array = global2.Uint32Array;
  29. Float32Array = global2.Float32Array;
  30. Float64Array = global2.Float64Array;
  31. BigInt64Array = global2.BigInt64Array;
  32. BigUint64Array = global2.BigUint64Array;
  33. }
  34. ;
  35. if (uni.restoreGlobal) {
  36. uni.restoreGlobal(Vue, weex, plus, setTimeout, clearTimeout, setInterval, clearInterval);
  37. }
  38. (function(vue) {
  39. "use strict";
  40. const icons$1 = {
  41. "uicon-level": "",
  42. "uicon-column-line": "",
  43. "uicon-checkbox-mark": "",
  44. "uicon-folder": "",
  45. "uicon-movie": "",
  46. "uicon-star-fill": "",
  47. "uicon-star": "",
  48. "uicon-phone-fill": "",
  49. "uicon-phone": "",
  50. "uicon-apple-fill": "",
  51. "uicon-chrome-circle-fill": "",
  52. "uicon-backspace": "",
  53. "uicon-attach": "",
  54. "uicon-cut": "",
  55. "uicon-empty-car": "",
  56. "uicon-empty-coupon": "",
  57. "uicon-empty-address": "",
  58. "uicon-empty-favor": "",
  59. "uicon-empty-permission": "",
  60. "uicon-empty-news": "",
  61. "uicon-empty-search": "",
  62. "uicon-github-circle-fill": "",
  63. "uicon-rmb": "",
  64. "uicon-person-delete-fill": "",
  65. "uicon-reload": "",
  66. "uicon-order": "",
  67. "uicon-server-man": "",
  68. "uicon-search": "",
  69. "uicon-fingerprint": "",
  70. "uicon-more-dot-fill": "",
  71. "uicon-scan": "",
  72. "uicon-share-square": "",
  73. "uicon-map": "",
  74. "uicon-map-fill": "",
  75. "uicon-tags": "",
  76. "uicon-tags-fill": "",
  77. "uicon-bookmark-fill": "",
  78. "uicon-bookmark": "",
  79. "uicon-eye": "",
  80. "uicon-eye-fill": "",
  81. "uicon-mic": "",
  82. "uicon-mic-off": "",
  83. "uicon-calendar": "",
  84. "uicon-calendar-fill": "",
  85. "uicon-trash": "",
  86. "uicon-trash-fill": "",
  87. "uicon-play-left": "",
  88. "uicon-play-right": "",
  89. "uicon-minus": "",
  90. "uicon-plus": "",
  91. "uicon-info": "",
  92. "uicon-info-circle": "",
  93. "uicon-info-circle-fill": "",
  94. "uicon-question": "",
  95. "uicon-error": "",
  96. "uicon-close": "",
  97. "uicon-checkmark": "",
  98. "uicon-android-circle-fill": "",
  99. "uicon-android-fill": "",
  100. "uicon-ie": "",
  101. "uicon-IE-circle-fill": "",
  102. "uicon-google": "",
  103. "uicon-google-circle-fill": "",
  104. "uicon-setting-fill": "",
  105. "uicon-setting": "",
  106. "uicon-minus-square-fill": "",
  107. "uicon-plus-square-fill": "",
  108. "uicon-heart": "",
  109. "uicon-heart-fill": "",
  110. "uicon-camera": "",
  111. "uicon-camera-fill": "",
  112. "uicon-more-circle": "",
  113. "uicon-more-circle-fill": "",
  114. "uicon-chat": "",
  115. "uicon-chat-fill": "",
  116. "uicon-bag-fill": "",
  117. "uicon-bag": "",
  118. "uicon-error-circle-fill": "",
  119. "uicon-error-circle": "",
  120. "uicon-close-circle": "",
  121. "uicon-close-circle-fill": "",
  122. "uicon-checkmark-circle": "",
  123. "uicon-checkmark-circle-fill": "",
  124. "uicon-question-circle-fill": "",
  125. "uicon-question-circle": "",
  126. "uicon-share": "",
  127. "uicon-share-fill": "",
  128. "uicon-shopping-cart": "",
  129. "uicon-shopping-cart-fill": "",
  130. "uicon-bell": "",
  131. "uicon-bell-fill": "",
  132. "uicon-list": "",
  133. "uicon-list-dot": "",
  134. "uicon-zhihu": "",
  135. "uicon-zhihu-circle-fill": "",
  136. "uicon-zhifubao": "",
  137. "uicon-zhifubao-circle-fill": "",
  138. "uicon-weixin-circle-fill": "",
  139. "uicon-weixin-fill": "",
  140. "uicon-twitter-circle-fill": "",
  141. "uicon-twitter": "",
  142. "uicon-taobao-circle-fill": "",
  143. "uicon-taobao": "",
  144. "uicon-weibo-circle-fill": "",
  145. "uicon-weibo": "",
  146. "uicon-qq-fill": "",
  147. "uicon-qq-circle-fill": "",
  148. "uicon-moments-circel-fill": "",
  149. "uicon-moments": "",
  150. "uicon-qzone": "",
  151. "uicon-qzone-circle-fill": "",
  152. "uicon-baidu-circle-fill": "",
  153. "uicon-baidu": "",
  154. "uicon-facebook-circle-fill": "",
  155. "uicon-facebook": "",
  156. "uicon-car": "",
  157. "uicon-car-fill": "",
  158. "uicon-warning-fill": "",
  159. "uicon-warning": "",
  160. "uicon-clock-fill": "",
  161. "uicon-clock": "",
  162. "uicon-edit-pen": "",
  163. "uicon-edit-pen-fill": "",
  164. "uicon-email": "",
  165. "uicon-email-fill": "",
  166. "uicon-minus-circle": "",
  167. "uicon-minus-circle-fill": "",
  168. "uicon-plus-circle": "",
  169. "uicon-plus-circle-fill": "",
  170. "uicon-file-text": "",
  171. "uicon-file-text-fill": "",
  172. "uicon-pushpin": "",
  173. "uicon-pushpin-fill": "",
  174. "uicon-grid": "",
  175. "uicon-grid-fill": "",
  176. "uicon-play-circle": "",
  177. "uicon-play-circle-fill": "",
  178. "uicon-pause-circle-fill": "",
  179. "uicon-pause": "",
  180. "uicon-pause-circle": "",
  181. "uicon-eye-off": "",
  182. "uicon-eye-off-outline": "",
  183. "uicon-gift-fill": "",
  184. "uicon-gift": "",
  185. "uicon-rmb-circle-fill": "",
  186. "uicon-rmb-circle": "",
  187. "uicon-kefu-ermai": "",
  188. "uicon-server-fill": "",
  189. "uicon-coupon-fill": "",
  190. "uicon-coupon": "",
  191. "uicon-integral": "",
  192. "uicon-integral-fill": "",
  193. "uicon-home-fill": "",
  194. "uicon-home": "",
  195. "uicon-hourglass-half-fill": "",
  196. "uicon-hourglass": "",
  197. "uicon-account": "",
  198. "uicon-plus-people-fill": "",
  199. "uicon-minus-people-fill": "",
  200. "uicon-account-fill": "",
  201. "uicon-thumb-down-fill": "",
  202. "uicon-thumb-down": "",
  203. "uicon-thumb-up": "",
  204. "uicon-thumb-up-fill": "",
  205. "uicon-lock-fill": "",
  206. "uicon-lock-open": "",
  207. "uicon-lock-opened-fill": "",
  208. "uicon-lock": "",
  209. "uicon-red-packet-fill": "",
  210. "uicon-photo-fill": "",
  211. "uicon-photo": "",
  212. "uicon-volume-off-fill": "",
  213. "uicon-volume-off": "",
  214. "uicon-volume-fill": "",
  215. "uicon-volume": "",
  216. "uicon-red-packet": "",
  217. "uicon-download": "",
  218. "uicon-arrow-up-fill": "",
  219. "uicon-arrow-down-fill": "",
  220. "uicon-play-left-fill": "",
  221. "uicon-play-right-fill": "",
  222. "uicon-rewind-left-fill": "",
  223. "uicon-rewind-right-fill": "",
  224. "uicon-arrow-downward": "",
  225. "uicon-arrow-leftward": "",
  226. "uicon-arrow-rightward": "",
  227. "uicon-arrow-upward": "",
  228. "uicon-arrow-down": "",
  229. "uicon-arrow-right": "",
  230. "uicon-arrow-left": "",
  231. "uicon-arrow-up": "",
  232. "uicon-skip-back-left": "",
  233. "uicon-skip-forward-right": "",
  234. "uicon-rewind-right": "",
  235. "uicon-rewind-left": "",
  236. "uicon-arrow-right-double": "",
  237. "uicon-arrow-left-double": "",
  238. "uicon-wifi-off": "",
  239. "uicon-wifi": "",
  240. "uicon-empty-data": "",
  241. "uicon-empty-history": "",
  242. "uicon-empty-list": "",
  243. "uicon-empty-page": "",
  244. "uicon-empty-order": "",
  245. "uicon-man": "",
  246. "uicon-woman": "",
  247. "uicon-man-add": "",
  248. "uicon-man-add-fill": "",
  249. "uicon-man-delete": "",
  250. "uicon-man-delete-fill": "",
  251. "uicon-zh": "",
  252. "uicon-en": ""
  253. };
  254. const ON_SHOW = "onShow";
  255. const ON_HIDE = "onHide";
  256. const ON_LAUNCH = "onLaunch";
  257. const ON_LOAD = "onLoad";
  258. const ON_UNLOAD = "onUnload";
  259. function requireNativePlugin(name) {
  260. return weex.requireModule(name);
  261. }
  262. function formatAppLog(type2, filename, ...args) {
  263. if (uni.__log__) {
  264. uni.__log__(type2, filename, ...args);
  265. } else {
  266. console[type2].apply(console, [...args, filename]);
  267. }
  268. }
  269. function resolveEasycom(component, easycom) {
  270. return typeof component === "string" ? easycom : component;
  271. }
  272. const createLifeCycleHook = (lifecycle, flag2 = 0) => (hook, target = vue.getCurrentInstance()) => {
  273. !vue.isInSSRComponentSetup && vue.injectHook(lifecycle, hook, target);
  274. };
  275. const onShow = /* @__PURE__ */ createLifeCycleHook(
  276. ON_SHOW,
  277. 1 | 2
  278. /* HookFlags.PAGE */
  279. );
  280. const onHide = /* @__PURE__ */ createLifeCycleHook(
  281. ON_HIDE,
  282. 1 | 2
  283. /* HookFlags.PAGE */
  284. );
  285. const onLaunch = /* @__PURE__ */ createLifeCycleHook(
  286. ON_LAUNCH,
  287. 1
  288. /* HookFlags.APP */
  289. );
  290. const onLoad = /* @__PURE__ */ createLifeCycleHook(
  291. ON_LOAD,
  292. 2
  293. /* HookFlags.PAGE */
  294. );
  295. const onUnload = /* @__PURE__ */ createLifeCycleHook(
  296. ON_UNLOAD,
  297. 2
  298. /* HookFlags.PAGE */
  299. );
  300. const version = "3";
  301. {
  302. formatAppLog("log", "at uni_modules/uview-plus/libs/config/config.js:5", `
  303. %c uview-plus V${version} %c https://ijry.github.io/uview-plus/
  304. `, "color: #ffffff; background: #3c9cff; padding:5px 0;", "color: #3c9cff;background: #ffffff; padding:5px 0;");
  305. }
  306. const config = {
  307. v: version,
  308. version,
  309. // 主题名称
  310. type: [
  311. "primary",
  312. "success",
  313. "info",
  314. "error",
  315. "warning"
  316. ],
  317. // 颜色部分,本来可以通过scss的:export导出供js使用,但是奈何nvue不支持
  318. color: {
  319. "u-primary": "#2979ff",
  320. "u-warning": "#ff9900",
  321. "u-success": "#19be6b",
  322. "u-error": "#fa3534",
  323. "u-info": "#909399",
  324. "u-main-color": "#303133",
  325. "u-content-color": "#606266",
  326. "u-tips-color": "#909399",
  327. "u-light-color": "#c0c4cc"
  328. },
  329. // 默认单位,可以通过配置为rpx,那么在用于传入组件大小参数为数值时,就默认为rpx
  330. unit: "px"
  331. };
  332. const ActionSheet = {
  333. // action-sheet组件
  334. actionSheet: {
  335. show: false,
  336. title: "",
  337. description: "",
  338. actions: () => [],
  339. index: "",
  340. cancelText: "",
  341. closeOnClickAction: true,
  342. safeAreaInsetBottom: true,
  343. openType: "",
  344. closeOnClickOverlay: true,
  345. round: 0
  346. }
  347. };
  348. const Album = {
  349. // album 组件
  350. album: {
  351. urls: () => [],
  352. keyName: "",
  353. singleSize: 180,
  354. multipleSize: 70,
  355. space: 6,
  356. singleMode: "scaleToFill",
  357. multipleMode: "aspectFill",
  358. maxCount: 9,
  359. previewFullImage: true,
  360. rowCount: 3,
  361. showMore: true
  362. }
  363. };
  364. const Alert = {
  365. // alert警告组件
  366. alert: {
  367. title: "",
  368. type: "warning",
  369. description: "",
  370. closable: false,
  371. showIcon: false,
  372. effect: "light",
  373. center: false,
  374. fontSize: 14
  375. }
  376. };
  377. const Avatar = {
  378. // avatar 组件
  379. avatar: {
  380. src: "",
  381. shape: "circle",
  382. size: 40,
  383. mode: "scaleToFill",
  384. text: "",
  385. bgColor: "#c0c4cc",
  386. color: "#ffffff",
  387. fontSize: 18,
  388. icon: "",
  389. mpAvatar: false,
  390. randomBgColor: false,
  391. defaultUrl: "",
  392. colorIndex: "",
  393. name: ""
  394. }
  395. };
  396. const AvatarGroup = {
  397. // avatarGroup 组件
  398. avatarGroup: {
  399. urls: () => [],
  400. maxCount: 5,
  401. shape: "circle",
  402. mode: "scaleToFill",
  403. showMore: true,
  404. size: 40,
  405. keyName: "",
  406. gap: 0.5,
  407. extraValue: 0
  408. }
  409. };
  410. const Backtop = {
  411. // backtop组件
  412. backtop: {
  413. mode: "circle",
  414. icon: "arrow-upward",
  415. text: "",
  416. duration: 100,
  417. scrollTop: 0,
  418. top: 400,
  419. bottom: 100,
  420. right: 20,
  421. zIndex: 9,
  422. iconStyle: () => ({
  423. color: "#909399",
  424. fontSize: "19px"
  425. })
  426. }
  427. };
  428. const Badge = {
  429. // 徽标数组件
  430. badge: {
  431. isDot: false,
  432. value: "",
  433. show: true,
  434. max: 999,
  435. type: "error",
  436. showZero: false,
  437. bgColor: null,
  438. color: null,
  439. shape: "circle",
  440. numberType: "overflow",
  441. offset: () => [],
  442. inverted: false,
  443. absolute: false
  444. }
  445. };
  446. const Button = {
  447. // button组件
  448. button: {
  449. hairline: false,
  450. type: "info",
  451. size: "normal",
  452. shape: "square",
  453. plain: false,
  454. disabled: false,
  455. loading: false,
  456. loadingText: "",
  457. loadingMode: "spinner",
  458. loadingSize: 15,
  459. openType: "",
  460. formType: "",
  461. appParameter: "",
  462. hoverStopPropagation: true,
  463. lang: "en",
  464. sessionFrom: "",
  465. sendMessageTitle: "",
  466. sendMessagePath: "",
  467. sendMessageImg: "",
  468. showMessageCard: false,
  469. dataName: "",
  470. throttleTime: 0,
  471. hoverStartTime: 0,
  472. hoverStayTime: 200,
  473. text: "",
  474. icon: "",
  475. iconColor: "",
  476. color: ""
  477. }
  478. };
  479. const Calendar$2 = {
  480. // calendar 组件
  481. calendar: {
  482. title: "日期选择",
  483. showTitle: true,
  484. showSubtitle: true,
  485. mode: "single",
  486. startText: "开始",
  487. endText: "结束",
  488. customList: () => [],
  489. color: "#3c9cff",
  490. minDate: 0,
  491. maxDate: 0,
  492. defaultDate: null,
  493. maxCount: Number.MAX_SAFE_INTEGER,
  494. // Infinity
  495. rowHeight: 56,
  496. formatter: null,
  497. showLunar: false,
  498. showMark: true,
  499. confirmText: "确定",
  500. confirmDisabledText: "确定",
  501. show: false,
  502. closeOnClickOverlay: false,
  503. readonly: false,
  504. showConfirm: true,
  505. maxRange: Number.MAX_SAFE_INTEGER,
  506. // Infinity
  507. rangePrompt: "",
  508. showRangePrompt: true,
  509. allowSameDay: false,
  510. round: 0,
  511. monthNum: 3
  512. }
  513. };
  514. const CarKeyboard = {
  515. // 车牌号键盘
  516. carKeyboard: {
  517. random: false
  518. }
  519. };
  520. const Cell = {
  521. // cell组件的props
  522. cell: {
  523. customClass: "",
  524. title: "",
  525. label: "",
  526. value: "",
  527. icon: "",
  528. disabled: false,
  529. border: true,
  530. center: false,
  531. url: "",
  532. linkType: "navigateTo",
  533. clickable: false,
  534. isLink: false,
  535. required: false,
  536. arrowDirection: "",
  537. iconStyle: {},
  538. rightIconStyle: {},
  539. rightIcon: "arrow-right",
  540. titleStyle: {},
  541. size: "",
  542. stop: true,
  543. name: ""
  544. }
  545. };
  546. const CellGroup = {
  547. // cell-group组件的props
  548. cellGroup: {
  549. title: "",
  550. border: true,
  551. customStyle: {}
  552. }
  553. };
  554. const Checkbox = {
  555. // checkbox组件
  556. checkbox: {
  557. name: "",
  558. shape: "",
  559. size: "",
  560. checkbox: false,
  561. disabled: "",
  562. activeColor: "",
  563. inactiveColor: "",
  564. iconSize: "",
  565. iconColor: "",
  566. label: "",
  567. labelSize: "",
  568. labelColor: "",
  569. labelDisabled: ""
  570. }
  571. };
  572. const CheckboxGroup = {
  573. // checkbox-group组件
  574. checkboxGroup: {
  575. name: "",
  576. value: () => [],
  577. shape: "square",
  578. disabled: false,
  579. activeColor: "#2979ff",
  580. inactiveColor: "#c8c9cc",
  581. size: 18,
  582. placement: "row",
  583. labelSize: 14,
  584. labelColor: "#303133",
  585. labelDisabled: false,
  586. iconColor: "#ffffff",
  587. iconSize: 12,
  588. iconPlacement: "left",
  589. borderBottom: false
  590. }
  591. };
  592. const CircleProgress = {
  593. // circleProgress 组件
  594. circleProgress: {
  595. percentage: 30
  596. }
  597. };
  598. const Code = {
  599. // code 组件
  600. code: {
  601. seconds: 60,
  602. startText: "获取验证码",
  603. changeText: "X秒重新获取",
  604. endText: "重新获取",
  605. keepRunning: false,
  606. uniqueKey: ""
  607. }
  608. };
  609. const CodeInput = {
  610. // codeInput 组件
  611. codeInput: {
  612. adjustPosition: true,
  613. maxlength: 6,
  614. dot: false,
  615. mode: "box",
  616. hairline: false,
  617. space: 10,
  618. value: "",
  619. focus: false,
  620. bold: false,
  621. color: "#606266",
  622. fontSize: 18,
  623. size: 35,
  624. disabledKeyboard: false,
  625. borderColor: "#c9cacc",
  626. disabledDot: true
  627. }
  628. };
  629. const Col = {
  630. // col 组件
  631. col: {
  632. span: 12,
  633. offset: 0,
  634. justify: "start",
  635. align: "stretch",
  636. textAlign: "left"
  637. }
  638. };
  639. const Collapse = {
  640. // collapse 组件
  641. collapse: {
  642. value: null,
  643. accordion: false,
  644. border: true
  645. }
  646. };
  647. const CollapseItem = {
  648. // collapseItem 组件
  649. collapseItem: {
  650. title: "",
  651. value: "",
  652. label: "",
  653. disabled: false,
  654. isLink: true,
  655. clickable: true,
  656. border: true,
  657. align: "left",
  658. name: "",
  659. icon: "",
  660. duration: 300
  661. }
  662. };
  663. const ColumnNotice = {
  664. // columnNotice 组件
  665. columnNotice: {
  666. text: "",
  667. icon: "volume",
  668. mode: "",
  669. color: "#f9ae3d",
  670. bgColor: "#fdf6ec",
  671. fontSize: 14,
  672. speed: 80,
  673. step: false,
  674. duration: 1500,
  675. disableTouch: true
  676. }
  677. };
  678. const CountDown = {
  679. // u-count-down 计时器组件
  680. countDown: {
  681. time: 0,
  682. format: "HH:mm:ss",
  683. autoStart: true,
  684. millisecond: false
  685. }
  686. };
  687. const CountTo = {
  688. // countTo 组件
  689. countTo: {
  690. startVal: 0,
  691. endVal: 0,
  692. duration: 2e3,
  693. autoplay: true,
  694. decimals: 0,
  695. useEasing: true,
  696. decimal: ".",
  697. color: "#606266",
  698. fontSize: 22,
  699. bold: false,
  700. separator: ""
  701. }
  702. };
  703. const DatetimePicker = {
  704. // datetimePicker 组件
  705. datetimePicker: {
  706. show: false,
  707. showToolbar: true,
  708. value: "",
  709. title: "",
  710. mode: "datetime",
  711. maxDate: new Date((/* @__PURE__ */ new Date()).getFullYear() + 10, 0, 1).getTime(),
  712. minDate: new Date((/* @__PURE__ */ new Date()).getFullYear() - 10, 0, 1).getTime(),
  713. minHour: 0,
  714. maxHour: 23,
  715. minMinute: 0,
  716. maxMinute: 59,
  717. filter: null,
  718. formatter: null,
  719. loading: false,
  720. itemHeight: 44,
  721. cancelText: "取消",
  722. confirmText: "确认",
  723. cancelColor: "#909193",
  724. confirmColor: "#3c9cff",
  725. visibleItemCount: 5,
  726. closeOnClickOverlay: false,
  727. defaultIndex: () => []
  728. }
  729. };
  730. const Divider = {
  731. // divider组件
  732. divider: {
  733. dashed: false,
  734. hairline: true,
  735. dot: false,
  736. textPosition: "center",
  737. text: "",
  738. textSize: 14,
  739. textColor: "#909399",
  740. lineColor: "#dcdfe6"
  741. }
  742. };
  743. const Empty = {
  744. // empty组件
  745. empty: {
  746. icon: "",
  747. text: "",
  748. textColor: "#c0c4cc",
  749. textSize: 14,
  750. iconColor: "#c0c4cc",
  751. iconSize: 90,
  752. mode: "data",
  753. width: 160,
  754. height: 160,
  755. show: true,
  756. marginTop: 0
  757. }
  758. };
  759. const Form = {
  760. // form 组件
  761. form: {
  762. model: () => ({}),
  763. rules: () => ({}),
  764. errorType: "message",
  765. borderBottom: true,
  766. labelPosition: "left",
  767. labelWidth: 45,
  768. labelAlign: "left",
  769. labelStyle: () => ({})
  770. }
  771. };
  772. const GormItem = {
  773. // formItem 组件
  774. formItem: {
  775. label: "",
  776. prop: "",
  777. borderBottom: "",
  778. labelWidth: "",
  779. rightIcon: "",
  780. leftIcon: "",
  781. required: false,
  782. leftIconStyle: ""
  783. }
  784. };
  785. const Gap = {
  786. // gap组件
  787. gap: {
  788. bgColor: "transparent",
  789. height: 20,
  790. marginTop: 0,
  791. marginBottom: 0,
  792. customStyle: {}
  793. }
  794. };
  795. const Grid = {
  796. // grid组件
  797. grid: {
  798. col: 3,
  799. border: false,
  800. align: "left"
  801. }
  802. };
  803. const GridItem = {
  804. // grid-item组件
  805. gridItem: {
  806. name: null,
  807. bgColor: "transparent"
  808. }
  809. };
  810. const {
  811. color: color$3
  812. } = config;
  813. const Icon = {
  814. // icon组件
  815. icon: {
  816. name: "",
  817. color: color$3["u-content-color"],
  818. size: "16px",
  819. bold: false,
  820. index: "",
  821. hoverClass: "",
  822. customPrefix: "uicon",
  823. label: "",
  824. labelPos: "right",
  825. labelSize: "15px",
  826. labelColor: color$3["u-content-color"],
  827. space: "3px",
  828. imgMode: "",
  829. width: "",
  830. height: "",
  831. top: 0,
  832. stop: false
  833. }
  834. };
  835. const Image = {
  836. // image组件
  837. image: {
  838. src: "",
  839. mode: "aspectFill",
  840. width: "300",
  841. height: "225",
  842. shape: "square",
  843. radius: 0,
  844. lazyLoad: true,
  845. showMenuByLongpress: true,
  846. loadingIcon: "photo",
  847. errorIcon: "error-circle",
  848. showLoading: true,
  849. showError: true,
  850. fade: true,
  851. webp: false,
  852. duration: 500,
  853. bgColor: "#f3f4f6"
  854. }
  855. };
  856. const IndexAnchor = {
  857. // indexAnchor 组件
  858. indexAnchor: {
  859. text: "",
  860. color: "#606266",
  861. size: 14,
  862. bgColor: "#dedede",
  863. height: 32
  864. }
  865. };
  866. const IndexList = {
  867. // indexList 组件
  868. indexList: {
  869. inactiveColor: "#606266",
  870. activeColor: "#5677fc",
  871. indexList: () => [],
  872. sticky: true,
  873. customNavHeight: 0
  874. }
  875. };
  876. const Input = {
  877. // index 组件
  878. input: {
  879. value: "",
  880. type: "text",
  881. fixed: false,
  882. disabled: false,
  883. disabledColor: "#f5f7fa",
  884. clearable: false,
  885. password: false,
  886. maxlength: -1,
  887. placeholder: null,
  888. placeholderClass: "input-placeholder",
  889. placeholderStyle: "color: #c0c4cc",
  890. showWordLimit: false,
  891. confirmType: "done",
  892. confirmHold: false,
  893. holdKeyboard: false,
  894. focus: false,
  895. autoBlur: false,
  896. disableDefaultPadding: false,
  897. cursor: -1,
  898. cursorSpacing: 30,
  899. selectionStart: -1,
  900. selectionEnd: -1,
  901. adjustPosition: true,
  902. inputAlign: "left",
  903. fontSize: "15px",
  904. color: "#303133",
  905. prefixIcon: "",
  906. prefixIconStyle: "",
  907. suffixIcon: "",
  908. suffixIconStyle: "",
  909. border: "surround",
  910. readonly: false,
  911. shape: "square",
  912. formatter: null
  913. }
  914. };
  915. const Keyboard = {
  916. // 键盘组件
  917. keyboard: {
  918. mode: "number",
  919. dotDisabled: false,
  920. tooltip: true,
  921. showTips: true,
  922. tips: "",
  923. showCancel: true,
  924. showConfirm: true,
  925. random: false,
  926. safeAreaInsetBottom: true,
  927. closeOnClickOverlay: true,
  928. show: false,
  929. overlay: true,
  930. zIndex: 10075,
  931. cancelText: "取消",
  932. confirmText: "确定",
  933. autoChange: false
  934. }
  935. };
  936. const Line = {
  937. // line组件
  938. line: {
  939. color: "#d6d7d9",
  940. length: "100%",
  941. direction: "row",
  942. hairline: true,
  943. margin: 0,
  944. dashed: false
  945. }
  946. };
  947. const LineProgress = {
  948. // lineProgress 组件
  949. lineProgress: {
  950. activeColor: "#19be6b",
  951. inactiveColor: "#ececec",
  952. percentage: 0,
  953. showText: true,
  954. height: 12
  955. }
  956. };
  957. const {
  958. color: color$2
  959. } = config;
  960. const Link = {
  961. // link超链接组件props参数
  962. link: {
  963. color: color$2["u-primary"],
  964. fontSize: 15,
  965. underLine: false,
  966. href: "",
  967. mpTips: "链接已复制,请在浏览器打开",
  968. lineColor: "",
  969. text: ""
  970. }
  971. };
  972. const List = {
  973. // list 组件
  974. list: {
  975. showScrollbar: false,
  976. lowerThreshold: 50,
  977. upperThreshold: 0,
  978. scrollTop: 0,
  979. offsetAccuracy: 10,
  980. enableFlex: false,
  981. pagingEnabled: false,
  982. scrollable: true,
  983. scrollIntoView: "",
  984. scrollWithAnimation: false,
  985. enableBackToTop: false,
  986. height: 0,
  987. width: 0,
  988. preLoadScreen: 1
  989. }
  990. };
  991. const ListItem = {
  992. // listItem 组件
  993. listItem: {
  994. anchor: ""
  995. }
  996. };
  997. const {
  998. color: color$1
  999. } = config;
  1000. const LoadingIcon = {
  1001. // loading-icon加载中图标组件
  1002. loadingIcon: {
  1003. show: true,
  1004. color: color$1["u-tips-color"],
  1005. textColor: color$1["u-tips-color"],
  1006. vertical: false,
  1007. mode: "spinner",
  1008. size: 24,
  1009. textSize: 15,
  1010. text: "",
  1011. timingFunction: "ease-in-out",
  1012. duration: 1200,
  1013. inactiveColor: ""
  1014. }
  1015. };
  1016. const LoadingPage = {
  1017. // loading-page组件
  1018. loadingPage: {
  1019. loadingText: "正在加载",
  1020. image: "",
  1021. loadingMode: "circle",
  1022. loading: false,
  1023. bgColor: "#ffffff",
  1024. color: "#C8C8C8",
  1025. fontSize: 19,
  1026. iconSize: 28,
  1027. loadingColor: "#C8C8C8"
  1028. }
  1029. };
  1030. const Loadmore = {
  1031. // loadmore 组件
  1032. loadmore: {
  1033. status: "loadmore",
  1034. bgColor: "transparent",
  1035. icon: true,
  1036. fontSize: 14,
  1037. iconSize: 17,
  1038. color: "#606266",
  1039. loadingIcon: "spinner",
  1040. loadmoreText: "加载更多",
  1041. loadingText: "正在加载...",
  1042. nomoreText: "没有更多了",
  1043. isDot: false,
  1044. iconColor: "#b7b7b7",
  1045. marginTop: 10,
  1046. marginBottom: 10,
  1047. height: "auto",
  1048. line: false,
  1049. lineColor: "#E6E8EB",
  1050. dashed: false
  1051. }
  1052. };
  1053. const Modal = {
  1054. // modal 组件
  1055. modal: {
  1056. show: false,
  1057. title: "",
  1058. content: "",
  1059. confirmText: "确认",
  1060. cancelText: "取消",
  1061. showConfirmButton: true,
  1062. showCancelButton: false,
  1063. confirmColor: "#2979ff",
  1064. cancelColor: "#606266",
  1065. buttonReverse: false,
  1066. zoom: true,
  1067. asyncClose: false,
  1068. closeOnClickOverlay: false,
  1069. negativeTop: 0,
  1070. width: "650rpx",
  1071. confirmButtonShape: ""
  1072. }
  1073. };
  1074. const color = {
  1075. primary: "#3c9cff",
  1076. info: "#909399",
  1077. default: "#909399",
  1078. warning: "#f9ae3d",
  1079. error: "#f56c6c",
  1080. success: "#5ac725",
  1081. mainColor: "#303133",
  1082. contentColor: "#606266",
  1083. tipsColor: "#909399",
  1084. lightColor: "#c0c4cc",
  1085. borderColor: "#e4e7ed"
  1086. };
  1087. const Navbar = {
  1088. // navbar 组件
  1089. navbar: {
  1090. safeAreaInsetTop: true,
  1091. placeholder: false,
  1092. fixed: true,
  1093. border: false,
  1094. leftIcon: "arrow-left",
  1095. leftText: "",
  1096. rightText: "",
  1097. rightIcon: "",
  1098. title: "",
  1099. bgColor: "#ffffff",
  1100. titleWidth: "400rpx",
  1101. height: "44px",
  1102. leftIconSize: 20,
  1103. leftIconColor: color.mainColor,
  1104. autoBack: false,
  1105. titleStyle: ""
  1106. }
  1107. };
  1108. const NoNetwork = {
  1109. // noNetwork
  1110. noNetwork: {
  1111. tips: "哎呀,网络信号丢失",
  1112. zIndex: "",
  1113. image: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAYAAAB5fY51AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAABLKADAAQAAAABAAABLAAAAADYYILnAABAAElEQVR4Ae29CZhkV3kefNeq6m2W7tn3nl0aCbHIAgmQPGB+sLCNzSID9g9PYrAf57d/+4+DiW0cy8QBJ06c2In/PLFDHJ78+MGCGNsYgyxwIwktwEijAc1ohtmnZ+2Z7p5eq6vu9r/vuXWrq25VdVV1V3dXVX9Hmj73nv285963vvOd75yraeIEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQaD8E9PbrkvRopSMwMBBYRs+5O/yJS68cPnzYXel4tFP/jXbqjPRFEAiCQNe6Bw/6gdFn9Oy9Q90LLG2DgBBW2wyldIQIPPPCte2a5q3jtR+4ff/4wuBuXotrDwSEsNpjHKUXQODppy+udYJMEUEZgbd94DvnNwlA7YGAEFZ7jOOK78Xp06eTTkq7sxwQhmXuf/754VXl4iSstRAQwmqt8ZLWlkHg0UcD49qYfUjXfLtMtOZ7npExJu4iqZWLl7DWQUAIq3XGSlpaAYHD77q8xwuCOSUoXw8Sl0eMux977DGzQjES3AIICGG1wCBJEysj8PXnz230XXdr5RQFMYbRvWnv6w8UhMhliyGwYghr4Pjg3oEXL34ey9zyC9tiD2ml5h47dr1LN7S6CMjz/A3PvHh1Z6UyJby5EVgRhKUe7Kz/JU0LfvrJo5f+Y3MPibSuFgQGBgasYSd9l6GDsup0WS/T/9RTp9fXmU2SNwECdQ92E7S57iaMeJnPQLK6ixkDLfjlb7546RfrLkQyNBcC3dsP6oHWMd9G+V3JgwPHh7rnm1/yLQ8CbU9Y33zp0j+nZFUMb/DHmB7+SHGY3LUKAk8cObtD00xlHDrfNge+Z2ozU3c9dvx4Yr5lSL6lR6CtCWvg6OAPw9z538ZhhZRl6XrwhW8du1KX/iNejtwvPQIDR8+vSRqJ/obU7GupjdNdh2gW0ZDypJBFR6BtB2rg2OVtuub9JcmpHIpBoK1xfffLzx4f7C0XL2HNiYDp6bs9z23Ypn1fC1Y/9PCFDc3ZW2lVHIG2JKzTp4Ok7nv/G6Q054MIvda+bNb74pEgKGtwGAdL7pcfAa8vOKEZ2kyjWuLr7uDh+/qvN6o8KWdxEWhLwroyeek/g4zuqwU6kNrhyZcu/UktaSXN8iNwuL9/RuvVXtJ9PbPQ1vhmcP6t9+47u9ByJP/SIdB2hDVw9MJHQFYfrQdCph84evFX68kjaZcPAZJWwjMXRFpJ2zr91tfuvrh8vZCa54NA2xGWrunvmg8QWCJ/N4ir7fCYDxatkOeBB7an501agXbygVdvv9IK/ZQ2FiPQdi9osGbH+zRNf7y4m9Xu9Me7N9nv0HXdr5ZS4psHgXpJC9P/wDRTx0Vn1TxjWG9LGrbaUm/Fi5meSvcrkxf/Cg/ow9XqAUk91v3qHT97r6471dJKfHMi8Oyzgx1Z03t1YAQVT2MwgsC3u+yXHzi0faQ5eyGtqgWBtpOw2Ol9+/TM+sTOn8L08MtzgQCy+tOHXr3jA0JWc6HU/HF5Scssr4jXcYqfP6V/T8iq+ceyWgvbUsKKOn38eJAYyl56TAuCEr2WYei//9Crd/5GlFb81kdASVopSFrerKRlaoZj9HR+700H10+0fg+lB21NWBxe2lhNHsUpDZr27mi4dV379R9+za4/iO7Fbx8ECknLCPTsTDJ17O33bJpqnx6u7J60PWFxeAcCbMV56dJfQKf1bkMLfuGh1+76zMoe9vbuPUnLsb2DtmOe5HSxvXsrvWtLBEhaTx29+Ma27Jx0ShAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQaEsEVoQdVluO3BJ06ptHL34b1XRjp4Ch6Rq24+kmjG4Nwwg+9uA9u/73EjRBqhAEihAoe3xwUQq5WTYEzp0b3ZnV/Ncf6O/9AvY9wlh/6dy3X7ncN512Zw9BVLXjuAP4np44vnQtkZoEgVkEhLBmsWiKqwsXpjbPBOn3gRfenwnc+7GBe+zsjclvonFDS9nA9Iy/u3x9+vAP3735VPk4CRUEFhcBIazFxbfm0k9fHD7k+v4nQFaPQIrx8Gmyx/GJ0J/t7ez7mw0b9MmaC2pQQgh0/ZSm4g5TwueWWtqLt0HuVy4CQljLPPYnB0depTn+b3t+8B4t0AdBUv93h2H9xc6da0aXs2m+r1WQsLRnl7NdUvfKRkAIa5nG//r1oGtsZvjTgev/kqYHF/TA+AXoqv4npJemOEiQU1Eo2l+G0movBK1UBBPU7s9E1+ILAkuNgKwSLjXiqO/khVtvARH8dxDBRkMzPrF/V+9/BlG5y9CUqlXinHv9mRPXtvuus88L9H3JPv2zD2yXExCqAicJBIFWRwAvv3Xqwq0/Pnn+lv/K+ZvfPH3p9p5W75O0fxaBp793ce3AwIDMWmYhafiVgNtwSMsXeHp4eNXJC8Nf0PAdRCiuf/XgrnWUqsqotcvnl9DmRkCdweX4b9N7+m/ih+mbMraLM14yJVwcXItKpT1VRve+ArC3Qqn+3gM7132jKEGZm6tXg86J7OhDfuA/iHwPUpfUZSfu2L59tXxEoQxeyxkEgjKeOnLxHb4RqC+NY5H3+2953d4XlrNN7Vq3ENYij+yZwbG9jpt9GkBPQ5H9zgP9607OVeWp87cOQtn9zwJf+xDMNFfj+jryPqXpxj8c2Nn7P+SXey70lidu4IXzb0DNB4tr9751+HV7zxSHyd1CERDCWiiCc+QPjUCnsaqmZ62O5IN7N/VUNP48ee7mAZDTf4Tt049iUG4Guv4ZfNLos9UIbo7qJWoJEHjy+bP7fNsoOcnW0A0/aacef8PdG28sQTNWTBVCWIs01OfPj66BpfqTmq732UnjgT1bei+Vq4pTv7HM8Ceg2/o1qLQug7T+FaaM3IqTLZdewpoHgYEjV9fphvOj+OShWa5V+CxvZtpzv/LwG/aNl4uXsPoRwI+4uEYjAJ2GmdG8L0FK2mYa+tsrkdXZy+P7x2ZuHdW14P+BLdank9q6Qwd3rf+ckFWjR6Tx5Q2cP58K9Jm3VCIr1ogt48lO237r3//96YofeG18y9q7RFklXITxPXV+5DchKb3ZDMy37Nu5tuxG4R9cHH6b42QfAzlds+3EPXu2rfrBIjRFilwkBIIR7SHoJDurFU89ZOd680Gke6JaWomvjoBIWNUxqivFD87fej0e0n8Fwvr0/t1rnyqX+QfnRz7g+8FX8Rv8vL3auF/IqhxKzR2WCPxXqKeq3krDTdj2ierpJEUtCIgOqxaUakwzNBR0D09yiqePHOjveyOkpxLr9VMXb73V97S/h3nDXx7Y2fdPkAYbncW1IgIDxy5vM7LZt/hgrnLtxyaBrJNxv/72N+6tuNhSLp+EVUZACKsyNnXHvHL+1qcgNf2KbSXu2bt9dcmS9qlzo/fARgcmCtpzB3b1/Vg5QiuslLowENyDWDn8cSjl98PgdBviu03N+rl9/WufLEwr18uDwLdevLTF1YK3xnVZ2HI1bUxrT7z5zTuXdRP78qCyeLUKYTUI25OXbm4JPO00TBj+6I7+db8ZL3ZwMOiYdG4dA1lN9HWte2iuI2NAVPapC8O/CGPR34Ip/AZIbIMo7yX8G9QMbcS09P+2b1vf5XgdrXaPfiYns9oeLLEd8D1/B7Dp0E1jGP042pXQj7RKf546cmGzp+tv1TRf6YQD35/QO3seP3xow5IfC9QqmM23naJ0ny9ysXwgq98BWc0kVhv/Nhalbqe8kd/Fr8MOSEr3zEVWrwyO3I29hl+E9LUHGf+nAXI6sGPdd8uV2YphIKnE5IyL6bLxk7cn3bdkHHefrpvJAExMZ1uBZmqeNzXtfzUzk/m/ens7LjV7Px+8d9e1579/44l0duZtge+Np5zEEw8c2pBu9na3YvtEwmrAqNE8IZvNHsep5//yjl3r/0O8yFOXbv0QCO05gP0JGIL+fjw+uj91YeRh/Dp/PtCDM7Zpfmjvjt6Xo7hW9ycmJjaYduf7Hdf/8HTGfa3rG9rYxLSWnsloPg7fijZV8oFM2Ja2a9t6EJd7bCztvHP7us4rrdD/r3/7ct9I99jEI4cOiQ3dIg2YEFYDgOUJDFj1e8TqX7cT4kImXuQr5279A4DeBEX8ayvprU4N3rovcALot/TH13T0fXDTJn0qXk4r3k9OTm4y7a6PzjjORzOOvn1kbEqbnEprPhRzwAKzwFLHk05hv6Yd6N+o3R6beG50aPSdr3qV6IJKkVp5ITIlXOCYn4Yexr0w/DO6YXymHFlR0e5r7tsM3fxgJbI6fW1ivTeT+SsYmr54cFff+5Cu5X+hb94Merp6/J/PusGvTE6724eGJ7RpSFOkKPCUZvBPBccoHBet3Rwe13rX9tw/PjXzZ5hKvr8SfhWKkeA2REAIa4GD6p0feRdWBnvxjv2PckVhVfBf4A29uG/X2i+Ui2eYn8n8NryuDr3jPfWSFV5k44UT137eshIP2K7/64cObbheqZ6lCp+Ydt8TBO7vTM5od1+/NR4SFVhoLpKKt410lnE8LTMzo3V2dLznxLkhYgQ9obiVjEDln7mVjEodfYcpw+MAsftg/7qSDbAnb97sCSb0Yei2fqOcbovVqKNnNO8HmAE9Cv3Wp+uoWjt27HpXNqH9WTKR+kBHKqEFbvo5y3N/avfu4g23R45f3WGa1k9ZicTd0zPTf/f6O7f8dT311Jp2fHzmgJlI/N70jPPe4bEZ6Kg4qw0lqlrLiNKBiLWerpTW25PUbkPXZViW62ecHz+4d8PXojTirzwEyhq8rTwYFtRjvpX/rlwJ+iSXugPbMuyKBOHo3geRJtuT7PujcmVUCuPJlhnL/9NUqvMD2eyM5sxMaIlE4n7XML907tyNjcxHQjty4sZv66Z1xEok/xNW5n4uZSf+8sT5m++vVO58wkEu5sR09pd9w/rWyET2vReujiqygrSopn/zKZN5qMeirotKeTyolm7p/+X06Wvr51ue5Gt9BISwFjiGsLl6N6SrvylXDNTK70D4mX071pwtF88w6Jd/DG/1E1u26NOV0pQL71y3/8PJVOcHMzPTWkcCH2YGOaTTaS2RTN6f1fQvvvDK1bdnbO2JZCr1SeRfn05Pa1PTU0gXJBKW+ecnzlxvCGndhFQ1NRP8bcY1/vjS9bF1V26MwHwsVKiXa3etYVw1TNhYJ3TDjQCO42jJVMcez7J+t9YyJF37ISCEtahjGjxkGDr2DJZ31D8h5vUQJL5RPkXlUMM07u3qSGidICvkzzuSlmlZb0olrK9hD9v9JCrPC196JoPMAolFg6CV+PPj54YeyWecx8Vk2v1Q0rSfhFT18LnBmzBRyNalp5qrSuq7kiAsh4SFa7oZ9M0wzI+cPHOjZPo9V1kS1z4ICGEt4lhiCvZrSa2jol7qzPXJPk6nIGbVbWfUvcr7hO9MP97ZVXpggOu6ajplYStj7l1XvbRMXbPAbp6HzSSBlkraNknrvfVCcPt2sHYi7f3pTDb47KUbYxuvKqkKpYBXKBnV869c3WgbDEixAck0FGFFfEzJzbIsO9C1TyrcymWWsLZGIHoW2rqTzdo5dXyykz0NC8l779i5vu4zwM+eHVntGP5jqVTq/6AkVc5NZ3wNH2lVxNWZNIukMSjiNd9z0+CHp5DXAdX4SAg203w8GB5IATtODHzdK8C15kEjhXvNS9rWA11dnfcMDY9prscss48RySakrOLWqODCoIKAgkuVgsS0urtD60haeV1YYVbbtjUn6/74HXvW/11huFy3PwKzT1r797Upe3jq4sib9u9Y+wxe+vh7W1N7jx49v6ZzbffnQD4/Cj1Pfjx54XiBls6GVuTUc9mQsOIO9mPQFdkIRlz4fy5JLm2ZMOqTcJaXIqpcqnixVe+rdbZ3dbc2OT0D0wZIibHSksmklslknvx+//q3PiKnXcTQae/b+LPQ3r1t0969cOL6G7o6E09qgZegdMJBpVQ1DbKCpyUt6oPKz/4NEJalCAuZFIuEVBJd+jgLh4rvAiFqUVGkhJZMWFp3Z0obGSu/d5gSnWmavuO6h+/cvYHSobgVgoAYjrb4QPMUiGtj1/79jBMkLBwiTlMASlYzTkhWCJyTrGAyMOFkst/BoYMmuIIyGJYcMXMMdNwHPhYN1qWS1t6ZLGaKZL8yzFXTr15BooLLMugHMBRNKgW+It8y9TEcJGt4rvcRFCCEVQbFdg0Swmrxkb0+cf2XOzq73kgdFieEXF2jdEUJKQH6SVWQrNjtZDKlpTPp38U58iUbthk/Ph7sN6zg/xudSGvD4xkq6otcnnjyF0XRRTflkyC0IIJE1JG0QbqGNpMNp5xFhRTcZDNoj66988SFm5vv3LX+WkGUXLYxAuXnCW3c4XbqGs9hwjv+a9lsuN+ahOJSCoLjNDAFvVUll0p1aNPp6adTweSflEszPO48oFn+4yOTmR+6enOshKyYhzWpf/jDuuf6x2aV/qNRaPG/1d0gUXWCA0uu7GhMmkqmerEc8KOVU0lMuyFQ+Ylut562YX9Sncmf7Ojo3BDZWbGLtMkiUVXSWTFNuMqWuYG530f7+/tnGFboxsfdd9mm8XdDo9O7rg6NFq0CFqZr5DWlK9qV0fZqGvZchSuPlevB2VmG/hOV4yWm3RAQwmrhEcW64qu4ykfJho52Vp3J8quBYQooqWDKADftBd6HD+5efyoKj/zR8ew/hWXY56/cnFh7a3RCTTGjuMX0SVB9qzu1qfQM+jO3dBW1g6uVSHv/qVNX10Vh4rc3AkJYLTy+WA/8ou9kJjo7bOh+DLVFZ64TEbCyBktxI5PJZj56R//Gx+NdH5vM4vuI+p8NXh9LjU1iw3EZhXc8TyPuuV9wDaaCfBjTM06N0hVWQmHBDzvSDZ5tvqYR7ZAymh8BIazmH6OKLbzv0KZvJEz3ZzEFnEolaEtV2XEaCLKadrIz//TQnk1/EU85NuH8th8Yf4j9gMZUOrNkZEVZCnsbtTU9KW18GqcKFyjh420sd2+j33pg3F8uTsLaDwEhrBYf04O7N/2t7/o/C2FoGnsIy/YGlvAwSfCvZzLOe+8oR1ZT3u/5uvHJC9dGtJlMrfqjslXVHwjpat2aLi2rjFFLjUSrFUjlO0juddXSSXx7ICCE1QbjiHO0/hofbPgwpnDTOR2V6hWNQqGUx34890noet5yaO+Gko3Y45PO7/uB/lvnrwxrWdha1absbgxo1FWtwplXqYSJY5Nn5lU3bLHQmGA/yko0plVSSjMjIITVzKNTR9sO7dv8RSeb/T9BWmMkKv4D+YzBXuljV7yxd+zfte6VeHGKrHTz4+cv38JWmyUmKzSGG5z7VndoE7kz3uPtq+Welvhwm39weVjOyaoFsBZPI4TV4gNY2Pw79mz8KyebeRIH+VEZTaX0sf27+v794TKmCxNTzr/2NOPj5wZBVjjdYSklq6jN69dyKuhqmWztivYob+RTSkPbe/xMdlMUJn77IiCE1W5jq+s4dYEO6mzsYAmvi/+CrH7LDYxPcBq4HGTFVcG1ULLT5orS1ULIkoSFI2cMHKG8obiXcteOCAhhtdmo6gaOh4EWWlkyYU9gvHswXfgV19d/7+LVkSWfBrItJJhObL/p7elQR8fUZnEV70XxPc01sM+xrzhU7toRgZIHuh07uZL6xA3LBaYB+Ar8rBsfz34YX1j+D5eu317QNGy2xPquSE4mDuXb2IujY2AgytNE67RiKFshzuwCR5s9ZSMlsK0QEMJqq+GkBKOF5yFzRoidK5BoFCeMjM/8mG+a//Xy0Li55KYLBRiTrGjwOQ1br4VMBQuKVJeQKVPxMLlvPwSEsNpsTEECmBLSgbHUpwD1YGwse59l2p+9fmuig4fiNZIowrqq/6Xeqm9Vh9JbjcOKvqFtACX7gV8kTVZvkaRoRQSEsFpx1OZoM2iKxxuHLtDcsZlgLzYZfv7m7XSv+r7fIm234XSP/8o5ktWqzqSyZr89PoXPYDTYkZvziw0NLluKayoEyq4iNVULpTF1IaDjHHZmoAW4aep9geN8fiLt998cGYdtVp7K6iqzXGJFUCAi7jdkuapsBJKcPBwgyP8YRyV7B04Q3dDbpY3jg6gupoMNla5U41BbUN9n0sr1ScKaHwEhrOYfo7paCAW0WiWknihhW/0Tabf/6tDtxpIVSIhGnz1dSXUkDL8fSHKi4/lWPId9Kp3Vxqegp8J/m9f14D6DQ/nmb281FwgkZ1Dj7bnSSFx7ICCE1R7jmO8FJJr8jCvjeNrIxFjDJBpKVaSlXhwDw384MyucBoLAGEfHI5ptO6n1YAq4FjorH9IWjUOnFlF3pj62aui3whbI33ZGQAir/UY3XCVEvzgdw/8NcSyGUhSlpVWQrFg2p39xp0JYLyIohaXxdZ2FGofG6yi85/QS32F0Asu8URgu1+2JgCjd22xcsVElPC85169Gaa1YTkRWJKpSqooBiQQzONvq9sRULKKxtzzAEJw1api2EFZjoW3K0oSwmnJY5tcoSD09HanEDztubnfO/IopyUWC6sUmZUpW5aSqkgwgK04DxxaZrFivacCaIdAuH9zaM1rSDgloOwSEsNpoSMenvU93dXb+EE5taFivKElRqd67qrNmsqIF+yjMF/i56MV2JqadYKxXMDXM6+4Wu04pf/kQEMJaPuwbWvPticwj4Il/NnTrdl7JrqaDC5wTUle1GmdWWVCw1+JotjA6PgnThsIdQrXknF8arkJi/+R355dbcrUaArU9ha3WqxXW3tHR9C5dN//T9eEJ3aGdUwP7T0V7F86Mr0VW4mF6o2NTS/ilaB2HDmb8wA2+08AuS1FNjIAQVhMPTi1NgwRkGKbxRxMz3uaJSRzVUkumOtLwo6Zc7aOkVdEhynN9NQ1cyuNqeEqD67mX9TXGyxXbJhFthYAQVosP58S0909czfqJqzdGODVqaG/IUbCWr2p0yukfp4FUtDfeir1yl8IPUGjPHFy/fqJyKolpJwSEsFp4NEfT6Z3YBvOp8MvMc0hAi9hHNQ1cBrJil5TUZxhfXsTuSdFNhoAQVpMNSD3NMTzzU1PZYAM/ProYkg3UV5rHT8lXmA7SwnwEq4FLLVkRI04HM+n0LdvzvlEPZpK2tREQwmrR8ZucCd7hePr7rw2N5PfxLUZXON1zHKz4kb0KnIttP6Njk8tyaimbwXPrsW/yq3v3bhoqaJZctjkCQlgtOMCYCnU4GedTI+NpQ32XbxH7QOmKG5nzdIWZJz8HNkKygqI9TmSL2JSiovGVn0A39c8WBcpN2yMghNWCQ4zPc0HRbr6GEs6chJFnmfl3knZO4/hmII1B6fiFG9br0s6qAeXPp2WUrhzHeXH/jr6n5pNf8rQuAkJYLTZ2kK7Wul7w6zeGx9DyUsZovOodOizosTg1TM9k1Wogpa7lIisOF+w48E/7E5B1Y/cgtdizsBKbK6c1tNioT6X9n3MDcyePOo7OoJqrC6S0+ZIYV+GSOHxvc18PJCxXG4ed13I727axqTp9yk9rX1jutkj9S4+ASFhLj/m8axwdDdbgELxfGsLpoZyqVXPVU1QugVJUV0dC27p+FaaBWWxknq6ceAljTNMiAf/BoUMbJpewWqmqSRAQCatJBqKWZpgJ731Zx9pJM4aK0hXe5vlKVFEbKFlxs3PvqpSSqpbzKztRm+gnEkktnU6/2GFMfa4wXK5XDgJCWC0y1iAR6/Z49iOjY7C5qkG6mk+3SFQGlEP8FFdnygrNFqBsn1OxP5+K5pGHbcBhqhT8fqu/v39mHkVIljZAQAirRQYx7Wj3Zj3tddQjVVJ4l50CMjHe8mqOTJCCvmoTyIrENXx7Uinbm4Gs2PZUqkObnp76i0N7N36tWl8kvn0RaGnCGhgILKPn3B3+xKVXDh8+nPseX3sOlpt13+P4uonv71WeDqLr1ampFB8S1JrulNaHc9rTMxltcpofOeWns0rTLkeIZUHRnpm5YibMf7kc9UudzYNAyyrd8ZLpWvfgQT8w+oyevXeo++bBtaEtQd9s1/ffRsV3I6eDJCp+nourgH04UZQnhIYfWm1o8xdUGCU8/E/bil89sH3dlQUVJplbHoGWJaxnXri2HTvd1nEEcCBS3z++MLi75UejQgcmJjL92ax/gNJPo6QekhVXAbdvXI3D+XQ1Bcxiu02zTAEjKFIdHTQS/S8Hd2/4YhQm/spFoCUJ6+mnL651gkwRQRmBt33gO+c3teNQYin/oG6aKX5rcKEukqqoWN+Ij5vy81v8UATDG0WGC21jlJ96K6wKPpWd8H8jChN/ZSPQcoR1+vTppJPS7iw3bIZl7n/++eFV5eJaOczX9Z2YvM1LPxWpocBHKv8qHHdMqSphGUqqahaThfj40ITBcbLnsDj6oXvu2bS4n96JVy73TYtASxHWo48GxrUx+5Cu+XY5RH3PMzLGxF0ktXLxrRoGNVPPfNtOolIrgElLGYH2wbZqcipdIFVFlDbfGhqfj9bskCaHHS/7gTt3r73Y+BqkxFZFoKUI6/C7Lu/Bl1jmlKB8PUhcHjHufuyxx/g5lbZw+BL7bX4EoiZqyS0T0uM0j1+82QSl+ua+bhxj7GjD2LicwWkLzaarigbKsmDJ7gcTmezMBw/t3ixntUfAiK8QaBmzhq8/f26j77pbaxo3w+jetPf1B5D2RE3pmzyR4/nH+Mti4Wx1dUrCHO0lSVGqskFUnakkpn6mhu086jgYHkWTW3Wbo4Tli6L5gqYHE47vfeDufVv+YflaIjU3KwItIWEdO3a9Szc0ElDNDqcLbHjmxas7a87QxAnX9ljfxcr+Mzs29ykpi1O8iJjoR/cm5o7dnUl89LRLW93dyWmVIip+Kp7pmlWqIvQ8Mga9Gslm3Efu3LX+K008HNK0ZUSgplnGMrZPGxgYsIKeXa/TA61jPu0w0+7xBx/cd3M+eZspD0wbDgWm+RXP13cODY/jWGKuGAb48jG+agNpilbqlKZoWDqDY2AyjtNUlupzYZlKpXgaxIVMNv0zd+/d+uxcaSVuZSPQ/IT13TN34QRvZW81n6HSDdMLUqmjh9tgd//Fi8OHEl3JL3Z2dh3MzGA7XU664llVWRz/QhLjNYmsmaWp/DjCjqIDdlaZTOZZ1/A+fGj7hjP5OLkQBMog0NSE9cSRszuswNhdpt31BRnazM3U9IuPHDrUuG+419eChqU+cvzqjp7u5P9KJpMPpqc51Zv9QntLkFQBEqZluVCw/7nhaP9i376+8YIouRQEyiLQtIQ1cPT8GjOw7vE8tyFtxBrb2MBXdh579FF99g0vC0nzB548ebNHT2l/aFmJj1BPBYyav9EFLaQ+jdPAVNL8/pZ13a8qiJLLOhAAjvrTRy/d0enbF+69d0tzHFhWR/vnk7Rple6mp+9uFFkRGF8LVj/08IUN8wGp2fIcPLh+4sCu9R+F3ucj0MLf4vaVVnChqYWmdaQS2jpY2vd0djh86Vqh7c3Yxm8dudTPxaW0lrn7yJEjZW0Tm7HdC2lT0xKW1xecgHE3FDWNcb7uDh6+r/96Y0prjlIO7ur7TOD5b3ayzt9ylY0Gl83qKFXZsCXrXdOlrV3djf2LBr556JOshLDmMWhPPXV6vav5O5jVxYLUhNl3iIbV8yiqpbI0bQcP85C2Xu0l3dczC0XUN4Pzb71339mFltOM+Q/0rzu5f2fvu1zH+QDOt3uZ0pbVRMRFouJK5qqeTkhVqyBdtdUmhGV5JI4cudrpd5kHiyp3tTU/8s6r+4rC2vCmaQmLWJO0Ep65INJK2tbpt75298U2HLuiLh3oX/95L+0/kHUyvwTieiUJHVEimVzy1UKeWMqv2pCoKEVFRNXT1aHawnBx80eAZj7TwcxdAc5Gi5fiaNnNT37nCk4xaV/X1IRF2B94YHt63qQVaCcfePX2K+07fMU9U7qtHev+xE/7r3cc70O+6w1gxuV0dHZiusgvJS/O7IskRXLs6KCxqj+B26t9a3uUREWi4plbQlTFYzXvu+7tB3EIUGel/L6e3TNw5NS8zYAqldss4YvzBC9C7559drAja3qvDoyg6pwCP+KBZaVOPPjazS1vMLpQKE9fuPnawDB+EqehPwzWuAuSl8LPg90WVxhJJPWQCUmPBAWTBEz1TFUGpqO3wYYvIPgr2az35a2b1/50V6f1e1NTlVcvEzB0xRekj67usu5FmS2/crvQcaol/zeeObfTSOj91dIq28PxiaOHDx9quy8LtQxhcZBqIS0Dhkl2l/3yA4e2j1Qb2JUUD1Iyz1waOQib0vsxKXsAFvH3wMB0JySwtZC+DBPTN5BOCEnhrI1BuKe9l6tIzsVCiD6E0DOabrwI2elZ09aP7N3aNxjheXvK+a1OENa0EFYEyYL9rz072Ju03ZpNQKj7Xd899cKhNrA9LASvZTY/s9GcHoK0XsrakLS8UklLxyl+/rj+/Qfu2367sJNyTS7SuZfneO7ffweBGScu3NwAqWgrTvTc5jjBZmw87tMCfRXYKQWOgula4OiBOQUZ7DZuhrAGdQXxV0zPuCaGnkv3VPGHOpPw7+QPR62OM5HhdNddGOeX2kmCbSnC4mDlSStVTFr4eLljdHV+702vWz9R66Cu5HS5h5hmHvz3QiOxwJTRo2BGgY06dm7OVhewYGAY6s75oD+ZDs4JPY9JyqSCQ7ABqftd5VFM3/j2Ja4mtsWpJQSq6ZXu5UZTKeJnsHpohiYPRqBn04nkS2+CQWW59BK2dAjwS0Y4IHDz2ERWG8Gnwm7iK9W3sFmbvrqGPzw6gW8eTmvTM07XmTPX28KYd7EQ3rjnvv1QFHbPt3zT9DcMPHd+13zzN1s+/hC2rKOo7NjeQdsxT5LEWrYjbdLw05eHtwWe9jl0542u62HZHZIVpalY/yIlP5X3MHYddLLZfy4fmYiBhNuB509vw+rG3tKY+kOwGHLi7W/cS91jS7v4s9TSnZHGLx8CICH9lXNDX+zpWfXuycnaBV2e3e567nAm4973qv0bzy1fD5qr5oEB7KXt0u7B3Loh7yhWVfypbOalh9+wr6U3mbfklLC5Hi1pDRE4ef7Wj+EEiZ+amqpvJT2bzWjJRLIPR3n9riA5i4DZg720DSIrlsrvHXSZ9p7ZGlrzSgirNcetqVp9/vz5FJTqj6JRejTdq6eBMzNpHP9s//QrF4bvrydfO6f1JrCX1mvcXlo98Kembjotr3wXwmrnp36J+pYNeh5JdqRem83O77gxkpxtW3bgOZ/g1HKJmt3U1Rw+3D+zrc89aunagnWzpq6PdxujLz388L4F78tdbtCEsJZ7BFq8/sHBoMPX/I9hyrGgnuDUUZzrnnz7yQu3HlxQQW2Ued++fZmJ1e5LoPB5k5ZpWCPXz+08du+99zrtAI0QVjuM4jL2YcIZeh+2+9wF49MFtYJSlgmHE0g/JlLWLJQPg7RmhtyXsJ18eja0tivsXhj6xy9ve/mRR5TRcG2ZmjyViN9NPkDN3Dz1FW5z9XM4i+s1ME1YcFNpUIrVLHzJzHnwjl0bn1twgW1UwPHjxxPXpztejR0HFTc+F3YXRwxdfdM9W08D0zrs4wtLaM5rkbCac1xaolWOvurhZIPIih0OdVm2haNTfqUlAFjCRnJP4HBn+iUqz6tVa2nGpTe/etsP2o2s2G8hrGqjL/FlEQC5GHghfplSUSMdvwaEA/9+4vjpa3c2stx2KIsfUek2dr+EuXNF2xEjSJx98w/tbFt7NiGsdniSl6EPp84O3W/Z1oPzXRms1GRKWdCJdeCIlJ+vlGYlh997r+70+EPH8NHJEtLCauCph+7bmj81ox1xEsJqx1Fdij4Zxi9AT2KSYBrtslgxhOD2gWOyz7AstFzx6zFHj1mGobYUYAgC9cHge3ddK5uhjQKFsNpoMJeqK6+8cm0X6noXiWUxHA8WxAdWNyQM45HFKL8dyiRpueM7jllmMGpnjO+1w9fNaxmXxiogaqlR0jQdAkeOBPjczrnOiQ6jw88ESSOA6KT7iQzOHEvavu1pZsLQg4QPP/DdZG9Xx/vWrOr+mfR03SvtNffdxleAQIgvTzjBT0w409Mpu2faufZy+vDhw5WPMa25dEnYqggIYbXqyNXY7i/jCyvdfmaVb5hdVsLp9LJGp43j1/1A7/RdvdMwPRzEboRnLVHe9vEvL3eXBOB4ZMta22H+TiqV2LJQ26u5u6Bju44Z3J7O/Lvp6cwPmBanOwQ4uNHRTWMK21bSvh1Mm642nTWCtKkH07rnTE72aOO0XZq7bIltVQSEsFp15HLthg5J/+aJE12m3tVjOPYq1/dW4cTjHnwMYhXOce8xDd3y/PJW6OpMdsTRVy4iK/rKMR/jwvz825VIHFzT3fkx13UW/dnhRy3GJyeeHEs7n1XNibUPFvY6vtGDw5vV9w0Vofn81qGhZfDhi3HX8SfQ/3HPMse9CWcCX0gel2OIFJIt+2fRH7qWRaYJG85NxldGzV4tGayFSLQ24+q9ULyu9gJfMU5ELTn6wUISTl03NHz1KzyiJLqmX657OLLdSJgoXTO7cBxyN172blier4YCvBsFdSNXV2dC35tKJrbzfPfFdjwvC/qs9MSMxxNRsSqmT6LhUDQHE+jUBE7UnATXTuLsrRn01K2l/x6+qItiR3TNG8V59KNB0DGSfNXGUXwJY2Gm+osNhpSvEBDCasIHgVLTt75/aQ0MnXpBNb2QgNYEntfr4wu/nBYpKQLtxtdwAh0SBX3VDe7nM/Ha5vf1Fb/CURS2bCTAWWuxR229qRsbQQQbUed61LfW14JVKKsTJ5sk8WUcHbtlNANyTOhgcmAGKH7p3m1FWpqtuZCu+LByVdKHVMjpKEQrBwIW9tnpXOIH+QTDSH/D9f0bmCLewDn1I4HmwtAypPDZ/oe9oXKf/aMPsWxSs/RR13FHrURiZE1gDR86tKHEdCDMKX+XCwEhrOVCvqBeHNaW6ui11/mWDtLQ1kEiWodXE4rwYgepAPssTPCMOjIdAk94TZ8pMZjch8HjDorGFUTUAwlkh64be0A9/ZCatiDZWtOyE7ClQmIdJICJFYhA+TRV4Fo5/QIHiUvrTEbkVRCxiJfsSBbfYk87OTExXxdazY5yUgiRKfpHQ1YSkONmAZY+gV4NIeVFfCXoLNA5h/Plb5LzWAyzF+IVXdNnvO/6GcsyhjC1vmWZ7s2pO3fdOqzriy9asnJxZREoerDLppDAhiIAEtCfO3F5rW0a6z1PX4/nf53nG5RqqrpieSnULEVh8cx4E7ugH78H8tG9eP/24oVezY+pkpA8b/abhPF8le75BqdsXUtaFeaTlTI2IByEoU1l8oq1mkokcZHElIRoWmpejMMCMyCvQXyy7JjjuUcgOl4tLCzCMpTHgFpcgkViX/dH/ax2Szf8m2Yqc/MN+1r7BM/C/rfCtRDWEozSkbMjq7NTY5t13dqE6dhG3wsSqlp+C9DDi0ifLrqmT1f6BgUaPjiHN0lJAGAfvpWcI4XjiHIMF6ocO/EjmMa9HeelQ1LT1PRpoce/sJwOTCQtc+kfGQp6Uxl+9JWtmL+jNEaJ0gKBgbsygR58B4sHfwV5aliVWg3vCHv6ymHcdG868IzrVsK6pnd71+/dsmXxbD3m3/W2ybn0T1/bQFe5I8euX+9ybuqbXMPbDA7ZCKV4uMOecyz+9OfmWvj9x9zEw6JW+JuOX298WhE6qtwLEV3TL1tb/AWj7sqwfqaro/sdmcyM+vBp2XzzDEzaBiQsNH+e+eeTjQ+ohwqnG0BYhfVzNYKrkOmpyauYYH8KvD8G6RPBszrC6Jq+ystl0ghzXEZjR5+O4+iZwTh+eG7Yqa5rq/3hGzzTSkXKn4YgIITVABjBP+ZzP7i8ydasrZCetuCHvIvFRs92SEdlpnCYE2LOQi12OA7RNf1yjrphHIyE9yOXPnfNMDg70DpdTf8DWDKs5rRvMVwChAWrUgh21HzllD0NrigqlxKVC7bKQuOOWeGiuI7OTkhb6T8C/Xw3xkel9cXxj6eIxiY3Hhx3X9dHsWJwDaa3l1+zd9Mt/F4tUk/ijWnP+/DBb8++LWqvnh0c7NDGta0pO7kl6zpb8AJzEUr91kYEFdeBRCt69Nm4+AsSl6jwjVGckY6VwPwUpLhLURx9xliWvxFHi/w+zB0SWCnLsVpxnoXesSI2ngp4zmRJXPgf/0IleGH51R6uwjeX5MR76qtITh7+8N9Cp4GF7Sm8Zl1s35pVXVomm/5c1vG+Wm284njHJeJq44/FjixUAld8w7uijW6+xo3MhW2S6+oIVHumqpewglJ87+LFtcFUcqur+1vxwPcZJqYPMOyhXw6GKI4+4/GwQpjCBhe+6XDIpFb06PM+np5hhS5eXzw9bLJ2pBLGv4Fe36BU4kA6IQGw8MUY6MJywVeqDs54Z69zrWdY7jI3G1ZtUiSV6zzDI3IqLLew/wu9jspl+yywrA1pEed5QceXPT3jBb/DLrA5ua5UHZ/4eMTbFx+fwvE3DJO8fANrjlctL7giJhRx9MrfR89R+VgJ1Y6currONuwd0FNsxwtV02mPlWGLy1TxlPHf6Hh8PH9xesvw9yRM+5PIRT2ZIgVKKZxWUY/PT8aTFPji0i3m4Ed1hDWV/7uY9bNGtiGqAyorJRWSqCgdkrQiR5KddrwPlsq8xfhG6efvx8dvtiQczDdmmPaldDBxSVYeZ3GJXxUMWzxq5d4fPz7Ym7X1HTAL2A7NqtJHEQ3qtCPjw3LoxB/v+OMZ5VVzR5aHWRuErYA+y4uu6fM+Xl9J/lh7bFvbY+vmv0bWos9tsXAWSLIiaSnyApHxJz6SbFSFuXTw8i86r5vVRW1m+6IHmUREAuI0lcREP5q2ztWPrO9/YK54xsXHI56+cePvj3qBfimZNS+J5FWMcrjptThsRd4dPX9+DcwEd5iQphwozfkCwJKaLv9ewHYKeicfSudwShcnJDBBOD3MTwGRO0cqLIj73jQTaejDBYaPHTBgJ/i5+HyYijd95sFhRzkzB7yL2IrCtGwezj9nOQVTUlfPwiicifnu5J0qHHd8mXHIG6ZD7JQqIk9kJK6QwAokMWRUhMaSeJ0vcfaiXNhs7PyuwpYV51Vh+EM/Pu2M9GckpyiOuZm2Wvtom+Y4me8xPbvIIujzPu6Wbvyt1ejL3U7Sv/v754ZHsORwaX3KGdwiJhO5pzY+Mivk/urVq52jTnIXlEc78LKu8qAMx/G8kHhyOicosz0ovM3IrIDKb15HSvDoOoqv+hMLYCOWI8ash0vmufryZVcqLz4u8fym3ov1xT/EVp4UDUTn4/iS0xW+sZTMojASmLqGp64iH4FRXJQ2TKj+lv7JVRTVxwQkm9APyaboGnGMzSVR6VR87ipsVT645ovOzi5tamb6zzB1/nqzjz+s9YetwLioZW5C8jq08K9+1IxS8yQsfF6ap1WL2BK8VOaJc6NbPcPrx7wJ++hmHQUPvOaQgMJ3ETtVlERDP0wVsQ19uPgcLQyt/Dc+p4jlL6k/1xa2qVyh5ApEzEoErm/DsPOTXV3de6anq36roFyRdYWVbVSshHJEMt98saIXfIu9koplYZL6m/hUz7kS/Jt0/PE8+Jj6X/Y6k+fv2tA1BKIvB/OC8WnGAmp5dpqx3XW36fjgYK/upXbhFd+BrRlqn16MfkrspkoC4hnirYjbUVWzs4rHx8uL3cerjwt0TA4RcBcsuX8Rn97q54okVsCKJJ9YkSvy1gJR4aOtnAr6OJP+L13d+BKBKMEzHhAfgDh6yzD+vqHjTDDvYpAxLqwEfVdbE9bpIEi6V27tdLP+LnzPrWS/XrRTnz5d4e79+LNY7r4kP+Z7Jv7z1LyPL0B4Tb+ci9cXLy+eJ54e8Rw//rqqcUR+HOrgYVprJbBl5E2w63oI64J7k8mUDZLGhmAXs19ucVkxP8gKQu4ptCxbMy2TW3KAGI4u1P207ztH3CDx/7bL+Cdse8h1Zy5ev7Dp8uHD7blJuy0J69TV8XW6l92Dl3cbLG6g98idbhDgdANcY1ZY9o2N4mpNr96GRf1Da3Wui0RW69F1bWslvp81LD2xDTOGu9DhQzBc7AcYfYlkAqo6A6ozqHNBYJTESGitTGShsp0qQSxT4AcoPJQw0LBlEPhBFakHDjoLvY+XgVIyg7WK77tG8n9pvpHXBbXL+OMBd7FN6KLu+uf27esbX9RHdIkLbxvCGhgYsDb3v2a7obt7YHakpKmYiqgE2ioqJbzIOszXcSov/DAzRRNehyJKvPx4+igv/ZLKEaCkoZxUFMYXE1I8f7Xyq/UHp9CkAlfbCF3NdlhS7IQguA0N2wiJYy1ktC5IISb1Okr5jSYruy2SGlYkIkKLSC3yy/WrUWGzSnjaTUX/QEhYQuNewLCdwBFKRkpOuAfr4sBnwwfDg6B0MHagORhBHNqHw5WxTwYav6lAt/42MBLfrYZXHO9w3Ftr/B0Hp0pY+tkD29ddAz5ln8NGjddSlNPyhHV8aKjbzAS7Dd3egRcvgRHJWyrHASw9Pyp+vlSxEluH0jWAGQF9VVZMpxHVRZ/xSKQU4PR5Xy0+/sLQZCFS9DN/XKtSeh5WrL2x+sMyZv+W67+vwz5eC7oDx12rm9pakNg639B68XL3Qh+2Bm94DySxHhg0daBHSQhiCbyyyMS9SDi8RhEHyYP1qD9qak0S4VGn5VYrSTRKEkKHWYYiHuQmCYb/YKYLqS+3H5LYckxJmz6qhSYJ5yNgzgtuclESpncBfN8Fj3lgJdCSGpHcGECoxrouMoHjzO+4evLLMB1VKxJV8Wyj8Q80Ix043jnTu32hlTdkh08Yn7UWcnio9Qs3pzZm0lN7LCOxIdIZxbuQ1+lAVFFxJB7aMeUIiPkiPRPjo2v6dPF4FVjHnxi/oQK0Az/bymf5uI7ayGLj6eM63nrbF5VNXzV7nv3HViQL3JAEaSV1z0iBNJIgJBCYkSKJYbdjEiSHw7a0BI5s6QBBbINUswMUsQ6E11UojZGccA9dcZDBdQY+TgyFTgkiEKYyIBvstAQzIRk8cBJ+A2j4gZFDFWAqjAp3V5IhQYYwwUJ57ByS0QINzMYK8FyrRxt3KNbXb2qG/UVNT5wDyCt6/A0boGbdqzPA4tD21SPquWihPy1FWHjQzYs3xnZkM95ePIZd8RccBx1xez/UPowp46I4+uVcLD9/8Plq0Gfy6Jp+uez5uqPyY+UtNN5DuVQc06drpv4bIDXsjtsMpdkOSC79QK4Xog3PzwF4IBNCBiIhpBSpoE8jioqWaM2KCRuOqwLXgIQItKIe0lCYD/lZjoqgGIo0+J++SsmMKA8eqQ21qHuUh2PfzQHN6vgG6vVK8GfmQhcbr3Yff+AEi3rtdCtNF8u/eIWD2ATXx4Mg0XH1Vr/hm7sDQw8PvyvTrriKWocEE0C6oM/kJRJHrAykgj6WGlq+JUifu6YfS6pu4/UVa6AgQcXKi78ApekhcWFBwMstEkTX9MvVHw+Lt2ex+4+Pg62CxgsHEwZbAdgWIJfA+ICkfDRYtyAwWWB7Ay8F8VT/KB0bOJ4Gx/CQfUKSwZGrJJs8iZHYgB0zMB+zk8hopQ8hEcEog2ERASIBAOL5fIrVIKLxXKtzKPZLgZUckvGf+/nH5HsK0+Uz3316zeAjj3D23Lwu90w0ZwNpiZ72UnvwfO/AXIFnXfLBxLOsHn6yiLqmr3oQ04LHX9hq6TFHI6txrlYWkHj98UT1lh8vryR/rIKq6aO204drdP8hRWF3itmLUw42QnW1CSTSA2IAIXkWOBYKLWw8wjVqNkEaFqjFwLQNJhWI4ZiFoiq6QX0SbsEo6HMoWVFCYprwjw6FP65BXCSoXJwiOwpnFK9A6yiWkQhRDwA9XAfpwLS/AqnqSKP7jwapquiznXFXMn6x8Yg/X/HySvLHKqiaPlZfvf0H6BloAM/v3tpzHkJwUx59Uxb4GE5Lfnt2ZGS16SX3+F5mq4llfegtwnaSR6J5EC8hPUV6IDaS6aDnoZ5DpYe6AtdgOr4pyhXLNPH0KKCo/DDP7N+S+mI6qHzbQr7AbdgW+iylWn0l5cf6E29ftfSN6L9lGl04x30tOtMHklmLhxpClW9BL4S1T+i2uNPRp+0FflD0AN9A9LHnmHGBBfJCE3QL9ALiguoJqiu+64gDzWGIIAlhzhaSDsMV/yjJi3BxyY9khP9BXBSzEMY/AFORGMmM1yyKZfmm+ZKuJf4uMHV1THEj+o+S864E7zYd/8Dliqp2MamvPbt9uw4dY/M4DnXTuMuXx/scK9iHLcbryzfKwvOJBSGNPl10Tb8WV0xYyMFymDdXXv46Kq+ueChJQI4WlSUqf8StOf5CNdXqr9afxe8/Gm6AoLAqGKyCGLSG350ACFzKM2FvaeOseEhFOsjItdQ2S6wYYmkOdl2+CfLBvmpIV55vYY2Qn6uAxAWC40zbhxSmWArcQj0TSIiSU37mx0kgVesgLereOSz8E5EWJa6Qzyh1hZEcO7xY4Ct9WLfNvwa+5xA2h6uGP6vMPxMsZ8WNf0Gf+cOCw9usq51a5+kNG9Sn1IjJsjoO0LI7EpVra/vxhPdFs7JyjYriohlbTAKGxO1C6oJEljseOLqmTxfPX66OucJK66OUNzuDjK7p05UIbGwX25I/vrj4BYrnD0uZ/Rtvfzz9fPsPIkgkbL0DZNMFRVEHFEY2ZCBTcwMLdfCsCCVN4SwpE9YG+ARNgD24IDHYSYB1yNCYDkLRFoC8oOUG40AKQx5IYyAmlQ6SF7dDoSof0hbJiApzqLs43aPc5UG+AvVQ/4T7nGQFQiJ5kdbAkmgH2Sz0FaWB4gLrad22v4nmuvPt/yzCc1+V4t0e4z93r8PYwDCvNANxLSthkai0jmCf5+jq6y6Y4SkjTfoKprgWufj9Dg3AozBmiK7pl3H8WDH3u0YfLY6u6c/HVS2vSvsxoygyTF2q/qNenEyjJ5NJPYGPRidME1M1/JYqwyoNq32Ihu4J0z5M+WA2DoqwEI9wfmEaEhQJzPNsKNOh0jJwrfRVJqbnNOrC6IGwQFzgHiKrpCuq2kE+FizrMXWE7IWCEKemg7hSiimOQchNIC3EchqpHlBO95TshQThkwF5TL9k+Mm/MZLGzVo3AlQdLzagDle1vCYd/wU9/5Z5ZcyZPnNow/J8ZHZZCGtsbKw3rdn7nIzTx42o0WfP1cPKuYJ6XPFs5q7p8zmKx5v8cdcxDeMPOR1fj+gh4X10TV/dukiC+nJPeLy8eH1hrtm/UVvpKxcrP2oL/dlcs1eQ9PCeo73wGcp+R2Xyvlp74vH19B9EkoA2CYKUlcQqJCQj6vkoyBjh/IurcJiy4Zxy2FMptRBO7sK3kClR0UYUZAX+wMqfC1ICiYHMYBsKSQsSFKaAUEqZLoiK00ASFsgpN0UEUWE6yOkiiArE6NmUb91OWwAAEuNJREFUszCNxA0c/uBoF04W86YOarWQAYjGmHBBEIkUiXEqib025hNmInWknv6zKo77Sh3/RvcfSx5Xl4O4yr5Y7NxiuEEQFT4uvs8yrF5VvosX28LLS185vsiRHkc9YPiJtrCbJIzHyx3gJdfpl80flZWPR6qIxJghus7xjSqj4E9UNn2VvN76Csqq6XIR+48OYEeGlcAaXhLfQwxNQcgQEI9IErOOxBUuCuDLz9Arm5iyOTaYy7Jty8hAb2VCm43ZmwnwQTbgFpAWyA4SGEKhaMdgYNpngKAcpeMCAfFjYGE4yAqco3RZ0LorUqOkxVkf6AgzvFBPFbISSsOUD+WRrWijpcwbmI4Gomj4yxAIv4bPVU+q9sfxk/EP36UlfP49N3vNWr/m9CZdX/zzjDDofAoW3XHVr9NPHdB8p2+uORl/mjFLUktMbBTtkSJbpLCRxYyD5OpJps/4+DJuvq5IIgoLqfi3pLzcRuloM7QSzKImsBSWG80LVKkxkSvOkFHaCjL5QvrPN9rwvaSVtEg2ICmQCNRQkGjwnlOpNktMxdds+GxcRFrIyCmhTQMEUJjl4qwtzPbAOVC8o0DUZroGiMmBpEUfRBZ4DvRUJC4/1GOpij1ML9XU0PJdFxIZGsOpJkkOQ0YdFh5CPodKl0WfRqQkVUhTIEf1iN4GkdJU4Rx/xsJfHkpfMv4cd+IAUJb1+YdkfSU7NXp6+/bti7qquKiEdfVq0Gl2TO2DonYzAcUTCv0slCB8FuGia/q8j7iAPl30aNIPHVKq55w+00MvjFLo05WmV8H5P9XLzydVF/H0xbGl9UGfjm226B98po2u6fO+0f3H9M7SbT1h+FoS00ybSmm+5/RZHxzbwWvVHtSvNuLRR4BKl0vPtHRhWh1SESUsNBkH0qjvNiAx4MA1JDBc4yBmTPmwJArJCFM+dA1SE5XsmFIqRTzKUrZYkMio78IUkauFoW6Mcbin1GWrOR8nqOEUEUQFmuK3ZdEw6NFg92s9j3XLp0CIsAuS8VdPkcKhCZ9/KAc81x/c3NdzFjy6KHZc0YPNh7VhDg9jYnh4co9n2dvx1nLalys7Rimx2xLGigfEJBQ0Xr149FkBVb04BQiTlPAFbTiDxRGKM1pJf5AgarPKG0sQu413N07hkCANO5m0fSebtCwziW5DqMISHTRMJCDF23inYbmsauNCHq+Vn1ta5dErzKN8psP/RiIXVpAegKJQ30Y06AQSEXdAIpdL0wbTNsLpoSIeCwRJHZYBpTusIFAIlPC0iqL5AxoCcmLPQkkLdITRCc0dSFqQD1A51g4pLOXmhZCwDMO2BpH9q6ZtDoU4oKQIy5yEynFnv+mzw+0+/q3Sf5yT4aYs89zq1alLIK7wYeQANcCpgW5AOaqIARzxcudrXrMTz+cuFAxBI1Rw06eLKz3xsnDikt+Mmr9mWBlXrbySeJAlTt8MXJImXHRNv0zx2GpWZ3r0KKqzXHlRHH26+fQf+mkbg56ADjppUuihMJl7BEhGtmnj+4Phj1lEUAzjaQcgJkzcqPPmlI/yjdJV8Trf/+hbeYyP0uMS0zSVF8SEaSELxkhR6a7IC1IVHkNMBWEkCljxYQ7YXgWKrDCHw2ohJDDKSkr5Tst3TANBp7DdgkTFKSOpxYMtV2i3hXQoJjwbBo3L4oibAajdXmSbCl01PEvi6x3PetMvwfi3cv+xHpPRk8GZvo6Oq5y5FvZlvtfqQZ5v5igfH7iRdHqrn/H24McyEb6ejCUxkCwqEATi8JDNKtWRIxI6wrLj+aOyQgIqLT/KTZ+OLYnCFGHE60PdSgzIgVmcfrbt5evjYkB97VeNyv8plx/UYoChElhYgB7KtD3PAUWRpejIVNzNAjNzyDuYRqnrMF5dIx4CkTrlAJQRps2FhZIX5lqYwfFLOygTBeSmkUhDEgNvIC7MR5ML6JhozoCpn+858G1utbH4j7BRT0Z9VlZzbTyOKJCKeCjkqYbkFBJh+DXCPVcKuXKIFURlm8WBoZSFOBCYmk6i33ioT+Kw1CegEMspcFfe+M8+rRySNum/YUwm9I7TPT04NWOBDg/nwtz16xMbEp3mPswIOuI6G7wBSlynz1pQWZEIP0smIcEEWN3QsfJDn+nj9FFSPh73wilgdE2f+eOumo4pPqWI2kI/LKu4RVXLq7H/kJopRUFhnkj4joNT9KC/BlZgAIVD1I+cwASVUBgCIsF1KEQxJLpGPKHGP5LYrAs5ikREnmJ61KF4K5cG1+REVS6HC1JauGroYYcOrLWUEp6MSF0UpoZgK5hV2dgEzeNLYbMBnRQZEUPnOwGMT6GOp57Kg/0WTCMYjnsQHpDmlJFTR5IcNt/alvV1PdF5NsKcLSpGG03L6QcjnWDpeIXqgFYb//A9wGi1+fMPDeqY7nae6uvT530KKp+JebkhHJyX6Fqz33X83tCgRr1d6gXBH+XnFtEwDmEVMBfAtbK7UvHxVTb1gGLQokbFVBZMDtUJHmT+dsPxmqSRU2nkrxkWxhfbOfEVwLov4sIaonSRr1qZy6vy8xliPbn+qPjYHxSm6mJwdB357DfaVtJ/BMLeW0/ayVQSR6TA5AB7h8kwmFeRrFBUSFYkJk7GsM+F5SuiCQmFBEriCskHYcxfEM9ozBjBS/yaKD//rBzndjD3BHswAcmqwFdhOWGugCw5owwpEt9sxMlVGWQEK4GlcAOi1XAcL6eLICfdcMFmNDnH7xdO/YTCHTkxM2B6EiSPbuXmHrZO5eJy4Iu6lfo2Gu8orFfA+PM9UMjnHpBIx9v+/Q9Wm8nMfcMTE1d7u7vP4Ec6fzy1wqOGP3xI63JHjgT2/rsy/boTbMP0pe78dVUWS5wjK0VUjIqNN3kA62ZYeIcfxofXDFNFUZBTT4W6m71mWBlXrb4yWSoEYWh0jVIUdJEmzA6o18mRDN7dCplCEkK8IiP4WRAU9OO8j5wimZB3SAhKYlJEphLkJCaSEP7PEdxsfVG5UWFxP6qPPngTlvBED6IWLN8dTPmg8ocFPPRXWBdlFWqqCEmLlhAgLRtKdLaAkpQNfRUM6DUQGOUiTimNEaT7FvRVw/F6K91XG4/mHf9KPaovvJ36jzfSS1mpc6mUdhnvhZL4a0GjZsKBKK+n0+kt0AHvztCAsIzjeeAeUKVPF1l101cBWCICxcGmcPalUeHRnyguIsJYej79fFnpKxdjrKhu+spVK69Ke+OW6SXlh7Xk/8b7D5umJKY6nUiQAEmp5ZKoD5Ay8kTFzcAsJIrL+ZREYCWAaU4ubXRNP8wfpuSuGubHMwCJhSuGPCiYJIMw5GV6xkfY0Wd+WoPiBAlEhvnzNluw3SKZYTkQHIQ5J1RQDg7Lw/QQGUIdFp4wcC9KgQ/7KkxjucEHROVmc3ZaCFfEjMxUvlPvBZ0WhT1Q1zG06hQKyGPA9qEh4bPRJuO/0p//WvoPyXpa77BPr9L1mn64QiJRT0vlP3jg1oyn0/th1dnN6VOkQyh8wVRuPpLUH9GHi+sckD4vLaj43NSHLwfv8cKjbGxdgc97JUpFpIRbpovKYHTUltkpHYkyEqNYf1gWfZU+Vn+JiMZERS4qKyTAMv1hmwoItLT/aL6OL9cn8A4mknhDkR5CUuh43ExhAXjnIQVxRQ9UwnU1JM73meHISINzlY/1Ir3jwNQBtui5IpU3K2mFZbEUEhgJiHlZhkqI8rws7hPFxBHlZ5romu1CGRSv2HyQEQiLPkwefJcSk2o0mU+F8Z46KswbKd8qvRUWiq7BsuoYlF/q+Jd839p4/KNnFHhw+Fbc819r/y3dHO7qsk9D2lLPBvEq59SLXC6CYSCq1OTk5F48g+FxLyQSvvyzhFK8taaYL1ACiYdkkSOg/HVO4irmAySLlR8+yHy5wnaWysTF7YmnRxdyecMXFDcxx3KjNCUEGUtb2r4Iixwh5qebxEG58v2Hkh0ERqlLp5kClNLkngLSyF8XExrZi089SYbFm9DRg1FCbEKyoxQE8sqFkTOgTwrDVIPCP/k8qpRcGrxMEXmxnpwjUeXbhjpgA2bBNsp0HPQWOiwNOnddw5YcNIdSFyzTlUKehEbrLDxDNn7osjCXPw5FO22qgPfKHn/pf8XxxxetvSvYlX8BxBVKCdGDmPPDhz0W+Oijjxof//jHt+Hh2oko/qKqFx4l0BJQmQIwS3RNn/fxZXqGFbq4nQzimI9tKFs+S1S1KJ9XoQkEfUQwtKg98fSzefMMwmx5F28/IqK2RLjM2b54/gX0H0v6+IiDZSVgHJogfYWNzDMUpCtsUkKg4pKIUJAsnNTlkjNWzfBCPMOhi8JAiCSqPBmyMFVQ1OdctQwLywNZ5cPCpDl80D6IhjzBASQF0sUeREpSJCyE4ceSpJXbEO2612AHepaTSRn/YrtEAD3n8xV/ntv4+S96nyGRO9gccQZmEPiBK3bRi5kPHcG+v2T32n2+53bxNY8oQyWIB0SR9OmqxMeTh5lm/8azx8srEbCQNSqTpUTX+eagwCiPqiWeQAXO/olHV2tPaYUFjWCxsQJjt7MV564K6iOB2Xj1adNGa3PqDMFl4XwSSnAQCUIibqFPlwtTwbiOkoSR+JvLx3KYv9BXaSrlLyifSegQBNMFTAWhiIeFArRZnoX+8Y2EzKhbnuNlYO9wFpZXkwoH5Kmj/6qOFTz+0n8+Y4Y/2pVIcJqY35+YJ6wjEN33ZzL9kPY3hWjx6Sv+RcByLIQAZZYQJSn2C944FRF/QkvjQ31XZDcV04GVPOGl+WdJEhVGbaNPV3d7Va7ZP83U/1ACgzTjkg4gjUFvHhGWkrPAPnnBLNeFSEKKfAbzOu9yBAUdVj6cZURpZuU3XOUILioD93x2IEnxxFGc9c6M+M93cHSNZVzHquBQDeMn4x898wQ2us7pgGvAbyU8/z5e5EupVEqtJirCgp4KHxVI7sbrQIYKHyKF3+yvIvEEX8FsQNk9qXwgBpgQwNo7p9OKrukzfdzF08+WTmYrV35YF+tU8bEpYImInGtLVH+8PkzZ8iQcVpjrawXCLOHH5uo/9JmWjbXHJMQcNhVW8bOklbsumnJw7Q+cgtVK2mJxAUNNKKncp54KHuzAwnjCE01B1UIHA1A80ik/IkdIfTj6mE8MXh2sSKZhdHUd+IcDykwFLj4eMv7Fv+il75c8/xEmeHaojD+jZ4LgbsPVVvO5iutg4oSAFCCiAqVp/jrUKRU8mzVexsube05ff3tiD0Q1wkP/ojrYgeiaftiheHsjLKL4GrudTxYvb0H9h94bpzeAwCD4cAqJf5SmlBjFH5D8ChVC1Q8KyIkrjtgbE64y4lqtINJHel5Hq4q4ZdsYzsWBWaU+rkFWtFzQbiNNnWciNbT/qD4+Hitq/FdE/3mWzmvQU+W4hZZPenQuRHRNfylcvfVjpUqz0Tj6dNE1/fm4euufTx1z5am3/hr6z6lj9A9ElneKwPJ3IYEVEpqKys0YFeUhoDBP4TV/+bjVIkfqKuu8/ixC/+tqR73111V4DYnrrb+G8a+h1tkk9dY/m7MxV7XUzwdP3ApBgCYG6Co+L6/+kcB4X0g0ERFFzwXjojBc5q8ZhqOKtWEoROmLEwSWBIHowVySyqSS5kIABEYhisRFEov8SgRWGD6K9OMgq8IwBIkTBBYXASGsxcW3pUoHgfF5iIiLPv9x+03kuLxMqaqsUj1KJL4gsFgICGEtFrJtUG6OwDhtJHHhqLOl+dBAG0AnXRAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBIGVhMD/D0fV/fpMMM+gAAAAAElFTkSuQmCC"
  1114. }
  1115. };
  1116. const NoticeBar = {
  1117. // noticeBar
  1118. noticeBar: {
  1119. text: () => [],
  1120. direction: "row",
  1121. step: false,
  1122. icon: "volume",
  1123. mode: "",
  1124. color: "#f9ae3d",
  1125. bgColor: "#fdf6ec",
  1126. speed: 80,
  1127. fontSize: 14,
  1128. duration: 2e3,
  1129. disableTouch: true,
  1130. url: "",
  1131. linkType: "navigateTo"
  1132. }
  1133. };
  1134. const Notify = {
  1135. // notify组件
  1136. notify: {
  1137. top: 0,
  1138. type: "primary",
  1139. color: "#ffffff",
  1140. bgColor: "",
  1141. message: "",
  1142. duration: 3e3,
  1143. fontSize: 15,
  1144. safeAreaInsetTop: false
  1145. }
  1146. };
  1147. const NumberBox = {
  1148. // 步进器组件
  1149. numberBox: {
  1150. name: "",
  1151. value: 0,
  1152. min: 1,
  1153. max: Number.MAX_SAFE_INTEGER,
  1154. step: 1,
  1155. integer: false,
  1156. disabled: false,
  1157. disabledInput: false,
  1158. asyncChange: false,
  1159. inputWidth: 35,
  1160. showMinus: true,
  1161. showPlus: true,
  1162. decimalLength: null,
  1163. longPress: true,
  1164. color: "#323233",
  1165. buttonSize: 30,
  1166. bgColor: "#EBECEE",
  1167. cursorSpacing: 100,
  1168. disableMinus: false,
  1169. disablePlus: false,
  1170. iconStyle: ""
  1171. }
  1172. };
  1173. const NumberKeyboard = {
  1174. // 数字键盘
  1175. numberKeyboard: {
  1176. mode: "number",
  1177. dotDisabled: false,
  1178. random: false
  1179. }
  1180. };
  1181. const Overlay = {
  1182. // overlay组件
  1183. overlay: {
  1184. show: false,
  1185. zIndex: 10070,
  1186. duration: 300,
  1187. opacity: 0.5
  1188. }
  1189. };
  1190. const Parse = {
  1191. // parse
  1192. parse: {
  1193. copyLink: true,
  1194. errorImg: "",
  1195. lazyLoad: false,
  1196. loadingImg: "",
  1197. pauseVideo: true,
  1198. previewImg: true,
  1199. setTitle: true,
  1200. showImgMenu: true
  1201. }
  1202. };
  1203. const Picker = {
  1204. // picker
  1205. picker: {
  1206. show: false,
  1207. showToolbar: true,
  1208. title: "",
  1209. columns: () => [],
  1210. loading: false,
  1211. itemHeight: 44,
  1212. cancelText: "取消",
  1213. confirmText: "确定",
  1214. cancelColor: "#909193",
  1215. confirmColor: "#3c9cff",
  1216. visibleItemCount: 5,
  1217. keyName: "text",
  1218. closeOnClickOverlay: false,
  1219. defaultIndex: () => [],
  1220. immediateChange: false
  1221. }
  1222. };
  1223. const Popup = {
  1224. // popup组件
  1225. popup: {
  1226. show: false,
  1227. overlay: true,
  1228. mode: "bottom",
  1229. duration: 300,
  1230. closeable: false,
  1231. overlayStyle: () => {
  1232. },
  1233. closeOnClickOverlay: true,
  1234. zIndex: 10075,
  1235. safeAreaInsetBottom: true,
  1236. safeAreaInsetTop: false,
  1237. closeIconPos: "top-right",
  1238. round: 0,
  1239. zoom: true,
  1240. bgColor: "",
  1241. overlayOpacity: 0.5
  1242. }
  1243. };
  1244. const Radio = {
  1245. // radio组件
  1246. radio: {
  1247. name: "",
  1248. shape: "",
  1249. disabled: "",
  1250. labelDisabled: "",
  1251. activeColor: "",
  1252. inactiveColor: "",
  1253. iconSize: "",
  1254. labelSize: "",
  1255. label: "",
  1256. labelColor: "",
  1257. size: "",
  1258. iconColor: "",
  1259. placement: ""
  1260. }
  1261. };
  1262. const RadioGroup = {
  1263. // radio-group组件
  1264. radioGroup: {
  1265. value: "",
  1266. disabled: false,
  1267. shape: "circle",
  1268. activeColor: "#2979ff",
  1269. inactiveColor: "#c8c9cc",
  1270. name: "",
  1271. size: 18,
  1272. placement: "row",
  1273. label: "",
  1274. labelColor: "#303133",
  1275. labelSize: 14,
  1276. labelDisabled: false,
  1277. iconColor: "#ffffff",
  1278. iconSize: 12,
  1279. borderBottom: false,
  1280. iconPlacement: "left"
  1281. }
  1282. };
  1283. const Rate = {
  1284. // rate组件
  1285. rate: {
  1286. value: 1,
  1287. count: 5,
  1288. disabled: false,
  1289. size: 18,
  1290. inactiveColor: "#b2b2b2",
  1291. activeColor: "#FA3534",
  1292. gutter: 4,
  1293. minCount: 1,
  1294. allowHalf: false,
  1295. activeIcon: "star-fill",
  1296. inactiveIcon: "star",
  1297. touchable: true
  1298. }
  1299. };
  1300. const ReadMore = {
  1301. // readMore
  1302. readMore: {
  1303. showHeight: 400,
  1304. toggle: false,
  1305. closeText: "展开阅读全文",
  1306. openText: "收起",
  1307. color: "#2979ff",
  1308. fontSize: 14,
  1309. textIndent: "2em",
  1310. name: ""
  1311. }
  1312. };
  1313. const Row = {
  1314. // row
  1315. row: {
  1316. gutter: 0,
  1317. justify: "start",
  1318. align: "center"
  1319. }
  1320. };
  1321. const RowNotice = {
  1322. // rowNotice
  1323. rowNotice: {
  1324. text: "",
  1325. icon: "volume",
  1326. mode: "",
  1327. color: "#f9ae3d",
  1328. bgColor: "#fdf6ec",
  1329. fontSize: 14,
  1330. speed: 80
  1331. }
  1332. };
  1333. const ScrollList = {
  1334. // scrollList
  1335. scrollList: {
  1336. indicatorWidth: 50,
  1337. indicatorBarWidth: 20,
  1338. indicator: true,
  1339. indicatorColor: "#f2f2f2",
  1340. indicatorActiveColor: "#3c9cff",
  1341. indicatorStyle: ""
  1342. }
  1343. };
  1344. const Search = {
  1345. // search
  1346. search: {
  1347. shape: "round",
  1348. bgColor: "#f2f2f2",
  1349. placeholder: "请输入关键字",
  1350. clearabled: true,
  1351. focus: false,
  1352. showAction: true,
  1353. actionStyle: () => ({}),
  1354. actionText: "搜索",
  1355. inputAlign: "left",
  1356. inputStyle: () => ({}),
  1357. disabled: false,
  1358. borderColor: "transparent",
  1359. searchIconColor: "#909399",
  1360. searchIconSize: 22,
  1361. color: "#606266",
  1362. placeholderColor: "#909399",
  1363. searchIcon: "search",
  1364. margin: "0",
  1365. animation: false,
  1366. value: "",
  1367. maxlength: "-1",
  1368. height: 32,
  1369. label: null
  1370. }
  1371. };
  1372. const Section = {
  1373. // u-section组件
  1374. section: {
  1375. title: "",
  1376. subTitle: "更多",
  1377. right: true,
  1378. fontSize: 15,
  1379. bold: true,
  1380. color: "#303133",
  1381. subColor: "#909399",
  1382. showLine: true,
  1383. lineColor: "",
  1384. arrow: true
  1385. }
  1386. };
  1387. const Skeleton = {
  1388. // skeleton
  1389. skeleton: {
  1390. loading: true,
  1391. animate: true,
  1392. rows: 0,
  1393. rowsWidth: "100%",
  1394. rowsHeight: 18,
  1395. title: true,
  1396. titleWidth: "50%",
  1397. titleHeight: 18,
  1398. avatar: false,
  1399. avatarSize: 32,
  1400. avatarShape: "circle"
  1401. }
  1402. };
  1403. const Slider = {
  1404. // slider组件
  1405. slider: {
  1406. value: 0,
  1407. blockSize: 18,
  1408. min: 0,
  1409. max: 100,
  1410. step: 1,
  1411. activeColor: "#2979ff",
  1412. inactiveColor: "#c0c4cc",
  1413. blockColor: "#ffffff",
  1414. showValue: false,
  1415. disabled: false,
  1416. blockStyle: () => {
  1417. }
  1418. }
  1419. };
  1420. const StatusBar = {
  1421. // statusBar
  1422. statusBar: {
  1423. bgColor: "transparent"
  1424. }
  1425. };
  1426. const Steps = {
  1427. // steps组件
  1428. steps: {
  1429. direction: "row",
  1430. current: 0,
  1431. activeColor: "#3c9cff",
  1432. inactiveColor: "#969799",
  1433. activeIcon: "",
  1434. inactiveIcon: "",
  1435. dot: false
  1436. }
  1437. };
  1438. const StepsItem = {
  1439. // steps-item组件
  1440. stepsItem: {
  1441. title: "",
  1442. desc: "",
  1443. iconSize: 17,
  1444. error: false
  1445. }
  1446. };
  1447. const Sticky = {
  1448. // sticky组件
  1449. sticky: {
  1450. offsetTop: 0,
  1451. customNavHeight: 0,
  1452. disabled: false,
  1453. bgColor: "transparent",
  1454. zIndex: "",
  1455. index: ""
  1456. }
  1457. };
  1458. const Subsection = {
  1459. // subsection组件
  1460. subsection: {
  1461. list: [],
  1462. current: 0,
  1463. activeColor: "#3c9cff",
  1464. inactiveColor: "#303133",
  1465. mode: "button",
  1466. fontSize: 12,
  1467. bold: true,
  1468. bgColor: "#eeeeef",
  1469. keyName: "name"
  1470. }
  1471. };
  1472. const SwipeAction = {
  1473. // swipe-action组件
  1474. swipeAction: {
  1475. autoClose: true
  1476. }
  1477. };
  1478. const SwipeActionItem = {
  1479. // swipeActionItem 组件
  1480. swipeActionItem: {
  1481. show: false,
  1482. name: "",
  1483. disabled: false,
  1484. threshold: 20,
  1485. autoClose: true,
  1486. options: [],
  1487. duration: 300
  1488. }
  1489. };
  1490. const Swiper = {
  1491. // swiper 组件
  1492. swiper: {
  1493. list: () => [],
  1494. indicator: false,
  1495. indicatorActiveColor: "#FFFFFF",
  1496. indicatorInactiveColor: "rgba(255, 255, 255, 0.35)",
  1497. indicatorStyle: "",
  1498. indicatorMode: "line",
  1499. autoplay: true,
  1500. current: 0,
  1501. currentItemId: "",
  1502. interval: 3e3,
  1503. duration: 300,
  1504. circular: false,
  1505. previousMargin: 0,
  1506. nextMargin: 0,
  1507. acceleration: false,
  1508. displayMultipleItems: 1,
  1509. easingFunction: "default",
  1510. keyName: "url",
  1511. imgMode: "aspectFill",
  1512. height: 130,
  1513. bgColor: "#f3f4f6",
  1514. radius: 4,
  1515. loading: false,
  1516. showTitle: false
  1517. }
  1518. };
  1519. const SwipterIndicator = {
  1520. // swiperIndicator 组件
  1521. swiperIndicator: {
  1522. length: 0,
  1523. current: 0,
  1524. indicatorActiveColor: "",
  1525. indicatorInactiveColor: "",
  1526. indicatorMode: "line"
  1527. }
  1528. };
  1529. const Switch = {
  1530. // switch
  1531. switch: {
  1532. loading: false,
  1533. disabled: false,
  1534. size: 25,
  1535. activeColor: "#2979ff",
  1536. inactiveColor: "#ffffff",
  1537. value: false,
  1538. activeValue: true,
  1539. inactiveValue: false,
  1540. asyncChange: false,
  1541. space: 0
  1542. }
  1543. };
  1544. const Tabbar = {
  1545. // tabbar
  1546. tabbar: {
  1547. value: null,
  1548. safeAreaInsetBottom: true,
  1549. border: true,
  1550. zIndex: 1,
  1551. activeColor: "#1989fa",
  1552. inactiveColor: "#7d7e80",
  1553. fixed: true,
  1554. placeholder: true
  1555. }
  1556. };
  1557. const TabbarItem = {
  1558. //
  1559. tabbarItem: {
  1560. name: null,
  1561. icon: "",
  1562. badge: null,
  1563. dot: false,
  1564. text: "",
  1565. badgeStyle: "top: 6px;right:2px;"
  1566. }
  1567. };
  1568. const Tabs = {
  1569. //
  1570. tabs: {
  1571. duration: 300,
  1572. list: () => [],
  1573. lineColor: "#3c9cff",
  1574. activeStyle: () => ({
  1575. color: "#303133"
  1576. }),
  1577. inactiveStyle: () => ({
  1578. color: "#606266"
  1579. }),
  1580. lineWidth: 20,
  1581. lineHeight: 3,
  1582. lineBgSize: "cover",
  1583. itemStyle: () => ({
  1584. height: "44px"
  1585. }),
  1586. scrollable: true,
  1587. current: 0,
  1588. keyName: "name"
  1589. }
  1590. };
  1591. const Tag = {
  1592. // tag 组件
  1593. tag: {
  1594. type: "primary",
  1595. disabled: false,
  1596. size: "medium",
  1597. shape: "square",
  1598. text: "",
  1599. bgColor: "",
  1600. color: "",
  1601. borderColor: "",
  1602. closeColor: "#C6C7CB",
  1603. name: "",
  1604. plainFill: false,
  1605. plain: false,
  1606. closable: false,
  1607. show: true,
  1608. icon: ""
  1609. }
  1610. };
  1611. const Text = {
  1612. // text 组件
  1613. text: {
  1614. type: "",
  1615. show: true,
  1616. text: "",
  1617. prefixIcon: "",
  1618. suffixIcon: "",
  1619. mode: "",
  1620. href: "",
  1621. format: "",
  1622. call: false,
  1623. openType: "",
  1624. bold: false,
  1625. block: false,
  1626. lines: "",
  1627. color: "#303133",
  1628. size: 15,
  1629. iconStyle: () => ({
  1630. fontSize: "15px"
  1631. }),
  1632. decoration: "none",
  1633. margin: 0,
  1634. lineHeight: "",
  1635. align: "left",
  1636. wordWrap: "normal"
  1637. }
  1638. };
  1639. const Textarea = {
  1640. // textarea 组件
  1641. textarea: {
  1642. value: "",
  1643. placeholder: "",
  1644. placeholderClass: "textarea-placeholder",
  1645. placeholderStyle: "color: #c0c4cc",
  1646. height: 70,
  1647. confirmType: "done",
  1648. disabled: false,
  1649. count: false,
  1650. focus: false,
  1651. autoHeight: false,
  1652. fixed: false,
  1653. cursorSpacing: 0,
  1654. cursor: "",
  1655. showConfirmBar: true,
  1656. selectionStart: -1,
  1657. selectionEnd: -1,
  1658. adjustPosition: true,
  1659. disableDefaultPadding: false,
  1660. holdKeyboard: false,
  1661. maxlength: 140,
  1662. border: "surround",
  1663. formatter: null
  1664. }
  1665. };
  1666. const Toast = {
  1667. // toast组件
  1668. toast: {
  1669. zIndex: 10090,
  1670. loading: false,
  1671. text: "",
  1672. icon: "",
  1673. type: "",
  1674. loadingMode: "",
  1675. show: "",
  1676. overlay: false,
  1677. position: "center",
  1678. params: () => {
  1679. },
  1680. duration: 2e3,
  1681. isTab: false,
  1682. url: "",
  1683. callback: null,
  1684. back: false
  1685. }
  1686. };
  1687. const Toolbar = {
  1688. // toolbar 组件
  1689. toolbar: {
  1690. show: true,
  1691. cancelText: "取消",
  1692. confirmText: "确认",
  1693. cancelColor: "#909193",
  1694. confirmColor: "#3c9cff",
  1695. title: ""
  1696. }
  1697. };
  1698. const Tooltip = {
  1699. // tooltip 组件
  1700. tooltip: {
  1701. text: "",
  1702. copyText: "",
  1703. size: 14,
  1704. color: "#606266",
  1705. bgColor: "transparent",
  1706. direction: "top",
  1707. zIndex: 10071,
  1708. showCopy: true,
  1709. buttons: () => [],
  1710. overlay: true,
  1711. showToast: true
  1712. }
  1713. };
  1714. const Transition = {
  1715. // transition动画组件的props
  1716. transition: {
  1717. show: false,
  1718. mode: "fade",
  1719. duration: "300",
  1720. timingFunction: "ease-out"
  1721. }
  1722. };
  1723. const Upload = {
  1724. // upload组件
  1725. upload: {
  1726. accept: "image",
  1727. capture: () => ["album", "camera"],
  1728. compressed: true,
  1729. camera: "back",
  1730. maxDuration: 60,
  1731. uploadIcon: "camera-fill",
  1732. uploadIconColor: "#D3D4D6",
  1733. useBeforeRead: false,
  1734. previewFullImage: true,
  1735. maxCount: 52,
  1736. disabled: false,
  1737. imageMode: "aspectFill",
  1738. name: "",
  1739. sizeType: () => ["original", "compressed"],
  1740. multiple: false,
  1741. deletable: true,
  1742. maxSize: Number.MAX_VALUE,
  1743. fileList: () => [],
  1744. uploadText: "",
  1745. width: 80,
  1746. height: 80,
  1747. previewImage: true
  1748. }
  1749. };
  1750. const drawer = {
  1751. // 抽屉组件
  1752. drawer: {
  1753. // 是否显示
  1754. show: false,
  1755. // 点击遮罩是否关闭
  1756. mask: true,
  1757. // // 是否显示关闭按钮
  1758. // closeBtn:true,
  1759. // 抽屉宽度
  1760. width: "40%",
  1761. // 抽屉位置
  1762. placement: "left",
  1763. // 权重
  1764. zIndex: 100
  1765. }
  1766. };
  1767. const props$G = {
  1768. ...ActionSheet,
  1769. ...Album,
  1770. ...Alert,
  1771. ...Avatar,
  1772. ...AvatarGroup,
  1773. ...Backtop,
  1774. ...Badge,
  1775. ...Button,
  1776. ...Calendar$2,
  1777. ...CarKeyboard,
  1778. ...Cell,
  1779. ...CellGroup,
  1780. ...Checkbox,
  1781. ...CheckboxGroup,
  1782. ...CircleProgress,
  1783. ...Code,
  1784. ...CodeInput,
  1785. ...Col,
  1786. ...Collapse,
  1787. ...CollapseItem,
  1788. ...ColumnNotice,
  1789. ...CountDown,
  1790. ...CountTo,
  1791. ...DatetimePicker,
  1792. ...Divider,
  1793. ...Empty,
  1794. ...Form,
  1795. ...GormItem,
  1796. ...Gap,
  1797. ...Grid,
  1798. ...GridItem,
  1799. ...Icon,
  1800. ...Image,
  1801. ...IndexAnchor,
  1802. ...IndexList,
  1803. ...Input,
  1804. ...Keyboard,
  1805. ...Line,
  1806. ...LineProgress,
  1807. ...Link,
  1808. ...List,
  1809. ...ListItem,
  1810. ...LoadingIcon,
  1811. ...LoadingPage,
  1812. ...Loadmore,
  1813. ...Modal,
  1814. ...Navbar,
  1815. ...NoNetwork,
  1816. ...NoticeBar,
  1817. ...Notify,
  1818. ...NumberBox,
  1819. ...NumberKeyboard,
  1820. ...Overlay,
  1821. ...Parse,
  1822. ...Picker,
  1823. ...Popup,
  1824. ...Radio,
  1825. ...RadioGroup,
  1826. ...Rate,
  1827. ...ReadMore,
  1828. ...Row,
  1829. ...RowNotice,
  1830. ...ScrollList,
  1831. ...Search,
  1832. ...Section,
  1833. ...Skeleton,
  1834. ...Slider,
  1835. ...StatusBar,
  1836. ...Steps,
  1837. ...StepsItem,
  1838. ...Sticky,
  1839. ...Subsection,
  1840. ...SwipeAction,
  1841. ...SwipeActionItem,
  1842. ...Swiper,
  1843. ...SwipterIndicator,
  1844. ...Switch,
  1845. ...Tabbar,
  1846. ...TabbarItem,
  1847. ...Tabs,
  1848. ...Tag,
  1849. ...Text,
  1850. ...Textarea,
  1851. ...Toast,
  1852. ...Toolbar,
  1853. ...Tooltip,
  1854. ...Transition,
  1855. ...Upload,
  1856. ...drawer
  1857. };
  1858. const props$F = {
  1859. props: {
  1860. // 图标类名
  1861. name: {
  1862. type: String,
  1863. default: props$G.icon.name
  1864. },
  1865. // 图标颜色,可接受主题色
  1866. color: {
  1867. type: String,
  1868. default: props$G.icon.color
  1869. },
  1870. // 字体大小,单位px
  1871. size: {
  1872. type: [String, Number],
  1873. default: props$G.icon.size
  1874. },
  1875. // 是否显示粗体
  1876. bold: {
  1877. type: Boolean,
  1878. default: props$G.icon.bold
  1879. },
  1880. // 点击图标的时候传递事件出去的index(用于区分点击了哪一个)
  1881. index: {
  1882. type: [String, Number],
  1883. default: props$G.icon.index
  1884. },
  1885. // 触摸图标时的类名
  1886. hoverClass: {
  1887. type: String,
  1888. default: props$G.icon.hoverClass
  1889. },
  1890. // 自定义扩展前缀,方便用户扩展自己的图标库
  1891. customPrefix: {
  1892. type: String,
  1893. default: props$G.icon.customPrefix
  1894. },
  1895. // 图标右边或者下面的文字
  1896. label: {
  1897. type: [String, Number],
  1898. default: props$G.icon.label
  1899. },
  1900. // label的位置,只能右边或者下边
  1901. labelPos: {
  1902. type: String,
  1903. default: props$G.icon.labelPos
  1904. },
  1905. // label的大小
  1906. labelSize: {
  1907. type: [String, Number],
  1908. default: props$G.icon.labelSize
  1909. },
  1910. // label的颜色
  1911. labelColor: {
  1912. type: String,
  1913. default: props$G.icon.labelColor
  1914. },
  1915. // label与图标的距离
  1916. space: {
  1917. type: [String, Number],
  1918. default: props$G.icon.space
  1919. },
  1920. // 图片的mode
  1921. imgMode: {
  1922. type: String,
  1923. default: props$G.icon.imgMode
  1924. },
  1925. // 用于显示图片小图标时,图片的宽度
  1926. width: {
  1927. type: [String, Number],
  1928. default: props$G.icon.width
  1929. },
  1930. // 用于显示图片小图标时,图片的高度
  1931. height: {
  1932. type: [String, Number],
  1933. default: props$G.icon.height
  1934. },
  1935. // 用于解决某些情况下,让图标垂直居中的用途
  1936. top: {
  1937. type: [String, Number],
  1938. default: props$G.icon.top
  1939. },
  1940. // 是否阻止事件传播
  1941. stop: {
  1942. type: Boolean,
  1943. default: props$G.icon.stop
  1944. }
  1945. }
  1946. };
  1947. const mpMixin = {};
  1948. const mixin = {
  1949. // 定义每个组件都可能需要用到的外部样式以及类名
  1950. props: {
  1951. // 每个组件都有的父组件传递的样式,可以为字符串或者对象形式
  1952. customStyle: {
  1953. type: [Object, String],
  1954. default: () => ({})
  1955. },
  1956. customClass: {
  1957. type: String,
  1958. default: ""
  1959. },
  1960. // 跳转的页面路径
  1961. url: {
  1962. type: String,
  1963. default: ""
  1964. },
  1965. // 页面跳转的类型
  1966. linkType: {
  1967. type: String,
  1968. default: "navigateTo"
  1969. }
  1970. },
  1971. data() {
  1972. return {};
  1973. },
  1974. onLoad() {
  1975. this.$u.getRect = this.$uGetRect;
  1976. },
  1977. created() {
  1978. this.$u.getRect = this.$uGetRect;
  1979. },
  1980. computed: {
  1981. // 在2.x版本中,将会把$u挂载到uni对象下,导致在模板中无法使用uni.$u.xxx形式
  1982. // 所以这里通过computed计算属性将其附加到this.$u上,就可以在模板或者js中使用uni.$u.xxx
  1983. // 只在nvue环境通过此方式引入完整的$u,其他平台会出现性能问题,非nvue则按需引入(主要原因是props过大)
  1984. $u() {
  1985. return uni.$u.deepMerge(uni.$u, {
  1986. props: void 0,
  1987. http: void 0,
  1988. mixin: void 0
  1989. });
  1990. },
  1991. /**
  1992. * 生成bem规则类名
  1993. * 由于微信小程序,H5,nvue之间绑定class的差异,无法通过:class="[bem()]"的形式进行同用
  1994. * 故采用如下折中做法,最后返回的是数组(一般平台)或字符串(支付宝和字节跳动平台),类似['a', 'b', 'c']或'a b c'的形式
  1995. * @param {String} name 组件名称
  1996. * @param {Array} fixed 一直会存在的类名
  1997. * @param {Array} change 会根据变量值为true或者false而出现或者隐藏的类名
  1998. * @returns {Array|string}
  1999. */
  2000. bem() {
  2001. return function(name, fixed, change) {
  2002. const prefix = `u-${name}--`;
  2003. const classes = {};
  2004. if (fixed) {
  2005. fixed.map((item) => {
  2006. classes[prefix + this[item]] = true;
  2007. });
  2008. }
  2009. if (change) {
  2010. change.map((item) => {
  2011. this[item] ? classes[prefix + item] = this[item] : delete classes[prefix + item];
  2012. });
  2013. }
  2014. return Object.keys(classes);
  2015. };
  2016. }
  2017. },
  2018. methods: {
  2019. // 跳转某一个页面
  2020. openPage(urlKey = "url") {
  2021. const url2 = this[urlKey];
  2022. if (url2) {
  2023. this.$u.route({ type: this.linkType, url: url2 });
  2024. }
  2025. },
  2026. // 查询节点信息
  2027. // 目前此方法在支付宝小程序中无法获取组件跟接点的尺寸,为支付宝的bug(2020-07-21)
  2028. // 解决办法为在组件根部再套一个没有任何作用的view元素
  2029. $uGetRect(selector, all) {
  2030. return new Promise((resolve) => {
  2031. uni.createSelectorQuery().in(this)[all ? "selectAll" : "select"](selector).boundingClientRect((rect) => {
  2032. if (all && Array.isArray(rect) && rect.length) {
  2033. resolve(rect);
  2034. }
  2035. if (!all && rect) {
  2036. resolve(rect);
  2037. }
  2038. }).exec();
  2039. });
  2040. },
  2041. getParentData(parentName = "") {
  2042. if (!this.parent)
  2043. this.parent = {};
  2044. this.parent = uni.$u.$parent.call(this, parentName);
  2045. if (this.parent.children) {
  2046. this.parent.children.indexOf(this) === -1 && this.parent.children.push(this);
  2047. }
  2048. if (this.parent && this.parentData) {
  2049. Object.keys(this.parentData).map((key) => {
  2050. this.parentData[key] = this.parent[key];
  2051. });
  2052. }
  2053. },
  2054. // 阻止事件冒泡
  2055. preventEvent(e) {
  2056. e && typeof e.stopPropagation === "function" && e.stopPropagation();
  2057. },
  2058. // 空操作
  2059. noop(e) {
  2060. this.preventEvent(e);
  2061. }
  2062. },
  2063. onReachBottom() {
  2064. uni.$emit("uOnReachBottom");
  2065. },
  2066. beforeDestroy() {
  2067. if (this.parent && uni.$u.test.array(this.parent.children)) {
  2068. const childrenList = this.parent.children;
  2069. childrenList.map((child, index2) => {
  2070. if (child === this) {
  2071. childrenList.splice(index2, 1);
  2072. }
  2073. });
  2074. }
  2075. }
  2076. };
  2077. const _export_sfc = (sfc, props2) => {
  2078. const target = sfc.__vccOpts || sfc;
  2079. for (const [key, val] of props2) {
  2080. target[key] = val;
  2081. }
  2082. return target;
  2083. };
  2084. const _sfc_main$29 = {
  2085. name: "u-icon",
  2086. data() {
  2087. return {};
  2088. },
  2089. emits: ["click"],
  2090. mixins: [mpMixin, mixin, props$F],
  2091. computed: {
  2092. uClasses() {
  2093. let classes = [];
  2094. classes.push(this.customPrefix + "-" + this.name);
  2095. if (this.color && uni.$u.config.type.includes(this.color))
  2096. classes.push("u-icon__icon--" + this.color);
  2097. return classes;
  2098. },
  2099. iconStyle() {
  2100. let style = {};
  2101. style = {
  2102. fontSize: uni.$u.addUnit(this.size),
  2103. lineHeight: uni.$u.addUnit(this.size),
  2104. fontWeight: this.bold ? "bold" : "normal",
  2105. // 某些特殊情况需要设置一个到顶部的距离,才能更好的垂直居中
  2106. top: uni.$u.addUnit(this.top)
  2107. };
  2108. if (this.color && !uni.$u.config.type.includes(this.color))
  2109. style.color = this.color;
  2110. return style;
  2111. },
  2112. // 判断传入的name属性,是否图片路径,只要带有"/"均认为是图片形式
  2113. isImg() {
  2114. return this.name.indexOf("/") !== -1;
  2115. },
  2116. imgStyle() {
  2117. let style = {};
  2118. style.width = this.width ? uni.$u.addUnit(this.width) : uni.$u.addUnit(this.size);
  2119. style.height = this.height ? uni.$u.addUnit(this.height) : uni.$u.addUnit(this.size);
  2120. return style;
  2121. },
  2122. // 通过图标名,查找对应的图标
  2123. icon() {
  2124. return icons$1["uicon-" + this.name] || this.name;
  2125. }
  2126. },
  2127. methods: {
  2128. clickHandler(e) {
  2129. this.$emit("click", this.index);
  2130. this.stop && this.preventEvent(e);
  2131. }
  2132. }
  2133. };
  2134. function _sfc_render$28(_ctx, _cache, $props, $setup, $data, $options) {
  2135. return vue.openBlock(), vue.createElementBlock(
  2136. "view",
  2137. {
  2138. class: vue.normalizeClass(["u-icon", ["u-icon--" + _ctx.labelPos]]),
  2139. onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args))
  2140. },
  2141. [
  2142. $options.isImg ? (vue.openBlock(), vue.createElementBlock("image", {
  2143. key: 0,
  2144. class: "u-icon__img",
  2145. src: _ctx.name,
  2146. mode: _ctx.imgMode,
  2147. style: vue.normalizeStyle([$options.imgStyle, _ctx.$u.addStyle(_ctx.customStyle)])
  2148. }, null, 12, ["src", "mode"])) : (vue.openBlock(), vue.createElementBlock("text", {
  2149. key: 1,
  2150. class: vue.normalizeClass(["u-icon__icon", $options.uClasses]),
  2151. style: vue.normalizeStyle([$options.iconStyle, _ctx.$u.addStyle(_ctx.customStyle)]),
  2152. "hover-class": _ctx.hoverClass
  2153. }, vue.toDisplayString($options.icon), 15, ["hover-class"])),
  2154. vue.createCommentVNode(' 这里进行空字符串判断,如果仅仅是v-if="label",可能会出现传递0的时候,结果也无法显示 '),
  2155. _ctx.label !== "" ? (vue.openBlock(), vue.createElementBlock(
  2156. "text",
  2157. {
  2158. key: 2,
  2159. class: "u-icon__label",
  2160. style: vue.normalizeStyle({
  2161. color: _ctx.labelColor,
  2162. fontSize: _ctx.$u.addUnit(_ctx.labelSize),
  2163. marginLeft: _ctx.labelPos == "right" ? _ctx.$u.addUnit(_ctx.space) : 0,
  2164. marginTop: _ctx.labelPos == "bottom" ? _ctx.$u.addUnit(_ctx.space) : 0,
  2165. marginRight: _ctx.labelPos == "left" ? _ctx.$u.addUnit(_ctx.space) : 0,
  2166. marginBottom: _ctx.labelPos == "top" ? _ctx.$u.addUnit(_ctx.space) : 0
  2167. })
  2168. },
  2169. vue.toDisplayString(_ctx.label),
  2170. 5
  2171. /* TEXT, STYLE */
  2172. )) : vue.createCommentVNode("v-if", true)
  2173. ],
  2174. 2
  2175. /* CLASS */
  2176. );
  2177. }
  2178. const __easycom_0$g = /* @__PURE__ */ _export_sfc(_sfc_main$29, [["render", _sfc_render$28], ["__scopeId", "data-v-ac70166d"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-icon/u-icon.vue"]]);
  2179. const props$E = {
  2180. props: {
  2181. // 绑定的值
  2182. modelValue: {
  2183. type: [String, Number],
  2184. default: props$G.input.value
  2185. },
  2186. // number-数字输入键盘,app-vue下可以输入浮点数,app-nvue和小程序平台下只能输入整数
  2187. // idcard-身份证输入键盘,微信、支付宝、百度、QQ小程序
  2188. // digit-带小数点的数字键盘,App的nvue页面、微信、支付宝、百度、头条、QQ小程序
  2189. // text-文本输入键盘
  2190. type: {
  2191. type: String,
  2192. default: props$G.input.type
  2193. },
  2194. // 如果 textarea 是在一个 position:fixed 的区域,需要显示指定属性 fixed 为 true,
  2195. // 兼容性:微信小程序、百度小程序、字节跳动小程序、QQ小程序
  2196. fixed: {
  2197. type: Boolean,
  2198. default: props$G.input.fixed
  2199. },
  2200. // 是否禁用输入框
  2201. disabled: {
  2202. type: Boolean,
  2203. default: props$G.input.disabled
  2204. },
  2205. // 禁用状态时的背景色
  2206. disabledColor: {
  2207. type: String,
  2208. default: props$G.input.disabledColor
  2209. },
  2210. // 是否显示清除控件
  2211. clearable: {
  2212. type: Boolean,
  2213. default: props$G.input.clearable
  2214. },
  2215. // 是否密码类型
  2216. password: {
  2217. type: Boolean,
  2218. default: props$G.input.password
  2219. },
  2220. // 最大输入长度,设置为 -1 的时候不限制最大长度
  2221. maxlength: {
  2222. type: [String, Number],
  2223. default: props$G.input.maxlength
  2224. },
  2225. // 输入框为空时的占位符
  2226. placeholder: {
  2227. type: String,
  2228. default: props$G.input.placeholder
  2229. },
  2230. // 指定placeholder的样式类,注意页面或组件的style中写了scoped时,需要在类名前写/deep/
  2231. placeholderClass: {
  2232. type: String,
  2233. default: props$G.input.placeholderClass
  2234. },
  2235. // 指定placeholder的样式
  2236. placeholderStyle: {
  2237. type: [String, Object],
  2238. default: props$G.input.placeholderStyle
  2239. },
  2240. // 是否显示输入字数统计,只在 type ="text"或type ="textarea"时有效
  2241. showWordLimit: {
  2242. type: Boolean,
  2243. default: props$G.input.showWordLimit
  2244. },
  2245. // 设置右下角按钮的文字,有效值:send|search|next|go|done,兼容性详见uni-app文档
  2246. // https://uniapp.dcloud.io/component/input
  2247. // https://uniapp.dcloud.io/component/textarea
  2248. confirmType: {
  2249. type: String,
  2250. default: props$G.input.confirmType
  2251. },
  2252. // 点击键盘右下角按钮时是否保持键盘不收起,H5无效
  2253. confirmHold: {
  2254. type: Boolean,
  2255. default: props$G.input.confirmHold
  2256. },
  2257. // focus时,点击页面的时候不收起键盘,微信小程序有效
  2258. holdKeyboard: {
  2259. type: Boolean,
  2260. default: props$G.input.holdKeyboard
  2261. },
  2262. // 自动获取焦点
  2263. // 在 H5 平台能否聚焦以及软键盘是否跟随弹出,取决于当前浏览器本身的实现。nvue 页面不支持,需使用组件的 focus()、blur() 方法控制焦点
  2264. focus: {
  2265. type: Boolean,
  2266. default: props$G.input.focus
  2267. },
  2268. // 键盘收起时,是否自动失去焦点,目前仅App3.0.0+有效
  2269. autoBlur: {
  2270. type: Boolean,
  2271. default: props$G.input.autoBlur
  2272. },
  2273. // 是否去掉 iOS 下的默认内边距,仅微信小程序,且type=textarea时有效
  2274. disableDefaultPadding: {
  2275. type: Boolean,
  2276. default: props$G.input.disableDefaultPadding
  2277. },
  2278. // 指定focus时光标的位置
  2279. cursor: {
  2280. type: [String, Number],
  2281. default: props$G.input.cursor
  2282. },
  2283. // 输入框聚焦时底部与键盘的距离
  2284. cursorSpacing: {
  2285. type: [String, Number],
  2286. default: props$G.input.cursorSpacing
  2287. },
  2288. // 光标起始位置,自动聚集时有效,需与selection-end搭配使用
  2289. selectionStart: {
  2290. type: [String, Number],
  2291. default: props$G.input.selectionStart
  2292. },
  2293. // 光标结束位置,自动聚集时有效,需与selection-start搭配使用
  2294. selectionEnd: {
  2295. type: [String, Number],
  2296. default: props$G.input.selectionEnd
  2297. },
  2298. // 键盘弹起时,是否自动上推页面
  2299. adjustPosition: {
  2300. type: Boolean,
  2301. default: props$G.input.adjustPosition
  2302. },
  2303. // 输入框内容对齐方式,可选值为:left|center|right
  2304. inputAlign: {
  2305. type: String,
  2306. default: props$G.input.inputAlign
  2307. },
  2308. // 输入框字体的大小
  2309. fontSize: {
  2310. type: [String, Number],
  2311. default: "34rpx"
  2312. },
  2313. // 输入框字体颜色
  2314. color: {
  2315. type: String,
  2316. default: props$G.input.color
  2317. },
  2318. // 输入框前置图标
  2319. prefixIcon: {
  2320. type: String,
  2321. default: props$G.input.prefixIcon
  2322. },
  2323. // 前置图标样式,对象或字符串
  2324. prefixIconStyle: {
  2325. type: [String, Object],
  2326. default: props$G.input.prefixIconStyle
  2327. },
  2328. // 输入框后置图标
  2329. suffixIcon: {
  2330. type: String,
  2331. default: props$G.input.suffixIcon
  2332. },
  2333. // 后置图标样式,对象或字符串
  2334. suffixIconStyle: {
  2335. type: [String, Object],
  2336. default: props$G.input.suffixIconStyle
  2337. },
  2338. // 边框类型,surround-四周边框,bottom-底部边框,none-无边框
  2339. border: {
  2340. type: String,
  2341. default: props$G.input.border
  2342. },
  2343. // 是否只读,与disabled不同之处在于disabled会置灰组件,而readonly则不会
  2344. readonly: {
  2345. type: Boolean,
  2346. default: props$G.input.readonly
  2347. },
  2348. // 输入框形状,circle-圆形,square-方形
  2349. shape: {
  2350. type: String,
  2351. default: props$G.input.shape
  2352. },
  2353. // 用于处理或者过滤输入框内容的方法
  2354. formatter: {
  2355. type: [Function, null],
  2356. default: props$G.input.formatter
  2357. },
  2358. // 是否忽略组件内对文本合成系统事件的处理
  2359. ignoreCompositionEvent: {
  2360. type: Boolean,
  2361. default: true
  2362. }
  2363. }
  2364. };
  2365. const _sfc_main$28 = {
  2366. name: "u-input",
  2367. mixins: [mpMixin, mixin, props$E],
  2368. data() {
  2369. return {
  2370. // 输入框的值
  2371. innerValue: "",
  2372. // 是否处于获得焦点状态
  2373. focused: false,
  2374. // value是否第一次变化,在watch中,由于加入immediate属性,会在第一次触发,此时不应该认为value发生了变化
  2375. firstChange: true,
  2376. // value绑定值的变化是由内部还是外部引起的
  2377. changeFromInner: false,
  2378. // 过滤处理方法
  2379. innerFormatter: (value2) => value2
  2380. };
  2381. },
  2382. watch: {
  2383. modelValue: {
  2384. immediate: true,
  2385. handler(newVal, oldVal) {
  2386. this.innerValue = newVal;
  2387. this.firstChange = false;
  2388. this.changeFromInner = false;
  2389. }
  2390. }
  2391. },
  2392. computed: {
  2393. // 是否显示清除控件
  2394. isShowClear() {
  2395. const { clearable, readonly, focused, innerValue } = this;
  2396. return !!clearable && !readonly && !!focused && innerValue !== "";
  2397. },
  2398. // 组件的类名
  2399. inputClass() {
  2400. let classes = [], { border, disabled, shape } = this;
  2401. border === "surround" && (classes = classes.concat(["u-border", "u-input--radius"]));
  2402. classes.push(`u-input--${shape}`);
  2403. border === "bottom" && (classes = classes.concat([
  2404. "u-border-bottom",
  2405. "u-input--no-radius"
  2406. ]));
  2407. return classes.join(" ");
  2408. },
  2409. // 组件的样式
  2410. wrapperStyle() {
  2411. const style = {};
  2412. if (this.disabled) {
  2413. style.backgroundColor = this.disabledColor;
  2414. }
  2415. if (this.border === "none") {
  2416. style.padding = "0";
  2417. } else {
  2418. style.paddingTop = "6px";
  2419. style.paddingBottom = "6px";
  2420. style.paddingLeft = "9px";
  2421. style.paddingRight = "9px";
  2422. }
  2423. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  2424. },
  2425. // 输入框的样式
  2426. inputStyle() {
  2427. const style = {
  2428. color: this.color,
  2429. fontSize: uni.$u.addUnit(this.fontSize),
  2430. textAlign: this.inputAlign
  2431. };
  2432. return style;
  2433. }
  2434. },
  2435. emits: ["update:modelValue", "focus", "blur", "change", "confirm", "clear", "keyboardheightchange"],
  2436. methods: {
  2437. // 在微信小程序中,不支持将函数当做props参数,故只能通过ref形式调用
  2438. setFormatter(e) {
  2439. this.innerFormatter = e;
  2440. },
  2441. // 当键盘输入时,触发input事件
  2442. onInput(e) {
  2443. let { value: value2 = "" } = e.detail || {};
  2444. const formatter = this.formatter || this.innerFormatter;
  2445. const formatValue = formatter(value2);
  2446. this.innerValue = value2;
  2447. this.$nextTick(() => {
  2448. this.innerValue = formatValue;
  2449. this.valueChange();
  2450. });
  2451. },
  2452. // 输入框失去焦点时触发
  2453. onBlur(event) {
  2454. this.$emit("blur", event.detail.value);
  2455. uni.$u.sleep(50).then(() => {
  2456. this.focused = false;
  2457. });
  2458. uni.$u.formValidate(this, "blur");
  2459. },
  2460. // 输入框聚焦时触发
  2461. onFocus(event) {
  2462. this.focused = true;
  2463. this.$emit("focus");
  2464. },
  2465. // 点击完成按钮时触发
  2466. onConfirm(event) {
  2467. this.$emit("confirm", this.innerValue);
  2468. },
  2469. // 键盘高度发生变化的时候触发此事件
  2470. // 兼容性:微信小程序2.7.0+、App 3.1.0+
  2471. onkeyboardheightchange() {
  2472. this.$emit("keyboardheightchange");
  2473. },
  2474. // 内容发生变化,进行处理
  2475. valueChange() {
  2476. const value2 = this.innerValue;
  2477. this.$nextTick(() => {
  2478. this.$emit("update:modelValue", value2);
  2479. this.changeFromInner = true;
  2480. this.$emit("change", value2);
  2481. uni.$u.formValidate(this, "change");
  2482. });
  2483. },
  2484. // 点击清除控件
  2485. onClear() {
  2486. this.innerValue = "";
  2487. this.$nextTick(() => {
  2488. this.valueChange();
  2489. this.$emit("clear");
  2490. });
  2491. },
  2492. /**
  2493. * 在安卓nvue上,事件无法冒泡
  2494. * 在某些时间,我们希望监听u-from-item的点击事件,此时会导致点击u-form-item内的u-input后
  2495. * 无法触发u-form-item的点击事件,这里通过手动调用u-form-item的方法进行触发
  2496. */
  2497. clickHandler() {
  2498. }
  2499. }
  2500. };
  2501. function _sfc_render$27(_ctx, _cache, $props, $setup, $data, $options) {
  2502. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  2503. return vue.openBlock(), vue.createElementBlock(
  2504. "view",
  2505. {
  2506. class: vue.normalizeClass(["u-input", $options.inputClass]),
  2507. style: vue.normalizeStyle([$options.wrapperStyle])
  2508. },
  2509. [
  2510. vue.createElementVNode("view", { class: "u-input__content" }, [
  2511. _ctx.prefixIcon || _ctx.$slots.prefix ? (vue.openBlock(), vue.createElementBlock("view", {
  2512. key: 0,
  2513. class: "u-input__content__prefix-icon"
  2514. }, [
  2515. vue.renderSlot(_ctx.$slots, "prefix", {}, () => [
  2516. vue.createVNode(_component_u_icon, {
  2517. name: _ctx.prefixIcon,
  2518. size: "18",
  2519. customStyle: _ctx.prefixIconStyle
  2520. }, null, 8, ["name", "customStyle"])
  2521. ], true)
  2522. ])) : vue.createCommentVNode("v-if", true),
  2523. vue.createElementVNode("view", {
  2524. class: "u-input__content__field-wrapper",
  2525. onClick: _cache[5] || (_cache[5] = (...args) => $options.clickHandler && $options.clickHandler(...args))
  2526. }, [
  2527. vue.createCommentVNode(" 根据uni-app的input组件文档,H5和APP中只要声明了password参数(无论true还是false),type均失效,此时\n 为了防止type=number时,又存在password属性,type无效,此时需要设置password为undefined\n "),
  2528. vue.createElementVNode("input", {
  2529. class: "u-input__content__field-wrapper__field",
  2530. style: vue.normalizeStyle([$options.inputStyle]),
  2531. type: _ctx.type,
  2532. focus: _ctx.focus,
  2533. cursor: _ctx.cursor,
  2534. value: $data.innerValue,
  2535. "auto-blur": _ctx.autoBlur,
  2536. disabled: _ctx.disabled || _ctx.readonly,
  2537. maxlength: _ctx.maxlength,
  2538. placeholder: _ctx.placeholder,
  2539. "placeholder-style": _ctx.placeholderStyle,
  2540. "placeholder-class": _ctx.placeholderClass,
  2541. "confirm-type": _ctx.confirmType,
  2542. "confirm-hold": _ctx.confirmHold,
  2543. "hold-keyboard": _ctx.holdKeyboard,
  2544. "cursor-spacing": _ctx.cursorSpacing,
  2545. "adjust-position": _ctx.adjustPosition,
  2546. "selection-end": _ctx.selectionEnd,
  2547. "selection-start": _ctx.selectionStart,
  2548. password: _ctx.password || _ctx.type === "password" || void 0,
  2549. ignoreCompositionEvent: _ctx.ignoreCompositionEvent,
  2550. onInput: _cache[0] || (_cache[0] = (...args) => $options.onInput && $options.onInput(...args)),
  2551. onBlur: _cache[1] || (_cache[1] = (...args) => $options.onBlur && $options.onBlur(...args)),
  2552. onFocus: _cache[2] || (_cache[2] = (...args) => $options.onFocus && $options.onFocus(...args)),
  2553. onConfirm: _cache[3] || (_cache[3] = (...args) => $options.onConfirm && $options.onConfirm(...args)),
  2554. onKeyboardheightchange: _cache[4] || (_cache[4] = (...args) => $options.onkeyboardheightchange && $options.onkeyboardheightchange(...args))
  2555. }, null, 44, ["type", "focus", "cursor", "value", "auto-blur", "disabled", "maxlength", "placeholder", "placeholder-style", "placeholder-class", "confirm-type", "confirm-hold", "hold-keyboard", "cursor-spacing", "adjust-position", "selection-end", "selection-start", "password", "ignoreCompositionEvent"])
  2556. ]),
  2557. $options.isShowClear ? (vue.openBlock(), vue.createElementBlock("view", {
  2558. key: 1,
  2559. class: "u-input__content__clear",
  2560. onClick: _cache[6] || (_cache[6] = (...args) => $options.onClear && $options.onClear(...args))
  2561. }, [
  2562. vue.createVNode(_component_u_icon, {
  2563. name: "close",
  2564. size: "11",
  2565. color: "#ffffff",
  2566. customStyle: "line-height: 12px"
  2567. })
  2568. ])) : vue.createCommentVNode("v-if", true),
  2569. _ctx.suffixIcon || _ctx.$slots.suffix ? (vue.openBlock(), vue.createElementBlock("view", {
  2570. key: 2,
  2571. class: "u-input__content__subfix-icon"
  2572. }, [
  2573. vue.renderSlot(_ctx.$slots, "suffix", {}, () => [
  2574. vue.createVNode(_component_u_icon, {
  2575. name: _ctx.suffixIcon,
  2576. size: "18",
  2577. customStyle: _ctx.suffixIconStyle
  2578. }, null, 8, ["name", "customStyle"])
  2579. ], true)
  2580. ])) : vue.createCommentVNode("v-if", true)
  2581. ])
  2582. ],
  2583. 6
  2584. /* CLASS, STYLE */
  2585. );
  2586. }
  2587. const __easycom_0$f = /* @__PURE__ */ _export_sfc(_sfc_main$28, [["render", _sfc_render$27], ["__scopeId", "data-v-df79975b"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-input/u-input.vue"]]);
  2588. const props$D = {
  2589. props: {
  2590. color: {
  2591. type: String,
  2592. default: props$G.line.color
  2593. },
  2594. // 长度,竖向时表现为高度,横向时表现为长度,可以为百分比,带px单位的值等
  2595. length: {
  2596. type: [String, Number],
  2597. default: props$G.line.length
  2598. },
  2599. // 线条方向,col-竖向,row-横向
  2600. direction: {
  2601. type: String,
  2602. default: props$G.line.direction
  2603. },
  2604. // 是否显示细边框
  2605. hairline: {
  2606. type: Boolean,
  2607. default: props$G.line.hairline
  2608. },
  2609. // 线条与上下左右元素的间距,字符串形式,如"30px"、"20px 30px"
  2610. margin: {
  2611. type: [String, Number],
  2612. default: props$G.line.margin
  2613. },
  2614. // 是否虚线,true-虚线,false-实线
  2615. dashed: {
  2616. type: Boolean,
  2617. default: props$G.line.dashed
  2618. }
  2619. }
  2620. };
  2621. const _sfc_main$27 = {
  2622. name: "u-line",
  2623. mixins: [mpMixin, mixin, props$D],
  2624. computed: {
  2625. lineStyle() {
  2626. const style = {};
  2627. style.margin = this.margin;
  2628. if (this.direction === "row") {
  2629. style.borderBottomWidth = "1px";
  2630. style.borderBottomStyle = this.dashed ? "dashed" : "solid";
  2631. style.width = uni.$u.addUnit(this.length);
  2632. if (this.hairline)
  2633. style.transform = "scaleY(0.5)";
  2634. } else {
  2635. style.borderLeftWidth = "1px";
  2636. style.borderLeftStyle = this.dashed ? "dashed" : "solid";
  2637. style.height = uni.$u.addUnit(this.length);
  2638. if (this.hairline)
  2639. style.transform = "scaleX(0.5)";
  2640. }
  2641. style.borderColor = this.color;
  2642. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  2643. }
  2644. }
  2645. };
  2646. function _sfc_render$26(_ctx, _cache, $props, $setup, $data, $options) {
  2647. return vue.openBlock(), vue.createElementBlock(
  2648. "view",
  2649. {
  2650. class: "u-line",
  2651. style: vue.normalizeStyle([$options.lineStyle])
  2652. },
  2653. null,
  2654. 4
  2655. /* STYLE */
  2656. );
  2657. }
  2658. const __easycom_1$b = /* @__PURE__ */ _export_sfc(_sfc_main$27, [["render", _sfc_render$26], ["__scopeId", "data-v-72791e59"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-line/u-line.vue"]]);
  2659. const props$C = {
  2660. props: {
  2661. // input的label提示语
  2662. label: {
  2663. type: String,
  2664. default: props$G.formItem.label
  2665. },
  2666. // 绑定的值
  2667. prop: {
  2668. type: String,
  2669. default: props$G.formItem.prop
  2670. },
  2671. // 是否显示表单域的下划线边框
  2672. borderBottom: {
  2673. type: [String, Boolean],
  2674. default: props$G.formItem.borderBottom
  2675. },
  2676. // label的宽度,单位px
  2677. labelWidth: {
  2678. type: [String, Number],
  2679. default: props$G.formItem.labelWidth
  2680. },
  2681. // 右侧图标
  2682. rightIcon: {
  2683. type: String,
  2684. default: props$G.formItem.rightIcon
  2685. },
  2686. // 左侧图标
  2687. leftIcon: {
  2688. type: String,
  2689. default: props$G.formItem.leftIcon
  2690. },
  2691. // 是否显示左边的必填星号,只作显示用,具体校验必填的逻辑,请在rules中配置
  2692. required: {
  2693. type: Boolean,
  2694. default: props$G.formItem.required
  2695. },
  2696. leftIconStyle: {
  2697. type: [String, Object],
  2698. default: props$G.formItem.leftIconStyle
  2699. }
  2700. }
  2701. };
  2702. const _sfc_main$26 = {
  2703. name: "u-form-item",
  2704. mixins: [mpMixin, mixin, props$C],
  2705. data() {
  2706. return {
  2707. // 错误提示语
  2708. message: "",
  2709. parentData: {
  2710. // 提示文本的位置
  2711. labelPosition: "left",
  2712. // 提示文本对齐方式
  2713. labelAlign: "left",
  2714. // 提示文本的样式
  2715. labelStyle: {},
  2716. // 提示文本的宽度
  2717. labelWidth: 45,
  2718. // 错误提示方式
  2719. errorType: "message"
  2720. }
  2721. };
  2722. },
  2723. // 组件创建完成时,将当前实例保存到u-form中
  2724. computed: {
  2725. propsLine() {
  2726. return uni.$u.props.line;
  2727. }
  2728. },
  2729. mounted() {
  2730. this.init();
  2731. },
  2732. methods: {
  2733. init() {
  2734. this.updateParentData();
  2735. if (!this.parent) {
  2736. uni.$u.error("u-form-item需要结合u-form组件使用");
  2737. }
  2738. },
  2739. // 获取父组件的参数
  2740. updateParentData() {
  2741. this.getParentData("u-form");
  2742. },
  2743. // 移除u-form-item的校验结果
  2744. clearValidate() {
  2745. this.message = null;
  2746. },
  2747. // 清空当前的组件的校验结果,并重置为初始值
  2748. resetField() {
  2749. const value2 = uni.$u.getProperty(this.parent.originalModel, this.prop);
  2750. uni.$u.setProperty(this.parent.model, this.prop, value2);
  2751. this.message = null;
  2752. },
  2753. // 点击组件
  2754. clickHandler() {
  2755. this.$emit("click");
  2756. }
  2757. }
  2758. };
  2759. function _sfc_render$25(_ctx, _cache, $props, $setup, $data, $options) {
  2760. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  2761. const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_1$b);
  2762. return vue.openBlock(), vue.createElementBlock("view", { class: "u-form-item" }, [
  2763. vue.createElementVNode(
  2764. "view",
  2765. {
  2766. class: "u-form-item__body",
  2767. onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args)),
  2768. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle), {
  2769. flexDirection: $data.parentData.labelPosition === "left" ? "row" : "column"
  2770. }])
  2771. },
  2772. [
  2773. vue.createCommentVNode(' 微信小程序中,将一个参数设置空字符串,结果会变成字符串"true" '),
  2774. vue.renderSlot(_ctx.$slots, "label", {}, () => [
  2775. vue.createCommentVNode(" {{required}} "),
  2776. _ctx.required || _ctx.leftIcon || _ctx.label ? (vue.openBlock(), vue.createElementBlock(
  2777. "view",
  2778. {
  2779. key: 0,
  2780. class: "u-form-item__body__left",
  2781. style: vue.normalizeStyle({
  2782. width: _ctx.$u.addUnit(_ctx.labelWidth || $data.parentData.labelWidth),
  2783. marginBottom: $data.parentData.labelPosition === "left" ? 0 : "5px"
  2784. })
  2785. },
  2786. [
  2787. vue.createCommentVNode(" 为了块对齐 "),
  2788. vue.createElementVNode("view", { class: "u-form-item__body__left__content" }, [
  2789. vue.createCommentVNode(" nvue不支持伪元素before "),
  2790. _ctx.required ? (vue.openBlock(), vue.createElementBlock("text", {
  2791. key: 0,
  2792. class: "u-form-item__body__left__content__required"
  2793. }, "*")) : vue.createCommentVNode("v-if", true),
  2794. _ctx.leftIcon ? (vue.openBlock(), vue.createElementBlock("view", {
  2795. key: 1,
  2796. class: "u-form-item__body__left__content__icon"
  2797. }, [
  2798. vue.createVNode(_component_u_icon, {
  2799. name: _ctx.leftIcon,
  2800. "custom-style": _ctx.leftIconStyle
  2801. }, null, 8, ["name", "custom-style"])
  2802. ])) : vue.createCommentVNode("v-if", true),
  2803. vue.createElementVNode(
  2804. "text",
  2805. {
  2806. class: "u-form-item__body__left__content__label",
  2807. style: vue.normalizeStyle([$data.parentData.labelStyle, {
  2808. justifyContent: $data.parentData.labelAlign === "left" ? "flex-start" : $data.parentData.labelAlign === "center" ? "center" : "flex-end"
  2809. }])
  2810. },
  2811. vue.toDisplayString(_ctx.label),
  2812. 5
  2813. /* TEXT, STYLE */
  2814. )
  2815. ])
  2816. ],
  2817. 4
  2818. /* STYLE */
  2819. )) : vue.createCommentVNode("v-if", true)
  2820. ], true),
  2821. vue.createElementVNode("view", { class: "u-form-item__body__right" }, [
  2822. vue.createElementVNode("view", { class: "u-form-item__body__right__content" }, [
  2823. vue.createElementVNode("view", { class: "u-form-item__body__right__content__slot" }, [
  2824. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  2825. ]),
  2826. _ctx.$slots.right ? (vue.openBlock(), vue.createElementBlock("view", {
  2827. key: 0,
  2828. class: "item__body__right__content__icon"
  2829. }, [
  2830. vue.renderSlot(_ctx.$slots, "right", {}, void 0, true)
  2831. ])) : vue.createCommentVNode("v-if", true)
  2832. ])
  2833. ])
  2834. ],
  2835. 4
  2836. /* STYLE */
  2837. ),
  2838. vue.renderSlot(_ctx.$slots, "error", {}, () => [
  2839. !!$data.message && $data.parentData.errorType === "message" ? (vue.openBlock(), vue.createElementBlock(
  2840. "text",
  2841. {
  2842. key: 0,
  2843. class: "u-form-item__body__right__message",
  2844. style: vue.normalizeStyle({
  2845. marginLeft: _ctx.$u.addUnit($data.parentData.labelPosition === "top" ? 0 : _ctx.labelWidth || $data.parentData.labelWidth)
  2846. })
  2847. },
  2848. vue.toDisplayString($data.message),
  2849. 5
  2850. /* TEXT, STYLE */
  2851. )) : vue.createCommentVNode("v-if", true)
  2852. ], true),
  2853. _ctx.borderBottom ? (vue.openBlock(), vue.createBlock(_component_u_line, {
  2854. key: 0,
  2855. color: $data.message && $data.parentData.errorType === "border-bottom" ? _ctx.$u.color.error : $options.propsLine.color,
  2856. customStyle: `margin-top: ${$data.message && $data.parentData.errorType === "message" ? "5px" : 0}`
  2857. }, null, 8, ["color", "customStyle"])) : vue.createCommentVNode("v-if", true)
  2858. ]);
  2859. }
  2860. const __easycom_1$a = /* @__PURE__ */ _export_sfc(_sfc_main$26, [["render", _sfc_render$25], ["__scopeId", "data-v-42bac3de"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-form-item/u-form-item.vue"]]);
  2861. const props$B = {
  2862. props: {
  2863. // 是否显示组件
  2864. show: {
  2865. type: Boolean,
  2866. default: props$G.loadingIcon.show
  2867. },
  2868. // 颜色
  2869. color: {
  2870. type: String,
  2871. default: props$G.loadingIcon.color
  2872. },
  2873. // 提示文字颜色
  2874. textColor: {
  2875. type: String,
  2876. default: props$G.loadingIcon.textColor
  2877. },
  2878. // 文字和图标是否垂直排列
  2879. vertical: {
  2880. type: Boolean,
  2881. default: props$G.loadingIcon.vertical
  2882. },
  2883. // 模式选择,circle-圆形,spinner-花朵形,semicircle-半圆形
  2884. mode: {
  2885. type: String,
  2886. default: props$G.loadingIcon.mode
  2887. },
  2888. // 图标大小,单位默认px
  2889. size: {
  2890. type: [String, Number],
  2891. default: props$G.loadingIcon.size
  2892. },
  2893. // 文字大小
  2894. textSize: {
  2895. type: [String, Number],
  2896. default: props$G.loadingIcon.textSize
  2897. },
  2898. // 文字内容
  2899. text: {
  2900. type: [String, Number],
  2901. default: props$G.loadingIcon.text
  2902. },
  2903. // 动画模式
  2904. timingFunction: {
  2905. type: String,
  2906. default: props$G.loadingIcon.timingFunction
  2907. },
  2908. // 动画执行周期时间
  2909. duration: {
  2910. type: [String, Number],
  2911. default: props$G.loadingIcon.duration
  2912. },
  2913. // mode=circle时的暗边颜色
  2914. inactiveColor: {
  2915. type: String,
  2916. default: props$G.loadingIcon.inactiveColor
  2917. }
  2918. }
  2919. };
  2920. const _sfc_main$25 = {
  2921. name: "u-loading-icon",
  2922. mixins: [mpMixin, mixin, props$B],
  2923. data() {
  2924. return {
  2925. // Array.form可以通过一个伪数组对象创建指定长度的数组
  2926. // https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Array/from
  2927. array12: Array.from({
  2928. length: 12
  2929. }),
  2930. // 这里需要设置默认值为360,否则在安卓nvue上,会延迟一个duration周期后才执行
  2931. // 在iOS nvue上,则会一开始默认执行两个周期的动画
  2932. aniAngel: 360,
  2933. // 动画旋转角度
  2934. webviewHide: false,
  2935. // 监听webview的状态,如果隐藏了页面,则停止动画,以免性能消耗
  2936. loading: false
  2937. // 是否运行中,针对nvue使用
  2938. };
  2939. },
  2940. computed: {
  2941. // 当为circle类型时,给其另外三边设置一个更轻一些的颜色
  2942. // 之所以需要这么做的原因是,比如父组件传了color为红色,那么需要另外的三个边为浅红色
  2943. // 而不能是固定的某一个其他颜色(因为这个固定的颜色可能浅蓝,导致效果没有那么细腻良好)
  2944. otherBorderColor() {
  2945. const lightColor = uni.$u.colorGradient(this.color, "#ffffff", 100)[80];
  2946. if (this.mode === "circle") {
  2947. return this.inactiveColor ? this.inactiveColor : lightColor;
  2948. } else {
  2949. return "transparent";
  2950. }
  2951. }
  2952. },
  2953. watch: {
  2954. show(n) {
  2955. }
  2956. },
  2957. mounted() {
  2958. this.init();
  2959. },
  2960. methods: {
  2961. init() {
  2962. setTimeout(() => {
  2963. this.show && this.addEventListenerToWebview();
  2964. }, 20);
  2965. },
  2966. // 监听webview的显示与隐藏
  2967. addEventListenerToWebview() {
  2968. const pages2 = getCurrentPages();
  2969. const page2 = pages2[pages2.length - 1];
  2970. const currentWebview = page2.$getAppWebview();
  2971. currentWebview.addEventListener("hide", () => {
  2972. this.webviewHide = true;
  2973. });
  2974. currentWebview.addEventListener("show", () => {
  2975. this.webviewHide = false;
  2976. });
  2977. }
  2978. }
  2979. };
  2980. function _sfc_render$24(_ctx, _cache, $props, $setup, $data, $options) {
  2981. return _ctx.show ? (vue.openBlock(), vue.createElementBlock(
  2982. "view",
  2983. {
  2984. key: 0,
  2985. class: vue.normalizeClass(["u-loading-icon", [_ctx.vertical && "u-loading-icon--vertical"]]),
  2986. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)])
  2987. },
  2988. [
  2989. !$data.webviewHide ? (vue.openBlock(), vue.createElementBlock(
  2990. "view",
  2991. {
  2992. key: 0,
  2993. class: vue.normalizeClass(["u-loading-icon__spinner", [`u-loading-icon__spinner--${_ctx.mode}`]]),
  2994. ref: "ani",
  2995. style: vue.normalizeStyle({
  2996. color: _ctx.color,
  2997. width: _ctx.$u.addUnit(_ctx.size),
  2998. height: _ctx.$u.addUnit(_ctx.size),
  2999. borderTopColor: _ctx.color,
  3000. borderBottomColor: $options.otherBorderColor,
  3001. borderLeftColor: $options.otherBorderColor,
  3002. borderRightColor: $options.otherBorderColor,
  3003. "animation-duration": `${_ctx.duration}ms`,
  3004. "animation-timing-function": _ctx.mode === "semicircle" || _ctx.mode === "circle" ? _ctx.timingFunction : ""
  3005. })
  3006. },
  3007. [
  3008. _ctx.mode === "spinner" ? (vue.openBlock(true), vue.createElementBlock(
  3009. vue.Fragment,
  3010. { key: 0 },
  3011. vue.renderList($data.array12, (item, index2) => {
  3012. return vue.openBlock(), vue.createElementBlock("view", {
  3013. key: index2,
  3014. class: "u-loading-icon__dot"
  3015. });
  3016. }),
  3017. 128
  3018. /* KEYED_FRAGMENT */
  3019. )) : vue.createCommentVNode("v-if", true)
  3020. ],
  3021. 6
  3022. /* CLASS, STYLE */
  3023. )) : vue.createCommentVNode("v-if", true),
  3024. _ctx.text ? (vue.openBlock(), vue.createElementBlock(
  3025. "text",
  3026. {
  3027. key: 1,
  3028. class: "u-loading-icon__text",
  3029. style: vue.normalizeStyle({
  3030. fontSize: _ctx.$u.addUnit(_ctx.textSize),
  3031. color: _ctx.textColor
  3032. })
  3033. },
  3034. vue.toDisplayString(_ctx.text),
  3035. 5
  3036. /* TEXT, STYLE */
  3037. )) : vue.createCommentVNode("v-if", true)
  3038. ],
  3039. 6
  3040. /* CLASS, STYLE */
  3041. )) : vue.createCommentVNode("v-if", true);
  3042. }
  3043. const __easycom_0$e = /* @__PURE__ */ _export_sfc(_sfc_main$25, [["render", _sfc_render$24], ["__scopeId", "data-v-2af81691"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-loading-icon/u-loading-icon.vue"]]);
  3044. const button = {
  3045. props: {
  3046. lang: String,
  3047. sessionFrom: String,
  3048. sendMessageTitle: String,
  3049. sendMessagePath: String,
  3050. sendMessageImg: String,
  3051. showMessageCard: Boolean,
  3052. appParameter: String,
  3053. formType: String,
  3054. openType: String
  3055. }
  3056. };
  3057. const openType = {
  3058. props: {
  3059. openType: String
  3060. },
  3061. methods: {
  3062. onGetUserInfo(event) {
  3063. this.$emit("getuserinfo", event.detail);
  3064. },
  3065. onContact(event) {
  3066. this.$emit("contact", event.detail);
  3067. },
  3068. onGetPhoneNumber(event) {
  3069. this.$emit("getphonenumber", event.detail);
  3070. },
  3071. onError(event) {
  3072. this.$emit("error", event.detail);
  3073. },
  3074. onLaunchApp(event) {
  3075. this.$emit("launchapp", event.detail);
  3076. },
  3077. onOpenSetting(event) {
  3078. this.$emit("opensetting", event.detail);
  3079. }
  3080. }
  3081. };
  3082. const props$A = {
  3083. props: {
  3084. // 是否细边框
  3085. hairline: {
  3086. type: Boolean,
  3087. default: props$G.button.hairline
  3088. },
  3089. // 按钮的预置样式,info,primary,error,warning,success
  3090. type: {
  3091. type: String,
  3092. default: props$G.button.type
  3093. },
  3094. // 按钮尺寸,large,normal,small,mini
  3095. size: {
  3096. type: String,
  3097. default: props$G.button.size
  3098. },
  3099. // 按钮形状,circle(两边为半圆),square(带圆角)
  3100. shape: {
  3101. type: String,
  3102. default: props$G.button.shape
  3103. },
  3104. // 按钮是否镂空
  3105. plain: {
  3106. type: Boolean,
  3107. default: props$G.button.plain
  3108. },
  3109. // 是否禁止状态
  3110. disabled: {
  3111. type: Boolean,
  3112. default: props$G.button.disabled
  3113. },
  3114. // 是否加载中
  3115. loading: {
  3116. type: Boolean,
  3117. default: props$G.button.loading
  3118. },
  3119. // 加载中提示文字
  3120. loadingText: {
  3121. type: [String, Number],
  3122. default: props$G.button.loadingText
  3123. },
  3124. // 加载状态图标类型
  3125. loadingMode: {
  3126. type: String,
  3127. default: props$G.button.loadingMode
  3128. },
  3129. // 加载图标大小
  3130. loadingSize: {
  3131. type: [String, Number],
  3132. default: props$G.button.loadingSize
  3133. },
  3134. // 开放能力,具体请看uniapp稳定关于button组件部分说明
  3135. // https://uniapp.dcloud.io/component/button
  3136. openType: {
  3137. type: String,
  3138. default: props$G.button.openType
  3139. },
  3140. // 用于 <form> 组件,点击分别会触发 <form> 组件的 submit/reset 事件
  3141. // 取值为submit(提交表单),reset(重置表单)
  3142. formType: {
  3143. type: String,
  3144. default: props$G.button.formType
  3145. },
  3146. // 打开 APP 时,向 APP 传递的参数,open-type=launchApp时有效
  3147. // 只微信小程序、QQ小程序有效
  3148. appParameter: {
  3149. type: String,
  3150. default: props$G.button.appParameter
  3151. },
  3152. // 指定是否阻止本节点的祖先节点出现点击态,微信小程序有效
  3153. hoverStopPropagation: {
  3154. type: Boolean,
  3155. default: props$G.button.hoverStopPropagation
  3156. },
  3157. // 指定返回用户信息的语言,zh_CN 简体中文,zh_TW 繁体中文,en 英文。只微信小程序有效
  3158. lang: {
  3159. type: String,
  3160. default: props$G.button.lang
  3161. },
  3162. // 会话来源,open-type="contact"时有效。只微信小程序有效
  3163. sessionFrom: {
  3164. type: String,
  3165. default: props$G.button.sessionFrom
  3166. },
  3167. // 会话内消息卡片标题,open-type="contact"时有效
  3168. // 默认当前标题,只微信小程序有效
  3169. sendMessageTitle: {
  3170. type: String,
  3171. default: props$G.button.sendMessageTitle
  3172. },
  3173. // 会话内消息卡片点击跳转小程序路径,open-type="contact"时有效
  3174. // 默认当前分享路径,只微信小程序有效
  3175. sendMessagePath: {
  3176. type: String,
  3177. default: props$G.button.sendMessagePath
  3178. },
  3179. // 会话内消息卡片图片,open-type="contact"时有效
  3180. // 默认当前页面截图,只微信小程序有效
  3181. sendMessageImg: {
  3182. type: String,
  3183. default: props$G.button.sendMessageImg
  3184. },
  3185. // 是否显示会话内消息卡片,设置此参数为 true,用户进入客服会话会在右下角显示"可能要发送的小程序"提示,
  3186. // 用户点击后可以快速发送小程序消息,open-type="contact"时有效
  3187. showMessageCard: {
  3188. type: Boolean,
  3189. default: props$G.button.showMessageCard
  3190. },
  3191. // 额外传参参数,用于小程序的data-xxx属性,通过target.dataset.name获取
  3192. dataName: {
  3193. type: String,
  3194. default: props$G.button.dataName
  3195. },
  3196. // 节流,一定时间内只能触发一次
  3197. throttleTime: {
  3198. type: [String, Number],
  3199. default: props$G.button.throttleTime
  3200. },
  3201. // 按住后多久出现点击态,单位毫秒
  3202. hoverStartTime: {
  3203. type: [String, Number],
  3204. default: props$G.button.hoverStartTime
  3205. },
  3206. // 手指松开后点击态保留时间,单位毫秒
  3207. hoverStayTime: {
  3208. type: [String, Number],
  3209. default: props$G.button.hoverStayTime
  3210. },
  3211. // 按钮文字,之所以通过props传入,是因为slot传入的话
  3212. // nvue中无法控制文字的样式
  3213. text: {
  3214. type: [String, Number],
  3215. default: props$G.button.text
  3216. },
  3217. // 按钮图标
  3218. icon: {
  3219. type: String,
  3220. default: props$G.button.icon
  3221. },
  3222. // 按钮图标
  3223. iconColor: {
  3224. type: String,
  3225. default: props$G.button.icon
  3226. },
  3227. // 按钮颜色,支持传入linear-gradient渐变色
  3228. color: {
  3229. type: String,
  3230. default: props$G.button.color
  3231. }
  3232. }
  3233. };
  3234. const _sfc_main$24 = {
  3235. name: "u-button",
  3236. mixins: [mpMixin, mixin, props$A],
  3237. data() {
  3238. return {};
  3239. },
  3240. computed: {
  3241. // 生成bem风格的类名
  3242. bemClass() {
  3243. if (!this.color) {
  3244. return this.bem(
  3245. "button",
  3246. ["type", "shape", "size"],
  3247. ["disabled", "plain", "hairline"]
  3248. );
  3249. } else {
  3250. return this.bem(
  3251. "button",
  3252. ["shape", "size"],
  3253. ["disabled", "plain", "hairline"]
  3254. );
  3255. }
  3256. },
  3257. loadingColor() {
  3258. if (this.plain) {
  3259. return this.color ? this.color : uni.$u.config.color[`u-${this.type}`];
  3260. }
  3261. if (this.type === "info") {
  3262. return "#c9c9c9";
  3263. }
  3264. return "rgb(200, 200, 200)";
  3265. },
  3266. iconColorCom() {
  3267. if (this.iconColor)
  3268. return this.iconColor;
  3269. if (this.plain) {
  3270. return this.color ? this.color : this.type;
  3271. } else {
  3272. return this.type === "info" ? "#000000" : "#ffffff";
  3273. }
  3274. },
  3275. baseColor() {
  3276. let style = {};
  3277. if (this.color) {
  3278. style.color = this.plain ? this.color : "white";
  3279. if (!this.plain) {
  3280. style["background-color"] = this.color;
  3281. }
  3282. if (this.color.indexOf("gradient") !== -1) {
  3283. style.borderTopWidth = 0;
  3284. style.borderRightWidth = 0;
  3285. style.borderBottomWidth = 0;
  3286. style.borderLeftWidth = 0;
  3287. if (!this.plain) {
  3288. style.backgroundImage = this.color;
  3289. }
  3290. } else {
  3291. style.borderColor = this.color;
  3292. style.borderWidth = "1px";
  3293. style.borderStyle = "solid";
  3294. }
  3295. }
  3296. return style;
  3297. },
  3298. // nvue版本按钮的字体不会继承父组件的颜色,需要对每一个text组件进行单独的设置
  3299. nvueTextStyle() {
  3300. let style = {};
  3301. if (this.type === "info") {
  3302. style.color = "#323233";
  3303. }
  3304. if (this.color) {
  3305. style.color = this.plain ? this.color : "white";
  3306. }
  3307. style.fontSize = this.textSize + "px";
  3308. return style;
  3309. },
  3310. // 字体大小
  3311. textSize() {
  3312. let fontSize = 16, { size } = this;
  3313. if (size === "large")
  3314. fontSize = 20;
  3315. if (size === "normal")
  3316. fontSize = 16;
  3317. if (size === "small")
  3318. fontSize = 14;
  3319. if (size === "mini")
  3320. fontSize = 12;
  3321. return fontSize;
  3322. }
  3323. },
  3324. emits: [
  3325. "click",
  3326. "getphonenumber",
  3327. "getuserinfo",
  3328. "error",
  3329. "opensetting",
  3330. "launchapp"
  3331. ],
  3332. methods: {
  3333. clickHandler() {
  3334. if (!this.disabled && !this.loading) {
  3335. uni.$u.throttle(() => {
  3336. this.$emit("click");
  3337. }, this.throttleTime);
  3338. }
  3339. },
  3340. // 下面为对接uniapp官方按钮开放能力事件回调的对接
  3341. getphonenumber(res) {
  3342. this.$emit("getphonenumber", res);
  3343. },
  3344. getuserinfo(res) {
  3345. this.$emit("getuserinfo", res);
  3346. },
  3347. error(res) {
  3348. this.$emit("error", res);
  3349. },
  3350. opensetting(res) {
  3351. this.$emit("opensetting", res);
  3352. },
  3353. launchapp(res) {
  3354. this.$emit("launchapp", res);
  3355. }
  3356. }
  3357. };
  3358. function _sfc_render$23(_ctx, _cache, $props, $setup, $data, $options) {
  3359. const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$e);
  3360. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  3361. return vue.openBlock(), vue.createElementBlock("button", {
  3362. "hover-start-time": Number(_ctx.hoverStartTime),
  3363. "hover-stay-time": Number(_ctx.hoverStayTime),
  3364. "form-type": _ctx.formType,
  3365. "open-type": _ctx.openType,
  3366. "app-parameter": _ctx.appParameter,
  3367. "hover-stop-propagation": _ctx.hoverStopPropagation,
  3368. "send-message-title": _ctx.sendMessageTitle,
  3369. "send-message-path": _ctx.sendMessagePath,
  3370. lang: _ctx.lang,
  3371. "data-name": _ctx.dataName,
  3372. "session-from": _ctx.sessionFrom,
  3373. "send-message-img": _ctx.sendMessageImg,
  3374. "show-message-card": _ctx.showMessageCard,
  3375. onGetphonenumber: _cache[0] || (_cache[0] = (...args) => $options.getphonenumber && $options.getphonenumber(...args)),
  3376. onGetuserinfo: _cache[1] || (_cache[1] = (...args) => $options.getuserinfo && $options.getuserinfo(...args)),
  3377. onError: _cache[2] || (_cache[2] = (...args) => $options.error && $options.error(...args)),
  3378. onOpensetting: _cache[3] || (_cache[3] = (...args) => $options.opensetting && $options.opensetting(...args)),
  3379. onLaunchapp: _cache[4] || (_cache[4] = (...args) => $options.launchapp && $options.launchapp(...args)),
  3380. "hover-class": !_ctx.disabled && !_ctx.loading ? "u-button--active" : "",
  3381. class: vue.normalizeClass(["u-button u-reset-button", $options.bemClass]),
  3382. style: vue.normalizeStyle([$options.baseColor, _ctx.$u.addStyle(_ctx.customStyle)]),
  3383. onClick: _cache[5] || (_cache[5] = (...args) => $options.clickHandler && $options.clickHandler(...args))
  3384. }, [
  3385. _ctx.loading ? (vue.openBlock(), vue.createElementBlock(
  3386. vue.Fragment,
  3387. { key: 0 },
  3388. [
  3389. vue.createVNode(_component_u_loading_icon, {
  3390. mode: _ctx.loadingMode,
  3391. size: _ctx.loadingSize * 1.15,
  3392. color: $options.loadingColor
  3393. }, null, 8, ["mode", "size", "color"]),
  3394. vue.createElementVNode(
  3395. "text",
  3396. {
  3397. class: "u-button__loading-text",
  3398. style: vue.normalizeStyle([{ fontSize: $options.textSize + "px" }])
  3399. },
  3400. vue.toDisplayString(_ctx.loadingText || _ctx.text),
  3401. 5
  3402. /* TEXT, STYLE */
  3403. )
  3404. ],
  3405. 64
  3406. /* STABLE_FRAGMENT */
  3407. )) : (vue.openBlock(), vue.createElementBlock(
  3408. vue.Fragment,
  3409. { key: 1 },
  3410. [
  3411. _ctx.icon ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  3412. key: 0,
  3413. name: _ctx.icon,
  3414. color: $options.iconColorCom,
  3415. size: $options.textSize * 1.35,
  3416. customStyle: { marginRight: "2px" }
  3417. }, null, 8, ["name", "color", "size"])) : vue.createCommentVNode("v-if", true),
  3418. vue.renderSlot(_ctx.$slots, "default", {}, () => [
  3419. vue.createElementVNode(
  3420. "text",
  3421. {
  3422. class: "u-button__text",
  3423. style: vue.normalizeStyle([{ fontSize: $options.textSize + "px" }])
  3424. },
  3425. vue.toDisplayString(_ctx.text),
  3426. 5
  3427. /* TEXT, STYLE */
  3428. )
  3429. ], true)
  3430. ],
  3431. 64
  3432. /* STABLE_FRAGMENT */
  3433. ))
  3434. ], 46, ["hover-start-time", "hover-stay-time", "form-type", "open-type", "app-parameter", "hover-stop-propagation", "send-message-title", "send-message-path", "lang", "data-name", "session-from", "send-message-img", "show-message-card", "hover-class"]);
  3435. }
  3436. const __easycom_3$6 = /* @__PURE__ */ _export_sfc(_sfc_main$24, [["render", _sfc_render$23], ["__scopeId", "data-v-5ce41ee6"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-button/u-button.vue"]]);
  3437. const props$z = {
  3438. props: {
  3439. // 当前form的需要验证字段的集合
  3440. model: {
  3441. type: Object,
  3442. default: props$G.form.model
  3443. },
  3444. // 验证规则
  3445. rules: {
  3446. type: [Object, Function, Array],
  3447. default: props$G.form.rules
  3448. },
  3449. // 有错误时的提示方式,message-提示信息,toast-进行toast提示
  3450. // border-bottom-下边框呈现红色,none-无提示
  3451. errorType: {
  3452. type: String,
  3453. default: props$G.form.errorType
  3454. },
  3455. // 是否显示表单域的下划线边框
  3456. borderBottom: {
  3457. type: Boolean,
  3458. default: props$G.form.borderBottom
  3459. },
  3460. // label的位置,left-左边,top-上边
  3461. labelPosition: {
  3462. type: String,
  3463. default: props$G.form.labelPosition
  3464. },
  3465. // label的宽度,单位px
  3466. labelWidth: {
  3467. type: [String, Number],
  3468. default: props$G.form.labelWidth
  3469. },
  3470. // lable字体的对齐方式
  3471. labelAlign: {
  3472. type: String,
  3473. default: props$G.form.labelAlign
  3474. },
  3475. // lable的样式,对象形式
  3476. labelStyle: {
  3477. type: Object,
  3478. default: props$G.form.labelStyle
  3479. }
  3480. }
  3481. };
  3482. var define_process_env_default = {};
  3483. const formatRegExp = /%[sdj%]/g;
  3484. let warning = function warning2() {
  3485. };
  3486. if (typeof process !== "undefined" && define_process_env_default && true && typeof window !== "undefined" && typeof document !== "undefined") {
  3487. warning = function warning3(type2, errors) {
  3488. if (typeof console !== "undefined" && console.warn) {
  3489. if (errors.every((e) => typeof e === "string")) {
  3490. formatAppLog("warn", "at uni_modules/uview-plus/libs/util/async-validator.js:28", type2, errors);
  3491. }
  3492. }
  3493. };
  3494. }
  3495. function convertFieldsError(errors) {
  3496. if (!errors || !errors.length)
  3497. return null;
  3498. const fields = {};
  3499. errors.forEach((error2) => {
  3500. const { field } = error2;
  3501. fields[field] = fields[field] || [];
  3502. fields[field].push(error2);
  3503. });
  3504. return fields;
  3505. }
  3506. function format() {
  3507. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  3508. args[_key] = arguments[_key];
  3509. }
  3510. let i = 1;
  3511. const f = args[0];
  3512. const len = args.length;
  3513. if (typeof f === "function") {
  3514. return f.apply(null, args.slice(1));
  3515. }
  3516. if (typeof f === "string") {
  3517. let str = String(f).replace(formatRegExp, (x) => {
  3518. if (x === "%%") {
  3519. return "%";
  3520. }
  3521. if (i >= len) {
  3522. return x;
  3523. }
  3524. switch (x) {
  3525. case "%s":
  3526. return String(args[i++]);
  3527. case "%d":
  3528. return Number(args[i++]);
  3529. case "%j":
  3530. try {
  3531. return JSON.stringify(args[i++]);
  3532. } catch (_) {
  3533. return "[Circular]";
  3534. }
  3535. break;
  3536. default:
  3537. return x;
  3538. }
  3539. });
  3540. for (let arg = args[i]; i < len; arg = args[++i]) {
  3541. str += ` ${arg}`;
  3542. }
  3543. return str;
  3544. }
  3545. return f;
  3546. }
  3547. function isNativeStringType(type2) {
  3548. return type2 === "string" || type2 === "url" || type2 === "hex" || type2 === "email" || type2 === "pattern";
  3549. }
  3550. function isEmptyValue(value2, type2) {
  3551. if (value2 === void 0 || value2 === null) {
  3552. return true;
  3553. }
  3554. if (type2 === "array" && Array.isArray(value2) && !value2.length) {
  3555. return true;
  3556. }
  3557. if (isNativeStringType(type2) && typeof value2 === "string" && !value2) {
  3558. return true;
  3559. }
  3560. return false;
  3561. }
  3562. function asyncParallelArray(arr, func2, callback) {
  3563. const results = [];
  3564. let total = 0;
  3565. const arrLength = arr.length;
  3566. function count(errors) {
  3567. results.push.apply(results, errors);
  3568. total++;
  3569. if (total === arrLength) {
  3570. callback(results);
  3571. }
  3572. }
  3573. arr.forEach((a) => {
  3574. func2(a, count);
  3575. });
  3576. }
  3577. function asyncSerialArray(arr, func2, callback) {
  3578. let index2 = 0;
  3579. const arrLength = arr.length;
  3580. function next(errors) {
  3581. if (errors && errors.length) {
  3582. callback(errors);
  3583. return;
  3584. }
  3585. const original = index2;
  3586. index2 += 1;
  3587. if (original < arrLength) {
  3588. func2(arr[original], next);
  3589. } else {
  3590. callback([]);
  3591. }
  3592. }
  3593. next([]);
  3594. }
  3595. function flattenObjArr(objArr) {
  3596. const ret = [];
  3597. Object.keys(objArr).forEach((k) => {
  3598. ret.push.apply(ret, objArr[k]);
  3599. });
  3600. return ret;
  3601. }
  3602. function asyncMap(objArr, option, func2, callback) {
  3603. if (option.first) {
  3604. const _pending = new Promise((resolve, reject) => {
  3605. const next = function next2(errors) {
  3606. callback(errors);
  3607. return errors.length ? reject({
  3608. errors,
  3609. fields: convertFieldsError(errors)
  3610. }) : resolve();
  3611. };
  3612. const flattenArr = flattenObjArr(objArr);
  3613. asyncSerialArray(flattenArr, func2, next);
  3614. });
  3615. _pending.catch((e) => e);
  3616. return _pending;
  3617. }
  3618. let firstFields = option.firstFields || [];
  3619. if (firstFields === true) {
  3620. firstFields = Object.keys(objArr);
  3621. }
  3622. const objArrKeys = Object.keys(objArr);
  3623. const objArrLength = objArrKeys.length;
  3624. let total = 0;
  3625. const results = [];
  3626. const pending = new Promise((resolve, reject) => {
  3627. const next = function next2(errors) {
  3628. results.push.apply(results, errors);
  3629. total++;
  3630. if (total === objArrLength) {
  3631. callback(results);
  3632. return results.length ? reject({
  3633. errors: results,
  3634. fields: convertFieldsError(results)
  3635. }) : resolve();
  3636. }
  3637. };
  3638. if (!objArrKeys.length) {
  3639. callback(results);
  3640. resolve();
  3641. }
  3642. objArrKeys.forEach((key) => {
  3643. const arr = objArr[key];
  3644. if (firstFields.indexOf(key) !== -1) {
  3645. asyncSerialArray(arr, func2, next);
  3646. } else {
  3647. asyncParallelArray(arr, func2, next);
  3648. }
  3649. });
  3650. });
  3651. pending.catch((e) => e);
  3652. return pending;
  3653. }
  3654. function complementError(rule) {
  3655. return function(oe) {
  3656. if (oe && oe.message) {
  3657. oe.field = oe.field || rule.fullField;
  3658. return oe;
  3659. }
  3660. return {
  3661. message: typeof oe === "function" ? oe() : oe,
  3662. field: oe.field || rule.fullField
  3663. };
  3664. };
  3665. }
  3666. function deepMerge$2(target, source) {
  3667. if (source) {
  3668. for (const s in source) {
  3669. if (source.hasOwnProperty(s)) {
  3670. const value2 = source[s];
  3671. if (typeof value2 === "object" && typeof target[s] === "object") {
  3672. target[s] = { ...target[s], ...value2 };
  3673. } else {
  3674. target[s] = value2;
  3675. }
  3676. }
  3677. }
  3678. }
  3679. return target;
  3680. }
  3681. function required(rule, value2, source, errors, options, type2) {
  3682. if (rule.required && (!source.hasOwnProperty(rule.field) || isEmptyValue(value2, type2 || rule.type))) {
  3683. errors.push(format(options.messages.required, rule.fullField));
  3684. }
  3685. }
  3686. function whitespace(rule, value2, source, errors, options) {
  3687. if (/^\s+$/.test(value2) || value2 === "") {
  3688. errors.push(format(options.messages.whitespace, rule.fullField));
  3689. }
  3690. }
  3691. const pattern = {
  3692. // http://emailregex.com/
  3693. email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,
  3694. url: new RegExp(
  3695. "^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$",
  3696. "i"
  3697. ),
  3698. hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
  3699. };
  3700. var types = {
  3701. integer: function integer(value2) {
  3702. return /^(-)?\d+$/.test(value2);
  3703. },
  3704. float: function float(value2) {
  3705. return /^(-)?\d+(\.\d+)?$/.test(value2);
  3706. },
  3707. array: function array3(value2) {
  3708. return Array.isArray(value2);
  3709. },
  3710. regexp: function regexp(value2) {
  3711. if (value2 instanceof RegExp) {
  3712. return true;
  3713. }
  3714. try {
  3715. return !!new RegExp(value2);
  3716. } catch (e) {
  3717. return false;
  3718. }
  3719. },
  3720. date: function date3(value2) {
  3721. return typeof value2.getTime === "function" && typeof value2.getMonth === "function" && typeof value2.getYear === "function";
  3722. },
  3723. number: function number3(value2) {
  3724. if (isNaN(value2)) {
  3725. return false;
  3726. }
  3727. return typeof +value2 === "number";
  3728. },
  3729. object: function object3(value2) {
  3730. return typeof value2 === "object" && !types.array(value2);
  3731. },
  3732. method: function method(value2) {
  3733. return typeof value2 === "function";
  3734. },
  3735. email: function email2(value2) {
  3736. return typeof value2 === "string" && !!value2.match(pattern.email) && value2.length < 255;
  3737. },
  3738. url: function url2(value2) {
  3739. return typeof value2 === "string" && !!value2.match(pattern.url);
  3740. },
  3741. hex: function hex(value2) {
  3742. return typeof value2 === "string" && !!value2.match(pattern.hex);
  3743. }
  3744. };
  3745. function type(rule, value2, source, errors, options) {
  3746. if (rule.required && value2 === void 0) {
  3747. required(rule, value2, source, errors, options);
  3748. return;
  3749. }
  3750. const custom = ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"];
  3751. const ruleType = rule.type;
  3752. if (custom.indexOf(ruleType) > -1) {
  3753. if (!types[ruleType](value2)) {
  3754. errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
  3755. }
  3756. } else if (ruleType && typeof value2 !== rule.type) {
  3757. errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
  3758. }
  3759. }
  3760. function range$2(rule, value2, source, errors, options) {
  3761. const len = typeof rule.len === "number";
  3762. const min = typeof rule.min === "number";
  3763. const max = typeof rule.max === "number";
  3764. const spRegexp = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
  3765. let val = value2;
  3766. let key = null;
  3767. const num = typeof value2 === "number";
  3768. const str = typeof value2 === "string";
  3769. const arr = Array.isArray(value2);
  3770. if (num) {
  3771. key = "number";
  3772. } else if (str) {
  3773. key = "string";
  3774. } else if (arr) {
  3775. key = "array";
  3776. }
  3777. if (!key) {
  3778. return false;
  3779. }
  3780. if (arr) {
  3781. val = value2.length;
  3782. }
  3783. if (str) {
  3784. val = value2.replace(spRegexp, "_").length;
  3785. }
  3786. if (len) {
  3787. if (val !== rule.len) {
  3788. errors.push(format(options.messages[key].len, rule.fullField, rule.len));
  3789. }
  3790. } else if (min && !max && val < rule.min) {
  3791. errors.push(format(options.messages[key].min, rule.fullField, rule.min));
  3792. } else if (max && !min && val > rule.max) {
  3793. errors.push(format(options.messages[key].max, rule.fullField, rule.max));
  3794. } else if (min && max && (val < rule.min || val > rule.max)) {
  3795. errors.push(format(options.messages[key].range, rule.fullField, rule.min, rule.max));
  3796. }
  3797. }
  3798. const ENUM = "enum";
  3799. function enumerable(rule, value2, source, errors, options) {
  3800. rule[ENUM] = Array.isArray(rule[ENUM]) ? rule[ENUM] : [];
  3801. if (rule[ENUM].indexOf(value2) === -1) {
  3802. errors.push(format(options.messages[ENUM], rule.fullField, rule[ENUM].join(", ")));
  3803. }
  3804. }
  3805. function pattern$1(rule, value2, source, errors, options) {
  3806. if (rule.pattern) {
  3807. if (rule.pattern instanceof RegExp) {
  3808. rule.pattern.lastIndex = 0;
  3809. if (!rule.pattern.test(value2)) {
  3810. errors.push(format(options.messages.pattern.mismatch, rule.fullField, value2, rule.pattern));
  3811. }
  3812. } else if (typeof rule.pattern === "string") {
  3813. const _pattern = new RegExp(rule.pattern);
  3814. if (!_pattern.test(value2)) {
  3815. errors.push(format(options.messages.pattern.mismatch, rule.fullField, value2, rule.pattern));
  3816. }
  3817. }
  3818. }
  3819. }
  3820. const rules = {
  3821. required,
  3822. whitespace,
  3823. type,
  3824. range: range$2,
  3825. enum: enumerable,
  3826. pattern: pattern$1
  3827. };
  3828. function string$1(rule, value2, callback, source, options) {
  3829. const errors = [];
  3830. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  3831. if (validate2) {
  3832. if (isEmptyValue(value2, "string") && !rule.required) {
  3833. return callback();
  3834. }
  3835. rules.required(rule, value2, source, errors, options, "string");
  3836. if (!isEmptyValue(value2, "string")) {
  3837. rules.type(rule, value2, source, errors, options);
  3838. rules.range(rule, value2, source, errors, options);
  3839. rules.pattern(rule, value2, source, errors, options);
  3840. if (rule.whitespace === true) {
  3841. rules.whitespace(rule, value2, source, errors, options);
  3842. }
  3843. }
  3844. }
  3845. callback(errors);
  3846. }
  3847. function method2(rule, value2, callback, source, options) {
  3848. const errors = [];
  3849. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  3850. if (validate2) {
  3851. if (isEmptyValue(value2) && !rule.required) {
  3852. return callback();
  3853. }
  3854. rules.required(rule, value2, source, errors, options);
  3855. if (value2 !== void 0) {
  3856. rules.type(rule, value2, source, errors, options);
  3857. }
  3858. }
  3859. callback(errors);
  3860. }
  3861. function number2(rule, value2, callback, source, options) {
  3862. const errors = [];
  3863. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  3864. if (validate2) {
  3865. if (value2 === "") {
  3866. value2 = void 0;
  3867. }
  3868. if (isEmptyValue(value2) && !rule.required) {
  3869. return callback();
  3870. }
  3871. rules.required(rule, value2, source, errors, options);
  3872. if (value2 !== void 0) {
  3873. rules.type(rule, value2, source, errors, options);
  3874. rules.range(rule, value2, source, errors, options);
  3875. }
  3876. }
  3877. callback(errors);
  3878. }
  3879. function _boolean(rule, value2, callback, source, options) {
  3880. const errors = [];
  3881. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  3882. if (validate2) {
  3883. if (isEmptyValue(value2) && !rule.required) {
  3884. return callback();
  3885. }
  3886. rules.required(rule, value2, source, errors, options);
  3887. if (value2 !== void 0) {
  3888. rules.type(rule, value2, source, errors, options);
  3889. }
  3890. }
  3891. callback(errors);
  3892. }
  3893. function regexp2(rule, value2, callback, source, options) {
  3894. const errors = [];
  3895. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  3896. if (validate2) {
  3897. if (isEmptyValue(value2) && !rule.required) {
  3898. return callback();
  3899. }
  3900. rules.required(rule, value2, source, errors, options);
  3901. if (!isEmptyValue(value2)) {
  3902. rules.type(rule, value2, source, errors, options);
  3903. }
  3904. }
  3905. callback(errors);
  3906. }
  3907. function integer2(rule, value2, callback, source, options) {
  3908. const errors = [];
  3909. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  3910. if (validate2) {
  3911. if (isEmptyValue(value2) && !rule.required) {
  3912. return callback();
  3913. }
  3914. rules.required(rule, value2, source, errors, options);
  3915. if (value2 !== void 0) {
  3916. rules.type(rule, value2, source, errors, options);
  3917. rules.range(rule, value2, source, errors, options);
  3918. }
  3919. }
  3920. callback(errors);
  3921. }
  3922. function floatFn(rule, value2, callback, source, options) {
  3923. const errors = [];
  3924. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  3925. if (validate2) {
  3926. if (isEmptyValue(value2) && !rule.required) {
  3927. return callback();
  3928. }
  3929. rules.required(rule, value2, source, errors, options);
  3930. if (value2 !== void 0) {
  3931. rules.type(rule, value2, source, errors, options);
  3932. rules.range(rule, value2, source, errors, options);
  3933. }
  3934. }
  3935. callback(errors);
  3936. }
  3937. function array2(rule, value2, callback, source, options) {
  3938. const errors = [];
  3939. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  3940. if (validate2) {
  3941. if (isEmptyValue(value2, "array") && !rule.required) {
  3942. return callback();
  3943. }
  3944. rules.required(rule, value2, source, errors, options, "array");
  3945. if (!isEmptyValue(value2, "array")) {
  3946. rules.type(rule, value2, source, errors, options);
  3947. rules.range(rule, value2, source, errors, options);
  3948. }
  3949. }
  3950. callback(errors);
  3951. }
  3952. function object2(rule, value2, callback, source, options) {
  3953. const errors = [];
  3954. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  3955. if (validate2) {
  3956. if (isEmptyValue(value2) && !rule.required) {
  3957. return callback();
  3958. }
  3959. rules.required(rule, value2, source, errors, options);
  3960. if (value2 !== void 0) {
  3961. rules.type(rule, value2, source, errors, options);
  3962. }
  3963. }
  3964. callback(errors);
  3965. }
  3966. const ENUM$1 = "enum";
  3967. function enumerable$1(rule, value2, callback, source, options) {
  3968. const errors = [];
  3969. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  3970. if (validate2) {
  3971. if (isEmptyValue(value2) && !rule.required) {
  3972. return callback();
  3973. }
  3974. rules.required(rule, value2, source, errors, options);
  3975. if (value2 !== void 0) {
  3976. rules[ENUM$1](rule, value2, source, errors, options);
  3977. }
  3978. }
  3979. callback(errors);
  3980. }
  3981. function pattern$2(rule, value2, callback, source, options) {
  3982. const errors = [];
  3983. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  3984. if (validate2) {
  3985. if (isEmptyValue(value2, "string") && !rule.required) {
  3986. return callback();
  3987. }
  3988. rules.required(rule, value2, source, errors, options);
  3989. if (!isEmptyValue(value2, "string")) {
  3990. rules.pattern(rule, value2, source, errors, options);
  3991. }
  3992. }
  3993. callback(errors);
  3994. }
  3995. function date2(rule, value2, callback, source, options) {
  3996. const errors = [];
  3997. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  3998. if (validate2) {
  3999. if (isEmptyValue(value2) && !rule.required) {
  4000. return callback();
  4001. }
  4002. rules.required(rule, value2, source, errors, options);
  4003. if (!isEmptyValue(value2)) {
  4004. let dateObject;
  4005. if (typeof value2 === "number") {
  4006. dateObject = new Date(value2);
  4007. } else {
  4008. dateObject = value2;
  4009. }
  4010. rules.type(rule, dateObject, source, errors, options);
  4011. if (dateObject) {
  4012. rules.range(rule, dateObject.getTime(), source, errors, options);
  4013. }
  4014. }
  4015. }
  4016. callback(errors);
  4017. }
  4018. function required$1(rule, value2, callback, source, options) {
  4019. const errors = [];
  4020. const type2 = Array.isArray(value2) ? "array" : typeof value2;
  4021. rules.required(rule, value2, source, errors, options, type2);
  4022. callback(errors);
  4023. }
  4024. function type$1(rule, value2, callback, source, options) {
  4025. const ruleType = rule.type;
  4026. const errors = [];
  4027. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  4028. if (validate2) {
  4029. if (isEmptyValue(value2, ruleType) && !rule.required) {
  4030. return callback();
  4031. }
  4032. rules.required(rule, value2, source, errors, options, ruleType);
  4033. if (!isEmptyValue(value2, ruleType)) {
  4034. rules.type(rule, value2, source, errors, options);
  4035. }
  4036. }
  4037. callback(errors);
  4038. }
  4039. function any(rule, value2, callback, source, options) {
  4040. const errors = [];
  4041. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  4042. if (validate2) {
  4043. if (isEmptyValue(value2) && !rule.required) {
  4044. return callback();
  4045. }
  4046. rules.required(rule, value2, source, errors, options);
  4047. }
  4048. callback(errors);
  4049. }
  4050. const validators = {
  4051. string: string$1,
  4052. method: method2,
  4053. number: number2,
  4054. boolean: _boolean,
  4055. regexp: regexp2,
  4056. integer: integer2,
  4057. float: floatFn,
  4058. array: array2,
  4059. object: object2,
  4060. enum: enumerable$1,
  4061. pattern: pattern$2,
  4062. date: date2,
  4063. url: type$1,
  4064. hex: type$1,
  4065. email: type$1,
  4066. required: required$1,
  4067. any
  4068. };
  4069. function newMessages() {
  4070. return {
  4071. default: "Validation error on field %s",
  4072. required: "%s is required",
  4073. enum: "%s must be one of %s",
  4074. whitespace: "%s cannot be empty",
  4075. date: {
  4076. format: "%s date %s is invalid for format %s",
  4077. parse: "%s date could not be parsed, %s is invalid ",
  4078. invalid: "%s date %s is invalid"
  4079. },
  4080. types: {
  4081. string: "%s is not a %s",
  4082. method: "%s is not a %s (function)",
  4083. array: "%s is not an %s",
  4084. object: "%s is not an %s",
  4085. number: "%s is not a %s",
  4086. date: "%s is not a %s",
  4087. boolean: "%s is not a %s",
  4088. integer: "%s is not an %s",
  4089. float: "%s is not a %s",
  4090. regexp: "%s is not a valid %s",
  4091. email: "%s is not a valid %s",
  4092. url: "%s is not a valid %s",
  4093. hex: "%s is not a valid %s"
  4094. },
  4095. string: {
  4096. len: "%s must be exactly %s characters",
  4097. min: "%s must be at least %s characters",
  4098. max: "%s cannot be longer than %s characters",
  4099. range: "%s must be between %s and %s characters"
  4100. },
  4101. number: {
  4102. len: "%s must equal %s",
  4103. min: "%s cannot be less than %s",
  4104. max: "%s cannot be greater than %s",
  4105. range: "%s must be between %s and %s"
  4106. },
  4107. array: {
  4108. len: "%s must be exactly %s in length",
  4109. min: "%s cannot be less than %s in length",
  4110. max: "%s cannot be greater than %s in length",
  4111. range: "%s must be between %s and %s in length"
  4112. },
  4113. pattern: {
  4114. mismatch: "%s value %s does not match pattern %s"
  4115. },
  4116. clone: function clone2() {
  4117. const cloned = JSON.parse(JSON.stringify(this));
  4118. cloned.clone = this.clone;
  4119. return cloned;
  4120. }
  4121. };
  4122. }
  4123. const messages = newMessages();
  4124. function Schema(descriptor) {
  4125. this.rules = null;
  4126. this._messages = messages;
  4127. this.define(descriptor);
  4128. }
  4129. Schema.prototype = {
  4130. messages: function messages2(_messages) {
  4131. if (_messages) {
  4132. this._messages = deepMerge$2(newMessages(), _messages);
  4133. }
  4134. return this._messages;
  4135. },
  4136. define: function define(rules2) {
  4137. if (!rules2) {
  4138. throw new Error("Cannot configure a schema with no rules");
  4139. }
  4140. if (typeof rules2 !== "object" || Array.isArray(rules2)) {
  4141. throw new Error("Rules must be an object");
  4142. }
  4143. this.rules = {};
  4144. let z;
  4145. let item;
  4146. for (z in rules2) {
  4147. if (rules2.hasOwnProperty(z)) {
  4148. item = rules2[z];
  4149. this.rules[z] = Array.isArray(item) ? item : [item];
  4150. }
  4151. }
  4152. },
  4153. validate: function validate(source_, o, oc) {
  4154. const _this = this;
  4155. if (o === void 0) {
  4156. o = {};
  4157. }
  4158. if (oc === void 0) {
  4159. oc = function oc2() {
  4160. };
  4161. }
  4162. let source = source_;
  4163. let options = o;
  4164. let callback = oc;
  4165. if (typeof options === "function") {
  4166. callback = options;
  4167. options = {};
  4168. }
  4169. if (!this.rules || Object.keys(this.rules).length === 0) {
  4170. if (callback) {
  4171. callback();
  4172. }
  4173. return Promise.resolve();
  4174. }
  4175. function complete(results) {
  4176. let i;
  4177. let errors = [];
  4178. let fields = {};
  4179. function add(e) {
  4180. if (Array.isArray(e)) {
  4181. let _errors;
  4182. errors = (_errors = errors).concat.apply(_errors, e);
  4183. } else {
  4184. errors.push(e);
  4185. }
  4186. }
  4187. for (i = 0; i < results.length; i++) {
  4188. add(results[i]);
  4189. }
  4190. if (!errors.length) {
  4191. errors = null;
  4192. fields = null;
  4193. } else {
  4194. fields = convertFieldsError(errors);
  4195. }
  4196. callback(errors, fields);
  4197. }
  4198. if (options.messages) {
  4199. let messages$1 = this.messages();
  4200. if (messages$1 === messages) {
  4201. messages$1 = newMessages();
  4202. }
  4203. deepMerge$2(messages$1, options.messages);
  4204. options.messages = messages$1;
  4205. } else {
  4206. options.messages = this.messages();
  4207. }
  4208. let arr;
  4209. let value2;
  4210. const series = {};
  4211. const keys = options.keys || Object.keys(this.rules);
  4212. keys.forEach((z) => {
  4213. arr = _this.rules[z];
  4214. value2 = source[z];
  4215. arr.forEach((r) => {
  4216. let rule = r;
  4217. if (typeof rule.transform === "function") {
  4218. if (source === source_) {
  4219. source = { ...source };
  4220. }
  4221. value2 = source[z] = rule.transform(value2);
  4222. }
  4223. if (typeof rule === "function") {
  4224. rule = {
  4225. validator: rule
  4226. };
  4227. } else {
  4228. rule = { ...rule };
  4229. }
  4230. rule.validator = _this.getValidationMethod(rule);
  4231. rule.field = z;
  4232. rule.fullField = rule.fullField || z;
  4233. rule.type = _this.getType(rule);
  4234. if (!rule.validator) {
  4235. return;
  4236. }
  4237. series[z] = series[z] || [];
  4238. series[z].push({
  4239. rule,
  4240. value: value2,
  4241. source,
  4242. field: z
  4243. });
  4244. });
  4245. });
  4246. const errorFields = {};
  4247. return asyncMap(series, options, (data, doIt) => {
  4248. const { rule } = data;
  4249. let deep = (rule.type === "object" || rule.type === "array") && (typeof rule.fields === "object" || typeof rule.defaultField === "object");
  4250. deep = deep && (rule.required || !rule.required && data.value);
  4251. rule.field = data.field;
  4252. function addFullfield(key, schema) {
  4253. return { ...schema, fullField: `${rule.fullField}.${key}` };
  4254. }
  4255. function cb(e) {
  4256. if (e === void 0) {
  4257. e = [];
  4258. }
  4259. let errors = e;
  4260. if (!Array.isArray(errors)) {
  4261. errors = [errors];
  4262. }
  4263. if (!options.suppressWarning && errors.length) {
  4264. Schema.warning("async-validator:", errors);
  4265. }
  4266. if (errors.length && rule.message) {
  4267. errors = [].concat(rule.message);
  4268. }
  4269. errors = errors.map(complementError(rule));
  4270. if (options.first && errors.length) {
  4271. errorFields[rule.field] = 1;
  4272. return doIt(errors);
  4273. }
  4274. if (!deep) {
  4275. doIt(errors);
  4276. } else {
  4277. if (rule.required && !data.value) {
  4278. if (rule.message) {
  4279. errors = [].concat(rule.message).map(complementError(rule));
  4280. } else if (options.error) {
  4281. errors = [options.error(rule, format(options.messages.required, rule.field))];
  4282. } else {
  4283. errors = [];
  4284. }
  4285. return doIt(errors);
  4286. }
  4287. let fieldsSchema = {};
  4288. if (rule.defaultField) {
  4289. for (const k in data.value) {
  4290. if (data.value.hasOwnProperty(k)) {
  4291. fieldsSchema[k] = rule.defaultField;
  4292. }
  4293. }
  4294. }
  4295. fieldsSchema = { ...fieldsSchema, ...data.rule.fields };
  4296. for (const f in fieldsSchema) {
  4297. if (fieldsSchema.hasOwnProperty(f)) {
  4298. const fieldSchema = Array.isArray(fieldsSchema[f]) ? fieldsSchema[f] : [fieldsSchema[f]];
  4299. fieldsSchema[f] = fieldSchema.map(addFullfield.bind(null, f));
  4300. }
  4301. }
  4302. const schema = new Schema(fieldsSchema);
  4303. schema.messages(options.messages);
  4304. if (data.rule.options) {
  4305. data.rule.options.messages = options.messages;
  4306. data.rule.options.error = options.error;
  4307. }
  4308. schema.validate(data.value, data.rule.options || options, (errs) => {
  4309. const finalErrors = [];
  4310. if (errors && errors.length) {
  4311. finalErrors.push.apply(finalErrors, errors);
  4312. }
  4313. if (errs && errs.length) {
  4314. finalErrors.push.apply(finalErrors, errs);
  4315. }
  4316. doIt(finalErrors.length ? finalErrors : null);
  4317. });
  4318. }
  4319. }
  4320. let res;
  4321. if (rule.asyncValidator) {
  4322. res = rule.asyncValidator(rule, data.value, cb, data.source, options);
  4323. } else if (rule.validator) {
  4324. res = rule.validator(rule, data.value, cb, data.source, options);
  4325. if (res === true) {
  4326. cb();
  4327. } else if (res === false) {
  4328. cb(rule.message || `${rule.field} fails`);
  4329. } else if (res instanceof Array) {
  4330. cb(res);
  4331. } else if (res instanceof Error) {
  4332. cb(res.message);
  4333. }
  4334. }
  4335. if (res && res.then) {
  4336. res.then(() => cb(), (e) => cb(e));
  4337. }
  4338. }, (results) => {
  4339. complete(results);
  4340. });
  4341. },
  4342. getType: function getType(rule) {
  4343. if (rule.type === void 0 && rule.pattern instanceof RegExp) {
  4344. rule.type = "pattern";
  4345. }
  4346. if (typeof rule.validator !== "function" && rule.type && !validators.hasOwnProperty(rule.type)) {
  4347. throw new Error(format("Unknown rule type %s", rule.type));
  4348. }
  4349. return rule.type || "string";
  4350. },
  4351. getValidationMethod: function getValidationMethod(rule) {
  4352. if (typeof rule.validator === "function") {
  4353. return rule.validator;
  4354. }
  4355. const keys = Object.keys(rule);
  4356. const messageIndex = keys.indexOf("message");
  4357. if (messageIndex !== -1) {
  4358. keys.splice(messageIndex, 1);
  4359. }
  4360. if (keys.length === 1 && keys[0] === "required") {
  4361. return validators.required;
  4362. }
  4363. return validators[this.getType(rule)] || false;
  4364. }
  4365. };
  4366. Schema.register = function register(type2, validator) {
  4367. if (typeof validator !== "function") {
  4368. throw new Error("Cannot register a validator by type, validator is not a function");
  4369. }
  4370. validators[type2] = validator;
  4371. };
  4372. Schema.warning = warning;
  4373. Schema.messages = messages;
  4374. Schema.warning = function() {
  4375. };
  4376. const _sfc_main$23 = {
  4377. name: "u-form",
  4378. mixins: [mpMixin, mixin, props$z],
  4379. provide() {
  4380. return {
  4381. uForm: this
  4382. };
  4383. },
  4384. data() {
  4385. return {
  4386. formRules: {},
  4387. // 规则校验器
  4388. validator: {},
  4389. // 原始的model快照,用于resetFields方法重置表单时使用
  4390. originalModel: null
  4391. };
  4392. },
  4393. watch: {
  4394. // 监听规则的变化
  4395. rules: {
  4396. immediate: true,
  4397. handler(n) {
  4398. this.setRules(n);
  4399. }
  4400. },
  4401. // 监听属性的变化,通知子组件u-form-item重新获取信息
  4402. propsChange(n) {
  4403. var _a;
  4404. if ((_a = this.children) == null ? void 0 : _a.length) {
  4405. this.children.map((child) => {
  4406. typeof child.updateParentData == "function" && child.updateParentData();
  4407. });
  4408. }
  4409. },
  4410. // 监听model的初始值作为重置表单的快照
  4411. model: {
  4412. immediate: true,
  4413. handler(n) {
  4414. if (!this.originalModel) {
  4415. this.originalModel = uni.$u.deepClone(n);
  4416. }
  4417. }
  4418. }
  4419. },
  4420. computed: {
  4421. propsChange() {
  4422. return [
  4423. this.errorType,
  4424. this.borderBottom,
  4425. this.labelPosition,
  4426. this.labelWidth,
  4427. this.labelAlign,
  4428. this.labelStyle
  4429. ];
  4430. }
  4431. },
  4432. created() {
  4433. this.children = [];
  4434. },
  4435. methods: {
  4436. // 手动设置校验的规则,如果规则中有函数的话,微信小程序中会过滤掉,所以只能手动调用设置规则
  4437. setRules(rules2) {
  4438. if (Object.keys(rules2).length === 0)
  4439. return;
  4440. if (Object.keys(this.model).length === 0) {
  4441. uni.$u.error("设置rules,model必须设置!如果已经设置,请刷新页面。");
  4442. return;
  4443. }
  4444. this.formRules = rules2;
  4445. this.validator = new Schema(rules2);
  4446. },
  4447. // 清空所有u-form-item组件的内容,本质上是调用了u-form-item组件中的resetField()方法
  4448. resetFields() {
  4449. this.resetModel();
  4450. },
  4451. // 重置model为初始值的快照
  4452. resetModel(obj) {
  4453. this.children.map((child) => {
  4454. const prop = child == null ? void 0 : child.prop;
  4455. const value2 = uni.$u.getProperty(this.originalModel, prop);
  4456. uni.$u.setProperty(this.model, prop, value2);
  4457. });
  4458. },
  4459. // 清空校验结果
  4460. clearValidate(props2) {
  4461. props2 = [].concat(props2);
  4462. this.children.map((child) => {
  4463. if (props2[0] === void 0 || props2.includes(child.prop)) {
  4464. child.message = null;
  4465. }
  4466. });
  4467. },
  4468. // 对部分表单字段进行校验
  4469. async validateField(value2, callback, event = null) {
  4470. this.$nextTick(() => {
  4471. const errorsRes = [];
  4472. value2 = [].concat(value2);
  4473. this.children.map((child) => {
  4474. const childErrors = [];
  4475. if (value2.includes(child.prop)) {
  4476. const propertyVal = uni.$u.getProperty(
  4477. this.model,
  4478. child.prop
  4479. );
  4480. const propertyChain = child.prop.split(".");
  4481. const propertyName = propertyChain[propertyChain.length - 1];
  4482. const rule = this.formRules[child.prop];
  4483. if (!rule)
  4484. return;
  4485. const rules2 = [].concat(rule);
  4486. for (let i = 0; i < rules2.length; i++) {
  4487. const ruleItem = rules2[i];
  4488. const trigger = [].concat(ruleItem == null ? void 0 : ruleItem.trigger);
  4489. if (event && !trigger.includes(event))
  4490. continue;
  4491. const validator = new Schema({
  4492. [propertyName]: ruleItem
  4493. });
  4494. validator.validate(
  4495. {
  4496. [propertyName]: propertyVal
  4497. },
  4498. (errors, fields) => {
  4499. var _a;
  4500. if (uni.$u.test.array(errors)) {
  4501. errorsRes.push(...errors);
  4502. childErrors.push(...errors);
  4503. }
  4504. child.message = ((_a = childErrors[0]) == null ? void 0 : _a.message) ?? null;
  4505. }
  4506. );
  4507. }
  4508. }
  4509. });
  4510. typeof callback === "function" && callback(errorsRes);
  4511. });
  4512. },
  4513. // 校验全部数据
  4514. validate(callback) {
  4515. if (Object.keys(this.formRules).length === 0) {
  4516. uni.$u.error("未设置rules,请看文档说明!如果已经设置,请刷新页面。");
  4517. return;
  4518. }
  4519. return new Promise((resolve, reject) => {
  4520. this.$nextTick(() => {
  4521. const formItemProps = this.children.map(
  4522. (item) => item.prop
  4523. );
  4524. this.validateField(formItemProps, (errors) => {
  4525. if (errors.length) {
  4526. this.errorType === "toast" && uni.$u.toast(errors[0].message);
  4527. reject(errors);
  4528. } else {
  4529. resolve(true);
  4530. }
  4531. });
  4532. });
  4533. });
  4534. }
  4535. }
  4536. };
  4537. function _sfc_render$22(_ctx, _cache, $props, $setup, $data, $options) {
  4538. return vue.openBlock(), vue.createElementBlock("view", { class: "u-form" }, [
  4539. vue.renderSlot(_ctx.$slots, "default")
  4540. ]);
  4541. }
  4542. const __easycom_2$5 = /* @__PURE__ */ _export_sfc(_sfc_main$23, [["render", _sfc_render$22], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-form/u-form.vue"]]);
  4543. const _sfc_main$22 = {
  4544. name: "u--form",
  4545. mixins: [mpMixin, props$z, mixin],
  4546. components: {
  4547. uvForm: __easycom_2$5
  4548. },
  4549. created() {
  4550. this.children = [];
  4551. },
  4552. methods: {
  4553. // 手动设置校验的规则,如果规则中有函数的话,微信小程序中会过滤掉,所以只能手动调用设置规则
  4554. setRules(rules2) {
  4555. this.$refs.uForm.setRules(rules2);
  4556. },
  4557. validate() {
  4558. return this.$refs.uForm.validate();
  4559. },
  4560. validateField(value2, callback) {
  4561. return this.$refs.uForm.validateField(value2, callback);
  4562. },
  4563. resetFields() {
  4564. return this.$refs.uForm.resetFields();
  4565. },
  4566. clearValidate(props2) {
  4567. return this.$refs.uForm.clearValidate(props2);
  4568. },
  4569. setMpData() {
  4570. this.$refs.uForm.children = this.children;
  4571. }
  4572. }
  4573. };
  4574. function _sfc_render$21(_ctx, _cache, $props, $setup, $data, $options) {
  4575. const _component_uvForm = vue.resolveComponent("uvForm");
  4576. return vue.openBlock(), vue.createBlock(_component_uvForm, {
  4577. ref: "uForm",
  4578. model: _ctx.model,
  4579. rules: _ctx.rules,
  4580. errorType: _ctx.errorType,
  4581. borderBottom: _ctx.borderBottom,
  4582. labelPosition: _ctx.labelPosition,
  4583. labelWidth: _ctx.labelWidth,
  4584. labelAlign: _ctx.labelAlign,
  4585. labelStyle: _ctx.labelStyle,
  4586. customStyle: _ctx.customStyle
  4587. }, {
  4588. default: vue.withCtx(() => [
  4589. vue.renderSlot(_ctx.$slots, "default")
  4590. ]),
  4591. _: 3
  4592. /* FORWARDED */
  4593. }, 8, ["model", "rules", "errorType", "borderBottom", "labelPosition", "labelWidth", "labelAlign", "labelStyle", "customStyle"]);
  4594. }
  4595. const __easycom_2$4 = /* @__PURE__ */ _export_sfc(_sfc_main$22, [["render", _sfc_render$21], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/uni_modules/uview-plus/components/u--form/u--form.vue"]]);
  4596. const _imports_0$3 = "/static/img/logo.png";
  4597. const prefixIconStyle = "font-size:50rpx";
  4598. const placeholderStyle$4 = "font-size:32rpx";
  4599. const _sfc_main$21 = {
  4600. __name: "login",
  4601. setup(__props, { expose: __expose }) {
  4602. __expose();
  4603. const customStyle = vue.reactive({
  4604. "font-size": "40rpx",
  4605. height: "90rpx"
  4606. });
  4607. let { proxy } = vue.getCurrentInstance();
  4608. const formData = vue.reactive({
  4609. username: "",
  4610. password: "",
  4611. code: ""
  4612. });
  4613. const uForm = vue.ref(null);
  4614. const isCountingDown = vue.ref(false);
  4615. const countdown = vue.ref(60);
  4616. const countDownText = vue.ref("获取验证码");
  4617. const startCountDown = () => {
  4618. isCountingDown.value = true;
  4619. countdown.value = 60;
  4620. countDownText.value = `${countdown.value}秒重发`;
  4621. const timer = setInterval(() => {
  4622. countdown.value--;
  4623. countDownText.value = `${countdown.value}秒重发`;
  4624. if (countdown.value <= 0) {
  4625. clearInterval(timer);
  4626. isCountingDown.value = false;
  4627. countDownText.value = "重新发送";
  4628. }
  4629. }, 1e3);
  4630. };
  4631. const getVerifyCode = () => {
  4632. if (isCountingDown.value)
  4633. return;
  4634. if (!formData.username)
  4635. return uni.$u.toast("请输入用户名");
  4636. if (!formData.password)
  4637. return uni.$u.toast("请输入密码");
  4638. let data = {
  4639. username: formData.username,
  4640. password: formData.password
  4641. };
  4642. uni.showLoading({
  4643. mask: true,
  4644. title: "发送中..."
  4645. });
  4646. uni.$u.http.post("/app/appUser/sendMobileCode", data).then((res) => {
  4647. if (res.code == 200) {
  4648. uni.showToast({
  4649. title: "验证码发送成功,请注意查收",
  4650. icon: "none"
  4651. });
  4652. startCountDown();
  4653. } else {
  4654. uni.$u.toast(res.msg);
  4655. }
  4656. }).finally(() => uni.hideLoading());
  4657. };
  4658. const handleLogin = () => {
  4659. if (!formData.username)
  4660. return uni.$u.toast("请输入用户名");
  4661. if (!formData.password)
  4662. return uni.$u.toast("请输入密码");
  4663. uni.showLoading({
  4664. mask: true,
  4665. title: "登录中..."
  4666. });
  4667. uni.$u.http.post("/app/appUser/login", formData).then((res) => {
  4668. if (res.code == 200) {
  4669. uni.setStorageSync("token", res.data);
  4670. setTimeout(() => {
  4671. getUserInfo();
  4672. uni.$u.http.get("/app/appUser/getRouters").then((resp) => {
  4673. if (resp.code == 200) {
  4674. uni.setStorageSync("menuList", resp.data);
  4675. uni.$u.toast("登录成功");
  4676. uni.switchTab({
  4677. url: "/pages/index/index"
  4678. });
  4679. uni.$u.ttsModule.speak("书嗨,不辜负每一个爱书的人");
  4680. } else {
  4681. uni.$u.toast(resp.msg);
  4682. }
  4683. });
  4684. }, 50);
  4685. } else {
  4686. uni.$u.toast(res.msg);
  4687. }
  4688. }).catch((error2) => {
  4689. uni.showModal({
  4690. title: "登录失败",
  4691. content: JSON.stringify(error2),
  4692. showCancel: false
  4693. });
  4694. }).finally(() => uni.hideLoading());
  4695. };
  4696. function getUserInfo() {
  4697. uni.$u.http.get("/app/appUser/getUserInfoById").then((res) => {
  4698. if (res.code == 200) {
  4699. uni.setStorageSync("userInfo", res.data);
  4700. }
  4701. });
  4702. }
  4703. function checkToken() {
  4704. uni.showLoading({
  4705. title: "检测登录状态..."
  4706. });
  4707. uni.$u.http.get("/app/appUser/checkToken").then((res) => {
  4708. if (res.code == 200) {
  4709. uni.$u.toast("登录成功");
  4710. uni.switchTab({
  4711. url: "/pages/index/index"
  4712. });
  4713. } else {
  4714. uni.$u.toast("请先登录");
  4715. }
  4716. }).finally(() => uni.hideLoading());
  4717. }
  4718. onLoad(() => {
  4719. let token = uni.getStorageSync("token");
  4720. if (token) {
  4721. checkToken();
  4722. }
  4723. });
  4724. const __returned__ = { prefixIconStyle, placeholderStyle: placeholderStyle$4, customStyle, get proxy() {
  4725. return proxy;
  4726. }, set proxy(v) {
  4727. proxy = v;
  4728. }, formData, uForm, isCountingDown, countdown, countDownText, startCountDown, getVerifyCode, handleLogin, getUserInfo, checkToken, ref: vue.ref, reactive: vue.reactive, getCurrentInstance: vue.getCurrentInstance, get onLoad() {
  4729. return onLoad;
  4730. } };
  4731. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  4732. return __returned__;
  4733. }
  4734. };
  4735. function _sfc_render$20(_ctx, _cache, $props, $setup, $data, $options) {
  4736. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  4737. const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_1$a);
  4738. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  4739. const _component_u__form = resolveEasycom(vue.resolveDynamicComponent("u--form"), __easycom_2$4);
  4740. return vue.openBlock(), vue.createElementBlock("view", { class: "login-container" }, [
  4741. vue.createCommentVNode(" Logo和标题区域 "),
  4742. vue.createElementVNode("view", { class: "logo-section" }, [
  4743. vue.createElementVNode("image", {
  4744. class: "logo",
  4745. src: _imports_0$3,
  4746. mode: "aspectFit"
  4747. })
  4748. ]),
  4749. vue.createCommentVNode(" 表单区域 "),
  4750. vue.createElementVNode("view", { class: "form-section" }, [
  4751. vue.createVNode(_component_u__form, {
  4752. model: $setup.formData,
  4753. ref: "uForm"
  4754. }, {
  4755. default: vue.withCtx(() => [
  4756. vue.createVNode(_component_u_form_item, null, {
  4757. default: vue.withCtx(() => [
  4758. vue.createVNode(_component_u_input, {
  4759. prefixIconStyle: $setup.prefixIconStyle,
  4760. "placeholder-style": $setup.placeholderStyle,
  4761. "custom-style": $setup.customStyle,
  4762. modelValue: $setup.formData.username,
  4763. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.formData.username = $event),
  4764. placeholder: "请输入用户名",
  4765. prefixIcon: "account"
  4766. }, null, 8, ["custom-style", "modelValue"])
  4767. ]),
  4768. _: 1
  4769. /* STABLE */
  4770. }),
  4771. vue.createVNode(_component_u_form_item, null, {
  4772. default: vue.withCtx(() => [
  4773. vue.createVNode(_component_u_input, {
  4774. prefixIconStyle: $setup.prefixIconStyle,
  4775. "placeholder-style": $setup.placeholderStyle,
  4776. "custom-style": $setup.customStyle,
  4777. modelValue: $setup.formData.password,
  4778. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.formData.password = $event),
  4779. type: "password",
  4780. placeholder: "请输入密码",
  4781. prefixIcon: "lock"
  4782. }, null, 8, ["custom-style", "modelValue"])
  4783. ]),
  4784. _: 1
  4785. /* STABLE */
  4786. }),
  4787. vue.createVNode(_component_u_form_item, null, {
  4788. default: vue.withCtx(() => [
  4789. vue.createVNode(_component_u_input, {
  4790. prefixIconStyle: $setup.prefixIconStyle,
  4791. "placeholder-style": $setup.placeholderStyle,
  4792. "custom-style": $setup.customStyle,
  4793. modelValue: $setup.formData.code,
  4794. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.formData.code = $event),
  4795. placeholder: "请输入验证码",
  4796. prefixIcon: "chat"
  4797. }, {
  4798. suffix: vue.withCtx(() => [
  4799. vue.createVNode(_component_u_button, {
  4800. "custom-style": "width:200rpx",
  4801. color: "#22ac38",
  4802. size: "small",
  4803. onClick: $setup.getVerifyCode,
  4804. disabled: $setup.isCountingDown
  4805. }, {
  4806. default: vue.withCtx(() => [
  4807. vue.createTextVNode(
  4808. vue.toDisplayString($setup.countDownText),
  4809. 1
  4810. /* TEXT */
  4811. )
  4812. ]),
  4813. _: 1
  4814. /* STABLE */
  4815. }, 8, ["disabled"])
  4816. ]),
  4817. _: 1
  4818. /* STABLE */
  4819. }, 8, ["custom-style", "modelValue"])
  4820. ]),
  4821. _: 1
  4822. /* STABLE */
  4823. })
  4824. ]),
  4825. _: 1
  4826. /* STABLE */
  4827. }, 8, ["model"]),
  4828. vue.createVNode(_component_u_button, {
  4829. "custom-style": "margin-top:5%",
  4830. type: "primary",
  4831. block: "",
  4832. onClick: $setup.handleLogin,
  4833. color: "#22ac38",
  4834. shape: "circle"
  4835. }, {
  4836. default: vue.withCtx(() => [
  4837. vue.createTextVNode("登录")
  4838. ]),
  4839. _: 1
  4840. /* STABLE */
  4841. })
  4842. ])
  4843. ]);
  4844. }
  4845. const PagesLoginLogin = /* @__PURE__ */ _export_sfc(_sfc_main$21, [["render", _sfc_render$20], ["__scopeId", "data-v-e4e4508d"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/login/login.vue"]]);
  4846. const _sfc_main$20 = {
  4847. __name: "index",
  4848. setup(__props, { expose: __expose }) {
  4849. __expose();
  4850. function playGlobalSound() {
  4851. uni.$u.playClickSound();
  4852. }
  4853. const menuData = vue.ref([]);
  4854. let menuPromise = null;
  4855. async function getMenuList() {
  4856. if (menuData.value && menuData.value.length > 0) {
  4857. return menuData.value;
  4858. }
  4859. if (menuPromise) {
  4860. return menuPromise;
  4861. }
  4862. menuPromise = uni.$u.http.get("/app/appUser/getRouters").then((res) => {
  4863. const data = res.data;
  4864. menuData.value = data.map((item) => {
  4865. item.children = item.children.map((child) => {
  4866. child.query = child.query ? JSON.parse(child.query) : {};
  4867. return child;
  4868. });
  4869. return item;
  4870. });
  4871. return data;
  4872. }).catch((err) => {
  4873. formatAppLog("error", "at pages/index/index.vue:64", "获取菜单数据失败", err);
  4874. return [];
  4875. }).finally(() => {
  4876. menuPromise = null;
  4877. });
  4878. return menuPromise;
  4879. }
  4880. function getButtonList() {
  4881. uni.$u.http.get("/app/appUser/getInfo").then((res) => {
  4882. if (res.code == 200) {
  4883. uni.setStorageSync("buttonList", res.permissions);
  4884. }
  4885. });
  4886. }
  4887. function getAudioConfig() {
  4888. uni.$u.http.get("/app/appConf/getAudioConfig").then((res) => {
  4889. if (res.code == 200) {
  4890. uni.setStorageSync("audioConfig", res.data);
  4891. }
  4892. });
  4893. }
  4894. onLoad(() => {
  4895. uni.showLoading({
  4896. title: "加载中...",
  4897. mask: true
  4898. });
  4899. Promise.all([getMenuList(), getButtonList()]).finally(() => {
  4900. uni.hideLoading();
  4901. });
  4902. getAudioConfig();
  4903. });
  4904. const formatName = (name) => {
  4905. if (!name)
  4906. return "";
  4907. let result = name;
  4908. if (result.includes("\\n\\r")) {
  4909. result = result.replace(/\\n\\r/g, "\n");
  4910. }
  4911. return result;
  4912. };
  4913. const expressOperations = vue.ref([
  4914. {
  4915. name: "中转\n\r签收",
  4916. path: "/pages/index/express/transfer-sign",
  4917. type: "primary"
  4918. },
  4919. {
  4920. name: "到仓\n\r签收",
  4921. path: "/pages/index/express/warehouse-sign",
  4922. type: "warning"
  4923. },
  4924. {
  4925. name: "重量\n\r修改",
  4926. path: "/pages/index/express/weight-modify",
  4927. type: "primary"
  4928. },
  4929. {
  4930. name: "快递\n\r验收",
  4931. path: "/pages/index/express/quick-check",
  4932. type: "warning"
  4933. },
  4934. {
  4935. name: "路由签收\n\r异常",
  4936. path: "/pages/index/express/route-exception",
  4937. type: "primary"
  4938. },
  4939. {
  4940. name: "快递\n\r拆包",
  4941. path: "/pages/index/express/quick-unpack",
  4942. type: "warning"
  4943. }
  4944. ]);
  4945. const auditOperations = vue.ref([
  4946. {
  4947. name: "确认\n\r收货",
  4948. path: "/pages/index/audit/confirm-receipt",
  4949. type: "primary"
  4950. },
  4951. {
  4952. name: "扫书\n\r查单",
  4953. path: "/pages/index/audit/scan-order",
  4954. type: "warning"
  4955. },
  4956. {
  4957. name: "根据快递单\n\r或订单",
  4958. path: "/pages/index/audit/express-order",
  4959. type: "warning"
  4960. },
  4961. {
  4962. name: "根据\n\r发件人",
  4963. path: "/pages/index/audit/sender",
  4964. type: "primary"
  4965. }
  4966. ]);
  4967. const wmsOperations = vue.ref([
  4968. {
  4969. name: "中等\n\r入库",
  4970. path: "/pages/index/wms/medium-in",
  4971. type: "primary"
  4972. },
  4973. {
  4974. name: "良品\n\r入库",
  4975. path: "/pages/index/wms/good-in",
  4976. type: "warning"
  4977. },
  4978. {
  4979. name: "次品\n\r入库",
  4980. path: "/pages/index/wms/secondary-in",
  4981. type: "primary"
  4982. },
  4983. {
  4984. name: "不良\n\r入库",
  4985. path: "/pages/index/wms/bad-in",
  4986. type: "warning"
  4987. },
  4988. {
  4989. name: "不良\n\r出库",
  4990. path: "/pages/index/wms/bad-out",
  4991. type: "primary"
  4992. },
  4993. {
  4994. name: "不良\n\r下架",
  4995. path: "/pages/index/wms/bad-off",
  4996. type: "warning"
  4997. },
  4998. {
  4999. name: "订单\n\r查询",
  5000. path: "/pages/index/wms/order-query",
  5001. type: "primary"
  5002. },
  5003. {
  5004. name: "库位\n\r订单",
  5005. path: "/pages/index/wms/location-order",
  5006. type: "warning"
  5007. },
  5008. {
  5009. name: "快速盘点",
  5010. path: "/pages/index/wms/speedy-check",
  5011. type: "primary",
  5012. span: 24
  5013. }
  5014. ]);
  5015. const statisticsOperations = vue.ref([
  5016. {
  5017. name: "审核统计",
  5018. path: "/pages/index/statistic/audit",
  5019. type: "warning",
  5020. span: 24
  5021. },
  5022. {
  5023. name: "售后\n\r统计",
  5024. path: "/pages/index/statistic/after-sale",
  5025. type: "primary"
  5026. },
  5027. {
  5028. name: "打包\n\r统计",
  5029. path: "/pages/index/statistic/package",
  5030. type: "warning"
  5031. }
  5032. ]);
  5033. const offlineOperations = vue.ref([
  5034. {
  5035. name: "线下\n\r核单",
  5036. path: "/pages/index/offline/check-order",
  5037. type: "primary"
  5038. },
  5039. {
  5040. name: "核单\n\r记录",
  5041. path: "/pages/index/offline/check-record",
  5042. type: "warning"
  5043. }
  5044. ]);
  5045. const entryOperations = vue.ref([
  5046. {
  5047. name: "扫码\n\r查书",
  5048. path: "/pages/index/entry/scan-book",
  5049. type: "primary"
  5050. },
  5051. {
  5052. name: "录入\n\r书籍重量",
  5053. path: "/pages/index/entry/book-weight",
  5054. type: "warning"
  5055. },
  5056. {
  5057. name: "商品档案推送",
  5058. path: "/pages/index/entry/commodity-scan",
  5059. type: "primary",
  5060. span: 24
  5061. }
  5062. ]);
  5063. const handleNavigation = (path) => {
  5064. uni.navigateTo({
  5065. url: path,
  5066. fail: () => {
  5067. uni.showToast({
  5068. title: "页面跳转失败",
  5069. icon: "none"
  5070. });
  5071. }
  5072. });
  5073. playGlobalSound();
  5074. };
  5075. const __returned__ = { playGlobalSound, menuData, get menuPromise() {
  5076. return menuPromise;
  5077. }, set menuPromise(v) {
  5078. menuPromise = v;
  5079. }, getMenuList, getButtonList, getAudioConfig, formatName, expressOperations, auditOperations, wmsOperations, statisticsOperations, offlineOperations, entryOperations, handleNavigation, ref: vue.ref, computed: vue.computed, onMounted: vue.onMounted, get onLoad() {
  5080. return onLoad;
  5081. } };
  5082. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  5083. return __returned__;
  5084. }
  5085. };
  5086. function _sfc_render$1$(_ctx, _cache, $props, $setup, $data, $options) {
  5087. return vue.openBlock(), vue.createElementBlock("view", {
  5088. class: "operation-container",
  5089. onClick: $setup.playGlobalSound
  5090. }, [
  5091. vue.createCommentVNode(" 直接循环 "),
  5092. (vue.openBlock(true), vue.createElementBlock(
  5093. vue.Fragment,
  5094. null,
  5095. vue.renderList($setup.menuData, (item) => {
  5096. return vue.openBlock(), vue.createElementBlock("view", {
  5097. class: "section",
  5098. key: item.path
  5099. }, [
  5100. vue.createElementVNode(
  5101. "view",
  5102. { class: "section-title" },
  5103. vue.toDisplayString(item.meta.title),
  5104. 1
  5105. /* TEXT */
  5106. ),
  5107. vue.createElementVNode("view", { class: "grid-container" }, [
  5108. (vue.openBlock(true), vue.createElementBlock(
  5109. vue.Fragment,
  5110. null,
  5111. vue.renderList(item.children, (child) => {
  5112. return vue.openBlock(), vue.createElementBlock("view", {
  5113. class: vue.normalizeClass(["grid-item", child.query.type]),
  5114. style: vue.normalizeStyle({ gridColumn: child.query.span ? "span 2" : "span 1" }),
  5115. key: child.path,
  5116. onClick: ($event) => $setup.handleNavigation(child.path)
  5117. }, vue.toDisplayString($setup.formatName(child.meta.title)), 15, ["onClick"]);
  5118. }),
  5119. 128
  5120. /* KEYED_FRAGMENT */
  5121. ))
  5122. ])
  5123. ]);
  5124. }),
  5125. 128
  5126. /* KEYED_FRAGMENT */
  5127. ))
  5128. ]);
  5129. }
  5130. const PagesIndexIndex = /* @__PURE__ */ _export_sfc(_sfc_main$20, [["render", _sfc_render$1$], ["__scopeId", "data-v-1cf27b2a"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/index/index.vue"]]);
  5131. const props$y = {
  5132. props: {
  5133. // 文字颜色
  5134. color: {
  5135. type: String,
  5136. default: props$G.link.color
  5137. },
  5138. // 字体大小,单位px
  5139. fontSize: {
  5140. type: [String, Number],
  5141. default: props$G.link.fontSize
  5142. },
  5143. // 是否显示下划线
  5144. underLine: {
  5145. type: Boolean,
  5146. default: props$G.link.underLine
  5147. },
  5148. // 要跳转的链接
  5149. href: {
  5150. type: String,
  5151. default: props$G.link.href
  5152. },
  5153. // 小程序中复制到粘贴板的提示语
  5154. mpTips: {
  5155. type: String,
  5156. default: props$G.link.mpTips
  5157. },
  5158. // 下划线颜色
  5159. lineColor: {
  5160. type: String,
  5161. default: props$G.link.lineColor
  5162. },
  5163. // 超链接的问题,不使用slot形式传入,是因为nvue下无法修改颜色
  5164. text: {
  5165. type: String,
  5166. default: props$G.link.text
  5167. }
  5168. }
  5169. };
  5170. const _sfc_main$1$ = {
  5171. name: "u-link",
  5172. mixins: [mpMixin, mixin, props$y],
  5173. computed: {
  5174. linkStyle() {
  5175. const style = {
  5176. color: this.color,
  5177. fontSize: uni.$u.addUnit(this.fontSize),
  5178. // line-height设置为比字体大小多2px
  5179. lineHeight: uni.$u.addUnit(uni.$u.getPx(this.fontSize) + 2),
  5180. textDecoration: this.underLine ? "underline" : "none"
  5181. };
  5182. return style;
  5183. }
  5184. },
  5185. methods: {
  5186. openLink() {
  5187. plus.runtime.openURL(this.href);
  5188. this.$emit("click");
  5189. }
  5190. }
  5191. };
  5192. function _sfc_render$1_(_ctx, _cache, $props, $setup, $data, $options) {
  5193. return vue.openBlock(), vue.createElementBlock(
  5194. "text",
  5195. {
  5196. class: "u-link",
  5197. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.openLink && $options.openLink(...args), ["stop"])),
  5198. style: vue.normalizeStyle([$options.linkStyle, _ctx.$u.addStyle(_ctx.customStyle)])
  5199. },
  5200. vue.toDisplayString(_ctx.text),
  5201. 5
  5202. /* TEXT, STYLE */
  5203. );
  5204. }
  5205. const __easycom_1$9 = /* @__PURE__ */ _export_sfc(_sfc_main$1$, [["render", _sfc_render$1_], ["__scopeId", "data-v-12f6646d"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-link/u-link.vue"]]);
  5206. const value = {
  5207. computed: {
  5208. // 经处理后需要显示的值
  5209. value() {
  5210. const {
  5211. text,
  5212. mode,
  5213. format: format2,
  5214. href
  5215. } = this;
  5216. if (mode === "price") {
  5217. if (!/^\d+(\.\d+)?$/.test(text)) {
  5218. uni.$u.error("金额模式下,text参数需要为金额格式");
  5219. }
  5220. if (uni.$u.test.func(format2)) {
  5221. return format2(text);
  5222. }
  5223. return uni.$u.priceFormat(text, 2);
  5224. }
  5225. if (mode === "date") {
  5226. !uni.$u.test.date(text) && uni.$u.error("日期模式下,text参数需要为日期或时间戳格式");
  5227. if (uni.$u.test.func(format2)) {
  5228. return format2(text);
  5229. }
  5230. if (format2) {
  5231. return uni.$u.timeFormat(text, format2);
  5232. }
  5233. return uni.$u.timeFormat(text, "yyyy-mm-dd");
  5234. }
  5235. if (mode === "phone") {
  5236. if (uni.$u.test.func(format2)) {
  5237. return format2(text);
  5238. }
  5239. if (format2 === "encrypt") {
  5240. return `${text.substr(0, 3)}****${text.substr(7)}`;
  5241. }
  5242. return text;
  5243. }
  5244. if (mode === "name") {
  5245. !(typeof text === "string") && uni.$u.error("姓名模式下,text参数需要为字符串格式");
  5246. if (uni.$u.test.func(format2)) {
  5247. return format2(text);
  5248. }
  5249. if (format2 === "encrypt") {
  5250. return this.formatName(text);
  5251. }
  5252. return text;
  5253. }
  5254. if (mode === "link") {
  5255. !uni.$u.test.url(href) && uni.$u.error("超链接模式下,href参数需要为URL格式");
  5256. return text;
  5257. }
  5258. return text;
  5259. }
  5260. },
  5261. methods: {
  5262. // 默认的姓名脱敏规则
  5263. formatName(name) {
  5264. let value2 = "";
  5265. if (name.length === 2) {
  5266. value2 = name.substr(0, 1) + "*";
  5267. } else if (name.length > 2) {
  5268. let char = "";
  5269. for (let i = 0, len = name.length - 2; i < len; i++) {
  5270. char += "*";
  5271. }
  5272. value2 = name.substr(0, 1) + char + name.substr(-1, 1);
  5273. } else {
  5274. value2 = name;
  5275. }
  5276. return value2;
  5277. }
  5278. }
  5279. };
  5280. const props$x = {
  5281. props: {
  5282. // 主题颜色
  5283. type: {
  5284. type: String,
  5285. default: props$G.text.type
  5286. },
  5287. // 是否显示
  5288. show: {
  5289. type: Boolean,
  5290. default: props$G.text.show
  5291. },
  5292. // 显示的值
  5293. text: {
  5294. type: [String, Number],
  5295. default: props$G.text.text
  5296. },
  5297. // 前置图标
  5298. prefixIcon: {
  5299. type: String,
  5300. default: props$G.text.prefixIcon
  5301. },
  5302. // 后置图标
  5303. suffixIcon: {
  5304. type: String,
  5305. default: props$G.text.suffixIcon
  5306. },
  5307. // 文本处理的匹配模式
  5308. // text-普通文本,price-价格,phone-手机号,name-姓名,date-日期,link-超链接
  5309. mode: {
  5310. type: String,
  5311. default: props$G.text.mode
  5312. },
  5313. // mode=link下,配置的链接
  5314. href: {
  5315. type: String,
  5316. default: props$G.text.href
  5317. },
  5318. // 格式化规则
  5319. format: {
  5320. type: [String, Function],
  5321. default: props$G.text.format
  5322. },
  5323. // mode=phone时,点击文本是否拨打电话
  5324. call: {
  5325. type: Boolean,
  5326. default: props$G.text.call
  5327. },
  5328. // 小程序的打开方式
  5329. openType: {
  5330. type: String,
  5331. default: props$G.text.openType
  5332. },
  5333. // 是否粗体,默认normal
  5334. bold: {
  5335. type: Boolean,
  5336. default: props$G.text.bold
  5337. },
  5338. // 是否块状
  5339. block: {
  5340. type: Boolean,
  5341. default: props$G.text.block
  5342. },
  5343. // 文本显示的行数,如果设置,超出此行数,将会显示省略号
  5344. lines: {
  5345. type: [String, Number],
  5346. default: props$G.text.lines
  5347. },
  5348. // 文本颜色
  5349. color: {
  5350. type: String,
  5351. default: props$G.text.color
  5352. },
  5353. // 字体大小
  5354. size: {
  5355. type: [String, Number],
  5356. default: props$G.text.size
  5357. },
  5358. // 图标的样式
  5359. iconStyle: {
  5360. type: [Object, String],
  5361. default: props$G.text.iconStyle
  5362. },
  5363. // 文字装饰,下划线,中划线等,可选值 none|underline|line-through
  5364. decoration: {
  5365. tepe: String,
  5366. default: props$G.text.decoration
  5367. },
  5368. // 外边距,对象、字符串,数值形式均可
  5369. margin: {
  5370. type: [Object, String, Number],
  5371. default: props$G.text.margin
  5372. },
  5373. // 文本行高
  5374. lineHeight: {
  5375. type: [String, Number],
  5376. default: props$G.text.lineHeight
  5377. },
  5378. // 文本对齐方式,可选值left|center|right
  5379. align: {
  5380. type: String,
  5381. default: props$G.text.align
  5382. },
  5383. // 文字换行,可选值break-word|normal|anywhere
  5384. wordWrap: {
  5385. type: String,
  5386. default: props$G.text.wordWrap
  5387. }
  5388. }
  5389. };
  5390. const _sfc_main$1_ = {
  5391. name: "u--text",
  5392. mixins: [mpMixin, mixin, value, props$x],
  5393. emits: ["click"],
  5394. computed: {
  5395. valueStyle() {
  5396. const style = {
  5397. textDecoration: this.decoration,
  5398. fontWeight: this.bold ? "bold" : "normal",
  5399. wordWrap: this.wordWrap,
  5400. fontSize: uni.$u.addUnit(this.size)
  5401. };
  5402. !this.type && (style.color = this.color);
  5403. this.isNvue && this.lines && (style.lines = this.lines);
  5404. this.lineHeight && (style.lineHeight = uni.$u.addUnit(this.lineHeight));
  5405. !this.isNvue && this.block && (style.display = "block");
  5406. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  5407. },
  5408. isNvue() {
  5409. let nvue = false;
  5410. return nvue;
  5411. },
  5412. isMp() {
  5413. let mp = false;
  5414. return mp;
  5415. }
  5416. },
  5417. data() {
  5418. return {};
  5419. },
  5420. methods: {
  5421. clickHandler() {
  5422. if (this.call && this.mode === "phone") {
  5423. uni.makePhoneCall({
  5424. phoneNumber: this.text
  5425. });
  5426. }
  5427. this.$emit("click");
  5428. }
  5429. }
  5430. };
  5431. function _sfc_render$1Z(_ctx, _cache, $props, $setup, $data, $options) {
  5432. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  5433. const _component_u_link = resolveEasycom(vue.resolveDynamicComponent("u-link"), __easycom_1$9);
  5434. return _ctx.show ? (vue.openBlock(), vue.createElementBlock(
  5435. "view",
  5436. {
  5437. key: 0,
  5438. class: vue.normalizeClass(["u-text", []]),
  5439. style: vue.normalizeStyle({
  5440. margin: _ctx.margin,
  5441. justifyContent: _ctx.align === "left" ? "flex-start" : _ctx.align === "center" ? "center" : "flex-end"
  5442. }),
  5443. onClick: _cache[6] || (_cache[6] = (...args) => $options.clickHandler && $options.clickHandler(...args))
  5444. },
  5445. [
  5446. _ctx.mode === "price" ? (vue.openBlock(), vue.createElementBlock(
  5447. "text",
  5448. {
  5449. key: 0,
  5450. class: vue.normalizeClass(["u-text__price", _ctx.type && `u-text__value--${_ctx.type}`]),
  5451. style: vue.normalizeStyle([$options.valueStyle])
  5452. },
  5453. "¥",
  5454. 6
  5455. /* CLASS, STYLE */
  5456. )) : vue.createCommentVNode("v-if", true),
  5457. _ctx.prefixIcon ? (vue.openBlock(), vue.createElementBlock("view", {
  5458. key: 1,
  5459. class: "u-text__prefix-icon"
  5460. }, [
  5461. vue.createVNode(_component_u_icon, {
  5462. name: _ctx.prefixIcon,
  5463. customStyle: _ctx.$u.addStyle(_ctx.iconStyle)
  5464. }, null, 8, ["name", "customStyle"])
  5465. ])) : vue.createCommentVNode("v-if", true),
  5466. _ctx.mode === "link" ? (vue.openBlock(), vue.createBlock(_component_u_link, {
  5467. key: 2,
  5468. text: _ctx.value,
  5469. href: _ctx.href,
  5470. underLine: ""
  5471. }, null, 8, ["text", "href"])) : _ctx.openType && $options.isMp ? (vue.openBlock(), vue.createElementBlock("button", {
  5472. key: 3,
  5473. class: "u-reset-button u-text__value",
  5474. style: vue.normalizeStyle([$options.valueStyle]),
  5475. "data-index": _ctx.index,
  5476. openType: _ctx.openType,
  5477. onGetuserinfo: _cache[0] || (_cache[0] = (...args) => _ctx.onGetUserInfo && _ctx.onGetUserInfo(...args)),
  5478. onContact: _cache[1] || (_cache[1] = (...args) => _ctx.onContact && _ctx.onContact(...args)),
  5479. onGetphonenumber: _cache[2] || (_cache[2] = (...args) => _ctx.onGetPhoneNumber && _ctx.onGetPhoneNumber(...args)),
  5480. onError: _cache[3] || (_cache[3] = (...args) => _ctx.onError && _ctx.onError(...args)),
  5481. onLaunchapp: _cache[4] || (_cache[4] = (...args) => _ctx.onLaunchApp && _ctx.onLaunchApp(...args)),
  5482. onOpensetting: _cache[5] || (_cache[5] = (...args) => _ctx.onOpenSetting && _ctx.onOpenSetting(...args)),
  5483. lang: _ctx.lang,
  5484. "session-from": _ctx.sessionFrom,
  5485. "send-message-title": _ctx.sendMessageTitle,
  5486. "send-message-path": _ctx.sendMessagePath,
  5487. "send-message-img": _ctx.sendMessageImg,
  5488. "show-message-card": _ctx.showMessageCard,
  5489. "app-parameter": _ctx.appParameter
  5490. }, vue.toDisplayString(_ctx.value), 45, ["data-index", "openType", "lang", "session-from", "send-message-title", "send-message-path", "send-message-img", "show-message-card", "app-parameter"])) : (vue.openBlock(), vue.createElementBlock(
  5491. "text",
  5492. {
  5493. key: 4,
  5494. class: vue.normalizeClass(["u-text__value", [
  5495. _ctx.type && `u-text__value--${_ctx.type}`,
  5496. _ctx.lines && `u-line-${_ctx.lines}`
  5497. ]]),
  5498. style: vue.normalizeStyle([$options.valueStyle])
  5499. },
  5500. vue.toDisplayString(_ctx.value),
  5501. 7
  5502. /* TEXT, CLASS, STYLE */
  5503. )),
  5504. _ctx.suffixIcon ? (vue.openBlock(), vue.createElementBlock("view", {
  5505. key: 5,
  5506. class: "u-text__suffix-icon"
  5507. }, [
  5508. vue.createVNode(_component_u_icon, {
  5509. name: _ctx.suffixIcon,
  5510. customStyle: _ctx.$u.addStyle(_ctx.iconStyle)
  5511. }, null, 8, ["name", "customStyle"])
  5512. ])) : vue.createCommentVNode("v-if", true)
  5513. ],
  5514. 4
  5515. /* STYLE */
  5516. )) : vue.createCommentVNode("v-if", true);
  5517. }
  5518. const __easycom_1$8 = /* @__PURE__ */ _export_sfc(_sfc_main$1_, [["render", _sfc_render$1Z], ["__scopeId", "data-v-0a574502"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-text/u-text.vue"]]);
  5519. const _sfc_main$1Z = {
  5520. name: "u--text",
  5521. mixins: [mpMixin, mixin, props$x],
  5522. components: {
  5523. uvText: __easycom_1$8
  5524. }
  5525. };
  5526. function _sfc_render$1Y(_ctx, _cache, $props, $setup, $data, $options) {
  5527. const _component_uvText = vue.resolveComponent("uvText");
  5528. return vue.openBlock(), vue.createBlock(_component_uvText, {
  5529. type: _ctx.type,
  5530. show: _ctx.show,
  5531. text: _ctx.text,
  5532. prefixIcon: _ctx.prefixIcon,
  5533. suffixIcon: _ctx.suffixIcon,
  5534. mode: _ctx.mode,
  5535. href: _ctx.href,
  5536. format: _ctx.format,
  5537. call: _ctx.call,
  5538. openType: _ctx.openType,
  5539. bold: _ctx.bold,
  5540. block: _ctx.block,
  5541. lines: _ctx.lines,
  5542. color: _ctx.color,
  5543. decoration: _ctx.decoration,
  5544. size: _ctx.size,
  5545. iconStyle: _ctx.iconStyle,
  5546. margin: _ctx.margin,
  5547. lineHeight: _ctx.lineHeight,
  5548. align: _ctx.align,
  5549. wordWrap: _ctx.wordWrap,
  5550. customStyle: _ctx.customStyle
  5551. }, null, 8, ["type", "show", "text", "prefixIcon", "suffixIcon", "mode", "href", "format", "call", "openType", "bold", "block", "lines", "color", "decoration", "size", "iconStyle", "margin", "lineHeight", "align", "wordWrap", "customStyle"]);
  5552. }
  5553. const __easycom_1$7 = /* @__PURE__ */ _export_sfc(_sfc_main$1Z, [["render", _sfc_render$1Y], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/uni_modules/uview-plus/components/u--text/u--text.vue"]]);
  5554. const props$w = {
  5555. props: {
  5556. // 头像图片路径(不能为相对路径)
  5557. src: {
  5558. type: String,
  5559. default: props$G.avatar.src
  5560. },
  5561. // 头像形状,circle-圆形,square-方形
  5562. shape: {
  5563. type: String,
  5564. default: props$G.avatar.shape
  5565. },
  5566. // 头像尺寸
  5567. size: {
  5568. type: [String, Number],
  5569. default: props$G.avatar.size
  5570. },
  5571. // 裁剪模式
  5572. mode: {
  5573. type: String,
  5574. default: props$G.avatar.mode
  5575. },
  5576. // 显示的文字
  5577. text: {
  5578. type: String,
  5579. default: props$G.avatar.text
  5580. },
  5581. // 背景色
  5582. bgColor: {
  5583. type: String,
  5584. default: props$G.avatar.bgColor
  5585. },
  5586. // 文字颜色
  5587. color: {
  5588. type: String,
  5589. default: props$G.avatar.color
  5590. },
  5591. // 文字大小
  5592. fontSize: {
  5593. type: [String, Number],
  5594. default: props$G.avatar.fontSize
  5595. },
  5596. // 显示的图标
  5597. icon: {
  5598. type: String,
  5599. default: props$G.avatar.icon
  5600. },
  5601. // 显示小程序头像,只对百度,微信,QQ小程序有效
  5602. mpAvatar: {
  5603. type: Boolean,
  5604. default: props$G.avatar.mpAvatar
  5605. },
  5606. // 是否使用随机背景色
  5607. randomBgColor: {
  5608. type: Boolean,
  5609. default: props$G.avatar.randomBgColor
  5610. },
  5611. // 加载失败的默认头像(组件有内置默认图片)
  5612. defaultUrl: {
  5613. type: String,
  5614. default: props$G.avatar.defaultUrl
  5615. },
  5616. // 如果配置了randomBgColor为true,且配置了此值,则从默认的背景色数组中取出对应索引的颜色值,取值0-19之间
  5617. colorIndex: {
  5618. type: [String, Number],
  5619. // 校验参数规则,索引在0-19之间
  5620. validator(n) {
  5621. return uni.$u.test.range(n, [0, 19]) || n === "";
  5622. },
  5623. default: props$G.avatar.colorIndex
  5624. },
  5625. // 组件标识符
  5626. name: {
  5627. type: String,
  5628. default: props$G.avatar.name
  5629. }
  5630. }
  5631. };
  5632. const base64Avatar = "data:image/jpg;base64,/9j/4QAYRXhpZgAASUkqAAgAAAAAAAAAAAAAAP/sABFEdWNreQABAAQAAAA8AAD/4QMraHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLwA8P3hwYWNrZXQgYmVnaW49Iu+7vyIgaWQ9Ilc1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCI/PiA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJBZG9iZSBYTVAgQ29yZSA1LjMtYzAxMSA2Ni4xNDU2NjEsIDIwMTIvMDIvMDYtMTQ6NTY6MjcgICAgICAgICI+IDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+IDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bXA6Q3JlYXRvclRvb2w9IkFkb2JlIFBob3Rvc2hvcCBDUzYgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjREMEQwRkY0RjgwNDExRUE5OTY2RDgxODY3NkJFODMxIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjREMEQwRkY1RjgwNDExRUE5OTY2RDgxODY3NkJFODMxIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NEQwRDBGRjJGODA0MTFFQTk5NjZEODE4Njc2QkU4MzEiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NEQwRDBGRjNGODA0MTFFQTk5NjZEODE4Njc2QkU4MzEiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz7/7gAOQWRvYmUAZMAAAAAB/9sAhAAGBAQEBQQGBQUGCQYFBgkLCAYGCAsMCgoLCgoMEAwMDAwMDBAMDg8QDw4MExMUFBMTHBsbGxwfHx8fHx8fHx8fAQcHBw0MDRgQEBgaFREVGh8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx//wAARCADIAMgDAREAAhEBAxEB/8QAcQABAQEAAwEBAAAAAAAAAAAAAAUEAQMGAgcBAQAAAAAAAAAAAAAAAAAAAAAQAAIBAwICBgkDBQAAAAAAAAABAhEDBCEFMVFBYXGREiKBscHRMkJSEyOh4XLxYjNDFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMRAD8A/fAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHbHFyZ/Dam+yLA+Z2L0Pjtyj2poD4AAAAAAAAAAAAAAAAAAAAAAAAKWFs9y6lcvvwQeqj8z9wFaziY1n/HbUX9XF97A7QAGXI23EvJ1goyfzR0YEfN269jeZ+a03pNe0DIAAAAAAAAAAAAAAAAAAAACvtO3RcVkXlWutuL9YFYAAAAAOJRjKLjJVi9GmB5/csH/mu1h/in8PU+QGMAAAAAAAAAAAAAAAAAAaMDG/6MmMH8C80+xAelSSVFolwQAAAAAAAHVlWI37ErUulaPk+hgeYnCUJuElSUXRrrQHAAAAAAAAAAAAAAAAABa2Oz4bM7r4zdF2ICmAAAAAAAAAg7zZ8GX41wuJP0rRgYAAAAAAAAAAAAAAAAAD0m2R8ODaXU33tsDSAAAAAAAAAlb9HyWZcnJd9PcBHAAAAAAAAAAAAAAAAAPS7e64Vn+KA0AAAAAAAAAJm+v8Ftf3ewCKAAAAAAAAAAAAAAAAAX9muqeGo9NttP06+0DcAAAAAAAAAjb7dTu2ra+VOT9P8AQCWAAAAAAAAAAAAAAAAAUNmyPt5Ltv4bui/kuAF0AAAAAAADiUlGLlJ0SVW+oDzOXfd/Ind6JPRdS0QHSAAAAAAAAAAAAAAAAAE2nVaNcGB6Lbs6OTao9LsF51z60BrAAAAAABJ3jOVHjW3r/sa9QEgAAAAAAAAAAAAAAAAAAAPu1duWriuW34ZR4MC9hbnZyEoy8l36XwfYBsAAADaSq9EuLAlZ+7xSdrGdW9Hc5dgEdtt1erfFgAAAAAAAAAAAAAAAAADVjbblX6NR8MH80tEBRs7HYivyzlN8lovaBPzduvY0m6eK10TXtAyAarO55lpJK54orolr+4GqO/Xaea1FvqbXvA+Z77kNeW3GPbV+4DJfzcm/pcm3H6Vou5AdAFLC2ed2Pjv1txa8sV8T6wOL+yZEKu1JXFy4MDBOE4ScZxcZLinoB8gAAAAAAAAAAAB242LeyJ+C3GvN9C7QLmJtePYpKS+5c+p8F2IDYAANJqj1T4oCfk7Nj3G5Wn9qXJax7gJ93Z82D8sVNc4v30A6Xg5i42Z+iLfqARwcyT0sz9MWvWBps7LlTf5Grce9/oBTxdtxseklHxT+uWr9AGoAB138ezfj4bsFJdD6V2MCPm7RdtJzs1uW1xXzL3gTgAAAAAAAAADRhYc8q74I6RWs5ckB6GxYtWLat21SK731sDsAAAAAAAAAAAAAAAASt021NO/YjrxuQXT1oCOAAAAAAABzGLlJRSq26JAelwsWONYjbXxcZvmwO8AAAAAAAAAAAAAAAAAAef3TEWPkVivx3NY9T6UBiAAAAAABo2+VmGXblddIJ8eivRUD0oAAAAAAAAAAAAAAAAAAAYt4tKeFKVNYNSXfRgefAAAAAAAAr7VuSSWPedKaW5v1MCsAAAAAAAAAAAAAAAAAAIe6bj96Ts2n+JPzSXzP3ATgAAAAAAAAFbbt1UUrOQ9FpC4/UwK6aaqtU+DAAAAAAAAAAAAAAA4lKMIuUmoxWrb4ARNx3R3q2rLpa4Sl0y/YCcAAAAAAAAAAANmFud7G8r89r6X0dgFvGzLGRGtuWvTF6NAdwAAAAAAAAAAAy5W442PVN+K59EePp5ARMvOv5MvO6QXCC4AZwAAAAAAAAAAAAAcxlKLUotprg1owN+PvORborq+7Hnwl3gUbO74VzRydt8pKn68ANcJwmqwkpLmnUDkAAAAfNy9atqtyagut0AxXt5xIV8Fbj6lRd7Am5G65V6qUvtwfyx94GMAAAAAAAAAAAAAAAAAAAOU2nVOj5gdsc3LiqRvTpyqwOxbnnrhdfpSfrQB7pnv/AGvuS9gHXPMy5/Fem1yq0v0A6W29XqwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAf//Z";
  5633. const _sfc_main$1Y = {
  5634. name: "u-avatar",
  5635. mixins: [mpMixin, mixin, props$w],
  5636. data() {
  5637. return {
  5638. // 如果配置randomBgColor参数为true,在图标或者文字的模式下,会随机从中取出一个颜色值当做背景色
  5639. colors: [
  5640. "#ffb34b",
  5641. "#f2bba9",
  5642. "#f7a196",
  5643. "#f18080",
  5644. "#88a867",
  5645. "#bfbf39",
  5646. "#89c152",
  5647. "#94d554",
  5648. "#f19ec2",
  5649. "#afaae4",
  5650. "#e1b0df",
  5651. "#c38cc1",
  5652. "#72dcdc",
  5653. "#9acdcb",
  5654. "#77b1cc",
  5655. "#448aca",
  5656. "#86cefa",
  5657. "#98d1ee",
  5658. "#73d1f1",
  5659. "#80a7dc"
  5660. ],
  5661. avatarUrl: this.src,
  5662. allowMp: false
  5663. };
  5664. },
  5665. watch: {
  5666. // 监听头像src的变化,赋值给内部的avatarUrl变量,因为图片加载失败时,需要修改图片的src为默认值
  5667. // 而组件内部不能直接修改props的值,所以需要一个中间变量
  5668. src: {
  5669. immediate: true,
  5670. handler(newVal) {
  5671. this.avatarUrl = newVal;
  5672. if (!newVal) {
  5673. this.errorHandler();
  5674. }
  5675. }
  5676. }
  5677. },
  5678. computed: {
  5679. imageStyle() {
  5680. const style = {};
  5681. return style;
  5682. }
  5683. },
  5684. created() {
  5685. this.init();
  5686. },
  5687. methods: {
  5688. init() {
  5689. },
  5690. // 判断传入的name属性,是否图片路径,只要带有"/"均认为是图片形式
  5691. isImg() {
  5692. return this.src.indexOf("/") !== -1;
  5693. },
  5694. // 图片加载时失败时触发
  5695. errorHandler() {
  5696. this.avatarUrl = this.defaultUrl || base64Avatar;
  5697. },
  5698. clickHandler() {
  5699. this.$emit("click", this.name);
  5700. }
  5701. }
  5702. };
  5703. function _sfc_render$1X(_ctx, _cache, $props, $setup, $data, $options) {
  5704. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  5705. const _component_u__text = resolveEasycom(vue.resolveDynamicComponent("u--text"), __easycom_1$7);
  5706. return vue.openBlock(), vue.createElementBlock(
  5707. "view",
  5708. {
  5709. class: vue.normalizeClass(["u-avatar", [`u-avatar--${_ctx.shape}`]]),
  5710. style: vue.normalizeStyle([{
  5711. backgroundColor: _ctx.text || _ctx.icon ? _ctx.randomBgColor ? $data.colors[_ctx.colorIndex !== "" ? _ctx.colorIndex : _ctx.$u.random(0, 19)] : _ctx.bgColor : "transparent",
  5712. width: _ctx.$u.addUnit(_ctx.size),
  5713. height: _ctx.$u.addUnit(_ctx.size)
  5714. }, _ctx.$u.addStyle(_ctx.customStyle)]),
  5715. onClick: _cache[1] || (_cache[1] = (...args) => $options.clickHandler && $options.clickHandler(...args))
  5716. },
  5717. [
  5718. vue.renderSlot(_ctx.$slots, "default", {}, () => [
  5719. _ctx.mpAvatar && $data.allowMp ? (vue.openBlock(), vue.createElementBlock(
  5720. vue.Fragment,
  5721. { key: 0 },
  5722. [],
  5723. 64
  5724. /* STABLE_FRAGMENT */
  5725. )) : _ctx.icon ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  5726. key: 1,
  5727. name: _ctx.icon,
  5728. size: _ctx.fontSize,
  5729. color: _ctx.color
  5730. }, null, 8, ["name", "size", "color"])) : _ctx.text ? (vue.openBlock(), vue.createBlock(_component_u__text, {
  5731. key: 2,
  5732. text: _ctx.text,
  5733. size: _ctx.fontSize,
  5734. color: _ctx.color,
  5735. align: "center",
  5736. customStyle: "justify-content: center"
  5737. }, null, 8, ["text", "size", "color"])) : (vue.openBlock(), vue.createElementBlock("image", {
  5738. key: 3,
  5739. class: vue.normalizeClass(["u-avatar__image", [`u-avatar__image--${_ctx.shape}`]]),
  5740. src: $data.avatarUrl || _ctx.defaultUrl,
  5741. mode: _ctx.mode,
  5742. onError: _cache[0] || (_cache[0] = (...args) => $options.errorHandler && $options.errorHandler(...args)),
  5743. style: vue.normalizeStyle([{
  5744. width: _ctx.$u.addUnit(_ctx.size),
  5745. height: _ctx.$u.addUnit(_ctx.size)
  5746. }])
  5747. }, null, 46, ["src", "mode"]))
  5748. ], true)
  5749. ],
  5750. 6
  5751. /* CLASS, STYLE */
  5752. );
  5753. }
  5754. const __easycom_0$d = /* @__PURE__ */ _export_sfc(_sfc_main$1Y, [["render", _sfc_render$1X], ["__scopeId", "data-v-34d954f9"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-avatar/u-avatar.vue"]]);
  5755. const props$v = {
  5756. props: {
  5757. // 标题
  5758. title: {
  5759. type: [String, Number],
  5760. default: props$G.cell.title
  5761. },
  5762. // 标题下方的描述信息
  5763. label: {
  5764. type: [String, Number],
  5765. default: props$G.cell.label
  5766. },
  5767. // 右侧的内容
  5768. value: {
  5769. type: [String, Number],
  5770. default: props$G.cell.value
  5771. },
  5772. // 左侧图标名称,或者图片链接(本地文件建议使用绝对地址)
  5773. icon: {
  5774. type: String,
  5775. default: props$G.cell.icon
  5776. },
  5777. // 是否禁用cell
  5778. disabled: {
  5779. type: Boolean,
  5780. default: props$G.cell.disabled
  5781. },
  5782. // 是否显示下边框
  5783. border: {
  5784. type: Boolean,
  5785. default: props$G.cell.border
  5786. },
  5787. // 内容是否垂直居中(主要是针对右侧的value部分)
  5788. center: {
  5789. type: Boolean,
  5790. default: props$G.cell.center
  5791. },
  5792. // 点击后跳转的URL地址
  5793. url: {
  5794. type: String,
  5795. default: props$G.cell.url
  5796. },
  5797. // 链接跳转的方式,内部使用的是uView封装的route方法,可能会进行拦截操作
  5798. linkType: {
  5799. type: String,
  5800. default: props$G.cell.linkType
  5801. },
  5802. // 是否开启点击反馈(表现为点击时加上灰色背景)
  5803. clickable: {
  5804. type: Boolean,
  5805. default: props$G.cell.clickable
  5806. },
  5807. // 是否展示右侧箭头并开启点击反馈
  5808. isLink: {
  5809. type: Boolean,
  5810. default: props$G.cell.isLink
  5811. },
  5812. // 是否显示表单状态下的必填星号(此组件可能会内嵌入input组件)
  5813. required: {
  5814. type: Boolean,
  5815. default: props$G.cell.required
  5816. },
  5817. // 右侧的图标箭头
  5818. rightIcon: {
  5819. type: String,
  5820. default: props$G.cell.rightIcon
  5821. },
  5822. // 右侧箭头的方向,可选值为:left,up,down
  5823. arrowDirection: {
  5824. type: String,
  5825. default: props$G.cell.arrowDirection
  5826. },
  5827. // 左侧图标样式
  5828. iconStyle: {
  5829. type: [Object, String],
  5830. default: () => {
  5831. return uni.$u.props.cell.iconStyle;
  5832. }
  5833. },
  5834. // 右侧箭头图标的样式
  5835. rightIconStyle: {
  5836. type: [Object, String],
  5837. default: () => {
  5838. return uni.$u.props.cell.rightIconStyle;
  5839. }
  5840. },
  5841. // 标题的样式
  5842. titleStyle: {
  5843. type: [Object, String],
  5844. default: () => {
  5845. return uni.$u.props.cell.titleStyle;
  5846. }
  5847. },
  5848. // 单位元的大小,可选值为large
  5849. size: {
  5850. type: String,
  5851. default: props$G.cell.size
  5852. },
  5853. // 点击cell是否阻止事件传播
  5854. stop: {
  5855. type: Boolean,
  5856. default: props$G.cell.stop
  5857. },
  5858. // 标识符,cell被点击时返回
  5859. name: {
  5860. type: [Number, String],
  5861. default: props$G.cell.name
  5862. }
  5863. }
  5864. };
  5865. const _sfc_main$1X = {
  5866. name: "u-cell",
  5867. data() {
  5868. return {};
  5869. },
  5870. mixins: [mpMixin, mixin, props$v],
  5871. computed: {
  5872. titleTextStyle() {
  5873. return uni.$u.addStyle(this.titleStyle);
  5874. }
  5875. },
  5876. emits: ["click"],
  5877. methods: {
  5878. // 点击cell
  5879. clickHandler(e) {
  5880. if (this.disabled)
  5881. return;
  5882. this.$emit("click", {
  5883. name: this.name
  5884. });
  5885. this.openPage();
  5886. this.stop && this.preventEvent(e);
  5887. }
  5888. }
  5889. };
  5890. function _sfc_render$1W(_ctx, _cache, $props, $setup, $data, $options) {
  5891. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  5892. const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_1$b);
  5893. return vue.openBlock(), vue.createElementBlock("view", {
  5894. class: vue.normalizeClass(["u-cell", [_ctx.customClass]]),
  5895. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)]),
  5896. "hover-class": !_ctx.disabled && (_ctx.clickable || _ctx.isLink) ? "u-cell--clickable" : "",
  5897. "hover-stay-time": 250,
  5898. onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args))
  5899. }, [
  5900. vue.createElementVNode(
  5901. "view",
  5902. {
  5903. class: vue.normalizeClass(["u-cell__body", [_ctx.center && "u-cell--center", _ctx.size === "large" && "u-cell__body--large"]])
  5904. },
  5905. [
  5906. vue.createElementVNode("view", { class: "u-cell__body__content" }, [
  5907. vue.createElementVNode("view", { class: "u-cell__left-icon-wrap" }, [
  5908. vue.renderSlot(_ctx.$slots, "icon", {}, () => [
  5909. _ctx.icon ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  5910. key: 0,
  5911. name: _ctx.icon,
  5912. "custom-style": _ctx.iconStyle,
  5913. size: _ctx.size === "large" ? 22 : 18
  5914. }, null, 8, ["name", "custom-style", "size"])) : vue.createCommentVNode("v-if", true)
  5915. ], true)
  5916. ]),
  5917. vue.createElementVNode("view", { class: "u-cell__title" }, [
  5918. vue.renderSlot(_ctx.$slots, "title", {}, () => [
  5919. _ctx.title ? (vue.openBlock(), vue.createElementBlock(
  5920. "text",
  5921. {
  5922. key: 0,
  5923. class: vue.normalizeClass(["u-cell__title-text", [_ctx.disabled && "u-cell--disabled", _ctx.size === "large" && "u-cell__title-text--large"]]),
  5924. style: vue.normalizeStyle([$options.titleTextStyle])
  5925. },
  5926. vue.toDisplayString(_ctx.title),
  5927. 7
  5928. /* TEXT, CLASS, STYLE */
  5929. )) : vue.createCommentVNode("v-if", true)
  5930. ], true),
  5931. vue.renderSlot(_ctx.$slots, "label", {}, () => [
  5932. _ctx.label ? (vue.openBlock(), vue.createElementBlock(
  5933. "text",
  5934. {
  5935. key: 0,
  5936. class: vue.normalizeClass(["u-cell__label", [_ctx.disabled && "u-cell--disabled", _ctx.size === "large" && "u-cell__label--large"]])
  5937. },
  5938. vue.toDisplayString(_ctx.label),
  5939. 3
  5940. /* TEXT, CLASS */
  5941. )) : vue.createCommentVNode("v-if", true)
  5942. ], true)
  5943. ])
  5944. ]),
  5945. vue.renderSlot(_ctx.$slots, "value", {}, () => [
  5946. !_ctx.$u.test.empty(_ctx.value) ? (vue.openBlock(), vue.createElementBlock(
  5947. "text",
  5948. {
  5949. key: 0,
  5950. class: vue.normalizeClass(["u-cell__value", [_ctx.disabled && "u-cell--disabled", _ctx.size === "large" && "u-cell__value--large"]])
  5951. },
  5952. vue.toDisplayString(_ctx.value),
  5953. 3
  5954. /* TEXT, CLASS */
  5955. )) : vue.createCommentVNode("v-if", true)
  5956. ], true),
  5957. vue.createElementVNode(
  5958. "view",
  5959. {
  5960. class: vue.normalizeClass(["u-cell__right-icon-wrap", [`u-cell__right-icon-wrap--${_ctx.arrowDirection}`]])
  5961. },
  5962. [
  5963. vue.renderSlot(_ctx.$slots, "right-icon", {}, () => [
  5964. _ctx.isLink ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  5965. key: 0,
  5966. name: _ctx.rightIcon,
  5967. "custom-style": _ctx.rightIconStyle,
  5968. color: _ctx.disabled ? "#c8c9cc" : "info",
  5969. size: _ctx.size === "large" ? 18 : 16
  5970. }, null, 8, ["name", "custom-style", "color", "size"])) : vue.createCommentVNode("v-if", true)
  5971. ], true)
  5972. ],
  5973. 2
  5974. /* CLASS */
  5975. )
  5976. ],
  5977. 2
  5978. /* CLASS */
  5979. ),
  5980. _ctx.border ? (vue.openBlock(), vue.createBlock(_component_u_line, { key: 0 })) : vue.createCommentVNode("v-if", true)
  5981. ], 14, ["hover-class"]);
  5982. }
  5983. const __easycom_1$6 = /* @__PURE__ */ _export_sfc(_sfc_main$1X, [["render", _sfc_render$1W], ["__scopeId", "data-v-3fd6feca"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-cell/u-cell.vue"]]);
  5984. const props$u = {
  5985. props: {
  5986. // 分组标题
  5987. title: {
  5988. type: String,
  5989. default: props$G.cellGroup.title
  5990. },
  5991. // 是否显示外边框
  5992. border: {
  5993. type: Boolean,
  5994. default: props$G.cellGroup.border
  5995. }
  5996. }
  5997. };
  5998. const _sfc_main$1W = {
  5999. name: "u-cell-group",
  6000. mixins: [mpMixin, mixin, props$u]
  6001. };
  6002. function _sfc_render$1V(_ctx, _cache, $props, $setup, $data, $options) {
  6003. const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_1$b);
  6004. return vue.openBlock(), vue.createElementBlock(
  6005. "view",
  6006. {
  6007. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)]),
  6008. class: vue.normalizeClass([[_ctx.customClass], "u-cell-group"])
  6009. },
  6010. [
  6011. _ctx.title ? (vue.openBlock(), vue.createElementBlock("view", {
  6012. key: 0,
  6013. class: "u-cell-group__title"
  6014. }, [
  6015. vue.renderSlot(_ctx.$slots, "title", {}, () => [
  6016. vue.createElementVNode(
  6017. "text",
  6018. { class: "u-cell-group__title__text" },
  6019. vue.toDisplayString(_ctx.title),
  6020. 1
  6021. /* TEXT */
  6022. )
  6023. ], true)
  6024. ])) : vue.createCommentVNode("v-if", true),
  6025. vue.createElementVNode("view", { class: "u-cell-group__wrapper" }, [
  6026. _ctx.border ? (vue.openBlock(), vue.createBlock(_component_u_line, { key: 0 })) : vue.createCommentVNode("v-if", true),
  6027. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  6028. ])
  6029. ],
  6030. 6
  6031. /* CLASS, STYLE */
  6032. );
  6033. }
  6034. const __easycom_2$3 = /* @__PURE__ */ _export_sfc(_sfc_main$1W, [["render", _sfc_render$1V], ["__scopeId", "data-v-014d39dc"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-cell-group/u-cell-group.vue"]]);
  6035. const _sfc_main$1V = {
  6036. __name: "my",
  6037. setup(__props, { expose: __expose }) {
  6038. __expose();
  6039. function playGlobalSound() {
  6040. uni.$u.playClickSound();
  6041. }
  6042. let defaultAvatar = "https://img20.360buyimg.com/da/jfs/t1/141592/25/8861/261559/5f68d8c1E33ed78ab/698ad655bfcfbaed.png";
  6043. const settingsList = vue.ref([
  6044. {
  6045. title: "用户信息",
  6046. path: "/pages/my/page/user-info"
  6047. },
  6048. {
  6049. title: "默认仓库",
  6050. path: "/pages/my/page/warehouse"
  6051. },
  6052. {
  6053. title: "学校设置",
  6054. path: "/pages/my/page/school"
  6055. },
  6056. {
  6057. title: "审核未完成",
  6058. path: "/pages/my/page/audit-unfinished"
  6059. },
  6060. {
  6061. title: "版本设置",
  6062. path: "/pages/my/page/version",
  6063. icon: "tags"
  6064. },
  6065. {
  6066. title: "音频设置",
  6067. path: "/pages/my/page/volume"
  6068. },
  6069. {
  6070. title: "图书显示设置",
  6071. path: "/pages/my/page/book-display"
  6072. },
  6073. {
  6074. title: "修改密码",
  6075. icon: "lock",
  6076. path: "/pages/my/page/password"
  6077. },
  6078. {
  6079. title: "退出账号",
  6080. path: "/pages/my/page/logout",
  6081. type: "logout"
  6082. }
  6083. ]);
  6084. const greeting = vue.ref("");
  6085. const updateGreeting = () => {
  6086. const hour = (/* @__PURE__ */ new Date()).getHours();
  6087. if (hour >= 5 && hour < 12) {
  6088. greeting.value = "早上好";
  6089. } else if (hour >= 12 && hour < 14) {
  6090. greeting.value = "中午好";
  6091. } else if (hour >= 14 && hour < 18) {
  6092. greeting.value = "下午好";
  6093. } else if (hour >= 18 && hour < 22) {
  6094. greeting.value = "晚上好";
  6095. } else {
  6096. greeting.value = "夜深了";
  6097. }
  6098. };
  6099. const userName = vue.ref("-");
  6100. const avatar = vue.ref("");
  6101. function getUserInfo() {
  6102. uni.$u.http.get("/app/appUser/getUserInfoById").then((res) => {
  6103. if (res.code == 200) {
  6104. userName.value = res.data.userName;
  6105. avatar.value = res.data.avatar;
  6106. }
  6107. });
  6108. }
  6109. onLoad(() => {
  6110. updateGreeting();
  6111. setInterval(updateGreeting, 60 * 60 * 1e3);
  6112. getUserInfo();
  6113. });
  6114. const handleClick = (item) => {
  6115. if (item.type === "logout") {
  6116. uni.showModal({
  6117. title: "提示",
  6118. content: "确定要退出登录吗?",
  6119. success: (res) => {
  6120. if (res.confirm) {
  6121. uni.clearStorageSync();
  6122. uni.reLaunch({
  6123. url: "/pages/login/login"
  6124. });
  6125. }
  6126. }
  6127. });
  6128. return;
  6129. }
  6130. uni.navigateTo({
  6131. url: item.path
  6132. });
  6133. };
  6134. const __returned__ = { playGlobalSound, get defaultAvatar() {
  6135. return defaultAvatar;
  6136. }, set defaultAvatar(v) {
  6137. defaultAvatar = v;
  6138. }, settingsList, greeting, updateGreeting, userName, avatar, getUserInfo, handleClick, ref: vue.ref, onMounted: vue.onMounted, get onLoad() {
  6139. return onLoad;
  6140. } };
  6141. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  6142. return __returned__;
  6143. }
  6144. };
  6145. function _sfc_render$1U(_ctx, _cache, $props, $setup, $data, $options) {
  6146. const _component_u_avatar = resolveEasycom(vue.resolveDynamicComponent("u-avatar"), __easycom_0$d);
  6147. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  6148. const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_1$6);
  6149. const _component_u_cell_group = resolveEasycom(vue.resolveDynamicComponent("u-cell-group"), __easycom_2$3);
  6150. return vue.openBlock(), vue.createElementBlock("view", {
  6151. class: "settings-page",
  6152. onClick: $setup.playGlobalSound
  6153. }, [
  6154. vue.createCommentVNode(" 顶部用户信息 "),
  6155. vue.createElementVNode("view", { class: "user-header" }, [
  6156. vue.createElementVNode("view", { class: "user-info" }, [
  6157. vue.createVNode(_component_u_avatar, {
  6158. size: 60,
  6159. src: $setup.avatar || $setup.defaultAvatar
  6160. }, null, 8, ["src"]),
  6161. vue.createElementVNode("view", { class: "greeting" }, [
  6162. vue.createElementVNode(
  6163. "text",
  6164. { class: "time" },
  6165. vue.toDisplayString($setup.greeting) + "!",
  6166. 1
  6167. /* TEXT */
  6168. ),
  6169. vue.createElementVNode(
  6170. "text",
  6171. { class: "name" },
  6172. vue.toDisplayString($setup.userName),
  6173. 1
  6174. /* TEXT */
  6175. )
  6176. ])
  6177. ])
  6178. ]),
  6179. vue.createCommentVNode(" 设置列表 "),
  6180. vue.createElementVNode("view", { class: "settings-list" }, [
  6181. vue.createVNode(_component_u_cell_group, { border: false }, {
  6182. default: vue.withCtx(() => [
  6183. (vue.openBlock(true), vue.createElementBlock(
  6184. vue.Fragment,
  6185. null,
  6186. vue.renderList($setup.settingsList, (item, index2) => {
  6187. return vue.openBlock(), vue.createBlock(_component_u_cell, {
  6188. key: index2,
  6189. title: item.title,
  6190. isLink: true,
  6191. onClick: ($event) => $setup.handleClick(item),
  6192. border: index2 == $setup.settingsList.length - 1 ? false : true
  6193. }, {
  6194. icon: vue.withCtx(() => [
  6195. vue.createElementVNode("view", { class: "cell-icon" }, [
  6196. vue.createVNode(_component_u_icon, {
  6197. name: item.icon || "setting",
  6198. size: "22",
  6199. color: "#333"
  6200. }, null, 8, ["name"])
  6201. ])
  6202. ]),
  6203. _: 2
  6204. /* DYNAMIC */
  6205. }, 1032, ["title", "onClick", "border"]);
  6206. }),
  6207. 128
  6208. /* KEYED_FRAGMENT */
  6209. ))
  6210. ]),
  6211. _: 1
  6212. /* STABLE */
  6213. })
  6214. ])
  6215. ]);
  6216. }
  6217. const PagesMyMy = /* @__PURE__ */ _export_sfc(_sfc_main$1V, [["render", _sfc_render$1U], ["__scopeId", "data-v-2f1ef635"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/my/my.vue"]]);
  6218. const _sfc_main$1U = {
  6219. __name: "index",
  6220. setup(__props, { expose: __expose }) {
  6221. __expose();
  6222. const orderStatData = vue.ref({});
  6223. const statusList = vue.computed(() => [
  6224. {
  6225. label: "待初审",
  6226. value: 0,
  6227. key: "waitFirstOrderNum",
  6228. path: "/pages/order/stat/pending-review"
  6229. },
  6230. {
  6231. label: "待拣件",
  6232. value: 0,
  6233. key: "waitOrderNum",
  6234. path: "/pages/order/stat/pending-pick"
  6235. },
  6236. {
  6237. label: "已拣件待签收",
  6238. value: 0,
  6239. key: "waitSignOrderNum",
  6240. path: "/pages/order/stat/pending-sign"
  6241. },
  6242. {
  6243. label: "待确认收货",
  6244. value: 0,
  6245. key: "waitConfirmOrderNum",
  6246. path: "/pages/order/stat/pending-confirm"
  6247. },
  6248. {
  6249. label: "已到货待审核",
  6250. value: 0,
  6251. key: "waitCheckOrderNum",
  6252. path: "/pages/order/stat/pending-audit"
  6253. },
  6254. {
  6255. label: "待付款",
  6256. value: 0,
  6257. key: "waitPayOrderNum",
  6258. path: "/pages/order/stat/pending-payment"
  6259. }
  6260. ]);
  6261. const formatOrderNum = (num) => {
  6262. if (!num)
  6263. return 0;
  6264. if (num >= 1e4) {
  6265. return (num / 1e4).toFixed(2);
  6266. }
  6267. return num;
  6268. };
  6269. const getOrderStatData = async () => {
  6270. uni.showLoading({
  6271. title: "加载中..."
  6272. });
  6273. uni.$u.http.get("/app/ordersignstat/getPdaOrderStat").then((res) => {
  6274. if (res.code === 200) {
  6275. orderStatData.value = res.data;
  6276. }
  6277. }).finally(() => {
  6278. uni.hideLoading();
  6279. });
  6280. };
  6281. const navigateToDetail = (path) => {
  6282. if (path != "/pages/order/stat/receive-stat") {
  6283. return;
  6284. }
  6285. uni.navigateTo({
  6286. url: path
  6287. });
  6288. };
  6289. vue.onMounted(() => {
  6290. getOrderStatData();
  6291. });
  6292. const __returned__ = { orderStatData, statusList, formatOrderNum, getOrderStatData, navigateToDetail, ref: vue.ref, onMounted: vue.onMounted, computed: vue.computed };
  6293. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  6294. return __returned__;
  6295. }
  6296. };
  6297. function _sfc_render$1T(_ctx, _cache, $props, $setup, $data, $options) {
  6298. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  6299. const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_1$6);
  6300. const _component_u_cell_group = resolveEasycom(vue.resolveDynamicComponent("u-cell-group"), __easycom_2$3);
  6301. return vue.openBlock(), vue.createElementBlock("view", { class: "order-statistics" }, [
  6302. vue.createCommentVNode(" 顶部统计卡片 "),
  6303. vue.createElementVNode("view", { class: "overview-card" }, [
  6304. vue.createElementVNode("view", { class: "overview-grid" }, [
  6305. vue.createElementVNode("view", { class: "grid-item" }, [
  6306. vue.createElementVNode("text", { class: "item-label" }, "今日订单"),
  6307. vue.createElementVNode(
  6308. "text",
  6309. { class: "item-value" },
  6310. vue.toDisplayString($setup.orderStatData.todayOrderNum || 0),
  6311. 1
  6312. /* TEXT */
  6313. )
  6314. ]),
  6315. vue.createElementVNode("view", { class: "grid-item" }, [
  6316. vue.createElementVNode("text", { class: "item-label" }, "昨日订单"),
  6317. vue.createElementVNode(
  6318. "text",
  6319. { class: "item-value" },
  6320. vue.toDisplayString($setup.orderStatData.yesterdayOrderNum || 0),
  6321. 1
  6322. /* TEXT */
  6323. )
  6324. ]),
  6325. vue.createElementVNode("view", { class: "grid-item" }, [
  6326. vue.createElementVNode("text", { class: "item-label" }, "本月订单"),
  6327. vue.createElementVNode("text", { class: "item-value" }, [
  6328. vue.createTextVNode(
  6329. vue.toDisplayString($setup.formatOrderNum($setup.orderStatData.monthOrderNum) || 0),
  6330. 1
  6331. /* TEXT */
  6332. ),
  6333. $setup.orderStatData.monthOrderNum > 1e4 ? (vue.openBlock(), vue.createElementBlock("text", {
  6334. key: 0,
  6335. class: "unit"
  6336. }, "万")) : vue.createCommentVNode("v-if", true)
  6337. ])
  6338. ])
  6339. ])
  6340. ]),
  6341. vue.createCommentVNode(" 订单状态网格 "),
  6342. vue.createElementVNode("view", { class: "status-grid" }, [
  6343. (vue.openBlock(true), vue.createElementBlock(
  6344. vue.Fragment,
  6345. null,
  6346. vue.renderList($setup.statusList, (item, index2) => {
  6347. return vue.openBlock(), vue.createElementBlock("view", {
  6348. key: index2,
  6349. class: "status-item",
  6350. onClick: ($event) => $setup.navigateToDetail(item.path)
  6351. }, [
  6352. vue.createElementVNode("view", { class: "status-content" }, [
  6353. vue.createElementVNode(
  6354. "text",
  6355. { class: "status-label" },
  6356. vue.toDisplayString(item.label),
  6357. 1
  6358. /* TEXT */
  6359. ),
  6360. vue.createElementVNode("view", { class: "status-value-wrap" }, [
  6361. vue.createElementVNode(
  6362. "text",
  6363. { class: "status-value" },
  6364. vue.toDisplayString($setup.orderStatData[item.key] || 0),
  6365. 1
  6366. /* TEXT */
  6367. ),
  6368. vue.createVNode(_component_u_icon, {
  6369. name: "arrow-right",
  6370. color: "#999",
  6371. size: "14"
  6372. })
  6373. ])
  6374. ])
  6375. ], 8, ["onClick"]);
  6376. }),
  6377. 128
  6378. /* KEYED_FRAGMENT */
  6379. ))
  6380. ]),
  6381. vue.createCommentVNode(" 底部操作项 "),
  6382. vue.createElementVNode("view", { class: "bottom-actions" }, [
  6383. vue.createVNode(_component_u_cell_group, { border: false }, {
  6384. default: vue.withCtx(() => [
  6385. vue.createVNode(_component_u_cell, {
  6386. title: "收货统计",
  6387. isLink: "",
  6388. onClick: _cache[0] || (_cache[0] = ($event) => $setup.navigateToDetail("/pages/order/stat/receive-stat"))
  6389. }),
  6390. vue.createVNode(_component_u_cell, {
  6391. title: "全部订单",
  6392. isLink: "",
  6393. onClick: _cache[1] || (_cache[1] = ($event) => $setup.navigateToDetail("/pages/order/stat/all")),
  6394. border: false
  6395. })
  6396. ]),
  6397. _: 1
  6398. /* STABLE */
  6399. })
  6400. ])
  6401. ]);
  6402. }
  6403. const PagesOrderIndex = /* @__PURE__ */ _export_sfc(_sfc_main$1U, [["render", _sfc_render$1T], ["__scopeId", "data-v-17a44f9d"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/order/index.vue"]]);
  6404. const props$t = {
  6405. props: {
  6406. // 搜索框形状,round-圆形,square-方形
  6407. shape: {
  6408. type: String,
  6409. default: props$G.search.shape
  6410. },
  6411. // 搜索框背景色,默认值#f2f2f2
  6412. bgColor: {
  6413. type: String,
  6414. default: props$G.search.bgColor
  6415. },
  6416. // 占位提示文字
  6417. placeholder: {
  6418. type: String,
  6419. default: props$G.search.placeholder
  6420. },
  6421. // 是否启用清除控件
  6422. clearabled: {
  6423. type: Boolean,
  6424. default: props$G.search.clearabled
  6425. },
  6426. // 是否自动聚焦
  6427. focus: {
  6428. type: Boolean,
  6429. default: props$G.search.focus
  6430. },
  6431. // 是否在搜索框右侧显示取消按钮
  6432. showAction: {
  6433. type: Boolean,
  6434. default: props$G.search.showAction
  6435. },
  6436. // 右边控件的样式
  6437. actionStyle: {
  6438. type: Object,
  6439. default: props$G.search.actionStyle
  6440. },
  6441. // 取消按钮文字
  6442. actionText: {
  6443. type: String,
  6444. default: props$G.search.actionText
  6445. },
  6446. // 输入框内容对齐方式,可选值为 left|center|right
  6447. inputAlign: {
  6448. type: String,
  6449. default: props$G.search.inputAlign
  6450. },
  6451. // input输入框的样式,可以定义文字颜色,大小等,对象形式
  6452. inputStyle: {
  6453. type: Object,
  6454. default: props$G.search.inputStyle
  6455. },
  6456. // 是否启用输入框
  6457. disabled: {
  6458. type: Boolean,
  6459. default: props$G.search.disabled
  6460. },
  6461. // 边框颜色
  6462. borderColor: {
  6463. type: String,
  6464. default: props$G.search.borderColor
  6465. },
  6466. // 搜索图标的颜色,默认同输入框字体颜色
  6467. searchIconColor: {
  6468. type: String,
  6469. default: props$G.search.searchIconColor
  6470. },
  6471. // 输入框字体颜色
  6472. color: {
  6473. type: String,
  6474. default: props$G.search.color
  6475. },
  6476. // placeholder的颜色
  6477. placeholderColor: {
  6478. type: String,
  6479. default: props$G.search.placeholderColor
  6480. },
  6481. // 左边输入框的图标,可以为uView图标名称或图片路径
  6482. searchIcon: {
  6483. type: String,
  6484. default: props$G.search.searchIcon
  6485. },
  6486. searchIconSize: {
  6487. type: [Number, String],
  6488. default: props$G.search.searchIconSize
  6489. },
  6490. // 组件与其他上下左右元素之间的距离,带单位的字符串形式,如"30px"、"30px 20px"等写法
  6491. margin: {
  6492. type: String,
  6493. default: props$G.search.margin
  6494. },
  6495. // 开启showAction时,是否在input获取焦点时才显示
  6496. animation: {
  6497. type: Boolean,
  6498. default: props$G.search.animation
  6499. },
  6500. // 输入框的初始化内容
  6501. modelValue: {
  6502. type: String,
  6503. default: props$G.search.value
  6504. },
  6505. value: {
  6506. type: String,
  6507. default: props$G.search.value
  6508. },
  6509. // 输入框最大能输入的长度,-1为不限制长度(来自uniapp文档)
  6510. maxlength: {
  6511. type: [String, Number],
  6512. default: props$G.search.maxlength
  6513. },
  6514. // 搜索框高度,单位px
  6515. height: {
  6516. type: [String, Number],
  6517. default: props$G.search.height
  6518. },
  6519. // 搜索框左侧文本
  6520. label: {
  6521. type: [String, Number, null],
  6522. default: props$G.search.label
  6523. }
  6524. }
  6525. };
  6526. const _sfc_main$1T = {
  6527. name: "u-search",
  6528. mixins: [mpMixin, mixin, props$t],
  6529. data() {
  6530. return {
  6531. keyword: "",
  6532. showClear: false,
  6533. // 是否显示右边的清除图标
  6534. show: false,
  6535. // 标记input当前状态是否处于聚焦中,如果是,才会显示右侧的清除控件
  6536. focused: this.focus
  6537. // 绑定输入框的值
  6538. // inputValue: this.value
  6539. };
  6540. },
  6541. watch: {
  6542. keyword(nVal) {
  6543. this.$emit("update:modelValue", nVal);
  6544. this.$emit("change", nVal);
  6545. },
  6546. modelValue: {
  6547. immediate: true,
  6548. handler(nVal) {
  6549. this.keyword = nVal;
  6550. }
  6551. }
  6552. },
  6553. computed: {
  6554. showActionBtn() {
  6555. return !this.animation && this.showAction;
  6556. }
  6557. },
  6558. emits: ["clear", "search", "custom", "focus", "blur", "click", "clickIcon", "update:modelValue", "change"],
  6559. methods: {
  6560. // 目前HX2.6.9 v-model双向绑定无效,故监听input事件获取输入框内容的变化
  6561. inputChange(e) {
  6562. this.keyword = e.detail.value;
  6563. },
  6564. // 清空输入
  6565. // 也可以作为用户通过this.$refs形式调用清空输入框内容
  6566. clear() {
  6567. this.keyword = "";
  6568. this.$nextTick(() => {
  6569. this.$emit("clear");
  6570. });
  6571. },
  6572. // 确定搜索
  6573. search(e) {
  6574. this.$emit("search", e.detail.value);
  6575. try {
  6576. uni.hideKeyboard();
  6577. } catch (e2) {
  6578. }
  6579. },
  6580. // 点击右边自定义按钮的事件
  6581. custom() {
  6582. this.$emit("custom", this.keyword);
  6583. try {
  6584. uni.hideKeyboard();
  6585. } catch (e) {
  6586. }
  6587. },
  6588. // 获取焦点
  6589. getFocus() {
  6590. this.focused = true;
  6591. if (this.animation && this.showAction)
  6592. this.show = true;
  6593. this.$emit("focus", this.keyword);
  6594. },
  6595. // 失去焦点
  6596. blur() {
  6597. setTimeout(() => {
  6598. this.focused = false;
  6599. }, 100);
  6600. this.show = false;
  6601. this.$emit("blur", this.keyword);
  6602. },
  6603. // 点击搜索框,只有disabled=true时才发出事件,因为禁止了输入,意味着是想跳转真正的搜索页
  6604. clickHandler() {
  6605. if (this.disabled)
  6606. this.$emit("click");
  6607. },
  6608. // 点击左边图标
  6609. clickIcon() {
  6610. this.$emit("clickIcon");
  6611. }
  6612. }
  6613. };
  6614. function _sfc_render$1S(_ctx, _cache, $props, $setup, $data, $options) {
  6615. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  6616. return vue.openBlock(), vue.createElementBlock(
  6617. "view",
  6618. {
  6619. class: "u-search",
  6620. onClick: _cache[6] || (_cache[6] = (...args) => $options.clickHandler && $options.clickHandler(...args)),
  6621. style: vue.normalizeStyle([{
  6622. margin: _ctx.margin
  6623. }, _ctx.$u.addStyle(_ctx.customStyle)])
  6624. },
  6625. [
  6626. vue.createElementVNode(
  6627. "view",
  6628. {
  6629. class: "u-search__content",
  6630. style: vue.normalizeStyle({
  6631. backgroundColor: _ctx.bgColor,
  6632. borderRadius: _ctx.shape == "round" ? "100px" : "4px",
  6633. borderColor: _ctx.borderColor
  6634. })
  6635. },
  6636. [
  6637. _ctx.$slots.label || _ctx.label !== null ? vue.renderSlot(_ctx.$slots, "label", { key: 0 }, () => [
  6638. vue.createElementVNode(
  6639. "text",
  6640. { class: "u-search__content__label" },
  6641. vue.toDisplayString(_ctx.label),
  6642. 1
  6643. /* TEXT */
  6644. )
  6645. ], true) : vue.createCommentVNode("v-if", true),
  6646. vue.createElementVNode("view", { class: "u-search__content__icon" }, [
  6647. vue.createVNode(_component_u_icon, {
  6648. onClick: $options.clickIcon,
  6649. size: _ctx.searchIconSize,
  6650. name: _ctx.searchIcon,
  6651. color: _ctx.searchIconColor ? _ctx.searchIconColor : _ctx.color
  6652. }, null, 8, ["onClick", "size", "name", "color"])
  6653. ]),
  6654. vue.createElementVNode("input", {
  6655. "confirm-type": "search",
  6656. onBlur: _cache[0] || (_cache[0] = (...args) => $options.blur && $options.blur(...args)),
  6657. value: $data.keyword,
  6658. onConfirm: _cache[1] || (_cache[1] = (...args) => $options.search && $options.search(...args)),
  6659. onInput: _cache[2] || (_cache[2] = (...args) => $options.inputChange && $options.inputChange(...args)),
  6660. disabled: _ctx.disabled,
  6661. onFocus: _cache[3] || (_cache[3] = (...args) => $options.getFocus && $options.getFocus(...args)),
  6662. focus: _ctx.focus,
  6663. maxlength: _ctx.maxlength,
  6664. "placeholder-class": "u-search__content__input--placeholder",
  6665. placeholder: _ctx.placeholder,
  6666. "placeholder-style": `color: ${_ctx.placeholderColor}`,
  6667. class: "u-search__content__input",
  6668. type: "text",
  6669. style: vue.normalizeStyle([{
  6670. textAlign: _ctx.inputAlign,
  6671. color: _ctx.color,
  6672. backgroundColor: _ctx.bgColor,
  6673. height: _ctx.$u.addUnit(_ctx.height)
  6674. }, _ctx.inputStyle])
  6675. }, null, 44, ["value", "disabled", "focus", "maxlength", "placeholder", "placeholder-style"]),
  6676. $data.keyword && _ctx.clearabled && $data.focused ? (vue.openBlock(), vue.createElementBlock("view", {
  6677. key: 1,
  6678. class: "u-search__content__icon u-search__content__close",
  6679. onClick: _cache[4] || (_cache[4] = (...args) => $options.clear && $options.clear(...args))
  6680. }, [
  6681. vue.createVNode(_component_u_icon, {
  6682. name: "close",
  6683. size: "11",
  6684. color: "#ffffff",
  6685. customStyle: "line-height: 12px"
  6686. })
  6687. ])) : vue.createCommentVNode("v-if", true)
  6688. ],
  6689. 4
  6690. /* STYLE */
  6691. ),
  6692. vue.createElementVNode(
  6693. "text",
  6694. {
  6695. style: vue.normalizeStyle([_ctx.actionStyle]),
  6696. class: vue.normalizeClass(["u-search__action", [($options.showActionBtn || $data.show) && "u-search__action--active"]]),
  6697. onClick: _cache[5] || (_cache[5] = vue.withModifiers((...args) => $options.custom && $options.custom(...args), ["stop", "prevent"]))
  6698. },
  6699. vue.toDisplayString(_ctx.actionText),
  6700. 7
  6701. /* TEXT, CLASS, STYLE */
  6702. )
  6703. ],
  6704. 4
  6705. /* STYLE */
  6706. );
  6707. }
  6708. const __easycom_4$4 = /* @__PURE__ */ _export_sfc(_sfc_main$1T, [["render", _sfc_render$1S], ["__scopeId", "data-v-e082a34a"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-search/u-search.vue"]]);
  6709. const props$s = {
  6710. props: {
  6711. // 是否展示组件
  6712. show: {
  6713. type: Boolean,
  6714. default: props$G.transition.show
  6715. },
  6716. // 使用的动画模式
  6717. mode: {
  6718. type: String,
  6719. default: props$G.transition.mode
  6720. },
  6721. // 动画的执行时间,单位ms
  6722. duration: {
  6723. type: [String, Number],
  6724. default: props$G.transition.duration
  6725. },
  6726. // 使用的动画过渡函数
  6727. timingFunction: {
  6728. type: String,
  6729. default: props$G.transition.timingFunction
  6730. }
  6731. }
  6732. };
  6733. const getClassNames = (name) => ({
  6734. enter: `u-${name}-enter u-${name}-enter-active`,
  6735. "enter-to": `u-${name}-enter-to u-${name}-enter-active`,
  6736. leave: `u-${name}-leave u-${name}-leave-active`,
  6737. "leave-to": `u-${name}-leave-to u-${name}-leave-active`
  6738. });
  6739. const transition = {
  6740. methods: {
  6741. // 组件被点击发出事件
  6742. clickHandler() {
  6743. this.$emit("click");
  6744. },
  6745. // vue版本的组件进场处理
  6746. vueEnter() {
  6747. const classNames = getClassNames(this.mode);
  6748. this.status = "enter";
  6749. this.$emit("beforeEnter");
  6750. this.inited = true;
  6751. this.display = true;
  6752. this.classes = classNames.enter;
  6753. this.$nextTick(async () => {
  6754. this.$emit("enter");
  6755. this.transitionEnded = false;
  6756. this.$emit("afterEnter");
  6757. this.classes = classNames["enter-to"];
  6758. });
  6759. },
  6760. // 动画离场处理
  6761. vueLeave() {
  6762. if (!this.display)
  6763. return;
  6764. const classNames = getClassNames(this.mode);
  6765. this.status = "leave";
  6766. this.$emit("beforeLeave");
  6767. this.classes = classNames.leave;
  6768. this.$nextTick(() => {
  6769. this.transitionEnded = false;
  6770. this.$emit("leave");
  6771. setTimeout(this.onTransitionEnd, this.duration);
  6772. this.classes = classNames["leave-to"];
  6773. });
  6774. },
  6775. // 完成过渡后触发
  6776. onTransitionEnd() {
  6777. if (this.transitionEnded)
  6778. return;
  6779. this.transitionEnded = true;
  6780. this.$emit(this.status === "leave" ? "afterLeave" : "afterEnter");
  6781. if (!this.show && this.display) {
  6782. this.display = false;
  6783. this.inited = false;
  6784. }
  6785. }
  6786. }
  6787. };
  6788. const _sfc_main$1S = {
  6789. name: "u-transition",
  6790. data() {
  6791. return {
  6792. inited: false,
  6793. // 是否显示/隐藏组件
  6794. viewStyle: {},
  6795. // 组件内部的样式
  6796. status: "",
  6797. // 记录组件动画的状态
  6798. transitionEnded: false,
  6799. // 组件是否结束的标记
  6800. display: false,
  6801. // 组件是否展示
  6802. classes: ""
  6803. // 应用的类名
  6804. };
  6805. },
  6806. computed: {
  6807. mergeStyle() {
  6808. const { viewStyle, customStyle } = this;
  6809. return {
  6810. transitionDuration: `${this.duration}ms`,
  6811. // display: `${this.display ? '' : 'none'}`,
  6812. transitionTimingFunction: this.timingFunction,
  6813. // 避免自定义样式影响到动画属性,所以写在viewStyle前面
  6814. ...uni.$u.addStyle(customStyle),
  6815. ...viewStyle
  6816. };
  6817. }
  6818. },
  6819. // 将mixin挂在到组件中,uni.$u.mixin实际上为一个vue格式对象
  6820. mixins: [mpMixin, mixin, transition, props$s],
  6821. watch: {
  6822. show: {
  6823. handler(newVal) {
  6824. newVal ? this.vueEnter() : this.vueLeave();
  6825. },
  6826. // 表示同时监听初始化时的props的show的意思
  6827. immediate: true
  6828. }
  6829. }
  6830. };
  6831. function _sfc_render$1R(_ctx, _cache, $props, $setup, $data, $options) {
  6832. return $data.inited ? (vue.openBlock(), vue.createElementBlock(
  6833. "view",
  6834. {
  6835. key: 0,
  6836. class: vue.normalizeClass(["u-transition", $data.classes]),
  6837. ref: "u-transition",
  6838. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.clickHandler && _ctx.clickHandler(...args)),
  6839. style: vue.normalizeStyle([$options.mergeStyle]),
  6840. onTouchmove: _cache[1] || (_cache[1] = (...args) => _ctx.noop && _ctx.noop(...args))
  6841. },
  6842. [
  6843. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  6844. ],
  6845. 38
  6846. /* CLASS, STYLE, NEED_HYDRATION */
  6847. )) : vue.createCommentVNode("v-if", true);
  6848. }
  6849. const __easycom_1$5 = /* @__PURE__ */ _export_sfc(_sfc_main$1S, [["render", _sfc_render$1R], ["__scopeId", "data-v-5cec8177"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-transition/u-transition.vue"]]);
  6850. const props$r = {
  6851. props: {
  6852. // 是否显示遮罩
  6853. show: {
  6854. type: Boolean,
  6855. default: props$G.overlay.show
  6856. },
  6857. // 层级z-index
  6858. zIndex: {
  6859. type: [String, Number],
  6860. default: props$G.overlay.zIndex
  6861. },
  6862. // 遮罩的过渡时间,单位为ms
  6863. duration: {
  6864. type: [String, Number],
  6865. default: props$G.overlay.duration
  6866. },
  6867. // 不透明度值,当做rgba的第四个参数
  6868. opacity: {
  6869. type: [String, Number],
  6870. default: props$G.overlay.opacity
  6871. }
  6872. }
  6873. };
  6874. const _sfc_main$1R = {
  6875. name: "u-overlay",
  6876. mixins: [mpMixin, mixin, props$r],
  6877. computed: {
  6878. overlayStyle() {
  6879. const style = {
  6880. position: "fixed",
  6881. top: 0,
  6882. left: 0,
  6883. right: 0,
  6884. zIndex: this.zIndex,
  6885. bottom: 0,
  6886. "background-color": `rgba(0, 0, 0, ${this.opacity})`
  6887. };
  6888. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  6889. }
  6890. },
  6891. methods: {
  6892. clickHandler() {
  6893. this.$emit("click");
  6894. }
  6895. }
  6896. };
  6897. function _sfc_render$1Q(_ctx, _cache, $props, $setup, $data, $options) {
  6898. const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_1$5);
  6899. return vue.openBlock(), vue.createBlock(_component_u_transition, {
  6900. show: _ctx.show,
  6901. "custom-class": "u-overlay",
  6902. duration: _ctx.duration,
  6903. "custom-style": $options.overlayStyle,
  6904. onClick: $options.clickHandler
  6905. }, {
  6906. default: vue.withCtx(() => [
  6907. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  6908. ]),
  6909. _: 3
  6910. /* FORWARDED */
  6911. }, 8, ["show", "duration", "custom-style", "onClick"]);
  6912. }
  6913. const __easycom_0$c = /* @__PURE__ */ _export_sfc(_sfc_main$1R, [["render", _sfc_render$1Q], ["__scopeId", "data-v-9112bed9"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-overlay/u-overlay.vue"]]);
  6914. const props$q = {
  6915. props: {
  6916. bgColor: {
  6917. type: String,
  6918. default: props$G.statusBar.bgColor
  6919. }
  6920. }
  6921. };
  6922. const _sfc_main$1Q = {
  6923. name: "u-status-bar",
  6924. mixins: [mpMixin, mixin, props$q],
  6925. data() {
  6926. return {};
  6927. },
  6928. computed: {
  6929. style() {
  6930. const style = {};
  6931. style.height = uni.$u.addUnit(uni.$u.sys().statusBarHeight, "px");
  6932. style.backgroundColor = this.bgColor;
  6933. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  6934. }
  6935. }
  6936. };
  6937. function _sfc_render$1P(_ctx, _cache, $props, $setup, $data, $options) {
  6938. return vue.openBlock(), vue.createElementBlock(
  6939. "view",
  6940. {
  6941. style: vue.normalizeStyle([$options.style]),
  6942. class: "u-status-bar"
  6943. },
  6944. [
  6945. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  6946. ],
  6947. 4
  6948. /* STYLE */
  6949. );
  6950. }
  6951. const __easycom_0$b = /* @__PURE__ */ _export_sfc(_sfc_main$1Q, [["render", _sfc_render$1P], ["__scopeId", "data-v-eb8e0cdd"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-status-bar/u-status-bar.vue"]]);
  6952. const props$p = {
  6953. props: {}
  6954. };
  6955. const _sfc_main$1P = {
  6956. name: "u-safe-bottom",
  6957. mixins: [mpMixin, mixin, props$p],
  6958. data() {
  6959. return {
  6960. safeAreaBottomHeight: 0,
  6961. isNvue: false
  6962. };
  6963. },
  6964. computed: {
  6965. style() {
  6966. const style = {};
  6967. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  6968. }
  6969. },
  6970. mounted() {
  6971. }
  6972. };
  6973. function _sfc_render$1O(_ctx, _cache, $props, $setup, $data, $options) {
  6974. return vue.openBlock(), vue.createElementBlock(
  6975. "view",
  6976. {
  6977. class: vue.normalizeClass(["u-safe-bottom", [!$data.isNvue && "u-safe-area-inset-bottom"]]),
  6978. style: vue.normalizeStyle([$options.style])
  6979. },
  6980. null,
  6981. 6
  6982. /* CLASS, STYLE */
  6983. );
  6984. }
  6985. const __easycom_3$5 = /* @__PURE__ */ _export_sfc(_sfc_main$1P, [["render", _sfc_render$1O], ["__scopeId", "data-v-f3d22cfe"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-safe-bottom/u-safe-bottom.vue"]]);
  6986. const props$o = {
  6987. props: {
  6988. // 是否展示弹窗
  6989. show: {
  6990. type: Boolean,
  6991. default: props$G.popup.show
  6992. },
  6993. // 是否显示遮罩
  6994. overlay: {
  6995. type: Boolean,
  6996. default: props$G.popup.overlay
  6997. },
  6998. // 弹出的方向,可选值为 top bottom right left center
  6999. mode: {
  7000. type: String,
  7001. default: props$G.popup.mode
  7002. },
  7003. // 动画时长,单位ms
  7004. duration: {
  7005. type: [String, Number],
  7006. default: props$G.popup.duration
  7007. },
  7008. // 是否显示关闭图标
  7009. closeable: {
  7010. type: Boolean,
  7011. default: props$G.popup.closeable
  7012. },
  7013. // 自定义遮罩的样式
  7014. overlayStyle: {
  7015. type: [Object, String],
  7016. default: props$G.popup.overlayStyle
  7017. },
  7018. // 点击遮罩是否关闭弹窗
  7019. closeOnClickOverlay: {
  7020. type: Boolean,
  7021. default: props$G.popup.closeOnClickOverlay
  7022. },
  7023. // 层级
  7024. zIndex: {
  7025. type: [String, Number],
  7026. default: props$G.popup.zIndex
  7027. },
  7028. // 是否为iPhoneX留出底部安全距离
  7029. safeAreaInsetBottom: {
  7030. type: Boolean,
  7031. default: props$G.popup.safeAreaInsetBottom
  7032. },
  7033. // 是否留出顶部安全距离(状态栏高度)
  7034. safeAreaInsetTop: {
  7035. type: Boolean,
  7036. default: props$G.popup.safeAreaInsetTop
  7037. },
  7038. // 自定义关闭图标位置,top-left为左上角,top-right为右上角,bottom-left为左下角,bottom-right为右下角
  7039. closeIconPos: {
  7040. type: String,
  7041. default: props$G.popup.closeIconPos
  7042. },
  7043. // 是否显示圆角
  7044. round: {
  7045. type: [Boolean, String, Number],
  7046. default: props$G.popup.round
  7047. },
  7048. // mode=center,也即中部弹出时,是否使用缩放模式
  7049. zoom: {
  7050. type: Boolean,
  7051. default: props$G.popup.zoom
  7052. },
  7053. // 弹窗背景色,设置为transparent可去除白色背景
  7054. bgColor: {
  7055. type: String,
  7056. default: props$G.popup.bgColor
  7057. },
  7058. // 遮罩的透明度,0-1之间
  7059. overlayOpacity: {
  7060. type: [Number, String],
  7061. default: props$G.popup.overlayOpacity
  7062. }
  7063. }
  7064. };
  7065. const _sfc_main$1O = {
  7066. name: "u-popup",
  7067. mixins: [mpMixin, mixin, props$o],
  7068. data() {
  7069. return {
  7070. overlayDuration: this.duration + 50
  7071. };
  7072. },
  7073. watch: {
  7074. show(newValue, oldValue) {
  7075. }
  7076. },
  7077. computed: {
  7078. transitionStyle() {
  7079. const style = {
  7080. zIndex: this.zIndex,
  7081. position: "fixed",
  7082. display: "flex"
  7083. };
  7084. style[this.mode] = 0;
  7085. if (this.mode === "left") {
  7086. return uni.$u.deepMerge(style, {
  7087. bottom: 0,
  7088. top: 0
  7089. });
  7090. } else if (this.mode === "right") {
  7091. return uni.$u.deepMerge(style, {
  7092. bottom: 0,
  7093. top: 0
  7094. });
  7095. } else if (this.mode === "top") {
  7096. return uni.$u.deepMerge(style, {
  7097. left: 0,
  7098. right: 0
  7099. });
  7100. } else if (this.mode === "bottom") {
  7101. return uni.$u.deepMerge(style, {
  7102. left: 0,
  7103. right: 0
  7104. });
  7105. } else if (this.mode === "center") {
  7106. return uni.$u.deepMerge(style, {
  7107. alignItems: "center",
  7108. "justify-content": "center",
  7109. top: 0,
  7110. left: 0,
  7111. right: 0,
  7112. bottom: 0
  7113. });
  7114. }
  7115. },
  7116. contentStyle() {
  7117. const style = {};
  7118. uni.$u.sys();
  7119. if (this.mode !== "center") {
  7120. style.flex = 1;
  7121. }
  7122. if (this.bgColor) {
  7123. style.backgroundColor = this.bgColor;
  7124. }
  7125. if (this.round) {
  7126. const value2 = uni.$u.addUnit(this.round);
  7127. if (this.mode === "top") {
  7128. style.borderBottomLeftRadius = value2;
  7129. style.borderBottomRightRadius = value2;
  7130. } else if (this.mode === "bottom") {
  7131. style.borderTopLeftRadius = value2;
  7132. style.borderTopRightRadius = value2;
  7133. } else if (this.mode === "center") {
  7134. style.borderRadius = value2;
  7135. }
  7136. }
  7137. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  7138. },
  7139. position() {
  7140. if (this.mode === "center") {
  7141. return this.zoom ? "fade-zoom" : "fade";
  7142. }
  7143. if (this.mode === "left") {
  7144. return "slide-left";
  7145. }
  7146. if (this.mode === "right") {
  7147. return "slide-right";
  7148. }
  7149. if (this.mode === "bottom") {
  7150. return "slide-up";
  7151. }
  7152. if (this.mode === "top") {
  7153. return "slide-down";
  7154. }
  7155. }
  7156. },
  7157. methods: {
  7158. // 点击遮罩
  7159. overlayClick() {
  7160. if (this.closeOnClickOverlay) {
  7161. this.$emit("close");
  7162. }
  7163. },
  7164. close(e) {
  7165. this.$emit("close");
  7166. },
  7167. afterEnter() {
  7168. this.$emit("open");
  7169. },
  7170. clickHandler() {
  7171. if (this.mode === "center") {
  7172. this.overlayClick();
  7173. }
  7174. this.$emit("click");
  7175. }
  7176. }
  7177. };
  7178. function _sfc_render$1N(_ctx, _cache, $props, $setup, $data, $options) {
  7179. const _component_u_overlay = resolveEasycom(vue.resolveDynamicComponent("u-overlay"), __easycom_0$c);
  7180. const _component_u_status_bar = resolveEasycom(vue.resolveDynamicComponent("u-status-bar"), __easycom_0$b);
  7181. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  7182. const _component_u_safe_bottom = resolveEasycom(vue.resolveDynamicComponent("u-safe-bottom"), __easycom_3$5);
  7183. const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_1$5);
  7184. return vue.openBlock(), vue.createElementBlock("view", { class: "u-popup" }, [
  7185. _ctx.overlay ? (vue.openBlock(), vue.createBlock(_component_u_overlay, {
  7186. key: 0,
  7187. show: _ctx.show,
  7188. onClick: $options.overlayClick,
  7189. duration: $data.overlayDuration,
  7190. customStyle: _ctx.overlayStyle,
  7191. opacity: _ctx.overlayOpacity
  7192. }, null, 8, ["show", "onClick", "duration", "customStyle", "opacity"])) : vue.createCommentVNode("v-if", true),
  7193. vue.createVNode(_component_u_transition, {
  7194. show: _ctx.show,
  7195. customStyle: $options.transitionStyle,
  7196. mode: $options.position,
  7197. duration: _ctx.duration,
  7198. onAfterEnter: $options.afterEnter,
  7199. onClick: $options.clickHandler
  7200. }, {
  7201. default: vue.withCtx(() => [
  7202. vue.createElementVNode(
  7203. "view",
  7204. {
  7205. class: "u-popup__content",
  7206. style: vue.normalizeStyle([$options.contentStyle]),
  7207. onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => _ctx.noop && _ctx.noop(...args), ["stop"]))
  7208. },
  7209. [
  7210. _ctx.safeAreaInsetTop ? (vue.openBlock(), vue.createBlock(_component_u_status_bar, { key: 0 })) : vue.createCommentVNode("v-if", true),
  7211. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true),
  7212. _ctx.closeable ? (vue.openBlock(), vue.createElementBlock(
  7213. "view",
  7214. {
  7215. key: 1,
  7216. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.close && $options.close(...args), ["stop"])),
  7217. class: vue.normalizeClass(["u-popup__content__close", ["u-popup__content__close--" + _ctx.closeIconPos]]),
  7218. "hover-class": "u-popup__content__close--hover",
  7219. "hover-stay-time": "150"
  7220. },
  7221. [
  7222. vue.createVNode(_component_u_icon, {
  7223. name: "close",
  7224. color: "#909399",
  7225. size: "18",
  7226. bold: ""
  7227. })
  7228. ],
  7229. 2
  7230. /* CLASS */
  7231. )) : vue.createCommentVNode("v-if", true),
  7232. _ctx.safeAreaInsetBottom ? (vue.openBlock(), vue.createBlock(_component_u_safe_bottom, { key: 2 })) : vue.createCommentVNode("v-if", true)
  7233. ],
  7234. 4
  7235. /* STYLE */
  7236. )
  7237. ]),
  7238. _: 3
  7239. /* FORWARDED */
  7240. }, 8, ["show", "customStyle", "mode", "duration", "onAfterEnter", "onClick"])
  7241. ]);
  7242. }
  7243. const __easycom_7 = /* @__PURE__ */ _export_sfc(_sfc_main$1O, [["render", _sfc_render$1N], ["__scopeId", "data-v-05c24e9b"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-popup/u-popup.vue"]]);
  7244. function pickExclude(obj, keys) {
  7245. if (!["[object Object]", "[object File]"].includes(Object.prototype.toString.call(obj))) {
  7246. return {};
  7247. }
  7248. return Object.keys(obj).reduce((prev, key) => {
  7249. if (!keys.includes(key)) {
  7250. prev[key] = obj[key];
  7251. }
  7252. return prev;
  7253. }, {});
  7254. }
  7255. function formatImage(res) {
  7256. return res.tempFiles.map((item) => ({
  7257. ...pickExclude(item, ["path"]),
  7258. type: "image",
  7259. url: item.path,
  7260. thumb: item.path,
  7261. size: item.size
  7262. }));
  7263. }
  7264. function formatVideo(res) {
  7265. return [
  7266. {
  7267. ...pickExclude(res, ["tempFilePath", "thumbTempFilePath", "errMsg"]),
  7268. type: "video",
  7269. url: res.tempFilePath,
  7270. thumb: res.thumbTempFilePath,
  7271. size: res.size
  7272. }
  7273. ];
  7274. }
  7275. function chooseFile({
  7276. accept,
  7277. multiple,
  7278. capture,
  7279. compressed,
  7280. maxDuration,
  7281. sizeType,
  7282. camera,
  7283. maxCount
  7284. }) {
  7285. return new Promise((resolve, reject) => {
  7286. switch (accept) {
  7287. case "image":
  7288. uni.chooseImage({
  7289. count: multiple ? Math.min(maxCount, 9) : 1,
  7290. sourceType: capture,
  7291. sizeType,
  7292. success: (res) => resolve(formatImage(res)),
  7293. fail: reject
  7294. });
  7295. break;
  7296. case "video":
  7297. uni.chooseVideo({
  7298. sourceType: capture,
  7299. compressed,
  7300. maxDuration,
  7301. camera,
  7302. success: (res) => resolve(formatVideo(res)),
  7303. fail: reject
  7304. });
  7305. break;
  7306. }
  7307. });
  7308. }
  7309. const mixinUp = {
  7310. watch: {
  7311. // 监听accept的变化,判断是否符合个平台要求
  7312. // 只有微信小程序才支持选择媒体,文件类型,所以这里做一个判断提示
  7313. accept: {
  7314. immediate: true,
  7315. handler(val) {
  7316. if (val === "all" || val === "media") {
  7317. uni.$u.error("只有微信小程序才支持把accept配置为all、media之一");
  7318. }
  7319. if (val === "file") {
  7320. uni.$u.error("只有微信小程序和H5(HX2.9.9)才支持把accept配置为file");
  7321. }
  7322. }
  7323. }
  7324. }
  7325. };
  7326. const props$n = {
  7327. props: {
  7328. // 接受的文件类型, 可选值为all media image file video
  7329. accept: {
  7330. type: String,
  7331. default: props$G.upload.accept
  7332. },
  7333. // 图片或视频拾取模式,当accept为image类型时设置capture可选额外camera可以直接调起摄像头
  7334. capture: {
  7335. type: [String, Array],
  7336. default: props$G.upload.capture
  7337. },
  7338. // 当accept为video时生效,是否压缩视频,默认为true
  7339. compressed: {
  7340. type: Boolean,
  7341. default: props$G.upload.compressed
  7342. },
  7343. // 当accept为video时生效,可选值为back或front
  7344. camera: {
  7345. type: String,
  7346. default: props$G.upload.camera
  7347. },
  7348. // 当accept为video时生效,拍摄视频最长拍摄时间,单位秒
  7349. maxDuration: {
  7350. type: Number,
  7351. default: props$G.upload.maxDuration
  7352. },
  7353. // 上传区域的图标,只能内置图标
  7354. uploadIcon: {
  7355. type: String,
  7356. default: props$G.upload.uploadIcon
  7357. },
  7358. // 上传区域的图标的颜色,默认
  7359. uploadIconColor: {
  7360. type: String,
  7361. default: props$G.upload.uploadIconColor
  7362. },
  7363. // 是否开启文件读取前事件
  7364. useBeforeRead: {
  7365. type: Boolean,
  7366. default: props$G.upload.useBeforeRead
  7367. },
  7368. // 读取后的处理函数
  7369. afterRead: {
  7370. type: Function,
  7371. default: null
  7372. },
  7373. // 读取前的处理函数
  7374. beforeRead: {
  7375. type: Function,
  7376. default: null
  7377. },
  7378. // 是否显示组件自带的图片预览功能
  7379. previewFullImage: {
  7380. type: Boolean,
  7381. default: props$G.upload.previewFullImage
  7382. },
  7383. // 最大上传数量
  7384. maxCount: {
  7385. type: [String, Number],
  7386. default: props$G.upload.maxCount
  7387. },
  7388. // 是否启用
  7389. disabled: {
  7390. type: Boolean,
  7391. default: props$G.upload.disabled
  7392. },
  7393. // 预览上传的图片时的裁剪模式,和image组件mode属性一致
  7394. imageMode: {
  7395. type: String,
  7396. default: props$G.upload.imageMode
  7397. },
  7398. // 标识符,可以在回调函数的第二项参数中获取
  7399. name: {
  7400. type: String,
  7401. default: props$G.upload.name
  7402. },
  7403. // 所选的图片的尺寸, 可选值为original compressed
  7404. sizeType: {
  7405. type: Array,
  7406. default: props$G.upload.sizeType
  7407. },
  7408. // 是否开启图片多选,部分安卓机型不支持
  7409. multiple: {
  7410. type: Boolean,
  7411. default: props$G.upload.multiple
  7412. },
  7413. // 是否展示删除按钮
  7414. deletable: {
  7415. type: Boolean,
  7416. default: props$G.upload.deletable
  7417. },
  7418. // 文件大小限制,单位为byte
  7419. maxSize: {
  7420. type: [String, Number],
  7421. default: props$G.upload.maxSize
  7422. },
  7423. // 显示已上传的文件列表
  7424. fileList: {
  7425. type: Array,
  7426. default: props$G.upload.fileList
  7427. },
  7428. // 上传区域的提示文字
  7429. uploadText: {
  7430. type: String,
  7431. default: props$G.upload.uploadText
  7432. },
  7433. // 内部预览图片区域和选择图片按钮的区域宽度
  7434. width: {
  7435. type: [String, Number],
  7436. default: props$G.upload.width
  7437. },
  7438. // 内部预览图片区域和选择图片按钮的区域高度
  7439. height: {
  7440. type: [String, Number],
  7441. default: props$G.upload.height
  7442. },
  7443. // 是否在上传完成后展示预览图
  7444. previewImage: {
  7445. type: Boolean,
  7446. default: props$G.upload.previewImage
  7447. }
  7448. }
  7449. };
  7450. const _sfc_main$1N = {
  7451. name: "u-upload",
  7452. mixins: [mpMixin, mixin, mixinUp, props$n],
  7453. data() {
  7454. return {
  7455. lists: [],
  7456. isInCount: true
  7457. };
  7458. },
  7459. watch: {
  7460. // 监听文件列表的变化,重新整理内部数据
  7461. fileList: {
  7462. immediate: true,
  7463. handler() {
  7464. this.formatFileList();
  7465. },
  7466. immediate: true,
  7467. deep: true
  7468. }
  7469. },
  7470. emits: ["error", "beforeRead", "oversize", "afterRead", "delete", "clickPreview"],
  7471. methods: {
  7472. formatFileList() {
  7473. const {
  7474. fileList = [],
  7475. maxCount
  7476. } = this;
  7477. const lists = fileList.map(
  7478. (item) => Object.assign(Object.assign({}, item), {
  7479. // 如果item.url为本地选择的blob文件的话,无法判断其为video还是image,此处优先通过accept做判断处理
  7480. isImage: this.accept === "image" || uni.$u.test.image(item.url || item.thumb),
  7481. isVideo: this.accept === "video" || uni.$u.test.video(item.url || item.thumb),
  7482. deletable: typeof item.deletable === "boolean" ? item.deletable : this.deletable
  7483. })
  7484. );
  7485. this.lists = lists;
  7486. this.isInCount = lists.length < maxCount;
  7487. },
  7488. chooseFile() {
  7489. const {
  7490. maxCount,
  7491. multiple,
  7492. lists,
  7493. disabled
  7494. } = this;
  7495. if (disabled)
  7496. return;
  7497. let capture;
  7498. try {
  7499. capture = uni.$u.test.array(this.capture) ? this.capture : this.capture.split(",");
  7500. } catch (e) {
  7501. capture = [];
  7502. }
  7503. chooseFile(
  7504. Object.assign({
  7505. accept: this.accept,
  7506. multiple: this.multiple,
  7507. capture,
  7508. compressed: this.compressed,
  7509. maxDuration: this.maxDuration,
  7510. sizeType: this.sizeType,
  7511. camera: this.camera
  7512. }, {
  7513. maxCount: maxCount - lists.length
  7514. })
  7515. ).then((res) => {
  7516. this.onBeforeRead(multiple ? res : res[0]);
  7517. }).catch((error2) => {
  7518. this.$emit("error", error2);
  7519. });
  7520. },
  7521. // 文件读取之前
  7522. onBeforeRead(file) {
  7523. const {
  7524. beforeRead,
  7525. useBeforeRead
  7526. } = this;
  7527. let res = true;
  7528. if (uni.$u.test.func(beforeRead)) {
  7529. res = beforeRead(file, this.getDetail());
  7530. }
  7531. if (useBeforeRead) {
  7532. res = new Promise((resolve, reject) => {
  7533. this.$emit(
  7534. "beforeRead",
  7535. Object.assign(Object.assign({
  7536. file
  7537. }, this.getDetail()), {
  7538. callback: (ok) => {
  7539. ok ? resolve() : reject();
  7540. }
  7541. })
  7542. );
  7543. });
  7544. }
  7545. if (!res) {
  7546. return;
  7547. }
  7548. if (uni.$u.test.promise(res)) {
  7549. res.then((data) => this.onAfterRead(data || file));
  7550. } else {
  7551. this.onAfterRead(file);
  7552. }
  7553. },
  7554. getDetail(index2) {
  7555. return {
  7556. name: this.name,
  7557. index: index2 == null ? this.fileList.length : index2
  7558. };
  7559. },
  7560. onAfterRead(file) {
  7561. const {
  7562. maxSize,
  7563. afterRead
  7564. } = this;
  7565. const oversize = Array.isArray(file) ? file.some((item) => item.size > maxSize) : file.size > maxSize;
  7566. if (oversize) {
  7567. this.$emit("oversize", Object.assign({
  7568. file
  7569. }, this.getDetail()));
  7570. return;
  7571. }
  7572. if (typeof afterRead === "function") {
  7573. afterRead(file, this.getDetail());
  7574. }
  7575. this.$emit("afterRead", Object.assign({
  7576. file
  7577. }, this.getDetail()));
  7578. },
  7579. deleteItem(index2) {
  7580. this.$emit(
  7581. "delete",
  7582. Object.assign(Object.assign({}, this.getDetail(index2)), {
  7583. file: this.fileList[index2]
  7584. })
  7585. );
  7586. },
  7587. // 预览图片
  7588. onPreviewImage(item) {
  7589. if (!item.isImage || !this.previewFullImage)
  7590. return;
  7591. uni.previewImage({
  7592. // 先filter找出为图片的item,再返回filter结果中的图片url
  7593. urls: this.lists.filter((item2) => this.accept === "image" || uni.$u.test.image(item2.url || item2.thumb)).map((item2) => item2.url || item2.thumb),
  7594. current: item.url || item.thumb,
  7595. fail() {
  7596. uni.$u.toast("预览图片失败");
  7597. }
  7598. });
  7599. },
  7600. onPreviewVideo(event) {
  7601. if (!this.data.previewFullImage)
  7602. return;
  7603. const {
  7604. index: index2
  7605. } = event.currentTarget.dataset;
  7606. const {
  7607. lists
  7608. } = this.data;
  7609. wx.previewMedia({
  7610. sources: lists.filter((item) => isVideoFile(item)).map(
  7611. (item) => Object.assign(Object.assign({}, item), {
  7612. type: "video"
  7613. })
  7614. ),
  7615. current: index2,
  7616. fail() {
  7617. uni.$u.toast("预览视频失败");
  7618. }
  7619. });
  7620. },
  7621. onClickPreview(event) {
  7622. const {
  7623. index: index2
  7624. } = event.currentTarget.dataset;
  7625. const item = this.data.lists[index2];
  7626. this.$emit(
  7627. "clickPreview",
  7628. Object.assign(Object.assign({}, item), this.getDetail(index2))
  7629. );
  7630. }
  7631. }
  7632. };
  7633. function _sfc_render$1M(_ctx, _cache, $props, $setup, $data, $options) {
  7634. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  7635. const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$e);
  7636. return vue.openBlock(), vue.createElementBlock(
  7637. "view",
  7638. {
  7639. class: "u-upload",
  7640. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)])
  7641. },
  7642. [
  7643. vue.createElementVNode("view", { class: "u-upload__wrap" }, [
  7644. _ctx.previewImage ? (vue.openBlock(true), vue.createElementBlock(
  7645. vue.Fragment,
  7646. { key: 0 },
  7647. vue.renderList($data.lists, (item, index2) => {
  7648. return vue.openBlock(), vue.createElementBlock("view", {
  7649. class: "u-upload__wrap__preview",
  7650. key: index2
  7651. }, [
  7652. item.isImage || item.type && item.type === "image" ? (vue.openBlock(), vue.createElementBlock("image", {
  7653. key: 0,
  7654. src: item.thumb || item.url,
  7655. mode: _ctx.imageMode,
  7656. class: "u-upload__wrap__preview__image",
  7657. onClick: ($event) => $options.onPreviewImage(item),
  7658. style: vue.normalizeStyle([{
  7659. width: _ctx.$u.addUnit(_ctx.width),
  7660. height: _ctx.$u.addUnit(_ctx.height)
  7661. }])
  7662. }, null, 12, ["src", "mode", "onClick"])) : (vue.openBlock(), vue.createElementBlock("view", {
  7663. key: 1,
  7664. class: "u-upload__wrap__preview__other"
  7665. }, [
  7666. vue.createVNode(_component_u_icon, {
  7667. color: "#80CBF9",
  7668. size: "26",
  7669. name: item.isVideo || item.type && item.type === "video" ? "movie" : "folder"
  7670. }, null, 8, ["name"]),
  7671. vue.createElementVNode(
  7672. "text",
  7673. { class: "u-upload__wrap__preview__other__text" },
  7674. vue.toDisplayString(item.isVideo || item.type && item.type === "video" ? "视频" : "文件"),
  7675. 1
  7676. /* TEXT */
  7677. )
  7678. ])),
  7679. item.status === "uploading" || item.status === "failed" ? (vue.openBlock(), vue.createElementBlock("view", {
  7680. key: 2,
  7681. class: "u-upload__status"
  7682. }, [
  7683. vue.createElementVNode("view", { class: "u-upload__status__icon" }, [
  7684. item.status === "failed" ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  7685. key: 0,
  7686. name: "close-circle",
  7687. color: "#ffffff",
  7688. size: "25"
  7689. })) : (vue.openBlock(), vue.createBlock(_component_u_loading_icon, {
  7690. key: 1,
  7691. size: "22",
  7692. mode: "circle",
  7693. color: "#ffffff"
  7694. }))
  7695. ]),
  7696. item.message ? (vue.openBlock(), vue.createElementBlock(
  7697. "text",
  7698. {
  7699. key: 0,
  7700. class: "u-upload__status__message"
  7701. },
  7702. vue.toDisplayString(item.message),
  7703. 1
  7704. /* TEXT */
  7705. )) : vue.createCommentVNode("v-if", true)
  7706. ])) : vue.createCommentVNode("v-if", true),
  7707. item.status !== "uploading" && (_ctx.deletable || item.deletable) ? (vue.openBlock(), vue.createElementBlock("view", {
  7708. key: 3,
  7709. class: "u-upload__deletable",
  7710. onClick: vue.withModifiers(($event) => $options.deleteItem(index2), ["stop"])
  7711. }, [
  7712. vue.createElementVNode("view", { class: "u-upload__deletable__icon" }, [
  7713. vue.createVNode(_component_u_icon, {
  7714. name: "close",
  7715. color: "#ffffff",
  7716. size: "10"
  7717. })
  7718. ])
  7719. ], 8, ["onClick"])) : vue.createCommentVNode("v-if", true),
  7720. item.status === "success" ? (vue.openBlock(), vue.createElementBlock("view", {
  7721. key: 4,
  7722. class: "u-upload__success"
  7723. }, [
  7724. vue.createElementVNode("view", { class: "u-upload__success__icon" }, [
  7725. vue.createVNode(_component_u_icon, {
  7726. name: "checkmark",
  7727. color: "#ffffff",
  7728. size: "12"
  7729. })
  7730. ])
  7731. ])) : vue.createCommentVNode("v-if", true)
  7732. ]);
  7733. }),
  7734. 128
  7735. /* KEYED_FRAGMENT */
  7736. )) : vue.createCommentVNode("v-if", true),
  7737. $data.isInCount ? (vue.openBlock(), vue.createElementBlock(
  7738. vue.Fragment,
  7739. { key: 1 },
  7740. [
  7741. _ctx.$slots.default || _ctx.$slots.$default ? (vue.openBlock(), vue.createElementBlock("view", {
  7742. key: 0,
  7743. onClick: _cache[0] || (_cache[0] = (...args) => $options.chooseFile && $options.chooseFile(...args))
  7744. }, [
  7745. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  7746. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  7747. key: 1,
  7748. class: vue.normalizeClass(["u-upload__button", [_ctx.disabled && "u-upload__button--disabled"]]),
  7749. "hover-class": !_ctx.disabled ? "u-upload__button--hover" : "",
  7750. "hover-stay-time": "150",
  7751. onClick: _cache[1] || (_cache[1] = (...args) => $options.chooseFile && $options.chooseFile(...args)),
  7752. style: vue.normalizeStyle([{
  7753. width: _ctx.$u.addUnit(_ctx.width),
  7754. height: _ctx.$u.addUnit(_ctx.height)
  7755. }])
  7756. }, [
  7757. vue.createVNode(_component_u_icon, {
  7758. name: _ctx.uploadIcon,
  7759. size: "26",
  7760. color: _ctx.uploadIconColor
  7761. }, null, 8, ["name", "color"]),
  7762. _ctx.uploadText ? (vue.openBlock(), vue.createElementBlock(
  7763. "text",
  7764. {
  7765. key: 0,
  7766. class: "u-upload__button__text"
  7767. },
  7768. vue.toDisplayString(_ctx.uploadText),
  7769. 1
  7770. /* TEXT */
  7771. )) : vue.createCommentVNode("v-if", true)
  7772. ], 14, ["hover-class"]))
  7773. ],
  7774. 64
  7775. /* STABLE_FRAGMENT */
  7776. )) : vue.createCommentVNode("v-if", true)
  7777. ])
  7778. ],
  7779. 4
  7780. /* STYLE */
  7781. );
  7782. }
  7783. const __easycom_0$a = /* @__PURE__ */ _export_sfc(_sfc_main$1N, [["render", _sfc_render$1M], ["__scopeId", "data-v-c8491d64"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-upload/u-upload.vue"]]);
  7784. const baseUrl = "https://bpi.shuhi.com";
  7785. function initRequest() {
  7786. formatAppLog("log", "at config/request.js:6", "初始化了 http 请求代码");
  7787. uni.$u.http.setConfig((config2) => {
  7788. config2.baseURL = baseUrl;
  7789. config2.custom.toast = true;
  7790. config2.sslVerify = false;
  7791. return config2;
  7792. });
  7793. uni.$u.http.interceptors.request.use(
  7794. (config2) => {
  7795. config2.data = config2.data || {};
  7796. let token = uni.getStorageSync("token");
  7797. config2.header.Authorization = token ? `Bearer ${token}` : "";
  7798. return config2;
  7799. },
  7800. (config2) => {
  7801. return Promise.reject(config2);
  7802. }
  7803. );
  7804. uni.$u.http.interceptors.response.use(
  7805. (response) => {
  7806. var _a;
  7807. const data = response.data;
  7808. const custom = (_a = response.config) == null ? void 0 : _a.custom;
  7809. if (data.code !== 200) {
  7810. if (data.code === 401) {
  7811. uni.$u.toast(data.msg || "身份认证失败,请先登录");
  7812. uni.removeStorageSync("token");
  7813. setTimeout(() => {
  7814. uni.$u.route({
  7815. type: "reLaunch",
  7816. url: "/pages/login/login"
  7817. // 跳转到登录页
  7818. });
  7819. }, 1e3);
  7820. } else {
  7821. if (custom.toast !== false) {
  7822. uni.$u.toast(data.msg);
  7823. }
  7824. return data;
  7825. }
  7826. }
  7827. return data;
  7828. },
  7829. (response) => {
  7830. return Promise.reject(response);
  7831. }
  7832. );
  7833. }
  7834. const _sfc_main$1M = {
  7835. __name: "index",
  7836. props: {
  7837. filename: {
  7838. type: [Array, String],
  7839. default: () => []
  7840. },
  7841. url: {
  7842. type: String
  7843. },
  7844. notFile: {
  7845. type: Boolean,
  7846. default: false
  7847. },
  7848. tips: {
  7849. type: String
  7850. },
  7851. disabled: {
  7852. type: Boolean,
  7853. default: false
  7854. },
  7855. isUpdate: {
  7856. type: Boolean,
  7857. default: false
  7858. },
  7859. loading: {
  7860. type: Boolean,
  7861. default: false
  7862. }
  7863. },
  7864. emits: ["update:filename", "update:keyValue", "success", "update:loading"],
  7865. setup(__props, { expose: __expose, emit: __emit }) {
  7866. __expose();
  7867. const emit2 = __emit;
  7868. const props2 = __props;
  7869. const fileList = vue.ref([]);
  7870. vue.watch(() => props2.filename, (filename) => {
  7871. if (!filename)
  7872. return fileList.value = [];
  7873. if (typeof filename == "string") {
  7874. fileList.value = filename.split(",").map((v) => ({
  7875. url: baseUrl + v
  7876. }));
  7877. } else {
  7878. fileList.value = filename && filename.length > 0 ? filename.map((v) => ({
  7879. url: v.url || v
  7880. })) : [];
  7881. }
  7882. }, {
  7883. immediate: true,
  7884. deep: true
  7885. });
  7886. const afterRead = async (e) => {
  7887. const {
  7888. file
  7889. } = e;
  7890. fileList.value.push({
  7891. ...file,
  7892. status: "uploading",
  7893. message: "上传中..."
  7894. });
  7895. emit2("update:loading", true);
  7896. const result = await uploadFilePromise(file.url);
  7897. formatAppLog("log", "at components/cy-upload/index.vue:73", result, "result");
  7898. fileList.value.forEach((v, index2) => {
  7899. if (index2 == fileList.value.length - 1) {
  7900. v.url = result.url;
  7901. v.status = "success";
  7902. v.message = "";
  7903. }
  7904. });
  7905. formatAppLog("log", "at components/cy-upload/index.vue:82", fileList.value, "fileList.value");
  7906. emit2("update:filename", fileList.value.map((v) => v.url));
  7907. emit2("success", result);
  7908. emit2("update:loading", false);
  7909. };
  7910. const deletePic = (event) => {
  7911. fileList.value.splice(event.index, 1);
  7912. };
  7913. const uploadFilePromise = (url2, baseStr = "/app/common/upload") => {
  7914. let token = uni.getStorageSync("token");
  7915. return new Promise((resolve, reject) => {
  7916. uni.uploadFile({
  7917. url: baseUrl + baseStr,
  7918. // 图片上传地址
  7919. filePath: url2,
  7920. name: "file",
  7921. header: {
  7922. "Authorization": token
  7923. },
  7924. success: (res) => {
  7925. let respic = JSON.parse(res.data);
  7926. resolve(respic);
  7927. }
  7928. });
  7929. });
  7930. };
  7931. const __returned__ = { emit: emit2, props: props2, fileList, afterRead, deletePic, uploadFilePromise, watch: vue.watch, ref: vue.ref, get baseUrl() {
  7932. return baseUrl;
  7933. } };
  7934. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  7935. return __returned__;
  7936. }
  7937. };
  7938. function _sfc_render$1L(_ctx, _cache, $props, $setup, $data, $options) {
  7939. const _component_u_upload = resolveEasycom(vue.resolveDynamicComponent("u-upload"), __easycom_0$a);
  7940. return vue.openBlock(), vue.createElementBlock(
  7941. vue.Fragment,
  7942. null,
  7943. [
  7944. vue.createVNode(_component_u_upload, vue.mergeProps(_ctx.$attrs, {
  7945. fileList: $setup.fileList,
  7946. onAfterRead: $setup.afterRead,
  7947. onDelete: $setup.deletePic,
  7948. notFile: $props.notFile,
  7949. disabled: $props.disabled
  7950. }), null, 16, ["fileList", "notFile", "disabled"]),
  7951. $props.tips ? (vue.openBlock(), vue.createElementBlock(
  7952. "view",
  7953. {
  7954. key: 0,
  7955. class: "tips"
  7956. },
  7957. vue.toDisplayString($props.tips),
  7958. 1
  7959. /* TEXT */
  7960. )) : vue.createCommentVNode("v-if", true)
  7961. ],
  7962. 64
  7963. /* STABLE_FRAGMENT */
  7964. );
  7965. }
  7966. const cyUpload = /* @__PURE__ */ _export_sfc(_sfc_main$1M, [["render", _sfc_render$1L], ["__scopeId", "data-v-5002576b"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/components/cy-upload/index.vue"]]);
  7967. const _sfc_main$1L = {
  7968. __name: "feedbackPopup",
  7969. emits: ["submit"],
  7970. setup(__props, { expose: __expose, emit: __emit }) {
  7971. const show = vue.ref(false);
  7972. const emit2 = __emit;
  7973. const formRef = vue.ref(null);
  7974. const submitting = vue.ref(false);
  7975. const loading = vue.ref(false);
  7976. const formData = vue.reactive({
  7977. feedbackContent: "",
  7978. imgUrl: [],
  7979. isbn: ""
  7980. });
  7981. const rules2 = {
  7982. feedbackContent: [
  7983. {
  7984. required: true,
  7985. message: "请输入反馈信息",
  7986. trigger: ["blur", "change"]
  7987. }
  7988. ]
  7989. };
  7990. function open2(data) {
  7991. show.value = true;
  7992. formData.isbn = data.isbn;
  7993. }
  7994. function handleCancel() {
  7995. resetForm();
  7996. show.value = false;
  7997. }
  7998. async function handleConfirm() {
  7999. var _a;
  8000. (_a = formRef.value) == null ? void 0 : _a.validate().then((res) => {
  8001. submitting.value = true;
  8002. let data = JSON.parse(JSON.stringify(formData));
  8003. data.imgUrl = data.imgUrl.join(",");
  8004. uni.$u.http.post("/app/feedback/add", data).then((res2) => {
  8005. if (res2.code == 200) {
  8006. uni.showToast({
  8007. title: "反馈已提交",
  8008. icon: "success"
  8009. });
  8010. emit2("submit", formData);
  8011. show.value = false;
  8012. } else {
  8013. uni.$u.toast(res2.msg);
  8014. }
  8015. }).finally(() => {
  8016. submitting.value = false;
  8017. });
  8018. });
  8019. }
  8020. function resetForm() {
  8021. var _a;
  8022. formData.feedbackContent = "";
  8023. formData.imgUrl = "";
  8024. (_a = formRef.value) == null ? void 0 : _a.resetFields();
  8025. }
  8026. __expose({
  8027. open: open2
  8028. });
  8029. const __returned__ = { show, emit: emit2, formRef, submitting, loading, formData, rules: rules2, open: open2, handleCancel, handleConfirm, resetForm, cyUpload, ref: vue.ref, reactive: vue.reactive };
  8030. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  8031. return __returned__;
  8032. }
  8033. };
  8034. function _sfc_render$1K(_ctx, _cache, $props, $setup, $data, $options) {
  8035. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  8036. const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_1$a);
  8037. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  8038. const _component_u_form = resolveEasycom(vue.resolveDynamicComponent("u-form"), __easycom_2$5);
  8039. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  8040. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_7);
  8041. return vue.openBlock(), vue.createBlock(_component_u_popup, {
  8042. mode: "center",
  8043. show: $setup.show,
  8044. onClose: $setup.handleCancel,
  8045. closeOnClickOverlay: false
  8046. }, {
  8047. default: vue.withCtx(() => [
  8048. vue.createElementVNode("view", { class: "popup-container" }, [
  8049. vue.createVNode(_component_u_form, {
  8050. ref: "formRef",
  8051. model: $setup.formData,
  8052. rules: $setup.rules,
  8053. labelPosition: "top",
  8054. labelWidth: "100%",
  8055. "error-type": "toast"
  8056. }, {
  8057. default: vue.withCtx(() => [
  8058. vue.createCommentVNode(" 反馈信息 "),
  8059. vue.createVNode(_component_u_form_item, {
  8060. label: "反馈图书信息",
  8061. prop: "feedbackContent",
  8062. borderBottom: true
  8063. }, {
  8064. default: vue.withCtx(() => [
  8065. vue.createVNode(_component_u_input, {
  8066. modelValue: $setup.formData.feedbackContent,
  8067. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.formData.feedbackContent = $event),
  8068. type: "textarea",
  8069. placeholder: "请输入反馈信息",
  8070. height: "100"
  8071. }, null, 8, ["modelValue"])
  8072. ]),
  8073. _: 1
  8074. /* STABLE */
  8075. }),
  8076. vue.createCommentVNode(" 图片上传 "),
  8077. vue.createVNode(_component_u_form_item, {
  8078. label: "上传照片",
  8079. prop: "imgUrl",
  8080. borderBottom: false
  8081. }, {
  8082. default: vue.withCtx(() => [
  8083. vue.createVNode($setup["cyUpload"], {
  8084. filename: $setup.formData.imgUrl,
  8085. "onUpdate:filename": _cache[1] || (_cache[1] = ($event) => $setup.formData.imgUrl = $event),
  8086. multiple: "",
  8087. maxCount: 4,
  8088. loading: $setup.loading
  8089. }, {
  8090. default: vue.withCtx(() => [
  8091. vue.createElementVNode("view", { class: "upload-slot" }, [
  8092. vue.createVNode(_component_u_icon, {
  8093. name: "plus",
  8094. size: "30"
  8095. }),
  8096. vue.createElementVNode("text", { class: "upload-text" }, "上传照片")
  8097. ])
  8098. ]),
  8099. _: 1
  8100. /* STABLE */
  8101. }, 8, ["filename", "loading"])
  8102. ]),
  8103. _: 1
  8104. /* STABLE */
  8105. })
  8106. ]),
  8107. _: 1
  8108. /* STABLE */
  8109. }, 8, ["model"]),
  8110. vue.createCommentVNode(" 按钮组 "),
  8111. vue.createElementVNode("view", { class: "button-group" }, [
  8112. vue.createVNode(_component_u_button, {
  8113. type: "info",
  8114. text: "取消",
  8115. plain: true,
  8116. onClick: $setup.handleCancel,
  8117. disabled: $setup.submitting
  8118. }, null, 8, ["disabled"]),
  8119. vue.createVNode(_component_u_button, {
  8120. type: "primary",
  8121. text: "确认",
  8122. onClick: $setup.handleConfirm,
  8123. loading: $setup.submitting,
  8124. disabled: $setup.loading
  8125. }, null, 8, ["loading", "disabled"])
  8126. ])
  8127. ])
  8128. ]),
  8129. _: 1
  8130. /* STABLE */
  8131. }, 8, ["show"]);
  8132. }
  8133. const FeedbackPopup = /* @__PURE__ */ _export_sfc(_sfc_main$1L, [["render", _sfc_render$1K], ["__scopeId", "data-v-0265fb8a"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/book/components/feedbackPopup.vue"]]);
  8134. const _sfc_main$1K = {
  8135. __name: "index",
  8136. setup(__props, { expose: __expose }) {
  8137. __expose();
  8138. const showFeedback = vue.ref(null);
  8139. function handleFeedbackSubmit(data) {
  8140. formatAppLog("log", "at pages/book/index.vue:44", "反馈数据:", data);
  8141. }
  8142. const searchText = vue.ref("");
  8143. const bookList = vue.ref([]);
  8144. async function handleSearch() {
  8145. if (!searchText.value) {
  8146. uni.showToast({
  8147. title: "请输入ISBN",
  8148. icon: "none"
  8149. });
  8150. return;
  8151. }
  8152. await getSimpleBookInfoByIsbn(searchText.value);
  8153. }
  8154. async function getSimpleBookInfoByIsbn(isbn) {
  8155. uni.$u.http.get(`/app/book/getSimpleBookInfoByIsbn/${isbn}`).then((res) => {
  8156. if (res.code == 200) {
  8157. let bool = bookList.value.some((v) => v.isbn == isbn);
  8158. if (!bool) {
  8159. bookList.value.push(res.data);
  8160. }
  8161. } else {
  8162. uni.$u.toast(res.msg);
  8163. }
  8164. });
  8165. }
  8166. function scanCode() {
  8167. uni.scanCode({
  8168. scanType: ["barCode"],
  8169. success: (res) => {
  8170. searchText.value = res.result;
  8171. getSimpleBookInfoByIsbn(res.result);
  8172. },
  8173. fail: () => {
  8174. uni.showToast({
  8175. title: "扫码失败",
  8176. icon: "none"
  8177. });
  8178. }
  8179. });
  8180. }
  8181. function editBook(book) {
  8182. var _a;
  8183. (_a = showFeedback.value) == null ? void 0 : _a.open(book);
  8184. }
  8185. const { unregister } = uni.$u.useEventListener((e) => {
  8186. searchText.value = e.barcode;
  8187. handleSearch();
  8188. });
  8189. vue.onUnmounted(() => {
  8190. unregister();
  8191. });
  8192. const __returned__ = { showFeedback, handleFeedbackSubmit, searchText, bookList, handleSearch, getSimpleBookInfoByIsbn, scanCode, editBook, unregister, ref: vue.ref, onUnmounted: vue.onUnmounted, FeedbackPopup };
  8193. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  8194. return __returned__;
  8195. }
  8196. };
  8197. function _sfc_render$1J(_ctx, _cache, $props, $setup, $data, $options) {
  8198. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  8199. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$4);
  8200. return vue.openBlock(), vue.createElementBlock("view", {
  8201. class: "book-list",
  8202. style: { "padding": "0" }
  8203. }, [
  8204. vue.createCommentVNode(" 搜索框 "),
  8205. vue.createElementVNode("view", { class: "search-header" }, [
  8206. vue.createElementVNode("view", { class: "search-box" }, [
  8207. vue.createVNode(_component_u_icon, {
  8208. style: { "margin-right": "16rpx" },
  8209. name: "scan",
  8210. size: "30",
  8211. color: "#ffffff",
  8212. onClick: $setup.scanCode
  8213. }),
  8214. vue.createVNode(_component_u_search, {
  8215. height: "80rpx",
  8216. modelValue: $setup.searchText,
  8217. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchText = $event),
  8218. placeholder: "请输入ISBN",
  8219. showAction: false,
  8220. clearabled: true,
  8221. onSearch: $setup.handleSearch,
  8222. bgColor: "#ffffff"
  8223. }, null, 8, ["modelValue"])
  8224. ])
  8225. ]),
  8226. vue.createCommentVNode(" 搜索结果列表 "),
  8227. $setup.bookList.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  8228. key: 0,
  8229. class: "book-list"
  8230. }, [
  8231. (vue.openBlock(true), vue.createElementBlock(
  8232. vue.Fragment,
  8233. null,
  8234. vue.renderList($setup.bookList, (book, index2) => {
  8235. return vue.openBlock(), vue.createElementBlock("view", {
  8236. class: "book-item",
  8237. key: index2
  8238. }, [
  8239. vue.createElementVNode("view", { class: "book-info" }, [
  8240. vue.createElementVNode("image", {
  8241. class: "book-image",
  8242. src: book.cover,
  8243. mode: "aspectFill"
  8244. }, null, 8, ["src"]),
  8245. vue.createElementVNode("view", { class: "book-details" }, [
  8246. vue.createElementVNode(
  8247. "text",
  8248. { class: "book-title" },
  8249. vue.toDisplayString(book.bookName),
  8250. 1
  8251. /* TEXT */
  8252. ),
  8253. vue.createElementVNode(
  8254. "text",
  8255. { class: "book-isbn" },
  8256. "ISBN: " + vue.toDisplayString(book.isbn),
  8257. 1
  8258. /* TEXT */
  8259. ),
  8260. vue.createElementVNode(
  8261. "text",
  8262. { class: "book-price" },
  8263. "定价: " + vue.toDisplayString(book.price),
  8264. 1
  8265. /* TEXT */
  8266. ),
  8267. vue.createElementVNode(
  8268. "text",
  8269. { class: "book-set" },
  8270. "套装: " + vue.toDisplayString(book.suit == 1 ? "是" : "否"),
  8271. 1
  8272. /* TEXT */
  8273. )
  8274. ])
  8275. ]),
  8276. vue.createElementVNode("view", { class: "book-action" }, [
  8277. vue.createVNode(_component_u_icon, {
  8278. name: "edit-pen",
  8279. size: "30",
  8280. color: "#4cd964",
  8281. onClick: ($event) => $setup.editBook(book)
  8282. }, null, 8, ["onClick"])
  8283. ])
  8284. ]);
  8285. }),
  8286. 128
  8287. /* KEYED_FRAGMENT */
  8288. ))
  8289. ])) : vue.createCommentVNode("v-if", true),
  8290. vue.createVNode(
  8291. $setup["FeedbackPopup"],
  8292. {
  8293. ref: "showFeedback",
  8294. onSubmit: $setup.handleFeedbackSubmit
  8295. },
  8296. null,
  8297. 512
  8298. /* NEED_PATCH */
  8299. )
  8300. ]);
  8301. }
  8302. const PagesBookIndex = /* @__PURE__ */ _export_sfc(_sfc_main$1K, [["render", _sfc_render$1J], ["__scopeId", "data-v-0452ab4c"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/book/index.vue"]]);
  8303. const props$m = {
  8304. props: {
  8305. // 标签类型info、primary、success、warning、error
  8306. type: {
  8307. type: String,
  8308. default: props$G.tag.type
  8309. },
  8310. // 不可用
  8311. disabled: {
  8312. type: [Boolean, String],
  8313. default: props$G.tag.disabled
  8314. },
  8315. // 标签的大小,large,medium,mini
  8316. size: {
  8317. type: String,
  8318. default: props$G.tag.size
  8319. },
  8320. // tag的形状,circle(两边半圆形), square(方形,带圆角)
  8321. shape: {
  8322. type: String,
  8323. default: props$G.tag.shape
  8324. },
  8325. // 标签文字
  8326. text: {
  8327. type: [String, Number],
  8328. default: props$G.tag.text
  8329. },
  8330. // 背景颜色,默认为空字符串,即不处理
  8331. bgColor: {
  8332. type: String,
  8333. default: props$G.tag.bgColor
  8334. },
  8335. // 标签字体颜色,默认为空字符串,即不处理
  8336. color: {
  8337. type: String,
  8338. default: props$G.tag.color
  8339. },
  8340. // 标签的边框颜色
  8341. borderColor: {
  8342. type: String,
  8343. default: props$G.tag.borderColor
  8344. },
  8345. // 关闭按钮图标的颜色
  8346. closeColor: {
  8347. type: String,
  8348. default: props$G.tag.closeColor
  8349. },
  8350. // 点击时返回的索引值,用于区分例遍的数组哪个元素被点击了
  8351. name: {
  8352. type: [String, Number],
  8353. default: props$G.tag.name
  8354. },
  8355. // // 模式选择,dark|light|plain
  8356. // mode: {
  8357. // type: String,
  8358. // default: 'light'
  8359. // },
  8360. // 镂空时是否填充背景色
  8361. plainFill: {
  8362. type: Boolean,
  8363. default: props$G.tag.plainFill
  8364. },
  8365. // 是否镂空
  8366. plain: {
  8367. type: Boolean,
  8368. default: props$G.tag.plain
  8369. },
  8370. // 是否可关闭
  8371. closable: {
  8372. type: Boolean,
  8373. default: props$G.tag.closable
  8374. },
  8375. // 是否显示
  8376. show: {
  8377. type: Boolean,
  8378. default: props$G.tag.show
  8379. },
  8380. // 内置图标,或绝对路径的图片
  8381. icon: {
  8382. type: String,
  8383. default: props$G.tag.icon
  8384. }
  8385. }
  8386. };
  8387. const _sfc_main$1J = {
  8388. name: "u-tag",
  8389. mixins: [mpMixin, mixin, props$m],
  8390. data() {
  8391. return {};
  8392. },
  8393. computed: {
  8394. style() {
  8395. const style = {};
  8396. if (this.bgColor) {
  8397. style.backgroundColor = this.bgColor;
  8398. }
  8399. if (this.color) {
  8400. style.color = this.color;
  8401. }
  8402. if (this.borderColor) {
  8403. style.borderColor = this.borderColor;
  8404. }
  8405. return style;
  8406. },
  8407. // nvue下,文本颜色无法继承父元素
  8408. textColor() {
  8409. const style = {};
  8410. if (this.color) {
  8411. style.color = this.color;
  8412. }
  8413. return style;
  8414. },
  8415. imgStyle() {
  8416. const width = this.size === "large" ? "17px" : this.size === "medium" ? "15px" : "13px";
  8417. return {
  8418. width,
  8419. height: width
  8420. };
  8421. },
  8422. // 文本的样式
  8423. closeSize() {
  8424. const size = this.size === "large" ? 15 : this.size === "medium" ? 13 : 12;
  8425. return size;
  8426. },
  8427. // 图标大小
  8428. iconSize() {
  8429. const size = this.size === "large" ? 21 : this.size === "medium" ? 19 : 16;
  8430. return size;
  8431. },
  8432. // 图标颜色
  8433. elIconColor() {
  8434. return this.iconColor ? this.iconColor : this.plain ? this.type : "#ffffff";
  8435. }
  8436. },
  8437. methods: {
  8438. // 点击关闭按钮
  8439. closeHandler() {
  8440. this.$emit("close", this.name);
  8441. },
  8442. // 点击标签
  8443. clickHandler() {
  8444. this.$emit("click", this.name);
  8445. }
  8446. }
  8447. };
  8448. function _sfc_render$1I(_ctx, _cache, $props, $setup, $data, $options) {
  8449. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  8450. const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_1$5);
  8451. return vue.openBlock(), vue.createBlock(_component_u_transition, {
  8452. mode: "fade",
  8453. show: _ctx.show,
  8454. style: { "display": "inline-flex" }
  8455. }, {
  8456. default: vue.withCtx(() => [
  8457. vue.createElementVNode("view", { class: "u-tag-wrapper" }, [
  8458. vue.createElementVNode(
  8459. "view",
  8460. {
  8461. class: vue.normalizeClass(["u-tag", [`u-tag--${_ctx.shape}`, !_ctx.plain && `u-tag--${_ctx.type}`, _ctx.plain && `u-tag--${_ctx.type}--plain`, `u-tag--${_ctx.size}`, _ctx.plain && _ctx.plainFill && `u-tag--${_ctx.type}--plain--fill`]]),
  8462. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.clickHandler && $options.clickHandler(...args), ["stop"])),
  8463. style: vue.normalizeStyle([{
  8464. marginRight: _ctx.closable ? "10px" : 0,
  8465. marginTop: _ctx.closable ? "10px" : 0
  8466. }, $options.style])
  8467. },
  8468. [
  8469. vue.renderSlot(_ctx.$slots, "icon", {}, () => [
  8470. _ctx.icon ? (vue.openBlock(), vue.createElementBlock("view", {
  8471. key: 0,
  8472. class: "u-tag__icon"
  8473. }, [
  8474. _ctx.$u.test.image(_ctx.icon) ? (vue.openBlock(), vue.createElementBlock("image", {
  8475. key: 0,
  8476. src: _ctx.icon,
  8477. style: vue.normalizeStyle([$options.imgStyle])
  8478. }, null, 12, ["src"])) : (vue.openBlock(), vue.createBlock(_component_u_icon, {
  8479. key: 1,
  8480. color: $options.elIconColor,
  8481. name: _ctx.icon,
  8482. size: $options.iconSize
  8483. }, null, 8, ["color", "name", "size"]))
  8484. ])) : vue.createCommentVNode("v-if", true)
  8485. ], true),
  8486. vue.createElementVNode(
  8487. "text",
  8488. {
  8489. class: vue.normalizeClass(["u-tag__text", [`u-tag__text--${_ctx.type}`, _ctx.plain && `u-tag__text--${_ctx.type}--plain`, `u-tag__text--${_ctx.size}`]]),
  8490. style: vue.normalizeStyle([$options.textColor])
  8491. },
  8492. vue.toDisplayString(_ctx.text),
  8493. 7
  8494. /* TEXT, CLASS, STYLE */
  8495. )
  8496. ],
  8497. 6
  8498. /* CLASS, STYLE */
  8499. ),
  8500. _ctx.closable ? (vue.openBlock(), vue.createElementBlock(
  8501. "view",
  8502. {
  8503. key: 0,
  8504. class: vue.normalizeClass(["u-tag__close", [`u-tag__close--${_ctx.size}`]]),
  8505. onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.closeHandler && $options.closeHandler(...args), ["stop"])),
  8506. style: vue.normalizeStyle({ backgroundColor: _ctx.closeColor })
  8507. },
  8508. [
  8509. vue.createVNode(_component_u_icon, {
  8510. name: "close",
  8511. size: $options.closeSize,
  8512. color: "#ffffff"
  8513. }, null, 8, ["size"])
  8514. ],
  8515. 6
  8516. /* CLASS, STYLE */
  8517. )) : vue.createCommentVNode("v-if", true)
  8518. ])
  8519. ]),
  8520. _: 3
  8521. /* FORWARDED */
  8522. }, 8, ["show"]);
  8523. }
  8524. const __easycom_2$2 = /* @__PURE__ */ _export_sfc(_sfc_main$1J, [["render", _sfc_render$1I], ["__scopeId", "data-v-2fd891bb"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-tag/u-tag.vue"]]);
  8525. const _sfc_main$1I = {
  8526. __name: "WarehouseSelector",
  8527. props: {
  8528. show: {
  8529. type: Boolean,
  8530. default: false
  8531. }
  8532. },
  8533. emits: ["update:show", "warehouse-selected"],
  8534. setup(__props, { expose: __expose, emit: __emit }) {
  8535. __expose();
  8536. const props2 = __props;
  8537. const emit2 = __emit;
  8538. const searchKeyword = vue.ref("");
  8539. const searchResults = vue.ref([]);
  8540. const historyWarehouses = vue.ref([""]);
  8541. const selectedWarehouse = vue.ref("");
  8542. const warehouseSearch = (name) => {
  8543. formatAppLog("log", "at pages/index/express/components/WarehouseSelector.vue:68", name);
  8544. uni.$u.http.post("/app/appUser/searchGodown?name=" + name).then((res) => {
  8545. if (res.code == 200) {
  8546. searchResults.value = res.data;
  8547. }
  8548. });
  8549. };
  8550. const getUserBindHistory = () => {
  8551. uni.$u.http.get("/app/appUser/getUserBindGodownReocrd").then((res) => {
  8552. if (res.code == 200) {
  8553. historyWarehouses.value = res.data;
  8554. }
  8555. });
  8556. };
  8557. getUserBindHistory();
  8558. const handleSearch = () => {
  8559. warehouseSearch(searchKeyword.value);
  8560. };
  8561. const selectItem = vue.ref({});
  8562. const selectWarehouse = (item) => {
  8563. selectedWarehouse.value = item.godownName;
  8564. selectItem.value = item;
  8565. };
  8566. const handleClose = () => {
  8567. emit2("update:show", false);
  8568. searchKeyword.value = "";
  8569. };
  8570. const handleConfirm = () => {
  8571. if (selectedWarehouse.value) {
  8572. emit2("warehouse-selected", selectItem.value);
  8573. handleClose();
  8574. }
  8575. };
  8576. const __returned__ = { props: props2, emit: emit2, searchKeyword, searchResults, historyWarehouses, selectedWarehouse, warehouseSearch, getUserBindHistory, handleSearch, selectItem, selectWarehouse, handleClose, handleConfirm, ref: vue.ref };
  8577. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  8578. return __returned__;
  8579. }
  8580. };
  8581. function _sfc_render$1H(_ctx, _cache, $props, $setup, $data, $options) {
  8582. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$4);
  8583. const _component_u_tag = resolveEasycom(vue.resolveDynamicComponent("u-tag"), __easycom_2$2);
  8584. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  8585. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_7);
  8586. return vue.openBlock(), vue.createBlock(_component_u_popup, {
  8587. show: $props.show,
  8588. onClose: $setup.handleClose,
  8589. mode: "bottom",
  8590. round: "10"
  8591. }, {
  8592. default: vue.withCtx(() => [
  8593. vue.createElementVNode("view", { class: "warehouse-selector" }, [
  8594. vue.createElementVNode("view", { style: { "flex": "1" } }, [
  8595. vue.createCommentVNode(" 标题 "),
  8596. vue.createElementVNode("view", { class: "header" }, [
  8597. vue.createElementVNode("text", { class: "title" }, "绑定仓库")
  8598. ]),
  8599. vue.createCommentVNode(" 搜索框 "),
  8600. vue.createElementVNode("view", { class: "search-box" }, [
  8601. vue.createVNode(_component_u_search, {
  8602. inputStyle: { "height": "80rpx", "font-size": "16px" },
  8603. actionStyle: { "font-size": "16px", color: "#22ac38" },
  8604. modelValue: $setup.searchKeyword,
  8605. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchKeyword = $event),
  8606. placeholder: "搜索仓库",
  8607. "show-action": true,
  8608. "action-text": "搜索",
  8609. onSearch: $setup.handleSearch,
  8610. onCustom: $setup.handleSearch
  8611. }, null, 8, ["modelValue"])
  8612. ]),
  8613. vue.createCommentVNode(" 搜索结果 "),
  8614. $setup.searchResults.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  8615. key: 0,
  8616. class: "search-result"
  8617. }, [
  8618. vue.createElementVNode("text", { class: "section-title" }, "搜索结果"),
  8619. vue.createElementVNode("view", { class: "tag-group" }, [
  8620. (vue.openBlock(true), vue.createElementBlock(
  8621. vue.Fragment,
  8622. null,
  8623. vue.renderList($setup.searchResults, (item) => {
  8624. return vue.openBlock(), vue.createBlock(_component_u_tag, {
  8625. key: item,
  8626. text: item.godownName,
  8627. plain: $setup.selectedWarehouse !== item.godownName,
  8628. shape: "circle",
  8629. onClick: ($event) => $setup.selectWarehouse(item),
  8630. size: "large"
  8631. }, null, 8, ["text", "plain", "onClick"]);
  8632. }),
  8633. 128
  8634. /* KEYED_FRAGMENT */
  8635. ))
  8636. ])
  8637. ])) : vue.createCommentVNode("v-if", true),
  8638. vue.createCommentVNode(" 历史绑定 "),
  8639. $setup.historyWarehouses.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  8640. key: 1,
  8641. class: "history-section"
  8642. }, [
  8643. vue.createElementVNode("text", { class: "section-title" }, "历史绑定"),
  8644. vue.createElementVNode("view", { class: "tag-group" }, [
  8645. (vue.openBlock(true), vue.createElementBlock(
  8646. vue.Fragment,
  8647. null,
  8648. vue.renderList($setup.historyWarehouses, (item) => {
  8649. return vue.openBlock(), vue.createBlock(_component_u_tag, {
  8650. key: item,
  8651. text: item,
  8652. plain: $setup.selectedWarehouse !== item.godownName,
  8653. shape: "circle",
  8654. onClick: ($event) => $setup.selectWarehouse(item),
  8655. size: "large"
  8656. }, null, 8, ["text", "plain", "onClick"]);
  8657. }),
  8658. 128
  8659. /* KEYED_FRAGMENT */
  8660. ))
  8661. ])
  8662. ])) : vue.createCommentVNode("v-if", true)
  8663. ]),
  8664. vue.createCommentVNode(" 底部按钮 "),
  8665. vue.createElementVNode("view", { class: "footer" }, [
  8666. vue.createVNode(_component_u_button, {
  8667. onClick: $setup.handleClose,
  8668. text: "取消",
  8669. plain: "",
  8670. shape: "circle"
  8671. }),
  8672. vue.createVNode(_component_u_button, {
  8673. type: "primary",
  8674. onClick: $setup.handleConfirm,
  8675. text: "确定",
  8676. shape: "circle"
  8677. })
  8678. ])
  8679. ])
  8680. ]),
  8681. _: 1
  8682. /* STABLE */
  8683. }, 8, ["show"]);
  8684. }
  8685. const WarehouseSelector = /* @__PURE__ */ _export_sfc(_sfc_main$1I, [["render", _sfc_render$1H], ["__scopeId", "data-v-b9bd3f04"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/index/express/components/WarehouseSelector.vue"]]);
  8686. const placeholderStyle$3 = "font-size:32rpx";
  8687. const _sfc_main$1H = {
  8688. __name: "transfer-sign",
  8689. setup(__props, { expose: __expose }) {
  8690. __expose();
  8691. const customStyle = vue.reactive({
  8692. height: "90rpx"
  8693. });
  8694. const selectedWarehouse = vue.ref("");
  8695. const form = vue.ref({
  8696. "packageCode": "",
  8697. "godownId": ""
  8698. });
  8699. const showSelector = vue.ref(false);
  8700. function openWarehouseSelector() {
  8701. showSelector.value = true;
  8702. }
  8703. function handleWarehouseSelected(item) {
  8704. selectedWarehouse.value = item.godownName;
  8705. form.value.godownId = item.id;
  8706. }
  8707. function scanCode() {
  8708. uni.scanCode({
  8709. success: (res) => {
  8710. form.value.packageCode = res.result;
  8711. handleBarcode(res.result);
  8712. },
  8713. fail: (err) => {
  8714. uni.$u.toast("扫码失败");
  8715. }
  8716. });
  8717. }
  8718. function handleBarcode(code2) {
  8719. if (!code2)
  8720. return uni.$u.toast("请输入物流单号");
  8721. uni.$u.http.post("/app/ordersign/transferSign", form.value).then((res) => {
  8722. if (res.code == 200) {
  8723. let text = code2 + "签收成功";
  8724. uni.$u.ttsModule.speak(text);
  8725. } else {
  8726. let text = code2 + "订单不存在";
  8727. uni.$u.ttsModule.speak(text);
  8728. }
  8729. });
  8730. }
  8731. function getUserBindWarehouse() {
  8732. uni.$u.http.get("/app/appUser/getUserBindGodown").then((res) => {
  8733. var _a, _b;
  8734. if (res.code == 200) {
  8735. selectedWarehouse.value = (_a = res.data) == null ? void 0 : _a.godownName;
  8736. form.value.godownId = (_b = res.data) == null ? void 0 : _b.id;
  8737. }
  8738. });
  8739. }
  8740. const { unregister } = uni.$u.useEventListener((e) => {
  8741. form.value.packageCode = e.barcode;
  8742. handleBarcode(e.barcode);
  8743. });
  8744. onLoad(() => {
  8745. getUserBindWarehouse();
  8746. });
  8747. vue.onUnmounted(() => {
  8748. unregister();
  8749. });
  8750. const __returned__ = { placeholderStyle: placeholderStyle$3, customStyle, selectedWarehouse, form, showSelector, openWarehouseSelector, handleWarehouseSelected, scanCode, handleBarcode, getUserBindWarehouse, unregister, reactive: vue.reactive, ref: vue.ref, onUnmounted: vue.onUnmounted, get onLoad() {
  8751. return onLoad;
  8752. }, get onShow() {
  8753. return onShow;
  8754. }, WarehouseSelector };
  8755. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  8756. return __returned__;
  8757. }
  8758. };
  8759. function _sfc_render$1G(_ctx, _cache, $props, $setup, $data, $options) {
  8760. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  8761. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  8762. const _directive_permission = vue.resolveDirective("permission");
  8763. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  8764. vue.createElementVNode("view", { class: "main-content" }, [
  8765. vue.createElementVNode("view", { class: "input-group" }, [
  8766. vue.createVNode(_component_u_input, {
  8767. customStyle: $setup.customStyle,
  8768. "placeholder-style": $setup.placeholderStyle,
  8769. modelValue: $setup.selectedWarehouse,
  8770. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.selectedWarehouse = $event),
  8771. placeholder: "请选择仓库",
  8772. readonly: "",
  8773. border: "surround"
  8774. }, null, 8, ["customStyle", "modelValue"]),
  8775. vue.createVNode(_component_u_button, {
  8776. customStyle: $setup.customStyle,
  8777. type: "info",
  8778. color: "#a4adb3",
  8779. onClick: $setup.openWarehouseSelector,
  8780. text: "选择"
  8781. }, null, 8, ["customStyle"])
  8782. ]),
  8783. vue.createElementVNode("view", { class: "input-group" }, [
  8784. vue.createVNode(_component_u_input, {
  8785. customStyle: $setup.customStyle,
  8786. "placeholder-style": $setup.placeholderStyle,
  8787. modelValue: $setup.form.packageCode,
  8788. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.form.packageCode = $event),
  8789. placeholder: "扫描/输入物流单号",
  8790. border: "surround"
  8791. }, null, 8, ["customStyle", "modelValue"]),
  8792. vue.withDirectives(vue.createVNode(_component_u_button, {
  8793. customStyle: $setup.customStyle,
  8794. type: "info",
  8795. color: "#a4adb3",
  8796. onClick: _cache[2] || (_cache[2] = ($event) => $setup.handleBarcode($setup.form.packageCode)),
  8797. text: "确定"
  8798. }, null, 8, ["customStyle"]), [
  8799. [_directive_permission, "app:express:transferSign:confirm"]
  8800. ])
  8801. ])
  8802. ]),
  8803. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  8804. vue.createVNode(_component_u_button, {
  8805. size: "large",
  8806. type: "success",
  8807. onClick: $setup.scanCode,
  8808. text: "扫码",
  8809. class: "scan-button"
  8810. })
  8811. ]),
  8812. vue.createVNode($setup["WarehouseSelector"], {
  8813. show: $setup.showSelector,
  8814. "onUpdate:show": _cache[3] || (_cache[3] = ($event) => $setup.showSelector = $event),
  8815. onWarehouseSelected: $setup.handleWarehouseSelected
  8816. }, null, 8, ["show"])
  8817. ]);
  8818. }
  8819. const PagesIndexExpressTransferSign = /* @__PURE__ */ _export_sfc(_sfc_main$1H, [["render", _sfc_render$1G], ["__scopeId", "data-v-333d344a"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/index/express/transfer-sign.vue"]]);
  8820. const _sfc_main$1G = {
  8821. __name: "scan",
  8822. setup(__props, { expose: __expose }) {
  8823. __expose();
  8824. const isInitializing = vue.ref(false);
  8825. const isBluetoothOpened = vue.ref(false);
  8826. const isDiscovering = vue.ref(false);
  8827. const isConnecting = vue.ref(false);
  8828. const isConnected = vue.ref(false);
  8829. const devices = vue.ref([]);
  8830. const selectedDevice = vue.ref(null);
  8831. const scanData = vue.ref(null);
  8832. const deviceId = vue.ref("");
  8833. const serviceId = vue.ref("");
  8834. const characteristicId = vue.ref("");
  8835. const initBluetooth = () => {
  8836. isInitializing.value = true;
  8837. uni.openBluetoothAdapter({
  8838. success: (res) => {
  8839. formatAppLog("log", "at pages/index/express/scan.vue:35", "蓝牙适配器初始化成功");
  8840. isBluetoothOpened.value = true;
  8841. isInitializing.value = false;
  8842. },
  8843. fail: (err) => {
  8844. formatAppLog("log", "at pages/index/express/scan.vue:40", "蓝牙适配器初始化失败:", err);
  8845. isInitializing.value = false;
  8846. }
  8847. });
  8848. };
  8849. const startDiscovery = () => {
  8850. isDiscovering.value = true;
  8851. uni.startBluetoothDevicesDiscovery({
  8852. success: (res) => {
  8853. formatAppLog("log", "at pages/index/express/scan.vue:50", "开始搜索蓝牙设备成功");
  8854. uni.onBluetoothDeviceFound((devicesRes) => {
  8855. const newDevices = devicesRes.devices;
  8856. devices.value = devices.value.concat(newDevices);
  8857. formatAppLog("log", "at pages/index/express/scan.vue:54", devices.value, "devices.value");
  8858. const scanGunDevice = newDevices.find((device) => device.name.includes("Z0"));
  8859. if (scanGunDevice) {
  8860. selectedDevice.value = scanGunDevice;
  8861. deviceId.value = scanGunDevice.deviceId;
  8862. }
  8863. });
  8864. uni.onBluetoothAdapterStateChange((stateRes) => {
  8865. if (!stateRes.available) {
  8866. isDiscovering.value = false;
  8867. formatAppLog("log", "at pages/index/express/scan.vue:64", "蓝牙适配器不可用,停止搜索");
  8868. }
  8869. });
  8870. },
  8871. fail: (err) => {
  8872. formatAppLog("log", "at pages/index/express/scan.vue:69", "开始搜索蓝牙设备失败:", err);
  8873. isDiscovering.value = false;
  8874. }
  8875. });
  8876. };
  8877. const connectDevice = () => {
  8878. isConnecting.value = true;
  8879. uni.createBLEConnection({
  8880. deviceId: deviceId.value,
  8881. success: (res) => {
  8882. formatAppLog("log", "at pages/index/express/scan.vue:80", "连接蓝牙设备成功");
  8883. isConnected.value = true;
  8884. isConnecting.value = false;
  8885. getBLEDeviceServices(deviceId.value);
  8886. },
  8887. fail: (err) => {
  8888. formatAppLog("log", "at pages/index/express/scan.vue:86", "连接蓝牙设备失败:", err);
  8889. isConnecting.value = false;
  8890. }
  8891. });
  8892. };
  8893. const getBLEDeviceServices = (deviceId2) => {
  8894. uni.getBLEDeviceServices({
  8895. deviceId: deviceId2,
  8896. success: (res) => {
  8897. formatAppLog("log", "at pages/index/express/scan.vue:96", "获取服务列表成功:", res.services);
  8898. const targetService = res.services.find((service) => service.uuid === "目标服务UUID");
  8899. if (targetService) {
  8900. serviceId.value = targetService.uuid;
  8901. getBLEDeviceCharacteristics(deviceId2, serviceId.value);
  8902. }
  8903. },
  8904. fail: (err) => {
  8905. formatAppLog("log", "at pages/index/express/scan.vue:104", "获取服务列表失败:", err);
  8906. }
  8907. });
  8908. };
  8909. const getBLEDeviceCharacteristics = (deviceId2, serviceId2) => {
  8910. uni.getBLEDeviceCharacteristics({
  8911. deviceId: deviceId2,
  8912. serviceId: serviceId2,
  8913. success: (res) => {
  8914. formatAppLog("log", "at pages/index/express/scan.vue:114", "获取特征列表成功:", res.characteristics);
  8915. const targetCharacteristic = res.characteristics.find((characteristic) => characteristic.properties.read && characteristic.properties.notify);
  8916. if (targetCharacteristic) {
  8917. characteristicId.value = targetCharacteristic.uuid;
  8918. }
  8919. },
  8920. fail: (err) => {
  8921. formatAppLog("log", "at pages/index/express/scan.vue:121", "获取特征列表失败:", err);
  8922. }
  8923. });
  8924. };
  8925. const startDataMonitor = () => {
  8926. uni.onBLECharacteristicValueChange((characteristicRes) => {
  8927. const value2 = characteristicRes.value;
  8928. const data = ab2str(value2);
  8929. formatAppLog("log", "at pages/index/express/scan.vue:130", "获取到扫码枪扫描的数据:", data);
  8930. scanData.value = data;
  8931. });
  8932. uni.notifyBLECharacteristicValueChange({
  8933. state: true,
  8934. deviceId: deviceId.value,
  8935. characteristicId: characteristicId.value,
  8936. success: (res) => {
  8937. formatAppLog("log", "at pages/index/express/scan.vue:138", "开启特征值通知成功");
  8938. },
  8939. fail: (err) => {
  8940. formatAppLog("log", "at pages/index/express/scan.vue:141", "开启特征值通知失败:", err);
  8941. }
  8942. });
  8943. };
  8944. const ab2str = (buffer) => {
  8945. return String.fromCharCode.apply(null, new Uint8Array(buffer));
  8946. };
  8947. const __returned__ = { isInitializing, isBluetoothOpened, isDiscovering, isConnecting, isConnected, devices, selectedDevice, scanData, deviceId, serviceId, characteristicId, initBluetooth, startDiscovery, connectDevice, getBLEDeviceServices, getBLEDeviceCharacteristics, startDataMonitor, ab2str, ref: vue.ref, get onLoad() {
  8948. return onLoad;
  8949. } };
  8950. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  8951. return __returned__;
  8952. }
  8953. };
  8954. function _sfc_render$1F(_ctx, _cache, $props, $setup, $data, $options) {
  8955. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  8956. vue.createElementVNode("button", {
  8957. onClick: $setup.initBluetooth,
  8958. disabled: $setup.isInitializing
  8959. }, "初始化蓝牙", 8, ["disabled"]),
  8960. vue.createElementVNode("button", {
  8961. onClick: $setup.startDiscovery,
  8962. disabled: $setup.isDiscovering || !$setup.isBluetoothOpened
  8963. }, "开始搜索设备", 8, ["disabled"]),
  8964. vue.createElementVNode("button", {
  8965. onClick: $setup.connectDevice,
  8966. disabled: !$setup.selectedDevice || $setup.isConnecting
  8967. }, "连接设备", 8, ["disabled"]),
  8968. vue.createElementVNode("button", {
  8969. onClick: $setup.startDataMonitor,
  8970. disabled: !$setup.isConnected
  8971. }, "开始监听数据", 8, ["disabled"]),
  8972. $setup.scanData ? (vue.openBlock(), vue.createElementBlock(
  8973. "view",
  8974. { key: 0 },
  8975. "扫描结果: " + vue.toDisplayString($setup.scanData),
  8976. 1
  8977. /* TEXT */
  8978. )) : vue.createCommentVNode("v-if", true),
  8979. (vue.openBlock(true), vue.createElementBlock(
  8980. vue.Fragment,
  8981. null,
  8982. vue.renderList($setup.devices, (item) => {
  8983. return vue.openBlock(), vue.createElementBlock(
  8984. "view",
  8985. null,
  8986. vue.toDisplayString(item.name),
  8987. 1
  8988. /* TEXT */
  8989. );
  8990. }),
  8991. 256
  8992. /* UNKEYED_FRAGMENT */
  8993. ))
  8994. ]);
  8995. }
  8996. const PagesIndexExpressScan = /* @__PURE__ */ _export_sfc(_sfc_main$1G, [["render", _sfc_render$1F], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/index/express/scan.vue"]]);
  8997. const props$l = {
  8998. props: {
  8999. // radio的名称
  9000. name: {
  9001. type: [String, Number, Boolean],
  9002. default: props$G.radio.name
  9003. },
  9004. // 形状,square为方形,circle为圆型
  9005. shape: {
  9006. type: String,
  9007. default: props$G.radio.shape
  9008. },
  9009. // 是否禁用
  9010. disabled: {
  9011. type: [String, Boolean],
  9012. default: props$G.radio.disabled
  9013. },
  9014. // 是否禁止点击提示语选中单选框
  9015. labelDisabled: {
  9016. type: [String, Boolean],
  9017. default: props$G.radio.labelDisabled
  9018. },
  9019. // 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值
  9020. activeColor: {
  9021. type: String,
  9022. default: props$G.radio.activeColor
  9023. },
  9024. // 未选中的颜色
  9025. inactiveColor: {
  9026. type: String,
  9027. default: props$G.radio.inactiveColor
  9028. },
  9029. // 图标的大小,单位px
  9030. iconSize: {
  9031. type: [String, Number],
  9032. default: props$G.radio.iconSize
  9033. },
  9034. // label的字体大小,px单位
  9035. labelSize: {
  9036. type: [String, Number],
  9037. default: props$G.radio.labelSize
  9038. },
  9039. // label提示文字,因为nvue下,直接slot进来的文字,由于特殊的结构,无法修改样式
  9040. label: {
  9041. type: [String, Number],
  9042. default: props$G.radio.label
  9043. },
  9044. // 整体的大小
  9045. size: {
  9046. type: [String, Number],
  9047. default: props$G.radio.size
  9048. },
  9049. // 图标颜色
  9050. color: {
  9051. type: String,
  9052. default: props$G.radio.color
  9053. },
  9054. // label的颜色
  9055. labelColor: {
  9056. type: String,
  9057. default: props$G.radio.labelColor
  9058. },
  9059. // 图标颜色
  9060. iconColor: {
  9061. type: String,
  9062. default: props$G.radio.iconColor
  9063. }
  9064. }
  9065. };
  9066. const _sfc_main$1F = {
  9067. name: "u-radio",
  9068. mixins: [mpMixin, mixin, props$l],
  9069. data() {
  9070. return {
  9071. checked: false,
  9072. // 当你看到这段代码的时候,
  9073. // 父组件的默认值,因为头条小程序不支持在computed中使用this.parent.shape的形式
  9074. // 故只能使用如此方法
  9075. parentData: {
  9076. iconSize: 12,
  9077. labelDisabled: null,
  9078. disabled: null,
  9079. shape: null,
  9080. activeColor: null,
  9081. inactiveColor: null,
  9082. size: 18,
  9083. value: null,
  9084. modelValue: null,
  9085. iconColor: null,
  9086. placement: "row",
  9087. borderBottom: false,
  9088. iconPlacement: "left"
  9089. }
  9090. };
  9091. },
  9092. computed: {
  9093. // 是否禁用,如果父组件u-raios-group禁用的话,将会忽略子组件的配置
  9094. elDisabled() {
  9095. return this.disabled !== "" ? this.disabled : this.parentData.disabled !== null ? this.parentData.disabled : false;
  9096. },
  9097. // 是否禁用label点击
  9098. elLabelDisabled() {
  9099. return this.labelDisabled !== "" ? this.labelDisabled : this.parentData.labelDisabled !== null ? this.parentData.labelDisabled : false;
  9100. },
  9101. // 组件尺寸,对应size的值,默认值为21px
  9102. elSize() {
  9103. return this.size ? this.size : this.parentData.size ? this.parentData.size : 21;
  9104. },
  9105. // 组件的勾选图标的尺寸,默认12px
  9106. elIconSize() {
  9107. return this.iconSize ? this.iconSize : this.parentData.iconSize ? this.parentData.iconSize : 12;
  9108. },
  9109. // 组件选中激活时的颜色
  9110. elActiveColor() {
  9111. return this.activeColor ? this.activeColor : this.parentData.activeColor ? this.parentData.activeColor : "#2979ff";
  9112. },
  9113. // 组件选未中激活时的颜色
  9114. elInactiveColor() {
  9115. return this.inactiveColor ? this.inactiveColor : this.parentData.inactiveColor ? this.parentData.inactiveColor : "#c8c9cc";
  9116. },
  9117. // label的颜色
  9118. elLabelColor() {
  9119. return this.labelColor ? this.labelColor : this.parentData.labelColor ? this.parentData.labelColor : "#606266";
  9120. },
  9121. // 组件的形状
  9122. elShape() {
  9123. return this.shape ? this.shape : this.parentData.shape ? this.parentData.shape : "circle";
  9124. },
  9125. // label大小
  9126. elLabelSize() {
  9127. return uni.$u.addUnit(this.labelSize ? this.labelSize : this.parentData.labelSize ? this.parentData.labelSize : "15");
  9128. },
  9129. elIconColor() {
  9130. const iconColor = this.iconColor ? this.iconColor : this.parentData.iconColor ? this.parentData.iconColor : "#ffffff";
  9131. if (this.elDisabled) {
  9132. return this.checked ? this.elInactiveColor : "transparent";
  9133. } else {
  9134. return this.checked ? iconColor : "transparent";
  9135. }
  9136. },
  9137. iconClasses() {
  9138. let classes = [];
  9139. classes.push("u-radio__icon-wrap--" + this.elShape);
  9140. if (this.elDisabled) {
  9141. classes.push("u-radio__icon-wrap--disabled");
  9142. }
  9143. if (this.checked && this.elDisabled) {
  9144. classes.push("u-radio__icon-wrap--disabled--checked");
  9145. }
  9146. return classes;
  9147. },
  9148. iconWrapStyle() {
  9149. const style = {};
  9150. style.backgroundColor = this.checked && !this.elDisabled ? this.elActiveColor : "#ffffff";
  9151. style.borderColor = this.checked && !this.elDisabled ? this.elActiveColor : this.elInactiveColor;
  9152. style.width = uni.$u.addUnit(this.elSize);
  9153. style.height = uni.$u.addUnit(this.elSize);
  9154. if (this.parentData.iconPlacement === "right") {
  9155. style.marginRight = 0;
  9156. }
  9157. return style;
  9158. },
  9159. radioStyle() {
  9160. const style = {};
  9161. if (this.parentData.borderBottom && this.parentData.placement === "row") {
  9162. uni.$u.error("检测到您将borderBottom设置为true,需要同时将u-radio-group的placement设置为column才有效");
  9163. }
  9164. if (this.parentData.borderBottom && this.parentData.placement === "column") {
  9165. style.paddingBottom = uni.$u.os() === "ios" ? "12px" : "8px";
  9166. }
  9167. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  9168. }
  9169. },
  9170. mounted() {
  9171. this.init();
  9172. },
  9173. methods: {
  9174. init() {
  9175. this.updateParentData();
  9176. if (!this.parent) {
  9177. uni.$u.error("u-radio必须搭配u-radio-group组件使用");
  9178. }
  9179. this.checked = this.name === this.parentData.modelValue;
  9180. },
  9181. updateParentData() {
  9182. this.getParentData("u-radio-group");
  9183. },
  9184. // 点击图标
  9185. iconClickHandler(e) {
  9186. this.preventEvent(e);
  9187. if (!this.elDisabled) {
  9188. this.setRadioCheckedStatus();
  9189. }
  9190. },
  9191. // 横向两端排列时,点击组件即可触发选中事件
  9192. wrapperClickHandler(e) {
  9193. this.parentData.iconPlacement === "right" && this.iconClickHandler(e);
  9194. },
  9195. // 点击label
  9196. labelClickHandler(e) {
  9197. this.preventEvent(e);
  9198. if (!this.elLabelDisabled && !this.elDisabled) {
  9199. this.setRadioCheckedStatus();
  9200. }
  9201. },
  9202. emitEvent() {
  9203. if (!this.checked) {
  9204. this.$emit("change", this.name);
  9205. this.$nextTick(() => {
  9206. uni.$u.formValidate(this, "change");
  9207. });
  9208. }
  9209. },
  9210. // 改变组件选中状态
  9211. // 这里的改变的依据是,更改本组件的checked值为true,同时通过父组件遍历所有u-radio实例
  9212. // 将本组件外的其他u-radio的checked都设置为false(都被取消选中状态),因而只剩下一个为选中状态
  9213. setRadioCheckedStatus() {
  9214. this.emitEvent();
  9215. this.checked = true;
  9216. typeof this.parent.unCheckedOther === "function" && this.parent.unCheckedOther(this);
  9217. }
  9218. }
  9219. };
  9220. function _sfc_render$1E(_ctx, _cache, $props, $setup, $data, $options) {
  9221. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  9222. return vue.openBlock(), vue.createElementBlock(
  9223. "view",
  9224. {
  9225. class: vue.normalizeClass(["u-radio", [`u-radio-label--${$data.parentData.iconPlacement}`, $data.parentData.borderBottom && $data.parentData.placement === "column" && "u-border-bottom"]]),
  9226. onClick: _cache[2] || (_cache[2] = vue.withModifiers((...args) => $options.wrapperClickHandler && $options.wrapperClickHandler(...args), ["stop"])),
  9227. style: vue.normalizeStyle([$options.radioStyle])
  9228. },
  9229. [
  9230. vue.createElementVNode(
  9231. "view",
  9232. {
  9233. class: vue.normalizeClass(["u-radio__icon-wrap", $options.iconClasses]),
  9234. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.iconClickHandler && $options.iconClickHandler(...args), ["stop"])),
  9235. style: vue.normalizeStyle([$options.iconWrapStyle])
  9236. },
  9237. [
  9238. vue.renderSlot(_ctx.$slots, "icon", {}, () => [
  9239. vue.createVNode(_component_u_icon, {
  9240. class: "u-radio__icon-wrap__icon",
  9241. name: "checkbox-mark",
  9242. size: $options.elIconSize,
  9243. color: $options.elIconColor
  9244. }, null, 8, ["size", "color"])
  9245. ], true)
  9246. ],
  9247. 6
  9248. /* CLASS, STYLE */
  9249. ),
  9250. vue.createElementVNode(
  9251. "text",
  9252. {
  9253. class: "u-radio__text",
  9254. onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.labelClickHandler && $options.labelClickHandler(...args), ["stop"])),
  9255. style: vue.normalizeStyle({
  9256. color: $options.elDisabled ? $options.elInactiveColor : $options.elLabelColor,
  9257. fontSize: $options.elLabelSize,
  9258. lineHeight: $options.elLabelSize
  9259. })
  9260. },
  9261. vue.toDisplayString(_ctx.label),
  9262. 5
  9263. /* TEXT, STYLE */
  9264. )
  9265. ],
  9266. 6
  9267. /* CLASS, STYLE */
  9268. );
  9269. }
  9270. const __easycom_0$9 = /* @__PURE__ */ _export_sfc(_sfc_main$1F, [["render", _sfc_render$1E], ["__scopeId", "data-v-83036558"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-radio/u-radio.vue"]]);
  9271. const props$k = {
  9272. props: {
  9273. // 绑定的值
  9274. modelValue: {
  9275. type: [String, Number, Boolean],
  9276. default: props$G.radioGroup.value
  9277. },
  9278. // 是否禁用全部radio
  9279. disabled: {
  9280. type: Boolean,
  9281. default: props$G.radioGroup.disabled
  9282. },
  9283. // 形状,circle-圆形,square-方形
  9284. shape: {
  9285. type: String,
  9286. default: props$G.radioGroup.shape
  9287. },
  9288. // 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值
  9289. activeColor: {
  9290. type: String,
  9291. default: props$G.radioGroup.activeColor
  9292. },
  9293. // 未选中的颜色
  9294. inactiveColor: {
  9295. type: String,
  9296. default: props$G.radioGroup.inactiveColor
  9297. },
  9298. // 标识符
  9299. name: {
  9300. type: String,
  9301. default: props$G.radioGroup.name
  9302. },
  9303. // 整个组件的尺寸,默认px
  9304. size: {
  9305. type: [String, Number],
  9306. default: props$G.radioGroup.size
  9307. },
  9308. // 布局方式,row-横向,column-纵向
  9309. placement: {
  9310. type: String,
  9311. default: props$G.radioGroup.placement
  9312. },
  9313. // label的文本
  9314. label: {
  9315. type: [String],
  9316. default: props$G.radioGroup.label
  9317. },
  9318. // label的颜色 (默认 '#303133' )
  9319. labelColor: {
  9320. type: [String],
  9321. default: props$G.radioGroup.labelColor
  9322. },
  9323. // label的字体大小,px单位
  9324. labelSize: {
  9325. type: [String, Number],
  9326. default: props$G.radioGroup.labelSize
  9327. },
  9328. // 是否禁止点击文本操作checkbox(默认 false )
  9329. labelDisabled: {
  9330. type: Boolean,
  9331. default: props$G.radioGroup.labelDisabled
  9332. },
  9333. // 图标颜色
  9334. iconColor: {
  9335. type: String,
  9336. default: props$G.radioGroup.iconColor
  9337. },
  9338. // 图标的大小,单位px
  9339. iconSize: {
  9340. type: [String, Number],
  9341. default: props$G.radioGroup.iconSize
  9342. },
  9343. // 竖向配列时,是否显示下划线
  9344. borderBottom: {
  9345. type: Boolean,
  9346. default: props$G.radioGroup.borderBottom
  9347. },
  9348. // 图标与文字的对齐方式
  9349. iconPlacement: {
  9350. type: String,
  9351. default: props$G.radio.iconPlacement
  9352. }
  9353. }
  9354. };
  9355. const _sfc_main$1E = {
  9356. name: "u-radio-group",
  9357. mixins: [mpMixin, mixin, props$k],
  9358. computed: {
  9359. // 这里computed的变量,都是子组件u-radio需要用到的,由于头条小程序的兼容性差异,子组件无法实时监听父组件参数的变化
  9360. // 所以需要手动通知子组件,这里返回一个parentData变量,供watch监听,在其中去通知每一个子组件重新从父组件(u-radio-group)
  9361. // 拉取父组件新的变化后的参数
  9362. parentData() {
  9363. return [
  9364. this.modelValue,
  9365. this.disabled,
  9366. this.inactiveColor,
  9367. this.activeColor,
  9368. this.size,
  9369. this.labelDisabled,
  9370. this.shape,
  9371. this.iconSize,
  9372. this.borderBottom,
  9373. this.placement
  9374. ];
  9375. },
  9376. bemClass() {
  9377. return this.bem("radio-group", ["placement"]);
  9378. }
  9379. },
  9380. watch: {
  9381. // 当父组件需要子组件需要共享的参数发生了变化,手动通知子组件
  9382. parentData() {
  9383. if (this.children.length) {
  9384. this.children.map((child) => {
  9385. typeof child.init === "function" && child.init();
  9386. });
  9387. }
  9388. }
  9389. },
  9390. data() {
  9391. return {};
  9392. },
  9393. created() {
  9394. this.children = [];
  9395. },
  9396. emits: ["update:modelValue", "change"],
  9397. methods: {
  9398. // 将其他的radio设置为未选中的状态
  9399. unCheckedOther(childInstance) {
  9400. this.children.map((child) => {
  9401. if (childInstance !== child) {
  9402. child.checked = false;
  9403. }
  9404. });
  9405. const {
  9406. name
  9407. } = childInstance;
  9408. this.$emit("update:modelValue", name);
  9409. this.$emit("change", name);
  9410. }
  9411. }
  9412. };
  9413. function _sfc_render$1D(_ctx, _cache, $props, $setup, $data, $options) {
  9414. return vue.openBlock(), vue.createElementBlock(
  9415. "view",
  9416. {
  9417. class: vue.normalizeClass(["u-radio-group", $options.bemClass])
  9418. },
  9419. [
  9420. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  9421. ],
  9422. 2
  9423. /* CLASS */
  9424. );
  9425. }
  9426. const __easycom_1$4 = /* @__PURE__ */ _export_sfc(_sfc_main$1E, [["render", _sfc_render$1D], ["__scopeId", "data-v-cbc8bf70"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-radio-group/u-radio-group.vue"]]);
  9427. const props$j = {
  9428. props: {
  9429. // 是否虚线
  9430. dashed: {
  9431. type: Boolean,
  9432. default: props$G.divider.dashed
  9433. },
  9434. // 是否细线
  9435. hairline: {
  9436. type: Boolean,
  9437. default: props$G.divider.hairline
  9438. },
  9439. // 是否以点替代文字,优先于text字段起作用
  9440. dot: {
  9441. type: Boolean,
  9442. default: props$G.divider.dot
  9443. },
  9444. // 内容文本的位置,left-左边,center-中间,right-右边
  9445. textPosition: {
  9446. type: String,
  9447. default: props$G.divider.textPosition
  9448. },
  9449. // 文本内容
  9450. text: {
  9451. type: [String, Number],
  9452. default: props$G.divider.text
  9453. },
  9454. // 文本大小
  9455. textSize: {
  9456. type: [String, Number],
  9457. default: props$G.divider.textSize
  9458. },
  9459. // 文本颜色
  9460. textColor: {
  9461. type: String,
  9462. default: props$G.divider.textColor
  9463. },
  9464. // 线条颜色
  9465. lineColor: {
  9466. type: String,
  9467. default: props$G.divider.lineColor
  9468. }
  9469. }
  9470. };
  9471. const _sfc_main$1D = {
  9472. name: "u-divider",
  9473. mixins: [mpMixin, mixin, props$j],
  9474. computed: {
  9475. textStyle() {
  9476. const style = {};
  9477. style.fontSize = uni.$u.addUnit(this.textSize);
  9478. style.color = this.textColor;
  9479. return style;
  9480. },
  9481. // 左边线条的的样式
  9482. leftLineStyle() {
  9483. const style = {};
  9484. if (this.textPosition === "left") {
  9485. style.width = "80rpx";
  9486. } else {
  9487. style.flex = 1;
  9488. }
  9489. return style;
  9490. },
  9491. // 右边线条的的样式
  9492. rightLineStyle() {
  9493. const style = {};
  9494. if (this.textPosition === "right") {
  9495. style.width = "80rpx";
  9496. } else {
  9497. style.flex = 1;
  9498. }
  9499. return style;
  9500. }
  9501. },
  9502. methods: {
  9503. // divider组件被点击时触发
  9504. click() {
  9505. this.$emit("click");
  9506. }
  9507. }
  9508. };
  9509. function _sfc_render$1C(_ctx, _cache, $props, $setup, $data, $options) {
  9510. const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_1$b);
  9511. return vue.openBlock(), vue.createElementBlock(
  9512. "view",
  9513. {
  9514. class: "u-divider",
  9515. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)]),
  9516. onClick: _cache[0] || (_cache[0] = (...args) => $options.click && $options.click(...args))
  9517. },
  9518. [
  9519. vue.createVNode(_component_u_line, {
  9520. color: _ctx.lineColor,
  9521. customStyle: $options.leftLineStyle,
  9522. hairline: _ctx.hairline,
  9523. dashed: _ctx.dashed
  9524. }, null, 8, ["color", "customStyle", "hairline", "dashed"]),
  9525. _ctx.dot ? (vue.openBlock(), vue.createElementBlock("text", {
  9526. key: 0,
  9527. class: "u-divider__dot"
  9528. }, "●")) : _ctx.text ? (vue.openBlock(), vue.createElementBlock(
  9529. "text",
  9530. {
  9531. key: 1,
  9532. class: "u-divider__text",
  9533. style: vue.normalizeStyle([$options.textStyle])
  9534. },
  9535. vue.toDisplayString(_ctx.text),
  9536. 5
  9537. /* TEXT, STYLE */
  9538. )) : vue.createCommentVNode("v-if", true),
  9539. vue.createVNode(_component_u_line, {
  9540. color: _ctx.lineColor,
  9541. customStyle: $options.rightLineStyle,
  9542. hairline: _ctx.hairline,
  9543. dashed: _ctx.dashed
  9544. }, null, 8, ["color", "customStyle", "hairline", "dashed"])
  9545. ],
  9546. 4
  9547. /* STYLE */
  9548. );
  9549. }
  9550. const __easycom_4$3 = /* @__PURE__ */ _export_sfc(_sfc_main$1D, [["render", _sfc_render$1C], ["__scopeId", "data-v-ea022cee"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-divider/u-divider.vue"]]);
  9551. const _sfc_main$1C = {
  9552. __name: "quick-check",
  9553. setup(__props, { expose: __expose }) {
  9554. __expose();
  9555. const selectedBatchId = vue.ref("");
  9556. const showBatchSelector = vue.ref(false);
  9557. const count = vue.ref(0);
  9558. const formData = vue.ref({
  9559. batchNum: "",
  9560. packageCode: "",
  9561. searchType: "2",
  9562. packageStatus: ""
  9563. });
  9564. const batchList = vue.ref([]);
  9565. function getBatchList() {
  9566. uni.$u.http.get("/app/batchnum/pagelist").then((res) => {
  9567. batchList.value = res.rows;
  9568. });
  9569. }
  9570. getBatchList();
  9571. const openBatchSelector = () => {
  9572. showBatchSelector.value = true;
  9573. };
  9574. const selectBatch = (batch) => {
  9575. selectedBatchId.value = batch.id;
  9576. count.value = Number(batch.num);
  9577. formData.value.batchNum = batch.batchNum;
  9578. showBatchSelector.value = false;
  9579. };
  9580. const handleSearch = () => {
  9581. formatAppLog("log", "at pages/index/express/quick-check.vue:120", "查询:", formData.value.packageCode);
  9582. };
  9583. const handleSubmitBatch = () => {
  9584. formatAppLog("log", "at pages/index/express/quick-check.vue:125", "提交批次:", formData.value.batchNum);
  9585. if (!formData.value.batchNum) {
  9586. uni.$u.toast("请选择批次");
  9587. return;
  9588. }
  9589. if (!formData.value.packageCode) {
  9590. uni.$u.toast("请扫描/输入物流单号");
  9591. return;
  9592. }
  9593. uni.$u.http.post("/app/ordersign/deliverySign", formData.value).then((res) => {
  9594. formatAppLog("log", "at pages/index/express/quick-check.vue:135", res);
  9595. if (res.code == 200) {
  9596. let text = code + "快递验收成功";
  9597. uni.$u.ttsModule.speak(text);
  9598. } else {
  9599. let text = code + "订单不存在";
  9600. uni.$u.ttsModule.speak(text);
  9601. }
  9602. });
  9603. };
  9604. const handleScan2 = () => {
  9605. uni.scanCode({
  9606. success: (res) => {
  9607. formData.value.packageCode = res.result;
  9608. handleSubmitBatch();
  9609. }
  9610. });
  9611. };
  9612. const createNewBatch = () => {
  9613. uni.$u.http.post("/app/batchnum/add").then((res) => {
  9614. if (res.code == 200) {
  9615. getBatchList();
  9616. }
  9617. });
  9618. };
  9619. const { unregister } = uni.$u.useEventListener((e) => {
  9620. if (e.barcode) {
  9621. handleScanData(e.barcode);
  9622. }
  9623. });
  9624. vue.onUnmounted(() => {
  9625. unregister();
  9626. });
  9627. const __returned__ = { selectedBatchId, showBatchSelector, count, formData, batchList, getBatchList, openBatchSelector, selectBatch, handleSearch, handleSubmitBatch, handleScan: handleScan2, createNewBatch, unregister, ref: vue.ref, computed: vue.computed, nextTick: vue.nextTick, onUnmounted: vue.onUnmounted, get onLoad() {
  9628. return onLoad;
  9629. }, get onShow() {
  9630. return onShow;
  9631. } };
  9632. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  9633. return __returned__;
  9634. }
  9635. };
  9636. function _sfc_render$1B(_ctx, _cache, $props, $setup, $data, $options) {
  9637. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  9638. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  9639. const _component_u_radio = resolveEasycom(vue.resolveDynamicComponent("u-radio"), __easycom_0$9);
  9640. const _component_u_radio_group = resolveEasycom(vue.resolveDynamicComponent("u-radio-group"), __easycom_1$4);
  9641. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  9642. const _component_u_divider = resolveEasycom(vue.resolveDynamicComponent("u-divider"), __easycom_4$3);
  9643. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_7);
  9644. const _directive_permission = vue.resolveDirective("permission");
  9645. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  9646. vue.createCommentVNode(" 批次选择区域 "),
  9647. vue.createElementVNode("view", { class: "select-section" }, [
  9648. vue.createElementVNode("view", { class: "batch-select" }, [
  9649. vue.createElementVNode("text", { class: "required" }, "*"),
  9650. vue.createElementVNode("text", { style: { "font-size": "32rpx" } }, "批次:"),
  9651. vue.createElementVNode("view", { class: "batch-input" }, [
  9652. vue.createElementVNode("view", {
  9653. class: "batch-input-text",
  9654. onClick: $setup.openBatchSelector
  9655. }),
  9656. vue.createVNode(_component_u_input, {
  9657. modelValue: $setup.formData.batchNum,
  9658. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.formData.batchNum = $event),
  9659. placeholder: "请选择/新建批次",
  9660. readonly: "",
  9661. border: "surround",
  9662. "placeholder-style": "font-size: 32rpx",
  9663. "custom-style": "font-size: 32rpx;height: 88rpx;"
  9664. }, {
  9665. suffix: vue.withCtx(() => [
  9666. vue.createVNode(_component_u_icon, {
  9667. name: "arrow-down",
  9668. size: "18"
  9669. })
  9670. ]),
  9671. _: 1
  9672. /* STABLE */
  9673. }, 8, ["modelValue"])
  9674. ])
  9675. ])
  9676. ]),
  9677. vue.createCommentVNode(" 数量显示 "),
  9678. vue.createElementVNode("view", { class: "count-badge" }, [
  9679. vue.createTextVNode(" 数量 "),
  9680. vue.createElementVNode(
  9681. "text",
  9682. { style: { "font-size": "32rpx" } },
  9683. vue.toDisplayString($setup.count),
  9684. 1
  9685. /* TEXT */
  9686. )
  9687. ]),
  9688. vue.createCommentVNode(" 底部按钮 "),
  9689. vue.createElementVNode("view", { class: "footer" }, [
  9690. vue.createCommentVNode(" 查询区域 "),
  9691. vue.createElementVNode("view", { class: "query-section" }, [
  9692. vue.createVNode(_component_u_radio_group, {
  9693. modelValue: $setup.formData.searchType,
  9694. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.formData.searchType = $event),
  9695. class: "query-radio"
  9696. }, {
  9697. default: vue.withCtx(() => [
  9698. vue.createVNode(_component_u_radio, {
  9699. label: "查订单",
  9700. name: "1",
  9701. labelSize: "16px",
  9702. iconSize: "16px"
  9703. }),
  9704. vue.createVNode(_component_u_radio, {
  9705. label: "查物流",
  9706. "custom-style": "margin-left:20px",
  9707. name: "2",
  9708. labelSize: "16px",
  9709. iconSize: "16px"
  9710. })
  9711. ]),
  9712. _: 1
  9713. /* STABLE */
  9714. }, 8, ["modelValue"]),
  9715. vue.createElementVNode("view", { class: "search-box" }, [
  9716. vue.createVNode(_component_u_input, {
  9717. "custom-style": "font-size: 32rpx;",
  9718. "placeholder-style": "font-size: 32rpx;",
  9719. modelValue: $setup.formData.packageCode,
  9720. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.formData.packageCode = $event),
  9721. adjustPosition: true,
  9722. placeholder: "扫描/输入物流单号",
  9723. border: "surround",
  9724. clearable: ""
  9725. }, null, 8, ["modelValue"]),
  9726. vue.createVNode(_component_u_button, {
  9727. color: "#c8c8c8",
  9728. text: "查询",
  9729. onClick: $setup.handleSearch
  9730. })
  9731. ])
  9732. ]),
  9733. vue.createVNode(_component_u_divider),
  9734. vue.createElementVNode("view", { style: { "display": "flex" } }, [
  9735. vue.createVNode(_component_u_button, {
  9736. size: "large",
  9737. type: "warning",
  9738. text: "验收扫码",
  9739. onClick: $setup.handleScan
  9740. }),
  9741. vue.withDirectives(vue.createVNode(
  9742. _component_u_button,
  9743. {
  9744. size: "large",
  9745. type: "primary",
  9746. text: "提交批次",
  9747. onClick: $setup.handleSubmitBatch
  9748. },
  9749. null,
  9750. 512
  9751. /* NEED_PATCH */
  9752. ), [
  9753. [_directive_permission, "app:express:quickCheck:confirm"]
  9754. ])
  9755. ])
  9756. ]),
  9757. vue.createCommentVNode(" 批次选择弹窗 "),
  9758. vue.createVNode(_component_u_popup, {
  9759. show: $setup.showBatchSelector,
  9760. mode: "bottom",
  9761. onClose: _cache[3] || (_cache[3] = ($event) => $setup.showBatchSelector = false)
  9762. }, {
  9763. default: vue.withCtx(() => [
  9764. vue.createElementVNode("view", {
  9765. class: "batch-popup",
  9766. style: { "min-height": "300px" }
  9767. }, [
  9768. vue.createElementVNode("view", { class: "popup-header" }, [
  9769. vue.createElementVNode("text", { style: { "font-size": "32rpx" } }, "批次"),
  9770. vue.createElementVNode("view", {
  9771. style: { "font-size": "32rpx", "color": "#007AFF" },
  9772. onClick: $setup.createNewBatch
  9773. }, [
  9774. vue.createElementVNode("text", null, "新建批次")
  9775. ])
  9776. ]),
  9777. vue.createElementVNode("scroll-view", {
  9778. "scroll-y": "",
  9779. class: "batch-list"
  9780. }, [
  9781. (vue.openBlock(true), vue.createElementBlock(
  9782. vue.Fragment,
  9783. null,
  9784. vue.renderList($setup.batchList, (batch) => {
  9785. return vue.openBlock(), vue.createElementBlock("view", {
  9786. key: batch.id,
  9787. class: vue.normalizeClass(["batch-item", { active: $setup.selectedBatchId === batch.id }]),
  9788. onClick: ($event) => $setup.selectBatch(batch)
  9789. }, [
  9790. vue.createElementVNode(
  9791. "text",
  9792. null,
  9793. vue.toDisplayString(batch.batchNum),
  9794. 1
  9795. /* TEXT */
  9796. ),
  9797. vue.createElementVNode(
  9798. "text",
  9799. null,
  9800. vue.toDisplayString(batch.num),
  9801. 1
  9802. /* TEXT */
  9803. )
  9804. ], 10, ["onClick"]);
  9805. }),
  9806. 128
  9807. /* KEYED_FRAGMENT */
  9808. ))
  9809. ])
  9810. ])
  9811. ]),
  9812. _: 1
  9813. /* STABLE */
  9814. }, 8, ["show"])
  9815. ]);
  9816. }
  9817. const PagesIndexExpressQuickCheck = /* @__PURE__ */ _export_sfc(_sfc_main$1C, [["render", _sfc_render$1B], ["__scopeId", "data-v-61cc11f4"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/index/express/quick-check.vue"]]);
  9818. const keymap = {
  9819. "7": "0",
  9820. "8": "1",
  9821. "9": "2",
  9822. "10": "3",
  9823. "11": "4",
  9824. "12": "5",
  9825. "13": "6",
  9826. "14": "7",
  9827. "15": "8",
  9828. "16": "9",
  9829. "29": "A",
  9830. "30": "B",
  9831. "31": "C",
  9832. "32": "D",
  9833. "33": "E",
  9834. "34": "F",
  9835. "35": "G",
  9836. "36": "H",
  9837. "37": "I",
  9838. "38": "J",
  9839. "39": "K",
  9840. "40": "L",
  9841. "41": "M",
  9842. "42": "N",
  9843. "43": "O",
  9844. "44": "P",
  9845. "45": "Q",
  9846. "46": "R",
  9847. "47": "S",
  9848. "48": "T",
  9849. "49": "U",
  9850. "50": "V",
  9851. "51": "W",
  9852. "52": "X",
  9853. "53": "Y",
  9854. "54": "Z",
  9855. "55": ",",
  9856. "56": ".",
  9857. "59": "",
  9858. "69": "-",
  9859. "70": "=",
  9860. "81": "+"
  9861. };
  9862. const _sfc_main$1B = {
  9863. __name: "quick-unpack",
  9864. setup(__props, { expose: __expose }) {
  9865. __expose();
  9866. function goScan() {
  9867. uni.navigateTo({
  9868. url: "/pages/index/express/scan"
  9869. });
  9870. }
  9871. const unpackCode = vue.ref("");
  9872. function confirmTrackingNumber(code2) {
  9873. uni.$u.http.post("/app/ordersign/unpackingSign", {
  9874. packageCode: code2
  9875. }).then((res) => {
  9876. if (res.code == 200) {
  9877. let text = code2 + "拆包成功";
  9878. uni.$u.ttsModule.speak(text);
  9879. } else {
  9880. let text = code2 + res.msg;
  9881. uni.$u.ttsModule.speak(text);
  9882. }
  9883. });
  9884. }
  9885. function scanCode() {
  9886. uni.scanCode({
  9887. success: (res) => {
  9888. unpackCode.value = res.result;
  9889. confirmTrackingNumber(res.result);
  9890. formatAppLog("log", "at pages/index/express/quick-unpack.vue:68", "扫码结果:", res.result);
  9891. },
  9892. fail: (err) => {
  9893. formatAppLog("error", "at pages/index/express/quick-unpack.vue:71", "扫码失败:", err);
  9894. }
  9895. });
  9896. }
  9897. const inputCache = vue.ref("");
  9898. const keypress = (e) => {
  9899. if (e.keyCode === 66 || e.key == "Enter") {
  9900. unpackCode.value = inputCache.value;
  9901. confirmTrackingNumber(unpackCode.value);
  9902. inputCache.value = "";
  9903. } else {
  9904. inputCache.value += keymap[e.keyCode] || "";
  9905. }
  9906. };
  9907. const { unregister } = uni.$u.useEventListener((e) => {
  9908. unpackCode.value = e.barcode;
  9909. confirmTrackingNumber(e.barcode);
  9910. });
  9911. onLoad(() => {
  9912. plus.key.addEventListener("keyup", keypress);
  9913. });
  9914. vue.onUnmounted(() => {
  9915. plus.key.removeEventListener("keyup", keypress);
  9916. });
  9917. vue.onUnmounted(() => {
  9918. unregister();
  9919. });
  9920. const __returned__ = { goScan, unpackCode, confirmTrackingNumber, scanCode, inputCache, keypress, unregister, ref: vue.ref, onUnmounted: vue.onUnmounted, get onLoad() {
  9921. return onLoad;
  9922. }, get onShow() {
  9923. return onShow;
  9924. }, get keymap() {
  9925. return keymap;
  9926. } };
  9927. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  9928. return __returned__;
  9929. }
  9930. };
  9931. function _sfc_render$1A(_ctx, _cache, $props, $setup, $data, $options) {
  9932. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  9933. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  9934. const _directive_permission = vue.resolveDirective("permission");
  9935. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  9936. vue.createCommentVNode(' <view class="container">\n <button @click="initBluetooth" :disabled="isInitializing">初始化蓝牙</button>\n <button @click="startDiscovery" :disabled="isDiscovering || !isBluetoothOpened">开始搜索设备</button>\n <button @click="connectDevice" :disabled="!selectedDevice || isConnecting">连接设备</button>\n <button @click="startDataMonitor" :disabled="!isConnected">开始监听数据</button>\n <view v-if="scanData">扫描结果: {{ scanData }}</view>\n </view> '),
  9937. vue.createCommentVNode(' <u-button type="primary" @click="goScan" text="扫码" /> '),
  9938. vue.createElementVNode("view", { class: "main-content" }, [
  9939. vue.createElementVNode("view", { class: "input-group" }, [
  9940. vue.createVNode(_component_u_input, {
  9941. "placeholder-style": "font-size:32rpx",
  9942. modelValue: $setup.unpackCode,
  9943. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.unpackCode = $event),
  9944. placeholder: "扫描/输入物流单号",
  9945. border: "surround"
  9946. }, null, 8, ["modelValue"]),
  9947. vue.withDirectives(vue.createVNode(
  9948. _component_u_button,
  9949. {
  9950. type: "primary",
  9951. onClick: _cache[1] || (_cache[1] = ($event) => $setup.confirmTrackingNumber($setup.unpackCode)),
  9952. text: "确定"
  9953. },
  9954. null,
  9955. 512
  9956. /* NEED_PATCH */
  9957. ), [
  9958. [_directive_permission, "app:express:quickUnpack:confirm"]
  9959. ])
  9960. ])
  9961. ]),
  9962. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  9963. vue.createVNode(_component_u_button, {
  9964. size: "large",
  9965. type: "success",
  9966. onClick: $setup.scanCode,
  9967. text: "扫码",
  9968. class: "scan-button"
  9969. })
  9970. ])
  9971. ]);
  9972. }
  9973. const PagesIndexExpressQuickUnpack = /* @__PURE__ */ _export_sfc(_sfc_main$1B, [["render", _sfc_render$1A], ["__scopeId", "data-v-cd1b3ab5"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/index/express/quick-unpack.vue"]]);
  9974. const props$i = {
  9975. props: {
  9976. // tab的数据
  9977. list: {
  9978. type: Array,
  9979. default: props$G.subsection.list
  9980. },
  9981. // 当前活动的tab的index
  9982. current: {
  9983. type: [String, Number],
  9984. default: props$G.subsection.current
  9985. },
  9986. // 激活的颜色
  9987. activeColor: {
  9988. type: String,
  9989. default: props$G.subsection.activeColor
  9990. },
  9991. // 未激活的颜色
  9992. inactiveColor: {
  9993. type: String,
  9994. default: props$G.subsection.inactiveColor
  9995. },
  9996. // 模式选择,mode=button为按钮形式,mode=subsection时为分段模式
  9997. mode: {
  9998. type: String,
  9999. default: props$G.subsection.mode
  10000. },
  10001. // 字体大小
  10002. fontSize: {
  10003. type: [String, Number],
  10004. default: props$G.subsection.fontSize
  10005. },
  10006. // 激活tab的字体是否加粗
  10007. bold: {
  10008. type: Boolean,
  10009. default: props$G.subsection.bold
  10010. },
  10011. // mode = button时,组件背景颜色
  10012. bgColor: {
  10013. type: String,
  10014. default: props$G.subsection.bgColor
  10015. },
  10016. // 从list元素对象中读取的键名
  10017. keyName: {
  10018. type: String,
  10019. default: props$G.subsection.keyName
  10020. }
  10021. }
  10022. };
  10023. const _sfc_main$1A = {
  10024. name: "u-subsection",
  10025. mixins: [mpMixin, mixin, props$i],
  10026. data() {
  10027. return {
  10028. // 组件尺寸
  10029. itemRect: {
  10030. width: 0,
  10031. height: 0
  10032. }
  10033. };
  10034. },
  10035. watch: {
  10036. list(newValue, oldValue) {
  10037. this.init();
  10038. },
  10039. current: {
  10040. immediate: true,
  10041. handler(n) {
  10042. }
  10043. }
  10044. },
  10045. computed: {
  10046. wrapperStyle() {
  10047. const style = {};
  10048. if (this.mode === "button") {
  10049. style.backgroundColor = this.bgColor;
  10050. }
  10051. return style;
  10052. },
  10053. // 滑块的样式
  10054. barStyle() {
  10055. const style = {};
  10056. style.width = `${this.itemRect.width}px`;
  10057. style.height = `${this.itemRect.height}px`;
  10058. style.transform = `translateX(${this.current * this.itemRect.width}px)`;
  10059. if (this.mode === "subsection") {
  10060. style.backgroundColor = this.activeColor;
  10061. }
  10062. return style;
  10063. },
  10064. // 分段器item的样式
  10065. itemStyle(index2) {
  10066. return (index3) => {
  10067. const style = {};
  10068. if (this.mode === "subsection") {
  10069. style.borderColor = this.activeColor;
  10070. style.borderWidth = "1px";
  10071. style.borderStyle = "solid";
  10072. }
  10073. return style;
  10074. };
  10075. },
  10076. // 分段器文字颜色
  10077. textStyle(index2) {
  10078. return (index3) => {
  10079. const style = {};
  10080. style.fontWeight = this.bold && this.current === index3 ? "bold" : "normal";
  10081. style.fontSize = uni.$u.addUnit(this.fontSize);
  10082. if (this.mode === "subsection") {
  10083. style.color = this.current === index3 ? "#fff" : this.inactiveColor;
  10084. } else {
  10085. style.color = this.current === index3 ? this.activeColor : this.inactiveColor;
  10086. }
  10087. return style;
  10088. };
  10089. }
  10090. },
  10091. mounted() {
  10092. this.init();
  10093. },
  10094. methods: {
  10095. init() {
  10096. uni.$u.sleep().then(() => this.getRect());
  10097. },
  10098. // 判断展示文本
  10099. getText(item) {
  10100. return typeof item === "object" ? item[this.keyName] : item;
  10101. },
  10102. // 获取组件的尺寸
  10103. getRect() {
  10104. this.$uGetRect(".u-subsection__item--0").then((size) => {
  10105. this.itemRect = size;
  10106. });
  10107. },
  10108. clickHandler(index2) {
  10109. this.$emit("change", index2);
  10110. }
  10111. }
  10112. };
  10113. function _sfc_render$1z(_ctx, _cache, $props, $setup, $data, $options) {
  10114. return vue.openBlock(), vue.createElementBlock(
  10115. "view",
  10116. {
  10117. class: vue.normalizeClass(["u-subsection", [`u-subsection--${_ctx.mode}`]]),
  10118. ref: "u-subsection",
  10119. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle), $options.wrapperStyle])
  10120. },
  10121. [
  10122. vue.createElementVNode(
  10123. "view",
  10124. {
  10125. class: vue.normalizeClass(["u-subsection__bar", [
  10126. _ctx.mode === "button" && "u-subsection--button__bar",
  10127. _ctx.current === 0 && _ctx.mode === "subsection" && "u-subsection__bar--first",
  10128. _ctx.current > 0 && _ctx.current < _ctx.list.length - 1 && _ctx.mode === "subsection" && "u-subsection__bar--center",
  10129. _ctx.current === _ctx.list.length - 1 && _ctx.mode === "subsection" && "u-subsection__bar--last"
  10130. ]]),
  10131. ref: "u-subsection__bar",
  10132. style: vue.normalizeStyle([$options.barStyle])
  10133. },
  10134. null,
  10135. 6
  10136. /* CLASS, STYLE */
  10137. ),
  10138. (vue.openBlock(true), vue.createElementBlock(
  10139. vue.Fragment,
  10140. null,
  10141. vue.renderList(_ctx.list, (item, index2) => {
  10142. return vue.openBlock(), vue.createElementBlock("view", {
  10143. class: vue.normalizeClass(["u-subsection__item", [
  10144. `u-subsection__item--${index2}`,
  10145. index2 < _ctx.list.length - 1 && "u-subsection__item--no-border-right",
  10146. index2 === 0 && "u-subsection__item--first",
  10147. index2 === _ctx.list.length - 1 && "u-subsection__item--last"
  10148. ]]),
  10149. ref_for: true,
  10150. ref: `u-subsection__item--${index2}`,
  10151. style: vue.normalizeStyle([$options.itemStyle(index2)]),
  10152. onClick: ($event) => $options.clickHandler(index2),
  10153. key: index2
  10154. }, [
  10155. vue.createElementVNode(
  10156. "text",
  10157. {
  10158. class: "u-subsection__item__text",
  10159. style: vue.normalizeStyle([$options.textStyle(index2)])
  10160. },
  10161. vue.toDisplayString($options.getText(item)),
  10162. 5
  10163. /* TEXT, STYLE */
  10164. )
  10165. ], 14, ["onClick"]);
  10166. }),
  10167. 128
  10168. /* KEYED_FRAGMENT */
  10169. ))
  10170. ],
  10171. 6
  10172. /* CLASS, STYLE */
  10173. );
  10174. }
  10175. const __easycom_0$8 = /* @__PURE__ */ _export_sfc(_sfc_main$1A, [["render", _sfc_render$1z], ["__scopeId", "data-v-b5ccb67e"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-subsection/u-subsection.vue"]]);
  10176. const props$h = {
  10177. props: {
  10178. // 吸顶容器到顶部某个距离的时候,进行吸顶,在H5平台,NavigationBar为44px
  10179. offsetTop: {
  10180. type: [String, Number],
  10181. default: props$G.sticky.offsetTop
  10182. },
  10183. // 自定义导航栏的高度
  10184. customNavHeight: {
  10185. type: [String, Number],
  10186. default: props$G.sticky.customNavHeight
  10187. },
  10188. // 是否开启吸顶功能
  10189. disabled: {
  10190. type: Boolean,
  10191. default: props$G.sticky.disabled
  10192. },
  10193. // 吸顶区域的背景颜色
  10194. bgColor: {
  10195. type: String,
  10196. default: props$G.sticky.bgColor
  10197. },
  10198. // z-index值
  10199. zIndex: {
  10200. type: [String, Number],
  10201. default: props$G.sticky.zIndex
  10202. },
  10203. // 列表中的索引值
  10204. index: {
  10205. type: [String, Number],
  10206. default: props$G.sticky.index
  10207. }
  10208. }
  10209. };
  10210. const _sfc_main$1z = {
  10211. name: "u-sticky",
  10212. mixins: [mpMixin, mixin, props$h],
  10213. data() {
  10214. return {
  10215. cssSticky: false,
  10216. // 是否使用css的sticky实现
  10217. stickyTop: 0,
  10218. // 吸顶的top值,因为可能受自定义导航栏影响,最终的吸顶值非offsetTop值
  10219. elId: uni.$u.guid(),
  10220. left: 0,
  10221. // js模式时,吸顶的内容因为处于postition: fixed模式,为了和原来保持一致的样式,需要记录并重新设置它的left,height,width属性
  10222. width: "auto",
  10223. height: "auto",
  10224. fixed: false
  10225. // js模式时,是否处于吸顶模式
  10226. };
  10227. },
  10228. computed: {
  10229. style() {
  10230. const style = {};
  10231. if (!this.disabled) {
  10232. if (this.cssSticky) {
  10233. style.position = "sticky";
  10234. style.zIndex = this.uZindex;
  10235. style.top = uni.$u.addUnit(this.stickyTop);
  10236. } else {
  10237. style.height = this.fixed ? this.height + "px" : "auto";
  10238. }
  10239. } else {
  10240. style.position = "static";
  10241. }
  10242. style.backgroundColor = this.bgColor;
  10243. return uni.$u.deepMerge(uni.$u.addStyle(this.customStyle), style);
  10244. },
  10245. // 吸顶内容的样式
  10246. stickyContent() {
  10247. const style = {};
  10248. if (!this.cssSticky) {
  10249. style.position = this.fixed ? "fixed" : "static";
  10250. style.top = this.stickyTop + "px";
  10251. style.left = this.left + "px";
  10252. style.width = this.width == "auto" ? "auto" : this.width + "px";
  10253. style.zIndex = this.uZindex;
  10254. }
  10255. return style;
  10256. },
  10257. uZindex() {
  10258. return this.zIndex ? this.zIndex : uni.$u.zIndex.sticky;
  10259. }
  10260. },
  10261. mounted() {
  10262. this.init();
  10263. },
  10264. methods: {
  10265. init() {
  10266. this.getStickyTop();
  10267. this.checkSupportCssSticky();
  10268. if (!this.cssSticky) {
  10269. !this.disabled && this.initObserveContent();
  10270. }
  10271. },
  10272. initObserveContent() {
  10273. this.$uGetRect("#" + this.elId).then((res) => {
  10274. this.height = res.height;
  10275. this.left = res.left;
  10276. this.width = res.width;
  10277. this.$nextTick(() => {
  10278. this.observeContent();
  10279. });
  10280. });
  10281. },
  10282. observeContent() {
  10283. this.disconnectObserver("contentObserver");
  10284. const contentObserver = uni.createIntersectionObserver({
  10285. // 检测的区间范围
  10286. thresholds: [0.95, 0.98, 1]
  10287. });
  10288. contentObserver.relativeToViewport({
  10289. top: -this.stickyTop
  10290. });
  10291. contentObserver.observe(`#${this.elId}`, (res) => {
  10292. this.setFixed(res.boundingClientRect.top);
  10293. });
  10294. this.contentObserver = contentObserver;
  10295. },
  10296. setFixed(top) {
  10297. const fixed = top <= this.stickyTop;
  10298. this.fixed = fixed;
  10299. },
  10300. disconnectObserver(observerName) {
  10301. const observer = this[observerName];
  10302. observer && observer.disconnect();
  10303. },
  10304. getStickyTop() {
  10305. this.stickyTop = uni.$u.getPx(this.offsetTop) + uni.$u.getPx(this.customNavHeight);
  10306. },
  10307. async checkSupportCssSticky() {
  10308. if (uni.$u.os() === "android" && Number(uni.$u.sys().system) > 8) {
  10309. this.cssSticky = true;
  10310. }
  10311. this.cssSticky = await this.checkComputedStyle();
  10312. if (uni.$u.os() === "ios") {
  10313. this.cssSticky = true;
  10314. }
  10315. },
  10316. // 在APP和微信小程序上,通过uni.createSelectorQuery可以判断是否支持css sticky
  10317. checkComputedStyle() {
  10318. return new Promise((resolve) => {
  10319. uni.createSelectorQuery().in(this).select(".u-sticky").fields({
  10320. computedStyle: ["position"]
  10321. }).exec((e) => {
  10322. resolve("sticky" === e[0].position);
  10323. });
  10324. });
  10325. },
  10326. // H5通过创建元素的形式嗅探是否支持css sticky
  10327. // 判断浏览器是否支持sticky属性
  10328. checkCssStickyForH5() {
  10329. }
  10330. },
  10331. beforeDestroy() {
  10332. this.disconnectObserver("contentObserver");
  10333. }
  10334. };
  10335. function _sfc_render$1y(_ctx, _cache, $props, $setup, $data, $options) {
  10336. return vue.openBlock(), vue.createElementBlock("view", {
  10337. class: "u-sticky",
  10338. id: $data.elId,
  10339. style: vue.normalizeStyle([$options.style])
  10340. }, [
  10341. vue.createElementVNode(
  10342. "view",
  10343. {
  10344. style: vue.normalizeStyle([$options.stickyContent]),
  10345. class: "u-sticky__content"
  10346. },
  10347. [
  10348. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  10349. ],
  10350. 4
  10351. /* STYLE */
  10352. )
  10353. ], 12, ["id"]);
  10354. }
  10355. const __easycom_0$7 = /* @__PURE__ */ _export_sfc(_sfc_main$1z, [["render", _sfc_render$1y], ["__scopeId", "data-v-8b303089"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-sticky/u-sticky.vue"]]);
  10356. const props$g = {
  10357. props: {
  10358. // 是否展示modal
  10359. show: {
  10360. type: Boolean,
  10361. default: props$G.modal.show
  10362. },
  10363. // 标题
  10364. title: {
  10365. type: [String],
  10366. default: props$G.modal.title
  10367. },
  10368. // 弹窗内容
  10369. content: {
  10370. type: String,
  10371. default: props$G.modal.content
  10372. },
  10373. // 确认文案
  10374. confirmText: {
  10375. type: String,
  10376. default: props$G.modal.confirmText
  10377. },
  10378. // 取消文案
  10379. cancelText: {
  10380. type: String,
  10381. default: props$G.modal.cancelText
  10382. },
  10383. // 是否显示确认按钮
  10384. showConfirmButton: {
  10385. type: Boolean,
  10386. default: props$G.modal.showConfirmButton
  10387. },
  10388. // 是否显示取消按钮
  10389. showCancelButton: {
  10390. type: Boolean,
  10391. default: props$G.modal.showCancelButton
  10392. },
  10393. // 确认按钮颜色
  10394. confirmColor: {
  10395. type: String,
  10396. default: props$G.modal.confirmColor
  10397. },
  10398. // 取消文字颜色
  10399. cancelColor: {
  10400. type: String,
  10401. default: props$G.modal.cancelColor
  10402. },
  10403. // 对调确认和取消的位置
  10404. buttonReverse: {
  10405. type: Boolean,
  10406. default: props$G.modal.buttonReverse
  10407. },
  10408. // 是否开启缩放效果
  10409. zoom: {
  10410. type: Boolean,
  10411. default: props$G.modal.zoom
  10412. },
  10413. // 是否异步关闭,只对确定按钮有效
  10414. asyncClose: {
  10415. type: Boolean,
  10416. default: props$G.modal.asyncClose
  10417. },
  10418. // 是否允许点击遮罩关闭modal
  10419. closeOnClickOverlay: {
  10420. type: Boolean,
  10421. default: props$G.modal.closeOnClickOverlay
  10422. },
  10423. // 给一个负的margin-top,往上偏移,避免和键盘重合的情况
  10424. negativeTop: {
  10425. type: [String, Number],
  10426. default: props$G.modal.negativeTop
  10427. },
  10428. // modal宽度,不支持百分比,可以数值,px,rpx单位
  10429. width: {
  10430. type: [String, Number],
  10431. default: props$G.modal.width
  10432. },
  10433. // 确认按钮的样式,circle-圆形,square-方形,如设置,将不会显示取消按钮
  10434. confirmButtonShape: {
  10435. type: String,
  10436. default: props$G.modal.confirmButtonShape
  10437. }
  10438. }
  10439. };
  10440. const _sfc_main$1y = {
  10441. name: "u-modal",
  10442. mixins: [mpMixin, mixin, props$g],
  10443. data() {
  10444. return {
  10445. loading: false
  10446. };
  10447. },
  10448. watch: {
  10449. show(n) {
  10450. if (n && this.loading)
  10451. this.loading = false;
  10452. }
  10453. },
  10454. methods: {
  10455. // 点击确定按钮
  10456. confirmHandler() {
  10457. if (this.asyncClose) {
  10458. this.loading = true;
  10459. }
  10460. this.$emit("confirm");
  10461. },
  10462. // 点击取消按钮
  10463. cancelHandler() {
  10464. this.$emit("cancel");
  10465. },
  10466. // 点击遮罩
  10467. // 从原理上来说,modal的遮罩点击,并不是真的点击到了遮罩
  10468. // 因为modal依赖于popup的中部弹窗类型,中部弹窗比较特殊,虽有然遮罩,但是为了让弹窗内容能flex居中
  10469. // 多了一个透明的遮罩,此透明的遮罩会覆盖在灰色的遮罩上,所以实际上是点击不到灰色遮罩的,popup内部在
  10470. // 透明遮罩的子元素做了.stop处理,所以点击内容区,也不会导致误触发
  10471. clickHandler() {
  10472. if (this.closeOnClickOverlay) {
  10473. this.$emit("close");
  10474. }
  10475. }
  10476. }
  10477. };
  10478. function _sfc_render$1x(_ctx, _cache, $props, $setup, $data, $options) {
  10479. const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_1$b);
  10480. const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$e);
  10481. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_7);
  10482. return vue.openBlock(), vue.createBlock(_component_u_popup, {
  10483. mode: "center",
  10484. zoom: _ctx.zoom,
  10485. show: _ctx.show,
  10486. customStyle: {
  10487. borderRadius: "6px",
  10488. overflow: "hidden",
  10489. marginTop: `-${_ctx.$u.addUnit(_ctx.negativeTop)}`
  10490. },
  10491. closeOnClickOverlay: _ctx.closeOnClickOverlay,
  10492. safeAreaInsetBottom: false,
  10493. duration: 400,
  10494. onClick: $options.clickHandler
  10495. }, {
  10496. default: vue.withCtx(() => [
  10497. vue.createElementVNode(
  10498. "view",
  10499. {
  10500. class: "u-modal",
  10501. style: vue.normalizeStyle({
  10502. width: _ctx.$u.addUnit(_ctx.width)
  10503. })
  10504. },
  10505. [
  10506. _ctx.title ? (vue.openBlock(), vue.createElementBlock(
  10507. "text",
  10508. {
  10509. key: 0,
  10510. class: "u-modal__title"
  10511. },
  10512. vue.toDisplayString(_ctx.title),
  10513. 1
  10514. /* TEXT */
  10515. )) : vue.createCommentVNode("v-if", true),
  10516. vue.createElementVNode(
  10517. "view",
  10518. {
  10519. class: "u-modal__content",
  10520. style: vue.normalizeStyle({
  10521. paddingTop: `${_ctx.title ? 12 : 25}px`
  10522. })
  10523. },
  10524. [
  10525. vue.renderSlot(_ctx.$slots, "default", {}, () => [
  10526. vue.createElementVNode(
  10527. "text",
  10528. { class: "u-modal__content__text" },
  10529. vue.toDisplayString(_ctx.content),
  10530. 1
  10531. /* TEXT */
  10532. )
  10533. ], true)
  10534. ],
  10535. 4
  10536. /* STYLE */
  10537. ),
  10538. _ctx.$slots.confirmButton ? (vue.openBlock(), vue.createElementBlock("view", {
  10539. key: 1,
  10540. class: "u-modal__button-group--confirm-button"
  10541. }, [
  10542. vue.renderSlot(_ctx.$slots, "confirmButton", {}, void 0, true)
  10543. ])) : (vue.openBlock(), vue.createElementBlock(
  10544. vue.Fragment,
  10545. { key: 2 },
  10546. [
  10547. vue.createVNode(_component_u_line),
  10548. vue.createElementVNode(
  10549. "view",
  10550. {
  10551. class: "u-modal__button-group",
  10552. style: vue.normalizeStyle({
  10553. flexDirection: _ctx.buttonReverse ? "row-reverse" : "row"
  10554. })
  10555. },
  10556. [
  10557. _ctx.showCancelButton ? (vue.openBlock(), vue.createElementBlock(
  10558. "view",
  10559. {
  10560. key: 0,
  10561. class: vue.normalizeClass(["u-modal__button-group__wrapper u-modal__button-group__wrapper--cancel", [_ctx.showCancelButton && !_ctx.showConfirmButton && "u-modal__button-group__wrapper--only-cancel"]]),
  10562. "hover-stay-time": 150,
  10563. "hover-class": "u-modal__button-group__wrapper--hover",
  10564. onClick: _cache[0] || (_cache[0] = (...args) => $options.cancelHandler && $options.cancelHandler(...args))
  10565. },
  10566. [
  10567. vue.createElementVNode(
  10568. "text",
  10569. {
  10570. class: "u-modal__button-group__wrapper__text",
  10571. style: vue.normalizeStyle({
  10572. color: _ctx.cancelColor
  10573. })
  10574. },
  10575. vue.toDisplayString(_ctx.cancelText),
  10576. 5
  10577. /* TEXT, STYLE */
  10578. )
  10579. ],
  10580. 2
  10581. /* CLASS */
  10582. )) : vue.createCommentVNode("v-if", true),
  10583. _ctx.showConfirmButton && _ctx.showCancelButton ? (vue.openBlock(), vue.createBlock(_component_u_line, {
  10584. key: 1,
  10585. direction: "column"
  10586. })) : vue.createCommentVNode("v-if", true),
  10587. _ctx.showConfirmButton ? (vue.openBlock(), vue.createElementBlock(
  10588. "view",
  10589. {
  10590. key: 2,
  10591. class: vue.normalizeClass(["u-modal__button-group__wrapper u-modal__button-group__wrapper--confirm", [!_ctx.showCancelButton && _ctx.showConfirmButton && "u-modal__button-group__wrapper--only-confirm"]]),
  10592. "hover-stay-time": 150,
  10593. "hover-class": "u-modal__button-group__wrapper--hover",
  10594. onClick: _cache[1] || (_cache[1] = (...args) => $options.confirmHandler && $options.confirmHandler(...args))
  10595. },
  10596. [
  10597. $data.loading ? (vue.openBlock(), vue.createBlock(_component_u_loading_icon, { key: 0 })) : (vue.openBlock(), vue.createElementBlock(
  10598. "text",
  10599. {
  10600. key: 1,
  10601. class: "u-modal__button-group__wrapper__text",
  10602. style: vue.normalizeStyle({
  10603. color: _ctx.confirmColor
  10604. })
  10605. },
  10606. vue.toDisplayString(_ctx.confirmText),
  10607. 5
  10608. /* TEXT, STYLE */
  10609. ))
  10610. ],
  10611. 2
  10612. /* CLASS */
  10613. )) : vue.createCommentVNode("v-if", true)
  10614. ],
  10615. 4
  10616. /* STYLE */
  10617. )
  10618. ],
  10619. 64
  10620. /* STABLE_FRAGMENT */
  10621. ))
  10622. ],
  10623. 4
  10624. /* STYLE */
  10625. )
  10626. ]),
  10627. _: 3
  10628. /* FORWARDED */
  10629. }, 8, ["zoom", "show", "customStyle", "closeOnClickOverlay", "onClick"]);
  10630. }
  10631. const __easycom_1$3 = /* @__PURE__ */ _export_sfc(_sfc_main$1y, [["render", _sfc_render$1x], ["__scopeId", "data-v-f667648f"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-modal/u-modal.vue"]]);
  10632. const _sfc_main$1x = {
  10633. __name: "ApproveButton",
  10634. emits: ["approve"],
  10635. setup(__props, { expose: __expose, emit: __emit }) {
  10636. __expose();
  10637. const emit2 = __emit;
  10638. const showConfirmModal = vue.ref(false);
  10639. const handleApprove = () => {
  10640. showConfirmModal.value = true;
  10641. };
  10642. const confirmApprove = () => {
  10643. emit2("approve");
  10644. showConfirmModal.value = false;
  10645. };
  10646. const __returned__ = { emit: emit2, showConfirmModal, handleApprove, confirmApprove, ref: vue.ref };
  10647. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  10648. return __returned__;
  10649. }
  10650. };
  10651. function _sfc_render$1w(_ctx, _cache, $props, $setup, $data, $options) {
  10652. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  10653. const _component_u_modal = resolveEasycom(vue.resolveDynamicComponent("u-modal"), __easycom_1$3);
  10654. return vue.openBlock(), vue.createElementBlock("view", { style: { "width": "50%" } }, [
  10655. vue.createVNode(
  10656. _component_u_button,
  10657. vue.mergeProps({
  10658. type: "success",
  10659. text: "同意",
  10660. size: "small",
  10661. onClick: $setup.handleApprove
  10662. }, _ctx.$attrs),
  10663. null,
  10664. 16
  10665. /* FULL_PROPS */
  10666. ),
  10667. vue.createCommentVNode(" 确认弹窗 "),
  10668. vue.createVNode(_component_u_modal, {
  10669. show: $setup.showConfirmModal,
  10670. title: "确认",
  10671. content: "确认收到货了吗?",
  10672. onConfirm: $setup.confirmApprove,
  10673. showCancelButton: "",
  10674. "content-style": { textAlign: "center" },
  10675. onCancel: _cache[0] || (_cache[0] = ($event) => $setup.showConfirmModal = false)
  10676. }, null, 8, ["show"])
  10677. ]);
  10678. }
  10679. const ApproveButton = /* @__PURE__ */ _export_sfc(_sfc_main$1x, [["render", _sfc_render$1w], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/index/express/components/ApproveButton.vue"]]);
  10680. const props$f = {
  10681. props: {
  10682. // 是否展示工具条
  10683. show: {
  10684. type: Boolean,
  10685. default: props$G.toolbar.show
  10686. },
  10687. // 取消按钮的文字
  10688. cancelText: {
  10689. type: String,
  10690. default: props$G.toolbar.cancelText
  10691. },
  10692. // 确认按钮的文字
  10693. confirmText: {
  10694. type: String,
  10695. default: props$G.toolbar.confirmText
  10696. },
  10697. // 取消按钮的颜色
  10698. cancelColor: {
  10699. type: String,
  10700. default: props$G.toolbar.cancelColor
  10701. },
  10702. // 确认按钮的颜色
  10703. confirmColor: {
  10704. type: String,
  10705. default: props$G.toolbar.confirmColor
  10706. },
  10707. // 标题文字
  10708. title: {
  10709. type: String,
  10710. default: props$G.toolbar.title
  10711. }
  10712. }
  10713. };
  10714. const _sfc_main$1w = {
  10715. name: "u-toolbar",
  10716. mixins: [mpMixin, mixin, props$f],
  10717. methods: {
  10718. // 点击取消按钮
  10719. cancel() {
  10720. this.$emit("cancel");
  10721. },
  10722. // 点击确定按钮
  10723. confirm() {
  10724. this.$emit("confirm");
  10725. }
  10726. }
  10727. };
  10728. function _sfc_render$1v(_ctx, _cache, $props, $setup, $data, $options) {
  10729. return _ctx.show ? (vue.openBlock(), vue.createElementBlock(
  10730. "view",
  10731. {
  10732. key: 0,
  10733. class: "u-toolbar",
  10734. onTouchmove: _cache[2] || (_cache[2] = vue.withModifiers((...args) => _ctx.noop && _ctx.noop(...args), ["stop", "prevent"]))
  10735. },
  10736. [
  10737. vue.createElementVNode("view", {
  10738. class: "u-toolbar__cancel__wrapper",
  10739. "hover-class": "u-hover-class"
  10740. }, [
  10741. vue.createElementVNode(
  10742. "text",
  10743. {
  10744. class: "u-toolbar__wrapper__cancel",
  10745. onClick: _cache[0] || (_cache[0] = (...args) => $options.cancel && $options.cancel(...args)),
  10746. style: vue.normalizeStyle({
  10747. color: _ctx.cancelColor
  10748. })
  10749. },
  10750. vue.toDisplayString(_ctx.cancelText),
  10751. 5
  10752. /* TEXT, STYLE */
  10753. )
  10754. ]),
  10755. _ctx.title ? (vue.openBlock(), vue.createElementBlock(
  10756. "text",
  10757. {
  10758. key: 0,
  10759. class: "u-toolbar__title u-line-1"
  10760. },
  10761. vue.toDisplayString(_ctx.title),
  10762. 1
  10763. /* TEXT */
  10764. )) : vue.createCommentVNode("v-if", true),
  10765. vue.createElementVNode("view", {
  10766. class: "u-toolbar__confirm__wrapper",
  10767. "hover-class": "u-hover-class"
  10768. }, [
  10769. vue.createElementVNode(
  10770. "text",
  10771. {
  10772. class: "u-toolbar__wrapper__confirm",
  10773. onClick: _cache[1] || (_cache[1] = (...args) => $options.confirm && $options.confirm(...args)),
  10774. style: vue.normalizeStyle({
  10775. color: _ctx.confirmColor
  10776. })
  10777. },
  10778. vue.toDisplayString(_ctx.confirmText),
  10779. 5
  10780. /* TEXT, STYLE */
  10781. )
  10782. ])
  10783. ],
  10784. 32
  10785. /* NEED_HYDRATION */
  10786. )) : vue.createCommentVNode("v-if", true);
  10787. }
  10788. const __easycom_0$6 = /* @__PURE__ */ _export_sfc(_sfc_main$1w, [["render", _sfc_render$1v], ["__scopeId", "data-v-eadae74e"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-toolbar/u-toolbar.vue"]]);
  10789. const props$e = {
  10790. props: {
  10791. // 是否展示picker弹窗
  10792. show: {
  10793. type: Boolean,
  10794. default: props$G.picker.show
  10795. },
  10796. // 是否展示顶部的操作栏
  10797. showToolbar: {
  10798. type: Boolean,
  10799. default: props$G.picker.showToolbar
  10800. },
  10801. // 顶部标题
  10802. title: {
  10803. type: String,
  10804. default: props$G.picker.title
  10805. },
  10806. // 对象数组,设置每一列的数据
  10807. columns: {
  10808. type: Array,
  10809. default: props$G.picker.columns
  10810. },
  10811. // 是否显示加载中状态
  10812. loading: {
  10813. type: Boolean,
  10814. default: props$G.picker.loading
  10815. },
  10816. // 各列中,单个选项的高度
  10817. itemHeight: {
  10818. type: [String, Number],
  10819. default: props$G.picker.itemHeight
  10820. },
  10821. // 取消按钮的文字
  10822. cancelText: {
  10823. type: String,
  10824. default: props$G.picker.cancelText
  10825. },
  10826. // 确认按钮的文字
  10827. confirmText: {
  10828. type: String,
  10829. default: props$G.picker.confirmText
  10830. },
  10831. // 取消按钮的颜色
  10832. cancelColor: {
  10833. type: String,
  10834. default: props$G.picker.cancelColor
  10835. },
  10836. // 确认按钮的颜色
  10837. confirmColor: {
  10838. type: String,
  10839. default: props$G.picker.confirmColor
  10840. },
  10841. // 每列中可见选项的数量
  10842. visibleItemCount: {
  10843. type: [String, Number],
  10844. default: props$G.picker.visibleItemCount
  10845. },
  10846. // 选项对象中,需要展示的属性键名
  10847. keyName: {
  10848. type: String,
  10849. default: props$G.picker.keyName
  10850. },
  10851. // 是否允许点击遮罩关闭选择器
  10852. closeOnClickOverlay: {
  10853. type: Boolean,
  10854. default: props$G.picker.closeOnClickOverlay
  10855. },
  10856. // 各列的默认索引
  10857. defaultIndex: {
  10858. type: Array,
  10859. default: props$G.picker.defaultIndex
  10860. },
  10861. // 是否在手指松开时立即触发 change 事件。若不开启则会在滚动动画结束后触发 change 事件,只在微信2.21.1及以上有效
  10862. immediateChange: {
  10863. type: Boolean,
  10864. default: props$G.picker.immediateChange
  10865. }
  10866. }
  10867. };
  10868. const _sfc_main$1v = {
  10869. name: "u-picker",
  10870. mixins: [mpMixin, mixin, props$e],
  10871. data() {
  10872. return {
  10873. // 上一次选择的列索引
  10874. lastIndex: [],
  10875. // 索引值 ,对应picker-view的value
  10876. innerIndex: [],
  10877. // 各列的值
  10878. innerColumns: [],
  10879. // 上一次的变化列索引
  10880. columnIndex: 0
  10881. };
  10882. },
  10883. watch: {
  10884. // 监听默认索引的变化,重新设置对应的值
  10885. defaultIndex: {
  10886. immediate: true,
  10887. handler(n) {
  10888. this.setIndexs(n, true);
  10889. }
  10890. },
  10891. // 监听columns参数的变化
  10892. columns: {
  10893. immediate: true,
  10894. deep: true,
  10895. handler(n) {
  10896. this.setColumns(n);
  10897. }
  10898. }
  10899. },
  10900. emits: ["close", "cancel", "confirm", "change"],
  10901. methods: {
  10902. // 获取item需要显示的文字,判别为对象还是文本
  10903. getItemText(item) {
  10904. if (uni.$u.test.object(item)) {
  10905. return item[this.keyName];
  10906. } else {
  10907. return item;
  10908. }
  10909. },
  10910. // 关闭选择器
  10911. closeHandler() {
  10912. if (this.closeOnClickOverlay) {
  10913. this.$emit("close");
  10914. }
  10915. },
  10916. // 点击工具栏的取消按钮
  10917. cancel() {
  10918. this.$emit("cancel");
  10919. },
  10920. // 点击工具栏的确定按钮
  10921. confirm() {
  10922. this.$emit("confirm", {
  10923. indexs: this.innerIndex,
  10924. value: this.innerColumns.map((item, index2) => item[this.innerIndex[index2]]),
  10925. values: this.innerColumns
  10926. });
  10927. },
  10928. // 选择器某一列的数据发生变化时触发
  10929. changeHandler(e) {
  10930. const {
  10931. value: value2
  10932. } = e.detail;
  10933. let index2 = 0, columnIndex = 0;
  10934. for (let i = 0; i < value2.length; i++) {
  10935. let item = value2[i];
  10936. if (item !== (this.lastIndex[i] || 0)) {
  10937. columnIndex = i;
  10938. index2 = item;
  10939. break;
  10940. }
  10941. }
  10942. this.columnIndex = columnIndex;
  10943. const values = this.innerColumns;
  10944. this.setLastIndex(value2);
  10945. this.setIndexs(value2);
  10946. this.$emit("change", {
  10947. // 微信小程序不能传递this,会因为循环引用而报错
  10948. picker: this,
  10949. value: this.innerColumns.map((item, index3) => item[value2[index3]]),
  10950. index: index2,
  10951. indexs: value2,
  10952. // values为当前变化列的数组内容
  10953. values,
  10954. columnIndex
  10955. });
  10956. },
  10957. // 设置index索引,此方法可被外部调用设置
  10958. setIndexs(index2, setLastIndex) {
  10959. this.innerIndex = uni.$u.deepClone(index2);
  10960. if (setLastIndex) {
  10961. this.setLastIndex(index2);
  10962. }
  10963. },
  10964. // 记录上一次的各列索引位置
  10965. setLastIndex(index2) {
  10966. this.lastIndex = uni.$u.deepClone(index2);
  10967. },
  10968. // 设置对应列选项的所有值
  10969. setColumnValues(columnIndex, values) {
  10970. this.innerColumns.splice(columnIndex, 1, values);
  10971. let tmpIndex = uni.$u.deepClone(this.innerIndex);
  10972. for (let i = 0; i < this.innerColumns.length; i++) {
  10973. if (i > this.columnIndex) {
  10974. tmpIndex[i] = 0;
  10975. }
  10976. }
  10977. this.setIndexs(tmpIndex);
  10978. },
  10979. // 获取对应列的所有选项
  10980. getColumnValues(columnIndex) {
  10981. (async () => {
  10982. await uni.$u.sleep();
  10983. })();
  10984. return this.innerColumns[columnIndex];
  10985. },
  10986. // 设置整体各列的columns的值
  10987. setColumns(columns) {
  10988. formatAppLog("log", "at uni_modules/uview-plus/components/u-picker/u-picker.vue:217", columns);
  10989. this.innerColumns = uni.$u.deepClone(columns);
  10990. if (this.innerIndex.length === 0) {
  10991. this.innerIndex = new Array(columns.length).fill(0);
  10992. }
  10993. },
  10994. // 获取各列选中值对应的索引
  10995. getIndexs() {
  10996. return this.innerIndex;
  10997. },
  10998. // 获取各列选中的值
  10999. getValues() {
  11000. (async () => {
  11001. await uni.$u.sleep();
  11002. })();
  11003. return this.innerColumns.map((item, index2) => item[this.innerIndex[index2]]);
  11004. }
  11005. }
  11006. };
  11007. function _sfc_render$1u(_ctx, _cache, $props, $setup, $data, $options) {
  11008. const _component_u_toolbar = resolveEasycom(vue.resolveDynamicComponent("u-toolbar"), __easycom_0$6);
  11009. const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$e);
  11010. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_7);
  11011. return vue.openBlock(), vue.createBlock(_component_u_popup, {
  11012. show: _ctx.show,
  11013. onClose: $options.closeHandler
  11014. }, {
  11015. default: vue.withCtx(() => [
  11016. vue.createElementVNode("view", { class: "u-picker" }, [
  11017. _ctx.showToolbar ? (vue.openBlock(), vue.createBlock(_component_u_toolbar, {
  11018. key: 0,
  11019. cancelColor: _ctx.cancelColor,
  11020. confirmColor: _ctx.confirmColor,
  11021. cancelText: _ctx.cancelText,
  11022. confirmText: _ctx.confirmText,
  11023. title: _ctx.title,
  11024. onCancel: $options.cancel,
  11025. onConfirm: $options.confirm
  11026. }, null, 8, ["cancelColor", "confirmColor", "cancelText", "confirmText", "title", "onCancel", "onConfirm"])) : vue.createCommentVNode("v-if", true),
  11027. vue.createElementVNode("picker-view", {
  11028. class: "u-picker__view",
  11029. indicatorStyle: `height: ${_ctx.$u.addUnit(_ctx.itemHeight)}`,
  11030. value: $data.innerIndex,
  11031. immediateChange: _ctx.immediateChange,
  11032. style: vue.normalizeStyle({
  11033. height: `${_ctx.$u.addUnit(_ctx.visibleItemCount * _ctx.itemHeight)}`
  11034. }),
  11035. onChange: _cache[0] || (_cache[0] = (...args) => $options.changeHandler && $options.changeHandler(...args))
  11036. }, [
  11037. (vue.openBlock(true), vue.createElementBlock(
  11038. vue.Fragment,
  11039. null,
  11040. vue.renderList($data.innerColumns, (item, index2) => {
  11041. return vue.openBlock(), vue.createElementBlock("picker-view-column", {
  11042. key: index2,
  11043. class: "u-picker__view__column"
  11044. }, [
  11045. _ctx.$u.test.array(item) ? (vue.openBlock(true), vue.createElementBlock(
  11046. vue.Fragment,
  11047. { key: 0 },
  11048. vue.renderList(item, (item1, index1) => {
  11049. return vue.openBlock(), vue.createElementBlock(
  11050. "text",
  11051. {
  11052. class: "u-picker__view__column__item u-line-1",
  11053. key: index1,
  11054. style: vue.normalizeStyle({
  11055. height: _ctx.$u.addUnit(_ctx.itemHeight),
  11056. lineHeight: _ctx.$u.addUnit(_ctx.itemHeight),
  11057. fontWeight: index1 === $data.innerIndex[index2] ? "bold" : "normal"
  11058. })
  11059. },
  11060. vue.toDisplayString($options.getItemText(item1)),
  11061. 5
  11062. /* TEXT, STYLE */
  11063. );
  11064. }),
  11065. 128
  11066. /* KEYED_FRAGMENT */
  11067. )) : vue.createCommentVNode("v-if", true)
  11068. ]);
  11069. }),
  11070. 128
  11071. /* KEYED_FRAGMENT */
  11072. ))
  11073. ], 44, ["indicatorStyle", "value", "immediateChange"]),
  11074. _ctx.loading ? (vue.openBlock(), vue.createElementBlock("view", {
  11075. key: 1,
  11076. class: "u-picker--loading"
  11077. }, [
  11078. vue.createVNode(_component_u_loading_icon, { mode: "circle" })
  11079. ])) : vue.createCommentVNode("v-if", true)
  11080. ])
  11081. ]),
  11082. _: 1
  11083. /* STABLE */
  11084. }, 8, ["show", "onClose"]);
  11085. }
  11086. const __easycom_1$2 = /* @__PURE__ */ _export_sfc(_sfc_main$1v, [["render", _sfc_render$1u], ["__scopeId", "data-v-91b05052"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-picker/u-picker.vue"]]);
  11087. const _sfc_main$1u = {
  11088. __name: "RejectButton",
  11089. emits: ["reject"],
  11090. setup(__props, { expose: __expose, emit: __emit }) {
  11091. __expose();
  11092. const emit2 = __emit;
  11093. const showRejectPicker = vue.ref(false);
  11094. const rejectReasons = vue.ref([]);
  11095. const getRejectReason = async () => {
  11096. const res = await uni.$u.http.get("/app/sysDict/getDict?key=route_exception_reason ");
  11097. if (res.code == 200) {
  11098. rejectReasons.value = res.data.map((item) => item.dictValue);
  11099. }
  11100. };
  11101. getRejectReason();
  11102. const handleReject = () => {
  11103. showRejectPicker.value = true;
  11104. };
  11105. const confirmReject = (e) => {
  11106. const reason = e.value[0];
  11107. emit2("reject", reason);
  11108. showRejectPicker.value = false;
  11109. };
  11110. const __returned__ = { emit: emit2, showRejectPicker, rejectReasons, getRejectReason, handleReject, confirmReject, ref: vue.ref };
  11111. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  11112. return __returned__;
  11113. }
  11114. };
  11115. function _sfc_render$1t(_ctx, _cache, $props, $setup, $data, $options) {
  11116. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  11117. const _component_u_picker = resolveEasycom(vue.resolveDynamicComponent("u-picker"), __easycom_1$2);
  11118. return vue.openBlock(), vue.createElementBlock("view", { style: { "width": "50%" } }, [
  11119. vue.createVNode(
  11120. _component_u_button,
  11121. vue.mergeProps({
  11122. type: "warning",
  11123. text: "驳回",
  11124. size: "small",
  11125. onClick: $setup.handleReject
  11126. }, _ctx.$attrs),
  11127. null,
  11128. 16
  11129. /* FULL_PROPS */
  11130. ),
  11131. vue.createCommentVNode(" 驳回原因选择器 "),
  11132. vue.createVNode(_component_u_picker, {
  11133. show: $setup.showRejectPicker,
  11134. columns: [$setup.rejectReasons],
  11135. onConfirm: $setup.confirmReject,
  11136. onCancel: _cache[0] || (_cache[0] = ($event) => $setup.showRejectPicker = false)
  11137. }, null, 8, ["show", "columns"])
  11138. ]);
  11139. }
  11140. const RejectButton = /* @__PURE__ */ _export_sfc(_sfc_main$1u, [["render", _sfc_render$1t], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/index/express/components/RejectButton.vue"]]);
  11141. const _sfc_main$1t = {
  11142. __name: "ExceptionItem",
  11143. props: {
  11144. order: {
  11145. type: Object,
  11146. default: () => ({
  11147. orderNo: "",
  11148. expressNo: "",
  11149. estimatedPrice: "",
  11150. pusher: "",
  11151. pushTime: ""
  11152. })
  11153. }
  11154. },
  11155. emits: ["refresh"],
  11156. setup(__props, { expose: __expose, emit: __emit }) {
  11157. __expose();
  11158. const props2 = __props;
  11159. const emit2 = __emit;
  11160. const handleCheckLogistics = () => {
  11161. uni.navigateTo({
  11162. url: `/pages/index/express/logistics-detail?orderId=${props2.order.orderId}&status=${props2.order.checkStatus}&id=${props2.order.id}`
  11163. });
  11164. };
  11165. function handleButtonClick(checkStatus, reason) {
  11166. uni.$u.http.post("/app/orderexception/update", {
  11167. id: props2.order.id,
  11168. checkStatus,
  11169. refusalReason: reason
  11170. }).then((res) => {
  11171. if (res.code == 200) {
  11172. if (checkStatus == 2) {
  11173. let text = props2.order.waybillCode + "签收成功";
  11174. uni.$u.ttsModule.speak(text);
  11175. }
  11176. uni.$u.toast("操作成功");
  11177. emit2("refresh");
  11178. } else {
  11179. uni.$u.toast(res.msg);
  11180. }
  11181. });
  11182. }
  11183. const __returned__ = { props: props2, emit: emit2, handleCheckLogistics, handleButtonClick, ref: vue.ref, ApproveButton, RejectButton };
  11184. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  11185. return __returned__;
  11186. }
  11187. };
  11188. function _sfc_render$1s(_ctx, _cache, $props, $setup, $data, $options) {
  11189. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  11190. const _directive_permission = vue.resolveDirective("permission");
  11191. return vue.openBlock(), vue.createElementBlock("view", { class: "exception-item" }, [
  11192. vue.createCommentVNode(" 订单信息 "),
  11193. vue.createElementVNode("view", { class: "info-section flex-1" }, [
  11194. vue.createElementVNode("view", { class: "info-row" }, [
  11195. vue.createElementVNode("text", { class: "label" }, "订单编号:"),
  11196. vue.createElementVNode(
  11197. "text",
  11198. { class: "value" },
  11199. vue.toDisplayString($props.order.orderId),
  11200. 1
  11201. /* TEXT */
  11202. )
  11203. ]),
  11204. vue.createElementVNode("view", { class: "info-row" }, [
  11205. vue.createElementVNode("text", { class: "label" }, "快递单号:"),
  11206. vue.createElementVNode(
  11207. "text",
  11208. { class: "value" },
  11209. vue.toDisplayString($props.order.waybillCode),
  11210. 1
  11211. /* TEXT */
  11212. )
  11213. ]),
  11214. vue.createElementVNode("view", { class: "info-row" }, [
  11215. vue.createElementVNode("text", { class: "label" }, "预估单价:"),
  11216. vue.createElementVNode(
  11217. "text",
  11218. { class: "value" },
  11219. vue.toDisplayString($props.order.expectMoney) + "元",
  11220. 1
  11221. /* TEXT */
  11222. )
  11223. ]),
  11224. vue.createElementVNode("view", { class: "info-row" }, [
  11225. vue.createElementVNode("text", { class: "label" }, "推送人:"),
  11226. vue.createElementVNode(
  11227. "text",
  11228. { class: "value" },
  11229. vue.toDisplayString($props.order.createName),
  11230. 1
  11231. /* TEXT */
  11232. )
  11233. ]),
  11234. vue.createElementVNode("view", {
  11235. class: "info-row",
  11236. style: { "margin-bottom": "0" }
  11237. }, [
  11238. vue.createElementVNode("text", { class: "label" }, "推送时间:"),
  11239. vue.createElementVNode(
  11240. "text",
  11241. { class: "value" },
  11242. vue.toDisplayString($props.order.createTime),
  11243. 1
  11244. /* TEXT */
  11245. )
  11246. ])
  11247. ]),
  11248. vue.createCommentVNode(" 操作按钮 "),
  11249. vue.createElementVNode("view", { class: "action-section" }, [
  11250. vue.createVNode(_component_u_button, {
  11251. type: "primary",
  11252. text: "查看物流",
  11253. size: "small",
  11254. onClick: $setup.handleCheckLogistics
  11255. }),
  11256. $props.order.checkStatus == 1 ? vue.withDirectives((vue.openBlock(), vue.createBlock(
  11257. $setup["ApproveButton"],
  11258. {
  11259. key: 0,
  11260. onApprove: _cache[0] || (_cache[0] = ($event) => $setup.handleButtonClick(2))
  11261. },
  11262. null,
  11263. 512
  11264. /* NEED_PATCH */
  11265. )), [
  11266. [_directive_permission, "app:express:exception:approve"]
  11267. ]) : vue.createCommentVNode("v-if", true),
  11268. $props.order.checkStatus == 1 ? vue.withDirectives((vue.openBlock(), vue.createBlock(
  11269. $setup["RejectButton"],
  11270. {
  11271. key: 1,
  11272. onReject: _cache[1] || (_cache[1] = (reason) => $setup.handleButtonClick(3, reason))
  11273. },
  11274. null,
  11275. 512
  11276. /* NEED_PATCH */
  11277. )), [
  11278. [_directive_permission, "app:express:exception:reject"]
  11279. ]) : vue.createCommentVNode("v-if", true),
  11280. $props.order.checkStatus == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  11281. key: 2,
  11282. style: { "color": "#19be6b" }
  11283. }, "[已签收]")) : vue.createCommentVNode("v-if", true),
  11284. $props.order.checkStatus == 3 ? (vue.openBlock(), vue.createElementBlock("view", {
  11285. key: 3,
  11286. style: { "color": "#f00" }
  11287. }, "[已驳回]")) : vue.createCommentVNode("v-if", true)
  11288. ])
  11289. ]);
  11290. }
  11291. const ExceptionItem = /* @__PURE__ */ _export_sfc(_sfc_main$1t, [["render", _sfc_render$1s], ["__scopeId", "data-v-e0527396"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/index/express/components/ExceptionItem.vue"]]);
  11292. const GlobalOption = {
  11293. down: {
  11294. // 其他down的配置参数也可以写,这里只展示了常用的配置:
  11295. offset: 80,
  11296. // 在列表顶部,下拉大于80px,松手即可触发下拉刷新的回调
  11297. native: false
  11298. // 是否使用系统自带的下拉刷新; 默认false; 仅在mescroll-body生效 (值为true时,还需在pages配置enablePullDownRefresh:true;详请参考mescroll-native的案例)
  11299. },
  11300. up: {
  11301. // 其他up的配置参数也可以写,这里只展示了常用的配置:
  11302. offset: 150,
  11303. // 距底部多远时,触发upCallback,仅mescroll-uni生效 ( mescroll-body配置的是pages.json的 onReachBottomDistance )
  11304. toTop: {
  11305. // 回到顶部按钮,需配置src才显示
  11306. src: "https://www.mescroll.com/img/mescroll-totop.png",
  11307. // 图片路径 (建议放入static目录, 如 /static/img/mescroll-totop.png )
  11308. offset: 1e3,
  11309. // 列表滚动多少距离才显示回到顶部按钮,默认1000px
  11310. right: 20,
  11311. // 到右边的距离, 默认20 (支持"20rpx", "20px", "20%"格式的值, 纯数字则默认单位rpx)
  11312. bottom: 120,
  11313. // 到底部的距离, 默认120 (支持"20rpx", "20px", "20%"格式的值, 纯数字则默认单位rpx)
  11314. width: 72
  11315. // 回到顶部图标的宽度, 默认72 (支持"20rpx", "20px", "20%"格式的值, 纯数字则默认单位rpx)
  11316. },
  11317. empty: {
  11318. use: true,
  11319. // 是否显示空布局
  11320. icon: "https://www.mescroll.com/img/mescroll-empty.png"
  11321. // 图标路径 (建议放入static目录, 如 /static/img/mescroll-empty.png )
  11322. }
  11323. },
  11324. // 国际化配置
  11325. i18n: {
  11326. // 中文
  11327. zh: {
  11328. down: {
  11329. textInOffset: "下拉刷新",
  11330. // 下拉的距离在offset范围内的提示文本
  11331. textOutOffset: "释放更新",
  11332. // 下拉的距离大于offset范围的提示文本
  11333. textLoading: "加载中 ...",
  11334. // 加载中的提示文本
  11335. textSuccess: "加载成功",
  11336. // 加载成功的文本
  11337. textErr: "加载失败"
  11338. // 加载失败的文本
  11339. },
  11340. up: {
  11341. textLoading: "加载中 ...",
  11342. // 加载中的提示文本
  11343. textNoMore: "-- END --",
  11344. // 没有更多数据的提示文本
  11345. empty: {
  11346. tip: "暂无数据"
  11347. // 空提示
  11348. }
  11349. }
  11350. },
  11351. // 英文
  11352. en: {
  11353. down: {
  11354. textInOffset: "drop down refresh",
  11355. textOutOffset: "release updates",
  11356. textLoading: "loading ...",
  11357. textSuccess: "loaded successfully",
  11358. textErr: "loading failed"
  11359. },
  11360. up: {
  11361. textLoading: "loading ...",
  11362. textNoMore: "-- END --",
  11363. empty: {
  11364. tip: "~ absolutely empty ~"
  11365. }
  11366. }
  11367. }
  11368. }
  11369. };
  11370. const mescrollI18n = {
  11371. // 默认语言
  11372. def: "zh",
  11373. // 获取当前语言类型
  11374. getType() {
  11375. return uni.getStorageSync("mescroll-i18n") || this.def;
  11376. },
  11377. // 设置当前语言类型
  11378. setType(type2) {
  11379. uni.setStorageSync("mescroll-i18n", type2);
  11380. }
  11381. };
  11382. const _imports_0$2 = "/assets/no-result.6af066e5.png";
  11383. const _sfc_main$1s = {
  11384. props: {
  11385. // empty的配置项: 默认为GlobalOption.up.empty
  11386. option: {
  11387. type: Object,
  11388. default() {
  11389. return {};
  11390. }
  11391. }
  11392. },
  11393. // 使用computed获取配置,用于支持option的动态配置
  11394. computed: {
  11395. // 图标
  11396. icon() {
  11397. if (this.option.icon != null) {
  11398. return this.option.icon;
  11399. } else {
  11400. let i18nType = mescrollI18n.getType();
  11401. if (this.option.i18n) {
  11402. return this.option.i18n[i18nType].icon;
  11403. } else {
  11404. return GlobalOption.i18n[i18nType].up.empty.icon || GlobalOption.up.empty.icon;
  11405. }
  11406. }
  11407. },
  11408. // 文本提示
  11409. tip() {
  11410. if (this.option.tip != null) {
  11411. return this.option.tip;
  11412. } else {
  11413. let i18nType = mescrollI18n.getType();
  11414. if (this.option.i18n) {
  11415. return this.option.i18n[i18nType].tip;
  11416. } else {
  11417. return GlobalOption.i18n[i18nType].up.empty.tip || GlobalOption.up.empty.tip;
  11418. }
  11419. }
  11420. },
  11421. // 按钮文本
  11422. btnText() {
  11423. if (this.option.i18n) {
  11424. let i18nType = mescrollI18n.getType();
  11425. return this.option.i18n[i18nType].btnText;
  11426. } else {
  11427. return this.option.btnText;
  11428. }
  11429. }
  11430. },
  11431. methods: {
  11432. // 点击按钮
  11433. emptyClick() {
  11434. this.$emit("emptyclick");
  11435. }
  11436. }
  11437. };
  11438. function _sfc_render$1r(_ctx, _cache, $props, $setup, $data, $options) {
  11439. return vue.openBlock(), vue.createElementBlock(
  11440. "view",
  11441. {
  11442. class: vue.normalizeClass(["mescroll-empty", { "empty-fixed": $props.option.fixed }]),
  11443. style: vue.normalizeStyle({ "z-index": $props.option.zIndex, top: $props.option.top })
  11444. },
  11445. [
  11446. vue.createCommentVNode(' <view> <image v-if="icon" class="empty-icon" :src="icon" mode="widthFix" /> </view> '),
  11447. vue.createElementVNode("view", null, [
  11448. $options.icon ? (vue.openBlock(), vue.createElementBlock("image", {
  11449. key: 0,
  11450. class: "empty-icon",
  11451. src: _imports_0$2,
  11452. mode: "widthFix"
  11453. })) : vue.createCommentVNode("v-if", true)
  11454. ]),
  11455. $options.tip ? (vue.openBlock(), vue.createElementBlock(
  11456. "view",
  11457. {
  11458. key: 0,
  11459. class: "empty-tip"
  11460. },
  11461. vue.toDisplayString($options.tip),
  11462. 1
  11463. /* TEXT */
  11464. )) : vue.createCommentVNode("v-if", true),
  11465. $options.btnText ? (vue.openBlock(), vue.createElementBlock(
  11466. "view",
  11467. {
  11468. key: 1,
  11469. class: "empty-btn",
  11470. onClick: _cache[0] || (_cache[0] = (...args) => $options.emptyClick && $options.emptyClick(...args))
  11471. },
  11472. vue.toDisplayString($options.btnText),
  11473. 1
  11474. /* TEXT */
  11475. )) : vue.createCommentVNode("v-if", true)
  11476. ],
  11477. 6
  11478. /* CLASS, STYLE */
  11479. );
  11480. }
  11481. const __easycom_0$5 = /* @__PURE__ */ _export_sfc(_sfc_main$1s, [["render", _sfc_render$1r], ["__scopeId", "data-v-7cefd855"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/uni_modules/mescroll-uni/components/mescroll-empty/mescroll-empty.vue"]]);
  11482. function MeScroll(options, isScrollBody) {
  11483. let me = this;
  11484. me.version = "1.3.7";
  11485. me.options = options || {};
  11486. me.isScrollBody = isScrollBody || false;
  11487. me.isDownScrolling = false;
  11488. me.isUpScrolling = false;
  11489. let hasDownCallback = me.options.down && me.options.down.callback;
  11490. me.initDownScroll();
  11491. me.initUpScroll();
  11492. setTimeout(function() {
  11493. if ((me.optDown.use || me.optDown.native) && me.optDown.auto && hasDownCallback) {
  11494. if (me.optDown.autoShowLoading) {
  11495. me.triggerDownScroll();
  11496. } else {
  11497. me.optDown.callback && me.optDown.callback(me);
  11498. }
  11499. }
  11500. if (!me.isUpAutoLoad) {
  11501. setTimeout(function() {
  11502. me.optUp.use && me.optUp.auto && !me.isUpAutoLoad && me.triggerUpScroll();
  11503. }, 100);
  11504. }
  11505. }, 30);
  11506. }
  11507. MeScroll.prototype.extendDownScroll = function(optDown) {
  11508. MeScroll.extend(optDown, {
  11509. use: true,
  11510. // 是否启用下拉刷新; 默认true
  11511. auto: true,
  11512. // 是否在初始化完毕之后自动执行下拉刷新的回调; 默认true
  11513. native: false,
  11514. // 是否使用系统自带的下拉刷新; 默认false; 仅mescroll-body生效 (值为true时,还需在pages配置enablePullDownRefresh:true;详请参考mescroll-native的案例)
  11515. autoShowLoading: false,
  11516. // 如果设置auto=true(在初始化完毕之后自动执行下拉刷新的回调),那么是否显示下拉刷新的进度; 默认false
  11517. isLock: false,
  11518. // 是否锁定下拉刷新,默认false;
  11519. offset: 80,
  11520. // 在列表顶部,下拉大于80px,松手即可触发下拉刷新的回调
  11521. startTop: 100,
  11522. // scroll-view快速滚动到顶部时,此时的scroll-top可能大于0, 此值用于控制最大的误差
  11523. inOffsetRate: 1,
  11524. // 在列表顶部,下拉的距离小于offset时,改变下拉区域高度比例;值小于1且越接近0,高度变化越小,表现为越往下越难拉
  11525. outOffsetRate: 0.2,
  11526. // 在列表顶部,下拉的距离大于offset时,改变下拉区域高度比例;值小于1且越接近0,高度变化越小,表现为越往下越难拉
  11527. bottomOffset: 20,
  11528. // 当手指touchmove位置在距离body底部20px范围内的时候结束上拉刷新,避免Webview嵌套导致touchend事件不执行
  11529. minAngle: 45,
  11530. // 向下滑动最少偏移的角度,取值区间 [0,90];默认45度,即向下滑动的角度大于45度则触发下拉;而小于45度,将不触发下拉,避免与左右滑动的轮播等组件冲突;
  11531. textInOffset: "下拉刷新",
  11532. // 下拉的距离在offset范围内的提示文本
  11533. textOutOffset: "释放更新",
  11534. // 下拉的距离大于offset范围的提示文本
  11535. textLoading: "加载中 ...",
  11536. // 加载中的提示文本
  11537. textSuccess: "加载成功",
  11538. // 加载成功的文本
  11539. textErr: "加载失败",
  11540. // 加载失败的文本
  11541. beforeEndDelay: 0,
  11542. // 延时结束的时长 (显示加载成功/失败的时长, android小程序设置此项结束下拉会卡顿, 配置后请注意测试)
  11543. bgColor: "transparent",
  11544. // 背景颜色 (建议在pages.json中再设置一下backgroundColorTop)
  11545. textColor: "gray",
  11546. // 文本颜色 (当bgColor配置了颜色,而textColor未配置时,则textColor会默认为白色)
  11547. inited: null,
  11548. // 下拉刷新初始化完毕的回调
  11549. inOffset: null,
  11550. // 下拉的距离进入offset范围内那一刻的回调
  11551. outOffset: null,
  11552. // 下拉的距离大于offset那一刻的回调
  11553. onMoving: null,
  11554. // 下拉过程中的回调,滑动过程一直在执行; rate下拉区域当前高度与指定距离的比值(inOffset: rate<1; outOffset: rate>=1); downHight当前下拉区域的高度
  11555. beforeLoading: null,
  11556. // 准备触发下拉刷新的回调: 如果return true,将不触发showLoading和callback回调; 常用来完全自定义下拉刷新, 参考案例【淘宝 v6.8.0】
  11557. showLoading: null,
  11558. // 显示下拉刷新进度的回调
  11559. afterLoading: null,
  11560. // 显示下拉刷新进度的回调之后,马上要执行的代码 (如: 在wxs中使用)
  11561. beforeEndDownScroll: null,
  11562. // 准备结束下拉的回调. 返回结束下拉的延时执行时间,默认0ms; 常用于结束下拉之前再显示另外一小段动画,才去隐藏下拉刷新的场景, 参考案例【dotJump】
  11563. endDownScroll: null,
  11564. // 结束下拉刷新的回调
  11565. afterEndDownScroll: null,
  11566. // 结束下拉刷新的回调,马上要执行的代码 (如: 在wxs中使用)
  11567. callback: function(mescroll) {
  11568. mescroll.resetUpScroll();
  11569. }
  11570. });
  11571. };
  11572. MeScroll.prototype.extendUpScroll = function(optUp) {
  11573. MeScroll.extend(optUp, {
  11574. use: true,
  11575. // 是否启用上拉加载; 默认true
  11576. auto: true,
  11577. // 是否在初始化完毕之后自动执行上拉加载的回调; 默认true
  11578. isLock: false,
  11579. // 是否锁定上拉加载,默认false;
  11580. isBoth: true,
  11581. // 上拉加载时,如果滑动到列表顶部是否可以同时触发下拉刷新;默认true,两者可同时触发;
  11582. callback: null,
  11583. // 上拉加载的回调;function(page,mescroll){ }
  11584. page: {
  11585. num: 0,
  11586. // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
  11587. size: 10,
  11588. // 每页数据的数量
  11589. time: null
  11590. // 加载第一页数据服务器返回的时间; 防止用户翻页时,后台新增了数据从而导致下一页数据重复;
  11591. },
  11592. noMoreSize: 5,
  11593. // 如果列表已无数据,可设置列表的总数量要大于等于5条才显示无更多数据;避免列表数据过少(比如只有一条数据),显示无更多数据会不好看
  11594. offset: 150,
  11595. // 距底部多远时,触发upCallback,仅mescroll-uni生效 ( mescroll-body配置的是pages.json的 onReachBottomDistance )
  11596. textLoading: "加载中 ...",
  11597. // 加载中的提示文本
  11598. textNoMore: "-- END --",
  11599. // 没有更多数据的提示文本
  11600. bgColor: "transparent",
  11601. // 背景颜色 (建议在pages.json中再设置一下backgroundColorBottom)
  11602. textColor: "gray",
  11603. // 文本颜色 (当bgColor配置了颜色,而textColor未配置时,则textColor会默认为白色)
  11604. inited: null,
  11605. // 初始化完毕的回调
  11606. showLoading: null,
  11607. // 显示加载中的回调
  11608. showNoMore: null,
  11609. // 显示无更多数据的回调
  11610. hideUpScroll: null,
  11611. // 隐藏上拉加载的回调
  11612. errDistance: 60,
  11613. // endErr的时候需往上滑动一段距离,使其往下滑动时再次触发onReachBottom,仅mescroll-body生效
  11614. toTop: {
  11615. // 回到顶部按钮,需配置src才显示
  11616. src: null,
  11617. // 图片路径,默认null (绝对路径或网络图)
  11618. offset: 1e3,
  11619. // 列表滚动多少距离才显示回到顶部按钮,默认1000
  11620. duration: 300,
  11621. // 回到顶部的动画时长,默认300ms (当值为0或300则使用系统自带回到顶部,更流畅; 其他值则通过step模拟,部分机型可能不够流畅,所以非特殊情况不建议修改此项)
  11622. btnClick: null,
  11623. // 点击按钮的回调
  11624. onShow: null,
  11625. // 是否显示的回调
  11626. zIndex: 9990,
  11627. // fixed定位z-index值
  11628. left: null,
  11629. // 到左边的距离, 默认null. 此项有值时,right不生效. (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
  11630. right: 20,
  11631. // 到右边的距离, 默认20 (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
  11632. bottom: 120,
  11633. // 到底部的距离, 默认120 (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
  11634. safearea: false,
  11635. // bottom的偏移量是否加上底部安全区的距离, 默认false, 需要适配iPhoneX时使用 (具体的界面如果不配置此项,则取本vue的safearea值)
  11636. width: 72,
  11637. // 回到顶部图标的宽度, 默认72 (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
  11638. radius: "50%"
  11639. // 圆角, 默认"50%" (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
  11640. },
  11641. empty: {
  11642. use: true,
  11643. // 是否显示空布局
  11644. icon: null,
  11645. // 图标路径
  11646. tip: "~ 暂无相关数据 ~",
  11647. // 提示
  11648. btnText: "",
  11649. // 按钮
  11650. btnClick: null,
  11651. // 点击按钮的回调
  11652. onShow: null,
  11653. // 是否显示的回调
  11654. fixed: false,
  11655. // 是否使用fixed定位,默认false; 配置fixed为true,以下的top和zIndex才生效 (transform会使fixed失效,最终会降级为absolute)
  11656. top: "100rpx",
  11657. // fixed定位的top值 (完整的单位值,如 "10%"; "100rpx")
  11658. zIndex: 99
  11659. // fixed定位z-index值
  11660. },
  11661. onScroll: false
  11662. // 是否监听滚动事件
  11663. });
  11664. };
  11665. MeScroll.extend = function(userOption, defaultOption) {
  11666. if (!userOption)
  11667. return defaultOption;
  11668. for (let key in defaultOption) {
  11669. if (userOption[key] == null) {
  11670. let def = defaultOption[key];
  11671. if (def != null && typeof def === "object") {
  11672. userOption[key] = MeScroll.extend({}, def);
  11673. } else {
  11674. userOption[key] = def;
  11675. }
  11676. } else if (typeof userOption[key] === "object") {
  11677. MeScroll.extend(userOption[key], defaultOption[key]);
  11678. }
  11679. }
  11680. return userOption;
  11681. };
  11682. MeScroll.prototype.hasColor = function(color2) {
  11683. if (!color2)
  11684. return false;
  11685. let c = color2.toLowerCase();
  11686. return c != "#fff" && c != "#ffffff" && c != "transparent" && c != "white";
  11687. };
  11688. MeScroll.prototype.initDownScroll = function() {
  11689. let me = this;
  11690. me.optDown = me.options.down || {};
  11691. if (!me.optDown.textColor && me.hasColor(me.optDown.bgColor))
  11692. me.optDown.textColor = "#fff";
  11693. me.extendDownScroll(me.optDown);
  11694. if (me.isScrollBody && me.optDown.native) {
  11695. me.optDown.use = false;
  11696. } else {
  11697. me.optDown.native = false;
  11698. }
  11699. me.downHight = 0;
  11700. if (me.optDown.use && me.optDown.inited) {
  11701. setTimeout(function() {
  11702. me.optDown.inited(me);
  11703. }, 0);
  11704. }
  11705. };
  11706. MeScroll.prototype.touchstartEvent = function(e) {
  11707. if (!this.optDown.use)
  11708. return;
  11709. this.startPoint = this.getPoint(e);
  11710. this.startTop = this.getScrollTop();
  11711. this.startAngle = 0;
  11712. this.lastPoint = this.startPoint;
  11713. this.maxTouchmoveY = this.getBodyHeight() - this.optDown.bottomOffset;
  11714. this.inTouchend = false;
  11715. };
  11716. MeScroll.prototype.touchmoveEvent = function(e) {
  11717. if (!this.optDown.use)
  11718. return;
  11719. let me = this;
  11720. let scrollTop = me.getScrollTop();
  11721. let curPoint = me.getPoint(e);
  11722. let moveY = curPoint.y - me.startPoint.y;
  11723. if (moveY > 0 && (me.isScrollBody && scrollTop <= 0 || !me.isScrollBody && (scrollTop <= 0 || scrollTop <= me.optDown.startTop && scrollTop === me.startTop))) {
  11724. if (!me.inTouchend && !me.isDownScrolling && !me.optDown.isLock && (!me.isUpScrolling || me.isUpScrolling && me.optUp.isBoth)) {
  11725. if (!me.startAngle)
  11726. me.startAngle = me.getAngle(me.lastPoint, curPoint);
  11727. if (me.startAngle < me.optDown.minAngle)
  11728. return;
  11729. if (me.maxTouchmoveY > 0 && curPoint.y >= me.maxTouchmoveY) {
  11730. me.inTouchend = true;
  11731. me.touchendEvent();
  11732. return;
  11733. }
  11734. me.preventDefault(e);
  11735. let diff = curPoint.y - me.lastPoint.y;
  11736. if (me.downHight < me.optDown.offset) {
  11737. if (me.movetype !== 1) {
  11738. me.movetype = 1;
  11739. me.isDownEndSuccess = null;
  11740. me.optDown.inOffset && me.optDown.inOffset(me);
  11741. me.isMoveDown = true;
  11742. }
  11743. me.downHight += diff * me.optDown.inOffsetRate;
  11744. } else {
  11745. if (me.movetype !== 2) {
  11746. me.movetype = 2;
  11747. me.optDown.outOffset && me.optDown.outOffset(me);
  11748. me.isMoveDown = true;
  11749. }
  11750. if (diff > 0) {
  11751. me.downHight += diff * me.optDown.outOffsetRate;
  11752. } else {
  11753. me.downHight += diff;
  11754. }
  11755. }
  11756. me.downHight = Math.round(me.downHight);
  11757. let rate = me.downHight / me.optDown.offset;
  11758. me.optDown.onMoving && me.optDown.onMoving(me, rate, me.downHight);
  11759. }
  11760. }
  11761. me.lastPoint = curPoint;
  11762. };
  11763. MeScroll.prototype.touchendEvent = function(e) {
  11764. if (!this.optDown.use)
  11765. return;
  11766. if (this.isMoveDown) {
  11767. if (this.downHight >= this.optDown.offset) {
  11768. this.triggerDownScroll();
  11769. } else {
  11770. this.downHight = 0;
  11771. this.endDownScrollCall(this);
  11772. }
  11773. this.movetype = 0;
  11774. this.isMoveDown = false;
  11775. } else if (!this.isScrollBody && this.getScrollTop() === this.startTop) {
  11776. let isScrollUp = this.getPoint(e).y - this.startPoint.y < 0;
  11777. if (isScrollUp) {
  11778. let angle = this.getAngle(this.getPoint(e), this.startPoint);
  11779. if (angle > 80) {
  11780. this.triggerUpScroll(true);
  11781. }
  11782. }
  11783. }
  11784. };
  11785. MeScroll.prototype.getPoint = function(e) {
  11786. if (!e) {
  11787. return {
  11788. x: 0,
  11789. y: 0
  11790. };
  11791. }
  11792. if (e.touches && e.touches[0]) {
  11793. return {
  11794. x: e.touches[0].pageX,
  11795. y: e.touches[0].pageY
  11796. };
  11797. } else if (e.changedTouches && e.changedTouches[0]) {
  11798. return {
  11799. x: e.changedTouches[0].pageX,
  11800. y: e.changedTouches[0].pageY
  11801. };
  11802. } else {
  11803. return {
  11804. x: e.clientX,
  11805. y: e.clientY
  11806. };
  11807. }
  11808. };
  11809. MeScroll.prototype.getAngle = function(p1, p2) {
  11810. let x = Math.abs(p1.x - p2.x);
  11811. let y = Math.abs(p1.y - p2.y);
  11812. let z = Math.sqrt(x * x + y * y);
  11813. let angle = 0;
  11814. if (z !== 0) {
  11815. angle = Math.asin(y / z) / Math.PI * 180;
  11816. }
  11817. return angle;
  11818. };
  11819. MeScroll.prototype.triggerDownScroll = function() {
  11820. if (this.optDown.beforeLoading && this.optDown.beforeLoading(this))
  11821. ;
  11822. else {
  11823. this.showDownScroll();
  11824. !this.optDown.native && this.optDown.callback && this.optDown.callback(this);
  11825. }
  11826. };
  11827. MeScroll.prototype.showDownScroll = function() {
  11828. this.isDownScrolling = true;
  11829. if (this.optDown.native) {
  11830. uni.startPullDownRefresh();
  11831. this.showDownLoadingCall(0);
  11832. } else {
  11833. this.downHight = this.optDown.offset;
  11834. this.showDownLoadingCall(this.downHight);
  11835. }
  11836. };
  11837. MeScroll.prototype.showDownLoadingCall = function(downHight) {
  11838. this.optDown.showLoading && this.optDown.showLoading(this, downHight);
  11839. this.optDown.afterLoading && this.optDown.afterLoading(this, downHight);
  11840. };
  11841. MeScroll.prototype.onPullDownRefresh = function() {
  11842. this.isDownScrolling = true;
  11843. this.showDownLoadingCall(0);
  11844. this.optDown.callback && this.optDown.callback(this);
  11845. };
  11846. MeScroll.prototype.endDownScroll = function() {
  11847. if (this.optDown.native) {
  11848. this.isDownScrolling = false;
  11849. this.endDownScrollCall(this);
  11850. uni.stopPullDownRefresh();
  11851. return;
  11852. }
  11853. let me = this;
  11854. let endScroll = function() {
  11855. me.downHight = 0;
  11856. me.isDownScrolling = false;
  11857. me.endDownScrollCall(me);
  11858. if (!me.isScrollBody) {
  11859. me.setScrollHeight(0);
  11860. me.scrollTo(0, 0);
  11861. }
  11862. };
  11863. let delay = 0;
  11864. if (me.optDown.beforeEndDownScroll) {
  11865. delay = me.optDown.beforeEndDownScroll(me);
  11866. if (me.isDownEndSuccess == null)
  11867. delay = 0;
  11868. }
  11869. if (typeof delay === "number" && delay > 0) {
  11870. setTimeout(endScroll, delay);
  11871. } else {
  11872. endScroll();
  11873. }
  11874. };
  11875. MeScroll.prototype.endDownScrollCall = function() {
  11876. this.optDown.endDownScroll && this.optDown.endDownScroll(this);
  11877. this.optDown.afterEndDownScroll && this.optDown.afterEndDownScroll(this);
  11878. };
  11879. MeScroll.prototype.lockDownScroll = function(isLock) {
  11880. if (isLock == null)
  11881. isLock = true;
  11882. this.optDown.isLock = isLock;
  11883. };
  11884. MeScroll.prototype.lockUpScroll = function(isLock) {
  11885. if (isLock == null)
  11886. isLock = true;
  11887. this.optUp.isLock = isLock;
  11888. };
  11889. MeScroll.prototype.initUpScroll = function() {
  11890. let me = this;
  11891. me.optUp = me.options.up || { use: false };
  11892. if (!me.optUp.textColor && me.hasColor(me.optUp.bgColor))
  11893. me.optUp.textColor = "#fff";
  11894. me.extendUpScroll(me.optUp);
  11895. if (me.optUp.use === false)
  11896. return;
  11897. me.optUp.hasNext = true;
  11898. me.startNum = me.optUp.page.num + 1;
  11899. if (me.optUp.inited) {
  11900. setTimeout(function() {
  11901. me.optUp.inited(me);
  11902. }, 0);
  11903. }
  11904. };
  11905. MeScroll.prototype.onReachBottom = function() {
  11906. if (this.isScrollBody && !this.isUpScrolling) {
  11907. if (!this.optUp.isLock && this.optUp.hasNext) {
  11908. this.triggerUpScroll();
  11909. }
  11910. }
  11911. };
  11912. MeScroll.prototype.onPageScroll = function(e) {
  11913. if (!this.isScrollBody)
  11914. return;
  11915. this.setScrollTop(e.scrollTop);
  11916. if (e.scrollTop >= this.optUp.toTop.offset) {
  11917. this.showTopBtn();
  11918. } else {
  11919. this.hideTopBtn();
  11920. }
  11921. };
  11922. MeScroll.prototype.scroll = function(e, onScroll) {
  11923. this.setScrollTop(e.scrollTop);
  11924. this.setScrollHeight(e.scrollHeight);
  11925. if (this.preScrollY == null)
  11926. this.preScrollY = 0;
  11927. this.isScrollUp = e.scrollTop - this.preScrollY > 0;
  11928. this.preScrollY = e.scrollTop;
  11929. this.isScrollUp && this.triggerUpScroll(true);
  11930. if (e.scrollTop >= this.optUp.toTop.offset) {
  11931. this.showTopBtn();
  11932. } else {
  11933. this.hideTopBtn();
  11934. }
  11935. this.optUp.onScroll && onScroll && onScroll();
  11936. };
  11937. MeScroll.prototype.triggerUpScroll = function(isCheck) {
  11938. if (!this.isUpScrolling && this.optUp.use && this.optUp.callback) {
  11939. if (isCheck === true) {
  11940. let canUp = false;
  11941. if (this.optUp.hasNext && !this.optUp.isLock && !this.isDownScrolling) {
  11942. if (this.getScrollBottom() <= this.optUp.offset) {
  11943. canUp = true;
  11944. }
  11945. }
  11946. if (canUp === false)
  11947. return;
  11948. }
  11949. this.showUpScroll();
  11950. this.optUp.page.num++;
  11951. this.isUpAutoLoad = true;
  11952. this.num = this.optUp.page.num;
  11953. this.size = this.optUp.page.size;
  11954. this.time = this.optUp.page.time;
  11955. this.optUp.callback(this);
  11956. }
  11957. };
  11958. MeScroll.prototype.showUpScroll = function() {
  11959. this.isUpScrolling = true;
  11960. this.optUp.showLoading && this.optUp.showLoading(this);
  11961. };
  11962. MeScroll.prototype.showNoMore = function() {
  11963. this.optUp.hasNext = false;
  11964. this.optUp.showNoMore && this.optUp.showNoMore(this);
  11965. };
  11966. MeScroll.prototype.hideUpScroll = function() {
  11967. this.optUp.hideUpScroll && this.optUp.hideUpScroll(this);
  11968. };
  11969. MeScroll.prototype.endUpScroll = function(isShowNoMore) {
  11970. if (isShowNoMore != null) {
  11971. if (isShowNoMore) {
  11972. this.showNoMore();
  11973. } else {
  11974. this.hideUpScroll();
  11975. }
  11976. }
  11977. this.isUpScrolling = false;
  11978. };
  11979. MeScroll.prototype.resetUpScroll = function(isShowLoading) {
  11980. if (this.optUp && this.optUp.use) {
  11981. let page2 = this.optUp.page;
  11982. this.prePageNum = page2.num;
  11983. this.prePageTime = page2.time;
  11984. page2.num = this.startNum;
  11985. page2.time = null;
  11986. if (!this.isDownScrolling && isShowLoading !== false) {
  11987. if (isShowLoading == null) {
  11988. this.removeEmpty();
  11989. this.showUpScroll();
  11990. } else {
  11991. this.showDownScroll();
  11992. }
  11993. }
  11994. this.isUpAutoLoad = true;
  11995. this.num = page2.num;
  11996. this.size = page2.size;
  11997. this.time = page2.time;
  11998. this.optUp.callback && this.optUp.callback(this);
  11999. }
  12000. };
  12001. MeScroll.prototype.setPageNum = function(num) {
  12002. this.optUp.page.num = num - 1;
  12003. };
  12004. MeScroll.prototype.setPageSize = function(size) {
  12005. this.optUp.page.size = size;
  12006. };
  12007. MeScroll.prototype.endByPage = function(dataSize, totalPage, systime) {
  12008. let hasNext;
  12009. if (this.optUp.use && totalPage != null)
  12010. hasNext = this.optUp.page.num < totalPage;
  12011. this.endSuccess(dataSize, hasNext, systime);
  12012. };
  12013. MeScroll.prototype.endBySize = function(dataSize, totalSize, systime) {
  12014. let hasNext;
  12015. if (this.optUp.use && totalSize != null) {
  12016. let loadSize = (this.optUp.page.num - 1) * this.optUp.page.size + dataSize;
  12017. hasNext = loadSize < totalSize;
  12018. }
  12019. this.endSuccess(dataSize, hasNext, systime);
  12020. };
  12021. MeScroll.prototype.endSuccess = function(dataSize, hasNext, systime) {
  12022. let me = this;
  12023. if (me.isDownScrolling) {
  12024. me.isDownEndSuccess = true;
  12025. me.endDownScroll();
  12026. }
  12027. if (me.optUp.use) {
  12028. let isShowNoMore;
  12029. if (dataSize != null) {
  12030. let pageNum = me.optUp.page.num;
  12031. let pageSize = me.optUp.page.size;
  12032. if (pageNum === 1) {
  12033. if (systime)
  12034. me.optUp.page.time = systime;
  12035. }
  12036. if (dataSize < pageSize || hasNext === false) {
  12037. me.optUp.hasNext = false;
  12038. if (dataSize === 0 && pageNum === 1) {
  12039. isShowNoMore = false;
  12040. me.showEmpty();
  12041. } else {
  12042. let allDataSize = (pageNum - 1) * pageSize + dataSize;
  12043. if (allDataSize < me.optUp.noMoreSize) {
  12044. isShowNoMore = false;
  12045. } else {
  12046. isShowNoMore = true;
  12047. }
  12048. me.removeEmpty();
  12049. }
  12050. } else {
  12051. isShowNoMore = false;
  12052. me.optUp.hasNext = true;
  12053. me.removeEmpty();
  12054. }
  12055. }
  12056. me.endUpScroll(isShowNoMore);
  12057. }
  12058. };
  12059. MeScroll.prototype.endErr = function(errDistance) {
  12060. if (this.isDownScrolling) {
  12061. this.isDownEndSuccess = false;
  12062. let page2 = this.optUp.page;
  12063. if (page2 && this.prePageNum) {
  12064. page2.num = this.prePageNum;
  12065. page2.time = this.prePageTime;
  12066. }
  12067. this.endDownScroll();
  12068. }
  12069. if (this.isUpScrolling) {
  12070. this.optUp.page.num--;
  12071. this.endUpScroll(false);
  12072. if (this.isScrollBody && errDistance !== 0) {
  12073. if (!errDistance)
  12074. errDistance = this.optUp.errDistance;
  12075. this.scrollTo(this.getScrollTop() - errDistance, 0);
  12076. }
  12077. }
  12078. };
  12079. MeScroll.prototype.showEmpty = function() {
  12080. this.optUp.empty.use && this.optUp.empty.onShow && this.optUp.empty.onShow(true);
  12081. };
  12082. MeScroll.prototype.removeEmpty = function() {
  12083. this.optUp.empty.use && this.optUp.empty.onShow && this.optUp.empty.onShow(false);
  12084. };
  12085. MeScroll.prototype.showTopBtn = function() {
  12086. if (!this.topBtnShow) {
  12087. this.topBtnShow = true;
  12088. this.optUp.toTop.onShow && this.optUp.toTop.onShow(true);
  12089. }
  12090. };
  12091. MeScroll.prototype.hideTopBtn = function() {
  12092. if (this.topBtnShow) {
  12093. this.topBtnShow = false;
  12094. this.optUp.toTop.onShow && this.optUp.toTop.onShow(false);
  12095. }
  12096. };
  12097. MeScroll.prototype.getScrollTop = function() {
  12098. return this.scrollTop || 0;
  12099. };
  12100. MeScroll.prototype.setScrollTop = function(y) {
  12101. this.scrollTop = y;
  12102. };
  12103. MeScroll.prototype.scrollTo = function(y, t2) {
  12104. this.myScrollTo && this.myScrollTo(y, t2);
  12105. };
  12106. MeScroll.prototype.resetScrollTo = function(myScrollTo) {
  12107. this.myScrollTo = myScrollTo;
  12108. };
  12109. MeScroll.prototype.getScrollBottom = function() {
  12110. return this.getScrollHeight() - this.getClientHeight() - this.getScrollTop();
  12111. };
  12112. MeScroll.prototype.getStep = function(star, end, callback, t2, rate) {
  12113. let diff = end - star;
  12114. if (t2 === 0 || diff === 0) {
  12115. callback && callback(end);
  12116. return;
  12117. }
  12118. t2 = t2 || 300;
  12119. rate = rate || 30;
  12120. let count = t2 / rate;
  12121. let step = diff / count;
  12122. let i = 0;
  12123. let timer = setInterval(function() {
  12124. if (i < count - 1) {
  12125. star += step;
  12126. callback && callback(star, timer);
  12127. i++;
  12128. } else {
  12129. callback && callback(end, timer);
  12130. clearInterval(timer);
  12131. }
  12132. }, rate);
  12133. };
  12134. MeScroll.prototype.getClientHeight = function(isReal) {
  12135. let h = this.clientHeight || 0;
  12136. if (h === 0 && isReal !== true) {
  12137. h = this.getBodyHeight();
  12138. }
  12139. return h;
  12140. };
  12141. MeScroll.prototype.setClientHeight = function(h) {
  12142. this.clientHeight = h;
  12143. };
  12144. MeScroll.prototype.getScrollHeight = function() {
  12145. return this.scrollHeight || 0;
  12146. };
  12147. MeScroll.prototype.setScrollHeight = function(h) {
  12148. this.scrollHeight = h;
  12149. };
  12150. MeScroll.prototype.getBodyHeight = function() {
  12151. return this.bodyHeight || 0;
  12152. };
  12153. MeScroll.prototype.setBodyHeight = function(h) {
  12154. this.bodyHeight = h;
  12155. };
  12156. MeScroll.prototype.preventDefault = function(e) {
  12157. if (e && e.cancelable && !e.defaultPrevented)
  12158. e.preventDefault();
  12159. };
  12160. const _sfc_main$1r = {
  12161. props: {
  12162. // up.toTop的配置项
  12163. option: {
  12164. type: Object,
  12165. default() {
  12166. return {};
  12167. }
  12168. },
  12169. // 是否显示
  12170. value: false,
  12171. // vue2
  12172. modelValue: false
  12173. // vue3
  12174. },
  12175. computed: {
  12176. // 优先显示左边
  12177. left() {
  12178. return this.option.left ? this.addUnit(this.option.left) : "auto";
  12179. },
  12180. // 右边距离 (优先显示左边)
  12181. right() {
  12182. return this.option.left ? "auto" : this.addUnit(this.option.right);
  12183. },
  12184. // 是否显示
  12185. isShow() {
  12186. return this.modelValue;
  12187. }
  12188. },
  12189. methods: {
  12190. addUnit(num) {
  12191. if (!num)
  12192. return 0;
  12193. if (typeof num === "number")
  12194. return num + "rpx";
  12195. return num;
  12196. },
  12197. toTopClick() {
  12198. this.$emit("update:modelValue", false);
  12199. this.$emit("click");
  12200. }
  12201. }
  12202. };
  12203. function _sfc_render$1q(_ctx, _cache, $props, $setup, $data, $options) {
  12204. return $props.option.src ? (vue.openBlock(), vue.createElementBlock("image", {
  12205. key: 0,
  12206. class: vue.normalizeClass(["mescroll-totop", [$options.isShow ? "mescroll-totop-in" : "mescroll-totop-out", { "mescroll-totop-safearea": $props.option.safearea }]]),
  12207. style: vue.normalizeStyle({ "z-index": $props.option.zIndex, "left": $options.left, "right": $options.right, "bottom": $options.addUnit($props.option.bottom), "width": $options.addUnit($props.option.width), "border-radius": $options.addUnit($props.option.radius) }),
  12208. src: $props.option.src,
  12209. mode: "widthFix",
  12210. onClick: _cache[0] || (_cache[0] = (...args) => $options.toTopClick && $options.toTopClick(...args))
  12211. }, null, 14, ["src"])) : vue.createCommentVNode("v-if", true);
  12212. }
  12213. const MescrollTop = /* @__PURE__ */ _export_sfc(_sfc_main$1r, [["render", _sfc_render$1q], ["__scopeId", "data-v-49fff3a8"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/uni_modules/mescroll-uni/components/mescroll-uni/components/mescroll-top.vue"]]);
  12214. const WxsMixin = {
  12215. data() {
  12216. return {
  12217. // 传入wxs视图层的数据 (响应式)
  12218. wxsProp: {
  12219. optDown: {},
  12220. // 下拉刷新的配置
  12221. scrollTop: 0,
  12222. // 滚动条的距离
  12223. bodyHeight: 0,
  12224. // body的高度
  12225. isDownScrolling: false,
  12226. // 是否正在下拉刷新中
  12227. isUpScrolling: false,
  12228. // 是否正在上拉加载中
  12229. isScrollBody: true,
  12230. // 是否为mescroll-body滚动
  12231. isUpBoth: true,
  12232. // 上拉加载时,是否同时可以下拉刷新
  12233. t: 0
  12234. // 数据更新的标记 (只有数据更新了,才会触发wxs的Observer)
  12235. },
  12236. // 标记调用wxs视图层的方法
  12237. callProp: {
  12238. callType: "",
  12239. // 方法名
  12240. t: 0
  12241. // 数据更新的标记 (只有数据更新了,才会触发wxs的Observer)
  12242. }
  12243. // 不用wxs的平台使用此处的wxsBiz对象,抹平wxs的写法 (微信小程序和APP使用的wxsBiz对象是./wxs/wxs.wxs)
  12244. // 不用renderjs的平台使用此处的renderBiz对象,抹平renderjs的写法 (app 和 h5 使用的renderBiz对象是./wxs/renderjs.js)
  12245. };
  12246. },
  12247. methods: {
  12248. // wxs视图层调用逻辑层的回调
  12249. wxsCall(msg) {
  12250. if (msg.type === "setWxsProp") {
  12251. this.wxsProp = {
  12252. optDown: this.mescroll.optDown,
  12253. scrollTop: this.mescroll.getScrollTop(),
  12254. bodyHeight: this.mescroll.getBodyHeight(),
  12255. isDownScrolling: this.mescroll.isDownScrolling,
  12256. isUpScrolling: this.mescroll.isUpScrolling,
  12257. isUpBoth: this.mescroll.optUp.isBoth,
  12258. isScrollBody: this.mescroll.isScrollBody,
  12259. t: Date.now()
  12260. };
  12261. } else if (msg.type === "setLoadType") {
  12262. this.downLoadType = msg.downLoadType;
  12263. this.$set(this.mescroll, "downLoadType", this.downLoadType);
  12264. this.$set(this.mescroll, "isDownEndSuccess", null);
  12265. } else if (msg.type === "triggerDownScroll") {
  12266. this.mescroll.triggerDownScroll();
  12267. } else if (msg.type === "endDownScroll") {
  12268. this.mescroll.endDownScroll();
  12269. } else if (msg.type === "triggerUpScroll") {
  12270. this.mescroll.triggerUpScroll(true);
  12271. }
  12272. }
  12273. },
  12274. mounted() {
  12275. this.mescroll.optDown.afterLoading = () => {
  12276. this.callProp = { callType: "showLoading", t: Date.now() };
  12277. };
  12278. this.mescroll.optDown.afterEndDownScroll = () => {
  12279. this.callProp = { callType: "endDownScroll", t: Date.now() };
  12280. let delay = 300 + (this.mescroll.optDown.beforeEndDelay || 0);
  12281. setTimeout(() => {
  12282. if (this.downLoadType === 4 || this.downLoadType === 0) {
  12283. this.callProp = { callType: "clearTransform", t: Date.now() };
  12284. }
  12285. this.$set(this.mescroll, "downLoadType", this.downLoadType);
  12286. }, delay);
  12287. };
  12288. this.wxsCall({ type: "setWxsProp" });
  12289. }
  12290. };
  12291. const block0$1 = (Comp) => {
  12292. (Comp.$wxs || (Comp.$wxs = [])).push("wxsBiz");
  12293. (Comp.$wxsModules || (Comp.$wxsModules = {}))["wxsBiz"] = "30f4e25a";
  12294. };
  12295. const block1 = (Comp) => {
  12296. (Comp.$renderjs || (Comp.$renderjs = [])).push("renderBiz");
  12297. (Comp.$renderjsModules || (Comp.$renderjsModules = {}))["renderBiz"] = "5a9dc23f";
  12298. };
  12299. const _sfc_main$1q = {
  12300. name: "mescroll-uni",
  12301. mixins: [WxsMixin],
  12302. components: {
  12303. MescrollTop
  12304. },
  12305. props: {
  12306. down: Object,
  12307. up: Object,
  12308. i18n: Object,
  12309. top: [String, Number],
  12310. topbar: [Boolean, String],
  12311. bottom: [String, Number],
  12312. safearea: Boolean,
  12313. fixed: {
  12314. type: Boolean,
  12315. default: true
  12316. },
  12317. height: [String, Number],
  12318. bottombar: {
  12319. type: Boolean,
  12320. default: true
  12321. },
  12322. disableScroll: Boolean
  12323. },
  12324. data() {
  12325. return {
  12326. mescroll: { optDown: {}, optUp: {} },
  12327. // mescroll实例
  12328. viewId: "id_" + Math.random().toString(36).substr(2, 16),
  12329. // 随机生成mescroll的id(不能数字开头,否则找不到元素)
  12330. downHight: 0,
  12331. //下拉刷新: 容器高度
  12332. downRate: 0,
  12333. // 下拉比率(inOffset: rate<1; outOffset: rate>=1)
  12334. downLoadType: 0,
  12335. // 下拉刷新状态: 0(loading前), 1(inOffset), 2(outOffset), 3(showLoading), 4(endDownScroll)
  12336. upLoadType: 0,
  12337. // 上拉加载状态: 0(loading前), 1loading中, 2没有更多了,显示END文本提示, 3(没有更多了,不显示END文本提示)
  12338. isShowEmpty: false,
  12339. // 是否显示空布局
  12340. isShowToTop: false,
  12341. // 是否显示回到顶部按钮
  12342. scrollTop: 0,
  12343. // 滚动条的位置
  12344. scrollAnim: false,
  12345. // 是否开启滚动动画
  12346. windowTop: 0,
  12347. // 可使用窗口的顶部位置
  12348. windowBottom: 0,
  12349. // 可使用窗口的底部位置
  12350. windowHeight: 0,
  12351. // 可使用窗口的高度
  12352. statusBarHeight: 0
  12353. // 状态栏高度
  12354. };
  12355. },
  12356. watch: {
  12357. height() {
  12358. this.setClientHeight();
  12359. }
  12360. },
  12361. computed: {
  12362. // 是否使用fixed定位 (当height有值,则不使用)
  12363. isFixed() {
  12364. return !this.height && this.fixed;
  12365. },
  12366. // mescroll的高度
  12367. scrollHeight() {
  12368. if (this.isFixed) {
  12369. return "auto";
  12370. } else if (this.height) {
  12371. return this.toPx(this.height) + "px";
  12372. } else {
  12373. return "100%";
  12374. }
  12375. },
  12376. // 下拉布局往下偏移的距离 (px)
  12377. numTop() {
  12378. return this.toPx(this.top);
  12379. },
  12380. fixedTop() {
  12381. return this.isFixed ? this.numTop + this.windowTop + "px" : 0;
  12382. },
  12383. padTop() {
  12384. return !this.isFixed ? this.numTop + "px" : 0;
  12385. },
  12386. // 上拉布局往上偏移 (px)
  12387. numBottom() {
  12388. return this.toPx(this.bottom);
  12389. },
  12390. fixedBottom() {
  12391. return this.isFixed ? this.numBottom + this.windowBottom + "px" : 0;
  12392. },
  12393. padBottom() {
  12394. return !this.isFixed ? this.numBottom + "px" : 0;
  12395. },
  12396. // 是否为重置下拉的状态
  12397. isDownReset() {
  12398. return this.downLoadType === 3 || this.downLoadType === 4;
  12399. },
  12400. // 过渡
  12401. transition() {
  12402. return this.isDownReset ? "transform 300ms" : "";
  12403. },
  12404. translateY() {
  12405. return this.downHight > 0 ? "translateY(" + this.downHight + "px)" : "";
  12406. },
  12407. // 列表是否可滑动
  12408. scrollable() {
  12409. if (this.disableScroll)
  12410. return false;
  12411. return this.downLoadType === 0 || this.isDownReset;
  12412. },
  12413. // 是否在加载中
  12414. isDownLoading() {
  12415. return this.downLoadType === 3;
  12416. },
  12417. // 旋转的角度
  12418. downRotate() {
  12419. return "rotate(" + 360 * this.downRate + "deg)";
  12420. },
  12421. // 文本提示
  12422. downText() {
  12423. if (!this.mescroll)
  12424. return "";
  12425. switch (this.downLoadType) {
  12426. case 1:
  12427. return this.mescroll.optDown.textInOffset;
  12428. case 2:
  12429. return this.mescroll.optDown.textOutOffset;
  12430. case 3:
  12431. return this.mescroll.optDown.textLoading;
  12432. case 4:
  12433. return this.mescroll.isDownEndSuccess ? this.mescroll.optDown.textSuccess : this.mescroll.isDownEndSuccess == false ? this.mescroll.optDown.textErr : this.mescroll.optDown.textInOffset;
  12434. default:
  12435. return this.mescroll.optDown.textInOffset;
  12436. }
  12437. }
  12438. },
  12439. methods: {
  12440. //number,rpx,upx,px,% --> px的数值
  12441. toPx(num) {
  12442. if (typeof num === "string") {
  12443. if (num.indexOf("px") !== -1) {
  12444. if (num.indexOf("rpx") !== -1) {
  12445. num = num.replace("rpx", "");
  12446. } else if (num.indexOf("upx") !== -1) {
  12447. num = num.replace("upx", "");
  12448. } else {
  12449. return Number(num.replace("px", ""));
  12450. }
  12451. } else if (num.indexOf("%") !== -1) {
  12452. let rate = Number(num.replace("%", "")) / 100;
  12453. return this.windowHeight * rate;
  12454. }
  12455. }
  12456. return num ? uni.upx2px(Number(num)) : 0;
  12457. },
  12458. //注册列表滚动事件,用于下拉刷新和上拉加载
  12459. scroll(e) {
  12460. this.mescroll.scroll(e.detail, () => {
  12461. this.$emit("scroll", this.mescroll);
  12462. });
  12463. },
  12464. // 点击空布局的按钮回调
  12465. emptyClick() {
  12466. this.$emit("emptyclick", this.mescroll);
  12467. },
  12468. // 点击回到顶部的按钮回调
  12469. toTopClick() {
  12470. this.mescroll.scrollTo(0, this.mescroll.optUp.toTop.duration);
  12471. this.$emit("topclick", this.mescroll);
  12472. },
  12473. // 更新滚动区域的高度 (使内容不满屏和到底,都可继续翻页)
  12474. setClientHeight() {
  12475. if (!this.isExec) {
  12476. this.isExec = true;
  12477. this.$nextTick(() => {
  12478. this.getClientInfo((data) => {
  12479. this.isExec = false;
  12480. if (data) {
  12481. this.mescroll.setClientHeight(data.height);
  12482. } else if (this.clientNum != 3) {
  12483. this.clientNum = this.clientNum == null ? 1 : this.clientNum + 1;
  12484. setTimeout(() => {
  12485. this.setClientHeight();
  12486. }, this.clientNum * 100);
  12487. }
  12488. });
  12489. });
  12490. }
  12491. },
  12492. // 获取滚动区域的信息
  12493. getClientInfo(success) {
  12494. let query = uni.createSelectorQuery().in(this);
  12495. let view = query.select("#" + this.viewId);
  12496. view.boundingClientRect((data) => {
  12497. success(data);
  12498. }).exec();
  12499. }
  12500. },
  12501. // 使用created初始化mescroll对象; 如果用mounted部分css样式编译到H5会失效
  12502. created() {
  12503. let vm = this;
  12504. let diyOption = {
  12505. // 下拉刷新的配置
  12506. down: {
  12507. inOffset() {
  12508. vm.downLoadType = 1;
  12509. },
  12510. outOffset() {
  12511. vm.downLoadType = 2;
  12512. },
  12513. onMoving(mescroll, rate, downHight) {
  12514. vm.downHight = downHight;
  12515. vm.downRate = rate;
  12516. },
  12517. showLoading(mescroll, downHight) {
  12518. vm.downLoadType = 3;
  12519. vm.downHight = downHight;
  12520. },
  12521. beforeEndDownScroll(mescroll) {
  12522. vm.downLoadType = 4;
  12523. return mescroll.optDown.beforeEndDelay;
  12524. },
  12525. endDownScroll() {
  12526. vm.downLoadType = 4;
  12527. vm.downHight = 0;
  12528. vm.downResetTimer && clearTimeout(vm.downResetTimer);
  12529. vm.downResetTimer = setTimeout(() => {
  12530. if (vm.downLoadType === 4)
  12531. vm.downLoadType = 0;
  12532. }, 300);
  12533. },
  12534. // 派发下拉刷新的回调
  12535. callback: function(mescroll) {
  12536. vm.$emit("down", mescroll);
  12537. }
  12538. },
  12539. // 上拉加载的配置
  12540. up: {
  12541. // 显示加载中的回调
  12542. showLoading() {
  12543. vm.upLoadType = 1;
  12544. },
  12545. // 显示无更多数据的回调
  12546. showNoMore() {
  12547. vm.upLoadType = 2;
  12548. },
  12549. // 隐藏上拉加载的回调
  12550. hideUpScroll(mescroll) {
  12551. vm.upLoadType = mescroll.optUp.hasNext ? 0 : 3;
  12552. },
  12553. // 空布局
  12554. empty: {
  12555. onShow(isShow) {
  12556. vm.isShowEmpty = isShow;
  12557. }
  12558. },
  12559. // 回到顶部
  12560. toTop: {
  12561. onShow(isShow) {
  12562. vm.isShowToTop = isShow;
  12563. }
  12564. },
  12565. // 派发上拉加载的回调
  12566. callback: function(mescroll) {
  12567. vm.$emit("up", mescroll);
  12568. vm.setClientHeight();
  12569. }
  12570. }
  12571. };
  12572. let i18nType = mescrollI18n.getType();
  12573. let i18nOption = { type: i18nType };
  12574. MeScroll.extend(i18nOption, vm.i18n);
  12575. MeScroll.extend(i18nOption, GlobalOption.i18n);
  12576. MeScroll.extend(diyOption, i18nOption[i18nType]);
  12577. MeScroll.extend(diyOption, { down: GlobalOption.down, up: GlobalOption.up });
  12578. let myOption = JSON.parse(JSON.stringify({ "down": vm.down, "up": vm.up }));
  12579. MeScroll.extend(myOption, diyOption);
  12580. vm.mescroll = new MeScroll(myOption);
  12581. vm.mescroll.viewId = vm.viewId;
  12582. vm.mescroll.i18n = i18nOption;
  12583. vm.$emit("init", vm.mescroll);
  12584. const sys2 = uni.getSystemInfoSync();
  12585. if (sys2.windowTop)
  12586. vm.windowTop = sys2.windowTop;
  12587. if (sys2.windowBottom)
  12588. vm.windowBottom = sys2.windowBottom;
  12589. if (sys2.windowHeight)
  12590. vm.windowHeight = sys2.windowHeight;
  12591. if (sys2.statusBarHeight)
  12592. vm.statusBarHeight = sys2.statusBarHeight;
  12593. vm.mescroll.setBodyHeight(sys2.windowHeight);
  12594. vm.mescroll.resetScrollTo((y, t2) => {
  12595. vm.scrollAnim = t2 !== 0;
  12596. if (typeof y === "string") {
  12597. vm.getClientInfo(function(rect) {
  12598. let mescrollTop = rect.top;
  12599. let selector;
  12600. if (y.indexOf("#") == -1 && y.indexOf(".") == -1) {
  12601. selector = "#" + y;
  12602. } else {
  12603. selector = y;
  12604. if (y.indexOf(">>>") != -1) {
  12605. selector = y.split(">>>")[1].trim();
  12606. }
  12607. }
  12608. uni.createSelectorQuery().select(selector).boundingClientRect(function(rect2) {
  12609. if (rect2) {
  12610. let curY2 = vm.mescroll.getScrollTop();
  12611. let top = rect2.top - mescrollTop;
  12612. top += curY2;
  12613. if (!vm.isFixed)
  12614. top -= vm.numTop;
  12615. vm.scrollTop = curY2;
  12616. vm.$nextTick(function() {
  12617. vm.scrollTop = top;
  12618. });
  12619. } else {
  12620. formatAppLog("error", "at uni_modules/mescroll-uni/components/mescroll-uni/mescroll-uni.vue:422", selector + " does not exist");
  12621. }
  12622. }).exec();
  12623. });
  12624. return;
  12625. }
  12626. let curY = vm.mescroll.getScrollTop();
  12627. if (t2 === 0 || t2 === 300) {
  12628. vm.scrollTop = curY;
  12629. vm.$nextTick(function() {
  12630. vm.scrollTop = y;
  12631. });
  12632. } else {
  12633. vm.mescroll.getStep(curY, y, (step) => {
  12634. vm.scrollTop = step;
  12635. }, t2);
  12636. }
  12637. });
  12638. if (vm.up && vm.up.toTop && vm.up.toTop.safearea != null)
  12639. ;
  12640. else {
  12641. vm.mescroll.optUp.toTop.safearea = vm.safearea;
  12642. }
  12643. uni.$on("setMescrollGlobalOption", (options) => {
  12644. if (!options)
  12645. return;
  12646. let i18nType2 = options.i18n ? options.i18n.type : null;
  12647. if (i18nType2 && vm.mescroll.i18n.type != i18nType2) {
  12648. vm.mescroll.i18n.type = i18nType2;
  12649. mescrollI18n.setType(i18nType2);
  12650. MeScroll.extend(options, vm.mescroll.i18n[i18nType2]);
  12651. }
  12652. if (options.down) {
  12653. let down = MeScroll.extend({}, options.down);
  12654. vm.mescroll.optDown = MeScroll.extend(down, vm.mescroll.optDown);
  12655. }
  12656. if (options.up) {
  12657. let up = MeScroll.extend({}, options.up);
  12658. vm.mescroll.optUp = MeScroll.extend(up, vm.mescroll.optUp);
  12659. }
  12660. });
  12661. },
  12662. mounted() {
  12663. this.setClientHeight();
  12664. },
  12665. destroyed() {
  12666. uni.$off("setMescrollGlobalOption");
  12667. }
  12668. };
  12669. function _sfc_render$1p(_ctx, _cache, $props, $setup, $data, $options) {
  12670. const _component_mescroll_empty = resolveEasycom(vue.resolveDynamicComponent("mescroll-empty"), __easycom_0$5);
  12671. const _component_mescroll_top = vue.resolveComponent("mescroll-top");
  12672. return vue.openBlock(), vue.createElementBlock("view", { class: "mescroll-uni-warp" }, [
  12673. vue.createElementVNode("scroll-view", {
  12674. id: $data.viewId,
  12675. class: vue.normalizeClass(["mescroll-uni", { "mescroll-uni-fixed": $options.isFixed }]),
  12676. style: vue.normalizeStyle({ "height": $options.scrollHeight, "padding-top": $options.padTop, "padding-bottom": $options.padBottom, "top": $options.fixedTop, "bottom": $options.fixedBottom }),
  12677. "scroll-top": $data.scrollTop,
  12678. "scroll-with-animation": $data.scrollAnim,
  12679. onScroll: _cache[4] || (_cache[4] = (...args) => $options.scroll && $options.scroll(...args)),
  12680. "scroll-y": $options.scrollable,
  12681. "enable-back-to-top": true,
  12682. throttle: false
  12683. }, [
  12684. vue.createElementVNode("view", {
  12685. class: "mescroll-uni-content mescroll-render-touch",
  12686. onTouchstart: _cache[0] || (_cache[0] = (...args) => _ctx.wxsBiz.touchstartEvent && _ctx.wxsBiz.touchstartEvent(...args)),
  12687. onTouchmove: _cache[1] || (_cache[1] = (...args) => _ctx.wxsBiz.touchmoveEvent && _ctx.wxsBiz.touchmoveEvent(...args)),
  12688. onTouchend: _cache[2] || (_cache[2] = (...args) => _ctx.wxsBiz.touchendEvent && _ctx.wxsBiz.touchendEvent(...args)),
  12689. onTouchcancel: _cache[3] || (_cache[3] = (...args) => _ctx.wxsBiz.touchendEvent && _ctx.wxsBiz.touchendEvent(...args)),
  12690. "change:prop": _ctx.wxsBiz.propObserver,
  12691. prop: vue.wp(_ctx.wxsProp)
  12692. }, [
  12693. vue.createCommentVNode(" 状态栏 "),
  12694. $props.topbar && $data.statusBarHeight ? (vue.openBlock(), vue.createElementBlock(
  12695. "view",
  12696. {
  12697. key: 0,
  12698. class: "mescroll-topbar",
  12699. style: vue.normalizeStyle({ height: $data.statusBarHeight + "px", background: $props.topbar })
  12700. },
  12701. null,
  12702. 4
  12703. /* STYLE */
  12704. )) : vue.createCommentVNode("v-if", true),
  12705. vue.createElementVNode("view", {
  12706. class: "mescroll-wxs-content",
  12707. style: vue.normalizeStyle({ "transform": $options.translateY, "transition": $options.transition }),
  12708. "change:prop": _ctx.wxsBiz.callObserver,
  12709. prop: vue.wp(_ctx.callProp)
  12710. }, [
  12711. vue.createCommentVNode(" 下拉加载区域 (支付宝小程序子组件传参给子子组件仍报单项数据流的异常,暂时不通过mescroll-down组件实现)"),
  12712. vue.createCommentVNode(' <mescroll-down :option="mescroll.optDown" :type="downLoadType" :rate="downRate"></mescroll-down> '),
  12713. $data.mescroll.optDown.use ? (vue.openBlock(), vue.createElementBlock(
  12714. "view",
  12715. {
  12716. key: 0,
  12717. class: "mescroll-downwarp",
  12718. style: vue.normalizeStyle({ "background": $data.mescroll.optDown.bgColor, "color": $data.mescroll.optDown.textColor })
  12719. },
  12720. [
  12721. vue.createElementVNode("view", { class: "downwarp-content" }, [
  12722. vue.createElementVNode(
  12723. "view",
  12724. {
  12725. class: vue.normalizeClass(["downwarp-progress mescroll-wxs-progress", { "mescroll-rotate": $options.isDownLoading }]),
  12726. style: vue.normalizeStyle({ "border-color": $data.mescroll.optDown.textColor, "transform": $options.downRotate })
  12727. },
  12728. null,
  12729. 6
  12730. /* CLASS, STYLE */
  12731. ),
  12732. vue.createElementVNode(
  12733. "view",
  12734. { class: "downwarp-tip" },
  12735. vue.toDisplayString($options.downText),
  12736. 1
  12737. /* TEXT */
  12738. )
  12739. ])
  12740. ],
  12741. 4
  12742. /* STYLE */
  12743. )) : vue.createCommentVNode("v-if", true),
  12744. vue.createCommentVNode(" 列表内容 "),
  12745. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true),
  12746. vue.createCommentVNode(" 空布局 "),
  12747. $data.isShowEmpty ? (vue.openBlock(), vue.createBlock(_component_mescroll_empty, {
  12748. key: 1,
  12749. option: $data.mescroll.optUp.empty,
  12750. onEmptyclick: $options.emptyClick
  12751. }, null, 8, ["option", "onEmptyclick"])) : vue.createCommentVNode("v-if", true),
  12752. vue.createCommentVNode(" 上拉加载区域 (下拉刷新时不显示, 支付宝小程序子组件传参给子子组件仍报单项数据流的异常,暂时不通过mescroll-up组件实现)"),
  12753. vue.createCommentVNode(' <mescroll-up v-if="mescroll.optUp.use && !isDownLoading && upLoadType!==3" :option="mescroll.optUp" :type="upLoadType"></mescroll-up> '),
  12754. $data.mescroll.optUp.use && !$options.isDownLoading && $data.upLoadType !== 3 ? (vue.openBlock(), vue.createElementBlock(
  12755. "view",
  12756. {
  12757. key: 2,
  12758. class: "mescroll-upwarp",
  12759. style: vue.normalizeStyle({ "background": $data.mescroll.optUp.bgColor, "color": $data.mescroll.optUp.textColor })
  12760. },
  12761. [
  12762. vue.createCommentVNode(" 加载中 (此处不能用v-if,否则android小程序快速上拉可能会不断触发上拉回调) "),
  12763. vue.withDirectives(vue.createElementVNode(
  12764. "view",
  12765. null,
  12766. [
  12767. vue.createElementVNode(
  12768. "view",
  12769. {
  12770. class: "upwarp-progress mescroll-rotate",
  12771. style: vue.normalizeStyle({ "border-color": $data.mescroll.optUp.textColor })
  12772. },
  12773. null,
  12774. 4
  12775. /* STYLE */
  12776. ),
  12777. vue.createElementVNode(
  12778. "view",
  12779. { class: "upwarp-tip" },
  12780. vue.toDisplayString($data.mescroll.optUp.textLoading),
  12781. 1
  12782. /* TEXT */
  12783. )
  12784. ],
  12785. 512
  12786. /* NEED_PATCH */
  12787. ), [
  12788. [vue.vShow, $data.upLoadType === 1]
  12789. ]),
  12790. vue.createCommentVNode(" 无数据 "),
  12791. $data.upLoadType === 2 ? (vue.openBlock(), vue.createElementBlock(
  12792. "view",
  12793. {
  12794. key: 0,
  12795. class: "upwarp-nodata"
  12796. },
  12797. vue.toDisplayString($data.mescroll.optUp.textNoMore),
  12798. 1
  12799. /* TEXT */
  12800. )) : vue.createCommentVNode("v-if", true)
  12801. ],
  12802. 4
  12803. /* STYLE */
  12804. )) : vue.createCommentVNode("v-if", true)
  12805. ], 12, ["change:prop", "prop"]),
  12806. vue.createCommentVNode(" 底部是否偏移TabBar的高度(默认仅在H5端的tab页生效) "),
  12807. vue.createCommentVNode(" 适配iPhoneX "),
  12808. $props.safearea ? (vue.openBlock(), vue.createElementBlock("view", {
  12809. key: 1,
  12810. class: "mescroll-safearea"
  12811. })) : vue.createCommentVNode("v-if", true)
  12812. ], 40, ["change:prop", "prop"])
  12813. ], 46, ["id", "scroll-top", "scroll-with-animation", "scroll-y"]),
  12814. vue.createCommentVNode(" 回到顶部按钮 (fixed元素,需写在scroll-view外面,防止滚动的时候抖动)"),
  12815. vue.createVNode(_component_mescroll_top, {
  12816. modelValue: $data.isShowToTop,
  12817. "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $data.isShowToTop = $event),
  12818. option: $data.mescroll.optUp.toTop,
  12819. onClick: $options.toTopClick
  12820. }, null, 8, ["modelValue", "option", "onClick"]),
  12821. vue.createCommentVNode(" renderjs的数据载体,不可写在mescroll-downwarp内部,避免use为false时,载体丢失,无法更新数据 "),
  12822. vue.createElementVNode("view", {
  12823. "change:prop": _ctx.renderBiz.propObserver,
  12824. prop: vue.wp(_ctx.wxsProp)
  12825. }, null, 8, ["change:prop", "prop"])
  12826. ]);
  12827. }
  12828. if (typeof block0$1 === "function")
  12829. block0$1(_sfc_main$1q);
  12830. if (typeof block1 === "function")
  12831. block1(_sfc_main$1q);
  12832. const __easycom_0$4 = /* @__PURE__ */ _export_sfc(_sfc_main$1q, [["render", _sfc_render$1p], ["__scopeId", "data-v-97b1664c"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-uni.vue"]]);
  12833. function useMescroll(onPageScroll, onReachBottom, onPullDownRefresh) {
  12834. let mescroll = null;
  12835. const mescrollInit = (e) => {
  12836. mescroll = e;
  12837. };
  12838. const getMescroll = () => {
  12839. return mescroll;
  12840. };
  12841. const downCallback = () => {
  12842. if (mescroll.optUp.use) {
  12843. mescroll.resetUpScroll();
  12844. } else {
  12845. setTimeout(() => {
  12846. mescroll.endSuccess();
  12847. }, 500);
  12848. }
  12849. };
  12850. const upCallback = () => {
  12851. setTimeout(() => {
  12852. mescroll.endErr();
  12853. }, 500);
  12854. };
  12855. onPullDownRefresh && onPullDownRefresh(() => {
  12856. mescroll && mescroll.onPullDownRefresh();
  12857. });
  12858. onPageScroll && onPageScroll((e) => {
  12859. mescroll && mescroll.onPageScroll(e);
  12860. });
  12861. onReachBottom && onReachBottom(() => {
  12862. mescroll && mescroll.onReachBottom();
  12863. });
  12864. return {
  12865. getMescroll,
  12866. mescrollInit,
  12867. downCallback,
  12868. upCallback
  12869. };
  12870. }
  12871. var isVue2 = false;
  12872. function set(target, key, val) {
  12873. if (Array.isArray(target)) {
  12874. target.length = Math.max(target.length, key);
  12875. target.splice(key, 1, val);
  12876. return val;
  12877. }
  12878. target[key] = val;
  12879. return val;
  12880. }
  12881. function del(target, key) {
  12882. if (Array.isArray(target)) {
  12883. target.splice(key, 1);
  12884. return;
  12885. }
  12886. delete target[key];
  12887. }
  12888. function getDevtoolsGlobalHook() {
  12889. return getTarget().__VUE_DEVTOOLS_GLOBAL_HOOK__;
  12890. }
  12891. function getTarget() {
  12892. return typeof navigator !== "undefined" && typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {};
  12893. }
  12894. const isProxyAvailable = typeof Proxy === "function";
  12895. const HOOK_SETUP = "devtools-plugin:setup";
  12896. const HOOK_PLUGIN_SETTINGS_SET = "plugin:settings:set";
  12897. let supported;
  12898. let perf;
  12899. function isPerformanceSupported() {
  12900. var _a;
  12901. if (supported !== void 0) {
  12902. return supported;
  12903. }
  12904. if (typeof window !== "undefined" && window.performance) {
  12905. supported = true;
  12906. perf = window.performance;
  12907. } else if (typeof global !== "undefined" && ((_a = global.perf_hooks) === null || _a === void 0 ? void 0 : _a.performance)) {
  12908. supported = true;
  12909. perf = global.perf_hooks.performance;
  12910. } else {
  12911. supported = false;
  12912. }
  12913. return supported;
  12914. }
  12915. function now() {
  12916. return isPerformanceSupported() ? perf.now() : Date.now();
  12917. }
  12918. class ApiProxy {
  12919. constructor(plugin, hook) {
  12920. this.target = null;
  12921. this.targetQueue = [];
  12922. this.onQueue = [];
  12923. this.plugin = plugin;
  12924. this.hook = hook;
  12925. const defaultSettings = {};
  12926. if (plugin.settings) {
  12927. for (const id in plugin.settings) {
  12928. const item = plugin.settings[id];
  12929. defaultSettings[id] = item.defaultValue;
  12930. }
  12931. }
  12932. const localSettingsSaveId = `__vue-devtools-plugin-settings__${plugin.id}`;
  12933. let currentSettings = Object.assign({}, defaultSettings);
  12934. try {
  12935. const raw = localStorage.getItem(localSettingsSaveId);
  12936. const data = JSON.parse(raw);
  12937. Object.assign(currentSettings, data);
  12938. } catch (e) {
  12939. }
  12940. this.fallbacks = {
  12941. getSettings() {
  12942. return currentSettings;
  12943. },
  12944. setSettings(value2) {
  12945. try {
  12946. localStorage.setItem(localSettingsSaveId, JSON.stringify(value2));
  12947. } catch (e) {
  12948. }
  12949. currentSettings = value2;
  12950. },
  12951. now() {
  12952. return now();
  12953. }
  12954. };
  12955. if (hook) {
  12956. hook.on(HOOK_PLUGIN_SETTINGS_SET, (pluginId, value2) => {
  12957. if (pluginId === this.plugin.id) {
  12958. this.fallbacks.setSettings(value2);
  12959. }
  12960. });
  12961. }
  12962. this.proxiedOn = new Proxy({}, {
  12963. get: (_target, prop) => {
  12964. if (this.target) {
  12965. return this.target.on[prop];
  12966. } else {
  12967. return (...args) => {
  12968. this.onQueue.push({
  12969. method: prop,
  12970. args
  12971. });
  12972. };
  12973. }
  12974. }
  12975. });
  12976. this.proxiedTarget = new Proxy({}, {
  12977. get: (_target, prop) => {
  12978. if (this.target) {
  12979. return this.target[prop];
  12980. } else if (prop === "on") {
  12981. return this.proxiedOn;
  12982. } else if (Object.keys(this.fallbacks).includes(prop)) {
  12983. return (...args) => {
  12984. this.targetQueue.push({
  12985. method: prop,
  12986. args,
  12987. resolve: () => {
  12988. }
  12989. });
  12990. return this.fallbacks[prop](...args);
  12991. };
  12992. } else {
  12993. return (...args) => {
  12994. return new Promise((resolve) => {
  12995. this.targetQueue.push({
  12996. method: prop,
  12997. args,
  12998. resolve
  12999. });
  13000. });
  13001. };
  13002. }
  13003. }
  13004. });
  13005. }
  13006. async setRealTarget(target) {
  13007. this.target = target;
  13008. for (const item of this.onQueue) {
  13009. this.target.on[item.method](...item.args);
  13010. }
  13011. for (const item of this.targetQueue) {
  13012. item.resolve(await this.target[item.method](...item.args));
  13013. }
  13014. }
  13015. }
  13016. function setupDevtoolsPlugin(pluginDescriptor, setupFn) {
  13017. const descriptor = pluginDescriptor;
  13018. const target = getTarget();
  13019. const hook = getDevtoolsGlobalHook();
  13020. const enableProxy = isProxyAvailable && descriptor.enableEarlyProxy;
  13021. if (hook && (target.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !enableProxy)) {
  13022. hook.emit(HOOK_SETUP, pluginDescriptor, setupFn);
  13023. } else {
  13024. const proxy = enableProxy ? new ApiProxy(descriptor, hook) : null;
  13025. const list = target.__VUE_DEVTOOLS_PLUGINS__ = target.__VUE_DEVTOOLS_PLUGINS__ || [];
  13026. list.push({
  13027. pluginDescriptor: descriptor,
  13028. setupFn,
  13029. proxy
  13030. });
  13031. if (proxy)
  13032. setupFn(proxy.proxiedTarget);
  13033. }
  13034. }
  13035. /*!
  13036. * pinia v2.1.7
  13037. * (c) 2023 Eduardo San Martin Morote
  13038. * @license MIT
  13039. */
  13040. let activePinia;
  13041. const setActivePinia = (pinia2) => activePinia = pinia2;
  13042. const piniaSymbol = Symbol("pinia");
  13043. function isPlainObject$1(o) {
  13044. return o && typeof o === "object" && Object.prototype.toString.call(o) === "[object Object]" && typeof o.toJSON !== "function";
  13045. }
  13046. var MutationType;
  13047. (function(MutationType2) {
  13048. MutationType2["direct"] = "direct";
  13049. MutationType2["patchObject"] = "patch object";
  13050. MutationType2["patchFunction"] = "patch function";
  13051. })(MutationType || (MutationType = {}));
  13052. const IS_CLIENT = typeof window !== "undefined";
  13053. const USE_DEVTOOLS = IS_CLIENT;
  13054. const _global = /* @__PURE__ */ (() => typeof window === "object" && window.window === window ? window : typeof self === "object" && self.self === self ? self : typeof global === "object" && global.global === global ? global : typeof globalThis === "object" ? globalThis : { HTMLElement: null })();
  13055. function bom(blob, { autoBom = false } = {}) {
  13056. if (autoBom && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(blob.type)) {
  13057. return new Blob([String.fromCharCode(65279), blob], { type: blob.type });
  13058. }
  13059. return blob;
  13060. }
  13061. function download(url2, name, opts) {
  13062. const xhr = new XMLHttpRequest();
  13063. xhr.open("GET", url2);
  13064. xhr.responseType = "blob";
  13065. xhr.onload = function() {
  13066. saveAs(xhr.response, name, opts);
  13067. };
  13068. xhr.onerror = function() {
  13069. console.error("could not download file");
  13070. };
  13071. xhr.send();
  13072. }
  13073. function corsEnabled(url2) {
  13074. const xhr = new XMLHttpRequest();
  13075. xhr.open("HEAD", url2, false);
  13076. try {
  13077. xhr.send();
  13078. } catch (e) {
  13079. }
  13080. return xhr.status >= 200 && xhr.status <= 299;
  13081. }
  13082. function click(node) {
  13083. try {
  13084. node.dispatchEvent(new MouseEvent("click"));
  13085. } catch (e) {
  13086. const evt = document.createEvent("MouseEvents");
  13087. evt.initMouseEvent("click", true, true, window, 0, 0, 0, 80, 20, false, false, false, false, 0, null);
  13088. node.dispatchEvent(evt);
  13089. }
  13090. }
  13091. const _navigator = typeof navigator === "object" ? navigator : { userAgent: "" };
  13092. const isMacOSWebView = /* @__PURE__ */ (() => /Macintosh/.test(_navigator.userAgent) && /AppleWebKit/.test(_navigator.userAgent) && !/Safari/.test(_navigator.userAgent))();
  13093. const saveAs = !IS_CLIENT ? () => {
  13094. } : (
  13095. // Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView or mini program
  13096. typeof HTMLAnchorElement !== "undefined" && "download" in HTMLAnchorElement.prototype && !isMacOSWebView ? downloadSaveAs : (
  13097. // Use msSaveOrOpenBlob as a second approach
  13098. "msSaveOrOpenBlob" in _navigator ? msSaveAs : (
  13099. // Fallback to using FileReader and a popup
  13100. fileSaverSaveAs
  13101. )
  13102. )
  13103. );
  13104. function downloadSaveAs(blob, name = "download", opts) {
  13105. const a = document.createElement("a");
  13106. a.download = name;
  13107. a.rel = "noopener";
  13108. if (typeof blob === "string") {
  13109. a.href = blob;
  13110. if (a.origin !== location.origin) {
  13111. if (corsEnabled(a.href)) {
  13112. download(blob, name, opts);
  13113. } else {
  13114. a.target = "_blank";
  13115. click(a);
  13116. }
  13117. } else {
  13118. click(a);
  13119. }
  13120. } else {
  13121. a.href = URL.createObjectURL(blob);
  13122. setTimeout(function() {
  13123. URL.revokeObjectURL(a.href);
  13124. }, 4e4);
  13125. setTimeout(function() {
  13126. click(a);
  13127. }, 0);
  13128. }
  13129. }
  13130. function msSaveAs(blob, name = "download", opts) {
  13131. if (typeof blob === "string") {
  13132. if (corsEnabled(blob)) {
  13133. download(blob, name, opts);
  13134. } else {
  13135. const a = document.createElement("a");
  13136. a.href = blob;
  13137. a.target = "_blank";
  13138. setTimeout(function() {
  13139. click(a);
  13140. });
  13141. }
  13142. } else {
  13143. navigator.msSaveOrOpenBlob(bom(blob, opts), name);
  13144. }
  13145. }
  13146. function fileSaverSaveAs(blob, name, opts, popup) {
  13147. popup = popup || open("", "_blank");
  13148. if (popup) {
  13149. popup.document.title = popup.document.body.innerText = "downloading...";
  13150. }
  13151. if (typeof blob === "string")
  13152. return download(blob, name, opts);
  13153. const force = blob.type === "application/octet-stream";
  13154. const isSafari = /constructor/i.test(String(_global.HTMLElement)) || "safari" in _global;
  13155. const isChromeIOS = /CriOS\/[\d]+/.test(navigator.userAgent);
  13156. if ((isChromeIOS || force && isSafari || isMacOSWebView) && typeof FileReader !== "undefined") {
  13157. const reader = new FileReader();
  13158. reader.onloadend = function() {
  13159. let url2 = reader.result;
  13160. if (typeof url2 !== "string") {
  13161. popup = null;
  13162. throw new Error("Wrong reader.result type");
  13163. }
  13164. url2 = isChromeIOS ? url2 : url2.replace(/^data:[^;]*;/, "data:attachment/file;");
  13165. if (popup) {
  13166. popup.location.href = url2;
  13167. } else {
  13168. location.assign(url2);
  13169. }
  13170. popup = null;
  13171. };
  13172. reader.readAsDataURL(blob);
  13173. } else {
  13174. const url2 = URL.createObjectURL(blob);
  13175. if (popup)
  13176. popup.location.assign(url2);
  13177. else
  13178. location.href = url2;
  13179. popup = null;
  13180. setTimeout(function() {
  13181. URL.revokeObjectURL(url2);
  13182. }, 4e4);
  13183. }
  13184. }
  13185. function toastMessage(message, type2) {
  13186. const piniaMessage = "🍍 " + message;
  13187. if (typeof __VUE_DEVTOOLS_TOAST__ === "function") {
  13188. __VUE_DEVTOOLS_TOAST__(piniaMessage, type2);
  13189. } else if (type2 === "error") {
  13190. console.error(piniaMessage);
  13191. } else if (type2 === "warn") {
  13192. console.warn(piniaMessage);
  13193. } else {
  13194. console.log(piniaMessage);
  13195. }
  13196. }
  13197. function isPinia(o) {
  13198. return "_a" in o && "install" in o;
  13199. }
  13200. function checkClipboardAccess() {
  13201. if (!("clipboard" in navigator)) {
  13202. toastMessage(`Your browser doesn't support the Clipboard API`, "error");
  13203. return true;
  13204. }
  13205. }
  13206. function checkNotFocusedError(error2) {
  13207. if (error2 instanceof Error && error2.message.toLowerCase().includes("document is not focused")) {
  13208. toastMessage('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.', "warn");
  13209. return true;
  13210. }
  13211. return false;
  13212. }
  13213. async function actionGlobalCopyState(pinia2) {
  13214. if (checkClipboardAccess())
  13215. return;
  13216. try {
  13217. await navigator.clipboard.writeText(JSON.stringify(pinia2.state.value));
  13218. toastMessage("Global state copied to clipboard.");
  13219. } catch (error2) {
  13220. if (checkNotFocusedError(error2))
  13221. return;
  13222. toastMessage(`Failed to serialize the state. Check the console for more details.`, "error");
  13223. console.error(error2);
  13224. }
  13225. }
  13226. async function actionGlobalPasteState(pinia2) {
  13227. if (checkClipboardAccess())
  13228. return;
  13229. try {
  13230. loadStoresState(pinia2, JSON.parse(await navigator.clipboard.readText()));
  13231. toastMessage("Global state pasted from clipboard.");
  13232. } catch (error2) {
  13233. if (checkNotFocusedError(error2))
  13234. return;
  13235. toastMessage(`Failed to deserialize the state from clipboard. Check the console for more details.`, "error");
  13236. console.error(error2);
  13237. }
  13238. }
  13239. async function actionGlobalSaveState(pinia2) {
  13240. try {
  13241. saveAs(new Blob([JSON.stringify(pinia2.state.value)], {
  13242. type: "text/plain;charset=utf-8"
  13243. }), "pinia-state.json");
  13244. } catch (error2) {
  13245. toastMessage(`Failed to export the state as JSON. Check the console for more details.`, "error");
  13246. console.error(error2);
  13247. }
  13248. }
  13249. let fileInput;
  13250. function getFileOpener() {
  13251. if (!fileInput) {
  13252. fileInput = document.createElement("input");
  13253. fileInput.type = "file";
  13254. fileInput.accept = ".json";
  13255. }
  13256. function openFile() {
  13257. return new Promise((resolve, reject) => {
  13258. fileInput.onchange = async () => {
  13259. const files = fileInput.files;
  13260. if (!files)
  13261. return resolve(null);
  13262. const file = files.item(0);
  13263. if (!file)
  13264. return resolve(null);
  13265. return resolve({ text: await file.text(), file });
  13266. };
  13267. fileInput.oncancel = () => resolve(null);
  13268. fileInput.onerror = reject;
  13269. fileInput.click();
  13270. });
  13271. }
  13272. return openFile;
  13273. }
  13274. async function actionGlobalOpenStateFile(pinia2) {
  13275. try {
  13276. const open2 = getFileOpener();
  13277. const result = await open2();
  13278. if (!result)
  13279. return;
  13280. const { text, file } = result;
  13281. loadStoresState(pinia2, JSON.parse(text));
  13282. toastMessage(`Global state imported from "${file.name}".`);
  13283. } catch (error2) {
  13284. toastMessage(`Failed to import the state from JSON. Check the console for more details.`, "error");
  13285. console.error(error2);
  13286. }
  13287. }
  13288. function loadStoresState(pinia2, state) {
  13289. for (const key in state) {
  13290. const storeState = pinia2.state.value[key];
  13291. if (storeState) {
  13292. Object.assign(storeState, state[key]);
  13293. } else {
  13294. pinia2.state.value[key] = state[key];
  13295. }
  13296. }
  13297. }
  13298. function formatDisplay(display) {
  13299. return {
  13300. _custom: {
  13301. display
  13302. }
  13303. };
  13304. }
  13305. const PINIA_ROOT_LABEL = "🍍 Pinia (root)";
  13306. const PINIA_ROOT_ID = "_root";
  13307. function formatStoreForInspectorTree(store2) {
  13308. return isPinia(store2) ? {
  13309. id: PINIA_ROOT_ID,
  13310. label: PINIA_ROOT_LABEL
  13311. } : {
  13312. id: store2.$id,
  13313. label: store2.$id
  13314. };
  13315. }
  13316. function formatStoreForInspectorState(store2) {
  13317. if (isPinia(store2)) {
  13318. const storeNames = Array.from(store2._s.keys());
  13319. const storeMap = store2._s;
  13320. const state2 = {
  13321. state: storeNames.map((storeId) => ({
  13322. editable: true,
  13323. key: storeId,
  13324. value: store2.state.value[storeId]
  13325. })),
  13326. getters: storeNames.filter((id) => storeMap.get(id)._getters).map((id) => {
  13327. const store22 = storeMap.get(id);
  13328. return {
  13329. editable: false,
  13330. key: id,
  13331. value: store22._getters.reduce((getters, key) => {
  13332. getters[key] = store22[key];
  13333. return getters;
  13334. }, {})
  13335. };
  13336. })
  13337. };
  13338. return state2;
  13339. }
  13340. const state = {
  13341. state: Object.keys(store2.$state).map((key) => ({
  13342. editable: true,
  13343. key,
  13344. value: store2.$state[key]
  13345. }))
  13346. };
  13347. if (store2._getters && store2._getters.length) {
  13348. state.getters = store2._getters.map((getterName) => ({
  13349. editable: false,
  13350. key: getterName,
  13351. value: store2[getterName]
  13352. }));
  13353. }
  13354. if (store2._customProperties.size) {
  13355. state.customProperties = Array.from(store2._customProperties).map((key) => ({
  13356. editable: true,
  13357. key,
  13358. value: store2[key]
  13359. }));
  13360. }
  13361. return state;
  13362. }
  13363. function formatEventData(events) {
  13364. if (!events)
  13365. return {};
  13366. if (Array.isArray(events)) {
  13367. return events.reduce((data, event) => {
  13368. data.keys.push(event.key);
  13369. data.operations.push(event.type);
  13370. data.oldValue[event.key] = event.oldValue;
  13371. data.newValue[event.key] = event.newValue;
  13372. return data;
  13373. }, {
  13374. oldValue: {},
  13375. keys: [],
  13376. operations: [],
  13377. newValue: {}
  13378. });
  13379. } else {
  13380. return {
  13381. operation: formatDisplay(events.type),
  13382. key: formatDisplay(events.key),
  13383. oldValue: events.oldValue,
  13384. newValue: events.newValue
  13385. };
  13386. }
  13387. }
  13388. function formatMutationType(type2) {
  13389. switch (type2) {
  13390. case MutationType.direct:
  13391. return "mutation";
  13392. case MutationType.patchFunction:
  13393. return "$patch";
  13394. case MutationType.patchObject:
  13395. return "$patch";
  13396. default:
  13397. return "unknown";
  13398. }
  13399. }
  13400. let isTimelineActive = true;
  13401. const componentStateTypes = [];
  13402. const MUTATIONS_LAYER_ID = "pinia:mutations";
  13403. const INSPECTOR_ID = "pinia";
  13404. const { assign: assign$1 } = Object;
  13405. const getStoreType = (id) => "🍍 " + id;
  13406. function registerPiniaDevtools(app, pinia2) {
  13407. setupDevtoolsPlugin({
  13408. id: "dev.esm.pinia",
  13409. label: "Pinia 🍍",
  13410. logo: "https://pinia.vuejs.org/logo.svg",
  13411. packageName: "pinia",
  13412. homepage: "https://pinia.vuejs.org",
  13413. componentStateTypes,
  13414. app
  13415. }, (api) => {
  13416. if (typeof api.now !== "function") {
  13417. toastMessage("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html.");
  13418. }
  13419. api.addTimelineLayer({
  13420. id: MUTATIONS_LAYER_ID,
  13421. label: `Pinia 🍍`,
  13422. color: 15064968
  13423. });
  13424. api.addInspector({
  13425. id: INSPECTOR_ID,
  13426. label: "Pinia 🍍",
  13427. icon: "storage",
  13428. treeFilterPlaceholder: "Search stores",
  13429. actions: [
  13430. {
  13431. icon: "content_copy",
  13432. action: () => {
  13433. actionGlobalCopyState(pinia2);
  13434. },
  13435. tooltip: "Serialize and copy the state"
  13436. },
  13437. {
  13438. icon: "content_paste",
  13439. action: async () => {
  13440. await actionGlobalPasteState(pinia2);
  13441. api.sendInspectorTree(INSPECTOR_ID);
  13442. api.sendInspectorState(INSPECTOR_ID);
  13443. },
  13444. tooltip: "Replace the state with the content of your clipboard"
  13445. },
  13446. {
  13447. icon: "save",
  13448. action: () => {
  13449. actionGlobalSaveState(pinia2);
  13450. },
  13451. tooltip: "Save the state as a JSON file"
  13452. },
  13453. {
  13454. icon: "folder_open",
  13455. action: async () => {
  13456. await actionGlobalOpenStateFile(pinia2);
  13457. api.sendInspectorTree(INSPECTOR_ID);
  13458. api.sendInspectorState(INSPECTOR_ID);
  13459. },
  13460. tooltip: "Import the state from a JSON file"
  13461. }
  13462. ],
  13463. nodeActions: [
  13464. {
  13465. icon: "restore",
  13466. tooltip: 'Reset the state (with "$reset")',
  13467. action: (nodeId) => {
  13468. const store2 = pinia2._s.get(nodeId);
  13469. if (!store2) {
  13470. toastMessage(`Cannot reset "${nodeId}" store because it wasn't found.`, "warn");
  13471. } else if (typeof store2.$reset !== "function") {
  13472. toastMessage(`Cannot reset "${nodeId}" store because it doesn't have a "$reset" method implemented.`, "warn");
  13473. } else {
  13474. store2.$reset();
  13475. toastMessage(`Store "${nodeId}" reset.`);
  13476. }
  13477. }
  13478. }
  13479. ]
  13480. });
  13481. api.on.inspectComponent((payload, ctx) => {
  13482. const proxy = payload.componentInstance && payload.componentInstance.proxy;
  13483. if (proxy && proxy._pStores) {
  13484. const piniaStores = payload.componentInstance.proxy._pStores;
  13485. Object.values(piniaStores).forEach((store2) => {
  13486. payload.instanceData.state.push({
  13487. type: getStoreType(store2.$id),
  13488. key: "state",
  13489. editable: true,
  13490. value: store2._isOptionsAPI ? {
  13491. _custom: {
  13492. value: vue.toRaw(store2.$state),
  13493. actions: [
  13494. {
  13495. icon: "restore",
  13496. tooltip: "Reset the state of this store",
  13497. action: () => store2.$reset()
  13498. }
  13499. ]
  13500. }
  13501. } : (
  13502. // NOTE: workaround to unwrap transferred refs
  13503. Object.keys(store2.$state).reduce((state, key) => {
  13504. state[key] = store2.$state[key];
  13505. return state;
  13506. }, {})
  13507. )
  13508. });
  13509. if (store2._getters && store2._getters.length) {
  13510. payload.instanceData.state.push({
  13511. type: getStoreType(store2.$id),
  13512. key: "getters",
  13513. editable: false,
  13514. value: store2._getters.reduce((getters, key) => {
  13515. try {
  13516. getters[key] = store2[key];
  13517. } catch (error2) {
  13518. getters[key] = error2;
  13519. }
  13520. return getters;
  13521. }, {})
  13522. });
  13523. }
  13524. });
  13525. }
  13526. });
  13527. api.on.getInspectorTree((payload) => {
  13528. if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {
  13529. let stores = [pinia2];
  13530. stores = stores.concat(Array.from(pinia2._s.values()));
  13531. payload.rootNodes = (payload.filter ? stores.filter((store2) => "$id" in store2 ? store2.$id.toLowerCase().includes(payload.filter.toLowerCase()) : PINIA_ROOT_LABEL.toLowerCase().includes(payload.filter.toLowerCase())) : stores).map(formatStoreForInspectorTree);
  13532. }
  13533. });
  13534. api.on.getInspectorState((payload) => {
  13535. if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {
  13536. const inspectedStore = payload.nodeId === PINIA_ROOT_ID ? pinia2 : pinia2._s.get(payload.nodeId);
  13537. if (!inspectedStore) {
  13538. return;
  13539. }
  13540. if (inspectedStore) {
  13541. payload.state = formatStoreForInspectorState(inspectedStore);
  13542. }
  13543. }
  13544. });
  13545. api.on.editInspectorState((payload, ctx) => {
  13546. if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {
  13547. const inspectedStore = payload.nodeId === PINIA_ROOT_ID ? pinia2 : pinia2._s.get(payload.nodeId);
  13548. if (!inspectedStore) {
  13549. return toastMessage(`store "${payload.nodeId}" not found`, "error");
  13550. }
  13551. const { path } = payload;
  13552. if (!isPinia(inspectedStore)) {
  13553. if (path.length !== 1 || !inspectedStore._customProperties.has(path[0]) || path[0] in inspectedStore.$state) {
  13554. path.unshift("$state");
  13555. }
  13556. } else {
  13557. path.unshift("state");
  13558. }
  13559. isTimelineActive = false;
  13560. payload.set(inspectedStore, path, payload.state.value);
  13561. isTimelineActive = true;
  13562. }
  13563. });
  13564. api.on.editComponentState((payload) => {
  13565. if (payload.type.startsWith("🍍")) {
  13566. const storeId = payload.type.replace(/^🍍\s*/, "");
  13567. const store2 = pinia2._s.get(storeId);
  13568. if (!store2) {
  13569. return toastMessage(`store "${storeId}" not found`, "error");
  13570. }
  13571. const { path } = payload;
  13572. if (path[0] !== "state") {
  13573. return toastMessage(`Invalid path for store "${storeId}":
  13574. ${path}
  13575. Only state can be modified.`);
  13576. }
  13577. path[0] = "$state";
  13578. isTimelineActive = false;
  13579. payload.set(store2, path, payload.state.value);
  13580. isTimelineActive = true;
  13581. }
  13582. });
  13583. });
  13584. }
  13585. function addStoreToDevtools(app, store2) {
  13586. if (!componentStateTypes.includes(getStoreType(store2.$id))) {
  13587. componentStateTypes.push(getStoreType(store2.$id));
  13588. }
  13589. setupDevtoolsPlugin({
  13590. id: "dev.esm.pinia",
  13591. label: "Pinia 🍍",
  13592. logo: "https://pinia.vuejs.org/logo.svg",
  13593. packageName: "pinia",
  13594. homepage: "https://pinia.vuejs.org",
  13595. componentStateTypes,
  13596. app,
  13597. settings: {
  13598. logStoreChanges: {
  13599. label: "Notify about new/deleted stores",
  13600. type: "boolean",
  13601. defaultValue: true
  13602. }
  13603. // useEmojis: {
  13604. // label: 'Use emojis in messages ⚡️',
  13605. // type: 'boolean',
  13606. // defaultValue: true,
  13607. // },
  13608. }
  13609. }, (api) => {
  13610. const now2 = typeof api.now === "function" ? api.now.bind(api) : Date.now;
  13611. store2.$onAction(({ after, onError, name, args }) => {
  13612. const groupId = runningActionId++;
  13613. api.addTimelineEvent({
  13614. layerId: MUTATIONS_LAYER_ID,
  13615. event: {
  13616. time: now2(),
  13617. title: "🛫 " + name,
  13618. subtitle: "start",
  13619. data: {
  13620. store: formatDisplay(store2.$id),
  13621. action: formatDisplay(name),
  13622. args
  13623. },
  13624. groupId
  13625. }
  13626. });
  13627. after((result) => {
  13628. activeAction = void 0;
  13629. api.addTimelineEvent({
  13630. layerId: MUTATIONS_LAYER_ID,
  13631. event: {
  13632. time: now2(),
  13633. title: "🛬 " + name,
  13634. subtitle: "end",
  13635. data: {
  13636. store: formatDisplay(store2.$id),
  13637. action: formatDisplay(name),
  13638. args,
  13639. result
  13640. },
  13641. groupId
  13642. }
  13643. });
  13644. });
  13645. onError((error2) => {
  13646. activeAction = void 0;
  13647. api.addTimelineEvent({
  13648. layerId: MUTATIONS_LAYER_ID,
  13649. event: {
  13650. time: now2(),
  13651. logType: "error",
  13652. title: "💥 " + name,
  13653. subtitle: "end",
  13654. data: {
  13655. store: formatDisplay(store2.$id),
  13656. action: formatDisplay(name),
  13657. args,
  13658. error: error2
  13659. },
  13660. groupId
  13661. }
  13662. });
  13663. });
  13664. }, true);
  13665. store2._customProperties.forEach((name) => {
  13666. vue.watch(() => vue.unref(store2[name]), (newValue, oldValue) => {
  13667. api.notifyComponentUpdate();
  13668. api.sendInspectorState(INSPECTOR_ID);
  13669. if (isTimelineActive) {
  13670. api.addTimelineEvent({
  13671. layerId: MUTATIONS_LAYER_ID,
  13672. event: {
  13673. time: now2(),
  13674. title: "Change",
  13675. subtitle: name,
  13676. data: {
  13677. newValue,
  13678. oldValue
  13679. },
  13680. groupId: activeAction
  13681. }
  13682. });
  13683. }
  13684. }, { deep: true });
  13685. });
  13686. store2.$subscribe(({ events, type: type2 }, state) => {
  13687. api.notifyComponentUpdate();
  13688. api.sendInspectorState(INSPECTOR_ID);
  13689. if (!isTimelineActive)
  13690. return;
  13691. const eventData = {
  13692. time: now2(),
  13693. title: formatMutationType(type2),
  13694. data: assign$1({ store: formatDisplay(store2.$id) }, formatEventData(events)),
  13695. groupId: activeAction
  13696. };
  13697. if (type2 === MutationType.patchFunction) {
  13698. eventData.subtitle = "⤵️";
  13699. } else if (type2 === MutationType.patchObject) {
  13700. eventData.subtitle = "🧩";
  13701. } else if (events && !Array.isArray(events)) {
  13702. eventData.subtitle = events.type;
  13703. }
  13704. if (events) {
  13705. eventData.data["rawEvent(s)"] = {
  13706. _custom: {
  13707. display: "DebuggerEvent",
  13708. type: "object",
  13709. tooltip: "raw DebuggerEvent[]",
  13710. value: events
  13711. }
  13712. };
  13713. }
  13714. api.addTimelineEvent({
  13715. layerId: MUTATIONS_LAYER_ID,
  13716. event: eventData
  13717. });
  13718. }, { detached: true, flush: "sync" });
  13719. const hotUpdate = store2._hotUpdate;
  13720. store2._hotUpdate = vue.markRaw((newStore) => {
  13721. hotUpdate(newStore);
  13722. api.addTimelineEvent({
  13723. layerId: MUTATIONS_LAYER_ID,
  13724. event: {
  13725. time: now2(),
  13726. title: "🔥 " + store2.$id,
  13727. subtitle: "HMR update",
  13728. data: {
  13729. store: formatDisplay(store2.$id),
  13730. info: formatDisplay(`HMR update`)
  13731. }
  13732. }
  13733. });
  13734. api.notifyComponentUpdate();
  13735. api.sendInspectorTree(INSPECTOR_ID);
  13736. api.sendInspectorState(INSPECTOR_ID);
  13737. });
  13738. const { $dispose } = store2;
  13739. store2.$dispose = () => {
  13740. $dispose();
  13741. api.notifyComponentUpdate();
  13742. api.sendInspectorTree(INSPECTOR_ID);
  13743. api.sendInspectorState(INSPECTOR_ID);
  13744. api.getSettings().logStoreChanges && toastMessage(`Disposed "${store2.$id}" store 🗑`);
  13745. };
  13746. api.notifyComponentUpdate();
  13747. api.sendInspectorTree(INSPECTOR_ID);
  13748. api.sendInspectorState(INSPECTOR_ID);
  13749. api.getSettings().logStoreChanges && toastMessage(`"${store2.$id}" store installed 🆕`);
  13750. });
  13751. }
  13752. let runningActionId = 0;
  13753. let activeAction;
  13754. function patchActionForGrouping(store2, actionNames, wrapWithProxy) {
  13755. const actions = actionNames.reduce((storeActions, actionName) => {
  13756. storeActions[actionName] = vue.toRaw(store2)[actionName];
  13757. return storeActions;
  13758. }, {});
  13759. for (const actionName in actions) {
  13760. store2[actionName] = function() {
  13761. const _actionId = runningActionId;
  13762. const trackedStore = wrapWithProxy ? new Proxy(store2, {
  13763. get(...args) {
  13764. activeAction = _actionId;
  13765. return Reflect.get(...args);
  13766. },
  13767. set(...args) {
  13768. activeAction = _actionId;
  13769. return Reflect.set(...args);
  13770. }
  13771. }) : store2;
  13772. activeAction = _actionId;
  13773. const retValue = actions[actionName].apply(trackedStore, arguments);
  13774. activeAction = void 0;
  13775. return retValue;
  13776. };
  13777. }
  13778. }
  13779. function devtoolsPlugin({ app, store: store2, options }) {
  13780. if (store2.$id.startsWith("__hot:")) {
  13781. return;
  13782. }
  13783. store2._isOptionsAPI = !!options.state;
  13784. patchActionForGrouping(store2, Object.keys(options.actions), store2._isOptionsAPI);
  13785. const originalHotUpdate = store2._hotUpdate;
  13786. vue.toRaw(store2)._hotUpdate = function(newStore) {
  13787. originalHotUpdate.apply(this, arguments);
  13788. patchActionForGrouping(store2, Object.keys(newStore._hmrPayload.actions), !!store2._isOptionsAPI);
  13789. };
  13790. addStoreToDevtools(
  13791. app,
  13792. // FIXME: is there a way to allow the assignment from Store<Id, S, G, A> to StoreGeneric?
  13793. store2
  13794. );
  13795. }
  13796. function createPinia() {
  13797. const scope = vue.effectScope(true);
  13798. const state = scope.run(() => vue.ref({}));
  13799. let _p = [];
  13800. let toBeInstalled = [];
  13801. const pinia2 = vue.markRaw({
  13802. install(app) {
  13803. setActivePinia(pinia2);
  13804. {
  13805. pinia2._a = app;
  13806. app.provide(piniaSymbol, pinia2);
  13807. app.config.globalProperties.$pinia = pinia2;
  13808. if (USE_DEVTOOLS) {
  13809. registerPiniaDevtools(app, pinia2);
  13810. }
  13811. toBeInstalled.forEach((plugin) => _p.push(plugin));
  13812. toBeInstalled = [];
  13813. }
  13814. },
  13815. use(plugin) {
  13816. if (!this._a && !isVue2) {
  13817. toBeInstalled.push(plugin);
  13818. } else {
  13819. _p.push(plugin);
  13820. }
  13821. return this;
  13822. },
  13823. _p,
  13824. // it's actually undefined here
  13825. // @ts-expect-error
  13826. _a: null,
  13827. _e: scope,
  13828. _s: /* @__PURE__ */ new Map(),
  13829. state
  13830. });
  13831. if (USE_DEVTOOLS && typeof Proxy !== "undefined") {
  13832. pinia2.use(devtoolsPlugin);
  13833. }
  13834. return pinia2;
  13835. }
  13836. function patchObject(newState, oldState) {
  13837. for (const key in oldState) {
  13838. const subPatch = oldState[key];
  13839. if (!(key in newState)) {
  13840. continue;
  13841. }
  13842. const targetValue = newState[key];
  13843. if (isPlainObject$1(targetValue) && isPlainObject$1(subPatch) && !vue.isRef(subPatch) && !vue.isReactive(subPatch)) {
  13844. newState[key] = patchObject(targetValue, subPatch);
  13845. } else {
  13846. {
  13847. newState[key] = subPatch;
  13848. }
  13849. }
  13850. }
  13851. return newState;
  13852. }
  13853. const noop = () => {
  13854. };
  13855. function addSubscription(subscriptions, callback, detached, onCleanup = noop) {
  13856. subscriptions.push(callback);
  13857. const removeSubscription = () => {
  13858. const idx = subscriptions.indexOf(callback);
  13859. if (idx > -1) {
  13860. subscriptions.splice(idx, 1);
  13861. onCleanup();
  13862. }
  13863. };
  13864. if (!detached && vue.getCurrentScope()) {
  13865. vue.onScopeDispose(removeSubscription);
  13866. }
  13867. return removeSubscription;
  13868. }
  13869. function triggerSubscriptions(subscriptions, ...args) {
  13870. subscriptions.slice().forEach((callback) => {
  13871. callback(...args);
  13872. });
  13873. }
  13874. const fallbackRunWithContext = (fn) => fn();
  13875. function mergeReactiveObjects(target, patchToApply) {
  13876. if (target instanceof Map && patchToApply instanceof Map) {
  13877. patchToApply.forEach((value2, key) => target.set(key, value2));
  13878. }
  13879. if (target instanceof Set && patchToApply instanceof Set) {
  13880. patchToApply.forEach(target.add, target);
  13881. }
  13882. for (const key in patchToApply) {
  13883. if (!patchToApply.hasOwnProperty(key))
  13884. continue;
  13885. const subPatch = patchToApply[key];
  13886. const targetValue = target[key];
  13887. if (isPlainObject$1(targetValue) && isPlainObject$1(subPatch) && target.hasOwnProperty(key) && !vue.isRef(subPatch) && !vue.isReactive(subPatch)) {
  13888. target[key] = mergeReactiveObjects(targetValue, subPatch);
  13889. } else {
  13890. target[key] = subPatch;
  13891. }
  13892. }
  13893. return target;
  13894. }
  13895. const skipHydrateSymbol = Symbol("pinia:skipHydration");
  13896. function shouldHydrate(obj) {
  13897. return !isPlainObject$1(obj) || !obj.hasOwnProperty(skipHydrateSymbol);
  13898. }
  13899. const { assign } = Object;
  13900. function isComputed(o) {
  13901. return !!(vue.isRef(o) && o.effect);
  13902. }
  13903. function createOptionsStore(id, options, pinia2, hot) {
  13904. const { state, actions, getters } = options;
  13905. const initialState = pinia2.state.value[id];
  13906. let store2;
  13907. function setup() {
  13908. if (!initialState && !hot) {
  13909. {
  13910. pinia2.state.value[id] = state ? state() : {};
  13911. }
  13912. }
  13913. const localState = hot ? (
  13914. // use ref() to unwrap refs inside state TODO: check if this is still necessary
  13915. vue.toRefs(vue.ref(state ? state() : {}).value)
  13916. ) : vue.toRefs(pinia2.state.value[id]);
  13917. return assign(localState, actions, Object.keys(getters || {}).reduce((computedGetters, name) => {
  13918. if (name in localState) {
  13919. console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${name}" in store "${id}".`);
  13920. }
  13921. computedGetters[name] = vue.markRaw(vue.computed(() => {
  13922. setActivePinia(pinia2);
  13923. const store22 = pinia2._s.get(id);
  13924. return getters[name].call(store22, store22);
  13925. }));
  13926. return computedGetters;
  13927. }, {}));
  13928. }
  13929. store2 = createSetupStore(id, setup, options, pinia2, hot, true);
  13930. return store2;
  13931. }
  13932. function createSetupStore($id, setup, options = {}, pinia2, hot, isOptionsStore) {
  13933. let scope;
  13934. const optionsForPlugin = assign({ actions: {} }, options);
  13935. if (!pinia2._e.active) {
  13936. throw new Error("Pinia destroyed");
  13937. }
  13938. const $subscribeOptions = {
  13939. deep: true
  13940. // flush: 'post',
  13941. };
  13942. {
  13943. $subscribeOptions.onTrigger = (event) => {
  13944. if (isListening) {
  13945. debuggerEvents = event;
  13946. } else if (isListening == false && !store2._hotUpdating) {
  13947. if (Array.isArray(debuggerEvents)) {
  13948. debuggerEvents.push(event);
  13949. } else {
  13950. console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug.");
  13951. }
  13952. }
  13953. };
  13954. }
  13955. let isListening;
  13956. let isSyncListening;
  13957. let subscriptions = [];
  13958. let actionSubscriptions = [];
  13959. let debuggerEvents;
  13960. const initialState = pinia2.state.value[$id];
  13961. if (!isOptionsStore && !initialState && !hot) {
  13962. {
  13963. pinia2.state.value[$id] = {};
  13964. }
  13965. }
  13966. const hotState = vue.ref({});
  13967. let activeListener;
  13968. function $patch(partialStateOrMutator) {
  13969. let subscriptionMutation;
  13970. isListening = isSyncListening = false;
  13971. {
  13972. debuggerEvents = [];
  13973. }
  13974. if (typeof partialStateOrMutator === "function") {
  13975. partialStateOrMutator(pinia2.state.value[$id]);
  13976. subscriptionMutation = {
  13977. type: MutationType.patchFunction,
  13978. storeId: $id,
  13979. events: debuggerEvents
  13980. };
  13981. } else {
  13982. mergeReactiveObjects(pinia2.state.value[$id], partialStateOrMutator);
  13983. subscriptionMutation = {
  13984. type: MutationType.patchObject,
  13985. payload: partialStateOrMutator,
  13986. storeId: $id,
  13987. events: debuggerEvents
  13988. };
  13989. }
  13990. const myListenerId = activeListener = Symbol();
  13991. vue.nextTick().then(() => {
  13992. if (activeListener === myListenerId) {
  13993. isListening = true;
  13994. }
  13995. });
  13996. isSyncListening = true;
  13997. triggerSubscriptions(subscriptions, subscriptionMutation, pinia2.state.value[$id]);
  13998. }
  13999. const $reset = isOptionsStore ? function $reset2() {
  14000. const { state } = options;
  14001. const newState = state ? state() : {};
  14002. this.$patch(($state) => {
  14003. assign($state, newState);
  14004. });
  14005. } : (
  14006. /* istanbul ignore next */
  14007. () => {
  14008. throw new Error(`🍍: Store "${$id}" is built using the setup syntax and does not implement $reset().`);
  14009. }
  14010. );
  14011. function $dispose() {
  14012. scope.stop();
  14013. subscriptions = [];
  14014. actionSubscriptions = [];
  14015. pinia2._s.delete($id);
  14016. }
  14017. function wrapAction(name, action) {
  14018. return function() {
  14019. setActivePinia(pinia2);
  14020. const args = Array.from(arguments);
  14021. const afterCallbackList = [];
  14022. const onErrorCallbackList = [];
  14023. function after(callback) {
  14024. afterCallbackList.push(callback);
  14025. }
  14026. function onError(callback) {
  14027. onErrorCallbackList.push(callback);
  14028. }
  14029. triggerSubscriptions(actionSubscriptions, {
  14030. args,
  14031. name,
  14032. store: store2,
  14033. after,
  14034. onError
  14035. });
  14036. let ret;
  14037. try {
  14038. ret = action.apply(this && this.$id === $id ? this : store2, args);
  14039. } catch (error2) {
  14040. triggerSubscriptions(onErrorCallbackList, error2);
  14041. throw error2;
  14042. }
  14043. if (ret instanceof Promise) {
  14044. return ret.then((value2) => {
  14045. triggerSubscriptions(afterCallbackList, value2);
  14046. return value2;
  14047. }).catch((error2) => {
  14048. triggerSubscriptions(onErrorCallbackList, error2);
  14049. return Promise.reject(error2);
  14050. });
  14051. }
  14052. triggerSubscriptions(afterCallbackList, ret);
  14053. return ret;
  14054. };
  14055. }
  14056. const _hmrPayload = /* @__PURE__ */ vue.markRaw({
  14057. actions: {},
  14058. getters: {},
  14059. state: [],
  14060. hotState
  14061. });
  14062. const partialStore = {
  14063. _p: pinia2,
  14064. // _s: scope,
  14065. $id,
  14066. $onAction: addSubscription.bind(null, actionSubscriptions),
  14067. $patch,
  14068. $reset,
  14069. $subscribe(callback, options2 = {}) {
  14070. const removeSubscription = addSubscription(subscriptions, callback, options2.detached, () => stopWatcher());
  14071. const stopWatcher = scope.run(() => vue.watch(() => pinia2.state.value[$id], (state) => {
  14072. if (options2.flush === "sync" ? isSyncListening : isListening) {
  14073. callback({
  14074. storeId: $id,
  14075. type: MutationType.direct,
  14076. events: debuggerEvents
  14077. }, state);
  14078. }
  14079. }, assign({}, $subscribeOptions, options2)));
  14080. return removeSubscription;
  14081. },
  14082. $dispose
  14083. };
  14084. const store2 = vue.reactive(assign(
  14085. {
  14086. _hmrPayload,
  14087. _customProperties: vue.markRaw(/* @__PURE__ */ new Set())
  14088. // devtools custom properties
  14089. },
  14090. partialStore
  14091. // must be added later
  14092. // setupStore
  14093. ));
  14094. pinia2._s.set($id, store2);
  14095. const runWithContext = pinia2._a && pinia2._a.runWithContext || fallbackRunWithContext;
  14096. const setupStore = runWithContext(() => pinia2._e.run(() => (scope = vue.effectScope()).run(setup)));
  14097. for (const key in setupStore) {
  14098. const prop = setupStore[key];
  14099. if (vue.isRef(prop) && !isComputed(prop) || vue.isReactive(prop)) {
  14100. if (hot) {
  14101. set(hotState.value, key, vue.toRef(setupStore, key));
  14102. } else if (!isOptionsStore) {
  14103. if (initialState && shouldHydrate(prop)) {
  14104. if (vue.isRef(prop)) {
  14105. prop.value = initialState[key];
  14106. } else {
  14107. mergeReactiveObjects(prop, initialState[key]);
  14108. }
  14109. }
  14110. {
  14111. pinia2.state.value[$id][key] = prop;
  14112. }
  14113. }
  14114. {
  14115. _hmrPayload.state.push(key);
  14116. }
  14117. } else if (typeof prop === "function") {
  14118. const actionValue = hot ? prop : wrapAction(key, prop);
  14119. {
  14120. setupStore[key] = actionValue;
  14121. }
  14122. {
  14123. _hmrPayload.actions[key] = prop;
  14124. }
  14125. optionsForPlugin.actions[key] = prop;
  14126. } else {
  14127. if (isComputed(prop)) {
  14128. _hmrPayload.getters[key] = isOptionsStore ? (
  14129. // @ts-expect-error
  14130. options.getters[key]
  14131. ) : prop;
  14132. if (IS_CLIENT) {
  14133. const getters = setupStore._getters || // @ts-expect-error: same
  14134. (setupStore._getters = vue.markRaw([]));
  14135. getters.push(key);
  14136. }
  14137. }
  14138. }
  14139. }
  14140. {
  14141. assign(store2, setupStore);
  14142. assign(vue.toRaw(store2), setupStore);
  14143. }
  14144. Object.defineProperty(store2, "$state", {
  14145. get: () => hot ? hotState.value : pinia2.state.value[$id],
  14146. set: (state) => {
  14147. if (hot) {
  14148. throw new Error("cannot set hotState");
  14149. }
  14150. $patch(($state) => {
  14151. assign($state, state);
  14152. });
  14153. }
  14154. });
  14155. {
  14156. store2._hotUpdate = vue.markRaw((newStore) => {
  14157. store2._hotUpdating = true;
  14158. newStore._hmrPayload.state.forEach((stateKey) => {
  14159. if (stateKey in store2.$state) {
  14160. const newStateTarget = newStore.$state[stateKey];
  14161. const oldStateSource = store2.$state[stateKey];
  14162. if (typeof newStateTarget === "object" && isPlainObject$1(newStateTarget) && isPlainObject$1(oldStateSource)) {
  14163. patchObject(newStateTarget, oldStateSource);
  14164. } else {
  14165. newStore.$state[stateKey] = oldStateSource;
  14166. }
  14167. }
  14168. set(store2, stateKey, vue.toRef(newStore.$state, stateKey));
  14169. });
  14170. Object.keys(store2.$state).forEach((stateKey) => {
  14171. if (!(stateKey in newStore.$state)) {
  14172. del(store2, stateKey);
  14173. }
  14174. });
  14175. isListening = false;
  14176. isSyncListening = false;
  14177. pinia2.state.value[$id] = vue.toRef(newStore._hmrPayload, "hotState");
  14178. isSyncListening = true;
  14179. vue.nextTick().then(() => {
  14180. isListening = true;
  14181. });
  14182. for (const actionName in newStore._hmrPayload.actions) {
  14183. const action = newStore[actionName];
  14184. set(store2, actionName, wrapAction(actionName, action));
  14185. }
  14186. for (const getterName in newStore._hmrPayload.getters) {
  14187. const getter = newStore._hmrPayload.getters[getterName];
  14188. const getterValue = isOptionsStore ? (
  14189. // special handling of options api
  14190. vue.computed(() => {
  14191. setActivePinia(pinia2);
  14192. return getter.call(store2, store2);
  14193. })
  14194. ) : getter;
  14195. set(store2, getterName, getterValue);
  14196. }
  14197. Object.keys(store2._hmrPayload.getters).forEach((key) => {
  14198. if (!(key in newStore._hmrPayload.getters)) {
  14199. del(store2, key);
  14200. }
  14201. });
  14202. Object.keys(store2._hmrPayload.actions).forEach((key) => {
  14203. if (!(key in newStore._hmrPayload.actions)) {
  14204. del(store2, key);
  14205. }
  14206. });
  14207. store2._hmrPayload = newStore._hmrPayload;
  14208. store2._getters = newStore._getters;
  14209. store2._hotUpdating = false;
  14210. });
  14211. }
  14212. if (USE_DEVTOOLS) {
  14213. const nonEnumerable = {
  14214. writable: true,
  14215. configurable: true,
  14216. // avoid warning on devtools trying to display this property
  14217. enumerable: false
  14218. };
  14219. ["_p", "_hmrPayload", "_getters", "_customProperties"].forEach((p) => {
  14220. Object.defineProperty(store2, p, assign({ value: store2[p] }, nonEnumerable));
  14221. });
  14222. }
  14223. pinia2._p.forEach((extender) => {
  14224. if (USE_DEVTOOLS) {
  14225. const extensions = scope.run(() => extender({
  14226. store: store2,
  14227. app: pinia2._a,
  14228. pinia: pinia2,
  14229. options: optionsForPlugin
  14230. }));
  14231. Object.keys(extensions || {}).forEach((key) => store2._customProperties.add(key));
  14232. assign(store2, extensions);
  14233. } else {
  14234. assign(store2, scope.run(() => extender({
  14235. store: store2,
  14236. app: pinia2._a,
  14237. pinia: pinia2,
  14238. options: optionsForPlugin
  14239. })));
  14240. }
  14241. });
  14242. if (store2.$state && typeof store2.$state === "object" && typeof store2.$state.constructor === "function" && !store2.$state.constructor.toString().includes("[native code]")) {
  14243. console.warn(`[🍍]: The "state" must be a plain object. It cannot be
  14244. state: () => new MyClass()
  14245. Found in store "${store2.$id}".`);
  14246. }
  14247. if (initialState && isOptionsStore && options.hydrate) {
  14248. options.hydrate(store2.$state, initialState);
  14249. }
  14250. isListening = true;
  14251. isSyncListening = true;
  14252. return store2;
  14253. }
  14254. function defineStore(idOrOptions, setup, setupOptions) {
  14255. let id;
  14256. let options;
  14257. const isSetupStore = typeof setup === "function";
  14258. if (typeof idOrOptions === "string") {
  14259. id = idOrOptions;
  14260. options = isSetupStore ? setupOptions : setup;
  14261. } else {
  14262. options = idOrOptions;
  14263. id = idOrOptions.id;
  14264. if (typeof id !== "string") {
  14265. throw new Error(`[🍍]: "defineStore()" must be passed a store id as its first argument.`);
  14266. }
  14267. }
  14268. function useStore2(pinia2, hot) {
  14269. const hasContext = vue.hasInjectionContext();
  14270. pinia2 = // in test mode, ignore the argument provided as we can always retrieve a
  14271. // pinia instance with getActivePinia()
  14272. pinia2 || (hasContext ? vue.inject(piniaSymbol, null) : null);
  14273. if (pinia2)
  14274. setActivePinia(pinia2);
  14275. if (!activePinia) {
  14276. throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
  14277. See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
  14278. This will fail in production.`);
  14279. }
  14280. pinia2 = activePinia;
  14281. if (!pinia2._s.has(id)) {
  14282. if (isSetupStore) {
  14283. createSetupStore(id, setup, options, pinia2);
  14284. } else {
  14285. createOptionsStore(id, options, pinia2);
  14286. }
  14287. {
  14288. useStore2._pinia = pinia2;
  14289. }
  14290. }
  14291. const store2 = pinia2._s.get(id);
  14292. if (hot) {
  14293. const hotId = "__hot:" + id;
  14294. const newStore = isSetupStore ? createSetupStore(hotId, setup, options, pinia2, true) : createOptionsStore(hotId, assign({}, options), pinia2, true);
  14295. hot._hotUpdate(newStore);
  14296. delete pinia2.state.value[hotId];
  14297. pinia2._s.delete(hotId);
  14298. }
  14299. if (IS_CLIENT) {
  14300. const currentInstance = vue.getCurrentInstance();
  14301. if (currentInstance && currentInstance.proxy && // avoid adding stores that are just built for hot module replacement
  14302. !hot) {
  14303. const vm = currentInstance.proxy;
  14304. const cache = "_pStores" in vm ? vm._pStores : vm._pStores = {};
  14305. cache[id] = store2;
  14306. }
  14307. }
  14308. return store2;
  14309. }
  14310. useStore2.$id = id;
  14311. return useStore2;
  14312. }
  14313. const useStore = defineStore("user", {
  14314. state: () => ({
  14315. userInfo: {},
  14316. // 用户信息
  14317. token: "",
  14318. // uploadUrl: 'http://192.168.1.3:8080/ai-file/upload/oss', // 上传资源的服务器网址
  14319. uploadUrl: "https://gc.sdzcq.com/prod-api/ai-file/upload/oss"
  14320. // 上传资源的服务器网址
  14321. }),
  14322. getters: {},
  14323. actions: {
  14324. setUserInfo(data) {
  14325. if (data.userId) {
  14326. formatAppLog("log", "at store/uses.js:16", "更新全局的用户信息-也更新本地存储", data);
  14327. this.userInfo = data;
  14328. uni.setStorageSync("userInfo", data);
  14329. } else {
  14330. uni.removeStorageSync("userInfo");
  14331. }
  14332. },
  14333. setToken(token) {
  14334. if (token) {
  14335. formatAppLog("log", "at store/uses.js:25", "更新全局的 token -也更新本地存储", token);
  14336. this.token = token;
  14337. uni.setStorageSync("token", token);
  14338. } else {
  14339. uni.removeStorageSync("token");
  14340. }
  14341. }
  14342. }
  14343. });
  14344. const pinia = createPinia();
  14345. const store = useStore(pinia);
  14346. const _sfc_main$1p = {
  14347. __name: "index",
  14348. props: {
  14349. request: {
  14350. type: Function
  14351. },
  14352. requestStr: {
  14353. type: String
  14354. },
  14355. isRefresh: {
  14356. type: [Number, Boolean],
  14357. default: 0
  14358. },
  14359. height: {
  14360. type: [String, Number]
  14361. },
  14362. total: {
  14363. type: [Number],
  14364. default: 0
  14365. },
  14366. otherParams: {
  14367. type: Object,
  14368. default: () => ({})
  14369. },
  14370. diffHeight: {
  14371. type: Number,
  14372. default: 0
  14373. },
  14374. immediate: {
  14375. type: Boolean,
  14376. default: false
  14377. },
  14378. method: {
  14379. type: String,
  14380. default: "get"
  14381. },
  14382. isUpAutoLoad: {
  14383. type: Boolean,
  14384. default: true
  14385. }
  14386. },
  14387. emits: ["updateList", "update:total"],
  14388. setup(__props, { expose: __expose, emit: __emit }) {
  14389. const {
  14390. mescrollInit,
  14391. downCallback,
  14392. getMescroll
  14393. } = useMescroll();
  14394. const windowHeight = vue.computed(() => {
  14395. return store.clientHeight - props2.diffHeight;
  14396. });
  14397. const emit2 = __emit;
  14398. const props2 = __props;
  14399. const list = vue.ref([]);
  14400. const getList = (mescroll) => {
  14401. return new Promise((resolve, reject) => {
  14402. let params = {
  14403. pageNum: mescroll.num,
  14404. pageSize: mescroll.size,
  14405. ...props2.otherParams
  14406. };
  14407. let methods = props2.method == "post" ? uni.$u.http.post(props2.requestStr, params) : uni.$u.http.get(props2.requestStr, {
  14408. params
  14409. });
  14410. methods.then((res) => {
  14411. emit2("update:total", res.total);
  14412. resolve(res);
  14413. });
  14414. });
  14415. };
  14416. const upCallback = (mescroll) => {
  14417. formatAppLog("log", "at components/pageScroll/index.vue:99", mescroll, "mescroll");
  14418. if (!props2.requestStr)
  14419. return;
  14420. getList(mescroll).then((res) => {
  14421. const curPageData = res.rows || res.data || [];
  14422. if (mescroll.num == 1)
  14423. list.value = [];
  14424. list.value = list.value.concat(curPageData);
  14425. emit2("updateList", list.value, mescroll.num);
  14426. mescroll.endBySize(curPageData.length, res.total);
  14427. }).catch(() => {
  14428. mescroll.endErr();
  14429. });
  14430. };
  14431. const resetUpScroll = () => {
  14432. setTimeout(() => {
  14433. getMescroll().resetUpScroll();
  14434. }, 100);
  14435. };
  14436. const scroll = (e) => {
  14437. emit2("scroll", e);
  14438. };
  14439. __expose({
  14440. resetUpScroll
  14441. });
  14442. const __returned__ = { mescrollInit, downCallback, getMescroll, windowHeight, emit: emit2, props: props2, list, getList, upCallback, resetUpScroll, scroll, computed: vue.computed, onMounted: vue.onMounted, ref: vue.ref, watch: vue.watch, reactive: vue.reactive, get onShow() {
  14443. return onShow;
  14444. }, get useMescroll() {
  14445. return useMescroll;
  14446. }, get store() {
  14447. return store;
  14448. } };
  14449. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  14450. return __returned__;
  14451. }
  14452. };
  14453. function _sfc_render$1o(_ctx, _cache, $props, $setup, $data, $options) {
  14454. const _component_mescroll_uni = resolveEasycom(vue.resolveDynamicComponent("mescroll-uni"), __easycom_0$4);
  14455. return vue.openBlock(), vue.createBlock(_component_mescroll_uni, {
  14456. onInit: $setup.mescrollInit,
  14457. onDown: $setup.downCallback,
  14458. onUp: $setup.upCallback,
  14459. height: $props.height || $setup.windowHeight + "px",
  14460. up: { textNoMore: "-- 没有更多了 --", auto: $props.isUpAutoLoad },
  14461. down: { auto: $props.isUpAutoLoad }
  14462. }, {
  14463. default: vue.withCtx(() => [
  14464. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  14465. ]),
  14466. _: 3
  14467. /* FORWARDED */
  14468. }, 8, ["onInit", "onDown", "height", "up", "down"]);
  14469. }
  14470. const PageScroll = /* @__PURE__ */ _export_sfc(_sfc_main$1p, [["render", _sfc_render$1o], ["__scopeId", "data-v-30bc23e1"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/components/pageScroll/index.vue"]]);
  14471. const _sfc_main$1o = {
  14472. __name: "route-exception",
  14473. setup(__props, { expose: __expose }) {
  14474. __expose();
  14475. const tabList = ["待处理订单", "历史异常签收"];
  14476. const curNow = vue.ref(0);
  14477. const exceptionList = vue.ref([]);
  14478. let urlList = ["/app/orderexception/pagelist", "/app/orderexception/getPageLoglist"];
  14479. const requestStr = vue.ref(urlList[0]);
  14480. function sectionChange(index2) {
  14481. curNow.value = index2;
  14482. requestStr.value = urlList[index2];
  14483. handleSearch();
  14484. }
  14485. const pageScrollRef = vue.ref(null);
  14486. const otherParams = vue.ref({ search: "" });
  14487. const updateList = (list) => {
  14488. exceptionList.value = list;
  14489. };
  14490. const handleSearch = () => {
  14491. var _a;
  14492. (_a = pageScrollRef.value) == null ? void 0 : _a.resetUpScroll();
  14493. };
  14494. const handleScan2 = () => {
  14495. uni.scanCode({
  14496. success: (res) => {
  14497. otherParams.value.search = res.result;
  14498. handleSearch();
  14499. }
  14500. });
  14501. };
  14502. const { unregister } = uni.$u.useEventListener((e) => {
  14503. otherParams.value.search = e.barcode;
  14504. handleSearch();
  14505. });
  14506. vue.onUnmounted(() => {
  14507. unregister();
  14508. });
  14509. const __returned__ = { tabList, curNow, exceptionList, get urlList() {
  14510. return urlList;
  14511. }, set urlList(v) {
  14512. urlList = v;
  14513. }, requestStr, sectionChange, pageScrollRef, otherParams, updateList, handleSearch, handleScan: handleScan2, unregister, ref: vue.ref, onUnmounted: vue.onUnmounted, get onLoad() {
  14514. return onLoad;
  14515. }, get onShow() {
  14516. return onShow;
  14517. }, ExceptionItem, PageScroll };
  14518. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  14519. return __returned__;
  14520. }
  14521. };
  14522. function _sfc_render$1n(_ctx, _cache, $props, $setup, $data, $options) {
  14523. const _component_u_subsection = resolveEasycom(vue.resolveDynamicComponent("u-subsection"), __easycom_0$8);
  14524. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_0$7);
  14525. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$4);
  14526. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  14527. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  14528. vue.createCommentVNode(" 列表区域 "),
  14529. vue.createVNode($setup["PageScroll"], {
  14530. ref: "pageScrollRef",
  14531. height: "100vh",
  14532. requestStr: $setup.requestStr,
  14533. onUpdateList: $setup.updateList,
  14534. otherParams: $setup.otherParams
  14535. }, {
  14536. default: vue.withCtx(() => [
  14537. vue.createVNode(_component_u_sticky, { "offset-top": 0 }, {
  14538. default: vue.withCtx(() => [
  14539. vue.createCommentVNode(" 顶部标签页 "),
  14540. vue.createVNode(_component_u_subsection, {
  14541. fontSize: "16",
  14542. list: $setup.tabList,
  14543. current: $setup.curNow,
  14544. onChange: $setup.sectionChange,
  14545. mode: "subsection",
  14546. class: "tabs-list"
  14547. }, null, 8, ["current"])
  14548. ]),
  14549. _: 1
  14550. /* STABLE */
  14551. }),
  14552. vue.createElementVNode("view", { class: "list-container" }, [
  14553. (vue.openBlock(true), vue.createElementBlock(
  14554. vue.Fragment,
  14555. null,
  14556. vue.renderList($setup.exceptionList, (item) => {
  14557. return vue.openBlock(), vue.createBlock($setup["ExceptionItem"], {
  14558. key: item.orderNo,
  14559. order: item,
  14560. onRefresh: $setup.handleSearch
  14561. }, null, 8, ["order"]);
  14562. }),
  14563. 128
  14564. /* KEYED_FRAGMENT */
  14565. ))
  14566. ])
  14567. ]),
  14568. _: 1
  14569. /* STABLE */
  14570. }, 8, ["requestStr", "otherParams"]),
  14571. vue.createCommentVNode(" 底部搜索框 "),
  14572. vue.createElementVNode("view", { class: "search-bar fixed-bottom" }, [
  14573. vue.createVNode(_component_u_search, {
  14574. modelValue: $setup.otherParams.search,
  14575. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.otherParams.search = $event),
  14576. placeholder: "请输入物流单号/订单编号",
  14577. "show-action": false,
  14578. inputStyle: { fontSize: "32rpx" },
  14579. onSearch: $setup.handleSearch,
  14580. height: "80rpx",
  14581. shape: "round"
  14582. }, null, 8, ["modelValue"]),
  14583. vue.createVNode(_component_u_icon, {
  14584. name: "scan",
  14585. size: "28",
  14586. color: "#19be6b",
  14587. onClick: $setup.handleScan
  14588. })
  14589. ])
  14590. ]);
  14591. }
  14592. const PagesIndexExpressRouteException = /* @__PURE__ */ _export_sfc(_sfc_main$1o, [["render", _sfc_render$1n], ["__scopeId", "data-v-388e5b84"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/index/express/route-exception.vue"]]);
  14593. const placeholderStyle$2 = "font-size:32rpx";
  14594. const _sfc_main$1n = {
  14595. __name: "warehouse-sign",
  14596. setup(__props, { expose: __expose }) {
  14597. __expose();
  14598. const customStyle = vue.reactive({
  14599. height: "90rpx"
  14600. });
  14601. const selectedWarehouse = vue.ref("");
  14602. const form = vue.ref({
  14603. "packageCode": "",
  14604. "godownId": ""
  14605. });
  14606. const showSelector = vue.ref(false);
  14607. function openWarehouseSelector() {
  14608. showSelector.value = true;
  14609. }
  14610. function handleWarehouseSelected(item) {
  14611. selectedWarehouse.value = item.godownName;
  14612. form.value.godownId = item.id;
  14613. }
  14614. function scanCode() {
  14615. uni.scanCode({
  14616. success: (res) => {
  14617. form.value.packageCode = res.result;
  14618. handleBarcode(res.result);
  14619. },
  14620. fail: (err) => {
  14621. uni.$u.toast("扫码失败");
  14622. }
  14623. });
  14624. }
  14625. function handleBarcode(code2) {
  14626. if (!code2)
  14627. return uni.$u.toast("请输入物流单号");
  14628. uni.$u.http.post("/app/ordersign/toGodownSign", form.value).then((res) => {
  14629. if (res.code == 200) {
  14630. let text = code2 + "到仓签收成功";
  14631. uni.$u.ttsModule.speak(text);
  14632. } else {
  14633. let text = code2 + "订单不存在";
  14634. uni.$u.ttsModule.speak(text);
  14635. }
  14636. });
  14637. }
  14638. function getUserBindWarehouse() {
  14639. uni.$u.http.get("/app/appUser/getUserBindGodown").then((res) => {
  14640. var _a, _b;
  14641. if (res.code == 200) {
  14642. selectedWarehouse.value = (_a = res.data) == null ? void 0 : _a.godownName;
  14643. form.value.godownId = (_b = res.data) == null ? void 0 : _b.id;
  14644. }
  14645. });
  14646. }
  14647. const { unregister } = uni.$u.useEventListener((e) => {
  14648. form.value.packageCode = e.barcode;
  14649. handleBarcode(e.barcode);
  14650. });
  14651. onLoad(() => {
  14652. getUserBindWarehouse();
  14653. });
  14654. vue.onUnmounted(() => {
  14655. unregister();
  14656. });
  14657. const __returned__ = { placeholderStyle: placeholderStyle$2, customStyle, selectedWarehouse, form, showSelector, openWarehouseSelector, handleWarehouseSelected, scanCode, handleBarcode, getUserBindWarehouse, unregister, reactive: vue.reactive, ref: vue.ref, onUnmounted: vue.onUnmounted, get onLoad() {
  14658. return onLoad;
  14659. }, get onShow() {
  14660. return onShow;
  14661. }, WarehouseSelector };
  14662. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  14663. return __returned__;
  14664. }
  14665. };
  14666. function _sfc_render$1m(_ctx, _cache, $props, $setup, $data, $options) {
  14667. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  14668. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  14669. const _directive_permission = vue.resolveDirective("permission");
  14670. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  14671. vue.createElementVNode("view", { class: "main-content" }, [
  14672. vue.createElementVNode("view", { class: "input-group" }, [
  14673. vue.createVNode(_component_u_input, {
  14674. customStyle: $setup.customStyle,
  14675. "placeholder-style": $setup.placeholderStyle,
  14676. modelValue: $setup.selectedWarehouse,
  14677. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.selectedWarehouse = $event),
  14678. placeholder: "请选择仓库",
  14679. readonly: "",
  14680. border: "surround"
  14681. }, null, 8, ["customStyle", "modelValue"]),
  14682. vue.createVNode(_component_u_button, {
  14683. customStyle: $setup.customStyle,
  14684. type: "info",
  14685. color: "#a4adb3",
  14686. onClick: $setup.openWarehouseSelector,
  14687. text: "选择"
  14688. }, null, 8, ["customStyle"])
  14689. ]),
  14690. vue.createElementVNode("view", { class: "input-group" }, [
  14691. vue.createVNode(_component_u_input, {
  14692. customStyle: $setup.customStyle,
  14693. "placeholder-style": $setup.placeholderStyle,
  14694. modelValue: $setup.form.packageCode,
  14695. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.form.packageCode = $event),
  14696. placeholder: "扫描/输入物流单号",
  14697. border: "surround"
  14698. }, null, 8, ["customStyle", "modelValue"]),
  14699. vue.withDirectives(vue.createVNode(_component_u_button, {
  14700. customStyle: $setup.customStyle,
  14701. type: "info",
  14702. color: "#a4adb3",
  14703. onClick: _cache[2] || (_cache[2] = ($event) => $setup.handleBarcode($setup.form.packageCode)),
  14704. text: "确定"
  14705. }, null, 8, ["customStyle"]), [
  14706. [_directive_permission, "app:express:warehouseSign:confirm"]
  14707. ])
  14708. ])
  14709. ]),
  14710. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  14711. vue.createVNode(_component_u_button, {
  14712. size: "large",
  14713. type: "success",
  14714. onClick: $setup.scanCode,
  14715. text: "扫码",
  14716. class: "scan-button"
  14717. })
  14718. ]),
  14719. vue.createVNode($setup["WarehouseSelector"], {
  14720. show: $setup.showSelector,
  14721. "onUpdate:show": _cache[3] || (_cache[3] = ($event) => $setup.showSelector = $event),
  14722. onWarehouseSelected: $setup.handleWarehouseSelected
  14723. }, null, 8, ["show"])
  14724. ]);
  14725. }
  14726. const PagesIndexExpressWarehouseSign = /* @__PURE__ */ _export_sfc(_sfc_main$1n, [["render", _sfc_render$1m], ["__scopeId", "data-v-7473f06e"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/index/express/warehouse-sign.vue"]]);
  14727. const placeholderStyle$1 = "font-size:32rpx";
  14728. const _sfc_main$1m = {
  14729. __name: "weight-modify",
  14730. setup(__props, { expose: __expose }) {
  14731. __expose();
  14732. const customStyle = vue.reactive({
  14733. height: "90rpx"
  14734. });
  14735. const formRef = vue.ref(null);
  14736. const form = vue.ref({
  14737. "packageCode": "",
  14738. "batchNum": "",
  14739. "godownId": "",
  14740. "otherInfo": "",
  14741. "actualWeight": "",
  14742. "imgUrlList": []
  14743. });
  14744. const rules2 = {
  14745. packageCode: [{
  14746. required: true,
  14747. message: "请输入物流单号",
  14748. trigger: "blur"
  14749. }],
  14750. actualWeight: [{
  14751. required: true,
  14752. message: "请输入重量",
  14753. trigger: "blur"
  14754. }]
  14755. };
  14756. function scanCode() {
  14757. uni.scanCode({
  14758. success: (res) => {
  14759. form.value.packageCode = res.result;
  14760. },
  14761. fail: (err) => {
  14762. uni.$u.toast("扫码失败");
  14763. }
  14764. });
  14765. }
  14766. function submitForm() {
  14767. formRef.value.validate().then((valid) => {
  14768. if (valid) {
  14769. uni.$u.http.post("/app/ordersign/changeWeight", form.value).then((res) => {
  14770. if (res.code == 200) {
  14771. uni.$u.toast("重量修改成功");
  14772. let text = code + "已提交审核";
  14773. uni.$u.ttsModule.speak(text);
  14774. } else {
  14775. let text = code + "订单不存在";
  14776. uni.$u.ttsModule.speak(text);
  14777. }
  14778. });
  14779. }
  14780. });
  14781. }
  14782. const { unregister } = uni.$u.useEventListener((e) => {
  14783. form.value.packageCode = e.barcode;
  14784. });
  14785. vue.onUnmounted(() => {
  14786. unregister();
  14787. });
  14788. const __returned__ = { placeholderStyle: placeholderStyle$1, customStyle, formRef, form, rules: rules2, scanCode, submitForm, unregister, ref: vue.ref, reactive: vue.reactive, onUnmounted: vue.onUnmounted, get onLoad() {
  14789. return onLoad;
  14790. }, get onShow() {
  14791. return onShow;
  14792. }, cyUpload };
  14793. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  14794. return __returned__;
  14795. }
  14796. };
  14797. function _sfc_render$1l(_ctx, _cache, $props, $setup, $data, $options) {
  14798. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  14799. const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_1$a);
  14800. const _component_u__form = resolveEasycom(vue.resolveDynamicComponent("u--form"), __easycom_2$4);
  14801. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  14802. const _directive_permission = vue.resolveDirective("permission");
  14803. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  14804. vue.createVNode(_component_u__form, {
  14805. ref: "formRef",
  14806. model: $setup.form,
  14807. rules: $setup.rules,
  14808. "label-width": "165px",
  14809. "label-position": "top",
  14810. labelStyle: { fontSize: "32rpx" },
  14811. errorType: "toast"
  14812. }, {
  14813. default: vue.withCtx(() => [
  14814. vue.createCommentVNode(" 物流单号输入 "),
  14815. vue.createVNode(_component_u_form_item, {
  14816. label: "",
  14817. prop: "packageCode"
  14818. }, {
  14819. default: vue.withCtx(() => [
  14820. vue.createVNode(_component_u_input, {
  14821. placeholderStyle: $setup.placeholderStyle,
  14822. customStyle: $setup.customStyle,
  14823. modelValue: $setup.form.packageCode,
  14824. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.form.packageCode = $event),
  14825. placeholder: "扫描/输入物流单号",
  14826. border: "surround",
  14827. name: "packageCode"
  14828. }, null, 8, ["customStyle", "modelValue"])
  14829. ]),
  14830. _: 1
  14831. /* STABLE */
  14832. }),
  14833. vue.createCommentVNode(" 重量输入 "),
  14834. vue.createVNode(_component_u_form_item, {
  14835. label: "重量(kg)",
  14836. prop: "actualWeight"
  14837. }, {
  14838. default: vue.withCtx(() => [
  14839. vue.createVNode(_component_u_input, {
  14840. placeholderStyle: $setup.placeholderStyle,
  14841. customStyle: $setup.customStyle,
  14842. modelValue: $setup.form.actualWeight,
  14843. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.form.actualWeight = $event),
  14844. placeholder: "请输入重量",
  14845. border: "surround",
  14846. name: "actualWeight",
  14847. type: "number"
  14848. }, null, 8, ["customStyle", "modelValue"])
  14849. ]),
  14850. _: 1
  14851. /* STABLE */
  14852. }),
  14853. vue.createCommentVNode(" 图片上传 "),
  14854. vue.createVNode(_component_u_form_item, {
  14855. label: "上传图片",
  14856. prop: "imgUrlList"
  14857. }, {
  14858. default: vue.withCtx(() => [
  14859. vue.createVNode($setup["cyUpload"], {
  14860. filename: $setup.form.imgUrlList,
  14861. "onUpdate:filename": _cache[2] || (_cache[2] = ($event) => $setup.form.imgUrlList = $event),
  14862. name: "imgUrlList",
  14863. limit: 10,
  14864. "max-size": 1024 * 1024
  14865. }, null, 8, ["filename"])
  14866. ]),
  14867. _: 1
  14868. /* STABLE */
  14869. })
  14870. ]),
  14871. _: 1
  14872. /* STABLE */
  14873. }, 8, ["model"]),
  14874. vue.createCommentVNode(" 底部按钮 "),
  14875. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  14876. vue.createVNode(_component_u_button, {
  14877. size: "large",
  14878. type: "warning",
  14879. onClick: $setup.scanCode,
  14880. text: "扫码",
  14881. class: "scan-button"
  14882. }),
  14883. vue.withDirectives(vue.createVNode(
  14884. _component_u_button,
  14885. {
  14886. size: "large",
  14887. type: "success",
  14888. onClick: $setup.submitForm,
  14889. text: "提交",
  14890. class: "submit-button"
  14891. },
  14892. null,
  14893. 512
  14894. /* NEED_PATCH */
  14895. ), [
  14896. [_directive_permission, "app:express:changeWeight:confirm"]
  14897. ])
  14898. ])
  14899. ]);
  14900. }
  14901. const PagesIndexExpressWeightModify = /* @__PURE__ */ _export_sfc(_sfc_main$1m, [["render", _sfc_render$1l], ["__scopeId", "data-v-e6126507"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/index/express/weight-modify.vue"]]);
  14902. const _sfc_main$1l = {
  14903. __name: "confirm-receipt",
  14904. setup(__props, { expose: __expose }) {
  14905. __expose();
  14906. const formData = vue.ref({
  14907. searchType: "2",
  14908. search: ""
  14909. });
  14910. const handleSubmit = () => {
  14911. if (!formData.value.search) {
  14912. uni.$u.toast("请扫描/输入物流单号");
  14913. return;
  14914. }
  14915. uni.$u.http.post("/app/orderinfo/confirmOrder", formData.value).then((res) => {
  14916. if (res.code == 200) {
  14917. let text = formData.value.search + "收货成功";
  14918. uni.$u.ttsModule.speak(text);
  14919. } else {
  14920. let text = formData.value.search + "订单不存在";
  14921. uni.$u.ttsModule.speak(text);
  14922. }
  14923. });
  14924. };
  14925. const handleScan2 = () => {
  14926. uni.scanCode({
  14927. success: (res) => {
  14928. formData.value.search = res.result;
  14929. handleSubmit();
  14930. }
  14931. });
  14932. };
  14933. const { unregister } = uni.$u.useEventListener((e) => {
  14934. formData.value.search = e.barcode;
  14935. handleSubmit();
  14936. });
  14937. vue.onUnmounted(() => {
  14938. unregister();
  14939. });
  14940. const __returned__ = { formData, handleSubmit, handleScan: handleScan2, unregister, ref: vue.ref, onUnmounted: vue.onUnmounted, get onLoad() {
  14941. return onLoad;
  14942. }, get onShow() {
  14943. return onShow;
  14944. } };
  14945. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  14946. return __returned__;
  14947. }
  14948. };
  14949. function _sfc_render$1k(_ctx, _cache, $props, $setup, $data, $options) {
  14950. const _component_u_radio = resolveEasycom(vue.resolveDynamicComponent("u-radio"), __easycom_0$9);
  14951. const _component_u_radio_group = resolveEasycom(vue.resolveDynamicComponent("u-radio-group"), __easycom_1$4);
  14952. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  14953. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  14954. const _component_u_divider = resolveEasycom(vue.resolveDynamicComponent("u-divider"), __easycom_4$3);
  14955. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  14956. vue.createCommentVNode(" 底部按钮 "),
  14957. vue.createElementVNode("view", { class: "footer" }, [
  14958. vue.createCommentVNode(" 查询区域 "),
  14959. vue.createElementVNode("view", { class: "query-section" }, [
  14960. vue.createVNode(_component_u_radio_group, {
  14961. modelValue: $setup.formData.searchType,
  14962. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.formData.searchType = $event)
  14963. }, {
  14964. default: vue.withCtx(() => [
  14965. vue.createVNode(_component_u_radio, {
  14966. label: "查订单",
  14967. name: "1",
  14968. labelSize: "16px",
  14969. iconSize: "16px"
  14970. }),
  14971. vue.createVNode(_component_u_radio, {
  14972. label: "查物流",
  14973. "custom-style": "margin-left:20px",
  14974. name: "2",
  14975. labelSize: "16px",
  14976. iconSize: "16px"
  14977. })
  14978. ]),
  14979. _: 1
  14980. /* STABLE */
  14981. }, 8, ["modelValue"]),
  14982. vue.createElementVNode("view", { class: "search-box" }, [
  14983. vue.createVNode(_component_u_input, {
  14984. "custom-style": "font-size:32rpx",
  14985. "placeholder-style": "fong-size:32rpx",
  14986. modelValue: $setup.formData.search,
  14987. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.formData.search = $event),
  14988. placeholder: $setup.formData.searchType == "1" ? "扫描/输入订单号" : "扫描/输入物流单号",
  14989. border: "surround",
  14990. clearable: ""
  14991. }, null, 8, ["modelValue", "placeholder"]),
  14992. vue.createVNode(_component_u_button, {
  14993. color: "#c8c8c8",
  14994. text: "查询",
  14995. onClick: $setup.handleSubmit
  14996. })
  14997. ])
  14998. ]),
  14999. vue.createVNode(_component_u_divider),
  15000. vue.createElementVNode("view", { style: { "display": "flex" } }, [
  15001. vue.createVNode(_component_u_button, {
  15002. size: "large",
  15003. type: "success",
  15004. text: "确认收货扫码",
  15005. onClick: $setup.handleScan
  15006. })
  15007. ])
  15008. ])
  15009. ]);
  15010. }
  15011. const PagesIndexAuditConfirmReceipt = /* @__PURE__ */ _export_sfc(_sfc_main$1l, [["render", _sfc_render$1k], ["__scopeId", "data-v-fec7d541"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/index/audit/confirm-receipt.vue"]]);
  15012. const props$d = {
  15013. props: {
  15014. // 是否开启顶部安全区适配
  15015. safeAreaInsetTop: {
  15016. type: Boolean,
  15017. default: props$G.navbar.safeAreaInsetTop
  15018. },
  15019. // 固定在顶部时,是否生成一个等高元素,以防止塌陷
  15020. placeholder: {
  15021. type: Boolean,
  15022. default: props$G.navbar.placeholder
  15023. },
  15024. // 是否固定在顶部
  15025. fixed: {
  15026. type: Boolean,
  15027. default: props$G.navbar.fixed
  15028. },
  15029. // 是否显示下边框
  15030. border: {
  15031. type: Boolean,
  15032. default: props$G.navbar.border
  15033. },
  15034. // 左边的图标
  15035. leftIcon: {
  15036. type: String,
  15037. default: props$G.navbar.leftIcon
  15038. },
  15039. // 左边的提示文字
  15040. leftText: {
  15041. type: String,
  15042. default: props$G.navbar.leftText
  15043. },
  15044. // 左右的提示文字
  15045. rightText: {
  15046. type: String,
  15047. default: props$G.navbar.rightText
  15048. },
  15049. // 右边的图标
  15050. rightIcon: {
  15051. type: String,
  15052. default: props$G.navbar.rightIcon
  15053. },
  15054. // 标题
  15055. title: {
  15056. type: [String, Number],
  15057. default: props$G.navbar.title
  15058. },
  15059. // 背景颜色
  15060. bgColor: {
  15061. type: String,
  15062. default: props$G.navbar.bgColor
  15063. },
  15064. // 标题的宽度
  15065. titleWidth: {
  15066. type: [String, Number],
  15067. default: props$G.navbar.titleWidth
  15068. },
  15069. // 导航栏高度
  15070. height: {
  15071. type: [String, Number],
  15072. default: props$G.navbar.height
  15073. },
  15074. // 左侧返回图标的大小
  15075. leftIconSize: {
  15076. type: [String, Number],
  15077. default: props$G.navbar.leftIconSize
  15078. },
  15079. // 左侧返回图标的颜色
  15080. leftIconColor: {
  15081. type: String,
  15082. default: props$G.navbar.leftIconColor
  15083. },
  15084. // 点击左侧区域(返回图标),是否自动返回上一页
  15085. autoBack: {
  15086. type: Boolean,
  15087. default: props$G.navbar.autoBack
  15088. },
  15089. // 标题的样式,对象或字符串
  15090. titleStyle: {
  15091. type: [String, Object],
  15092. default: props$G.navbar.titleStyle
  15093. }
  15094. }
  15095. };
  15096. const _sfc_main$1k = {
  15097. name: "u-navbar",
  15098. mixins: [mpMixin, mixin, props$d],
  15099. data() {
  15100. return {};
  15101. },
  15102. methods: {
  15103. // 点击左侧区域
  15104. leftClick() {
  15105. this.$emit("leftClick");
  15106. if (this.autoBack) {
  15107. uni.navigateBack();
  15108. }
  15109. },
  15110. // 点击右侧区域
  15111. rightClick() {
  15112. this.$emit("rightClick");
  15113. }
  15114. }
  15115. };
  15116. function _sfc_render$1j(_ctx, _cache, $props, $setup, $data, $options) {
  15117. const _component_u_status_bar = resolveEasycom(vue.resolveDynamicComponent("u-status-bar"), __easycom_0$b);
  15118. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  15119. return vue.openBlock(), vue.createElementBlock("view", { class: "u-navbar" }, [
  15120. _ctx.fixed && _ctx.placeholder ? (vue.openBlock(), vue.createElementBlock(
  15121. "view",
  15122. {
  15123. key: 0,
  15124. class: "u-navbar__placeholder",
  15125. style: vue.normalizeStyle({
  15126. height: _ctx.$u.addUnit(_ctx.$u.getPx(_ctx.height) + _ctx.$u.sys().statusBarHeight, "px")
  15127. })
  15128. },
  15129. null,
  15130. 4
  15131. /* STYLE */
  15132. )) : vue.createCommentVNode("v-if", true),
  15133. vue.createElementVNode(
  15134. "view",
  15135. {
  15136. class: vue.normalizeClass([_ctx.fixed && "u-navbar--fixed"])
  15137. },
  15138. [
  15139. _ctx.safeAreaInsetTop ? (vue.openBlock(), vue.createBlock(_component_u_status_bar, {
  15140. key: 0,
  15141. bgColor: _ctx.bgColor
  15142. }, null, 8, ["bgColor"])) : vue.createCommentVNode("v-if", true),
  15143. vue.createElementVNode(
  15144. "view",
  15145. {
  15146. class: vue.normalizeClass(["u-navbar__content", [_ctx.border && "u-border-bottom"]]),
  15147. style: vue.normalizeStyle({
  15148. height: _ctx.$u.addUnit(_ctx.height),
  15149. backgroundColor: _ctx.bgColor
  15150. })
  15151. },
  15152. [
  15153. vue.createElementVNode("view", {
  15154. class: "u-navbar__content__left",
  15155. "hover-class": "u-navbar__content__left--hover",
  15156. "hover-start-time": "150",
  15157. onClick: _cache[0] || (_cache[0] = (...args) => $options.leftClick && $options.leftClick(...args))
  15158. }, [
  15159. vue.renderSlot(_ctx.$slots, "left", {}, () => [
  15160. _ctx.leftIcon ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  15161. key: 0,
  15162. name: _ctx.leftIcon,
  15163. size: _ctx.leftIconSize,
  15164. color: _ctx.leftIconColor
  15165. }, null, 8, ["name", "size", "color"])) : vue.createCommentVNode("v-if", true),
  15166. _ctx.leftText ? (vue.openBlock(), vue.createElementBlock(
  15167. "text",
  15168. {
  15169. key: 1,
  15170. style: vue.normalizeStyle({
  15171. color: _ctx.leftIconColor
  15172. }),
  15173. class: "u-navbar__content__left__text"
  15174. },
  15175. vue.toDisplayString(_ctx.leftText),
  15176. 5
  15177. /* TEXT, STYLE */
  15178. )) : vue.createCommentVNode("v-if", true)
  15179. ], true)
  15180. ]),
  15181. vue.renderSlot(_ctx.$slots, "center", {}, () => [
  15182. vue.createElementVNode(
  15183. "text",
  15184. {
  15185. class: "u-line-1 u-navbar__content__title",
  15186. style: vue.normalizeStyle([{
  15187. width: _ctx.$u.addUnit(_ctx.titleWidth)
  15188. }, _ctx.$u.addStyle(_ctx.titleStyle)])
  15189. },
  15190. vue.toDisplayString(_ctx.title),
  15191. 5
  15192. /* TEXT, STYLE */
  15193. )
  15194. ], true),
  15195. _ctx.$slots.right || _ctx.rightIcon || _ctx.rightText ? (vue.openBlock(), vue.createElementBlock("view", {
  15196. key: 0,
  15197. class: "u-navbar__content__right",
  15198. onClick: _cache[1] || (_cache[1] = (...args) => $options.rightClick && $options.rightClick(...args))
  15199. }, [
  15200. vue.renderSlot(_ctx.$slots, "right", {}, () => [
  15201. _ctx.rightIcon ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  15202. key: 0,
  15203. name: _ctx.rightIcon,
  15204. size: "20"
  15205. }, null, 8, ["name"])) : vue.createCommentVNode("v-if", true),
  15206. _ctx.rightText ? (vue.openBlock(), vue.createElementBlock(
  15207. "text",
  15208. {
  15209. key: 1,
  15210. class: "u-navbar__content__right__text"
  15211. },
  15212. vue.toDisplayString(_ctx.rightText),
  15213. 1
  15214. /* TEXT */
  15215. )) : vue.createCommentVNode("v-if", true)
  15216. ], true)
  15217. ])) : vue.createCommentVNode("v-if", true)
  15218. ],
  15219. 6
  15220. /* CLASS, STYLE */
  15221. )
  15222. ],
  15223. 2
  15224. /* CLASS */
  15225. )
  15226. ]);
  15227. }
  15228. const __easycom_1$1 = /* @__PURE__ */ _export_sfc(_sfc_main$1k, [["render", _sfc_render$1j], ["__scopeId", "data-v-f631659b"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-navbar/u-navbar.vue"]]);
  15229. const props$c = {
  15230. props: {
  15231. // 步进器标识符,在change回调返回
  15232. name: {
  15233. type: [String, Number],
  15234. default: props$G.numberBox.name
  15235. },
  15236. // 用于双向绑定的值,初始化时设置设为默认min值(最小值)
  15237. modelValue: {
  15238. type: [String, Number],
  15239. default: props$G.numberBox.value
  15240. },
  15241. // 最小值
  15242. min: {
  15243. type: [String, Number],
  15244. default: props$G.numberBox.min
  15245. },
  15246. // 最大值
  15247. max: {
  15248. type: [String, Number],
  15249. default: props$G.numberBox.max
  15250. },
  15251. // 加减的步长,可为小数
  15252. step: {
  15253. type: [String, Number],
  15254. default: props$G.numberBox.step
  15255. },
  15256. // 是否只允许输入整数
  15257. integer: {
  15258. type: Boolean,
  15259. default: props$G.numberBox.integer
  15260. },
  15261. // 是否禁用,包括输入框,加减按钮
  15262. disabled: {
  15263. type: Boolean,
  15264. default: props$G.numberBox.disabled
  15265. },
  15266. // 是否禁用输入框
  15267. disabledInput: {
  15268. type: Boolean,
  15269. default: props$G.numberBox.disabledInput
  15270. },
  15271. // 是否开启异步变更,开启后需要手动控制输入值
  15272. asyncChange: {
  15273. type: Boolean,
  15274. default: props$G.numberBox.asyncChange
  15275. },
  15276. // 输入框宽度,单位为px
  15277. inputWidth: {
  15278. type: [String, Number],
  15279. default: props$G.numberBox.inputWidth
  15280. },
  15281. // 是否显示减少按钮
  15282. showMinus: {
  15283. type: Boolean,
  15284. default: props$G.numberBox.showMinus
  15285. },
  15286. // 是否显示增加按钮
  15287. showPlus: {
  15288. type: Boolean,
  15289. default: props$G.numberBox.showPlus
  15290. },
  15291. // 显示的小数位数
  15292. decimalLength: {
  15293. type: [String, Number, null],
  15294. default: props$G.numberBox.decimalLength
  15295. },
  15296. // 是否开启长按加减手势
  15297. longPress: {
  15298. type: Boolean,
  15299. default: props$G.numberBox.longPress
  15300. },
  15301. // 输入框文字和加减按钮图标的颜色
  15302. color: {
  15303. type: String,
  15304. default: props$G.numberBox.color
  15305. },
  15306. // 按钮大小,宽高等于此值,单位px,输入框高度和此值保持一致
  15307. buttonSize: {
  15308. type: [String, Number],
  15309. default: props$G.numberBox.buttonSize
  15310. },
  15311. // 输入框和按钮的背景颜色
  15312. bgColor: {
  15313. type: String,
  15314. default: props$G.numberBox.bgColor
  15315. },
  15316. // 指定光标于键盘的距离,避免键盘遮挡输入框,单位px
  15317. cursorSpacing: {
  15318. type: [String, Number],
  15319. default: props$G.numberBox.cursorSpacing
  15320. },
  15321. // 是否禁用增加按钮
  15322. disablePlus: {
  15323. type: Boolean,
  15324. default: props$G.numberBox.disablePlus
  15325. },
  15326. // 是否禁用减少按钮
  15327. disableMinus: {
  15328. type: Boolean,
  15329. default: props$G.numberBox.disableMinus
  15330. },
  15331. // 加减按钮图标的样式
  15332. iconStyle: {
  15333. type: [Object, String],
  15334. default: props$G.numberBox.iconStyle
  15335. }
  15336. }
  15337. };
  15338. const _sfc_main$1j = {
  15339. name: "u-number-box",
  15340. mixins: [mpMixin, mixin, props$c],
  15341. data() {
  15342. return {
  15343. // 输入框实际操作的值
  15344. currentValue: "",
  15345. // 定时器
  15346. longPressTimer: null
  15347. };
  15348. },
  15349. watch: {
  15350. // 多个值之间,只要一个值发生变化,都要重新检查check()函数
  15351. watchChange(n) {
  15352. this.check();
  15353. },
  15354. // 监听v-mode的变化,重新初始化内部的值
  15355. modelValue(n) {
  15356. if (n !== this.currentValue) {
  15357. this.currentValue = this.format(this.modelValue);
  15358. }
  15359. }
  15360. },
  15361. computed: {
  15362. getCursorSpacing() {
  15363. return uni.$u.getPx(this.cursorSpacing);
  15364. },
  15365. // 按钮的样式
  15366. buttonStyle() {
  15367. return (type2) => {
  15368. const style = {
  15369. backgroundColor: this.bgColor,
  15370. height: uni.$u.addUnit(this.buttonSize),
  15371. color: this.color
  15372. };
  15373. if (this.isDisabled(type2)) {
  15374. style.backgroundColor = "#f7f8fa";
  15375. }
  15376. return style;
  15377. };
  15378. },
  15379. // 输入框的样式
  15380. inputStyle() {
  15381. this.disabled || this.disabledInput;
  15382. const style = {
  15383. color: this.color,
  15384. backgroundColor: this.bgColor,
  15385. height: uni.$u.addUnit(this.buttonSize),
  15386. width: uni.$u.addUnit(this.inputWidth)
  15387. };
  15388. return style;
  15389. },
  15390. // 用于监听多个值发生变化
  15391. watchChange() {
  15392. return [this.integer, this.decimalLength, this.min, this.max];
  15393. },
  15394. isDisabled() {
  15395. return (type2) => {
  15396. if (type2 === "plus") {
  15397. return this.disabled || this.disablePlus || this.currentValue >= this.max;
  15398. }
  15399. return this.disabled || this.disableMinus || this.currentValue <= this.min;
  15400. };
  15401. }
  15402. },
  15403. mounted() {
  15404. this.init();
  15405. },
  15406. emits: ["update:modelValue", "focus", "blur", "overlimit", "change", "plus", "minus"],
  15407. methods: {
  15408. init() {
  15409. this.currentValue = this.format(this.modelValue);
  15410. },
  15411. // 格式化整理数据,限制范围
  15412. format(value2) {
  15413. value2 = this.filter(value2);
  15414. value2 = value2 === "" ? 0 : +value2;
  15415. value2 = Math.max(Math.min(this.max, value2), this.min);
  15416. if (this.decimalLength !== null) {
  15417. value2 = value2.toFixed(this.decimalLength);
  15418. }
  15419. return value2;
  15420. },
  15421. // 过滤非法的字符
  15422. filter(value2) {
  15423. value2 = String(value2).replace(/[^0-9.-]/g, "");
  15424. if (this.integer && value2.indexOf(".") !== -1) {
  15425. value2 = value2.split(".")[0];
  15426. }
  15427. return value2;
  15428. },
  15429. check() {
  15430. const val = this.format(this.currentValue);
  15431. if (val !== this.currentValue) {
  15432. this.currentValue = val;
  15433. }
  15434. },
  15435. // 判断是否出于禁止操作状态
  15436. // isDisabled(type) {
  15437. // if (type === 'plus') {
  15438. // // 在点击增加按钮情况下,判断整体的disabled,是否单独禁用增加按钮,以及当前值是否大于最大的允许值
  15439. // return (
  15440. // this.disabled ||
  15441. // this.disablePlus ||
  15442. // this.currentValue >= this.max
  15443. // )
  15444. // }
  15445. // // 点击减少按钮同理
  15446. // return (
  15447. // this.disabled ||
  15448. // this.disableMinus ||
  15449. // this.currentValue <= this.min
  15450. // )
  15451. // },
  15452. // 输入框活动焦点
  15453. onFocus(event) {
  15454. this.$emit("focus", {
  15455. ...event.detail,
  15456. name: this.name
  15457. });
  15458. },
  15459. // 输入框失去焦点
  15460. onBlur(event) {
  15461. this.format(event.detail.value);
  15462. this.$emit(
  15463. "blur",
  15464. {
  15465. ...event.detail,
  15466. name: this.name
  15467. }
  15468. );
  15469. },
  15470. // 输入框值发生变化
  15471. onInput(e) {
  15472. const {
  15473. value: value2 = ""
  15474. } = e.detail || {};
  15475. if (value2 === "")
  15476. return;
  15477. let formatted = this.filter(value2);
  15478. if (this.decimalLength !== null && formatted.indexOf(".") !== -1) {
  15479. const pair = formatted.split(".");
  15480. formatted = `${pair[0]}.${pair[1].slice(0, this.decimalLength)}`;
  15481. }
  15482. formatted = this.format(formatted);
  15483. this.emitChange(formatted);
  15484. },
  15485. // 发出change事件
  15486. emitChange(value2) {
  15487. if (!this.asyncChange) {
  15488. this.$nextTick(() => {
  15489. this.$emit("update:modelValue", value2);
  15490. this.currentValue = value2;
  15491. this.$forceUpdate();
  15492. });
  15493. }
  15494. this.$emit("change", {
  15495. value: value2,
  15496. name: this.name
  15497. });
  15498. },
  15499. onChange() {
  15500. const {
  15501. type: type2
  15502. } = this;
  15503. if (this.isDisabled(type2)) {
  15504. return this.$emit("overlimit", type2);
  15505. }
  15506. const diff = type2 === "minus" ? -this.step : +this.step;
  15507. const value2 = this.format(this.add(+this.currentValue, diff));
  15508. this.emitChange(value2);
  15509. this.$emit(type2);
  15510. },
  15511. // 对值扩大后进行四舍五入,再除以扩大因子,避免出现浮点数操作的精度问题
  15512. add(num1, num2) {
  15513. const cardinal = Math.pow(10, 10);
  15514. return Math.round((num1 + num2) * cardinal) / cardinal;
  15515. },
  15516. // 点击加减按钮
  15517. clickHandler(type2) {
  15518. this.type = type2;
  15519. this.onChange();
  15520. },
  15521. longPressStep() {
  15522. this.clearTimeout();
  15523. this.longPressTimer = setTimeout(() => {
  15524. this.onChange();
  15525. this.longPressStep();
  15526. }, 250);
  15527. },
  15528. onTouchStart(type2) {
  15529. if (!this.longPress)
  15530. return;
  15531. this.clearTimeout();
  15532. this.type = type2;
  15533. this.longPressTimer = setTimeout(() => {
  15534. this.onChange();
  15535. this.longPressStep();
  15536. }, 600);
  15537. },
  15538. // 触摸结束,清除定时器,停止长按加减
  15539. onTouchEnd() {
  15540. if (!this.longPress)
  15541. return;
  15542. this.clearTimeout();
  15543. },
  15544. // 清除定时器
  15545. clearTimeout() {
  15546. clearTimeout(this.longPressTimer);
  15547. this.longPressTimer = null;
  15548. }
  15549. }
  15550. };
  15551. function _sfc_render$1i(_ctx, _cache, $props, $setup, $data, $options) {
  15552. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  15553. return vue.openBlock(), vue.createElementBlock("view", { class: "u-number-box" }, [
  15554. _ctx.showMinus && _ctx.$slots.minus ? (vue.openBlock(), vue.createElementBlock(
  15555. "view",
  15556. {
  15557. key: 0,
  15558. class: "u-number-box__slot",
  15559. onClick: _cache[0] || (_cache[0] = vue.withModifiers(($event) => $options.clickHandler("minus"), ["stop"])),
  15560. onTouchstart: _cache[1] || (_cache[1] = ($event) => $options.onTouchStart("minus")),
  15561. onTouchend: _cache[2] || (_cache[2] = vue.withModifiers((...args) => $options.clearTimeout && $options.clearTimeout(...args), ["stop"]))
  15562. },
  15563. [
  15564. vue.renderSlot(_ctx.$slots, "minus", {}, void 0, true)
  15565. ],
  15566. 32
  15567. /* NEED_HYDRATION */
  15568. )) : _ctx.showMinus ? (vue.openBlock(), vue.createElementBlock(
  15569. "view",
  15570. {
  15571. key: 1,
  15572. class: vue.normalizeClass(["u-number-box__minus", { "u-number-box__minus--disabled": $options.isDisabled("minus") }]),
  15573. onClick: _cache[3] || (_cache[3] = vue.withModifiers(($event) => $options.clickHandler("minus"), ["stop"])),
  15574. onTouchstart: _cache[4] || (_cache[4] = ($event) => $options.onTouchStart("minus")),
  15575. onTouchend: _cache[5] || (_cache[5] = vue.withModifiers((...args) => $options.clearTimeout && $options.clearTimeout(...args), ["stop"])),
  15576. "hover-class": "u-number-box__minus--hover",
  15577. "hover-stay-time": "150",
  15578. style: vue.normalizeStyle([$options.buttonStyle("minus")])
  15579. },
  15580. [
  15581. vue.createVNode(_component_u_icon, {
  15582. name: "minus",
  15583. color: $options.isDisabled("minus") ? "#c8c9cc" : "#323233",
  15584. size: "15",
  15585. bold: "",
  15586. customStyle: _ctx.iconStyle
  15587. }, null, 8, ["color", "customStyle"])
  15588. ],
  15589. 38
  15590. /* CLASS, STYLE, NEED_HYDRATION */
  15591. )) : vue.createCommentVNode("v-if", true),
  15592. vue.renderSlot(_ctx.$slots, "input", {}, () => [
  15593. vue.withDirectives(vue.createElementVNode("input", {
  15594. disabled: _ctx.disabledInput || _ctx.disabled,
  15595. "cursor-spacing": $options.getCursorSpacing,
  15596. class: vue.normalizeClass([{ "u-number-box__input--disabled": _ctx.disabled || _ctx.disabledInput }, "u-number-box__input"]),
  15597. "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $data.currentValue = $event),
  15598. onBlur: _cache[7] || (_cache[7] = (...args) => $options.onBlur && $options.onBlur(...args)),
  15599. onFocus: _cache[8] || (_cache[8] = (...args) => $options.onFocus && $options.onFocus(...args)),
  15600. onInput: _cache[9] || (_cache[9] = (...args) => $options.onInput && $options.onInput(...args)),
  15601. type: "number",
  15602. style: vue.normalizeStyle([$options.inputStyle])
  15603. }, null, 46, ["disabled", "cursor-spacing"]), [
  15604. [vue.vModelText, $data.currentValue]
  15605. ])
  15606. ], true),
  15607. _ctx.showPlus && _ctx.$slots.plus ? (vue.openBlock(), vue.createElementBlock(
  15608. "view",
  15609. {
  15610. key: 2,
  15611. class: "u-number-box__slot",
  15612. onClick: _cache[10] || (_cache[10] = vue.withModifiers(($event) => $options.clickHandler("plus"), ["stop"])),
  15613. onTouchstart: _cache[11] || (_cache[11] = ($event) => $options.onTouchStart("plus")),
  15614. onTouchend: _cache[12] || (_cache[12] = vue.withModifiers((...args) => $options.clearTimeout && $options.clearTimeout(...args), ["stop"]))
  15615. },
  15616. [
  15617. vue.renderSlot(_ctx.$slots, "plus", {}, void 0, true)
  15618. ],
  15619. 32
  15620. /* NEED_HYDRATION */
  15621. )) : _ctx.showPlus ? (vue.openBlock(), vue.createElementBlock(
  15622. "view",
  15623. {
  15624. key: 3,
  15625. class: vue.normalizeClass(["u-number-box__plus", { "u-number-box__minus--disabled": $options.isDisabled("plus") }]),
  15626. onClick: _cache[13] || (_cache[13] = vue.withModifiers(($event) => $options.clickHandler("plus"), ["stop"])),
  15627. onTouchstart: _cache[14] || (_cache[14] = ($event) => $options.onTouchStart("plus")),
  15628. onTouchend: _cache[15] || (_cache[15] = vue.withModifiers((...args) => $options.clearTimeout && $options.clearTimeout(...args), ["stop"])),
  15629. "hover-class": "u-number-box__plus--hover",
  15630. "hover-stay-time": "150",
  15631. style: vue.normalizeStyle([$options.buttonStyle("plus")])
  15632. },
  15633. [
  15634. vue.createVNode(_component_u_icon, {
  15635. name: "plus",
  15636. color: $options.isDisabled("plus") ? "#c8c9cc" : "#323233",
  15637. size: "15",
  15638. bold: "",
  15639. customStyle: _ctx.iconStyle
  15640. }, null, 8, ["color", "customStyle"])
  15641. ],
  15642. 38
  15643. /* CLASS, STYLE, NEED_HYDRATION */
  15644. )) : vue.createCommentVNode("v-if", true)
  15645. ]);
  15646. }
  15647. const __easycom_3$4 = /* @__PURE__ */ _export_sfc(_sfc_main$1j, [["render", _sfc_render$1i], ["__scopeId", "data-v-eb6f6237"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-number-box/u-number-box.vue"]]);
  15648. const _sfc_main$1i = {
  15649. __name: "scan-order",
  15650. setup(__props, { expose: __expose }) {
  15651. __expose();
  15652. const isbnList = vue.ref([]);
  15653. const showModal = vue.ref(false);
  15654. const newIsbn = vue.ref("");
  15655. const removeItem = (index2) => {
  15656. isbnList.value.splice(index2, 1);
  15657. };
  15658. const goBack = () => {
  15659. uni.navigateBack();
  15660. };
  15661. function clearAll() {
  15662. isbnList.value.length = 0;
  15663. }
  15664. const addOrUpdateIsbn = (isbn) => {
  15665. const existingItem = isbnList.value.find((item) => item.isbn === isbn);
  15666. if (existingItem) {
  15667. existingItem.quantity += 1;
  15668. } else {
  15669. isbnList.value.push({
  15670. isbn,
  15671. quantity: 1
  15672. });
  15673. }
  15674. };
  15675. function handleIsbn(isbn) {
  15676. if (isValidISBN(isbn)) {
  15677. addOrUpdateIsbn(isbn);
  15678. } else {
  15679. uni.$u.ttsModule.speak("不正确的ISBN码");
  15680. }
  15681. }
  15682. const handleScan2 = () => {
  15683. uni.scanCode({
  15684. success: (res) => {
  15685. handleIsbn(res.result);
  15686. }
  15687. });
  15688. };
  15689. const isValidISBN = (isbn) => {
  15690. return /^97[89]\d{10}$/.test(isbn);
  15691. };
  15692. const handleQuery = () => {
  15693. if (isbnList.value.length === 0) {
  15694. uni.showToast({
  15695. title: "请先添加ISBN",
  15696. icon: "none"
  15697. });
  15698. return;
  15699. }
  15700. uni.setStorageSync("isbnList", isbnList.value);
  15701. uni.navigateTo({
  15702. url: "/pages/index/audit/isbn-order"
  15703. });
  15704. };
  15705. const addIsbn = () => {
  15706. if (isValidISBN(newIsbn.value)) {
  15707. addOrUpdateIsbn(newIsbn.value);
  15708. showModal.value = false;
  15709. newIsbn.value = "";
  15710. } else {
  15711. uni.$u.ttsModule.speak("不正确的ISBN码");
  15712. }
  15713. };
  15714. const { unregister } = uni.$u.useEventListener((e) => {
  15715. handleIsbn(e.barcode);
  15716. });
  15717. vue.onUnmounted(() => {
  15718. unregister();
  15719. });
  15720. const __returned__ = { isbnList, showModal, newIsbn, removeItem, goBack, clearAll, addOrUpdateIsbn, handleIsbn, handleScan: handleScan2, isValidISBN, handleQuery, addIsbn, unregister, ref: vue.ref, onUnmounted: vue.onUnmounted };
  15721. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  15722. return __returned__;
  15723. }
  15724. };
  15725. function _sfc_render$1h(_ctx, _cache, $props, $setup, $data, $options) {
  15726. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  15727. const _component_u_navbar = resolveEasycom(vue.resolveDynamicComponent("u-navbar"), __easycom_1$1);
  15728. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_0$7);
  15729. const _component_u_number_box = resolveEasycom(vue.resolveDynamicComponent("u-number-box"), __easycom_3$4);
  15730. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  15731. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  15732. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_7);
  15733. return vue.openBlock(), vue.createElementBlock("view", {
  15734. class: "container",
  15735. onClick: _cache[3] || (_cache[3] = (...args) => _ctx.playGlobalSound && _ctx.playGlobalSound(...args))
  15736. }, [
  15737. vue.createVNode(_component_u_navbar, {
  15738. title: "扫书查单",
  15739. border: false,
  15740. fixed: "",
  15741. bgColor: "#22ac38",
  15742. leftIconColor: "#fff",
  15743. titleStyle: "font-size:36rpx;color:#fff"
  15744. }, {
  15745. left: vue.withCtx(() => [
  15746. vue.createVNode(_component_u_icon, {
  15747. name: "arrow-left",
  15748. color: "#fff",
  15749. size: "20",
  15750. onClick: $setup.goBack
  15751. })
  15752. ]),
  15753. right: vue.withCtx(() => [
  15754. vue.createElementVNode("text", {
  15755. style: { "color": "#fff", "font-size": "32rpx" },
  15756. type: "primary",
  15757. onClick: _cache[0] || (_cache[0] = ($event) => $setup.showModal = true)
  15758. }, "新增")
  15759. ]),
  15760. _: 1
  15761. /* STABLE */
  15762. }),
  15763. vue.createCommentVNode(" 顶部操作栏 "),
  15764. vue.createVNode(_component_u_sticky, null, {
  15765. default: vue.withCtx(() => [
  15766. vue.createElementVNode("view", {
  15767. class: "header",
  15768. onClick: $setup.clearAll
  15769. }, "清除全部"),
  15770. vue.createCommentVNode(" 提示信息 "),
  15771. vue.createElementVNode("view", { class: "tips" }, [
  15772. vue.createElementVNode("text", null, "请勿录入审核为不良的书籍ISBN!"),
  15773. vue.createElementVNode("text", { class: "sub-tips" }, "不良书籍的ISBN可能是错误的!")
  15774. ])
  15775. ]),
  15776. _: 1
  15777. /* STABLE */
  15778. }),
  15779. vue.createCommentVNode(" ISBN列表 "),
  15780. vue.createElementVNode("scroll-view", {
  15781. "scroll-y": "",
  15782. class: "isbn-list"
  15783. }, [
  15784. (vue.openBlock(true), vue.createElementBlock(
  15785. vue.Fragment,
  15786. null,
  15787. vue.renderList($setup.isbnList, (item, index2) => {
  15788. return vue.openBlock(), vue.createElementBlock("view", {
  15789. key: index2,
  15790. class: "isbn-item"
  15791. }, [
  15792. vue.createElementVNode("view", { class: "item-left" }, [
  15793. vue.createVNode(_component_u_icon, {
  15794. name: "minus-circle-fill",
  15795. color: "#dd524d",
  15796. size: "24",
  15797. onClick: ($event) => $setup.removeItem(index2)
  15798. }, null, 8, ["onClick"]),
  15799. vue.createElementVNode(
  15800. "text",
  15801. { class: "index" },
  15802. vue.toDisplayString(index2 + 1) + "、",
  15803. 1
  15804. /* TEXT */
  15805. ),
  15806. vue.createElementVNode(
  15807. "text",
  15808. { class: "isbn" },
  15809. vue.toDisplayString(item.isbn),
  15810. 1
  15811. /* TEXT */
  15812. )
  15813. ]),
  15814. vue.createVNode(_component_u_number_box, {
  15815. modelValue: item.quantity,
  15816. "onUpdate:modelValue": ($event) => item.quantity = $event,
  15817. disableMinus: item.quantity <= 1
  15818. }, null, 8, ["modelValue", "onUpdate:modelValue", "disableMinus"])
  15819. ]);
  15820. }),
  15821. 128
  15822. /* KEYED_FRAGMENT */
  15823. ))
  15824. ]),
  15825. vue.createCommentVNode(" 底部按钮 "),
  15826. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  15827. vue.createVNode(_component_u_button, {
  15828. size: "large",
  15829. type: "warning",
  15830. text: "扫码加书",
  15831. onClick: $setup.handleScan
  15832. }),
  15833. vue.createVNode(_component_u_button, {
  15834. size: "large",
  15835. type: "primary",
  15836. text: "查询",
  15837. onClick: $setup.handleQuery
  15838. })
  15839. ]),
  15840. vue.createCommentVNode(" ISBN Input Modal "),
  15841. vue.createVNode(_component_u_popup, {
  15842. show: $setup.showModal,
  15843. mode: "center",
  15844. customStyle: "width: 84%;border-radius:10px"
  15845. }, {
  15846. default: vue.withCtx(() => [
  15847. vue.createElementVNode("view", { class: "modal-content" }, [
  15848. vue.createElementVNode("text", null, "输入ISBN码"),
  15849. vue.createVNode(_component_u_input, {
  15850. modelValue: $setup.newIsbn,
  15851. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.newIsbn = $event),
  15852. placeholder: "请输入ISBN码",
  15853. "custom-style": "margin:60rpx 0"
  15854. }, null, 8, ["modelValue"]),
  15855. vue.createElementVNode("view", { class: "modal-buttons" }, [
  15856. vue.createVNode(_component_u_button, {
  15857. text: "取消",
  15858. onClick: _cache[2] || (_cache[2] = ($event) => $setup.showModal = false)
  15859. }),
  15860. vue.createVNode(_component_u_button, {
  15861. type: "primary",
  15862. text: "确定",
  15863. onClick: $setup.addIsbn
  15864. })
  15865. ])
  15866. ])
  15867. ]),
  15868. _: 1
  15869. /* STABLE */
  15870. }, 8, ["show"])
  15871. ]);
  15872. }
  15873. const PagesIndexAuditScanOrder = /* @__PURE__ */ _export_sfc(_sfc_main$1i, [["render", _sfc_render$1h], ["__scopeId", "data-v-1af411ea"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/index/audit/scan-order.vue"]]);
  15874. const _sfc_main$1h = {
  15875. __name: "orderItem",
  15876. props: {
  15877. item: {
  15878. type: Object,
  15879. default: () => {
  15880. }
  15881. }
  15882. },
  15883. setup(__props, { expose: __expose }) {
  15884. __expose();
  15885. const props2 = __props;
  15886. const statusEnum = {
  15887. 0: "创建",
  15888. 1: "用户删除",
  15889. 2: "下单(待初审)",
  15890. 3: "初审(待取书)",
  15891. 4: "初审未通过",
  15892. 5: "快递取书(待签收)",
  15893. 6: "快递签收(待收货)",
  15894. 7: "物流签收(路由异常)",
  15895. 8: "仓库收货(待审核)",
  15896. 9: "审核中(审核未提交)",
  15897. 10: "已审核(待付款)",
  15898. 11: "已完成"
  15899. };
  15900. const maskedNickName = vue.computed(() => {
  15901. let nickName = props2.item.userNick || props2.item.nickName;
  15902. if (!nickName)
  15903. return "";
  15904. return nickName.charAt(0) + "*".repeat(nickName.length - 1);
  15905. });
  15906. let statusText = vue.computed(() => {
  15907. return props2.item.status ? statusEnum[props2.item.status] : "-";
  15908. });
  15909. const statusColor = vue.ref("#FF4D4F");
  15910. const copyToClipboard = (text) => {
  15911. uni.setClipboardData({
  15912. data: text,
  15913. success: () => {
  15914. uni.showToast({
  15915. title: "复制成功",
  15916. icon: "success"
  15917. });
  15918. }
  15919. });
  15920. };
  15921. const handleAudit = () => {
  15922. uni.navigateTo({
  15923. url: `/pages/index/detail/index?id=${props2.item.orderId}`
  15924. });
  15925. };
  15926. const handleView = () => {
  15927. uni.navigateTo({
  15928. url: `/pages/index/detail/index?id=${props2.item.orderId}&type=2`
  15929. });
  15930. };
  15931. const __returned__ = { props: props2, statusEnum, maskedNickName, get statusText() {
  15932. return statusText;
  15933. }, set statusText(v) {
  15934. statusText = v;
  15935. }, statusColor, copyToClipboard, handleAudit, handleView, ref: vue.ref, computed: vue.computed };
  15936. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  15937. return __returned__;
  15938. }
  15939. };
  15940. function _sfc_render$1g(_ctx, _cache, $props, $setup, $data, $options) {
  15941. var _a, _b, _c;
  15942. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  15943. return vue.openBlock(), vue.createElementBlock("view", { class: "order-card" }, [
  15944. vue.createCommentVNode(" 用户信息 "),
  15945. vue.createElementVNode("view", { class: "user-info" }, [
  15946. vue.createElementVNode("image", {
  15947. class: "avatar",
  15948. src: $props.item.imgPath,
  15949. mode: "aspectFill"
  15950. }, null, 8, ["src"]),
  15951. vue.createElementVNode("view", { class: "user-details" }, [
  15952. vue.createElementVNode(
  15953. "text",
  15954. { class: "username" },
  15955. vue.toDisplayString($props.item.plat == 1 ? "微信用户" : "支付宝用户") + " (" + vue.toDisplayString($setup.maskedNickName) + ")",
  15956. 1
  15957. /* TEXT */
  15958. ),
  15959. vue.createElementVNode(
  15960. "text",
  15961. { class: "date" },
  15962. "共卖出" + vue.toDisplayString($props.item.totalNum) + "本书",
  15963. 1
  15964. /* TEXT */
  15965. ),
  15966. vue.createElementVNode(
  15967. "text",
  15968. { class: "date" },
  15969. "来自" + vue.toDisplayString($props.item.sendSsq),
  15970. 1
  15971. /* TEXT */
  15972. )
  15973. ]),
  15974. vue.createElementVNode("view", { class: "user-details right-items" }, [
  15975. vue.createElementVNode(
  15976. "text",
  15977. { class: "date" },
  15978. vue.toDisplayString($props.item.schedulePickupStartTime),
  15979. 1
  15980. /* TEXT */
  15981. ),
  15982. vue.createElementVNode(
  15983. "text",
  15984. {
  15985. class: "status",
  15986. style: vue.normalizeStyle({ color: $setup.statusColor })
  15987. },
  15988. "[" + vue.toDisplayString($setup.statusText) + "]",
  15989. 5
  15990. /* TEXT, STYLE */
  15991. )
  15992. ])
  15993. ]),
  15994. vue.createCommentVNode(" 订单详情 "),
  15995. vue.createElementVNode("view", { class: "order-details" }, [
  15996. vue.createElementVNode("view", { class: "detail-row flex flex-col" }, [
  15997. vue.createElementVNode("view", { class: "flex-1" }, [
  15998. vue.createElementVNode("text", null, "订单ID:"),
  15999. vue.createElementVNode(
  16000. "text",
  16001. {
  16002. class: "link",
  16003. onClick: _cache[0] || (_cache[0] = ($event) => $setup.copyToClipboard($props.item.orderId))
  16004. },
  16005. vue.toDisplayString($props.item.orderId),
  16006. 1
  16007. /* TEXT */
  16008. )
  16009. ]),
  16010. vue.createElementVNode("view", {
  16011. class: "flex-1",
  16012. style: { "flex": "1.5" }
  16013. }, [
  16014. vue.createElementVNode("text", null, "运单号:"),
  16015. vue.createElementVNode(
  16016. "text",
  16017. {
  16018. class: "link",
  16019. onClick: _cache[1] || (_cache[1] = ($event) => $setup.copyToClipboard($props.item.waybillCode))
  16020. },
  16021. vue.toDisplayString($props.item.waybillCode),
  16022. 1
  16023. /* TEXT */
  16024. )
  16025. ])
  16026. ]),
  16027. vue.createElementVNode("view", { class: "detail-row" }, [
  16028. vue.createElementVNode(
  16029. "text",
  16030. { class: "flex-1" },
  16031. "预估金额:" + vue.toDisplayString($props.item.expectMoney || 0),
  16032. 1
  16033. /* TEXT */
  16034. ),
  16035. vue.createElementVNode(
  16036. "text",
  16037. { class: "flex-1" },
  16038. "审核金额:" + vue.toDisplayString($props.item.finalMoney || "待核算"),
  16039. 1
  16040. /* TEXT */
  16041. )
  16042. ]),
  16043. vue.createElementVNode("view", { class: "detail-row" }, [
  16044. vue.createElementVNode(
  16045. "text",
  16046. null,
  16047. "内部备注:" + vue.toDisplayString(((_a = $props.item) == null ? void 0 : _a.manageRemark) ? (_c = (_b = $props.item) == null ? void 0 : _b.manageRemark[0]) == null ? void 0 : _c.remark : "-"),
  16048. 1
  16049. /* TEXT */
  16050. )
  16051. ])
  16052. ]),
  16053. vue.createCommentVNode(" 操作按钮 "),
  16054. vue.createElementVNode("view", { class: "action-buttons" }, [
  16055. vue.createVNode(_component_u_button, {
  16056. size: "small",
  16057. type: "primary",
  16058. onClick: $setup.handleAudit,
  16059. disabled: $props.item.status != 8 || $props.item.status != 9
  16060. }, {
  16061. default: vue.withCtx(() => [
  16062. vue.createTextVNode("到货审核")
  16063. ]),
  16064. _: 1
  16065. /* STABLE */
  16066. }, 8, ["disabled"]),
  16067. vue.createVNode(_component_u_button, {
  16068. size: "small",
  16069. onClick: $setup.handleView
  16070. }, {
  16071. default: vue.withCtx(() => [
  16072. vue.createTextVNode("查看")
  16073. ]),
  16074. _: 1
  16075. /* STABLE */
  16076. })
  16077. ])
  16078. ]);
  16079. }
  16080. const orderItem = /* @__PURE__ */ _export_sfc(_sfc_main$1h, [["render", _sfc_render$1g], ["__scopeId", "data-v-12bc2a79"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/my/components/orderItem.vue"]]);
  16081. const _sfc_main$1g = {
  16082. __name: "isbn-order",
  16083. setup(__props, { expose: __expose }) {
  16084. __expose();
  16085. const otherParams = vue.ref({
  16086. isbnList: ""
  16087. });
  16088. const scrollRef = vue.ref(null);
  16089. const refreshList = () => {
  16090. var _a;
  16091. (_a = scrollRef.value) == null ? void 0 : _a.resetUpScroll();
  16092. };
  16093. function playGlobalSound() {
  16094. uni.$u.playClickSound();
  16095. }
  16096. let dataList = vue.ref([]);
  16097. const updateList = (data, page2) => {
  16098. dataList.value = data;
  16099. if (data.length > 0 && page2 == 1) {
  16100. uni.$u.ttsModule.speak("查询到" + data.length + "条数据");
  16101. }
  16102. if (data.length == 0 && page2 == 1) {
  16103. uni.$u.ttsModule.speak("未查询到数据");
  16104. }
  16105. };
  16106. onLoad(() => {
  16107. const storedList = uni.getStorageSync("isbnList");
  16108. if (storedList) {
  16109. otherParams.value.isbnList = storedList.map((v) => v.isbn);
  16110. refreshList();
  16111. }
  16112. });
  16113. const __returned__ = { otherParams, scrollRef, refreshList, playGlobalSound, get dataList() {
  16114. return dataList;
  16115. }, set dataList(v) {
  16116. dataList = v;
  16117. }, updateList, reactive: vue.reactive, PageScroll, OrderItem: orderItem, ref: vue.ref, get onLoad() {
  16118. return onLoad;
  16119. } };
  16120. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  16121. return __returned__;
  16122. }
  16123. };
  16124. function _sfc_render$1f(_ctx, _cache, $props, $setup, $data, $options) {
  16125. return vue.openBlock(), vue.createElementBlock("view", {
  16126. class: "common-page",
  16127. style: { "padding": "0" },
  16128. onClick: $setup.playGlobalSound
  16129. }, [
  16130. vue.createVNode($setup["PageScroll"], {
  16131. requestStr: "/app/orderinfo/getOrderListByIsbn",
  16132. onUpdateList: $setup.updateList,
  16133. ref: "scrollRef",
  16134. otherParams: $setup.otherParams,
  16135. method: "post"
  16136. }, {
  16137. default: vue.withCtx(() => [
  16138. $setup.dataList.length ? (vue.openBlock(), vue.createElementBlock("view", {
  16139. key: 0,
  16140. class: "list-con"
  16141. }, [
  16142. (vue.openBlock(true), vue.createElementBlock(
  16143. vue.Fragment,
  16144. null,
  16145. vue.renderList($setup.dataList, (cell) => {
  16146. return vue.openBlock(), vue.createBlock($setup["OrderItem"], {
  16147. key: cell.id,
  16148. item: cell,
  16149. class: "mt-20"
  16150. }, null, 8, ["item"]);
  16151. }),
  16152. 128
  16153. /* KEYED_FRAGMENT */
  16154. ))
  16155. ])) : vue.createCommentVNode("v-if", true)
  16156. ]),
  16157. _: 1
  16158. /* STABLE */
  16159. }, 8, ["otherParams"])
  16160. ]);
  16161. }
  16162. const PagesIndexAuditIsbnOrder = /* @__PURE__ */ _export_sfc(_sfc_main$1g, [["render", _sfc_render$1f], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/index/audit/isbn-order.vue"]]);
  16163. const _sfc_main$1f = {
  16164. __name: "express-order",
  16165. setup(__props, { expose: __expose }) {
  16166. __expose();
  16167. const form = vue.ref({
  16168. searchType: "2",
  16169. search: ""
  16170. });
  16171. function playGlobalSound() {
  16172. uni.$u.playClickSound();
  16173. }
  16174. const handleSearch = () => {
  16175. if (!form.value.search) {
  16176. let text = form.value.searchType == "1" ? "请输入订单编号" : "请输入物流单号";
  16177. uni.$u.ttsModule.speak(text);
  16178. return;
  16179. }
  16180. uni.$u.http.get("/app/orderinfo/getOrderInfoForCheck", {
  16181. params: {
  16182. ...form.value
  16183. }
  16184. }).then((res) => {
  16185. if (res.code == 200) {
  16186. uni.setStorageSync("orderDetail", res.data);
  16187. uni.navigateTo({
  16188. url: `/pages/index/detail/index?id=${res.data.orderId}`
  16189. });
  16190. } else {
  16191. let text = form.value.search + res.msg;
  16192. uni.$u.ttsModule.speak(text);
  16193. }
  16194. });
  16195. playGlobalSound();
  16196. };
  16197. const handleScan2 = () => {
  16198. playGlobalSound();
  16199. uni.scanCode({
  16200. success: (res) => {
  16201. form.value.search = res.result;
  16202. handleSearch();
  16203. }
  16204. });
  16205. };
  16206. const { unregister } = uni.$u.useEventListener((e) => {
  16207. form.value.search = e.barcode;
  16208. handleSearch();
  16209. });
  16210. vue.onUnmounted(() => {
  16211. unregister();
  16212. });
  16213. const __returned__ = { form, playGlobalSound, handleSearch, handleScan: handleScan2, unregister, ref: vue.ref, onUnmounted: vue.onUnmounted, get onLoad() {
  16214. return onLoad;
  16215. }, get onShow() {
  16216. return onShow;
  16217. } };
  16218. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  16219. return __returned__;
  16220. }
  16221. };
  16222. function _sfc_render$1e(_ctx, _cache, $props, $setup, $data, $options) {
  16223. const _component_u_radio = resolveEasycom(vue.resolveDynamicComponent("u-radio"), __easycom_0$9);
  16224. const _component_u_radio_group = resolveEasycom(vue.resolveDynamicComponent("u-radio-group"), __easycom_1$4);
  16225. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  16226. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  16227. const _component_u_divider = resolveEasycom(vue.resolveDynamicComponent("u-divider"), __easycom_4$3);
  16228. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  16229. vue.createCommentVNode(" 底部按钮 "),
  16230. vue.createElementVNode("view", { class: "footer" }, [
  16231. vue.createCommentVNode(" 查询区域 "),
  16232. vue.createElementVNode("view", { class: "query-section" }, [
  16233. vue.createVNode(_component_u_radio_group, {
  16234. modelValue: $setup.form.searchType,
  16235. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.form.searchType = $event),
  16236. onChange: $setup.playGlobalSound
  16237. }, {
  16238. default: vue.withCtx(() => [
  16239. vue.createVNode(_component_u_radio, {
  16240. label: "查订单",
  16241. name: "1",
  16242. "label-size": "17"
  16243. }),
  16244. vue.createVNode(_component_u_radio, {
  16245. label: "查物流",
  16246. "custom-style": "margin-left:20px",
  16247. name: "2",
  16248. "label-size": "17"
  16249. })
  16250. ]),
  16251. _: 1
  16252. /* STABLE */
  16253. }, 8, ["modelValue"]),
  16254. vue.createElementVNode("view", { class: "search-box" }, [
  16255. vue.createVNode(_component_u_input, {
  16256. "custom-style": "width:100rpx",
  16257. modelValue: $setup.form.search,
  16258. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.form.search = $event),
  16259. placeholder: $setup.form.searchType == "1" ? "扫描/输入订单编号" : "扫描/输入物流单号",
  16260. border: "surround",
  16261. clearable: "",
  16262. onFocus: $setup.playGlobalSound,
  16263. "placeholder-style": "font-size:32rpx",
  16264. customStyle: { "fontSize": "32rpx" }
  16265. }, null, 8, ["modelValue", "placeholder"]),
  16266. vue.createVNode(_component_u_button, {
  16267. color: "#c8c8c8",
  16268. text: "查询",
  16269. onClick: $setup.handleSearch
  16270. })
  16271. ])
  16272. ]),
  16273. vue.createVNode(_component_u_divider),
  16274. vue.createElementVNode("view", { style: { "display": "flex" } }, [
  16275. vue.createVNode(_component_u_button, {
  16276. size: "large",
  16277. type: "success",
  16278. text: "扫码",
  16279. onClick: $setup.handleScan
  16280. })
  16281. ])
  16282. ])
  16283. ]);
  16284. }
  16285. const PagesIndexAuditExpressOrder = /* @__PURE__ */ _export_sfc(_sfc_main$1f, [["render", _sfc_render$1e], ["__scopeId", "data-v-b27ee25f"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/index/audit/express-order.vue"]]);
  16286. const _sfc_main$1e = {
  16287. __name: "user-orders",
  16288. setup(__props, { expose: __expose }) {
  16289. __expose();
  16290. const otherParams = vue.ref({
  16291. userId: ""
  16292. });
  16293. const scrollRef = vue.ref(null);
  16294. const refreshList = () => {
  16295. var _a;
  16296. (_a = scrollRef.value) == null ? void 0 : _a.resetUpScroll();
  16297. };
  16298. let dataList = vue.ref([]);
  16299. const updateList = (data, page2) => {
  16300. dataList.value = data;
  16301. if (data.length > 0 && page2 == 1) {
  16302. uni.$u.ttsModule.speak("查询到" + data.length + "条数据");
  16303. }
  16304. if (data.length == 0 && page2 == 1) {
  16305. uni.$u.ttsModule.speak("未查询到数据");
  16306. }
  16307. };
  16308. onLoad((options) => {
  16309. otherParams.value.userId = options.userId;
  16310. refreshList();
  16311. });
  16312. const __returned__ = { otherParams, scrollRef, refreshList, get dataList() {
  16313. return dataList;
  16314. }, set dataList(v) {
  16315. dataList = v;
  16316. }, updateList, reactive: vue.reactive, PageScroll, OrderItem: orderItem, ref: vue.ref, get onLoad() {
  16317. return onLoad;
  16318. } };
  16319. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  16320. return __returned__;
  16321. }
  16322. };
  16323. function _sfc_render$1d(_ctx, _cache, $props, $setup, $data, $options) {
  16324. return vue.openBlock(), vue.createElementBlock("view", {
  16325. class: "common-page",
  16326. style: { "padding": "0" }
  16327. }, [
  16328. vue.createVNode($setup["PageScroll"], {
  16329. requestStr: "/app/orderinfo/getOrderListByUserId",
  16330. onUpdateList: $setup.updateList,
  16331. ref: "scrollRef",
  16332. otherParams: $setup.otherParams,
  16333. method: "get"
  16334. }, {
  16335. default: vue.withCtx(() => [
  16336. $setup.dataList.length ? (vue.openBlock(), vue.createElementBlock("view", {
  16337. key: 0,
  16338. class: "list-con"
  16339. }, [
  16340. (vue.openBlock(true), vue.createElementBlock(
  16341. vue.Fragment,
  16342. null,
  16343. vue.renderList($setup.dataList, (cell) => {
  16344. return vue.openBlock(), vue.createBlock($setup["OrderItem"], {
  16345. key: cell.id,
  16346. item: cell,
  16347. class: "mt-20"
  16348. }, null, 8, ["item"]);
  16349. }),
  16350. 128
  16351. /* KEYED_FRAGMENT */
  16352. ))
  16353. ])) : vue.createCommentVNode("v-if", true)
  16354. ]),
  16355. _: 1
  16356. /* STABLE */
  16357. }, 8, ["otherParams"])
  16358. ]);
  16359. }
  16360. const PagesIndexDetailUserOrders = /* @__PURE__ */ _export_sfc(_sfc_main$1e, [["render", _sfc_render$1d], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/index/detail/user-orders.vue"]]);
  16361. const _sfc_main$1d = {
  16362. __name: "AuditorSelector",
  16363. props: {
  16364. show: {
  16365. type: Boolean,
  16366. default: false
  16367. }
  16368. },
  16369. emits: ["update:show", "auditor-selected"],
  16370. setup(__props, { expose: __expose, emit: __emit }) {
  16371. __expose();
  16372. const props2 = __props;
  16373. const emit2 = __emit;
  16374. const searchKeyword = vue.ref("");
  16375. const searchResults = vue.ref([]);
  16376. const historyAuditors = vue.ref(uni.getStorageSync("historyAuditors") || []);
  16377. const checkUserId = vue.ref("");
  16378. const auditorSearch = (name) => {
  16379. formatAppLog("log", "at pages/index/detail/components/AuditorSelector.vue:66", name);
  16380. uni.$u.http.get("/app/appUser/getCheckUser?name=" + name).then((res) => {
  16381. if (res.code == 200) {
  16382. searchResults.value = res.data;
  16383. }
  16384. });
  16385. };
  16386. const handleSearch = () => {
  16387. auditorSearch(searchKeyword.value);
  16388. };
  16389. const selectItem = vue.ref({});
  16390. const selectAuditor = (item) => {
  16391. checkUserId.value = item.userId;
  16392. selectItem.value = item;
  16393. };
  16394. const handleClose = () => {
  16395. emit2("update:show", false);
  16396. searchKeyword.value = "";
  16397. };
  16398. const handleConfirm = () => {
  16399. if (checkUserId.value) {
  16400. emit2("auditor-selected", selectItem.value);
  16401. uni.setStorageSync("checkUserInfo", selectItem.value);
  16402. addToHistory(selectItem.value);
  16403. handleClose();
  16404. }
  16405. };
  16406. const addToHistory = (item) => {
  16407. const existingIndex = historyAuditors.value.findIndex((auditor) => auditor.userId === item.userId);
  16408. if (existingIndex !== -1) {
  16409. historyAuditors.value.splice(existingIndex, 1);
  16410. }
  16411. historyAuditors.value.unshift(item);
  16412. if (historyAuditors.value.length > 10) {
  16413. historyAuditors.value.pop();
  16414. }
  16415. uni.setStorageSync("historyAuditors", historyAuditors.value);
  16416. };
  16417. vue.onMounted(() => {
  16418. const storedHistory = uni.getStorageSync("historyAuditors") || [];
  16419. historyAuditors.value = storedHistory;
  16420. });
  16421. const __returned__ = { props: props2, emit: emit2, searchKeyword, searchResults, historyAuditors, checkUserId, auditorSearch, handleSearch, selectItem, selectAuditor, handleClose, handleConfirm, addToHistory, ref: vue.ref, onMounted: vue.onMounted };
  16422. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  16423. return __returned__;
  16424. }
  16425. };
  16426. function _sfc_render$1c(_ctx, _cache, $props, $setup, $data, $options) {
  16427. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$4);
  16428. const _component_u_tag = resolveEasycom(vue.resolveDynamicComponent("u-tag"), __easycom_2$2);
  16429. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  16430. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_7);
  16431. return vue.openBlock(), vue.createBlock(_component_u_popup, {
  16432. show: $props.show,
  16433. onClose: $setup.handleClose,
  16434. mode: "bottom",
  16435. round: "10"
  16436. }, {
  16437. default: vue.withCtx(() => [
  16438. vue.createElementVNode("view", { class: "auditor-selector" }, [
  16439. vue.createElementVNode("view", { style: { "flex": "1" } }, [
  16440. vue.createCommentVNode(" Title "),
  16441. vue.createElementVNode("view", { class: "header" }, [
  16442. vue.createElementVNode("text", { class: "title" }, "绑定审核员")
  16443. ]),
  16444. vue.createCommentVNode(" Search Box "),
  16445. vue.createElementVNode("view", { class: "search-box" }, [
  16446. vue.createVNode(_component_u_search, {
  16447. inputStyle: { "height": "80rpx", "font-size": "16px" },
  16448. actionStyle: { "font-size": "16px", color: "#22ac38" },
  16449. modelValue: $setup.searchKeyword,
  16450. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchKeyword = $event),
  16451. placeholder: "搜索审核员",
  16452. "show-action": true,
  16453. "action-text": "搜索",
  16454. onSearch: $setup.handleSearch,
  16455. onCustom: $setup.handleSearch
  16456. }, null, 8, ["modelValue"])
  16457. ]),
  16458. vue.createCommentVNode(" Search Results "),
  16459. $setup.searchResults.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  16460. key: 0,
  16461. class: "search-result"
  16462. }, [
  16463. vue.createElementVNode("text", { class: "section-title" }, "搜索结果"),
  16464. vue.createElementVNode("view", { class: "tag-group" }, [
  16465. (vue.openBlock(true), vue.createElementBlock(
  16466. vue.Fragment,
  16467. null,
  16468. vue.renderList($setup.searchResults, (item) => {
  16469. return vue.openBlock(), vue.createBlock(_component_u_tag, {
  16470. key: item,
  16471. text: item.userName,
  16472. plain: $setup.checkUserId !== item.userId,
  16473. shape: "circle",
  16474. onClick: ($event) => $setup.selectAuditor(item),
  16475. size: "large"
  16476. }, null, 8, ["text", "plain", "onClick"]);
  16477. }),
  16478. 128
  16479. /* KEYED_FRAGMENT */
  16480. ))
  16481. ])
  16482. ])) : vue.createCommentVNode("v-if", true),
  16483. vue.createCommentVNode(" History "),
  16484. $setup.historyAuditors.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  16485. key: 1,
  16486. class: "history-section"
  16487. }, [
  16488. vue.createElementVNode("text", { class: "section-title" }, "历史绑定"),
  16489. vue.createElementVNode("view", { class: "tag-group" }, [
  16490. (vue.openBlock(true), vue.createElementBlock(
  16491. vue.Fragment,
  16492. null,
  16493. vue.renderList($setup.historyAuditors, (item) => {
  16494. return vue.openBlock(), vue.createBlock(_component_u_tag, {
  16495. key: item,
  16496. text: item.userName,
  16497. plain: $setup.checkUserId !== item.userId,
  16498. shape: "circle",
  16499. onClick: ($event) => $setup.selectAuditor(item),
  16500. size: "large"
  16501. }, null, 8, ["text", "plain", "onClick"]);
  16502. }),
  16503. 128
  16504. /* KEYED_FRAGMENT */
  16505. ))
  16506. ])
  16507. ])) : vue.createCommentVNode("v-if", true)
  16508. ]),
  16509. vue.createCommentVNode(" Footer Buttons "),
  16510. vue.createElementVNode("view", { class: "footer" }, [
  16511. vue.createVNode(_component_u_button, {
  16512. onClick: $setup.handleClose,
  16513. text: "取消",
  16514. plain: "",
  16515. shape: "circle"
  16516. }),
  16517. vue.createVNode(_component_u_button, {
  16518. type: "primary",
  16519. onClick: $setup.handleConfirm,
  16520. text: "确定",
  16521. shape: "circle"
  16522. })
  16523. ])
  16524. ])
  16525. ]),
  16526. _: 1
  16527. /* STABLE */
  16528. }, 8, ["show"]);
  16529. }
  16530. const AuditorSelector = /* @__PURE__ */ _export_sfc(_sfc_main$1d, [["render", _sfc_render$1c], ["__scopeId", "data-v-8d9417b9"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/index/detail/components/AuditorSelector.vue"]]);
  16531. const props$b = {
  16532. props: {
  16533. // 输入框的内容
  16534. value: {
  16535. type: [String, Number],
  16536. default: props$G.textarea.value
  16537. },
  16538. // 输入框的内容
  16539. modelValue: {
  16540. type: [String, Number],
  16541. default: props$G.textarea.value
  16542. },
  16543. // 输入框为空时占位符
  16544. placeholder: {
  16545. type: [String, Number],
  16546. default: props$G.textarea.placeholder
  16547. },
  16548. // 指定placeholder的样式类,注意页面或组件的style中写了scoped时,需要在类名前写/deep/
  16549. placeholderClass: {
  16550. type: String,
  16551. default: props$G.input.placeholderClass
  16552. },
  16553. // 指定placeholder的样式
  16554. placeholderStyle: {
  16555. type: [String, Object],
  16556. default: props$G.input.placeholderStyle
  16557. },
  16558. // 输入框高度
  16559. height: {
  16560. type: [String, Number],
  16561. default: props$G.textarea.height
  16562. },
  16563. // 设置键盘右下角按钮的文字,仅微信小程序,App-vue和H5有效
  16564. confirmType: {
  16565. type: String,
  16566. default: props$G.textarea.confirmType
  16567. },
  16568. // 是否禁用
  16569. disabled: {
  16570. type: Boolean,
  16571. default: props$G.textarea.disabled
  16572. },
  16573. // 是否显示统计字数
  16574. count: {
  16575. type: Boolean,
  16576. default: props$G.textarea.count
  16577. },
  16578. // 是否自动获取焦点,nvue不支持,H5取决于浏览器的实现
  16579. focus: {
  16580. type: Boolean,
  16581. default: props$G.textarea.focus
  16582. },
  16583. // 是否自动增加高度
  16584. autoHeight: {
  16585. type: Boolean,
  16586. default: props$G.textarea.autoHeight
  16587. },
  16588. // 如果textarea是在一个position:fixed的区域,需要显示指定属性fixed为true
  16589. fixed: {
  16590. type: Boolean,
  16591. default: props$G.textarea.fixed
  16592. },
  16593. // 指定光标与键盘的距离
  16594. cursorSpacing: {
  16595. type: Number,
  16596. default: props$G.textarea.cursorSpacing
  16597. },
  16598. // 指定focus时的光标位置
  16599. cursor: {
  16600. type: [String, Number],
  16601. default: props$G.textarea.cursor
  16602. },
  16603. // 是否显示键盘上方带有”完成“按钮那一栏,
  16604. showConfirmBar: {
  16605. type: Boolean,
  16606. default: props$G.textarea.showConfirmBar
  16607. },
  16608. // 光标起始位置,自动聚焦时有效,需与selection-end搭配使用
  16609. selectionStart: {
  16610. type: Number,
  16611. default: props$G.textarea.selectionStart
  16612. },
  16613. // 光标结束位置,自动聚焦时有效,需与selection-start搭配使用
  16614. selectionEnd: {
  16615. type: Number,
  16616. default: props$G.textarea.selectionEnd
  16617. },
  16618. // 键盘弹起时,是否自动上推页面
  16619. adjustPosition: {
  16620. type: Boolean,
  16621. default: props$G.textarea.adjustPosition
  16622. },
  16623. // 是否去掉 iOS 下的默认内边距,只微信小程序有效
  16624. disableDefaultPadding: {
  16625. type: Boolean,
  16626. default: props$G.textarea.disableDefaultPadding
  16627. },
  16628. // focus时,点击页面的时候不收起键盘,只微信小程序有效
  16629. holdKeyboard: {
  16630. type: Boolean,
  16631. default: props$G.textarea.holdKeyboard
  16632. },
  16633. // 最大输入长度,设置为 -1 的时候不限制最大长度
  16634. maxlength: {
  16635. type: [String, Number],
  16636. default: props$G.textarea.maxlength
  16637. },
  16638. // 边框类型,surround-四周边框,bottom-底部边框
  16639. border: {
  16640. type: String,
  16641. default: props$G.textarea.border
  16642. },
  16643. // 用于处理或者过滤输入框内容的方法
  16644. formatter: {
  16645. type: [Function, null],
  16646. default: props$G.textarea.formatter
  16647. },
  16648. // 是否忽略组件内对文本合成系统事件的处理
  16649. ignoreCompositionEvent: {
  16650. type: Boolean,
  16651. default: true
  16652. }
  16653. }
  16654. };
  16655. const _sfc_main$1c = {
  16656. name: "u-textarea",
  16657. mixins: [mpMixin, mixin, props$b],
  16658. data() {
  16659. return {
  16660. // 输入框的值
  16661. innerValue: "",
  16662. // 是否处于获得焦点状态
  16663. focused: false,
  16664. // value是否第一次变化,在watch中,由于加入immediate属性,会在第一次触发,此时不应该认为value发生了变化
  16665. firstChange: true,
  16666. // value绑定值的变化是由内部还是外部引起的
  16667. changeFromInner: false,
  16668. // 过滤处理方法
  16669. innerFormatter: (value2) => value2
  16670. };
  16671. },
  16672. created() {
  16673. },
  16674. watch: {
  16675. modelValue: {
  16676. immediate: true,
  16677. handler(newVal, oldVal) {
  16678. this.innerValue = newVal;
  16679. this.firstChange = false;
  16680. this.changeFromInner = false;
  16681. }
  16682. }
  16683. },
  16684. computed: {
  16685. // 组件的类名
  16686. textareaClass() {
  16687. let classes = [], { border, disabled } = this;
  16688. border === "surround" && (classes = classes.concat(["u-border", "u-textarea--radius"]));
  16689. border === "bottom" && (classes = classes.concat([
  16690. "u-border-bottom",
  16691. "u-textarea--no-radius"
  16692. ]));
  16693. disabled && classes.push("u-textarea--disabled");
  16694. return classes.join(" ");
  16695. },
  16696. // 组件的样式
  16697. textareaStyle() {
  16698. const style = {};
  16699. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  16700. }
  16701. },
  16702. emits: ["update:modelValue", "linechange", "focus", "blur", "change", "confirm", "keyboardheightchange"],
  16703. methods: {
  16704. // 在微信小程序中,不支持将函数当做props参数,故只能通过ref形式调用
  16705. setFormatter(e) {
  16706. this.innerFormatter = e;
  16707. },
  16708. onFocus(e) {
  16709. this.$emit("focus", e);
  16710. },
  16711. onBlur(e) {
  16712. this.$emit("blur", e);
  16713. uni.$u.formValidate(this, "blur");
  16714. },
  16715. onLinechange(e) {
  16716. this.$emit("linechange", e);
  16717. },
  16718. onInput(e) {
  16719. let { value: value2 = "" } = e.detail || {};
  16720. const formatter = this.formatter || this.innerFormatter;
  16721. const formatValue = formatter(value2);
  16722. this.innerValue = value2;
  16723. this.$nextTick(() => {
  16724. this.innerValue = formatValue;
  16725. this.valueChange();
  16726. });
  16727. },
  16728. // 内容发生变化,进行处理
  16729. valueChange() {
  16730. const value2 = this.innerValue;
  16731. this.$nextTick(() => {
  16732. this.$emit("update:modelValue", value2);
  16733. this.changeFromInner = true;
  16734. this.$emit("change", value2);
  16735. uni.$u.formValidate(this, "change");
  16736. });
  16737. },
  16738. onConfirm(e) {
  16739. this.$emit("confirm", e);
  16740. },
  16741. onKeyboardheightchange(e) {
  16742. this.$emit("keyboardheightchange", e);
  16743. }
  16744. }
  16745. };
  16746. function _sfc_render$1b(_ctx, _cache, $props, $setup, $data, $options) {
  16747. return vue.openBlock(), vue.createElementBlock(
  16748. "view",
  16749. {
  16750. class: vue.normalizeClass(["u-textarea", $options.textareaClass]),
  16751. style: vue.normalizeStyle([$options.textareaStyle])
  16752. },
  16753. [
  16754. vue.createElementVNode("textarea", {
  16755. class: "u-textarea__field",
  16756. value: $data.innerValue,
  16757. style: vue.normalizeStyle({ height: _ctx.$u.addUnit(_ctx.height) }),
  16758. placeholder: _ctx.placeholder,
  16759. "placeholder-style": _ctx.$u.addStyle(_ctx.placeholderStyle, "string"),
  16760. "placeholder-class": _ctx.placeholderClass,
  16761. disabled: _ctx.disabled,
  16762. focus: _ctx.focus,
  16763. autoHeight: _ctx.autoHeight,
  16764. fixed: _ctx.fixed,
  16765. cursorSpacing: _ctx.cursorSpacing,
  16766. cursor: _ctx.cursor,
  16767. showConfirmBar: _ctx.showConfirmBar,
  16768. selectionStart: _ctx.selectionStart,
  16769. selectionEnd: _ctx.selectionEnd,
  16770. adjustPosition: _ctx.adjustPosition,
  16771. disableDefaultPadding: _ctx.disableDefaultPadding,
  16772. holdKeyboard: _ctx.holdKeyboard,
  16773. maxlength: _ctx.maxlength,
  16774. "confirm-type": _ctx.confirmType,
  16775. ignoreCompositionEvent: _ctx.ignoreCompositionEvent,
  16776. onFocus: _cache[0] || (_cache[0] = (...args) => $options.onFocus && $options.onFocus(...args)),
  16777. onBlur: _cache[1] || (_cache[1] = (...args) => $options.onBlur && $options.onBlur(...args)),
  16778. onLinechange: _cache[2] || (_cache[2] = (...args) => $options.onLinechange && $options.onLinechange(...args)),
  16779. onInput: _cache[3] || (_cache[3] = (...args) => $options.onInput && $options.onInput(...args)),
  16780. onConfirm: _cache[4] || (_cache[4] = (...args) => $options.onConfirm && $options.onConfirm(...args)),
  16781. onKeyboardheightchange: _cache[5] || (_cache[5] = (...args) => $options.onKeyboardheightchange && $options.onKeyboardheightchange(...args))
  16782. }, null, 44, ["value", "placeholder", "placeholder-style", "placeholder-class", "disabled", "focus", "autoHeight", "fixed", "cursorSpacing", "cursor", "showConfirmBar", "selectionStart", "selectionEnd", "adjustPosition", "disableDefaultPadding", "holdKeyboard", "maxlength", "confirm-type", "ignoreCompositionEvent"]),
  16783. _ctx.count ? (vue.openBlock(), vue.createElementBlock(
  16784. "text",
  16785. {
  16786. key: 0,
  16787. class: "u-textarea__count",
  16788. style: vue.normalizeStyle({
  16789. "background-color": _ctx.disabled ? "transparent" : "#fff"
  16790. })
  16791. },
  16792. vue.toDisplayString($data.innerValue.length) + "/" + vue.toDisplayString(_ctx.maxlength),
  16793. 5
  16794. /* TEXT, STYLE */
  16795. )) : vue.createCommentVNode("v-if", true)
  16796. ],
  16797. 6
  16798. /* CLASS, STYLE */
  16799. );
  16800. }
  16801. const __easycom_3$3 = /* @__PURE__ */ _export_sfc(_sfc_main$1c, [["render", _sfc_render$1b], ["__scopeId", "data-v-b6c174a6"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-textarea/u-textarea.vue"]]);
  16802. const props$a = {
  16803. props: {
  16804. // 背景颜色(默认transparent)
  16805. bgColor: {
  16806. type: String,
  16807. default: props$G.gap.bgColor
  16808. },
  16809. // 分割槽高度,单位px(默认30)
  16810. height: {
  16811. type: [String, Number],
  16812. default: props$G.gap.height
  16813. },
  16814. // 与上一个组件的距离
  16815. marginTop: {
  16816. type: [String, Number],
  16817. default: props$G.gap.marginTop
  16818. },
  16819. // 与下一个组件的距离
  16820. marginBottom: {
  16821. type: [String, Number],
  16822. default: props$G.gap.marginBottom
  16823. }
  16824. }
  16825. };
  16826. const _sfc_main$1b = {
  16827. name: "u-gap",
  16828. mixins: [mpMixin, mixin, props$a],
  16829. computed: {
  16830. gapStyle() {
  16831. const style = {
  16832. backgroundColor: this.bgColor,
  16833. height: uni.$u.addUnit(this.height),
  16834. marginTop: uni.$u.addUnit(this.marginTop),
  16835. marginBottom: uni.$u.addUnit(this.marginBottom)
  16836. };
  16837. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  16838. }
  16839. }
  16840. };
  16841. function _sfc_render$1a(_ctx, _cache, $props, $setup, $data, $options) {
  16842. return vue.openBlock(), vue.createElementBlock(
  16843. "view",
  16844. {
  16845. class: "u-gap",
  16846. style: vue.normalizeStyle([$options.gapStyle])
  16847. },
  16848. null,
  16849. 4
  16850. /* STYLE */
  16851. );
  16852. }
  16853. const __easycom_3$2 = /* @__PURE__ */ _export_sfc(_sfc_main$1b, [["render", _sfc_render$1a], ["__scopeId", "data-v-6fe44ee6"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-gap/u-gap.vue"]]);
  16854. const props$9 = {
  16855. props: {
  16856. // 操作菜单是否展示 (默认false)
  16857. show: {
  16858. type: Boolean,
  16859. default: props$G.actionSheet.show
  16860. },
  16861. // 标题
  16862. title: {
  16863. type: String,
  16864. default: props$G.actionSheet.title
  16865. },
  16866. // 选项上方的描述信息
  16867. description: {
  16868. type: String,
  16869. default: props$G.actionSheet.description
  16870. },
  16871. // 数据
  16872. actions: {
  16873. type: Array,
  16874. default: props$G.actionSheet.actions
  16875. },
  16876. // 取消按钮的文字,不为空时显示按钮
  16877. cancelText: {
  16878. type: String,
  16879. default: props$G.actionSheet.cancelText
  16880. },
  16881. // 点击某个菜单项时是否关闭弹窗
  16882. closeOnClickAction: {
  16883. type: Boolean,
  16884. default: props$G.actionSheet.closeOnClickAction
  16885. },
  16886. // 处理底部安全区(默认true)
  16887. safeAreaInsetBottom: {
  16888. type: Boolean,
  16889. default: props$G.actionSheet.safeAreaInsetBottom
  16890. },
  16891. // 小程序的打开方式
  16892. openType: {
  16893. type: String,
  16894. default: props$G.actionSheet.openType
  16895. },
  16896. // 点击遮罩是否允许关闭 (默认true)
  16897. closeOnClickOverlay: {
  16898. type: Boolean,
  16899. default: props$G.actionSheet.closeOnClickOverlay
  16900. },
  16901. // 圆角值
  16902. round: {
  16903. type: [Boolean, String, Number],
  16904. default: props$G.actionSheet.round
  16905. }
  16906. }
  16907. };
  16908. const _sfc_main$1a = {
  16909. name: "u-action-sheet",
  16910. // 一些props参数和methods方法,通过mixin混入,因为其他文件也会用到
  16911. mixins: [openType, button, mixin, props$9],
  16912. data() {
  16913. return {};
  16914. },
  16915. computed: {
  16916. // 操作项目的样式
  16917. itemStyle() {
  16918. return (index2) => {
  16919. let style = {};
  16920. if (this.actions[index2].color)
  16921. style.color = this.actions[index2].color;
  16922. if (this.actions[index2].fontSize)
  16923. style.fontSize = uni.$u.addUnit(this.actions[index2].fontSize);
  16924. if (this.actions[index2].disabled)
  16925. style.color = "#c0c4cc";
  16926. return style;
  16927. };
  16928. }
  16929. },
  16930. methods: {
  16931. closeHandler() {
  16932. if (this.closeOnClickOverlay) {
  16933. this.$emit("close");
  16934. }
  16935. },
  16936. // 点击取消按钮
  16937. cancel() {
  16938. this.$emit("close");
  16939. },
  16940. selectHandler(index2) {
  16941. const item = this.actions[index2];
  16942. if (item && !item.disabled && !item.loading) {
  16943. this.$emit("select", item);
  16944. if (this.closeOnClickAction) {
  16945. this.$emit("close");
  16946. }
  16947. }
  16948. }
  16949. }
  16950. };
  16951. function _sfc_render$19(_ctx, _cache, $props, $setup, $data, $options) {
  16952. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  16953. const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_1$b);
  16954. const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$e);
  16955. const _component_u_gap = resolveEasycom(vue.resolveDynamicComponent("u-gap"), __easycom_3$2);
  16956. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_7);
  16957. return vue.openBlock(), vue.createBlock(_component_u_popup, {
  16958. show: _ctx.show,
  16959. mode: "bottom",
  16960. onClose: $options.closeHandler,
  16961. safeAreaInsetBottom: _ctx.safeAreaInsetBottom,
  16962. round: _ctx.round
  16963. }, {
  16964. default: vue.withCtx(() => [
  16965. vue.createElementVNode("view", { class: "u-action-sheet" }, [
  16966. _ctx.title ? (vue.openBlock(), vue.createElementBlock("view", {
  16967. key: 0,
  16968. class: "u-action-sheet__header"
  16969. }, [
  16970. vue.createElementVNode(
  16971. "text",
  16972. { class: "u-action-sheet__header__title u-line-1" },
  16973. vue.toDisplayString(_ctx.title),
  16974. 1
  16975. /* TEXT */
  16976. ),
  16977. vue.createElementVNode("view", {
  16978. class: "u-action-sheet__header__icon-wrap",
  16979. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.cancel && $options.cancel(...args), ["stop"]))
  16980. }, [
  16981. vue.createVNode(_component_u_icon, {
  16982. name: "close",
  16983. size: "17",
  16984. color: "#c8c9cc",
  16985. bold: ""
  16986. })
  16987. ])
  16988. ])) : vue.createCommentVNode("v-if", true),
  16989. _ctx.description ? (vue.openBlock(), vue.createElementBlock(
  16990. "text",
  16991. {
  16992. key: 1,
  16993. class: "u-action-sheet__description",
  16994. style: vue.normalizeStyle([{
  16995. marginTop: `${_ctx.title && _ctx.description ? 0 : "18px"}`
  16996. }])
  16997. },
  16998. vue.toDisplayString(_ctx.description),
  16999. 5
  17000. /* TEXT, STYLE */
  17001. )) : vue.createCommentVNode("v-if", true),
  17002. vue.renderSlot(_ctx.$slots, "default", {}, () => [
  17003. _ctx.description ? (vue.openBlock(), vue.createBlock(_component_u_line, { key: 0 })) : vue.createCommentVNode("v-if", true),
  17004. vue.createElementVNode("view", { class: "u-action-sheet__item-wrap" }, [
  17005. (vue.openBlock(true), vue.createElementBlock(
  17006. vue.Fragment,
  17007. null,
  17008. vue.renderList(_ctx.actions, (item, index2) => {
  17009. return vue.openBlock(), vue.createElementBlock("view", { key: index2 }, [
  17010. vue.createElementVNode("view", {
  17011. class: "u-action-sheet__item-wrap__item",
  17012. onClick: vue.withModifiers(($event) => $options.selectHandler(index2), ["stop"]),
  17013. "hover-class": !item.disabled && !item.loading ? "u-action-sheet--hover" : "",
  17014. "hover-stay-time": 150
  17015. }, [
  17016. !item.loading ? (vue.openBlock(), vue.createElementBlock(
  17017. vue.Fragment,
  17018. { key: 0 },
  17019. [
  17020. vue.createElementVNode(
  17021. "text",
  17022. {
  17023. class: "u-action-sheet__item-wrap__item__name",
  17024. style: vue.normalizeStyle([$options.itemStyle(index2)])
  17025. },
  17026. vue.toDisplayString(item.name),
  17027. 5
  17028. /* TEXT, STYLE */
  17029. ),
  17030. item.subname ? (vue.openBlock(), vue.createElementBlock(
  17031. "text",
  17032. {
  17033. key: 0,
  17034. class: "u-action-sheet__item-wrap__item__subname"
  17035. },
  17036. vue.toDisplayString(item.subname),
  17037. 1
  17038. /* TEXT */
  17039. )) : vue.createCommentVNode("v-if", true)
  17040. ],
  17041. 64
  17042. /* STABLE_FRAGMENT */
  17043. )) : (vue.openBlock(), vue.createBlock(_component_u_loading_icon, {
  17044. key: 1,
  17045. "custom-class": "van-action-sheet__loading",
  17046. size: "18",
  17047. mode: "circle"
  17048. }))
  17049. ], 8, ["onClick", "hover-class"]),
  17050. index2 !== _ctx.actions.length - 1 ? (vue.openBlock(), vue.createBlock(_component_u_line, { key: 0 })) : vue.createCommentVNode("v-if", true)
  17051. ]);
  17052. }),
  17053. 128
  17054. /* KEYED_FRAGMENT */
  17055. ))
  17056. ])
  17057. ], true),
  17058. _ctx.cancelText ? (vue.openBlock(), vue.createBlock(_component_u_gap, {
  17059. key: 2,
  17060. bgColor: "#eaeaec",
  17061. height: "6"
  17062. })) : vue.createCommentVNode("v-if", true),
  17063. vue.createElementVNode("view", { "hover-class": "u-action-sheet--hover" }, [
  17064. _ctx.cancelText ? (vue.openBlock(), vue.createElementBlock(
  17065. "text",
  17066. {
  17067. key: 0,
  17068. onTouchmove: _cache[1] || (_cache[1] = vue.withModifiers(() => {
  17069. }, ["stop", "prevent"])),
  17070. "hover-stay-time": 150,
  17071. class: "u-action-sheet__cancel-text",
  17072. onClick: _cache[2] || (_cache[2] = (...args) => $options.cancel && $options.cancel(...args))
  17073. },
  17074. vue.toDisplayString(_ctx.cancelText),
  17075. 33
  17076. /* TEXT, NEED_HYDRATION */
  17077. )) : vue.createCommentVNode("v-if", true)
  17078. ])
  17079. ])
  17080. ]),
  17081. _: 3
  17082. /* FORWARDED */
  17083. }, 8, ["show", "onClose", "safeAreaInsetBottom", "round"]);
  17084. }
  17085. const __easycom_4$2 = /* @__PURE__ */ _export_sfc(_sfc_main$1a, [["render", _sfc_render$19], ["__scopeId", "data-v-69669810"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-action-sheet/u-action-sheet.vue"]]);
  17086. const _sfc_main$19 = {
  17087. __name: "SmsModal",
  17088. props: {
  17089. "modelValue": { type: Boolean },
  17090. "modelModifiers": {}
  17091. },
  17092. emits: /* @__PURE__ */ vue.mergeModels(["success"], ["update:modelValue"]),
  17093. setup(__props, { expose: __expose, emit: __emit }) {
  17094. const { proxy } = vue.getCurrentInstance();
  17095. const emit2 = __emit;
  17096. const visible = vue.useModel(__props, "modelValue");
  17097. const formRef = vue.ref();
  17098. const smsRecords = vue.ref([]);
  17099. const form = vue.reactive({
  17100. orderId: null,
  17101. type: "",
  17102. remark: ""
  17103. });
  17104. const smsContentList = vue.ref([]);
  17105. const handleChangeType = (val) => {
  17106. const selectedItem = smsContentList.value.find((item) => item.type === val);
  17107. if (selectedItem) {
  17108. form.remark = selectedItem.smsContent;
  17109. }
  17110. };
  17111. const rules2 = vue.reactive({
  17112. type: [
  17113. {
  17114. required: true,
  17115. message: "请选择短信类型",
  17116. trigger: "change"
  17117. }
  17118. ],
  17119. remark: [
  17120. {
  17121. required: true,
  17122. message: "请输入短信预览",
  17123. trigger: "blur"
  17124. }
  17125. ]
  17126. });
  17127. const handleCancel = () => {
  17128. visible.value = false;
  17129. resetForm();
  17130. };
  17131. const resetForm = () => {
  17132. var _a;
  17133. form.orderId = null;
  17134. form.type = "";
  17135. form.remark = "";
  17136. smsRecords.value = [];
  17137. smsContentList.value = [];
  17138. (_a = formRef.value) == null ? void 0 : _a.resetFields();
  17139. };
  17140. const handleOpen = (orderId) => {
  17141. resetForm();
  17142. if (orderId) {
  17143. formatAppLog("log", "at pages/index/detail/components/SmsModal.vue:152", "打开短信弹窗,订单ID:", orderId);
  17144. visible.value = true;
  17145. getSmsLogInfo(orderId);
  17146. }
  17147. };
  17148. const getSmsLogInfo = (orderId) => {
  17149. uni.$u.http.get(`/app/orderinfo/orderSmsLog/${orderId}`).then((res) => {
  17150. if (res.code === 200) {
  17151. let data = res.data || {};
  17152. form.orderId = data.orderId;
  17153. smsRecords.value = data.smsLogList || [];
  17154. smsContentList.value = data.smsContentList || [];
  17155. } else {
  17156. uni.$u.toast(res.msg || "获取短信记录失败");
  17157. }
  17158. }).catch((err) => {
  17159. formatAppLog("error", "at pages/index/detail/components/SmsModal.vue:170", "获取短信记录失败:", err);
  17160. uni.$u.toast("获取短信记录失败");
  17161. });
  17162. };
  17163. const handleSubmit = () => {
  17164. var _a;
  17165. (_a = formRef.value) == null ? void 0 : _a.validate().then((valid) => {
  17166. if (!valid)
  17167. return;
  17168. uni.$u.http.post("/app/orderinfo/orderSmsLogSend", {
  17169. orderId: form.orderId,
  17170. type: form.type
  17171. }).then((res) => {
  17172. if (res.code == 200) {
  17173. uni.$u.toast("短信发送成功");
  17174. emit2("success");
  17175. handleCancel();
  17176. } else {
  17177. uni.$u.toast(res.msg || "短信发送失败");
  17178. }
  17179. }).catch((err) => {
  17180. formatAppLog("error", "at pages/index/detail/components/SmsModal.vue:192", "短信发送失败:", err);
  17181. uni.$u.toast("短信发送失败");
  17182. });
  17183. }).catch((err) => {
  17184. formatAppLog("log", "at pages/index/detail/components/SmsModal.vue:196", "表单验证失败:", err);
  17185. });
  17186. };
  17187. __expose({
  17188. handleOpen
  17189. });
  17190. const __returned__ = { proxy, emit: emit2, visible, formRef, smsRecords, form, smsContentList, handleChangeType, rules: rules2, handleCancel, resetForm, handleOpen, getSmsLogInfo, handleSubmit, ref: vue.ref, reactive: vue.reactive, nextTick: vue.nextTick, getCurrentInstance: vue.getCurrentInstance };
  17191. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  17192. return __returned__;
  17193. }
  17194. };
  17195. function _sfc_render$18(_ctx, _cache, $props, $setup, $data, $options) {
  17196. const _component_u_radio = resolveEasycom(vue.resolveDynamicComponent("u-radio"), __easycom_0$9);
  17197. const _component_u_radio_group = resolveEasycom(vue.resolveDynamicComponent("u-radio-group"), __easycom_1$4);
  17198. const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_1$a);
  17199. const _component_u_textarea = resolveEasycom(vue.resolveDynamicComponent("u-textarea"), __easycom_3$3);
  17200. const _component_u_form = resolveEasycom(vue.resolveDynamicComponent("u-form"), __easycom_2$5);
  17201. const _component_u_modal = resolveEasycom(vue.resolveDynamicComponent("u-modal"), __easycom_1$3);
  17202. return vue.openBlock(), vue.createBlock(_component_u_modal, {
  17203. show: $setup.visible,
  17204. title: "推送短信",
  17205. "show-cancel-button": true,
  17206. showCancelButton: true,
  17207. "show-confirm-button": true,
  17208. showConfirmButton: true,
  17209. confirmText: "确定",
  17210. cancelText: "关闭",
  17211. onConfirm: $setup.handleSubmit,
  17212. onCancel: $setup.handleCancel,
  17213. onClose: $setup.handleCancel,
  17214. width: "650rpx"
  17215. }, {
  17216. default: vue.withCtx(() => [
  17217. vue.createElementVNode("view", { class: "modal-content" }, [
  17218. vue.createVNode(_component_u_form, {
  17219. ref: "formRef",
  17220. model: $setup.form,
  17221. rules: $setup.rules,
  17222. labelWidth: "120",
  17223. labelPosition: "top"
  17224. }, {
  17225. default: vue.withCtx(() => [
  17226. vue.createVNode(_component_u_form_item, {
  17227. label: "短信类型",
  17228. prop: "type",
  17229. required: ""
  17230. }, {
  17231. default: vue.withCtx(() => [
  17232. vue.createVNode(_component_u_radio_group, {
  17233. modelValue: $setup.form.type,
  17234. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.form.type = $event),
  17235. placement: "column",
  17236. onChange: $setup.handleChangeType
  17237. }, {
  17238. default: vue.withCtx(() => [
  17239. (vue.openBlock(true), vue.createElementBlock(
  17240. vue.Fragment,
  17241. null,
  17242. vue.renderList($setup.smsContentList, (item) => {
  17243. return vue.openBlock(), vue.createBlock(_component_u_radio, {
  17244. key: item.type,
  17245. name: item.type,
  17246. label: item.typeName
  17247. }, null, 8, ["name", "label"]);
  17248. }),
  17249. 128
  17250. /* KEYED_FRAGMENT */
  17251. ))
  17252. ]),
  17253. _: 1
  17254. /* STABLE */
  17255. }, 8, ["modelValue"])
  17256. ]),
  17257. _: 1
  17258. /* STABLE */
  17259. }),
  17260. vue.createVNode(_component_u_form_item, {
  17261. label: "短信预览",
  17262. prop: "remark",
  17263. required: ""
  17264. }, {
  17265. default: vue.withCtx(() => [
  17266. vue.createVNode(_component_u_textarea, {
  17267. modelValue: $setup.form.remark,
  17268. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.form.remark = $event),
  17269. placeholder: "请输入短信预览",
  17270. disabled: true,
  17271. rows: 4,
  17272. count: ""
  17273. }, null, 8, ["modelValue"])
  17274. ]),
  17275. _: 1
  17276. /* STABLE */
  17277. }),
  17278. vue.createVNode(_component_u_form_item, { label: "推送历史" }, {
  17279. default: vue.withCtx(() => [
  17280. vue.createElementVNode("view", { class: "sms-history" }, [
  17281. $setup.smsRecords.length === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  17282. key: 0,
  17283. class: "no-data"
  17284. }, [
  17285. vue.createElementVNode("text", null, "暂无推送记录")
  17286. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  17287. key: 1,
  17288. class: "history-list"
  17289. }, [
  17290. (vue.openBlock(true), vue.createElementBlock(
  17291. vue.Fragment,
  17292. null,
  17293. vue.renderList($setup.smsRecords, (record, index2) => {
  17294. return vue.openBlock(), vue.createElementBlock("view", {
  17295. key: record.id || index2,
  17296. class: "history-item"
  17297. }, [
  17298. vue.createElementVNode("view", { class: "history-header" }, [
  17299. vue.createElementVNode(
  17300. "text",
  17301. { class: "sender" },
  17302. vue.toDisplayString(record.createName),
  17303. 1
  17304. /* TEXT */
  17305. ),
  17306. vue.createElementVNode(
  17307. "text",
  17308. { class: "time" },
  17309. vue.toDisplayString(record.createTime),
  17310. 1
  17311. /* TEXT */
  17312. ),
  17313. vue.createElementVNode(
  17314. "text",
  17315. {
  17316. class: vue.normalizeClass(["status", record.status == 1 ? "success" : "fail"])
  17317. },
  17318. vue.toDisplayString(record.status == 1 ? "成功" : "失败"),
  17319. 3
  17320. /* TEXT, CLASS */
  17321. )
  17322. ]),
  17323. vue.createElementVNode("view", { class: "history-content" }, [
  17324. vue.createElementVNode(
  17325. "text",
  17326. null,
  17327. vue.toDisplayString(record.smsContent),
  17328. 1
  17329. /* TEXT */
  17330. )
  17331. ])
  17332. ]);
  17333. }),
  17334. 128
  17335. /* KEYED_FRAGMENT */
  17336. ))
  17337. ]))
  17338. ])
  17339. ]),
  17340. _: 1
  17341. /* STABLE */
  17342. })
  17343. ]),
  17344. _: 1
  17345. /* STABLE */
  17346. }, 8, ["model", "rules"])
  17347. ])
  17348. ]),
  17349. _: 1
  17350. /* STABLE */
  17351. }, 8, ["show"]);
  17352. }
  17353. const SmsModal = /* @__PURE__ */ _export_sfc(_sfc_main$19, [["render", _sfc_render$18], ["__scopeId", "data-v-3cc29a87"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/index/detail/components/SmsModal.vue"]]);
  17354. const _sfc_main$18 = {
  17355. __name: "OrderInfo",
  17356. props: {
  17357. orderId: String,
  17358. estimatedAmount: Number,
  17359. userNote: String,
  17360. detail: Object
  17361. // Add more props as needed
  17362. },
  17363. emits: ["refresh"],
  17364. setup(__props, { expose: __expose, emit: __emit }) {
  17365. __expose();
  17366. const props2 = __props;
  17367. let finalExpressList = { 1: "顺丰快递", 2: "京东快递", 3: "德邦快递" };
  17368. let finalExpressText = vue.computed(() => {
  17369. return props2.detail.finalExpress ? finalExpressList[props2.detail.finalExpress] : "";
  17370. });
  17371. function playGlobalSound() {
  17372. uni.$u.playClickSound();
  17373. }
  17374. const statusEnum = {
  17375. 0: "创建",
  17376. 1: "用户删除",
  17377. 2: "下单(待初审)",
  17378. 3: "初审(待取书)",
  17379. 4: "初审未通过",
  17380. 5: "快递取书(待签收)",
  17381. 6: "快递签收(待收货)",
  17382. 7: "物流签收(路由异常)",
  17383. 8: "仓库收货(待审核)",
  17384. 9: "审核中(审核未提交)",
  17385. 10: "已审核(待付款)",
  17386. 11: "已完成"
  17387. };
  17388. let statusText = vue.computed(() => {
  17389. return statusEnum[props2.detail.status] || "未知状态";
  17390. });
  17391. const maskedSendMobile = vue.computed(() => {
  17392. if (props2.detail.sendMobile && props2.detail.sendMobile.length === 11) {
  17393. return props2.detail.sendMobile.replace(/(\d{3})\d{4}(\d{4})/, "$1****$2");
  17394. }
  17395. return props2.detail.sendMobile;
  17396. });
  17397. function copyToClipboard(text) {
  17398. uni.setClipboardData({
  17399. data: text,
  17400. success: function() {
  17401. uni.showToast({
  17402. title: "复制成功",
  17403. icon: "success"
  17404. });
  17405. },
  17406. fail: function(err) {
  17407. formatAppLog("error", "at pages/index/detail/components/OrderInfo.vue:148", "Could not copy text: ", err);
  17408. }
  17409. });
  17410. }
  17411. const showModal = vue.ref(false);
  17412. const internalRemark = vue.ref("");
  17413. function fillRemark(text) {
  17414. internalRemark.value = text;
  17415. }
  17416. const remarkInfo = vue.ref({});
  17417. function handleRemark() {
  17418. var _a;
  17419. showModal.value = true;
  17420. remarkInfo.value = ((_a = props2.detail.manageRemark) == null ? void 0 : _a[0]) || {};
  17421. internalRemark.value = remarkInfo.value.remark || "";
  17422. }
  17423. function handleCancel() {
  17424. showModal.value = false;
  17425. playGlobalSound();
  17426. }
  17427. const emit2 = __emit;
  17428. function confirmRemark() {
  17429. playGlobalSound();
  17430. uni.$u.http.post("/app/orderinfo/setManageRemark", {
  17431. orderId: props2.detail.orderId,
  17432. remark: internalRemark.value,
  17433. id: remarkInfo.value.id
  17434. }).then((res) => {
  17435. if (res.code == 200) {
  17436. uni.$u.toast("保存成功");
  17437. uni.$u.ttsModule.speak("保存成功");
  17438. showModal.value = false;
  17439. emit2("refresh");
  17440. } else {
  17441. uni.$u.toast(res.msg);
  17442. }
  17443. });
  17444. }
  17445. const showActionSheet = vue.ref(false);
  17446. const actionSheetActions = vue.ref([
  17447. {
  17448. name: "发送短信(手机发送)",
  17449. value: "sms"
  17450. },
  17451. {
  17452. name: "一键发送短信(服务器发送)",
  17453. value: "server_sms"
  17454. },
  17455. {
  17456. name: "QQ",
  17457. value: "qq"
  17458. },
  17459. {
  17460. name: "微信",
  17461. value: "wechat"
  17462. },
  17463. {
  17464. name: "取消",
  17465. value: "cancel"
  17466. }
  17467. ]);
  17468. function handleWeixin() {
  17469. playGlobalSound();
  17470. showActionSheet.value = true;
  17471. }
  17472. function closeActionSheet() {
  17473. showActionSheet.value = false;
  17474. }
  17475. function selectAction(item) {
  17476. playGlobalSound();
  17477. showActionSheet.value = false;
  17478. if (item.value === "server_sms") {
  17479. handleSendSMS();
  17480. } else if (item.value == "cancel") {
  17481. closeActionSheet();
  17482. } else {
  17483. uni.showToast({
  17484. title: "此功能暂无开放",
  17485. icon: "none"
  17486. });
  17487. }
  17488. }
  17489. const showSmsModal = vue.ref(false);
  17490. const smsModalRef = vue.ref();
  17491. function handleSendSMS() {
  17492. playGlobalSound();
  17493. if (smsModalRef.value && props2.detail.orderId) {
  17494. smsModalRef.value.handleOpen(props2.detail.orderId);
  17495. } else {
  17496. uni.showToast({
  17497. title: "订单信息异常",
  17498. icon: "none"
  17499. });
  17500. }
  17501. }
  17502. function handleSmsSuccess() {
  17503. uni.showToast({
  17504. title: "短信发送成功",
  17505. icon: "success"
  17506. });
  17507. uni.$u.ttsModule.speak("短信发送成功");
  17508. }
  17509. const __returned__ = { props: props2, get finalExpressList() {
  17510. return finalExpressList;
  17511. }, set finalExpressList(v) {
  17512. finalExpressList = v;
  17513. }, get finalExpressText() {
  17514. return finalExpressText;
  17515. }, set finalExpressText(v) {
  17516. finalExpressText = v;
  17517. }, playGlobalSound, statusEnum, get statusText() {
  17518. return statusText;
  17519. }, set statusText(v) {
  17520. statusText = v;
  17521. }, maskedSendMobile, copyToClipboard, showModal, internalRemark, fillRemark, remarkInfo, handleRemark, handleCancel, emit: emit2, confirmRemark, showActionSheet, actionSheetActions, handleWeixin, closeActionSheet, selectAction, showSmsModal, smsModalRef, handleSendSMS, handleSmsSuccess, computed: vue.computed, ref: vue.ref, watch: vue.watch, SmsModal };
  17522. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  17523. return __returned__;
  17524. }
  17525. };
  17526. function _sfc_render$17(_ctx, _cache, $props, $setup, $data, $options) {
  17527. var _a, _b, _c, _d;
  17528. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  17529. const _component_u_textarea = resolveEasycom(vue.resolveDynamicComponent("u-textarea"), __easycom_3$3);
  17530. const _component_u_tag = resolveEasycom(vue.resolveDynamicComponent("u-tag"), __easycom_2$2);
  17531. const _component_u_modal = resolveEasycom(vue.resolveDynamicComponent("u-modal"), __easycom_1$3);
  17532. const _component_u_action_sheet = resolveEasycom(vue.resolveDynamicComponent("u-action-sheet"), __easycom_4$2);
  17533. return vue.openBlock(), vue.createElementBlock("view", null, [
  17534. vue.createElementVNode("view", { class: "order-info bg-white" }, [
  17535. vue.createElementVNode("view", { class: "info-item flex" }, [
  17536. vue.createElementVNode("text", { class: "label" }, "订单编号"),
  17537. vue.createElementVNode(
  17538. "text",
  17539. {
  17540. style: { "color": "#22ac38" },
  17541. class: "flex-1 text-center content",
  17542. onClick: _cache[0] || (_cache[0] = ($event) => $setup.copyToClipboard($props.detail.orderId))
  17543. },
  17544. vue.toDisplayString($props.detail.orderId),
  17545. 1
  17546. /* TEXT */
  17547. )
  17548. ]),
  17549. vue.createElementVNode("view", { class: "info-item" }, [
  17550. vue.createElementVNode("text", { class: "label" }, "预估金额"),
  17551. vue.createElementVNode(
  17552. "text",
  17553. { class: "content" },
  17554. vue.toDisplayString($props.detail.expectMoney),
  17555. 1
  17556. /* TEXT */
  17557. ),
  17558. vue.createElementVNode("text", { class: "label border-left" }, "审核金额"),
  17559. vue.createElementVNode(
  17560. "text",
  17561. { class: "content" },
  17562. vue.toDisplayString($props.detail.finalMoney),
  17563. 1
  17564. /* TEXT */
  17565. )
  17566. ]),
  17567. vue.createElementVNode("view", { class: "info-item" }, [
  17568. vue.createElementVNode("text", { class: "label" }, "用户备注"),
  17569. vue.createElementVNode(
  17570. "text",
  17571. { class: "content" },
  17572. vue.toDisplayString($props.detail.userRemark),
  17573. 1
  17574. /* TEXT */
  17575. )
  17576. ]),
  17577. vue.createElementVNode("view", {
  17578. class: "info-item",
  17579. onClick: $setup.handleRemark
  17580. }, [
  17581. vue.createElementVNode("text", { class: "label" }, "内部备注"),
  17582. vue.createElementVNode(
  17583. "text",
  17584. { class: "content" },
  17585. vue.toDisplayString(((_a = $props.detail) == null ? void 0 : _a.manageRemark) ? ((_b = $props.detail) == null ? void 0 : _b.manageRemark.length) > 0 ? (_d = (_c = $props.detail) == null ? void 0 : _c.manageRemark[0]) == null ? void 0 : _d.remark : " " : " "),
  17586. 1
  17587. /* TEXT */
  17588. )
  17589. ]),
  17590. vue.createElementVNode("view", { class: "info-item" }, [
  17591. vue.createElementVNode("text", { class: "label" }, "订单状态"),
  17592. vue.createElementVNode(
  17593. "text",
  17594. {
  17595. class: "content",
  17596. style: { "color": "#c5493e" }
  17597. },
  17598. "[" + vue.toDisplayString($setup.statusText) + "]",
  17599. 1
  17600. /* TEXT */
  17601. )
  17602. ]),
  17603. vue.createElementVNode("view", { class: "info-item" }, [
  17604. vue.createElementVNode("text", { class: "label" }, "快递"),
  17605. vue.createElementVNode("text", { class: "content" }, [
  17606. vue.createTextVNode(
  17607. vue.toDisplayString($setup.finalExpressText),
  17608. 1
  17609. /* TEXT */
  17610. ),
  17611. vue.createElementVNode(
  17612. "text",
  17613. {
  17614. style: { "color": "#409eef" },
  17615. onClick: _cache[1] || (_cache[1] = ($event) => $setup.copyToClipboard($props.detail.waybillCode))
  17616. },
  17617. "(单号:" + vue.toDisplayString($props.detail.waybillCode) + ")",
  17618. 1
  17619. /* TEXT */
  17620. )
  17621. ])
  17622. ]),
  17623. vue.createElementVNode("view", { class: "info-item" }, [
  17624. vue.createElementVNode("text", { class: "label" }, [
  17625. vue.createTextVNode("发件人"),
  17626. vue.createElementVNode("text", { style: { "color": "#e99d42" } }, "(所有单)")
  17627. ]),
  17628. vue.createElementVNode("view", { class: "content flex flex-a-c flex-j-c" }, [
  17629. vue.createElementVNode("text", {
  17630. class: "content-text",
  17631. onClick: _cache[2] || (_cache[2] = ($event) => $setup.copyToClipboard($props.detail.sendMobile))
  17632. }, "复制"),
  17633. vue.createElementVNode(
  17634. "text",
  17635. { class: "content-text ml-10 mr-10" },
  17636. vue.toDisplayString($setup.maskedSendMobile),
  17637. 1
  17638. /* TEXT */
  17639. ),
  17640. $props.detail.orderFrom == 1 ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  17641. key: 0,
  17642. name: "weixin-circle-fill",
  17643. size: "18",
  17644. color: "#22ac38",
  17645. onClick: $setup.handleWeixin
  17646. })) : vue.createCommentVNode("v-if", true),
  17647. $props.detail.orderFrom == 2 ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  17648. key: 1,
  17649. name: "zhifubao-circle-fill",
  17650. size: "18",
  17651. color: "#999",
  17652. onClick: $setup.handleWeixin
  17653. })) : vue.createCommentVNode("v-if", true)
  17654. ])
  17655. ]),
  17656. vue.createElementVNode("view", { class: "info-item" }, [
  17657. vue.createElementVNode("text", { class: "label" }, "发货地址"),
  17658. vue.createElementVNode(
  17659. "text",
  17660. { class: "content" },
  17661. vue.toDisplayString($props.detail.sendAddress),
  17662. 1
  17663. /* TEXT */
  17664. )
  17665. ]),
  17666. vue.createElementVNode("view", { class: "info-item" }, [
  17667. vue.createElementVNode("text", { class: "label" }, "收货仓库"),
  17668. vue.createElementVNode(
  17669. "text",
  17670. { class: "content" },
  17671. vue.toDisplayString($props.detail.recipientAddress) + "-" + vue.toDisplayString($props.detail.recipientGodown) + "-" + vue.toDisplayString($props.detail.recipientName),
  17672. 1
  17673. /* TEXT */
  17674. )
  17675. ])
  17676. ]),
  17677. vue.createVNode(_component_u_modal, {
  17678. show: $setup.showModal,
  17679. title: "编辑内部备注",
  17680. showCancelButton: true,
  17681. onConfirm: $setup.confirmRemark,
  17682. onCancel: $setup.handleCancel
  17683. }, {
  17684. default: vue.withCtx(() => [
  17685. vue.createElementVNode("view", {
  17686. class: "modal-content w100",
  17687. onClick: $setup.playGlobalSound
  17688. }, [
  17689. vue.createVNode(_component_u_textarea, {
  17690. modelValue: $setup.internalRemark,
  17691. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.internalRemark = $event),
  17692. placeholder: "编辑内部备注",
  17693. autoHeight: "",
  17694. style: { "min-height": "100px" }
  17695. }, null, 8, ["modelValue"]),
  17696. vue.createElementVNode("view", { class: "mt-20 common-title" }, "快速填入"),
  17697. vue.createElementVNode("view", { class: "quick-fill mt-16" }, [
  17698. vue.createVNode(_component_u_tag, {
  17699. class: "mr-10 mb-10",
  17700. onClick: _cache[4] || (_cache[4] = ($event) => $setup.fillRemark("少书给客服")),
  17701. text: "少书给客服"
  17702. }),
  17703. vue.createVNode(_component_u_tag, {
  17704. class: "mr-10 mb-10",
  17705. onClick: _cache[5] || (_cache[5] = ($event) => $setup.fillRemark("多书给客服")),
  17706. text: "多书给客服"
  17707. }),
  17708. vue.createVNode(_component_u_tag, {
  17709. class: "mr-10 mb-10",
  17710. onClick: _cache[6] || (_cache[6] = ($event) => $setup.fillRemark("子母件")),
  17711. text: "子母件"
  17712. }),
  17713. vue.createVNode(_component_u_tag, {
  17714. class: "mr-10 mb-10",
  17715. onClick: _cache[7] || (_cache[7] = ($event) => $setup.fillRemark("书单不符给客服")),
  17716. text: "书单不符给客服"
  17717. }),
  17718. vue.createVNode(_component_u_tag, {
  17719. class: "mr-10 mb-10",
  17720. onClick: _cache[8] || (_cache[8] = ($event) => $setup.fillRemark("需理赔给客服")),
  17721. text: "需理赔给客服"
  17722. })
  17723. ])
  17724. ])
  17725. ]),
  17726. _: 1
  17727. /* STABLE */
  17728. }, 8, ["show"]),
  17729. vue.createVNode(_component_u_action_sheet, {
  17730. show: $setup.showActionSheet,
  17731. "show-cancel": true,
  17732. actions: $setup.actionSheetActions,
  17733. title: "发送短信",
  17734. onClose: $setup.closeActionSheet,
  17735. onSelect: $setup.selectAction
  17736. }, null, 8, ["show", "actions"]),
  17737. vue.createCommentVNode(" 短信推送弹窗 "),
  17738. vue.createVNode($setup["SmsModal"], {
  17739. ref: "smsModalRef",
  17740. modelValue: $setup.showSmsModal,
  17741. "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => $setup.showSmsModal = $event),
  17742. onSuccess: $setup.handleSmsSuccess
  17743. }, null, 8, ["modelValue"])
  17744. ]);
  17745. }
  17746. const OrderInfo = /* @__PURE__ */ _export_sfc(_sfc_main$18, [["render", _sfc_render$17], ["__scopeId", "data-v-034ad4bc"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/index/detail/components/OrderInfo.vue"]]);
  17747. const _sfc_main$17 = {
  17748. __name: "UserInfoCard",
  17749. props: {
  17750. detail: {
  17751. type: Object,
  17752. default: () => ({})
  17753. }
  17754. },
  17755. setup(__props, { expose: __expose }) {
  17756. __expose();
  17757. const props2 = __props;
  17758. const handleUserOrders = () => {
  17759. uni.navigateTo({
  17760. url: `/pages/index/detail/user-orders?userId=${props2.detail.userId}`
  17761. });
  17762. };
  17763. const formattedName = vue.computed(() => {
  17764. var _a, _b;
  17765. return ((_b = (_a = props2.detail) == null ? void 0 : _a.userNick) == null ? void 0 : _b.charAt(0)) + "**";
  17766. });
  17767. const statusClass = vue.computed(() => {
  17768. return props2.detail.userStatus == 1 ? "color-green" : "color-red";
  17769. });
  17770. const blacklistAction = vue.computed(() => {
  17771. return props2.detail.userStatus == 1 ? "加入黑名单" : "移除黑名单";
  17772. });
  17773. const showModal = vue.ref(false);
  17774. const showBlacklistModal = vue.ref(false);
  17775. const reason = vue.ref("");
  17776. const toggleBlacklist = () => {
  17777. showBlacklistModal.value = true;
  17778. };
  17779. const confirmBlacklist = () => {
  17780. let apiStr = props2.detail.userStatus == 1 ? "/app/appUser/setUserBlack" : "app/appUser/removeUserBlack";
  17781. uni.$u.http.post(apiStr, {
  17782. userId: props2.detail.userId,
  17783. reason: reason.value
  17784. }).then((res) => {
  17785. if (res.code == 200) {
  17786. uni.$u.toast("操作成功");
  17787. showBlacklistModal.value = false;
  17788. props2.detail.userStatus = props2.detail.userStatus == 1 ? 2 : 1;
  17789. } else {
  17790. uni.$u.toast(res.msg);
  17791. }
  17792. });
  17793. };
  17794. const __returned__ = { props: props2, handleUserOrders, formattedName, statusClass, blacklistAction, showModal, showBlacklistModal, reason, toggleBlacklist, confirmBlacklist, ref: vue.ref, computed: vue.computed };
  17795. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  17796. return __returned__;
  17797. }
  17798. };
  17799. function _sfc_render$16(_ctx, _cache, $props, $setup, $data, $options) {
  17800. const _component_u_avatar = resolveEasycom(vue.resolveDynamicComponent("u-avatar"), __easycom_0$d);
  17801. const _component_u_modal = resolveEasycom(vue.resolveDynamicComponent("u-modal"), __easycom_1$3);
  17802. return vue.openBlock(), vue.createElementBlock("view", { class: "user-info-card bg-white mt-16" }, [
  17803. vue.createElementVNode("view", { class: "header" }, [
  17804. vue.createElementVNode(
  17805. "text",
  17806. { style: { "color": "#666" } },
  17807. vue.toDisplayString($props.detail.orderTime),
  17808. 1
  17809. /* TEXT */
  17810. ),
  17811. vue.createElementVNode("text", {
  17812. onClick: _cache[0] || (_cache[0] = ($event) => $setup.showModal = true),
  17813. class: "color-green"
  17814. }, "[查看订单日志]")
  17815. ]),
  17816. vue.createElementVNode("view", { class: "content flex flex-j-b" }, [
  17817. vue.createVNode(_component_u_avatar, {
  17818. src: $props.detail.imgPath,
  17819. class: "user-image"
  17820. }, null, 8, ["src"]),
  17821. vue.createElementVNode("view", { class: "flex flex-a-e flex-1 ml-12" }, [
  17822. vue.createElementVNode("view", { class: "flex flex-d flex-1" }, [
  17823. vue.createElementVNode("text", {
  17824. class: "color-green",
  17825. onClick: $setup.handleUserOrders
  17826. }, [
  17827. vue.createTextVNode(
  17828. vue.toDisplayString($setup.formattedName),
  17829. 1
  17830. /* TEXT */
  17831. ),
  17832. vue.createElementVNode("text", { style: { "color": "#e99d42" } }, "(所有单)")
  17833. ]),
  17834. vue.createElementVNode(
  17835. "text",
  17836. {
  17837. class: "common-text",
  17838. style: { "margin-top": "10rpx" }
  17839. },
  17840. "共卖出" + vue.toDisplayString($props.detail.totalNum) + "本书",
  17841. 1
  17842. /* TEXT */
  17843. ),
  17844. vue.createElementVNode(
  17845. "text",
  17846. { class: "common-text" },
  17847. "来自" + vue.toDisplayString($props.detail.sendSsq),
  17848. 1
  17849. /* TEXT */
  17850. ),
  17851. vue.createElementVNode("text", {
  17852. class: "common-text",
  17853. style: { "margin-top": "10rpx" }
  17854. }, [
  17855. vue.createTextVNode("用户状态: "),
  17856. vue.createElementVNode(
  17857. "text",
  17858. {
  17859. class: vue.normalizeClass($setup.statusClass)
  17860. },
  17861. vue.toDisplayString($props.detail.userStatus == 1 ? "正常" : $props.detail.userStatus == 2 ? "黑名单" : "-"),
  17862. 3
  17863. /* TEXT, CLASS */
  17864. )
  17865. ])
  17866. ]),
  17867. vue.createElementVNode(
  17868. "text",
  17869. {
  17870. style: { "min-width": "160rpx" },
  17871. onClick: $setup.toggleBlacklist,
  17872. class: "color-red"
  17873. },
  17874. "[" + vue.toDisplayString($setup.blacklistAction) + "]",
  17875. 1
  17876. /* TEXT */
  17877. )
  17878. ])
  17879. ]),
  17880. vue.createVNode(_component_u_modal, {
  17881. show: $setup.showModal,
  17882. "onUpdate:show": _cache[1] || (_cache[1] = ($event) => $setup.showModal = $event),
  17883. title: "订单日志",
  17884. showCancelButton: false,
  17885. confirmText: "关闭",
  17886. onConfirm: _cache[2] || (_cache[2] = ($event) => $setup.showModal = false),
  17887. class: "log-modal"
  17888. }, {
  17889. default: vue.withCtx(() => [
  17890. vue.createElementVNode("view", { class: "log-container" }, [
  17891. vue.createElementVNode("view", { class: "log-header" }, [
  17892. vue.createElementVNode("text", null, "描述"),
  17893. vue.createElementVNode("text", null, "操作人"),
  17894. vue.createElementVNode("text", null, "时间")
  17895. ]),
  17896. (vue.openBlock(true), vue.createElementBlock(
  17897. vue.Fragment,
  17898. null,
  17899. vue.renderList($props.detail.logVoList, (log, index2) => {
  17900. return vue.openBlock(), vue.createElementBlock("view", {
  17901. class: "log-item",
  17902. key: index2
  17903. }, [
  17904. vue.createElementVNode(
  17905. "text",
  17906. { class: "log-item-content" },
  17907. vue.toDisplayString(log.statusName),
  17908. 1
  17909. /* TEXT */
  17910. ),
  17911. vue.createElementVNode(
  17912. "text",
  17913. { class: "log-item-name" },
  17914. vue.toDisplayString(log.createName),
  17915. 1
  17916. /* TEXT */
  17917. ),
  17918. vue.createElementVNode(
  17919. "text",
  17920. { class: "log-item-time" },
  17921. vue.toDisplayString(log.createTime),
  17922. 1
  17923. /* TEXT */
  17924. )
  17925. ]);
  17926. }),
  17927. 128
  17928. /* KEYED_FRAGMENT */
  17929. ))
  17930. ])
  17931. ]),
  17932. _: 1
  17933. /* STABLE */
  17934. }, 8, ["show"]),
  17935. vue.createVNode(_component_u_modal, {
  17936. show: $setup.showBlacklistModal,
  17937. "onUpdate:show": _cache[4] || (_cache[4] = ($event) => $setup.showBlacklistModal = $event),
  17938. title: "拉黑用户",
  17939. showCancelButton: true,
  17940. confirmText: "提交",
  17941. cancelText: "取消",
  17942. onConfirm: $setup.confirmBlacklist,
  17943. onCancel: _cache[5] || (_cache[5] = ($event) => $setup.showBlacklistModal = false)
  17944. }, {
  17945. default: vue.withCtx(() => [
  17946. vue.withDirectives(vue.createElementVNode(
  17947. "textarea",
  17948. {
  17949. class: "reason-textarea",
  17950. placeholder: "请输入拉黑原因...",
  17951. autoHeight: "",
  17952. "bg-color": "#f8f8f8",
  17953. "border-radius": "10rpx",
  17954. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.reason = $event),
  17955. height: "100px"
  17956. },
  17957. null,
  17958. 512
  17959. /* NEED_PATCH */
  17960. ), [
  17961. [vue.vModelText, $setup.reason]
  17962. ])
  17963. ]),
  17964. _: 1
  17965. /* STABLE */
  17966. }, 8, ["show"])
  17967. ]);
  17968. }
  17969. const UserInfoCard = /* @__PURE__ */ _export_sfc(_sfc_main$17, [["render", _sfc_render$16], ["__scopeId", "data-v-42a1a738"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/index/detail/components/UserInfoCard.vue"]]);
  17970. const _sfc_main$16 = {
  17971. __name: "LogisticsTimeline",
  17972. props: {
  17973. list: {
  17974. type: Array,
  17975. default: []
  17976. }
  17977. },
  17978. setup(__props, { expose: __expose }) {
  17979. __expose();
  17980. const props2 = __props;
  17981. const __returned__ = { props: props2 };
  17982. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  17983. return __returned__;
  17984. }
  17985. };
  17986. function _sfc_render$15(_ctx, _cache, $props, $setup, $data, $options) {
  17987. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  17988. return vue.openBlock(), vue.createElementBlock("view", {
  17989. "scroll-y": "",
  17990. class: "timeline-container"
  17991. }, [
  17992. (vue.openBlock(true), vue.createElementBlock(
  17993. vue.Fragment,
  17994. null,
  17995. vue.renderList($props.list, (item, index2) => {
  17996. return vue.openBlock(), vue.createElementBlock("view", {
  17997. key: index2,
  17998. class: "timeline-item"
  17999. }, [
  18000. vue.createElementVNode("view", { class: "timeline-icon" }, [
  18001. vue.createVNode(_component_u_icon, {
  18002. name: "map-fill",
  18003. color: "#19be6b",
  18004. size: "16"
  18005. })
  18006. ]),
  18007. vue.createElementVNode("view", { class: "timeline-content" }, [
  18008. vue.createElementVNode(
  18009. "text",
  18010. { class: "title" },
  18011. vue.toDisplayString(item.title),
  18012. 1
  18013. /* TEXT */
  18014. ),
  18015. vue.createElementVNode(
  18016. "text",
  18017. { class: "desc" },
  18018. vue.toDisplayString(item.description),
  18019. 1
  18020. /* TEXT */
  18021. ),
  18022. vue.createElementVNode(
  18023. "text",
  18024. { class: "time" },
  18025. vue.toDisplayString(item.time),
  18026. 1
  18027. /* TEXT */
  18028. )
  18029. ]),
  18030. index2 < $props.list.length - 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  18031. key: 0,
  18032. class: "timeline-line"
  18033. })) : vue.createCommentVNode("v-if", true)
  18034. ]);
  18035. }),
  18036. 128
  18037. /* KEYED_FRAGMENT */
  18038. ))
  18039. ]);
  18040. }
  18041. const LogisticsTimeline = /* @__PURE__ */ _export_sfc(_sfc_main$16, [["render", _sfc_render$15], ["__scopeId", "data-v-140e9488"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/index/express/components/LogisticsTimeline.vue"]]);
  18042. const _sfc_main$15 = {
  18043. __name: "BookItem",
  18044. props: {
  18045. item: Object,
  18046. showClose: {
  18047. type: Boolean,
  18048. default: false
  18049. }
  18050. },
  18051. setup(__props, { expose: __expose }) {
  18052. __expose();
  18053. const props2 = __props;
  18054. const goodNum = vue.computed(() => {
  18055. var _a;
  18056. return ((_a = props2.item.auditCommentList) == null ? void 0 : _a.filter((v) => v.sts == 1).length) || 0;
  18057. });
  18058. const badNum = vue.computed(() => {
  18059. var _a;
  18060. return ((_a = props2.item.auditCommentList) == null ? void 0 : _a.filter((v) => v.sts == 3).length) || 0;
  18061. });
  18062. const reasons = vue.computed(() => {
  18063. let list = props2.item.auditCommentList;
  18064. if (!list)
  18065. return "";
  18066. if (list.length > 0) {
  18067. let poorList = list.filter((v) => v.sts == 3);
  18068. if (poorList.length == 0)
  18069. return "";
  18070. return poorList.map((v) => v.com).join(";");
  18071. }
  18072. });
  18073. const __returned__ = { props: props2, goodNum, badNum, reasons, computed: vue.computed };
  18074. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  18075. return __returned__;
  18076. }
  18077. };
  18078. function _sfc_render$14(_ctx, _cache, $props, $setup, $data, $options) {
  18079. return vue.openBlock(), vue.createElementBlock("view", { class: "card" }, [
  18080. vue.createElementVNode("view", { class: "flex w100" }, [
  18081. vue.createElementVNode("view", { class: "flex-d" }, [
  18082. vue.createElementVNode("image", {
  18083. style: { "width": "70px", "height": "90px" },
  18084. src: $props.item.cover,
  18085. mode: "aspectFill"
  18086. }, null, 8, ["src"]),
  18087. !$props.showClose ? (vue.openBlock(), vue.createElementBlock(
  18088. "view",
  18089. {
  18090. key: 0,
  18091. class: "quantity mt-24"
  18092. },
  18093. "数量: " + vue.toDisplayString($props.item.num),
  18094. 1
  18095. /* TEXT */
  18096. )) : vue.createCommentVNode("v-if", true)
  18097. ]),
  18098. vue.createElementVNode("view", { class: "book-info ml-20 flex-1" }, [
  18099. vue.createElementVNode(
  18100. "view",
  18101. { class: "common-title mb-20" },
  18102. vue.toDisplayString($props.item.bookName),
  18103. 1
  18104. /* TEXT */
  18105. ),
  18106. vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
  18107. vue.createElementVNode(
  18108. "view",
  18109. { class: "isbn" },
  18110. "ISBN: " + vue.toDisplayString($props.item.isbn),
  18111. 1
  18112. /* TEXT */
  18113. ),
  18114. vue.createElementVNode(
  18115. "view",
  18116. { class: "set" },
  18117. "套装: " + vue.toDisplayString($props.item.suit == 1 ? "是" : "不是"),
  18118. 1
  18119. /* TEXT */
  18120. )
  18121. ]),
  18122. vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
  18123. vue.createElementVNode(
  18124. "view",
  18125. { class: "price" },
  18126. "定价: " + vue.toDisplayString($props.item.bookPrice),
  18127. 1
  18128. /* TEXT */
  18129. ),
  18130. vue.createElementVNode(
  18131. "view",
  18132. { class: "estimate" },
  18133. "预估单价: " + vue.toDisplayString(($props.item.recycleDiscount * $props.item.bookPrice * 0.1).toFixed(2)),
  18134. 1
  18135. /* TEXT */
  18136. )
  18137. ]),
  18138. vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
  18139. vue.createElementVNode(
  18140. "view",
  18141. { class: "discount" },
  18142. "回收折扣: " + vue.toDisplayString($props.item.recycleDiscount),
  18143. 1
  18144. /* TEXT */
  18145. ),
  18146. vue.createElementVNode("view", { class: "review" }, [
  18147. vue.createTextVNode("审核金额: "),
  18148. vue.createElementVNode(
  18149. "text",
  18150. { class: "color-red" },
  18151. vue.toDisplayString($props.item.finalMoney || 0),
  18152. 1
  18153. /* TEXT */
  18154. )
  18155. ])
  18156. ]),
  18157. vue.createElementVNode("view", { class: "quality mb-10" }, [
  18158. vue.createTextVNode(
  18159. " 品相: 良好(" + vue.toDisplayString($setup.goodNum) + ") 、 一般(" + vue.toDisplayString($props.item.averageNum || 0) + ") 、 ",
  18160. 1
  18161. /* TEXT */
  18162. ),
  18163. vue.createElementVNode(
  18164. "text",
  18165. {
  18166. class: vue.normalizeClass($props.item.badNum > 0 ? "color-red" : "")
  18167. },
  18168. "极差(" + vue.toDisplayString($setup.badNum) + ")",
  18169. 3
  18170. /* TEXT, CLASS */
  18171. )
  18172. ]),
  18173. $setup.reasons ? (vue.openBlock(), vue.createElementBlock(
  18174. "view",
  18175. {
  18176. key: 0,
  18177. class: "color-red"
  18178. },
  18179. "原因:" + vue.toDisplayString($setup.reasons),
  18180. 1
  18181. /* TEXT */
  18182. )) : vue.createCommentVNode("v-if", true)
  18183. ])
  18184. ])
  18185. ]);
  18186. }
  18187. const BookItem$2 = /* @__PURE__ */ _export_sfc(_sfc_main$15, [["render", _sfc_render$14], ["__scopeId", "data-v-a629889e"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/index/detail/components/BookItem.vue"]]);
  18188. const pinyin = {
  18189. "a": "啊阿锕",
  18190. "ai": "埃挨哎唉哀皑癌蔼矮艾碍爱隘诶捱嗳嗌嫒瑷暧砹锿霭",
  18191. "an": "鞍氨安俺按暗岸胺案谙埯揞犴庵桉铵鹌顸黯",
  18192. "ang": "肮昂盎",
  18193. "ao": "凹敖熬翱袄傲奥懊澳坳拗嗷噢岙廒遨媪骜聱螯鏊鳌鏖",
  18194. "ba": "芭捌扒叭吧笆八疤巴拔跋靶把耙坝霸罢爸茇菝萆捭岜灞杷钯粑鲅魃",
  18195. "bai": "白柏百摆佰败拜稗薜掰鞴",
  18196. "ban": "斑班搬扳般颁板版扮拌伴瓣半办绊阪坂豳钣瘢癍舨",
  18197. "bang": "邦帮梆榜膀绑棒磅蚌镑傍谤蒡螃",
  18198. "bao": "苞胞包褒雹保堡饱宝抱报暴豹鲍爆勹葆宀孢煲鸨褓趵龅",
  18199. "bo": "剥薄玻菠播拨钵波博勃搏铂箔伯帛舶脖膊渤泊驳亳蕃啵饽檗擘礴钹鹁簸跛",
  18200. "bei": "杯碑悲卑北辈背贝钡倍狈备惫焙被孛陂邶埤蓓呗怫悖碚鹎褙鐾",
  18201. "ben": "奔苯本笨畚坌锛",
  18202. "beng": "崩绷甭泵蹦迸唪嘣甏",
  18203. "bi": "逼鼻比鄙笔彼碧蓖蔽毕毙毖币庇痹闭敝弊必辟壁臂避陛匕仳俾芘荜荸吡哔狴庳愎滗濞弼妣婢嬖璧贲畀铋秕裨筚箅篦舭襞跸髀",
  18204. "bian": "鞭边编贬扁便变卞辨辩辫遍匾弁苄忭汴缏煸砭碥稹窆蝙笾鳊",
  18205. "biao": "标彪膘表婊骠飑飙飚灬镖镳瘭裱鳔",
  18206. "bie": "鳖憋别瘪蹩鳘",
  18207. "bin": "彬斌濒滨宾摈傧浜缤玢殡膑镔髌鬓",
  18208. "bing": "兵冰柄丙秉饼炳病并禀邴摒绠枋槟燹",
  18209. "bu": "捕卜哺补埠不布步簿部怖拊卟逋瓿晡钚醭",
  18210. "ca": "擦嚓礤",
  18211. "cai": "猜裁材才财睬踩采彩菜蔡",
  18212. "can": "餐参蚕残惭惨灿骖璨粲黪",
  18213. "cang": "苍舱仓沧藏伧",
  18214. "cao": "操糙槽曹草艹嘈漕螬艚",
  18215. "ce": "厕策侧册测刂帻恻",
  18216. "ceng": "层蹭噌",
  18217. "cha": "插叉茬茶查碴搽察岔差诧猹馇汊姹杈楂槎檫钗锸镲衩",
  18218. "chai": "拆柴豺侪茈瘥虿龇",
  18219. "chan": "搀掺蝉馋谗缠铲产阐颤冁谄谶蒇廛忏潺澶孱羼婵嬗骣觇禅镡裣蟾躔",
  18220. "chang": "昌猖场尝常长偿肠厂敞畅唱倡伥鬯苌菖徜怅惝阊娼嫦昶氅鲳",
  18221. "chao": "超抄钞朝嘲潮巢吵炒怊绉晁耖",
  18222. "che": "车扯撤掣彻澈坼屮砗",
  18223. "chen": "郴臣辰尘晨忱沉陈趁衬称谌抻嗔宸琛榇肜胂碜龀",
  18224. "cheng": "撑城橙成呈乘程惩澄诚承逞骋秤埕嵊徵浈枨柽樘晟塍瞠铖裎蛏酲",
  18225. "chi": "吃痴持匙池迟弛驰耻齿侈尺赤翅斥炽傺墀芪茌搋叱哧啻嗤彳饬沲媸敕胝眙眵鸱瘛褫蚩螭笞篪豉踅踟魑",
  18226. "chong": "充冲虫崇宠茺忡憧铳艟",
  18227. "chou": "抽酬畴踌稠愁筹仇绸瞅丑俦圳帱惆溴妯瘳雠鲋",
  18228. "chu": "臭初出橱厨躇锄雏滁除楚础储矗搐触处亍刍憷绌杵楮樗蜍蹰黜",
  18229. "chuan": "揣川穿椽传船喘串掾舛惴遄巛氚钏镩舡",
  18230. "chuang": "疮窗幢床闯创怆",
  18231. "chui": "吹炊捶锤垂陲棰槌",
  18232. "chun": "春椿醇唇淳纯蠢促莼沌肫朐鹑蝽",
  18233. "chuo": "戳绰蔟辶辍镞踔龊",
  18234. "ci": "疵茨磁雌辞慈瓷词此刺赐次荠呲嵯鹚螅糍趑",
  18235. "cong": "聪葱囱匆从丛偬苁淙骢琮璁枞",
  18236. "cu": "凑粗醋簇猝殂蹙",
  18237. "cuan": "蹿篡窜汆撺昕爨",
  18238. "cui": "摧崔催脆瘁粹淬翠萃悴璀榱隹",
  18239. "cun": "村存寸磋忖皴",
  18240. "cuo": "撮搓措挫错厝脞锉矬痤鹾蹉躜",
  18241. "da": "搭达答瘩打大耷哒嗒怛妲疸褡笪靼鞑",
  18242. "dai": "呆歹傣戴带殆代贷袋待逮怠埭甙呔岱迨逯骀绐玳黛",
  18243. "dan": "耽担丹单郸掸胆旦氮但惮淡诞弹蛋亻儋卩萏啖澹檐殚赕眈瘅聃箪",
  18244. "dang": "当挡党荡档谠凼菪宕砀铛裆",
  18245. "dao": "刀捣蹈倒岛祷导到稻悼道盗叨啁忉洮氘焘忑纛",
  18246. "de": "德得的锝",
  18247. "deng": "蹬灯登等瞪凳邓噔嶝戥磴镫簦",
  18248. "di": "堤低滴迪敌笛狄涤翟嫡抵底地蒂第帝弟递缔氐籴诋谛邸坻莜荻嘀娣柢棣觌砥碲睇镝羝骶",
  18249. "dian": "颠掂滇碘点典靛垫电佃甸店惦奠淀殿丶阽坫埝巅玷癜癫簟踮",
  18250. "diao": "碉叼雕凋刁掉吊钓调轺铞蜩粜貂",
  18251. "die": "跌爹碟蝶迭谍叠佚垤堞揲喋渫轶牒瓞褶耋蹀鲽鳎",
  18252. "ding": "丁盯叮钉顶鼎锭定订丢仃啶玎腚碇町铤疔耵酊",
  18253. "dong": "东冬董懂动栋侗恫冻洞垌咚岽峒夂氡胨胴硐鸫",
  18254. "dou": "兜抖斗陡豆逗痘蔸钭窦窬蚪篼酡",
  18255. "du": "都督毒犊独读堵睹赌杜镀肚度渡妒芏嘟渎椟橐牍蠹笃髑黩",
  18256. "duan": "端短锻段断缎彖椴煅簖",
  18257. "dui": "堆兑队对怼憝碓",
  18258. "dun": "墩吨蹲敦顿囤钝盾遁炖砘礅盹镦趸",
  18259. "duo": "掇哆多夺垛躲朵跺舵剁惰堕咄哚缍柁铎裰踱",
  18260. "e": "蛾峨鹅俄额讹娥恶厄扼遏鄂饿噩谔垩垭苊莪萼呃愕屙婀轭曷腭硪锇锷鹗颚鳄",
  18261. "en": "恩蒽摁唔嗯",
  18262. "er": "而儿耳尔饵洱二贰迩珥铒鸸鲕",
  18263. "fa": "发罚筏伐乏阀法珐垡砝",
  18264. "fan": "藩帆番翻樊矾钒繁凡烦反返范贩犯饭泛蘩幡犭梵攵燔畈蹯",
  18265. "fang": "坊芳方肪房防妨仿访纺放匚邡彷钫舫鲂",
  18266. "fei": "菲非啡飞肥匪诽吠肺废沸费芾狒悱淝妃绋绯榧腓斐扉祓砩镄痱蜚篚翡霏鲱",
  18267. "fen": "芬酚吩氛分纷坟焚汾粉奋份忿愤粪偾瀵棼愍鲼鼢",
  18268. "feng": "丰封枫蜂峰锋风疯烽逢冯缝讽奉凤俸酆葑沣砜",
  18269. "fu": "佛否夫敷肤孵扶拂辐幅氟符伏俘服浮涪福袱弗甫抚辅俯釜斧脯腑府腐赴副覆赋复傅付阜父腹负富讣附妇缚咐匐凫郛芙苻茯莩菔呋幞滏艴孚驸绂桴赙黻黼罘稃馥虍蚨蜉蝠蝮麸趺跗鳆",
  18270. "ga": "噶嘎蛤尬呷尕尜旮钆",
  18271. "gai": "该改概钙盖溉丐陔垓戤赅胲",
  18272. "gan": "干甘杆柑竿肝赶感秆敢赣坩苷尴擀泔淦澉绀橄旰矸疳酐",
  18273. "gang": "冈刚钢缸肛纲岗港戆罡颃筻",
  18274. "gong": "杠工攻功恭龚供躬公宫弓巩汞拱贡共蕻廾咣珙肱蚣蛩觥",
  18275. "gao": "篙皋高膏羔糕搞镐稿告睾诰郜蒿藁缟槔槁杲锆",
  18276. "ge": "哥歌搁戈鸽胳疙割革葛格阁隔铬个各鬲仡哿塥嗝纥搿膈硌铪镉袼颌虼舸骼髂",
  18277. "gei": "给",
  18278. "gen": "根跟亘茛哏艮",
  18279. "geng": "耕更庚羹埂耿梗哽赓鲠",
  18280. "gou": "钩勾沟苟狗垢构购够佝诟岣遘媾缑觏彀鸲笱篝鞲",
  18281. "gu": "辜菇咕箍估沽孤姑鼓古蛊骨谷股故顾固雇嘏诂菰哌崮汩梏轱牯牿胍臌毂瞽罟钴锢瓠鸪鹄痼蛄酤觚鲴骰鹘",
  18282. "gua": "刮瓜剐寡挂褂卦诖呱栝鸹",
  18283. "guai": "乖拐怪哙",
  18284. "guan": "棺关官冠观管馆罐惯灌贯倌莞掼涫盥鹳鳏",
  18285. "guang": "光广逛犷桄胱疒",
  18286. "gui": "瑰规圭硅归龟闺轨鬼诡癸桂柜跪贵刽匦刿庋宄妫桧炅晷皈簋鲑鳜",
  18287. "gun": "辊滚棍丨衮绲磙鲧",
  18288. "guo": "锅郭国果裹过馘蠃埚掴呙囗帼崞猓椁虢锞聒蜮蜾蝈",
  18289. "ha": "哈",
  18290. "hai": "骸孩海氦亥害骇咴嗨颏醢",
  18291. "han": "酣憨邯韩含涵寒函喊罕翰撼捍旱憾悍焊汗汉邗菡撖阚瀚晗焓颔蚶鼾",
  18292. "hen": "夯痕很狠恨",
  18293. "hang": "杭航沆绗珩桁",
  18294. "hao": "壕嚎豪毫郝好耗号浩薅嗥嚆濠灏昊皓颢蚝",
  18295. "he": "呵喝荷菏核禾和何合盒貉阂河涸赫褐鹤贺诃劾壑藿嗑嗬阖盍蚵翮",
  18296. "hei": "嘿黑",
  18297. "heng": "哼亨横衡恒訇蘅",
  18298. "hong": "轰哄烘虹鸿洪宏弘红黉讧荭薨闳泓",
  18299. "hou": "喉侯猴吼厚候后堠後逅瘊篌糇鲎骺",
  18300. "hu": "呼乎忽瑚壶葫胡蝴狐糊湖弧虎唬护互沪户冱唿囫岵猢怙惚浒滹琥槲轷觳烀煳戽扈祜鹕鹱笏醐斛",
  18301. "hua": "花哗华猾滑画划化话劐浍骅桦铧稞",
  18302. "huai": "槐徊怀淮坏还踝",
  18303. "huan": "欢环桓缓换患唤痪豢焕涣宦幻郇奂垸擐圜洹浣漶寰逭缳锾鲩鬟",
  18304. "huang": "荒慌黄磺蝗簧皇凰惶煌晃幌恍谎隍徨湟潢遑璜肓癀蟥篁鳇",
  18305. "hui": "灰挥辉徽恢蛔回毁悔慧卉惠晦贿秽会烩汇讳诲绘诙茴荟蕙哕喙隳洄彗缋珲晖恚虺蟪麾",
  18306. "hun": "荤昏婚魂浑混诨馄阍溷缗",
  18307. "huo": "豁活伙火获或惑霍货祸攉嚯夥钬锪镬耠蠖",
  18308. "ji": "击圾基机畸稽积箕肌饥迹激讥鸡姬绩缉吉极棘辑籍集及急疾汲即嫉级挤几脊己蓟技冀季伎祭剂悸济寄寂计记既忌际妓继纪居丌乩剞佶佴脔墼芨芰萁蒺蕺掎叽咭哜唧岌嵴洎彐屐骥畿玑楫殛戟戢赍觊犄齑矶羁嵇稷瘠瘵虮笈笄暨跻跽霁鲚鲫髻麂",
  18309. "jia": "嘉枷夹佳家加荚颊贾甲钾假稼价架驾嫁伽郏拮岬浃迦珈戛胛恝铗镓痂蛱笳袈跏",
  18310. "jian": "歼监坚尖笺间煎兼肩艰奸缄茧检柬碱硷拣捡简俭剪减荐槛鉴践贱见键箭件健舰剑饯渐溅涧建僭谏谫菅蒹搛囝湔蹇謇缣枧柙楗戋戬牮犍毽腱睑锏鹣裥笕箴翦趼踺鲣鞯",
  18311. "jiang": "僵姜将浆江疆蒋桨奖讲匠酱降茳洚绛缰犟礓耩糨豇",
  18312. "jiao": "蕉椒礁焦胶交郊浇骄娇嚼搅铰矫侥脚狡角饺缴绞剿教酵轿较叫佼僬茭挢噍峤徼姣纟敫皎鹪蛟醮跤鲛",
  18313. "jie": "窖揭接皆秸街阶截劫节桔杰捷睫竭洁结解姐戒藉芥界借介疥诫届偈讦诘喈嗟獬婕孑桀獒碣锴疖袷颉蚧羯鲒骱髫",
  18314. "jin": "巾筋斤金今津襟紧锦仅谨进靳晋禁近烬浸尽卺荩堇噤馑廑妗缙瑾槿赆觐钅锓衿矜",
  18315. "jing": "劲荆兢茎睛晶鲸京惊精粳经井警景颈静境敬镜径痉靖竟竞净刭儆阱菁獍憬泾迳弪婧肼胫腈旌",
  18316. "jiong": "炯窘冂迥扃",
  18317. "jiu": "揪究纠玖韭久灸九酒厩救旧臼舅咎就疚僦啾阄柩桕鹫赳鬏",
  18318. "ju": "鞠拘狙疽驹菊局咀矩举沮聚拒据巨具距踞锯俱句惧炬剧倨讵苣苴莒掬遽屦琚枸椐榘榉橘犋飓钜锔窭裾趄醵踽龃雎鞫",
  18319. "juan": "捐鹃娟倦眷卷绢鄄狷涓桊蠲锩镌隽",
  18320. "jue": "撅攫抉掘倔爵觉决诀绝厥劂谲矍蕨噘崛獗孓珏桷橛爝镢蹶觖",
  18321. "jun": "均菌钧军君峻俊竣浚郡骏捃狻皲筠麇",
  18322. "ka": "喀咖卡佧咔胩",
  18323. "ke": "咯坷苛柯棵磕颗科壳咳可渴克刻客课岢恪溘骒缂珂轲氪瞌钶疴窠蝌髁",
  18324. "kai": "开揩楷凯慨剀垲蒈忾恺铠锎",
  18325. "kan": "刊堪勘坎砍看侃凵莰莶戡龛瞰",
  18326. "kang": "康慷糠扛抗亢炕坑伉闶钪",
  18327. "kao": "考拷烤靠尻栲犒铐",
  18328. "ken": "肯啃垦恳垠裉颀",
  18329. "keng": "吭忐铿",
  18330. "kong": "空恐孔控倥崆箜",
  18331. "kou": "抠口扣寇芤蔻叩眍筘",
  18332. "ku": "枯哭窟苦酷库裤刳堀喾绔骷",
  18333. "kua": "夸垮挎跨胯侉",
  18334. "kuai": "块筷侩快蒯郐蒉狯脍",
  18335. "kuan": "宽款髋",
  18336. "kuang": "匡筐狂框矿眶旷况诓诳邝圹夼哐纩贶",
  18337. "kui": "亏盔岿窥葵奎魁傀馈愧溃馗匮夔隗揆喹喟悝愦阕逵暌睽聩蝰篑臾跬",
  18338. "kun": "坤昆捆困悃阃琨锟醌鲲髡",
  18339. "kuo": "括扩廓阔蛞",
  18340. "la": "垃拉喇蜡腊辣啦剌摺邋旯砬瘌",
  18341. "lai": "莱来赖崃徕涞濑赉睐铼癞籁",
  18342. "lan": "蓝婪栏拦篮阑兰澜谰揽览懒缆烂滥啉岚懔漤榄斓罱镧褴",
  18343. "lang": "琅榔狼廊郎朗浪莨蒗啷阆锒稂螂",
  18344. "lao": "捞劳牢老佬姥酪烙涝唠崂栳铑铹痨醪",
  18345. "le": "勒乐肋仂叻嘞泐鳓",
  18346. "lei": "雷镭蕾磊累儡垒擂类泪羸诔荽咧漯嫘缧檑耒酹",
  18347. "ling": "棱冷拎玲菱零龄铃伶羚凌灵陵岭领另令酃塄苓呤囹泠绫柃棂瓴聆蛉翎鲮",
  18348. "leng": "楞愣",
  18349. "li": "厘梨犁黎篱狸离漓理李里鲤礼莉荔吏栗丽厉励砾历利傈例俐痢立粒沥隶力璃哩俪俚郦坜苈莅蓠藜捩呖唳喱猁溧澧逦娌嫠骊缡珞枥栎轹戾砺詈罹锂鹂疠疬蛎蜊蠡笠篥粝醴跞雳鲡鳢黧",
  18350. "lian": "俩联莲连镰廉怜涟帘敛脸链恋炼练挛蔹奁潋濂娈琏楝殓臁膦裢蠊鲢",
  18351. "liang": "粮凉梁粱良两辆量晾亮谅墚椋踉靓魉",
  18352. "liao": "撩聊僚疗燎寥辽潦了撂镣廖料蓼尥嘹獠寮缭钌鹩耢",
  18353. "lie": "列裂烈劣猎冽埒洌趔躐鬣",
  18354. "lin": "琳林磷霖临邻鳞淋凛赁吝蔺嶙廪遴檩辚瞵粼躏麟",
  18355. "liu": "溜琉榴硫馏留刘瘤流柳六抡偻蒌泖浏遛骝绺旒熘锍镏鹨鎏",
  18356. "long": "龙聋咙笼窿隆垄拢陇弄垅茏泷珑栊胧砻癃",
  18357. "lou": "楼娄搂篓漏陋喽嵝镂瘘耧蝼髅",
  18358. "lu": "芦卢颅庐炉掳卤虏鲁麓碌露路赂鹿潞禄录陆戮垆摅撸噜泸渌漉璐栌橹轳辂辘氇胪镥鸬鹭簏舻鲈",
  18359. "lv": "驴吕铝侣旅履屡缕虑氯律率滤绿捋闾榈膂稆褛",
  18360. "luan": "峦孪滦卵乱栾鸾銮",
  18361. "lue": "掠略锊",
  18362. "lun": "轮伦仑沦纶论囵",
  18363. "luo": "萝螺罗逻锣箩骡裸落洛骆络倮荦摞猡泺椤脶镙瘰雒",
  18364. "ma": "妈麻玛码蚂马骂嘛吗唛犸嬷杩麽",
  18365. "mai": "埋买麦卖迈脉劢荬咪霾",
  18366. "man": "瞒馒蛮满蔓曼慢漫谩墁幔缦熳镘颟螨鳗鞔",
  18367. "mang": "芒茫盲忙莽邙漭朦硭蟒",
  18368. "meng": "氓萌蒙檬盟锰猛梦孟勐甍瞢懵礞虻蜢蠓艋艨黾",
  18369. "miao": "猫苗描瞄藐秒渺庙妙喵邈缈缪杪淼眇鹋蜱",
  18370. "mao": "茅锚毛矛铆卯茂冒帽貌贸侔袤勖茆峁瑁昴牦耄旄懋瞀蛑蝥蟊髦",
  18371. "me": "么",
  18372. "mei": "玫枚梅酶霉煤没眉媒镁每美昧寐妹媚坶莓嵋猸浼湄楣镅鹛袂魅",
  18373. "men": "门闷们扪玟焖懑钔",
  18374. "mi": "眯醚靡糜迷谜弥米秘觅泌蜜密幂芈冖谧蘼嘧猕獯汨宓弭脒敉糸縻麋",
  18375. "mian": "棉眠绵冕免勉娩缅面沔湎腼眄",
  18376. "mie": "蔑灭咩蠛篾",
  18377. "min": "民抿皿敏悯闽苠岷闵泯珉",
  18378. "ming": "明螟鸣铭名命冥茗溟暝瞑酩",
  18379. "miu": "谬",
  18380. "mo": "摸摹蘑模膜磨摩魔抹末莫墨默沫漠寞陌谟茉蓦馍嫫镆秣瘼耱蟆貊貘",
  18381. "mou": "谋牟某厶哞婺眸鍪",
  18382. "mu": "拇牡亩姆母墓暮幕募慕木目睦牧穆仫苜呒沐毪钼",
  18383. "na": "拿哪呐钠那娜纳内捺肭镎衲箬",
  18384. "nai": "氖乃奶耐奈鼐艿萘柰",
  18385. "nan": "南男难囊喃囡楠腩蝻赧",
  18386. "nao": "挠脑恼闹孬垴猱瑙硇铙蛲",
  18387. "ne": "淖呢讷",
  18388. "nei": "馁",
  18389. "nen": "嫩能枘恁",
  18390. "ni": "妮霓倪泥尼拟你匿腻逆溺伲坭猊怩滠昵旎祢慝睨铌鲵",
  18391. "nian": "蔫拈年碾撵捻念廿辇黏鲇鲶",
  18392. "niang": "娘酿",
  18393. "niao": "鸟尿茑嬲脲袅",
  18394. "nie": "捏聂孽啮镊镍涅乜陧蘖嗫肀颞臬蹑",
  18395. "nin": "您柠",
  18396. "ning": "狞凝宁拧泞佞蓥咛甯聍",
  18397. "niu": "牛扭钮纽狃忸妞蚴",
  18398. "nong": "脓浓农侬",
  18399. "nu": "奴努怒呶帑弩胬孥驽",
  18400. "nv": "女恧钕衄",
  18401. "nuan": "暖",
  18402. "nuenue": "虐",
  18403. "nue": "疟谑",
  18404. "nuo": "挪懦糯诺傩搦喏锘",
  18405. "ou": "哦欧鸥殴藕呕偶沤怄瓯耦",
  18406. "pa": "啪趴爬帕怕琶葩筢",
  18407. "pai": "拍排牌徘湃派俳蒎",
  18408. "pan": "攀潘盘磐盼畔判叛爿泮袢襻蟠蹒",
  18409. "pang": "乓庞旁耪胖滂逄",
  18410. "pao": "抛咆刨炮袍跑泡匏狍庖脬疱",
  18411. "pei": "呸胚培裴赔陪配佩沛掊辔帔淠旆锫醅霈",
  18412. "pen": "喷盆湓",
  18413. "peng": "砰抨烹澎彭蓬棚硼篷膨朋鹏捧碰坯堋嘭怦蟛",
  18414. "pi": "砒霹批披劈琵毗啤脾疲皮匹痞僻屁譬丕陴邳郫圮鼙擗噼庀媲纰枇甓睥罴铍痦癖疋蚍貔",
  18415. "pian": "篇偏片骗谝骈犏胼褊翩蹁",
  18416. "piao": "飘漂瓢票剽嘌嫖缥殍瞟螵",
  18417. "pie": "撇瞥丿苤氕",
  18418. "pin": "拼频贫品聘拚姘嫔榀牝颦",
  18419. "ping": "乒坪苹萍平凭瓶评屏俜娉枰鲆",
  18420. "po": "坡泼颇婆破魄迫粕叵鄱溥珀钋钷皤笸",
  18421. "pou": "剖裒踣",
  18422. "pu": "扑铺仆莆葡菩蒲埔朴圃普浦谱曝瀑匍噗濮璞氆镤镨蹼",
  18423. "qi": "期欺栖戚妻七凄漆柒沏其棋奇歧畦崎脐齐旗祈祁骑起岂乞企启契砌器气迄弃汽泣讫亟亓圻芑萋葺嘁屺岐汔淇骐绮琪琦杞桤槭欹祺憩碛蛴蜞綦綮趿蹊鳍麒",
  18424. "qia": "掐恰洽葜",
  18425. "qian": "牵扦钎铅千迁签仟谦乾黔钱钳前潜遣浅谴堑嵌欠歉佥阡芊芡荨掮岍悭慊骞搴褰缱椠肷愆钤虔箝",
  18426. "qiang": "枪呛腔羌墙蔷强抢嫱樯戗炝锖锵镪襁蜣羟跫跄",
  18427. "qiao": "橇锹敲悄桥瞧乔侨巧鞘撬翘峭俏窍劁诮谯荞愀憔缲樵毳硗跷鞒",
  18428. "qie": "切茄且怯窃郄唼惬妾挈锲箧",
  18429. "qin": "钦侵亲秦琴勤芹擒禽寝沁芩蓁蕲揿吣嗪噙溱檎螓衾",
  18430. "qing": "青轻氢倾卿清擎晴氰情顷请庆倩苘圊檠磬蜻罄箐謦鲭黥",
  18431. "qiong": "琼穷邛茕穹筇銎",
  18432. "qiu": "秋丘邱球求囚酋泅俅氽巯艽犰湫逑遒楸赇鸠虬蚯蝤裘糗鳅鼽",
  18433. "qu": "趋区蛆曲躯屈驱渠取娶龋趣去诎劬蕖蘧岖衢阒璩觑氍祛磲癯蛐蠼麴瞿黢",
  18434. "quan": "圈颧权醛泉全痊拳犬券劝诠荃獾悛绻辁畎铨蜷筌鬈",
  18435. "que": "缺炔瘸却鹊榷确雀阙悫",
  18436. "qun": "裙群逡",
  18437. "ran": "然燃冉染苒髯",
  18438. "rang": "瓤壤攘嚷让禳穰",
  18439. "rao": "饶扰绕荛娆桡",
  18440. "ruo": "惹若弱",
  18441. "re": "热偌",
  18442. "ren": "壬仁人忍韧任认刃妊纫仞荏葚饪轫稔衽",
  18443. "reng": "扔仍",
  18444. "ri": "日",
  18445. "rong": "戎茸蓉荣融熔溶容绒冗嵘狨缛榕蝾",
  18446. "rou": "揉柔肉糅蹂鞣",
  18447. "ru": "茹蠕儒孺如辱乳汝入褥蓐薷嚅洳溽濡铷襦颥",
  18448. "ruan": "软阮朊",
  18449. "rui": "蕊瑞锐芮蕤睿蚋",
  18450. "run": "闰润",
  18451. "sa": "撒洒萨卅仨挲飒",
  18452. "sai": "腮鳃塞赛噻",
  18453. "san": "三叁伞散彡馓氵毵糁霰",
  18454. "sang": "桑嗓丧搡磉颡",
  18455. "sao": "搔骚扫嫂埽臊瘙鳋",
  18456. "se": "瑟色涩啬铩铯穑",
  18457. "sen": "森",
  18458. "seng": "僧",
  18459. "sha": "莎砂杀刹沙纱傻啥煞脎歃痧裟霎鲨",
  18460. "shai": "筛晒酾",
  18461. "shan": "珊苫杉山删煽衫闪陕擅赡膳善汕扇缮剡讪鄯埏芟潸姗骟膻钐疝蟮舢跚鳝",
  18462. "shang": "墒伤商赏晌上尚裳垧绱殇熵觞",
  18463. "shao": "梢捎稍烧芍勺韶少哨邵绍劭苕潲蛸笤筲艄",
  18464. "she": "奢赊蛇舌舍赦摄射慑涉社设厍佘猞畲麝",
  18465. "shen": "砷申呻伸身深娠绅神沈审婶甚肾慎渗诜谂吲哂渖椹矧蜃",
  18466. "sheng": "声生甥牲升绳省盛剩胜圣丞渑媵眚笙",
  18467. "shi": "师失狮施湿诗尸虱十石拾时什食蚀实识史矢使屎驶始式示士世柿事拭誓逝势是嗜噬适仕侍释饰氏市恃室视试谥埘莳蓍弑唑饣轼耆贳炻礻铈铊螫舐筮豕鲥鲺",
  18468. "shou": "收手首守寿授售受瘦兽扌狩绶艏",
  18469. "shu": "蔬枢梳殊抒输叔舒淑疏书赎孰熟薯暑曙署蜀黍鼠属术述树束戍竖墅庶数漱恕倏塾菽忄沭涑澍姝纾毹腧殳镯秫鹬",
  18470. "shua": "刷耍唰涮",
  18471. "shuai": "摔衰甩帅蟀",
  18472. "shuan": "栓拴闩",
  18473. "shuang": "霜双爽孀",
  18474. "shui": "谁水睡税",
  18475. "shun": "吮瞬顺舜恂",
  18476. "shuo": "说硕朔烁蒴搠嗍濯妁槊铄",
  18477. "si": "斯撕嘶思私司丝死肆寺嗣四伺似饲巳厮俟兕菥咝汜泗澌姒驷缌祀祠锶鸶耜蛳笥",
  18478. "song": "松耸怂颂送宋讼诵凇菘崧嵩忪悚淞竦",
  18479. "sou": "搜艘擞嗽叟嗖嗾馊溲飕瞍锼螋",
  18480. "su": "苏酥俗素速粟僳塑溯宿诉肃夙谡蔌嗉愫簌觫稣",
  18481. "suan": "酸蒜算",
  18482. "sui": "虽隋随绥髓碎岁穗遂隧祟蓑冫谇濉邃燧眭睢",
  18483. "sun": "孙损笋荪狲飧榫跣隼",
  18484. "suo": "梭唆缩琐索锁所唢嗦娑桫睃羧",
  18485. "ta": "塌他它她塔獭挞蹋踏闼溻遢榻沓",
  18486. "tai": "胎苔抬台泰酞太态汰邰薹肽炱钛跆鲐",
  18487. "tan": "坍摊贪瘫滩坛檀痰潭谭谈坦毯袒碳探叹炭郯蕈昙钽锬覃",
  18488. "tang": "汤塘搪堂棠膛唐糖傥饧溏瑭铴镗耥螗螳羰醣",
  18489. "thang": "倘躺淌",
  18490. "theng": "趟烫",
  18491. "tao": "掏涛滔绦萄桃逃淘陶讨套挑鼗啕韬饕",
  18492. "te": "特",
  18493. "teng": "藤腾疼誊滕",
  18494. "ti": "梯剔踢锑提题蹄啼体替嚏惕涕剃屉荑悌逖绨缇鹈裼醍",
  18495. "tian": "天添填田甜恬舔腆掭忝阗殄畋钿蚺",
  18496. "tiao": "条迢眺跳佻祧铫窕龆鲦",
  18497. "tie": "贴铁帖萜餮",
  18498. "ting": "厅听烃汀廷停亭庭挺艇莛葶婷梃蜓霆",
  18499. "tong": "通桐酮瞳同铜彤童桶捅筒统痛佟僮仝茼嗵恸潼砼",
  18500. "tou": "偷投头透亠",
  18501. "tu": "凸秃突图徒途涂屠土吐兔堍荼菟钍酴",
  18502. "tuan": "湍团疃",
  18503. "tui": "推颓腿蜕褪退忒煺",
  18504. "tun": "吞屯臀饨暾豚窀",
  18505. "tuo": "拖托脱鸵陀驮驼椭妥拓唾乇佗坨庹沱柝砣箨舄跎鼍",
  18506. "wa": "挖哇蛙洼娃瓦袜佤娲腽",
  18507. "wai": "歪外",
  18508. "wan": "豌弯湾玩顽丸烷完碗挽晚皖惋宛婉万腕剜芄苋菀纨绾琬脘畹蜿箢",
  18509. "wang": "汪王亡枉网往旺望忘妄罔尢惘辋魍",
  18510. "wei": "威巍微危韦违桅围唯惟为潍维苇萎委伟伪尾纬未蔚味畏胃喂魏位渭谓尉慰卫倭偎诿隈葳薇帏帷崴嵬猥猬闱沩洧涠逶娓玮韪軎炜煨熨痿艉鲔",
  18511. "wen": "瘟温蚊文闻纹吻稳紊问刎愠阌汶璺韫殁雯",
  18512. "weng": "嗡翁瓮蓊蕹",
  18513. "wo": "挝蜗涡窝我斡卧握沃莴幄渥杌肟龌",
  18514. "wu": "巫呜钨乌污诬屋无芜梧吾吴毋武五捂午舞伍侮坞戊雾晤物勿务悟误兀仵阢邬圬芴庑怃忤浯寤迕妩骛牾焐鹉鹜蜈鋈鼯",
  18515. "xi": "昔熙析西硒矽晰嘻吸锡牺稀息希悉膝夕惜熄烯溪汐犀檄袭席习媳喜铣洗系隙戏细僖兮隰郗茜葸蓰奚唏徙饩阋浠淅屣嬉玺樨曦觋欷熹禊禧钸皙穸蜥蟋舾羲粞翕醯鼷",
  18516. "xia": "瞎虾匣霞辖暇峡侠狭下厦夏吓掀葭嗄狎遐瑕硖瘕罅黠",
  18517. "xian": "锨先仙鲜纤咸贤衔舷闲涎弦嫌显险现献县腺馅羡宪陷限线冼藓岘猃暹娴氙祆鹇痫蚬筅籼酰跹",
  18518. "xiang": "相厢镶香箱襄湘乡翔祥详想响享项巷橡像向象芗葙饷庠骧缃蟓鲞飨",
  18519. "xiao": "萧硝霄削哮嚣销消宵淆晓小孝校肖啸笑效哓咻崤潇逍骁绡枭枵筱箫魈",
  18520. "xie": "楔些歇蝎鞋协挟携邪斜胁谐写械卸蟹懈泄泻谢屑偕亵勰燮薤撷廨瀣邂绁缬榭榍歙躞",
  18521. "xin": "薪芯锌欣辛新忻心信衅囟馨莘歆铽鑫",
  18522. "xing": "星腥猩惺兴刑型形邢行醒幸杏性姓陉荇荥擤悻硎",
  18523. "xiong": "兄凶胸匈汹雄熊芎",
  18524. "xiu": "休修羞朽嗅锈秀袖绣莠岫馐庥鸺貅髹",
  18525. "xu": "墟戌需虚嘘须徐许蓄酗叙旭序畜恤絮婿绪续讴诩圩蓿怵洫溆顼栩煦砉盱胥糈醑",
  18526. "xuan": "轩喧宣悬旋玄选癣眩绚儇谖萱揎馔泫洵渲漩璇楦暄炫煊碹铉镟痃",
  18527. "xue": "靴薛学穴雪血噱泶鳕",
  18528. "xun": "勋熏循旬询寻驯巡殉汛训讯逊迅巽埙荀薰峋徇浔曛窨醺鲟",
  18529. "ya": "压押鸦鸭呀丫芽牙蚜崖衙涯雅哑亚讶伢揠吖岈迓娅琊桠氩砑睚痖",
  18530. "yan": "焉咽阉烟淹盐严研蜒岩延言颜阎炎沿奄掩眼衍演艳堰燕厌砚雁唁彦焰宴谚验厣靥赝俨偃兖讠谳郾鄢芫菸崦恹闫阏洇湮滟妍嫣琰晏胭腌焱罨筵酽魇餍鼹",
  18531. "yang": "殃央鸯秧杨扬佯疡羊洋阳氧仰痒养样漾徉怏泱炀烊恙蛘鞅",
  18532. "yao": "邀腰妖瑶摇尧遥窑谣姚咬舀药要耀夭爻吆崾徭瀹幺珧杳曜肴鹞窈繇鳐",
  18533. "ye": "椰噎耶爷野冶也页掖业叶曳腋夜液谒邺揶馀晔烨铘",
  18534. "yi": "一壹医揖铱依伊衣颐夷遗移仪胰疑沂宜姨彝椅蚁倚已乙矣以艺抑易邑屹亿役臆逸肄疫亦裔意毅忆义益溢诣议谊译异翼翌绎刈劓佾诒圪圯埸懿苡薏弈奕挹弋呓咦咿噫峄嶷猗饴怿怡悒漪迤驿缢殪贻旖熠钇镒镱痍瘗癔翊衤蜴舣羿翳酏黟",
  18535. "yin": "茵荫因殷音阴姻吟银淫寅饮尹引隐印胤鄞堙茚喑狺夤氤铟瘾蚓霪龈",
  18536. "ying": "英樱婴鹰应缨莹萤营荧蝇迎赢盈影颖硬映嬴郢茔莺萦撄嘤膺滢潆瀛瑛璎楹鹦瘿颍罂",
  18537. "yo": "哟唷",
  18538. "yong": "拥佣臃痈庸雍踊蛹咏泳涌永恿勇用俑壅墉慵邕镛甬鳙饔",
  18539. "you": "幽优悠忧尤由邮铀犹油游酉有友右佑釉诱又幼卣攸侑莸呦囿宥柚猷牖铕疣蝣鱿黝鼬",
  18540. "yu": "迂淤于盂榆虞愚舆余俞逾鱼愉渝渔隅予娱雨与屿禹宇语羽玉域芋郁吁遇喻峪御愈欲狱育誉浴寓裕预豫驭禺毓伛俣谀谕萸蓣揄喁圄圉嵛狳饫庾阈妪妤纡瑜昱觎腴欤於煜燠聿钰鹆瘐瘀窳蝓竽舁雩龉",
  18541. "yuan": "鸳渊冤元垣袁原援辕园员圆猿源缘远苑愿怨院塬沅媛瑗橼爰眢鸢螈鼋",
  18542. "yue": "曰约越跃钥岳粤月悦阅龠樾刖钺",
  18543. "yun": "耘云郧匀陨允运蕴酝晕韵孕郓芸狁恽纭殒昀氲",
  18544. "za": "匝砸杂拶咂",
  18545. "zai": "栽哉灾宰载再在咱崽甾",
  18546. "zan": "攒暂赞瓒昝簪糌趱錾",
  18547. "zang": "赃脏葬奘戕臧",
  18548. "zao": "遭糟凿藻枣早澡蚤躁噪造皂灶燥唣缫",
  18549. "ze": "责择则泽仄赜啧迮昃笮箦舴",
  18550. "zei": "贼",
  18551. "zen": "怎谮",
  18552. "zeng": "增憎曾赠缯甑罾锃",
  18553. "zha": "扎喳渣札轧铡闸眨栅榨咋乍炸诈揸吒咤哳怍砟痄蚱齄",
  18554. "zhai": "摘斋宅窄债寨砦",
  18555. "zhan": "瞻毡詹粘沾盏斩辗崭展蘸栈占战站湛绽谵搌旃",
  18556. "zhang": "樟章彰漳张掌涨杖丈帐账仗胀瘴障仉鄣幛嶂獐嫜璋蟑",
  18557. "zhao": "招昭找沼赵照罩兆肇召爪诏棹钊笊",
  18558. "zhe": "遮折哲蛰辙者锗蔗这浙谪陬柘辄磔鹧褚蜇赭",
  18559. "zhen": "珍斟真甄砧臻贞针侦枕疹诊震振镇阵缜桢榛轸赈胗朕祯畛鸩",
  18560. "zheng": "蒸挣睁征狰争怔整拯正政帧症郑证诤峥钲铮筝",
  18561. "zhi": "芝枝支吱蜘知肢脂汁之织职直植殖执值侄址指止趾只旨纸志挚掷至致置帜峙制智秩稚质炙痔滞治窒卮陟郅埴芷摭帙忮彘咫骘栉枳栀桎轵轾攴贽膣祉祗黹雉鸷痣蛭絷酯跖踬踯豸觯",
  18562. "zhong": "中盅忠钟衷终种肿重仲众冢锺螽舂舯踵",
  18563. "zhou": "舟周州洲诌粥轴肘帚咒皱宙昼骤啄着倜诹荮鬻纣胄碡籀舳酎鲷",
  18564. "zhu": "珠株蛛朱猪诸诛逐竹烛煮拄瞩嘱主著柱助蛀贮铸筑住注祝驻伫侏邾苎茱洙渚潴驺杼槠橥炷铢疰瘃蚰竺箸翥躅麈",
  18565. "zhua": "抓",
  18566. "zhuai": "拽",
  18567. "zhuan": "专砖转撰赚篆抟啭颛",
  18568. "zhuang": "桩庄装妆撞壮状丬",
  18569. "zhui": "椎锥追赘坠缀萑骓缒",
  18570. "zhun": "谆准",
  18571. "zhuo": "捉拙卓桌琢茁酌灼浊倬诼廴蕞擢啜浞涿杓焯禚斫",
  18572. "zi": "兹咨资姿滋淄孜紫仔籽滓子自渍字谘嵫姊孳缁梓辎赀恣眦锱秭耔笫粢觜訾鲻髭",
  18573. "zong": "鬃棕踪宗综总纵腙粽",
  18574. "zou": "邹走奏揍鄹鲰",
  18575. "zu": "租足卒族祖诅阻组俎菹啐徂驵蹴",
  18576. "zuan": "钻纂攥缵",
  18577. "zui": "嘴醉最罪",
  18578. "zun": "尊遵撙樽鳟",
  18579. "zuo": "昨左佐柞做作坐座阝阼胙祚酢",
  18580. "cou": "薮楱辏腠",
  18581. "nang": "攮哝囔馕曩",
  18582. "o": "喔",
  18583. "dia": "嗲",
  18584. "chuai": "嘬膪踹",
  18585. "cen": "岑涔",
  18586. "diu": "铥",
  18587. "nou": "耨",
  18588. "fou": "缶",
  18589. "bia": "髟"
  18590. };
  18591. const _ToPinyin = class _ToPinyin {
  18592. constructor() {
  18593. }
  18594. static getInstance() {
  18595. if (!this.instance) {
  18596. this.instance = new _ToPinyin();
  18597. }
  18598. return this.instance;
  18599. }
  18600. // 转首字母 this.chineseToInitials(this.chineseToPinYin('你好')) this.chineseToInitials('NiHao')
  18601. chineseToInitials(word) {
  18602. let SX = "";
  18603. for (var i = 0; i < word.length; i++) {
  18604. var c = word.charAt(i);
  18605. if (/^[A-Z]+$/.test(c)) {
  18606. SX += c;
  18607. }
  18608. }
  18609. return SX;
  18610. }
  18611. // 转拼音
  18612. chineseToPinYin(l1) {
  18613. var l2 = l1.length;
  18614. var I1 = "";
  18615. var reg = new RegExp("[a-zA-Z0-9]");
  18616. for (var i = 0; i < l2; i++) {
  18617. var val = l1.substr(i, 1);
  18618. var name = this.arraySearch(val, pinyin);
  18619. if (reg.test(val)) {
  18620. I1 += val.toLocaleUpperCase();
  18621. } else if (name !== false) {
  18622. I1 += name;
  18623. }
  18624. }
  18625. I1 = I1.replace(/ /g, "-");
  18626. while (I1.indexOf("--") > 0) {
  18627. I1 = I1.replace("--", "-");
  18628. }
  18629. return I1;
  18630. }
  18631. arraySearch(l1, l2) {
  18632. for (var name in pinyin) {
  18633. if (pinyin[name].indexOf(l1) !== -1) {
  18634. return this.ucfirst(name);
  18635. }
  18636. }
  18637. return false;
  18638. }
  18639. ucfirst(l1) {
  18640. if (l1.length > 0) {
  18641. var first = l1.substr(0, 1).toUpperCase();
  18642. var spare = l1.substr(1, l1.length);
  18643. return first + spare;
  18644. }
  18645. }
  18646. };
  18647. __publicField(_ToPinyin, "instance");
  18648. let ToPinyin = _ToPinyin;
  18649. const toPinyin = ToPinyin.getInstance();
  18650. const _sfc_main$14 = {
  18651. __name: "BookInfo",
  18652. props: {
  18653. bookList: {
  18654. type: Array,
  18655. default: () => []
  18656. },
  18657. detail: {
  18658. type: Object,
  18659. default: () => ({})
  18660. },
  18661. isShow: {
  18662. type: Boolean,
  18663. default: true
  18664. }
  18665. },
  18666. emits: ["get-all-firstLetter"],
  18667. setup(__props, { expose: __expose, emit: __emit }) {
  18668. __expose();
  18669. const props2 = __props;
  18670. const emit2 = __emit;
  18671. const auditNum = vue.computed(() => {
  18672. return props2.bookList.reduce((total, item) => {
  18673. var _a;
  18674. let num = ((_a = item.auditCommentList) == null ? void 0 : _a.filter((v) => v.sts != 0).length) || 0;
  18675. return total + num;
  18676. }, 0);
  18677. });
  18678. function handleBookClick(book) {
  18679. if (props2.detail.status >= 10) {
  18680. uni.$u.ttsModule.speak("订单已审核完成");
  18681. return;
  18682. }
  18683. uni.navigateTo({
  18684. url: `/pages/index/detail/book-audit?isbn=${book.isbn}&orderId=${props2.detail.orderId}`
  18685. });
  18686. uni.setStorageSync("auditBook", book);
  18687. }
  18688. function getAuditCateNum(cate) {
  18689. let auditList = [];
  18690. props2.bookList.forEach((v) => {
  18691. auditList.push(...v.auditCommentList || []);
  18692. });
  18693. return auditList.filter((v) => v.sts == cate).length;
  18694. }
  18695. const formatBookList = (list) => {
  18696. const poorBooks = { title: "极差", list: [], backgroundColor: "#de868f", id: "poor" };
  18697. const goodBooks = { title: "良好", list: [], backgroundColor: "#81b337", id: "good" };
  18698. const otherBooks = [];
  18699. const allFirstLetter = [];
  18700. const handleBookCategorization = (book) => {
  18701. let firstLetter;
  18702. let firstChineseChar = null;
  18703. for (let i = 0; i < book.bookName.length; i++) {
  18704. const char = book.bookName.charAt(i);
  18705. if (/^[\u4E00-\u9FA5]$/.test(char)) {
  18706. firstChineseChar = char;
  18707. break;
  18708. }
  18709. }
  18710. if (firstChineseChar) {
  18711. firstLetter = toPinyin.chineseToInitials(toPinyin.chineseToPinYin(firstChineseChar));
  18712. } else {
  18713. const char = book.bookName.charAt(0);
  18714. if (/^[A-Za-z]$/.test(char)) {
  18715. firstLetter = char.toUpperCase();
  18716. } else {
  18717. firstLetter = char;
  18718. }
  18719. }
  18720. let bool = otherBooks.some((item) => item.title == firstLetter);
  18721. if (!bool) {
  18722. otherBooks.push({ id: firstLetter, title: firstLetter, list: [{ ...book }] });
  18723. allFirstLetter.push(firstLetter);
  18724. emit2("get-all-firstLetter", allFirstLetter);
  18725. } else {
  18726. otherBooks.find((item) => item.title == firstLetter).list.push(book);
  18727. }
  18728. };
  18729. list.forEach((book) => {
  18730. var _a, _b, _c;
  18731. book.goodNum = ((_a = book.auditCommentList) == null ? void 0 : _a.filter((v) => v.sts == 1).length) || 0;
  18732. book.badNum = ((_b = book.auditCommentList) == null ? void 0 : _b.filter((v) => v.sts == 3).length) || 0;
  18733. const totalAudited = ((_c = book.auditCommentList) == null ? void 0 : _c.filter((v) => v.sts !== 0).length) || 0;
  18734. const isFullyAudited = totalAudited === book.num;
  18735. if (isFullyAudited) {
  18736. if (book.auditCommentList.some((v) => v.sts === 3)) {
  18737. poorBooks.list.push(book);
  18738. } else if (book.auditCommentList.every((v) => v.sts === 1)) {
  18739. goodBooks.list.push(book);
  18740. } else {
  18741. handleBookCategorization(book);
  18742. }
  18743. } else {
  18744. handleBookCategorization(book);
  18745. }
  18746. });
  18747. return { poorBooks, goodBooks, otherBooks };
  18748. };
  18749. const formatList = vue.ref([]);
  18750. vue.watch(
  18751. () => props2.bookList,
  18752. (newVal) => {
  18753. let { poorBooks, goodBooks, otherBooks } = formatBookList(newVal);
  18754. otherBooks.sort((a, b) => a.id.localeCompare(b.id));
  18755. let poor = poorBooks.list.length > 0 ? poorBooks : {};
  18756. let good = goodBooks.list.length > 0 ? goodBooks : {};
  18757. formatList.value = [...otherBooks, poor, good];
  18758. },
  18759. { immediate: true, deep: true }
  18760. );
  18761. const __returned__ = { props: props2, emit: emit2, auditNum, handleBookClick, getAuditCateNum, formatBookList, formatList, ref: vue.ref, watch: vue.watch, computed: vue.computed, BookItem: BookItem$2, get toPinyin() {
  18762. return toPinyin;
  18763. } };
  18764. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  18765. return __returned__;
  18766. }
  18767. };
  18768. function _sfc_render$13(_ctx, _cache, $props, $setup, $data, $options) {
  18769. return vue.openBlock(), vue.createElementBlock("view", { class: "book-info" }, [
  18770. $props.isShow ? (vue.openBlock(), vue.createElementBlock(
  18771. vue.Fragment,
  18772. { key: 0 },
  18773. [
  18774. vue.createElementVNode(
  18775. "view",
  18776. {
  18777. class: "font-bold mt-12 mb-10",
  18778. style: { "padding": "0 20rpx" }
  18779. },
  18780. vue.toDisplayString($props.bookList.length) + "条记录,共" + vue.toDisplayString($props.detail.totalNum) + "本,已审" + vue.toDisplayString($setup.auditNum || 0) + "本 ",
  18781. 1
  18782. /* TEXT */
  18783. ),
  18784. vue.createElementVNode(
  18785. "view",
  18786. {
  18787. class: "font-light",
  18788. style: { "padding": "0 20rpx" }
  18789. },
  18790. " 其中已审:良好" + vue.toDisplayString($setup.getAuditCateNum(1)) + "本,一般0本,极差" + vue.toDisplayString($setup.getAuditCateNum(3)) + "本 ",
  18791. 1
  18792. /* TEXT */
  18793. )
  18794. ],
  18795. 64
  18796. /* STABLE_FRAGMENT */
  18797. )) : vue.createCommentVNode("v-if", true),
  18798. (vue.openBlock(true), vue.createElementBlock(
  18799. vue.Fragment,
  18800. null,
  18801. vue.renderList($setup.formatList, (item) => {
  18802. return vue.withDirectives((vue.openBlock(), vue.createElementBlock("view", {
  18803. class: "book-info-item bg-white mt-12",
  18804. style: vue.normalizeStyle({ backgroundColor: item.backgroundColor }),
  18805. key: item.title,
  18806. id: item.id
  18807. }, [
  18808. vue.createElementVNode(
  18809. "view",
  18810. { class: "book-info-item-title" },
  18811. vue.toDisplayString(item.title),
  18812. 1
  18813. /* TEXT */
  18814. ),
  18815. vue.createElementVNode("view", { class: "book-info-item-list" }, [
  18816. (vue.openBlock(true), vue.createElementBlock(
  18817. vue.Fragment,
  18818. null,
  18819. vue.renderList(item.list, (book) => {
  18820. return vue.openBlock(), vue.createBlock($setup["BookItem"], {
  18821. key: book.bookId,
  18822. item: book,
  18823. onClick: ($event) => $setup.handleBookClick(book)
  18824. }, null, 8, ["item", "onClick"]);
  18825. }),
  18826. 128
  18827. /* KEYED_FRAGMENT */
  18828. ))
  18829. ])
  18830. ], 12, ["id"])), [
  18831. [vue.vShow, item == null ? void 0 : item.title]
  18832. ]);
  18833. }),
  18834. 128
  18835. /* KEYED_FRAGMENT */
  18836. ))
  18837. ]);
  18838. }
  18839. const BookInfo = /* @__PURE__ */ _export_sfc(_sfc_main$14, [["render", _sfc_render$13], ["__scopeId", "data-v-8c7d14f9"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/index/detail/components/BookInfo.vue"]]);
  18840. const props$8 = {
  18841. props: {
  18842. // 图片地址
  18843. src: {
  18844. type: String,
  18845. default: props$G.image.src
  18846. },
  18847. // 裁剪模式
  18848. mode: {
  18849. type: String,
  18850. default: props$G.image.mode
  18851. },
  18852. // 宽度,单位任意
  18853. width: {
  18854. type: [String, Number],
  18855. default: props$G.image.width
  18856. },
  18857. // 高度,单位任意
  18858. height: {
  18859. type: [String, Number],
  18860. default: props$G.image.height
  18861. },
  18862. // 图片形状,circle-圆形,square-方形
  18863. shape: {
  18864. type: String,
  18865. default: props$G.image.shape
  18866. },
  18867. // 圆角,单位任意
  18868. radius: {
  18869. type: [String, Number],
  18870. default: props$G.image.radius
  18871. },
  18872. // 是否懒加载,微信小程序、App、百度小程序、字节跳动小程序
  18873. lazyLoad: {
  18874. type: Boolean,
  18875. default: props$G.image.lazyLoad
  18876. },
  18877. // 开启长按图片显示识别微信小程序码菜单
  18878. showMenuByLongpress: {
  18879. type: Boolean,
  18880. default: props$G.image.showMenuByLongpress
  18881. },
  18882. // 加载中的图标,或者小图片
  18883. loadingIcon: {
  18884. type: String,
  18885. default: props$G.image.loadingIcon
  18886. },
  18887. // 加载失败的图标,或者小图片
  18888. errorIcon: {
  18889. type: String,
  18890. default: props$G.image.errorIcon
  18891. },
  18892. // 是否显示加载中的图标或者自定义的slot
  18893. showLoading: {
  18894. type: Boolean,
  18895. default: props$G.image.showLoading
  18896. },
  18897. // 是否显示加载错误的图标或者自定义的slot
  18898. showError: {
  18899. type: Boolean,
  18900. default: props$G.image.showError
  18901. },
  18902. // 是否需要淡入效果
  18903. fade: {
  18904. type: Boolean,
  18905. default: props$G.image.fade
  18906. },
  18907. // 只支持网络资源,只对微信小程序有效
  18908. webp: {
  18909. type: Boolean,
  18910. default: props$G.image.webp
  18911. },
  18912. // 过渡时间,单位ms
  18913. duration: {
  18914. type: [String, Number],
  18915. default: props$G.image.duration
  18916. },
  18917. // 背景颜色,用于深色页面加载图片时,为了和背景色融合
  18918. bgColor: {
  18919. type: String,
  18920. default: props$G.image.bgColor
  18921. }
  18922. }
  18923. };
  18924. const _sfc_main$13 = {
  18925. name: "u-image",
  18926. mixins: [mpMixin, mixin, props$8],
  18927. data() {
  18928. return {
  18929. // 图片是否加载错误,如果是,则显示错误占位图
  18930. isError: false,
  18931. // 初始化组件时,默认为加载中状态
  18932. loading: true,
  18933. // 不透明度,为了实现淡入淡出的效果
  18934. opacity: 1,
  18935. // 过渡时间,因为props的值无法修改,故需要一个中间值
  18936. durationTime: this.duration,
  18937. // 图片加载完成时,去掉背景颜色,因为如果是png图片,就会显示灰色的背景
  18938. backgroundStyle: {},
  18939. // 用于fade模式的控制组件显示与否
  18940. show: false
  18941. };
  18942. },
  18943. watch: {
  18944. src: {
  18945. immediate: true,
  18946. handler(n) {
  18947. if (!n) {
  18948. this.isError = true;
  18949. } else {
  18950. this.isError = false;
  18951. this.loading = true;
  18952. }
  18953. }
  18954. }
  18955. },
  18956. computed: {
  18957. wrapStyle() {
  18958. let style = {};
  18959. style.width = this.$u.addUnit(this.width);
  18960. style.height = this.$u.addUnit(this.height);
  18961. style.borderRadius = this.shape == "circle" ? "10000px" : uni.$u.addUnit(this.radius);
  18962. style.overflow = this.radius > 0 ? "hidden" : "visible";
  18963. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  18964. }
  18965. },
  18966. mounted() {
  18967. this.show = true;
  18968. },
  18969. emits: ["click", "error", "load"],
  18970. methods: {
  18971. // 点击图片
  18972. onClick() {
  18973. this.$emit("click");
  18974. },
  18975. // 图片加载失败
  18976. onErrorHandler(err) {
  18977. this.loading = false;
  18978. this.isError = true;
  18979. this.$emit("error", err);
  18980. },
  18981. // 图片加载完成,标记loading结束
  18982. onLoadHandler(event) {
  18983. this.loading = false;
  18984. this.isError = false;
  18985. this.$emit("load", event);
  18986. this.removeBgColor();
  18987. },
  18988. // 移除图片的背景色
  18989. removeBgColor() {
  18990. this.backgroundStyle = {
  18991. backgroundColor: "transparent"
  18992. };
  18993. }
  18994. }
  18995. };
  18996. function _sfc_render$12(_ctx, _cache, $props, $setup, $data, $options) {
  18997. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  18998. const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_1$5);
  18999. return vue.openBlock(), vue.createBlock(_component_u_transition, {
  19000. mode: "fade",
  19001. show: $data.show,
  19002. duration: _ctx.fade ? 1e3 : 0
  19003. }, {
  19004. default: vue.withCtx(() => [
  19005. vue.createElementVNode(
  19006. "view",
  19007. {
  19008. class: "u-image",
  19009. onClick: _cache[2] || (_cache[2] = (...args) => $options.onClick && $options.onClick(...args)),
  19010. style: vue.normalizeStyle([$options.wrapStyle, $data.backgroundStyle])
  19011. },
  19012. [
  19013. !$data.isError ? (vue.openBlock(), vue.createElementBlock("image", {
  19014. key: 0,
  19015. src: _ctx.src,
  19016. mode: _ctx.mode,
  19017. onError: _cache[0] || (_cache[0] = (...args) => $options.onErrorHandler && $options.onErrorHandler(...args)),
  19018. onLoad: _cache[1] || (_cache[1] = (...args) => $options.onLoadHandler && $options.onLoadHandler(...args)),
  19019. "show-menu-by-longpress": _ctx.showMenuByLongpress,
  19020. "lazy-load": _ctx.lazyLoad,
  19021. class: "u-image__image",
  19022. style: vue.normalizeStyle({
  19023. borderRadius: _ctx.shape == "circle" ? "10000px" : _ctx.$u.addUnit(_ctx.radius),
  19024. width: _ctx.$u.addUnit(_ctx.width),
  19025. height: _ctx.$u.addUnit(_ctx.height)
  19026. })
  19027. }, null, 44, ["src", "mode", "show-menu-by-longpress", "lazy-load"])) : vue.createCommentVNode("v-if", true),
  19028. _ctx.showLoading && $data.loading ? (vue.openBlock(), vue.createElementBlock(
  19029. "view",
  19030. {
  19031. key: 1,
  19032. class: "u-image__loading",
  19033. style: vue.normalizeStyle({
  19034. borderRadius: _ctx.shape == "circle" ? "50%" : _ctx.$u.addUnit(_ctx.radius),
  19035. backgroundColor: this.bgColor,
  19036. width: _ctx.$u.addUnit(_ctx.width),
  19037. height: _ctx.$u.addUnit(_ctx.height)
  19038. })
  19039. },
  19040. [
  19041. vue.renderSlot(_ctx.$slots, "loading", {}, () => [
  19042. vue.createVNode(_component_u_icon, {
  19043. name: _ctx.loadingIcon,
  19044. width: _ctx.width,
  19045. height: _ctx.height
  19046. }, null, 8, ["name", "width", "height"])
  19047. ], true)
  19048. ],
  19049. 4
  19050. /* STYLE */
  19051. )) : vue.createCommentVNode("v-if", true),
  19052. _ctx.showError && $data.isError && !$data.loading ? (vue.openBlock(), vue.createElementBlock(
  19053. "view",
  19054. {
  19055. key: 2,
  19056. class: "u-image__error",
  19057. style: vue.normalizeStyle({
  19058. borderRadius: _ctx.shape == "circle" ? "50%" : _ctx.$u.addUnit(_ctx.radius),
  19059. width: _ctx.$u.addUnit(_ctx.width),
  19060. height: _ctx.$u.addUnit(_ctx.height)
  19061. })
  19062. },
  19063. [
  19064. vue.renderSlot(_ctx.$slots, "error", {}, () => [
  19065. vue.createVNode(_component_u_icon, {
  19066. name: _ctx.errorIcon,
  19067. width: _ctx.width,
  19068. height: _ctx.height
  19069. }, null, 8, ["name", "width", "height"])
  19070. ], true)
  19071. ],
  19072. 4
  19073. /* STYLE */
  19074. )) : vue.createCommentVNode("v-if", true)
  19075. ],
  19076. 4
  19077. /* STYLE */
  19078. )
  19079. ]),
  19080. _: 3
  19081. /* FORWARDED */
  19082. }, 8, ["show", "duration"]);
  19083. }
  19084. const __easycom_2$1 = /* @__PURE__ */ _export_sfc(_sfc_main$13, [["render", _sfc_render$12], ["__scopeId", "data-v-abebd402"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-image/u-image.vue"]]);
  19085. const _sfc_main$12 = {
  19086. __name: "FileInfo",
  19087. props: {
  19088. orderId: {
  19089. type: String,
  19090. default: ""
  19091. },
  19092. annexType: {
  19093. type: Number,
  19094. default: 1
  19095. },
  19096. isbn: {
  19097. type: String,
  19098. default: ""
  19099. }
  19100. },
  19101. setup(__props, { expose: __expose }) {
  19102. __expose();
  19103. const form = vue.ref({
  19104. imgInfo: [],
  19105. remark: ""
  19106. });
  19107. const props2 = __props;
  19108. const fileList = vue.ref([]);
  19109. function getFileList() {
  19110. uni.$u.http.get("/app/orderinfo/getOrderAnnexList", {
  19111. params: {
  19112. orderId: props2.orderId,
  19113. annexType: props2.annexType,
  19114. isbn: props2.isbn
  19115. }
  19116. }).then((res) => {
  19117. if (res.code == 200) {
  19118. fileList.value = res.data;
  19119. }
  19120. });
  19121. }
  19122. getFileList();
  19123. const handleUpload = () => {
  19124. formatAppLog("log", "at pages/index/detail/components/FileInfo.vue:73", form.value);
  19125. let data = {
  19126. orderId: props2.orderId,
  19127. annexType: props2.annexType,
  19128. isbn: props2.isbn,
  19129. ...form.value
  19130. };
  19131. uni.$u.http.post("/app/orderinfo/setOrderAnnex", data).then((res) => {
  19132. if (res.code == 200) {
  19133. uni.$u.toast("上传成功");
  19134. form.value.imgInfo = [];
  19135. form.value.remark = "";
  19136. getFileList();
  19137. } else {
  19138. uni.$u.toast(res.msg);
  19139. }
  19140. });
  19141. };
  19142. const __returned__ = { form, props: props2, fileList, getFileList, handleUpload, ref: vue.ref, cyUpload };
  19143. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  19144. return __returned__;
  19145. }
  19146. };
  19147. function _sfc_render$11(_ctx, _cache, $props, $setup, $data, $options) {
  19148. var _a;
  19149. const _component_u_textarea = resolveEasycom(vue.resolveDynamicComponent("u-textarea"), __easycom_3$3);
  19150. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  19151. const _component_u_image = resolveEasycom(vue.resolveDynamicComponent("u-image"), __easycom_2$1);
  19152. return vue.openBlock(), vue.createElementBlock("view", { class: "file-info bg-white" }, [
  19153. vue.createElementVNode("view", { class: "file-info-container" }, [
  19154. vue.createVNode($setup["cyUpload"], {
  19155. filename: $setup.form.imgInfo,
  19156. "onUpdate:filename": _cache[0] || (_cache[0] = ($event) => $setup.form.imgInfo = $event),
  19157. limit: 3
  19158. }, null, 8, ["filename"]),
  19159. vue.createVNode(_component_u_textarea, {
  19160. modelValue: $setup.form.remark,
  19161. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.form.remark = $event),
  19162. placeholder: "上传说明...",
  19163. autoHeight: "",
  19164. style: { "min-height": "60px" }
  19165. }, null, 8, ["modelValue"]),
  19166. vue.createElementVNode("view", { class: "flex flex-a-c flex-j-c" }, [
  19167. vue.createVNode(_component_u_button, {
  19168. class: "mt-24",
  19169. type: "primary",
  19170. onClick: $setup.handleUpload
  19171. }, {
  19172. default: vue.withCtx(() => [
  19173. vue.createTextVNode("上传(最多上传3张)")
  19174. ]),
  19175. _: 1
  19176. /* STABLE */
  19177. })
  19178. ])
  19179. ]),
  19180. vue.createElementVNode("view", { class: "file-info-list" }, [
  19181. vue.createElementVNode("view", { class: "file-info-list-title text-center" }, "已上传记录"),
  19182. !((_a = $setup.fileList) == null ? void 0 : _a.length) ? (vue.openBlock(), vue.createElementBlock("view", {
  19183. key: 0,
  19184. class: "file-info-list-content mt-24 mb-24 text-center"
  19185. }, "还没有上传记录")) : (vue.openBlock(true), vue.createElementBlock(
  19186. vue.Fragment,
  19187. { key: 1 },
  19188. vue.renderList($setup.fileList, (item) => {
  19189. return vue.openBlock(), vue.createElementBlock("view", {
  19190. class: "file-info-item",
  19191. key: item.id
  19192. }, [
  19193. vue.createElementVNode("view", { class: "file-info-item-img flex flex-a-c" }, [
  19194. (vue.openBlock(true), vue.createElementBlock(
  19195. vue.Fragment,
  19196. null,
  19197. vue.renderList(item.imgInfo, (img) => {
  19198. return vue.openBlock(), vue.createBlock(_component_u_image, {
  19199. src: img,
  19200. width: "90",
  19201. height: "90",
  19202. style: { "margin-right": "10px" }
  19203. }, null, 8, ["src"]);
  19204. }),
  19205. 256
  19206. /* UNKEYED_FRAGMENT */
  19207. ))
  19208. ]),
  19209. vue.createElementVNode("view", { class: "file-info-item-info mt-10 font-14" }, [
  19210. vue.createElementVNode(
  19211. "view",
  19212. { class: "file-info-item-info-name" },
  19213. "上传说明:" + vue.toDisplayString(item.remark),
  19214. 1
  19215. /* TEXT */
  19216. ),
  19217. vue.createElementVNode("view", { class: "file-info-item-info-name mt-10" }, [
  19218. vue.createElementVNode(
  19219. "text",
  19220. null,
  19221. vue.toDisplayString(item.createTime),
  19222. 1
  19223. /* TEXT */
  19224. ),
  19225. vue.createElementVNode(
  19226. "text",
  19227. { class: "ml-20" },
  19228. vue.toDisplayString(item.createName),
  19229. 1
  19230. /* TEXT */
  19231. )
  19232. ])
  19233. ])
  19234. ]);
  19235. }),
  19236. 128
  19237. /* KEYED_FRAGMENT */
  19238. ))
  19239. ])
  19240. ]);
  19241. }
  19242. const FileInfo = /* @__PURE__ */ _export_sfc(_sfc_main$12, [["render", _sfc_render$11], ["__scopeId", "data-v-b4cf7c83"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/index/detail/components/FileInfo.vue"]]);
  19243. const _sfc_main$11 = {
  19244. __name: "index",
  19245. setup(__props, { expose: __expose }) {
  19246. __expose();
  19247. const showAuditorSelector = vue.ref(false);
  19248. const selectedAuditor = vue.ref({});
  19249. const handleAuditorSelected = (auditor) => {
  19250. selectedAuditor.value = auditor;
  19251. orderDetail.value.auditUserId = auditor.userId;
  19252. orderDetail.value.auditUserName = auditor.userName;
  19253. uni.setStorageSync("checkUserInfo", {
  19254. userName: auditor.userName,
  19255. userId: auditor.userId
  19256. });
  19257. };
  19258. function playGlobalSound() {
  19259. uni.$u.playClickSound();
  19260. }
  19261. const toView = vue.ref("");
  19262. function scrollToView(to) {
  19263. toView.value = to;
  19264. uni.pageScrollTo({
  19265. selector: "#" + to,
  19266. duration: 200
  19267. });
  19268. }
  19269. function scrollToTop() {
  19270. uni.pageScrollTo({
  19271. top: 0,
  19272. duration: 200
  19273. });
  19274. }
  19275. function handleBindCode() {
  19276. uni.$u.toast("暂无开发");
  19277. }
  19278. const list = vue.ref(["图书清单", "物流信息", "上传附件"]);
  19279. const current = vue.ref(0);
  19280. const handleSectionChange = (index2) => {
  19281. current.value = index2;
  19282. };
  19283. const allLetters = vue.ref([]);
  19284. function onGetAllFirstLetter(data) {
  19285. allLetters.value = data;
  19286. }
  19287. function handleLogisticsConfirm() {
  19288. uni.showModal({
  19289. title: "提示",
  19290. content: "是否确认物流签收?",
  19291. success: (res) => {
  19292. if (res.confirm) {
  19293. uni.showLoading({ title: "加载中...", mask: true });
  19294. uni.$u.http.post("/app/orderinfo/signLogistics", {
  19295. searchType: 1,
  19296. search: orderDetail.value.orderId
  19297. }).then((res2) => {
  19298. if (res2.code == 200) {
  19299. uni.showToast({ title: "签收成功", icon: "none" });
  19300. uni.$u.ttsModule.speak("签收成功");
  19301. uni.navigateBack();
  19302. }
  19303. }).finally(() => {
  19304. uni.hideLoading();
  19305. });
  19306. }
  19307. }
  19308. });
  19309. }
  19310. function handleConfirm() {
  19311. uni.showLoading({ title: "加载中...", mask: true });
  19312. uni.$u.http.post("/app/orderinfo/confirmOrder", {
  19313. searchType: 1,
  19314. search: orderDetail.value.orderId
  19315. }).then((res) => {
  19316. if (res.code == 200) {
  19317. uni.showToast({ title: "确认收货成功", icon: "none" });
  19318. uni.$u.ttsModule.speak("确认收货成功");
  19319. getOrderDetail(true);
  19320. }
  19321. }).finally(() => {
  19322. uni.hideLoading();
  19323. });
  19324. }
  19325. function handleComplete() {
  19326. let bookList = orderDetail.value.detailVoList;
  19327. let bool = bookList.some((item) => {
  19328. var _a;
  19329. return ((_a = item.auditCommentList) == null ? void 0 : _a.length) < item.num;
  19330. });
  19331. if (bool) {
  19332. let text = "还有未审核的书";
  19333. uni.$u.toast(text);
  19334. uni.$u.ttsModule.speak(text);
  19335. return;
  19336. } else {
  19337. uni.$u.http.post("/app/orderinfo/checkOrderFinish", {
  19338. checkUserId: orderDetail.value.auditUserId,
  19339. orderId: orderDetail.value.orderId
  19340. }).then((res) => {
  19341. if (res.code == 200) {
  19342. uni.showToast({ title: "审核完成", icon: "none" });
  19343. uni.$u.ttsModule.speak("审核完成");
  19344. uni.navigateBack();
  19345. }
  19346. });
  19347. }
  19348. }
  19349. const orderDetail = vue.ref({ status: 0 });
  19350. function getOrderDetail(forceRefresh = false) {
  19351. if (!orderId.value)
  19352. return;
  19353. if (forceRefresh) {
  19354. hasLoadedOrderDetail.value = false;
  19355. hasLoadedCheckUser.value = false;
  19356. }
  19357. uni.showLoading({
  19358. title: "加载中...",
  19359. mask: true
  19360. });
  19361. uni.$u.http.get("/app/orderinfo/getOrderInfoForCheck", {
  19362. params: {
  19363. searchType: 1,
  19364. search: orderId.value
  19365. }
  19366. }).then((res) => {
  19367. if (res.code == 200) {
  19368. orderDetail.value = res.data;
  19369. if (!hasLoadedCheckUser.value && !res.data.auditUserId) {
  19370. getCheckUserInfo();
  19371. }
  19372. if (res.data.auditUserId) {
  19373. let auditUserInfo = {
  19374. userName: res.data.auditUserName,
  19375. userId: res.data.auditUserId
  19376. };
  19377. uni.setStorageSync("checkUserInfo", auditUserInfo);
  19378. } else {
  19379. let userInfo = uni.getStorageSync("checkUserInfo");
  19380. if (userInfo && userInfo.userName) {
  19381. orderDetail.value.auditUserName = userInfo.userName;
  19382. orderDetail.value.auditUserId = userInfo.userId;
  19383. }
  19384. }
  19385. if (isOnLoad.value) {
  19386. if (res.data.manageRemark.length > 0 && res.data.status < 10) {
  19387. uni.$u.ttsModule.speak("此订单有备注信息,请注意查看");
  19388. }
  19389. if (res.data.warnArea && res.data.warnArea.length > 0) {
  19390. let text = `此订单来源于${res.data.warnArea}`;
  19391. uni.$u.ttsModule.speak(text);
  19392. }
  19393. isOnLoad.value = false;
  19394. }
  19395. hasLoadedOrderDetail.value = true;
  19396. } else {
  19397. uni.$u.toast(res.msg);
  19398. }
  19399. }).finally(() => {
  19400. uni.hideLoading();
  19401. });
  19402. }
  19403. function getCheckUserInfo() {
  19404. uni.$u.http.get("/app/orderinfo/getCheckUser").then((res) => {
  19405. if (res.code == 200) {
  19406. let userInfo = res.data || {};
  19407. orderDetail.value.auditUserName = userInfo.userName || "";
  19408. orderDetail.value.auditUserId = userInfo.userId || "";
  19409. uni.setStorageSync("checkUserInfo", {
  19410. userName: userInfo.userName,
  19411. userId: userInfo.userId
  19412. });
  19413. }
  19414. hasLoadedCheckUser.value = true;
  19415. });
  19416. }
  19417. function checkIsbn(isbn) {
  19418. const isbn13Regex = /^(?:97[89]-?\d{1,5}-?\d{1,7}-?\d{1,6}-?\d)$/;
  19419. if (isbn13Regex.test(isbn)) {
  19420. return true;
  19421. }
  19422. return false;
  19423. }
  19424. function handleScan2(isbn) {
  19425. if (!checkIsbn(isbn)) {
  19426. let text = `不是正确的ISBN码`;
  19427. uni.$u.ttsModule.speak(text);
  19428. return;
  19429. }
  19430. if (orderDetail.value.status >= 10) {
  19431. uni.$u.ttsModule.speak("订单已审核完成");
  19432. return;
  19433. }
  19434. let isbnStr = `${isbn.slice(-4)}`;
  19435. let isbnList = orderDetail.value.detailVoList.map((item) => item.isbn);
  19436. if (isbnList.includes(isbn)) {
  19437. let book = orderDetail.value.detailVoList.find((item) => item.isbn == isbn);
  19438. if (book.suit == 1) {
  19439. let text = `${isbnStr}请注意套装书是否齐全`;
  19440. uni.$u.ttsModule.speak(text);
  19441. }
  19442. if (book.bookWarn == 1) {
  19443. let text = `请注意${isbnStr}需要取出`;
  19444. uni.$u.ttsModule.speak(text);
  19445. }
  19446. uni.navigateTo({
  19447. url: `/pages/index/detail/book-audit?isbn=${isbn}&orderId=${orderDetail.value.orderId}`
  19448. });
  19449. uni.setStorageSync("auditBook", book);
  19450. uni.setStorageSync("orderDetail", orderDetail.value);
  19451. } else {
  19452. let text = `此订单中不存在${isbnStr}这本书 `;
  19453. uni.$u.ttsModule.speak(text);
  19454. }
  19455. }
  19456. function handleScanCode() {
  19457. uni.scanCode({
  19458. success: (res) => {
  19459. res.result && handleScan2(res.result);
  19460. }
  19461. });
  19462. }
  19463. const orderId = vue.ref("");
  19464. const isOnLoad = vue.ref(false);
  19465. const hasLoadedOrderDetail = vue.ref(false);
  19466. const hasLoadedCheckUser = vue.ref(false);
  19467. const type2 = vue.ref(1);
  19468. onLoad((options) => {
  19469. isOnLoad.value = true;
  19470. orderId.value = options.id;
  19471. orderDetail.value = uni.getStorageSync("orderDetail") || {};
  19472. type2.value = options.type || 1;
  19473. uni.removeStorageSync("scannedBooks");
  19474. });
  19475. const { unregister, register } = uni.$u.useEventListener((e) => {
  19476. handleScan2(e.barcode);
  19477. }, true);
  19478. onShow(() => {
  19479. register();
  19480. getOrderDetail();
  19481. });
  19482. vue.onUnmounted(() => {
  19483. if (typeof unregister === "function") {
  19484. unregister();
  19485. }
  19486. });
  19487. const __returned__ = { showAuditorSelector, selectedAuditor, handleAuditorSelected, playGlobalSound, toView, scrollToView, scrollToTop, handleBindCode, list, current, handleSectionChange, allLetters, onGetAllFirstLetter, handleLogisticsConfirm, handleConfirm, handleComplete, orderDetail, getOrderDetail, getCheckUserInfo, checkIsbn, handleScan: handleScan2, handleScanCode, orderId, isOnLoad, hasLoadedOrderDetail, hasLoadedCheckUser, type: type2, unregister, register, ref: vue.ref, onUnmounted: vue.onUnmounted, get onLoad() {
  19488. return onLoad;
  19489. }, get onShow() {
  19490. return onShow;
  19491. }, AuditorSelector, OrderInfo, UserInfoCard, LogisticsTimeline, BookInfo, FileInfo };
  19492. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  19493. return __returned__;
  19494. }
  19495. };
  19496. function _sfc_render$10(_ctx, _cache, $props, $setup, $data, $options) {
  19497. var _a;
  19498. const _component_u_subsection = resolveEasycom(vue.resolveDynamicComponent("u-subsection"), __easycom_0$8);
  19499. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  19500. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  19501. return vue.openBlock(), vue.createElementBlock(
  19502. "view",
  19503. {
  19504. class: vue.normalizeClass(["order-detail", { "fixed-bottom-2": $setup.type == 2 }]),
  19505. onClick: $setup.playGlobalSound
  19506. },
  19507. [
  19508. vue.createElementVNode("scroll-view", {
  19509. class: "scroller",
  19510. "scroll-into-view": $setup.toView,
  19511. "scroll-y": "true",
  19512. "scroll-with-animation": "true"
  19513. }, [
  19514. vue.createElementVNode("view", { class: "flex flex-a-c flex-j-b bg-white bind-audit mb-16" }, [
  19515. vue.createElementVNode("text", null, "绑定审核员"),
  19516. vue.createElementVNode(
  19517. "text",
  19518. { class: "text-center flex-1" },
  19519. vue.toDisplayString($setup.orderDetail.auditUserName || ((_a = $setup.selectedAuditor) == null ? void 0 : _a.userName) || ""),
  19520. 1
  19521. /* TEXT */
  19522. ),
  19523. vue.createElementVNode("text", {
  19524. onClick: _cache[0] || (_cache[0] = ($event) => $setup.showAuditorSelector = true),
  19525. class: "color-primary"
  19526. }, "绑定")
  19527. ]),
  19528. vue.createVNode($setup["OrderInfo"], {
  19529. detail: $setup.orderDetail,
  19530. onRefresh: _cache[1] || (_cache[1] = () => $setup.getOrderDetail(true))
  19531. }, null, 8, ["detail"]),
  19532. vue.createVNode($setup["UserInfoCard"], { detail: $setup.orderDetail }, null, 8, ["detail"]),
  19533. vue.createElementVNode("view", {
  19534. class: "mt-16",
  19535. style: { "padding": "0 6rpx" }
  19536. }, [
  19537. vue.createVNode(_component_u_subsection, {
  19538. list: $setup.list,
  19539. mode: "subsection",
  19540. current: $setup.current,
  19541. onChange: $setup.handleSectionChange
  19542. }, null, 8, ["list", "current"]),
  19543. $setup.current == 0 ? (vue.openBlock(), vue.createBlock($setup["BookInfo"], {
  19544. key: 0,
  19545. bookList: $setup.orderDetail.detailVoList,
  19546. detail: $setup.orderDetail,
  19547. onGetAllFirstLetter: $setup.onGetAllFirstLetter
  19548. }, null, 8, ["bookList", "detail"])) : vue.createCommentVNode("v-if", true),
  19549. $setup.current == 1 ? (vue.openBlock(), vue.createBlock($setup["LogisticsTimeline"], {
  19550. key: 1,
  19551. list: $setup.orderDetail.trackingVoList
  19552. }, null, 8, ["list"])) : vue.createCommentVNode("v-if", true),
  19553. $setup.current == 2 ? (vue.openBlock(), vue.createBlock($setup["FileInfo"], {
  19554. key: 2,
  19555. orderId: $setup.orderDetail.orderId
  19556. }, null, 8, ["orderId"])) : vue.createCommentVNode("v-if", true)
  19557. ])
  19558. ], 8, ["scroll-into-view"]),
  19559. vue.createElementVNode("view", { class: "fixed-left" }, [
  19560. vue.createElementVNode("view", {
  19561. class: "bind-code common-bg",
  19562. style: { "margin-bottom": "30px", "padding": "20rpx" },
  19563. onClick: $setup.handleBindCode
  19564. }, "绑码 "),
  19565. vue.createElementVNode("view", { class: "common-bg flex flex-a-c flex-j-c flex-d" }, [
  19566. vue.createElementVNode("view", {
  19567. class: "book-status-item",
  19568. onClick: _cache[2] || (_cache[2] = ($event) => $setup.scrollToView("good"))
  19569. }, "良好"),
  19570. vue.createElementVNode("view", {
  19571. class: "book-status-item item-center",
  19572. onClick: _cache[3] || (_cache[3] = ($event) => $setup.scrollToView("average"))
  19573. }, "一般"),
  19574. vue.createElementVNode("view", {
  19575. class: "book-status-item",
  19576. onClick: _cache[4] || (_cache[4] = ($event) => $setup.scrollToView("poor"))
  19577. }, "极差")
  19578. ])
  19579. ]),
  19580. vue.createElementVNode("view", { class: "fixed-right" }, [
  19581. vue.createElementVNode("view", { class: "letter-bg flex flex-a-c flex-j-c flex-d" }, [
  19582. vue.createElementVNode("view", { class: "letter-item" }, [
  19583. vue.createVNode(_component_u_icon, {
  19584. name: "arrow-up-fill",
  19585. size: "20",
  19586. color: "#ffffff",
  19587. onClick: $setup.scrollToTop
  19588. })
  19589. ]),
  19590. (vue.openBlock(true), vue.createElementBlock(
  19591. vue.Fragment,
  19592. null,
  19593. vue.renderList($setup.allLetters, (item, index2) => {
  19594. return vue.openBlock(), vue.createElementBlock("view", {
  19595. class: "letter-item",
  19596. key: index2,
  19597. onClick: ($event) => $setup.scrollToView(item)
  19598. }, vue.toDisplayString(item), 9, ["onClick"]);
  19599. }),
  19600. 128
  19601. /* KEYED_FRAGMENT */
  19602. ))
  19603. ])
  19604. ]),
  19605. $setup.type != 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  19606. key: 0,
  19607. class: "common-bg fixed-bottom"
  19608. }, [
  19609. $setup.orderDetail.status == 5 ? (vue.openBlock(), vue.createBlock(_component_u_button, {
  19610. key: 0,
  19611. type: "warning",
  19612. size: "large",
  19613. onClick: $setup.handleLogisticsConfirm
  19614. }, {
  19615. default: vue.withCtx(() => [
  19616. vue.createTextVNode("物流签收")
  19617. ]),
  19618. _: 1
  19619. /* STABLE */
  19620. })) : vue.createCommentVNode("v-if", true),
  19621. $setup.orderDetail.status == 6 ? (vue.openBlock(), vue.createBlock(_component_u_button, {
  19622. key: 1,
  19623. type: "primary",
  19624. size: "large",
  19625. onClick: $setup.handleConfirm
  19626. }, {
  19627. default: vue.withCtx(() => [
  19628. vue.createTextVNode("确认收货")
  19629. ]),
  19630. _: 1
  19631. /* STABLE */
  19632. })) : vue.createCommentVNode("v-if", true),
  19633. $setup.orderDetail.status == 8 || $setup.orderDetail.status == 9 || $setup.orderDetail.status == 10 ? (vue.openBlock(), vue.createElementBlock(
  19634. vue.Fragment,
  19635. { key: 2 },
  19636. [
  19637. vue.createVNode(_component_u_button, {
  19638. type: "warning",
  19639. size: "large",
  19640. onClick: $setup.handleScanCode
  19641. }, {
  19642. default: vue.withCtx(() => [
  19643. vue.createTextVNode("扫码")
  19644. ]),
  19645. _: 1
  19646. /* STABLE */
  19647. }),
  19648. vue.createVNode(_component_u_button, {
  19649. type: "primary",
  19650. size: "large",
  19651. onClick: $setup.handleComplete
  19652. }, {
  19653. default: vue.withCtx(() => [
  19654. vue.createTextVNode("完成")
  19655. ]),
  19656. _: 1
  19657. /* STABLE */
  19658. })
  19659. ],
  19660. 64
  19661. /* STABLE_FRAGMENT */
  19662. )) : vue.createCommentVNode("v-if", true)
  19663. ])) : vue.createCommentVNode("v-if", true),
  19664. vue.createVNode($setup["AuditorSelector"], {
  19665. show: $setup.showAuditorSelector,
  19666. "onUpdate:show": _cache[5] || (_cache[5] = ($event) => $setup.showAuditorSelector = $event),
  19667. onAuditorSelected: $setup.handleAuditorSelected
  19668. }, null, 8, ["show"])
  19669. ],
  19670. 2
  19671. /* CLASS */
  19672. );
  19673. }
  19674. const PagesIndexDetailIndex = /* @__PURE__ */ _export_sfc(_sfc_main$11, [["render", _sfc_render$10], ["__scopeId", "data-v-8b10f148"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/index/detail/index.vue"]]);
  19675. const _sfc_main$10 = {
  19676. __name: "AuditInfo",
  19677. props: {
  19678. detail: {
  19679. type: Object,
  19680. default: () => ({})
  19681. },
  19682. auditList: {
  19683. type: Array,
  19684. default: () => []
  19685. }
  19686. },
  19687. emits: ["selected"],
  19688. setup(__props, { expose: __expose, emit: __emit }) {
  19689. const props2 = __props;
  19690. const auditCommentList = vue.ref([]);
  19691. const initAuditList = (detail) => {
  19692. if (!(detail == null ? void 0 : detail.auditCommentList))
  19693. return;
  19694. auditCommentList.value = detail.auditCommentList.map((item, index2) => ({
  19695. ...item,
  19696. idx: index2,
  19697. isbn: detail.isbn,
  19698. comList: item.com ? typeof item.com === "string" ? item.com.split(",") : item.com : []
  19699. }));
  19700. sortByAuditStatus();
  19701. };
  19702. vue.watch(
  19703. () => props2.detail,
  19704. () => {
  19705. initAuditList(props2.detail);
  19706. },
  19707. { deep: true, immediate: true }
  19708. );
  19709. const auditList = vue.ref([
  19710. { sts: 1, label: "品相良好" },
  19711. { sts: 2, label: "品相一般", disabled: true },
  19712. { sts: 3, label: "品相极差" }
  19713. ]);
  19714. const emit2 = __emit;
  19715. const radioClick = (audit, index2, sts) => {
  19716. if (sts == 2)
  19717. return;
  19718. audit.sts = sts;
  19719. if (sts == 1) {
  19720. audit.comList = [];
  19721. }
  19722. auditCommentList.value[index2] = audit;
  19723. formatReason();
  19724. };
  19725. const getAuditCateNum = (cate) => {
  19726. var _a, _b;
  19727. return ((_b = (_a = props2.detail.auditCommentList) == null ? void 0 : _a.filter((item) => item.sts == cate)) == null ? void 0 : _b.length) || 0;
  19728. };
  19729. let reasonList = vue.ref([
  19730. { sts: 3, label: "明显泛黄水印/发霉/明显异味" },
  19731. { sts: 3, label: "老化泛黄褪色/污渍" },
  19732. { sts: 3, label: "明显破损/脱胶缺页/书籍变型" },
  19733. { sts: 3, label: "无此书" },
  19734. { sts: 3, label: "印刷不清晰" },
  19735. { sts: 3, label: "无防伪" },
  19736. { sts: 3, label: "无外护封/无ISBN" },
  19737. { sts: 3, label: "无此书多其他书" },
  19738. { sts: 3, label: "笔记杂乱/习题做完" },
  19739. { sts: 3, label: "有笔记贴" },
  19740. { sts: 3, label: "套装缺册" },
  19741. { sts: 3, label: "听力无光盘" },
  19742. { sts: 3, label: "图书馆/藏书印章" }
  19743. ]);
  19744. const formatReason = () => {
  19745. let list = auditCommentList.value.map((item, index2) => ({
  19746. ...item,
  19747. idx: index2,
  19748. com: item.comList.join(",")
  19749. }));
  19750. return list;
  19751. };
  19752. const toggleReason = (audit, index2, item) => {
  19753. const idx = audit.comList.indexOf(item.label);
  19754. if (idx > -1) {
  19755. audit.comList.splice(idx, 1);
  19756. } else {
  19757. audit.comList.push(item.label);
  19758. }
  19759. auditCommentList.value[index2] = audit;
  19760. };
  19761. const sortByAuditStatus = () => {
  19762. const sortedList = [...auditCommentList.value];
  19763. sortedList.sort((a, b) => {
  19764. if (a.sts === 0 && (b.sts === 1 || b.sts === 3)) {
  19765. return -1;
  19766. }
  19767. if (b.sts === 0 && (a.sts === 1 || a.sts === 3)) {
  19768. return 1;
  19769. }
  19770. return 0;
  19771. });
  19772. auditCommentList.value = sortedList;
  19773. return sortedList;
  19774. };
  19775. __expose({
  19776. formatReason,
  19777. initAuditList,
  19778. sortByAuditStatus
  19779. });
  19780. const __returned__ = { props: props2, auditCommentList, initAuditList, auditList, emit: emit2, radioClick, getAuditCateNum, get reasonList() {
  19781. return reasonList;
  19782. }, set reasonList(v) {
  19783. reasonList = v;
  19784. }, formatReason, toggleReason, sortByAuditStatus, ref: vue.ref, watch: vue.watch, nextTick: vue.nextTick, onMounted: vue.onMounted };
  19785. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  19786. return __returned__;
  19787. }
  19788. };
  19789. function _sfc_render$$(_ctx, _cache, $props, $setup, $data, $options) {
  19790. const _component_u_tag = resolveEasycom(vue.resolveDynamicComponent("u-tag"), __easycom_2$2);
  19791. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  19792. return vue.openBlock(), vue.createElementBlock("view", { class: "audit-info" }, [
  19793. vue.createElementVNode(
  19794. "view",
  19795. {
  19796. class: "font-bold mt-16",
  19797. style: { "padding": "0 20rpx" }
  19798. },
  19799. " 该书共" + vue.toDisplayString($props.detail.num) + "本,其中:良好" + vue.toDisplayString($setup.getAuditCateNum(1)) + "本,一般" + vue.toDisplayString($setup.getAuditCateNum(2)) + "本,极差" + vue.toDisplayString($setup.getAuditCateNum(3)) + "本 ",
  19800. 1
  19801. /* TEXT */
  19802. ),
  19803. $setup.auditCommentList.length > 0 ? (vue.openBlock(true), vue.createElementBlock(
  19804. vue.Fragment,
  19805. { key: 0 },
  19806. vue.renderList($setup.auditCommentList, (audit, index2) => {
  19807. return vue.openBlock(), vue.createElementBlock("view", { key: index2 }, [
  19808. vue.createElementVNode(
  19809. "view",
  19810. {
  19811. class: "mt-10 bind-code",
  19812. style: { "padding": "10rpx 20rpx" }
  19813. },
  19814. " 第" + vue.toDisplayString(index2 + 1) + "本的审核意见 ",
  19815. 1
  19816. /* TEXT */
  19817. ),
  19818. vue.createElementVNode("view", {
  19819. class: "mt-20 bg-white flex flex-j-a flex-a-c",
  19820. style: { "padding": "20rpx", "border-radius": "10rpx" }
  19821. }, [
  19822. (vue.openBlock(true), vue.createElementBlock(
  19823. vue.Fragment,
  19824. null,
  19825. vue.renderList($setup.auditList, (item, idx) => {
  19826. return vue.openBlock(), vue.createElementBlock("view", {
  19827. class: "u-page__tag-item",
  19828. key: idx
  19829. }, [
  19830. vue.createVNode(_component_u_tag, {
  19831. size: "large",
  19832. text: item.label,
  19833. plain: audit.sts != item.sts,
  19834. type: "primary",
  19835. name: item.sts,
  19836. class: vue.normalizeClass({ disabled: item.sts == 2 }),
  19837. onClick: ($event) => $setup.radioClick(audit, index2, item.sts)
  19838. }, null, 8, ["text", "plain", "name", "class", "onClick"])
  19839. ]);
  19840. }),
  19841. 128
  19842. /* KEYED_FRAGMENT */
  19843. ))
  19844. ]),
  19845. audit.sts == 3 ? (vue.openBlock(), vue.createElementBlock("view", {
  19846. key: 0,
  19847. class: "mt-20 bg-white",
  19848. style: { "padding": "20rpx", "border-radius": "10rpx" }
  19849. }, [
  19850. vue.createElementVNode("view", { class: "flex flex-a-c flex-wrap" }, [
  19851. (vue.openBlock(true), vue.createElementBlock(
  19852. vue.Fragment,
  19853. null,
  19854. vue.renderList($setup.reasonList, (item, idx) => {
  19855. return vue.openBlock(), vue.createElementBlock("view", {
  19856. class: vue.normalizeClass(["mr-10 reason-item", { selected: audit.comList.includes(item.label) }]),
  19857. key: idx,
  19858. onClick: ($event) => $setup.toggleReason(audit, index2, item)
  19859. }, vue.toDisplayString(item.label), 11, ["onClick"]);
  19860. }),
  19861. 128
  19862. /* KEYED_FRAGMENT */
  19863. ))
  19864. ])
  19865. ])) : vue.createCommentVNode("v-if", true)
  19866. ]);
  19867. }),
  19868. 128
  19869. /* KEYED_FRAGMENT */
  19870. )) : vue.createCommentVNode("v-if", true),
  19871. vue.createCommentVNode(" 悬浮排序按钮 "),
  19872. vue.createElementVNode("view", {
  19873. class: "floating-sort-btn",
  19874. onClick: $setup.sortByAuditStatus
  19875. }, [
  19876. vue.createVNode(_component_u_icon, {
  19877. name: "list",
  19878. color: "#FFFFFF",
  19879. size: "22"
  19880. }),
  19881. vue.createElementVNode("text", { class: "btn-text" }, "排序")
  19882. ])
  19883. ]);
  19884. }
  19885. const AuditInfo = /* @__PURE__ */ _export_sfc(_sfc_main$10, [["render", _sfc_render$$], ["__scopeId", "data-v-9873c737"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/index/detail/components/AuditInfo.vue"]]);
  19886. const _sfc_main$$ = {
  19887. __name: "book-audit",
  19888. setup(__props, { expose: __expose }) {
  19889. __expose();
  19890. const detail = vue.ref({});
  19891. function playGlobalSound() {
  19892. uni.$u.playClickSound();
  19893. }
  19894. const getBookInfo = (isbn) => {
  19895. uni.$u.http.get(`/app/book/getBookByIsbn/${isbn}`).then((res) => {
  19896. if (res.code == 200) {
  19897. detail.value = res.data;
  19898. }
  19899. });
  19900. };
  19901. const auditBook = vue.ref({});
  19902. const getBookInfoAndAuditInfo = (isbn, orderId2) => {
  19903. uni.$u.http.get(`/app/orderinfo/getBookCheckInfo?isbn=${isbn}&&orderId=${orderId2}`).then((res) => {
  19904. if (res.code == 200) {
  19905. auditBook.value = res.data;
  19906. vue.nextTick(() => {
  19907. var _a;
  19908. (_a = auditInfoRef.value) == null ? void 0 : _a.initAuditList(auditBook.value);
  19909. });
  19910. }
  19911. });
  19912. };
  19913. const list = vue.ref(["图书审核", "绑码", "附件信息"]);
  19914. const current = vue.ref(0);
  19915. const handleSectionChange = (index2) => {
  19916. current.value = index2;
  19917. };
  19918. function checkIsbn(isbn) {
  19919. const isbn13Regex = /^(?:97[89]-?\d{1,5}-?\d{1,7}-?\d{1,6}-?\d)$/;
  19920. if (isbn13Regex.test(isbn)) {
  19921. return true;
  19922. }
  19923. return false;
  19924. }
  19925. function handleScan2(isbn) {
  19926. var _a;
  19927. if (!checkIsbn(isbn)) {
  19928. let text = `不是正确的ISBN码`;
  19929. uni.$u.ttsModule.speak(text);
  19930. return;
  19931. }
  19932. let isbnStr = `${isbn.slice(-4)}`;
  19933. let isbns = orderDetail.value.detailVoList.map((item) => item.isbn);
  19934. if (isbns.includes(isbn)) {
  19935. let book = orderDetail.value.detailVoList.find((item) => item.isbn == isbn);
  19936. if (((_a = book.auditCommentList) == null ? void 0 : _a.length) > 0) {
  19937. let noAuditNum = book.auditCommentList.filter((item) => item.sts == 0).length;
  19938. formatAppLog("log", "at pages/index/detail/book-audit.vue:130", noAuditNum, "noAuditNum");
  19939. if (noAuditNum == 0) {
  19940. let text = `${isbnStr}已超出订单中的数量`;
  19941. uni.$u.ttsModule.speak(text);
  19942. return;
  19943. }
  19944. if (book.suit == 1) {
  19945. let text = `${isbnStr}请注意套装书是否齐全`;
  19946. uni.$u.ttsModule.speak(text);
  19947. }
  19948. if (book.bookWarn == 1) {
  19949. let text = `请注意${isbnStr}需要取出`;
  19950. uni.$u.ttsModule.speak(text);
  19951. }
  19952. uni.navigateTo({
  19953. url: `/pages/index/detail/batch-audit?orderId=${orderId.value}&isbn=${isbn}&&isbn2=${isbnScan.value}`
  19954. });
  19955. }
  19956. } else {
  19957. let text = `此订单中不存在${isbnStr}这本书 `;
  19958. uni.$u.ttsModule.speak(text);
  19959. }
  19960. }
  19961. function handleScanCode() {
  19962. uni.scanCode({
  19963. success: (res) => {
  19964. handleScan2(res.result);
  19965. }
  19966. });
  19967. }
  19968. const auditInfoRef = vue.ref();
  19969. const handleAudit = () => {
  19970. var _a;
  19971. let checkList = (_a = auditInfoRef.value) == null ? void 0 : _a.formatReason();
  19972. let checkUserInfo = uni.getStorageSync("checkUserInfo");
  19973. if (checkUserInfo.userId) {
  19974. checkUserId.value = checkUserInfo.userId;
  19975. } else {
  19976. uni.$u.toast("请先选择审核人");
  19977. }
  19978. let poorList = checkList.filter((item) => item.sts == 3);
  19979. if (poorList.length > 0 && !poorList.every((item) => item.com)) {
  19980. uni.$u.ttsModule.speak("请选择品相");
  19981. return;
  19982. }
  19983. uni.$u.http.post("/app/orderinfo/checkOrder", {
  19984. checkUserId: checkUserId.value,
  19985. orderId: orderId.value,
  19986. checkList
  19987. }).then((res) => {
  19988. if (res.code == 200) {
  19989. uni.showToast({ title: "审核成功", icon: "none" });
  19990. uni.$u.ttsModule.speak("审核成功");
  19991. uni.navigateBack();
  19992. } else {
  19993. uni.$u.toast(res.msg);
  19994. }
  19995. });
  19996. };
  19997. const checkUserId = vue.ref();
  19998. const orderId = vue.ref();
  19999. const orderDetail = vue.ref({});
  20000. let isbnScan = vue.ref("");
  20001. onLoad((options) => {
  20002. options.isbn && getBookInfo(options.isbn);
  20003. isbnScan.value = options.isbn;
  20004. orderId.value = options.orderId;
  20005. getBookInfoAndAuditInfo(options.isbn, options.orderId);
  20006. orderDetail.value = uni.getStorageSync("orderDetail");
  20007. });
  20008. const { unregister, register } = uni.$u.useEventListener((e) => {
  20009. handleScan2(e.barcode);
  20010. }, true);
  20011. onShow(() => {
  20012. var _a;
  20013. register();
  20014. if (isbnScan.value) {
  20015. checkUserId.value = (_a = uni.getStorageSync("userInfo")) == null ? void 0 : _a.userId;
  20016. orderDetail.value = uni.getStorageSync("orderDetail");
  20017. }
  20018. });
  20019. vue.onUnmounted(() => {
  20020. unregister();
  20021. });
  20022. const __returned__ = { detail, playGlobalSound, getBookInfo, auditBook, getBookInfoAndAuditInfo, list, current, handleSectionChange, checkIsbn, handleScan: handleScan2, handleScanCode, auditInfoRef, handleAudit, checkUserId, orderId, orderDetail, get isbnScan() {
  20023. return isbnScan;
  20024. }, set isbnScan(v) {
  20025. isbnScan = v;
  20026. }, unregister, register, ref: vue.ref, nextTick: vue.nextTick, onUnmounted: vue.onUnmounted, get onLoad() {
  20027. return onLoad;
  20028. }, get onShow() {
  20029. return onShow;
  20030. }, AuditInfo, FileInfo };
  20031. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  20032. return __returned__;
  20033. }
  20034. };
  20035. function _sfc_render$_(_ctx, _cache, $props, $setup, $data, $options) {
  20036. const _component_u_subsection = resolveEasycom(vue.resolveDynamicComponent("u-subsection"), __easycom_0$8);
  20037. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  20038. return vue.openBlock(), vue.createElementBlock("view", {
  20039. class: "book-audit",
  20040. onClick: $setup.playGlobalSound
  20041. }, [
  20042. vue.createElementVNode("view", {
  20043. class: "bg-white flex flex-a-c",
  20044. style: { "padding": "20rpx", "border-radius": "10rpx" }
  20045. }, [
  20046. vue.createElementVNode("image", {
  20047. src: $setup.detail.cover,
  20048. mode: "aspectFill",
  20049. style: { "width": "80px", "height": "100px" }
  20050. }, null, 8, ["src"]),
  20051. vue.createElementVNode("view", { class: "flex flex-d flex-1 ml-20" }, [
  20052. vue.createElementVNode(
  20053. "text",
  20054. { class: "common-title mb-20" },
  20055. vue.toDisplayString($setup.detail.bookName),
  20056. 1
  20057. /* TEXT */
  20058. ),
  20059. vue.createElementVNode("text", { class: "text-sm" }, [
  20060. vue.createTextVNode("ISBN: "),
  20061. vue.createElementVNode(
  20062. "text",
  20063. { class: "color-primary" },
  20064. vue.toDisplayString($setup.detail.isbn),
  20065. 1
  20066. /* TEXT */
  20067. )
  20068. ]),
  20069. vue.createElementVNode("text", { class: "text-sm mt-6" }, [
  20070. vue.createTextVNode("作者: "),
  20071. vue.createElementVNode(
  20072. "text",
  20073. null,
  20074. vue.toDisplayString($setup.detail.author),
  20075. 1
  20076. /* TEXT */
  20077. )
  20078. ]),
  20079. vue.createElementVNode("text", { class: "text-sm mt-6" }, [
  20080. vue.createTextVNode("出版社: "),
  20081. vue.createElementVNode(
  20082. "text",
  20083. null,
  20084. vue.toDisplayString($setup.detail.publish),
  20085. 1
  20086. /* TEXT */
  20087. )
  20088. ])
  20089. ])
  20090. ]),
  20091. vue.createElementVNode("view", {
  20092. class: "mt-20 bg-white price-info",
  20093. style: { "border-radius": "10rpx" }
  20094. }, [
  20095. vue.createElementVNode("view", { class: "flex" }, [
  20096. vue.createElementVNode("view", { class: "flex flex-a-c flex-1" }, [
  20097. vue.createElementVNode("text", { class: "label" }, "定价"),
  20098. vue.createElementVNode(
  20099. "text",
  20100. { class: "content" },
  20101. "¥" + vue.toDisplayString($setup.detail.price),
  20102. 1
  20103. /* TEXT */
  20104. )
  20105. ]),
  20106. vue.createElementVNode("view", { class: "flex flex-a-c flex-1" }, [
  20107. vue.createElementVNode("text", { class: "label" }, "回收折扣"),
  20108. vue.createElementVNode(
  20109. "text",
  20110. { class: "content" },
  20111. vue.toDisplayString($setup.detail.recycleDiscount) + "折",
  20112. 1
  20113. /* TEXT */
  20114. )
  20115. ])
  20116. ]),
  20117. vue.createElementVNode("view", { class: "flex flex-a-c" }, [
  20118. vue.createElementVNode("view", { class: "flex flex-a-c flex-1" }, [
  20119. vue.createElementVNode("text", { class: "label" }, "预估金额"),
  20120. vue.createElementVNode(
  20121. "text",
  20122. { class: "content" },
  20123. "¥" + vue.toDisplayString($setup.auditBook.expectMoney),
  20124. 1
  20125. /* TEXT */
  20126. )
  20127. ]),
  20128. vue.createElementVNode("view", { class: "flex flex-a-c flex-1" }, [
  20129. vue.createElementVNode("text", { class: "label" }, "审核金额"),
  20130. vue.createElementVNode(
  20131. "text",
  20132. { class: "content" },
  20133. "¥" + vue.toDisplayString($setup.auditBook.finalMoney || 0),
  20134. 1
  20135. /* TEXT */
  20136. )
  20137. ])
  20138. ])
  20139. ]),
  20140. vue.createElementVNode("view", { class: "mt-20" }, [
  20141. vue.createVNode(_component_u_subsection, {
  20142. list: $setup.list,
  20143. mode: "subsection",
  20144. current: $setup.current,
  20145. onChange: $setup.handleSectionChange
  20146. }, null, 8, ["list", "current"]),
  20147. vue.withDirectives(vue.createVNode($setup["AuditInfo"], {
  20148. detail: $setup.auditBook,
  20149. auditList: $setup.auditBook.auditCommentList,
  20150. ref: "auditInfoRef"
  20151. }, null, 8, ["detail", "auditList"]), [
  20152. [vue.vShow, $setup.current == 0]
  20153. ]),
  20154. vue.withDirectives(vue.createVNode($setup["FileInfo"], {
  20155. orderId: $setup.orderId,
  20156. annexType: 2,
  20157. isbn: $setup.isbnScan
  20158. }, null, 8, ["orderId", "isbn"]), [
  20159. [vue.vShow, $setup.current == 2]
  20160. ])
  20161. ]),
  20162. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  20163. vue.createVNode(_component_u_button, {
  20164. type: "warning",
  20165. size: "large",
  20166. onClick: $setup.handleScanCode
  20167. }, {
  20168. default: vue.withCtx(() => [
  20169. vue.createTextVNode("扫码")
  20170. ]),
  20171. _: 1
  20172. /* STABLE */
  20173. }),
  20174. vue.createVNode(_component_u_button, {
  20175. type: "primary",
  20176. size: "large",
  20177. onClick: $setup.handleAudit
  20178. }, {
  20179. default: vue.withCtx(() => [
  20180. vue.createTextVNode("确定")
  20181. ]),
  20182. _: 1
  20183. /* STABLE */
  20184. })
  20185. ])
  20186. ]);
  20187. }
  20188. const PagesIndexDetailBookAudit = /* @__PURE__ */ _export_sfc(_sfc_main$$, [["render", _sfc_render$_], ["__scopeId", "data-v-376f8a68"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/index/detail/book-audit.vue"]]);
  20189. const _sfc_main$_ = {
  20190. __name: "BookItem2",
  20191. props: {
  20192. item: Object,
  20193. showClose: {
  20194. type: Boolean,
  20195. default: false
  20196. }
  20197. },
  20198. emits: ["close"],
  20199. setup(__props, { expose: __expose, emit: __emit }) {
  20200. __expose();
  20201. const props2 = __props;
  20202. const emit2 = __emit;
  20203. const handleClose = () => {
  20204. emit2("close", props2.item.isbn);
  20205. };
  20206. const __returned__ = { props: props2, emit: emit2, handleClose, computed: vue.computed };
  20207. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  20208. return __returned__;
  20209. }
  20210. };
  20211. function _sfc_render$Z(_ctx, _cache, $props, $setup, $data, $options) {
  20212. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  20213. return vue.openBlock(), vue.createElementBlock(
  20214. "view",
  20215. {
  20216. class: vue.normalizeClass(["card", { "card-close": $props.showClose }])
  20217. },
  20218. [
  20219. vue.createElementVNode("view", { class: "flex w100" }, [
  20220. vue.createElementVNode("view", { class: "flex-d" }, [
  20221. vue.createElementVNode("image", {
  20222. style: { "width": "70px", "height": "90px" },
  20223. src: $props.item.cover,
  20224. mode: "aspectFill"
  20225. }, null, 8, ["src"]),
  20226. !$props.showClose ? (vue.openBlock(), vue.createElementBlock(
  20227. "view",
  20228. {
  20229. key: 0,
  20230. class: "quantity mt-24"
  20231. },
  20232. "数量: " + vue.toDisplayString($props.item.num),
  20233. 1
  20234. /* TEXT */
  20235. )) : vue.createCommentVNode("v-if", true)
  20236. ]),
  20237. vue.createElementVNode("view", { class: "book-info ml-20 flex-1" }, [
  20238. vue.createElementVNode(
  20239. "view",
  20240. { class: "common-title mb-20" },
  20241. vue.toDisplayString($props.item.bookName),
  20242. 1
  20243. /* TEXT */
  20244. ),
  20245. vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
  20246. vue.createElementVNode(
  20247. "view",
  20248. { class: "isbn" },
  20249. "ISBN: " + vue.toDisplayString($props.item.isbn),
  20250. 1
  20251. /* TEXT */
  20252. ),
  20253. vue.createElementVNode(
  20254. "view",
  20255. { class: "set" },
  20256. "套装: " + vue.toDisplayString($props.item.suit == 1 ? "是" : "不是"),
  20257. 1
  20258. /* TEXT */
  20259. )
  20260. ]),
  20261. vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
  20262. vue.createElementVNode(
  20263. "view",
  20264. { class: "price" },
  20265. "定价: " + vue.toDisplayString($props.item.price),
  20266. 1
  20267. /* TEXT */
  20268. ),
  20269. vue.createElementVNode(
  20270. "view",
  20271. { class: "estimate" },
  20272. "预估单价: " + vue.toDisplayString($props.item.expectMoney || 0),
  20273. 1
  20274. /* TEXT */
  20275. )
  20276. ]),
  20277. vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
  20278. vue.createElementVNode(
  20279. "view",
  20280. { class: "discount" },
  20281. "回收折扣: " + vue.toDisplayString($props.item.recycleDiscount),
  20282. 1
  20283. /* TEXT */
  20284. ),
  20285. vue.createElementVNode("view", { class: "review" }, [
  20286. vue.createTextVNode("审核金额: "),
  20287. vue.createElementVNode(
  20288. "text",
  20289. { class: "color-red" },
  20290. vue.toDisplayString($props.item.review || 0),
  20291. 1
  20292. /* TEXT */
  20293. )
  20294. ])
  20295. ])
  20296. ])
  20297. ]),
  20298. $props.showClose ? (vue.openBlock(), vue.createElementBlock("view", {
  20299. key: 0,
  20300. class: "quantity-icon mt-24"
  20301. }, [
  20302. vue.createVNode(_component_u_icon, {
  20303. name: "close-circle-fill",
  20304. size: "18",
  20305. color: "#999",
  20306. onClick: $setup.handleClose
  20307. })
  20308. ])) : vue.createCommentVNode("v-if", true)
  20309. ],
  20310. 2
  20311. /* CLASS */
  20312. );
  20313. }
  20314. const BookItem$1 = /* @__PURE__ */ _export_sfc(_sfc_main$_, [["render", _sfc_render$Z], ["__scopeId", "data-v-469f67ea"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/index/detail/components/BookItem2.vue"]]);
  20315. const _sfc_main$Z = {
  20316. __name: "batch-audit",
  20317. setup(__props, { expose: __expose }) {
  20318. __expose();
  20319. const detailMap = vue.ref({});
  20320. const scannedBooksDetail = vue.ref([]);
  20321. const getBookInfo = (isbn) => {
  20322. if (detailMap.value[isbn]) {
  20323. scannedBooksDetail.value.push(detailMap.value[isbn]);
  20324. return;
  20325. }
  20326. uni.$u.http.get(`/app/book/getSimpleBookInfoByIsbn/${isbn}`).then((res) => {
  20327. if (res.code == 200) {
  20328. detailMap.value[isbn] = res.data;
  20329. scannedBooksDetail.value.push(res.data);
  20330. }
  20331. });
  20332. };
  20333. const handleClose = (index2, isbn) => {
  20334. scannedBooksDetail.value.splice(index2, 1);
  20335. scannedBooks.value = scannedBooks.value.filter((item) => item != isbn);
  20336. };
  20337. function checkIsbn(isbn) {
  20338. const isbn13Regex = /^(?:97[89]-?\d{1,5}-?\d{1,7}-?\d{1,6}-?\d)$/;
  20339. if (isbn13Regex.test(isbn)) {
  20340. return true;
  20341. }
  20342. return false;
  20343. }
  20344. const scannedBooks = vue.ref([]);
  20345. function handleScan2(isbn) {
  20346. var _a;
  20347. if (!checkIsbn(isbn)) {
  20348. let text = `不是正确的ISBN码`;
  20349. uni.$u.ttsModule.speak(text);
  20350. return;
  20351. }
  20352. let isbnStr = `${isbn.slice(-4)}`;
  20353. let isbns = orderDetail.value.detailVoList.map((item) => item.isbn);
  20354. if (isbns.includes(isbn)) {
  20355. let book = orderDetail.value.detailVoList.find(
  20356. (item) => item.isbn == isbn
  20357. );
  20358. if (((_a = book.auditCommentList) == null ? void 0 : _a.length) > 0) {
  20359. let notAuditNum = book.auditCommentList.filter((item) => item.sts === 0).length || 0;
  20360. let scannedNum = scannedBooks.value.filter((item) => item == isbn).length || 0;
  20361. if (scannedNum >= notAuditNum) {
  20362. let text = `${isbnStr}已超出订单中的数量`;
  20363. return uni.$u.ttsModule.speak(text);
  20364. } else {
  20365. if (book.suit == 1) {
  20366. let text = `${isbnStr}请注意套装书是否齐全`;
  20367. uni.$u.ttsModule.speak(text);
  20368. }
  20369. if (book.bookWarn == 1) {
  20370. let text = `请注意${isbnStr}需要取出`;
  20371. uni.$u.ttsModule.speak(text);
  20372. }
  20373. scannedBooks.value.push(isbn);
  20374. getBookInfo(isbn);
  20375. }
  20376. }
  20377. } else {
  20378. let text = `此订单中不存在${isbnStr}这本书 `;
  20379. uni.$u.ttsModule.speak(text);
  20380. }
  20381. }
  20382. function handleScanCode() {
  20383. uni.scanCode({
  20384. success: (res) => {
  20385. handleScan2(res.result);
  20386. }
  20387. });
  20388. }
  20389. const checkUserId = vue.ref();
  20390. const orderId = vue.ref();
  20391. const orderDetail = vue.ref({});
  20392. const showModal = vue.ref(false);
  20393. const isQualitySelected = vue.ref(false);
  20394. const showQualityModal = () => {
  20395. showModal.value = true;
  20396. };
  20397. const closeModal = () => {
  20398. showModal.value = false;
  20399. playGlobalSound();
  20400. };
  20401. function playGlobalSound() {
  20402. uni.$u.playClickSound();
  20403. }
  20404. const toggleQuality = () => {
  20405. isQualitySelected.value = !isQualitySelected.value;
  20406. };
  20407. const handleAudit = () => {
  20408. playGlobalSound();
  20409. if (!isQualitySelected.value) {
  20410. uni.$u.toast("请选择品相");
  20411. uni.$u.ttsModule.speak("请选择品相");
  20412. return;
  20413. }
  20414. let checkUserInfo = uni.getStorageSync("checkUserInfo");
  20415. if (checkUserInfo.userId) {
  20416. checkUserId.value = checkUserInfo.userId;
  20417. }
  20418. uni.$u.http.post("/app/orderinfo/checkOrderBatch", {
  20419. checkUserId: checkUserId.value,
  20420. orderId: orderId.value,
  20421. checkList: scannedBooks.value.map((isbn) => ({
  20422. sts: 1,
  20423. com: "",
  20424. isbn
  20425. }))
  20426. }).then((res) => {
  20427. if (res.code == 200) {
  20428. uni.showToast({ title: "审核成功", icon: "none" });
  20429. uni.$u.ttsModule.speak("审核成功");
  20430. uni.navigateBack({ delta: 2 });
  20431. } else {
  20432. uni.$u.toast(res.msg);
  20433. }
  20434. });
  20435. };
  20436. const { unregister, register } = uni.$u.useEventListener((e) => {
  20437. if (e.barcode) {
  20438. handleScan2(e.barcode);
  20439. }
  20440. }, true);
  20441. onLoad((options) => {
  20442. orderId.value = options.orderId;
  20443. orderDetail.value = uni.getStorageSync("orderDetail");
  20444. if (options.isbn) {
  20445. scannedBooks.value = [options.isbn];
  20446. if (options.isbn2) {
  20447. scannedBooks.value.push(options.isbn2);
  20448. }
  20449. scannedBooks.value.forEach((isbn) => {
  20450. getBookInfo(isbn);
  20451. });
  20452. }
  20453. });
  20454. onShow(() => {
  20455. var _a;
  20456. checkUserId.value = (_a = uni.getStorageSync("userInfo")) == null ? void 0 : _a.userId;
  20457. orderDetail.value = uni.getStorageSync("orderDetail");
  20458. register();
  20459. });
  20460. vue.onUnmounted(() => {
  20461. unregister();
  20462. });
  20463. const __returned__ = { detailMap, scannedBooksDetail, getBookInfo, handleClose, checkIsbn, scannedBooks, handleScan: handleScan2, handleScanCode, checkUserId, orderId, orderDetail, showModal, isQualitySelected, showQualityModal, closeModal, playGlobalSound, toggleQuality, handleAudit, unregister, register, ref: vue.ref, onUnmounted: vue.onUnmounted, get onLoad() {
  20464. return onLoad;
  20465. }, get onShow() {
  20466. return onShow;
  20467. }, BookItem: BookItem$1 };
  20468. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  20469. return __returned__;
  20470. }
  20471. };
  20472. function _sfc_render$Y(_ctx, _cache, $props, $setup, $data, $options) {
  20473. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  20474. const _component_u_modal = resolveEasycom(vue.resolveDynamicComponent("u-modal"), __easycom_1$3);
  20475. return vue.openBlock(), vue.createElementBlock("view", { class: "batch-audit" }, [
  20476. (vue.openBlock(true), vue.createElementBlock(
  20477. vue.Fragment,
  20478. null,
  20479. vue.renderList($setup.scannedBooksDetail, (item, index2) => {
  20480. return vue.openBlock(), vue.createBlock($setup["BookItem"], {
  20481. key: item.isbn,
  20482. item,
  20483. showClose: "",
  20484. onClose: (isbn) => $setup.handleClose(index2, isbn)
  20485. }, null, 8, ["item", "onClose"]);
  20486. }),
  20487. 128
  20488. /* KEYED_FRAGMENT */
  20489. )),
  20490. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  20491. vue.createVNode(_component_u_button, {
  20492. type: "warning",
  20493. size: "large",
  20494. onClick: $setup.handleScanCode
  20495. }, {
  20496. default: vue.withCtx(() => [
  20497. vue.createTextVNode("扫码")
  20498. ]),
  20499. _: 1
  20500. /* STABLE */
  20501. }),
  20502. vue.createVNode(_component_u_button, {
  20503. type: "primary",
  20504. size: "large",
  20505. onClick: $setup.showQualityModal
  20506. }, {
  20507. default: vue.withCtx(() => [
  20508. vue.createTextVNode("确定")
  20509. ]),
  20510. _: 1
  20511. /* STABLE */
  20512. })
  20513. ]),
  20514. vue.createVNode(_component_u_modal, {
  20515. show: $setup.showModal,
  20516. title: "品相选择",
  20517. onCancel: $setup.closeModal,
  20518. showCancelButton: true,
  20519. closeOnClickOverlay: true,
  20520. onConfirm: $setup.handleAudit
  20521. }, {
  20522. default: vue.withCtx(() => [
  20523. vue.createElementVNode("view", {
  20524. class: "quality-selector",
  20525. onClick: $setup.playGlobalSound
  20526. }, [
  20527. vue.createElementVNode(
  20528. "view",
  20529. {
  20530. class: vue.normalizeClass(["quality-circle", { selected: $setup.isQualitySelected }]),
  20531. onClick: $setup.toggleQuality
  20532. },
  20533. [
  20534. vue.createElementVNode("text", null, "良好")
  20535. ],
  20536. 2
  20537. /* CLASS */
  20538. )
  20539. ])
  20540. ]),
  20541. _: 1
  20542. /* STABLE */
  20543. }, 8, ["show"])
  20544. ]);
  20545. }
  20546. const PagesIndexDetailBatchAudit = /* @__PURE__ */ _export_sfc(_sfc_main$Z, [["render", _sfc_render$Y], ["__scopeId", "data-v-bc156c69"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/index/detail/batch-audit.vue"]]);
  20547. const _sfc_main$Y = {
  20548. __name: "sender",
  20549. setup(__props, { expose: __expose }) {
  20550. __expose();
  20551. function playGlobalSound() {
  20552. uni.$u.playClickSound();
  20553. }
  20554. const otherParams = vue.ref({
  20555. search: ""
  20556. });
  20557. const scrollRef = vue.ref(null);
  20558. const refreshList = () => {
  20559. var _a;
  20560. (_a = scrollRef.value) == null ? void 0 : _a.resetUpScroll();
  20561. };
  20562. let dataList = vue.ref([]);
  20563. const updateList = (data, page2) => {
  20564. dataList.value = data;
  20565. if (!isSearch.value)
  20566. return;
  20567. if (data.length > 0) {
  20568. uni.$u.ttsModule.speak("查询到" + data.length + "条数据");
  20569. } else {
  20570. uni.$u.ttsModule.speak("未查询到数据");
  20571. }
  20572. isSearch.value = false;
  20573. };
  20574. const isSearch = vue.ref(false);
  20575. const handleSearch = () => {
  20576. isSearch.value = true;
  20577. refreshList();
  20578. };
  20579. const __returned__ = { playGlobalSound, otherParams, scrollRef, refreshList, get dataList() {
  20580. return dataList;
  20581. }, set dataList(v) {
  20582. dataList = v;
  20583. }, updateList, isSearch, handleSearch, reactive: vue.reactive, PageScroll, OrderItem: orderItem, ref: vue.ref, get onLoad() {
  20584. return onLoad;
  20585. } };
  20586. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  20587. return __returned__;
  20588. }
  20589. };
  20590. function _sfc_render$X(_ctx, _cache, $props, $setup, $data, $options) {
  20591. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$4);
  20592. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_0$7);
  20593. return vue.openBlock(), vue.createElementBlock("view", {
  20594. class: "common-page",
  20595. style: { "padding": "0" },
  20596. onClick: $setup.playGlobalSound
  20597. }, [
  20598. vue.createVNode($setup["PageScroll"], {
  20599. requestStr: "/app/orderinfo/getOrderListByUserInfo",
  20600. onUpdateList: $setup.updateList,
  20601. ref: "scrollRef",
  20602. otherParams: $setup.otherParams,
  20603. immediate: false
  20604. }, {
  20605. default: vue.withCtx(() => [
  20606. vue.createVNode(_component_u_sticky, { customNavHeight: 0 }, {
  20607. default: vue.withCtx(() => [
  20608. vue.createElementVNode("view", { class: "search-area" }, [
  20609. vue.createVNode(_component_u_search, {
  20610. placeholder: "请输入发件人姓名或电话",
  20611. searchIconSize: 18,
  20612. bgColor: "#f6f7f6",
  20613. onSearch: $setup.handleSearch,
  20614. modelValue: $setup.otherParams.search,
  20615. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.otherParams.search = $event),
  20616. "custom-style": "font-size:32rpx",
  20617. "placeholder-style": "font-size:32rpx",
  20618. clearabled: true,
  20619. focus: false,
  20620. showAction: false,
  20621. height: 36
  20622. }, null, 8, ["modelValue"])
  20623. ])
  20624. ]),
  20625. _: 1
  20626. /* STABLE */
  20627. }),
  20628. $setup.dataList.length ? (vue.openBlock(), vue.createElementBlock("view", {
  20629. key: 0,
  20630. class: "list-con"
  20631. }, [
  20632. (vue.openBlock(true), vue.createElementBlock(
  20633. vue.Fragment,
  20634. null,
  20635. vue.renderList($setup.dataList, (cell) => {
  20636. return vue.openBlock(), vue.createBlock($setup["OrderItem"], {
  20637. key: cell.id,
  20638. item: cell,
  20639. class: "mt-20"
  20640. }, null, 8, ["item"]);
  20641. }),
  20642. 128
  20643. /* KEYED_FRAGMENT */
  20644. ))
  20645. ])) : vue.createCommentVNode("v-if", true)
  20646. ]),
  20647. _: 1
  20648. /* STABLE */
  20649. }, 8, ["otherParams"])
  20650. ]);
  20651. }
  20652. const PagesIndexAuditSender = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["render", _sfc_render$X], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/index/audit/sender.vue"]]);
  20653. const _sfc_main$X = {
  20654. __name: "audit",
  20655. setup(__props, { expose: __expose }) {
  20656. __expose();
  20657. const scrollRef = vue.ref(null);
  20658. let dataList = vue.ref([]);
  20659. const updateList = (data) => {
  20660. dataList.value = data;
  20661. };
  20662. const __returned__ = { scrollRef, get dataList() {
  20663. return dataList;
  20664. }, set dataList(v) {
  20665. dataList = v;
  20666. }, updateList, PageScroll, ref: vue.ref };
  20667. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  20668. return __returned__;
  20669. }
  20670. };
  20671. function _sfc_render$W(_ctx, _cache, $props, $setup, $data, $options) {
  20672. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_0$7);
  20673. return vue.openBlock(), vue.createElementBlock("view", {
  20674. class: "common-page",
  20675. style: { "padding": "0" }
  20676. }, [
  20677. vue.createVNode(
  20678. $setup["PageScroll"],
  20679. {
  20680. requestStr: "/app/orderStat/bookcheckStat",
  20681. onUpdateList: $setup.updateList,
  20682. ref: "scrollRef"
  20683. },
  20684. {
  20685. default: vue.withCtx(() => [
  20686. vue.createVNode(_component_u_sticky, { customNavHeight: 0 }, {
  20687. default: vue.withCtx(() => [
  20688. vue.createElementVNode("view", { class: "search-area flex-a" }, [
  20689. vue.createElementVNode("view", { class: "text-item flex-1" }, "审核日期"),
  20690. vue.createElementVNode("view", { class: "text-item flex-1" }, "订单数量"),
  20691. vue.createElementVNode("view", { class: "text-item flex-1" }, "审书数量"),
  20692. vue.createElementVNode("view", { class: "text-item flex-1" }, "实际回收")
  20693. ])
  20694. ]),
  20695. _: 1
  20696. /* STABLE */
  20697. }),
  20698. vue.createElementVNode("view", { class: "list-con" }, [
  20699. (vue.openBlock(true), vue.createElementBlock(
  20700. vue.Fragment,
  20701. null,
  20702. vue.renderList($setup.dataList, (item, index2) => {
  20703. return vue.openBlock(), vue.createElementBlock("view", {
  20704. key: index2,
  20705. class: "flex-a"
  20706. }, [
  20707. vue.createElementVNode(
  20708. "view",
  20709. { class: "text-item flex-1" },
  20710. vue.toDisplayString(item.statDate),
  20711. 1
  20712. /* TEXT */
  20713. ),
  20714. vue.createElementVNode(
  20715. "view",
  20716. { class: "text-item flex-1" },
  20717. vue.toDisplayString(item.orderNum),
  20718. 1
  20719. /* TEXT */
  20720. ),
  20721. vue.createElementVNode(
  20722. "view",
  20723. { class: "text-item flex-1" },
  20724. vue.toDisplayString(item.checkBookNum),
  20725. 1
  20726. /* TEXT */
  20727. ),
  20728. vue.createElementVNode(
  20729. "view",
  20730. { class: "text-item flex-1" },
  20731. vue.toDisplayString(item.recycleBookNum),
  20732. 1
  20733. /* TEXT */
  20734. )
  20735. ]);
  20736. }),
  20737. 128
  20738. /* KEYED_FRAGMENT */
  20739. ))
  20740. ])
  20741. ]),
  20742. _: 1
  20743. /* STABLE */
  20744. },
  20745. 512
  20746. /* NEED_PATCH */
  20747. )
  20748. ]);
  20749. }
  20750. const PagesIndexStatisticAudit = /* @__PURE__ */ _export_sfc(_sfc_main$X, [["render", _sfc_render$W], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/index/statistic/audit.vue"]]);
  20751. const icons = {
  20752. "id": "2852637",
  20753. "name": "uniui图标库",
  20754. "font_family": "uniicons",
  20755. "css_prefix_text": "uniui-",
  20756. "description": "",
  20757. "glyphs": [
  20758. {
  20759. "icon_id": "25027049",
  20760. "name": "yanse",
  20761. "font_class": "color",
  20762. "unicode": "e6cf",
  20763. "unicode_decimal": 59087
  20764. },
  20765. {
  20766. "icon_id": "25027048",
  20767. "name": "wallet",
  20768. "font_class": "wallet",
  20769. "unicode": "e6b1",
  20770. "unicode_decimal": 59057
  20771. },
  20772. {
  20773. "icon_id": "25015720",
  20774. "name": "settings-filled",
  20775. "font_class": "settings-filled",
  20776. "unicode": "e6ce",
  20777. "unicode_decimal": 59086
  20778. },
  20779. {
  20780. "icon_id": "25015434",
  20781. "name": "shimingrenzheng-filled",
  20782. "font_class": "auth-filled",
  20783. "unicode": "e6cc",
  20784. "unicode_decimal": 59084
  20785. },
  20786. {
  20787. "icon_id": "24934246",
  20788. "name": "shop-filled",
  20789. "font_class": "shop-filled",
  20790. "unicode": "e6cd",
  20791. "unicode_decimal": 59085
  20792. },
  20793. {
  20794. "icon_id": "24934159",
  20795. "name": "staff-filled-01",
  20796. "font_class": "staff-filled",
  20797. "unicode": "e6cb",
  20798. "unicode_decimal": 59083
  20799. },
  20800. {
  20801. "icon_id": "24932461",
  20802. "name": "VIP-filled",
  20803. "font_class": "vip-filled",
  20804. "unicode": "e6c6",
  20805. "unicode_decimal": 59078
  20806. },
  20807. {
  20808. "icon_id": "24932462",
  20809. "name": "plus_circle_fill",
  20810. "font_class": "plus-filled",
  20811. "unicode": "e6c7",
  20812. "unicode_decimal": 59079
  20813. },
  20814. {
  20815. "icon_id": "24932463",
  20816. "name": "folder_add-filled",
  20817. "font_class": "folder-add-filled",
  20818. "unicode": "e6c8",
  20819. "unicode_decimal": 59080
  20820. },
  20821. {
  20822. "icon_id": "24932464",
  20823. "name": "yanse-filled",
  20824. "font_class": "color-filled",
  20825. "unicode": "e6c9",
  20826. "unicode_decimal": 59081
  20827. },
  20828. {
  20829. "icon_id": "24932465",
  20830. "name": "tune-filled",
  20831. "font_class": "tune-filled",
  20832. "unicode": "e6ca",
  20833. "unicode_decimal": 59082
  20834. },
  20835. {
  20836. "icon_id": "24932455",
  20837. "name": "a-rilidaka-filled",
  20838. "font_class": "calendar-filled",
  20839. "unicode": "e6c0",
  20840. "unicode_decimal": 59072
  20841. },
  20842. {
  20843. "icon_id": "24932456",
  20844. "name": "notification-filled",
  20845. "font_class": "notification-filled",
  20846. "unicode": "e6c1",
  20847. "unicode_decimal": 59073
  20848. },
  20849. {
  20850. "icon_id": "24932457",
  20851. "name": "wallet-filled",
  20852. "font_class": "wallet-filled",
  20853. "unicode": "e6c2",
  20854. "unicode_decimal": 59074
  20855. },
  20856. {
  20857. "icon_id": "24932458",
  20858. "name": "paihangbang-filled",
  20859. "font_class": "medal-filled",
  20860. "unicode": "e6c3",
  20861. "unicode_decimal": 59075
  20862. },
  20863. {
  20864. "icon_id": "24932459",
  20865. "name": "gift-filled",
  20866. "font_class": "gift-filled",
  20867. "unicode": "e6c4",
  20868. "unicode_decimal": 59076
  20869. },
  20870. {
  20871. "icon_id": "24932460",
  20872. "name": "fire-filled",
  20873. "font_class": "fire-filled",
  20874. "unicode": "e6c5",
  20875. "unicode_decimal": 59077
  20876. },
  20877. {
  20878. "icon_id": "24928001",
  20879. "name": "refreshempty",
  20880. "font_class": "refreshempty",
  20881. "unicode": "e6bf",
  20882. "unicode_decimal": 59071
  20883. },
  20884. {
  20885. "icon_id": "24926853",
  20886. "name": "location-ellipse",
  20887. "font_class": "location-filled",
  20888. "unicode": "e6af",
  20889. "unicode_decimal": 59055
  20890. },
  20891. {
  20892. "icon_id": "24926735",
  20893. "name": "person-filled",
  20894. "font_class": "person-filled",
  20895. "unicode": "e69d",
  20896. "unicode_decimal": 59037
  20897. },
  20898. {
  20899. "icon_id": "24926703",
  20900. "name": "personadd-filled",
  20901. "font_class": "personadd-filled",
  20902. "unicode": "e698",
  20903. "unicode_decimal": 59032
  20904. },
  20905. {
  20906. "icon_id": "24923351",
  20907. "name": "back",
  20908. "font_class": "back",
  20909. "unicode": "e6b9",
  20910. "unicode_decimal": 59065
  20911. },
  20912. {
  20913. "icon_id": "24923352",
  20914. "name": "forward",
  20915. "font_class": "forward",
  20916. "unicode": "e6ba",
  20917. "unicode_decimal": 59066
  20918. },
  20919. {
  20920. "icon_id": "24923353",
  20921. "name": "arrowthinright",
  20922. "font_class": "arrow-right",
  20923. "unicode": "e6bb",
  20924. "unicode_decimal": 59067
  20925. },
  20926. {
  20927. "icon_id": "24923353",
  20928. "name": "arrowthinright",
  20929. "font_class": "arrowthinright",
  20930. "unicode": "e6bb",
  20931. "unicode_decimal": 59067
  20932. },
  20933. {
  20934. "icon_id": "24923354",
  20935. "name": "arrowthinleft",
  20936. "font_class": "arrow-left",
  20937. "unicode": "e6bc",
  20938. "unicode_decimal": 59068
  20939. },
  20940. {
  20941. "icon_id": "24923354",
  20942. "name": "arrowthinleft",
  20943. "font_class": "arrowthinleft",
  20944. "unicode": "e6bc",
  20945. "unicode_decimal": 59068
  20946. },
  20947. {
  20948. "icon_id": "24923355",
  20949. "name": "arrowthinup",
  20950. "font_class": "arrow-up",
  20951. "unicode": "e6bd",
  20952. "unicode_decimal": 59069
  20953. },
  20954. {
  20955. "icon_id": "24923355",
  20956. "name": "arrowthinup",
  20957. "font_class": "arrowthinup",
  20958. "unicode": "e6bd",
  20959. "unicode_decimal": 59069
  20960. },
  20961. {
  20962. "icon_id": "24923356",
  20963. "name": "arrowthindown",
  20964. "font_class": "arrow-down",
  20965. "unicode": "e6be",
  20966. "unicode_decimal": 59070
  20967. },
  20968. {
  20969. "icon_id": "24923356",
  20970. "name": "arrowthindown",
  20971. "font_class": "arrowthindown",
  20972. "unicode": "e6be",
  20973. "unicode_decimal": 59070
  20974. },
  20975. {
  20976. "icon_id": "24923349",
  20977. "name": "arrowdown",
  20978. "font_class": "bottom",
  20979. "unicode": "e6b8",
  20980. "unicode_decimal": 59064
  20981. },
  20982. {
  20983. "icon_id": "24923349",
  20984. "name": "arrowdown",
  20985. "font_class": "arrowdown",
  20986. "unicode": "e6b8",
  20987. "unicode_decimal": 59064
  20988. },
  20989. {
  20990. "icon_id": "24923346",
  20991. "name": "arrowright",
  20992. "font_class": "right",
  20993. "unicode": "e6b5",
  20994. "unicode_decimal": 59061
  20995. },
  20996. {
  20997. "icon_id": "24923346",
  20998. "name": "arrowright",
  20999. "font_class": "arrowright",
  21000. "unicode": "e6b5",
  21001. "unicode_decimal": 59061
  21002. },
  21003. {
  21004. "icon_id": "24923347",
  21005. "name": "arrowup",
  21006. "font_class": "top",
  21007. "unicode": "e6b6",
  21008. "unicode_decimal": 59062
  21009. },
  21010. {
  21011. "icon_id": "24923347",
  21012. "name": "arrowup",
  21013. "font_class": "arrowup",
  21014. "unicode": "e6b6",
  21015. "unicode_decimal": 59062
  21016. },
  21017. {
  21018. "icon_id": "24923348",
  21019. "name": "arrowleft",
  21020. "font_class": "left",
  21021. "unicode": "e6b7",
  21022. "unicode_decimal": 59063
  21023. },
  21024. {
  21025. "icon_id": "24923348",
  21026. "name": "arrowleft",
  21027. "font_class": "arrowleft",
  21028. "unicode": "e6b7",
  21029. "unicode_decimal": 59063
  21030. },
  21031. {
  21032. "icon_id": "24923334",
  21033. "name": "eye",
  21034. "font_class": "eye",
  21035. "unicode": "e651",
  21036. "unicode_decimal": 58961
  21037. },
  21038. {
  21039. "icon_id": "24923335",
  21040. "name": "eye-filled",
  21041. "font_class": "eye-filled",
  21042. "unicode": "e66a",
  21043. "unicode_decimal": 58986
  21044. },
  21045. {
  21046. "icon_id": "24923336",
  21047. "name": "eye-slash",
  21048. "font_class": "eye-slash",
  21049. "unicode": "e6b3",
  21050. "unicode_decimal": 59059
  21051. },
  21052. {
  21053. "icon_id": "24923337",
  21054. "name": "eye-slash-filled",
  21055. "font_class": "eye-slash-filled",
  21056. "unicode": "e6b4",
  21057. "unicode_decimal": 59060
  21058. },
  21059. {
  21060. "icon_id": "24923305",
  21061. "name": "info-filled",
  21062. "font_class": "info-filled",
  21063. "unicode": "e649",
  21064. "unicode_decimal": 58953
  21065. },
  21066. {
  21067. "icon_id": "24923299",
  21068. "name": "reload-01",
  21069. "font_class": "reload",
  21070. "unicode": "e6b2",
  21071. "unicode_decimal": 59058
  21072. },
  21073. {
  21074. "icon_id": "24923195",
  21075. "name": "mic_slash_fill",
  21076. "font_class": "micoff-filled",
  21077. "unicode": "e6b0",
  21078. "unicode_decimal": 59056
  21079. },
  21080. {
  21081. "icon_id": "24923165",
  21082. "name": "map-pin-ellipse",
  21083. "font_class": "map-pin-ellipse",
  21084. "unicode": "e6ac",
  21085. "unicode_decimal": 59052
  21086. },
  21087. {
  21088. "icon_id": "24923166",
  21089. "name": "map-pin",
  21090. "font_class": "map-pin",
  21091. "unicode": "e6ad",
  21092. "unicode_decimal": 59053
  21093. },
  21094. {
  21095. "icon_id": "24923167",
  21096. "name": "location",
  21097. "font_class": "location",
  21098. "unicode": "e6ae",
  21099. "unicode_decimal": 59054
  21100. },
  21101. {
  21102. "icon_id": "24923064",
  21103. "name": "starhalf",
  21104. "font_class": "starhalf",
  21105. "unicode": "e683",
  21106. "unicode_decimal": 59011
  21107. },
  21108. {
  21109. "icon_id": "24923065",
  21110. "name": "star",
  21111. "font_class": "star",
  21112. "unicode": "e688",
  21113. "unicode_decimal": 59016
  21114. },
  21115. {
  21116. "icon_id": "24923066",
  21117. "name": "star-filled",
  21118. "font_class": "star-filled",
  21119. "unicode": "e68f",
  21120. "unicode_decimal": 59023
  21121. },
  21122. {
  21123. "icon_id": "24899646",
  21124. "name": "a-rilidaka",
  21125. "font_class": "calendar",
  21126. "unicode": "e6a0",
  21127. "unicode_decimal": 59040
  21128. },
  21129. {
  21130. "icon_id": "24899647",
  21131. "name": "fire",
  21132. "font_class": "fire",
  21133. "unicode": "e6a1",
  21134. "unicode_decimal": 59041
  21135. },
  21136. {
  21137. "icon_id": "24899648",
  21138. "name": "paihangbang",
  21139. "font_class": "medal",
  21140. "unicode": "e6a2",
  21141. "unicode_decimal": 59042
  21142. },
  21143. {
  21144. "icon_id": "24899649",
  21145. "name": "font",
  21146. "font_class": "font",
  21147. "unicode": "e6a3",
  21148. "unicode_decimal": 59043
  21149. },
  21150. {
  21151. "icon_id": "24899650",
  21152. "name": "gift",
  21153. "font_class": "gift",
  21154. "unicode": "e6a4",
  21155. "unicode_decimal": 59044
  21156. },
  21157. {
  21158. "icon_id": "24899651",
  21159. "name": "link",
  21160. "font_class": "link",
  21161. "unicode": "e6a5",
  21162. "unicode_decimal": 59045
  21163. },
  21164. {
  21165. "icon_id": "24899652",
  21166. "name": "notification",
  21167. "font_class": "notification",
  21168. "unicode": "e6a6",
  21169. "unicode_decimal": 59046
  21170. },
  21171. {
  21172. "icon_id": "24899653",
  21173. "name": "staff",
  21174. "font_class": "staff",
  21175. "unicode": "e6a7",
  21176. "unicode_decimal": 59047
  21177. },
  21178. {
  21179. "icon_id": "24899654",
  21180. "name": "VIP",
  21181. "font_class": "vip",
  21182. "unicode": "e6a8",
  21183. "unicode_decimal": 59048
  21184. },
  21185. {
  21186. "icon_id": "24899655",
  21187. "name": "folder_add",
  21188. "font_class": "folder-add",
  21189. "unicode": "e6a9",
  21190. "unicode_decimal": 59049
  21191. },
  21192. {
  21193. "icon_id": "24899656",
  21194. "name": "tune",
  21195. "font_class": "tune",
  21196. "unicode": "e6aa",
  21197. "unicode_decimal": 59050
  21198. },
  21199. {
  21200. "icon_id": "24899657",
  21201. "name": "shimingrenzheng",
  21202. "font_class": "auth",
  21203. "unicode": "e6ab",
  21204. "unicode_decimal": 59051
  21205. },
  21206. {
  21207. "icon_id": "24899565",
  21208. "name": "person",
  21209. "font_class": "person",
  21210. "unicode": "e699",
  21211. "unicode_decimal": 59033
  21212. },
  21213. {
  21214. "icon_id": "24899566",
  21215. "name": "email-filled",
  21216. "font_class": "email-filled",
  21217. "unicode": "e69a",
  21218. "unicode_decimal": 59034
  21219. },
  21220. {
  21221. "icon_id": "24899567",
  21222. "name": "phone-filled",
  21223. "font_class": "phone-filled",
  21224. "unicode": "e69b",
  21225. "unicode_decimal": 59035
  21226. },
  21227. {
  21228. "icon_id": "24899568",
  21229. "name": "phone",
  21230. "font_class": "phone",
  21231. "unicode": "e69c",
  21232. "unicode_decimal": 59036
  21233. },
  21234. {
  21235. "icon_id": "24899570",
  21236. "name": "email",
  21237. "font_class": "email",
  21238. "unicode": "e69e",
  21239. "unicode_decimal": 59038
  21240. },
  21241. {
  21242. "icon_id": "24899571",
  21243. "name": "personadd",
  21244. "font_class": "personadd",
  21245. "unicode": "e69f",
  21246. "unicode_decimal": 59039
  21247. },
  21248. {
  21249. "icon_id": "24899558",
  21250. "name": "chatboxes-filled",
  21251. "font_class": "chatboxes-filled",
  21252. "unicode": "e692",
  21253. "unicode_decimal": 59026
  21254. },
  21255. {
  21256. "icon_id": "24899559",
  21257. "name": "contact",
  21258. "font_class": "contact",
  21259. "unicode": "e693",
  21260. "unicode_decimal": 59027
  21261. },
  21262. {
  21263. "icon_id": "24899560",
  21264. "name": "chatbubble-filled",
  21265. "font_class": "chatbubble-filled",
  21266. "unicode": "e694",
  21267. "unicode_decimal": 59028
  21268. },
  21269. {
  21270. "icon_id": "24899561",
  21271. "name": "contact-filled",
  21272. "font_class": "contact-filled",
  21273. "unicode": "e695",
  21274. "unicode_decimal": 59029
  21275. },
  21276. {
  21277. "icon_id": "24899562",
  21278. "name": "chatboxes",
  21279. "font_class": "chatboxes",
  21280. "unicode": "e696",
  21281. "unicode_decimal": 59030
  21282. },
  21283. {
  21284. "icon_id": "24899563",
  21285. "name": "chatbubble",
  21286. "font_class": "chatbubble",
  21287. "unicode": "e697",
  21288. "unicode_decimal": 59031
  21289. },
  21290. {
  21291. "icon_id": "24881290",
  21292. "name": "upload-filled",
  21293. "font_class": "upload-filled",
  21294. "unicode": "e68e",
  21295. "unicode_decimal": 59022
  21296. },
  21297. {
  21298. "icon_id": "24881292",
  21299. "name": "upload",
  21300. "font_class": "upload",
  21301. "unicode": "e690",
  21302. "unicode_decimal": 59024
  21303. },
  21304. {
  21305. "icon_id": "24881293",
  21306. "name": "weixin",
  21307. "font_class": "weixin",
  21308. "unicode": "e691",
  21309. "unicode_decimal": 59025
  21310. },
  21311. {
  21312. "icon_id": "24881274",
  21313. "name": "compose",
  21314. "font_class": "compose",
  21315. "unicode": "e67f",
  21316. "unicode_decimal": 59007
  21317. },
  21318. {
  21319. "icon_id": "24881275",
  21320. "name": "qq",
  21321. "font_class": "qq",
  21322. "unicode": "e680",
  21323. "unicode_decimal": 59008
  21324. },
  21325. {
  21326. "icon_id": "24881276",
  21327. "name": "download-filled",
  21328. "font_class": "download-filled",
  21329. "unicode": "e681",
  21330. "unicode_decimal": 59009
  21331. },
  21332. {
  21333. "icon_id": "24881277",
  21334. "name": "pengyouquan",
  21335. "font_class": "pyq",
  21336. "unicode": "e682",
  21337. "unicode_decimal": 59010
  21338. },
  21339. {
  21340. "icon_id": "24881279",
  21341. "name": "sound",
  21342. "font_class": "sound",
  21343. "unicode": "e684",
  21344. "unicode_decimal": 59012
  21345. },
  21346. {
  21347. "icon_id": "24881280",
  21348. "name": "trash-filled",
  21349. "font_class": "trash-filled",
  21350. "unicode": "e685",
  21351. "unicode_decimal": 59013
  21352. },
  21353. {
  21354. "icon_id": "24881281",
  21355. "name": "sound-filled",
  21356. "font_class": "sound-filled",
  21357. "unicode": "e686",
  21358. "unicode_decimal": 59014
  21359. },
  21360. {
  21361. "icon_id": "24881282",
  21362. "name": "trash",
  21363. "font_class": "trash",
  21364. "unicode": "e687",
  21365. "unicode_decimal": 59015
  21366. },
  21367. {
  21368. "icon_id": "24881284",
  21369. "name": "videocam-filled",
  21370. "font_class": "videocam-filled",
  21371. "unicode": "e689",
  21372. "unicode_decimal": 59017
  21373. },
  21374. {
  21375. "icon_id": "24881285",
  21376. "name": "spinner-cycle",
  21377. "font_class": "spinner-cycle",
  21378. "unicode": "e68a",
  21379. "unicode_decimal": 59018
  21380. },
  21381. {
  21382. "icon_id": "24881286",
  21383. "name": "weibo",
  21384. "font_class": "weibo",
  21385. "unicode": "e68b",
  21386. "unicode_decimal": 59019
  21387. },
  21388. {
  21389. "icon_id": "24881288",
  21390. "name": "videocam",
  21391. "font_class": "videocam",
  21392. "unicode": "e68c",
  21393. "unicode_decimal": 59020
  21394. },
  21395. {
  21396. "icon_id": "24881289",
  21397. "name": "download",
  21398. "font_class": "download",
  21399. "unicode": "e68d",
  21400. "unicode_decimal": 59021
  21401. },
  21402. {
  21403. "icon_id": "24879601",
  21404. "name": "help",
  21405. "font_class": "help",
  21406. "unicode": "e679",
  21407. "unicode_decimal": 59001
  21408. },
  21409. {
  21410. "icon_id": "24879602",
  21411. "name": "navigate-filled",
  21412. "font_class": "navigate-filled",
  21413. "unicode": "e67a",
  21414. "unicode_decimal": 59002
  21415. },
  21416. {
  21417. "icon_id": "24879603",
  21418. "name": "plusempty",
  21419. "font_class": "plusempty",
  21420. "unicode": "e67b",
  21421. "unicode_decimal": 59003
  21422. },
  21423. {
  21424. "icon_id": "24879604",
  21425. "name": "smallcircle",
  21426. "font_class": "smallcircle",
  21427. "unicode": "e67c",
  21428. "unicode_decimal": 59004
  21429. },
  21430. {
  21431. "icon_id": "24879605",
  21432. "name": "minus-filled",
  21433. "font_class": "minus-filled",
  21434. "unicode": "e67d",
  21435. "unicode_decimal": 59005
  21436. },
  21437. {
  21438. "icon_id": "24879606",
  21439. "name": "micoff",
  21440. "font_class": "micoff",
  21441. "unicode": "e67e",
  21442. "unicode_decimal": 59006
  21443. },
  21444. {
  21445. "icon_id": "24879588",
  21446. "name": "closeempty",
  21447. "font_class": "closeempty",
  21448. "unicode": "e66c",
  21449. "unicode_decimal": 58988
  21450. },
  21451. {
  21452. "icon_id": "24879589",
  21453. "name": "clear",
  21454. "font_class": "clear",
  21455. "unicode": "e66d",
  21456. "unicode_decimal": 58989
  21457. },
  21458. {
  21459. "icon_id": "24879590",
  21460. "name": "navigate",
  21461. "font_class": "navigate",
  21462. "unicode": "e66e",
  21463. "unicode_decimal": 58990
  21464. },
  21465. {
  21466. "icon_id": "24879591",
  21467. "name": "minus",
  21468. "font_class": "minus",
  21469. "unicode": "e66f",
  21470. "unicode_decimal": 58991
  21471. },
  21472. {
  21473. "icon_id": "24879592",
  21474. "name": "image",
  21475. "font_class": "image",
  21476. "unicode": "e670",
  21477. "unicode_decimal": 58992
  21478. },
  21479. {
  21480. "icon_id": "24879593",
  21481. "name": "mic",
  21482. "font_class": "mic",
  21483. "unicode": "e671",
  21484. "unicode_decimal": 58993
  21485. },
  21486. {
  21487. "icon_id": "24879594",
  21488. "name": "paperplane",
  21489. "font_class": "paperplane",
  21490. "unicode": "e672",
  21491. "unicode_decimal": 58994
  21492. },
  21493. {
  21494. "icon_id": "24879595",
  21495. "name": "close",
  21496. "font_class": "close",
  21497. "unicode": "e673",
  21498. "unicode_decimal": 58995
  21499. },
  21500. {
  21501. "icon_id": "24879596",
  21502. "name": "help-filled",
  21503. "font_class": "help-filled",
  21504. "unicode": "e674",
  21505. "unicode_decimal": 58996
  21506. },
  21507. {
  21508. "icon_id": "24879597",
  21509. "name": "plus-filled",
  21510. "font_class": "paperplane-filled",
  21511. "unicode": "e675",
  21512. "unicode_decimal": 58997
  21513. },
  21514. {
  21515. "icon_id": "24879598",
  21516. "name": "plus",
  21517. "font_class": "plus",
  21518. "unicode": "e676",
  21519. "unicode_decimal": 58998
  21520. },
  21521. {
  21522. "icon_id": "24879599",
  21523. "name": "mic-filled",
  21524. "font_class": "mic-filled",
  21525. "unicode": "e677",
  21526. "unicode_decimal": 58999
  21527. },
  21528. {
  21529. "icon_id": "24879600",
  21530. "name": "image-filled",
  21531. "font_class": "image-filled",
  21532. "unicode": "e678",
  21533. "unicode_decimal": 59e3
  21534. },
  21535. {
  21536. "icon_id": "24855900",
  21537. "name": "locked-filled",
  21538. "font_class": "locked-filled",
  21539. "unicode": "e668",
  21540. "unicode_decimal": 58984
  21541. },
  21542. {
  21543. "icon_id": "24855901",
  21544. "name": "info",
  21545. "font_class": "info",
  21546. "unicode": "e669",
  21547. "unicode_decimal": 58985
  21548. },
  21549. {
  21550. "icon_id": "24855903",
  21551. "name": "locked",
  21552. "font_class": "locked",
  21553. "unicode": "e66b",
  21554. "unicode_decimal": 58987
  21555. },
  21556. {
  21557. "icon_id": "24855884",
  21558. "name": "camera-filled",
  21559. "font_class": "camera-filled",
  21560. "unicode": "e658",
  21561. "unicode_decimal": 58968
  21562. },
  21563. {
  21564. "icon_id": "24855885",
  21565. "name": "chat-filled",
  21566. "font_class": "chat-filled",
  21567. "unicode": "e659",
  21568. "unicode_decimal": 58969
  21569. },
  21570. {
  21571. "icon_id": "24855886",
  21572. "name": "camera",
  21573. "font_class": "camera",
  21574. "unicode": "e65a",
  21575. "unicode_decimal": 58970
  21576. },
  21577. {
  21578. "icon_id": "24855887",
  21579. "name": "circle",
  21580. "font_class": "circle",
  21581. "unicode": "e65b",
  21582. "unicode_decimal": 58971
  21583. },
  21584. {
  21585. "icon_id": "24855888",
  21586. "name": "checkmarkempty",
  21587. "font_class": "checkmarkempty",
  21588. "unicode": "e65c",
  21589. "unicode_decimal": 58972
  21590. },
  21591. {
  21592. "icon_id": "24855889",
  21593. "name": "chat",
  21594. "font_class": "chat",
  21595. "unicode": "e65d",
  21596. "unicode_decimal": 58973
  21597. },
  21598. {
  21599. "icon_id": "24855890",
  21600. "name": "circle-filled",
  21601. "font_class": "circle-filled",
  21602. "unicode": "e65e",
  21603. "unicode_decimal": 58974
  21604. },
  21605. {
  21606. "icon_id": "24855891",
  21607. "name": "flag",
  21608. "font_class": "flag",
  21609. "unicode": "e65f",
  21610. "unicode_decimal": 58975
  21611. },
  21612. {
  21613. "icon_id": "24855892",
  21614. "name": "flag-filled",
  21615. "font_class": "flag-filled",
  21616. "unicode": "e660",
  21617. "unicode_decimal": 58976
  21618. },
  21619. {
  21620. "icon_id": "24855893",
  21621. "name": "gear-filled",
  21622. "font_class": "gear-filled",
  21623. "unicode": "e661",
  21624. "unicode_decimal": 58977
  21625. },
  21626. {
  21627. "icon_id": "24855894",
  21628. "name": "home",
  21629. "font_class": "home",
  21630. "unicode": "e662",
  21631. "unicode_decimal": 58978
  21632. },
  21633. {
  21634. "icon_id": "24855895",
  21635. "name": "home-filled",
  21636. "font_class": "home-filled",
  21637. "unicode": "e663",
  21638. "unicode_decimal": 58979
  21639. },
  21640. {
  21641. "icon_id": "24855896",
  21642. "name": "gear",
  21643. "font_class": "gear",
  21644. "unicode": "e664",
  21645. "unicode_decimal": 58980
  21646. },
  21647. {
  21648. "icon_id": "24855897",
  21649. "name": "smallcircle-filled",
  21650. "font_class": "smallcircle-filled",
  21651. "unicode": "e665",
  21652. "unicode_decimal": 58981
  21653. },
  21654. {
  21655. "icon_id": "24855898",
  21656. "name": "map-filled",
  21657. "font_class": "map-filled",
  21658. "unicode": "e666",
  21659. "unicode_decimal": 58982
  21660. },
  21661. {
  21662. "icon_id": "24855899",
  21663. "name": "map",
  21664. "font_class": "map",
  21665. "unicode": "e667",
  21666. "unicode_decimal": 58983
  21667. },
  21668. {
  21669. "icon_id": "24855825",
  21670. "name": "refresh-filled",
  21671. "font_class": "refresh-filled",
  21672. "unicode": "e656",
  21673. "unicode_decimal": 58966
  21674. },
  21675. {
  21676. "icon_id": "24855826",
  21677. "name": "refresh",
  21678. "font_class": "refresh",
  21679. "unicode": "e657",
  21680. "unicode_decimal": 58967
  21681. },
  21682. {
  21683. "icon_id": "24855808",
  21684. "name": "cloud-upload",
  21685. "font_class": "cloud-upload",
  21686. "unicode": "e645",
  21687. "unicode_decimal": 58949
  21688. },
  21689. {
  21690. "icon_id": "24855809",
  21691. "name": "cloud-download-filled",
  21692. "font_class": "cloud-download-filled",
  21693. "unicode": "e646",
  21694. "unicode_decimal": 58950
  21695. },
  21696. {
  21697. "icon_id": "24855810",
  21698. "name": "cloud-download",
  21699. "font_class": "cloud-download",
  21700. "unicode": "e647",
  21701. "unicode_decimal": 58951
  21702. },
  21703. {
  21704. "icon_id": "24855811",
  21705. "name": "cloud-upload-filled",
  21706. "font_class": "cloud-upload-filled",
  21707. "unicode": "e648",
  21708. "unicode_decimal": 58952
  21709. },
  21710. {
  21711. "icon_id": "24855813",
  21712. "name": "redo",
  21713. "font_class": "redo",
  21714. "unicode": "e64a",
  21715. "unicode_decimal": 58954
  21716. },
  21717. {
  21718. "icon_id": "24855814",
  21719. "name": "images-filled",
  21720. "font_class": "images-filled",
  21721. "unicode": "e64b",
  21722. "unicode_decimal": 58955
  21723. },
  21724. {
  21725. "icon_id": "24855815",
  21726. "name": "undo-filled",
  21727. "font_class": "undo-filled",
  21728. "unicode": "e64c",
  21729. "unicode_decimal": 58956
  21730. },
  21731. {
  21732. "icon_id": "24855816",
  21733. "name": "more",
  21734. "font_class": "more",
  21735. "unicode": "e64d",
  21736. "unicode_decimal": 58957
  21737. },
  21738. {
  21739. "icon_id": "24855817",
  21740. "name": "more-filled",
  21741. "font_class": "more-filled",
  21742. "unicode": "e64e",
  21743. "unicode_decimal": 58958
  21744. },
  21745. {
  21746. "icon_id": "24855818",
  21747. "name": "undo",
  21748. "font_class": "undo",
  21749. "unicode": "e64f",
  21750. "unicode_decimal": 58959
  21751. },
  21752. {
  21753. "icon_id": "24855819",
  21754. "name": "images",
  21755. "font_class": "images",
  21756. "unicode": "e650",
  21757. "unicode_decimal": 58960
  21758. },
  21759. {
  21760. "icon_id": "24855821",
  21761. "name": "paperclip",
  21762. "font_class": "paperclip",
  21763. "unicode": "e652",
  21764. "unicode_decimal": 58962
  21765. },
  21766. {
  21767. "icon_id": "24855822",
  21768. "name": "settings",
  21769. "font_class": "settings",
  21770. "unicode": "e653",
  21771. "unicode_decimal": 58963
  21772. },
  21773. {
  21774. "icon_id": "24855823",
  21775. "name": "search",
  21776. "font_class": "search",
  21777. "unicode": "e654",
  21778. "unicode_decimal": 58964
  21779. },
  21780. {
  21781. "icon_id": "24855824",
  21782. "name": "redo-filled",
  21783. "font_class": "redo-filled",
  21784. "unicode": "e655",
  21785. "unicode_decimal": 58965
  21786. },
  21787. {
  21788. "icon_id": "24841702",
  21789. "name": "list",
  21790. "font_class": "list",
  21791. "unicode": "e644",
  21792. "unicode_decimal": 58948
  21793. },
  21794. {
  21795. "icon_id": "24841489",
  21796. "name": "mail-open-filled",
  21797. "font_class": "mail-open-filled",
  21798. "unicode": "e63a",
  21799. "unicode_decimal": 58938
  21800. },
  21801. {
  21802. "icon_id": "24841491",
  21803. "name": "hand-thumbsdown-filled",
  21804. "font_class": "hand-down-filled",
  21805. "unicode": "e63c",
  21806. "unicode_decimal": 58940
  21807. },
  21808. {
  21809. "icon_id": "24841492",
  21810. "name": "hand-thumbsdown",
  21811. "font_class": "hand-down",
  21812. "unicode": "e63d",
  21813. "unicode_decimal": 58941
  21814. },
  21815. {
  21816. "icon_id": "24841493",
  21817. "name": "hand-thumbsup-filled",
  21818. "font_class": "hand-up-filled",
  21819. "unicode": "e63e",
  21820. "unicode_decimal": 58942
  21821. },
  21822. {
  21823. "icon_id": "24841494",
  21824. "name": "hand-thumbsup",
  21825. "font_class": "hand-up",
  21826. "unicode": "e63f",
  21827. "unicode_decimal": 58943
  21828. },
  21829. {
  21830. "icon_id": "24841496",
  21831. "name": "heart-filled",
  21832. "font_class": "heart-filled",
  21833. "unicode": "e641",
  21834. "unicode_decimal": 58945
  21835. },
  21836. {
  21837. "icon_id": "24841498",
  21838. "name": "mail-open",
  21839. "font_class": "mail-open",
  21840. "unicode": "e643",
  21841. "unicode_decimal": 58947
  21842. },
  21843. {
  21844. "icon_id": "24841488",
  21845. "name": "heart",
  21846. "font_class": "heart",
  21847. "unicode": "e639",
  21848. "unicode_decimal": 58937
  21849. },
  21850. {
  21851. "icon_id": "24839963",
  21852. "name": "loop",
  21853. "font_class": "loop",
  21854. "unicode": "e633",
  21855. "unicode_decimal": 58931
  21856. },
  21857. {
  21858. "icon_id": "24839866",
  21859. "name": "pulldown",
  21860. "font_class": "pulldown",
  21861. "unicode": "e632",
  21862. "unicode_decimal": 58930
  21863. },
  21864. {
  21865. "icon_id": "24813798",
  21866. "name": "scan",
  21867. "font_class": "scan",
  21868. "unicode": "e62a",
  21869. "unicode_decimal": 58922
  21870. },
  21871. {
  21872. "icon_id": "24813786",
  21873. "name": "bars",
  21874. "font_class": "bars",
  21875. "unicode": "e627",
  21876. "unicode_decimal": 58919
  21877. },
  21878. {
  21879. "icon_id": "24813788",
  21880. "name": "cart-filled",
  21881. "font_class": "cart-filled",
  21882. "unicode": "e629",
  21883. "unicode_decimal": 58921
  21884. },
  21885. {
  21886. "icon_id": "24813790",
  21887. "name": "checkbox",
  21888. "font_class": "checkbox",
  21889. "unicode": "e62b",
  21890. "unicode_decimal": 58923
  21891. },
  21892. {
  21893. "icon_id": "24813791",
  21894. "name": "checkbox-filled",
  21895. "font_class": "checkbox-filled",
  21896. "unicode": "e62c",
  21897. "unicode_decimal": 58924
  21898. },
  21899. {
  21900. "icon_id": "24813794",
  21901. "name": "shop",
  21902. "font_class": "shop",
  21903. "unicode": "e62f",
  21904. "unicode_decimal": 58927
  21905. },
  21906. {
  21907. "icon_id": "24813795",
  21908. "name": "headphones",
  21909. "font_class": "headphones",
  21910. "unicode": "e630",
  21911. "unicode_decimal": 58928
  21912. },
  21913. {
  21914. "icon_id": "24813796",
  21915. "name": "cart",
  21916. "font_class": "cart",
  21917. "unicode": "e631",
  21918. "unicode_decimal": 58929
  21919. }
  21920. ]
  21921. };
  21922. const getVal = (val) => {
  21923. const reg = /^[0-9]*$/g;
  21924. return typeof val === "number" || reg.test(val) ? val + "px" : val;
  21925. };
  21926. const _sfc_main$W = {
  21927. name: "UniIcons",
  21928. emits: ["click"],
  21929. props: {
  21930. type: {
  21931. type: String,
  21932. default: ""
  21933. },
  21934. color: {
  21935. type: String,
  21936. default: "#333333"
  21937. },
  21938. size: {
  21939. type: [Number, String],
  21940. default: 16
  21941. },
  21942. customPrefix: {
  21943. type: String,
  21944. default: ""
  21945. }
  21946. },
  21947. data() {
  21948. return {
  21949. icons: icons.glyphs
  21950. };
  21951. },
  21952. computed: {
  21953. unicode() {
  21954. let code2 = this.icons.find((v) => v.font_class === this.type);
  21955. if (code2) {
  21956. return unescape(`%u${code2.unicode}`);
  21957. }
  21958. return "";
  21959. },
  21960. iconSize() {
  21961. return getVal(this.size);
  21962. }
  21963. },
  21964. methods: {
  21965. _onClick() {
  21966. this.$emit("click");
  21967. }
  21968. }
  21969. };
  21970. function _sfc_render$V(_ctx, _cache, $props, $setup, $data, $options) {
  21971. return vue.openBlock(), vue.createElementBlock(
  21972. "text",
  21973. {
  21974. style: vue.normalizeStyle({ color: $props.color, "font-size": $options.iconSize }),
  21975. class: vue.normalizeClass(["uni-icons", ["uniui-" + $props.type, $props.customPrefix, $props.customPrefix ? $props.type : ""]]),
  21976. onClick: _cache[0] || (_cache[0] = (...args) => $options._onClick && $options._onClick(...args))
  21977. },
  21978. null,
  21979. 6
  21980. /* CLASS, STYLE */
  21981. );
  21982. }
  21983. const __easycom_0$3 = /* @__PURE__ */ _export_sfc(_sfc_main$W, [["render", _sfc_render$V], ["__scopeId", "data-v-d31e1c47"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/uni_modules/uni-icons/components/uni-icons/uni-icons.vue"]]);
  21984. let Calendar$1 = class Calendar {
  21985. constructor({
  21986. selected,
  21987. startDate,
  21988. endDate,
  21989. range: range2
  21990. } = {}) {
  21991. this.date = this.getDateObj(/* @__PURE__ */ new Date());
  21992. this.selected = selected || [];
  21993. this.startDate = startDate;
  21994. this.endDate = endDate;
  21995. this.range = range2;
  21996. this.cleanMultipleStatus();
  21997. this.weeks = {};
  21998. this.lastHover = false;
  21999. }
  22000. /**
  22001. * 设置日期
  22002. * @param {Object} date
  22003. */
  22004. setDate(date3) {
  22005. const selectDate = this.getDateObj(date3);
  22006. this.getWeeks(selectDate.fullDate);
  22007. }
  22008. /**
  22009. * 清理多选状态
  22010. */
  22011. cleanMultipleStatus() {
  22012. this.multipleStatus = {
  22013. before: "",
  22014. after: "",
  22015. data: []
  22016. };
  22017. }
  22018. setStartDate(startDate) {
  22019. this.startDate = startDate;
  22020. }
  22021. setEndDate(endDate) {
  22022. this.endDate = endDate;
  22023. }
  22024. getPreMonthObj(date3) {
  22025. date3 = fixIosDateFormat(date3);
  22026. date3 = new Date(date3);
  22027. const oldMonth = date3.getMonth();
  22028. date3.setMonth(oldMonth - 1);
  22029. const newMonth = date3.getMonth();
  22030. if (oldMonth !== 0 && newMonth - oldMonth === 0) {
  22031. date3.setMonth(newMonth - 1);
  22032. }
  22033. return this.getDateObj(date3);
  22034. }
  22035. getNextMonthObj(date3) {
  22036. date3 = fixIosDateFormat(date3);
  22037. date3 = new Date(date3);
  22038. const oldMonth = date3.getMonth();
  22039. date3.setMonth(oldMonth + 1);
  22040. const newMonth = date3.getMonth();
  22041. if (newMonth - oldMonth > 1) {
  22042. date3.setMonth(newMonth - 1);
  22043. }
  22044. return this.getDateObj(date3);
  22045. }
  22046. /**
  22047. * 获取指定格式Date对象
  22048. */
  22049. getDateObj(date3) {
  22050. date3 = fixIosDateFormat(date3);
  22051. date3 = new Date(date3);
  22052. return {
  22053. fullDate: getDate(date3),
  22054. year: date3.getFullYear(),
  22055. month: addZero(date3.getMonth() + 1),
  22056. date: addZero(date3.getDate()),
  22057. day: date3.getDay()
  22058. };
  22059. }
  22060. /**
  22061. * 获取上一个月日期集合
  22062. */
  22063. getPreMonthDays(amount2, dateObj) {
  22064. const result = [];
  22065. for (let i = amount2 - 1; i >= 0; i--) {
  22066. const month = dateObj.month > 1 ? dateObj.month - 1 : 12;
  22067. const year = month === 12 ? dateObj.year - 1 : dateObj.year;
  22068. const date3 = new Date(year, month, -i).getDate();
  22069. const fullDate = `${year}-${addZero(month)}-${addZero(date3)}`;
  22070. let multiples = this.multipleStatus.data;
  22071. let multiplesStatus = -1;
  22072. if (this.range && multiples) {
  22073. multiplesStatus = multiples.findIndex((item) => {
  22074. return this.dateEqual(item, fullDate);
  22075. });
  22076. }
  22077. const checked = multiplesStatus !== -1;
  22078. const extraInfo = this.selected && this.selected.find((item) => {
  22079. if (this.dateEqual(fullDate, item.date)) {
  22080. return item;
  22081. }
  22082. });
  22083. result.push({
  22084. fullDate,
  22085. year,
  22086. month,
  22087. date: date3,
  22088. multiple: this.range ? checked : false,
  22089. beforeMultiple: this.isLogicBefore(fullDate, this.multipleStatus.before, this.multipleStatus.after),
  22090. afterMultiple: this.isLogicAfter(fullDate, this.multipleStatus.before, this.multipleStatus.after),
  22091. disable: this.startDate && !dateCompare(this.startDate, fullDate) || this.endDate && !dateCompare(fullDate, this.endDate),
  22092. isToday: fullDate === this.date.fullDate,
  22093. userChecked: false,
  22094. extraInfo
  22095. });
  22096. }
  22097. return result;
  22098. }
  22099. /**
  22100. * 获取本月日期集合
  22101. */
  22102. getCurrentMonthDays(amount2, dateObj) {
  22103. const result = [];
  22104. const fullDate = this.date.fullDate;
  22105. for (let i = 1; i <= amount2; i++) {
  22106. const currentDate = `${dateObj.year}-${dateObj.month}-${addZero(i)}`;
  22107. const isToday = fullDate === currentDate;
  22108. const extraInfo = this.selected && this.selected.find((item) => {
  22109. if (this.dateEqual(currentDate, item.date)) {
  22110. return item;
  22111. }
  22112. });
  22113. if (this.startDate) {
  22114. dateCompare(this.startDate, currentDate);
  22115. }
  22116. if (this.endDate) {
  22117. dateCompare(currentDate, this.endDate);
  22118. }
  22119. let multiples = this.multipleStatus.data;
  22120. let multiplesStatus = -1;
  22121. if (this.range && multiples) {
  22122. multiplesStatus = multiples.findIndex((item) => {
  22123. return this.dateEqual(item, currentDate);
  22124. });
  22125. }
  22126. const checked = multiplesStatus !== -1;
  22127. result.push({
  22128. fullDate: currentDate,
  22129. year: dateObj.year,
  22130. month: dateObj.month,
  22131. date: i,
  22132. multiple: this.range ? checked : false,
  22133. beforeMultiple: this.isLogicBefore(currentDate, this.multipleStatus.before, this.multipleStatus.after),
  22134. afterMultiple: this.isLogicAfter(currentDate, this.multipleStatus.before, this.multipleStatus.after),
  22135. disable: this.startDate && !dateCompare(this.startDate, currentDate) || this.endDate && !dateCompare(currentDate, this.endDate),
  22136. isToday,
  22137. userChecked: false,
  22138. extraInfo
  22139. });
  22140. }
  22141. return result;
  22142. }
  22143. /**
  22144. * 获取下一个月日期集合
  22145. */
  22146. _getNextMonthDays(amount2, dateObj) {
  22147. const result = [];
  22148. dateObj.month + 1;
  22149. for (let i = 1; i <= amount2; i++) {
  22150. const month = dateObj.month === 12 ? 1 : dateObj.month * 1 + 1;
  22151. const year = month === 1 ? dateObj.year + 1 : dateObj.year;
  22152. const fullDate = `${year}-${addZero(month)}-${addZero(i)}`;
  22153. let multiples = this.multipleStatus.data;
  22154. let multiplesStatus = -1;
  22155. if (this.range && multiples) {
  22156. multiplesStatus = multiples.findIndex((item) => {
  22157. return this.dateEqual(item, fullDate);
  22158. });
  22159. }
  22160. const checked = multiplesStatus !== -1;
  22161. const extraInfo = this.selected && this.selected.find((item) => {
  22162. if (this.dateEqual(fullDate, item.date)) {
  22163. return item;
  22164. }
  22165. });
  22166. result.push({
  22167. fullDate,
  22168. year,
  22169. date: i,
  22170. month,
  22171. multiple: this.range ? checked : false,
  22172. beforeMultiple: this.isLogicBefore(fullDate, this.multipleStatus.before, this.multipleStatus.after),
  22173. afterMultiple: this.isLogicAfter(fullDate, this.multipleStatus.before, this.multipleStatus.after),
  22174. disable: this.startDate && !dateCompare(this.startDate, fullDate) || this.endDate && !dateCompare(fullDate, this.endDate),
  22175. isToday: fullDate === this.date.fullDate,
  22176. userChecked: false,
  22177. extraInfo
  22178. });
  22179. }
  22180. return result;
  22181. }
  22182. /**
  22183. * 获取当前日期详情
  22184. * @param {Object} date
  22185. */
  22186. getInfo(date3) {
  22187. if (!date3) {
  22188. date3 = /* @__PURE__ */ new Date();
  22189. }
  22190. return this.calendar.find((item) => item.fullDate === this.getDateObj(date3).fullDate);
  22191. }
  22192. /**
  22193. * 比较时间是否相等
  22194. */
  22195. dateEqual(before, after) {
  22196. before = new Date(fixIosDateFormat(before));
  22197. after = new Date(fixIosDateFormat(after));
  22198. return before.valueOf() === after.valueOf();
  22199. }
  22200. /**
  22201. * 比较真实起始日期
  22202. */
  22203. isLogicBefore(currentDate, before, after) {
  22204. let logicBefore = before;
  22205. if (before && after) {
  22206. logicBefore = dateCompare(before, after) ? before : after;
  22207. }
  22208. return this.dateEqual(logicBefore, currentDate);
  22209. }
  22210. isLogicAfter(currentDate, before, after) {
  22211. let logicAfter = after;
  22212. if (before && after) {
  22213. logicAfter = dateCompare(before, after) ? after : before;
  22214. }
  22215. return this.dateEqual(logicAfter, currentDate);
  22216. }
  22217. /**
  22218. * 获取日期范围内所有日期
  22219. * @param {Object} begin
  22220. * @param {Object} end
  22221. */
  22222. geDateAll(begin, end) {
  22223. var arr = [];
  22224. var ab = begin.split("-");
  22225. var ae = end.split("-");
  22226. var db = /* @__PURE__ */ new Date();
  22227. db.setFullYear(ab[0], ab[1] - 1, ab[2]);
  22228. var de = /* @__PURE__ */ new Date();
  22229. de.setFullYear(ae[0], ae[1] - 1, ae[2]);
  22230. var unixDb = db.getTime() - 24 * 60 * 60 * 1e3;
  22231. var unixDe = de.getTime() - 24 * 60 * 60 * 1e3;
  22232. for (var k = unixDb; k <= unixDe; ) {
  22233. k = k + 24 * 60 * 60 * 1e3;
  22234. arr.push(this.getDateObj(new Date(parseInt(k))).fullDate);
  22235. }
  22236. return arr;
  22237. }
  22238. /**
  22239. * 获取多选状态
  22240. */
  22241. setMultiple(fullDate) {
  22242. if (!this.range)
  22243. return;
  22244. let {
  22245. before,
  22246. after
  22247. } = this.multipleStatus;
  22248. if (before && after) {
  22249. if (!this.lastHover) {
  22250. this.lastHover = true;
  22251. return;
  22252. }
  22253. this.multipleStatus.before = fullDate;
  22254. this.multipleStatus.after = "";
  22255. this.multipleStatus.data = [];
  22256. this.multipleStatus.fulldate = "";
  22257. this.lastHover = false;
  22258. } else {
  22259. if (!before) {
  22260. this.multipleStatus.before = fullDate;
  22261. this.lastHover = false;
  22262. } else {
  22263. this.multipleStatus.after = fullDate;
  22264. if (dateCompare(this.multipleStatus.before, this.multipleStatus.after)) {
  22265. this.multipleStatus.data = this.geDateAll(this.multipleStatus.before, this.multipleStatus.after);
  22266. } else {
  22267. this.multipleStatus.data = this.geDateAll(this.multipleStatus.after, this.multipleStatus.before);
  22268. }
  22269. this.lastHover = true;
  22270. }
  22271. }
  22272. this.getWeeks(fullDate);
  22273. }
  22274. /**
  22275. * 鼠标 hover 更新多选状态
  22276. */
  22277. setHoverMultiple(fullDate) {
  22278. if (!this.range || this.lastHover)
  22279. return;
  22280. const { before } = this.multipleStatus;
  22281. if (!before) {
  22282. this.multipleStatus.before = fullDate;
  22283. } else {
  22284. this.multipleStatus.after = fullDate;
  22285. if (dateCompare(this.multipleStatus.before, this.multipleStatus.after)) {
  22286. this.multipleStatus.data = this.geDateAll(this.multipleStatus.before, this.multipleStatus.after);
  22287. } else {
  22288. this.multipleStatus.data = this.geDateAll(this.multipleStatus.after, this.multipleStatus.before);
  22289. }
  22290. }
  22291. this.getWeeks(fullDate);
  22292. }
  22293. /**
  22294. * 更新默认值多选状态
  22295. */
  22296. setDefaultMultiple(before, after) {
  22297. this.multipleStatus.before = before;
  22298. this.multipleStatus.after = after;
  22299. if (before && after) {
  22300. if (dateCompare(before, after)) {
  22301. this.multipleStatus.data = this.geDateAll(before, after);
  22302. this.getWeeks(after);
  22303. } else {
  22304. this.multipleStatus.data = this.geDateAll(after, before);
  22305. this.getWeeks(before);
  22306. }
  22307. }
  22308. }
  22309. /**
  22310. * 获取每周数据
  22311. * @param {Object} dateData
  22312. */
  22313. getWeeks(dateData) {
  22314. const {
  22315. year,
  22316. month
  22317. } = this.getDateObj(dateData);
  22318. const preMonthDayAmount = new Date(year, month - 1, 1).getDay();
  22319. const preMonthDays = this.getPreMonthDays(preMonthDayAmount, this.getDateObj(dateData));
  22320. const currentMonthDayAmount = new Date(year, month, 0).getDate();
  22321. const currentMonthDays = this.getCurrentMonthDays(currentMonthDayAmount, this.getDateObj(dateData));
  22322. const nextMonthDayAmount = 42 - preMonthDayAmount - currentMonthDayAmount;
  22323. const nextMonthDays = this._getNextMonthDays(nextMonthDayAmount, this.getDateObj(dateData));
  22324. const calendarDays = [...preMonthDays, ...currentMonthDays, ...nextMonthDays];
  22325. const weeks = new Array(6);
  22326. for (let i = 0; i < calendarDays.length; i++) {
  22327. const index2 = Math.floor(i / 7);
  22328. if (!weeks[index2]) {
  22329. weeks[index2] = new Array(7);
  22330. }
  22331. weeks[index2][i % 7] = calendarDays[i];
  22332. }
  22333. this.calendar = calendarDays;
  22334. this.weeks = weeks;
  22335. }
  22336. };
  22337. function getDateTime(date3, hideSecond) {
  22338. return `${getDate(date3)} ${getTime(date3, hideSecond)}`;
  22339. }
  22340. function getDate(date3) {
  22341. date3 = fixIosDateFormat(date3);
  22342. date3 = new Date(date3);
  22343. const year = date3.getFullYear();
  22344. const month = date3.getMonth() + 1;
  22345. const day = date3.getDate();
  22346. return `${year}-${addZero(month)}-${addZero(day)}`;
  22347. }
  22348. function getTime(date3, hideSecond) {
  22349. date3 = fixIosDateFormat(date3);
  22350. date3 = new Date(date3);
  22351. const hour = date3.getHours();
  22352. const minute = date3.getMinutes();
  22353. const second = date3.getSeconds();
  22354. return hideSecond ? `${addZero(hour)}:${addZero(minute)}` : `${addZero(hour)}:${addZero(minute)}:${addZero(second)}`;
  22355. }
  22356. function addZero(num) {
  22357. if (num < 10) {
  22358. num = `0${num}`;
  22359. }
  22360. return num;
  22361. }
  22362. function getDefaultSecond(hideSecond) {
  22363. return hideSecond ? "00:00" : "00:00:00";
  22364. }
  22365. function dateCompare(startDate, endDate) {
  22366. startDate = new Date(fixIosDateFormat(startDate));
  22367. endDate = new Date(fixIosDateFormat(endDate));
  22368. return startDate <= endDate;
  22369. }
  22370. function checkDate(date3) {
  22371. const dateReg = /((19|20)\d{2})(-|\/)\d{1,2}(-|\/)\d{1,2}/g;
  22372. return date3.match(dateReg);
  22373. }
  22374. const dateTimeReg = /^\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])( [0-5]?[0-9]:[0-5]?[0-9]:[0-5]?[0-9])?$/;
  22375. function fixIosDateFormat(value2) {
  22376. if (typeof value2 === "string" && dateTimeReg.test(value2)) {
  22377. value2 = value2.replace(/-/g, "/");
  22378. }
  22379. return value2;
  22380. }
  22381. const _sfc_main$V = {
  22382. props: {
  22383. weeks: {
  22384. type: Object,
  22385. default() {
  22386. return {};
  22387. }
  22388. },
  22389. calendar: {
  22390. type: Object,
  22391. default: () => {
  22392. return {};
  22393. }
  22394. },
  22395. selected: {
  22396. type: Array,
  22397. default: () => {
  22398. return [];
  22399. }
  22400. },
  22401. checkHover: {
  22402. type: Boolean,
  22403. default: false
  22404. }
  22405. },
  22406. methods: {
  22407. choiceDate(weeks) {
  22408. this.$emit("change", weeks);
  22409. },
  22410. handleMousemove(weeks) {
  22411. this.$emit("handleMouse", weeks);
  22412. }
  22413. }
  22414. };
  22415. function _sfc_render$U(_ctx, _cache, $props, $setup, $data, $options) {
  22416. return vue.openBlock(), vue.createElementBlock(
  22417. "view",
  22418. {
  22419. class: vue.normalizeClass(["uni-calendar-item__weeks-box", {
  22420. "uni-calendar-item--disable": $props.weeks.disable,
  22421. "uni-calendar-item--before-checked-x": $props.weeks.beforeMultiple,
  22422. "uni-calendar-item--multiple": $props.weeks.multiple,
  22423. "uni-calendar-item--after-checked-x": $props.weeks.afterMultiple
  22424. }]),
  22425. onClick: _cache[0] || (_cache[0] = ($event) => $options.choiceDate($props.weeks)),
  22426. onMouseenter: _cache[1] || (_cache[1] = ($event) => $options.handleMousemove($props.weeks))
  22427. },
  22428. [
  22429. vue.createElementVNode(
  22430. "view",
  22431. {
  22432. class: vue.normalizeClass(["uni-calendar-item__weeks-box-item", {
  22433. "uni-calendar-item--checked": $props.calendar.fullDate === $props.weeks.fullDate && ($props.calendar.userChecked || !$props.checkHover),
  22434. "uni-calendar-item--checked-range-text": $props.checkHover,
  22435. "uni-calendar-item--before-checked": $props.weeks.beforeMultiple,
  22436. "uni-calendar-item--multiple": $props.weeks.multiple,
  22437. "uni-calendar-item--after-checked": $props.weeks.afterMultiple,
  22438. "uni-calendar-item--disable": $props.weeks.disable
  22439. }])
  22440. },
  22441. [
  22442. $props.selected && $props.weeks.extraInfo ? (vue.openBlock(), vue.createElementBlock("text", {
  22443. key: 0,
  22444. class: "uni-calendar-item__weeks-box-circle"
  22445. })) : vue.createCommentVNode("v-if", true),
  22446. vue.createElementVNode(
  22447. "text",
  22448. { class: "uni-calendar-item__weeks-box-text uni-calendar-item__weeks-box-text-disable uni-calendar-item--checked-text" },
  22449. vue.toDisplayString($props.weeks.date),
  22450. 1
  22451. /* TEXT */
  22452. )
  22453. ],
  22454. 2
  22455. /* CLASS */
  22456. ),
  22457. vue.createElementVNode(
  22458. "view",
  22459. {
  22460. class: vue.normalizeClass({ "uni-calendar-item--today": $props.weeks.isToday })
  22461. },
  22462. null,
  22463. 2
  22464. /* CLASS */
  22465. )
  22466. ],
  22467. 34
  22468. /* CLASS, NEED_HYDRATION */
  22469. );
  22470. }
  22471. const calendarItem = /* @__PURE__ */ _export_sfc(_sfc_main$V, [["render", _sfc_render$U], ["__scopeId", "data-v-3c762a01"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar-item.vue"]]);
  22472. const isObject$1 = (val) => val !== null && typeof val === "object";
  22473. const defaultDelimiters = ["{", "}"];
  22474. class BaseFormatter {
  22475. constructor() {
  22476. this._caches = /* @__PURE__ */ Object.create(null);
  22477. }
  22478. interpolate(message, values, delimiters = defaultDelimiters) {
  22479. if (!values) {
  22480. return [message];
  22481. }
  22482. let tokens = this._caches[message];
  22483. if (!tokens) {
  22484. tokens = parse(message, delimiters);
  22485. this._caches[message] = tokens;
  22486. }
  22487. return compile(tokens, values);
  22488. }
  22489. }
  22490. const RE_TOKEN_LIST_VALUE = /^(?:\d)+/;
  22491. const RE_TOKEN_NAMED_VALUE = /^(?:\w)+/;
  22492. function parse(format2, [startDelimiter, endDelimiter]) {
  22493. const tokens = [];
  22494. let position = 0;
  22495. let text = "";
  22496. while (position < format2.length) {
  22497. let char = format2[position++];
  22498. if (char === startDelimiter) {
  22499. if (text) {
  22500. tokens.push({ type: "text", value: text });
  22501. }
  22502. text = "";
  22503. let sub = "";
  22504. char = format2[position++];
  22505. while (char !== void 0 && char !== endDelimiter) {
  22506. sub += char;
  22507. char = format2[position++];
  22508. }
  22509. const isClosed = char === endDelimiter;
  22510. const type2 = RE_TOKEN_LIST_VALUE.test(sub) ? "list" : isClosed && RE_TOKEN_NAMED_VALUE.test(sub) ? "named" : "unknown";
  22511. tokens.push({ value: sub, type: type2 });
  22512. } else {
  22513. text += char;
  22514. }
  22515. }
  22516. text && tokens.push({ type: "text", value: text });
  22517. return tokens;
  22518. }
  22519. function compile(tokens, values) {
  22520. const compiled = [];
  22521. let index2 = 0;
  22522. const mode = Array.isArray(values) ? "list" : isObject$1(values) ? "named" : "unknown";
  22523. if (mode === "unknown") {
  22524. return compiled;
  22525. }
  22526. while (index2 < tokens.length) {
  22527. const token = tokens[index2];
  22528. switch (token.type) {
  22529. case "text":
  22530. compiled.push(token.value);
  22531. break;
  22532. case "list":
  22533. compiled.push(values[parseInt(token.value, 10)]);
  22534. break;
  22535. case "named":
  22536. if (mode === "named") {
  22537. compiled.push(values[token.value]);
  22538. } else {
  22539. {
  22540. console.warn(`Type of token '${token.type}' and format of value '${mode}' don't match!`);
  22541. }
  22542. }
  22543. break;
  22544. case "unknown":
  22545. {
  22546. console.warn(`Detect 'unknown' type of token!`);
  22547. }
  22548. break;
  22549. }
  22550. index2++;
  22551. }
  22552. return compiled;
  22553. }
  22554. const LOCALE_ZH_HANS = "zh-Hans";
  22555. const LOCALE_ZH_HANT = "zh-Hant";
  22556. const LOCALE_EN = "en";
  22557. const LOCALE_FR = "fr";
  22558. const LOCALE_ES = "es";
  22559. const hasOwnProperty = Object.prototype.hasOwnProperty;
  22560. const hasOwn = (val, key) => hasOwnProperty.call(val, key);
  22561. const defaultFormatter = new BaseFormatter();
  22562. function include(str, parts) {
  22563. return !!parts.find((part) => str.indexOf(part) !== -1);
  22564. }
  22565. function startsWith(str, parts) {
  22566. return parts.find((part) => str.indexOf(part) === 0);
  22567. }
  22568. function normalizeLocale(locale, messages2) {
  22569. if (!locale) {
  22570. return;
  22571. }
  22572. locale = locale.trim().replace(/_/g, "-");
  22573. if (messages2 && messages2[locale]) {
  22574. return locale;
  22575. }
  22576. locale = locale.toLowerCase();
  22577. if (locale === "chinese") {
  22578. return LOCALE_ZH_HANS;
  22579. }
  22580. if (locale.indexOf("zh") === 0) {
  22581. if (locale.indexOf("-hans") > -1) {
  22582. return LOCALE_ZH_HANS;
  22583. }
  22584. if (locale.indexOf("-hant") > -1) {
  22585. return LOCALE_ZH_HANT;
  22586. }
  22587. if (include(locale, ["-tw", "-hk", "-mo", "-cht"])) {
  22588. return LOCALE_ZH_HANT;
  22589. }
  22590. return LOCALE_ZH_HANS;
  22591. }
  22592. let locales = [LOCALE_EN, LOCALE_FR, LOCALE_ES];
  22593. if (messages2 && Object.keys(messages2).length > 0) {
  22594. locales = Object.keys(messages2);
  22595. }
  22596. const lang = startsWith(locale, locales);
  22597. if (lang) {
  22598. return lang;
  22599. }
  22600. }
  22601. class I18n {
  22602. constructor({ locale, fallbackLocale, messages: messages2, watcher, formater: formater2 }) {
  22603. this.locale = LOCALE_EN;
  22604. this.fallbackLocale = LOCALE_EN;
  22605. this.message = {};
  22606. this.messages = {};
  22607. this.watchers = [];
  22608. if (fallbackLocale) {
  22609. this.fallbackLocale = fallbackLocale;
  22610. }
  22611. this.formater = formater2 || defaultFormatter;
  22612. this.messages = messages2 || {};
  22613. this.setLocale(locale || LOCALE_EN);
  22614. if (watcher) {
  22615. this.watchLocale(watcher);
  22616. }
  22617. }
  22618. setLocale(locale) {
  22619. const oldLocale = this.locale;
  22620. this.locale = normalizeLocale(locale, this.messages) || this.fallbackLocale;
  22621. if (!this.messages[this.locale]) {
  22622. this.messages[this.locale] = {};
  22623. }
  22624. this.message = this.messages[this.locale];
  22625. if (oldLocale !== this.locale) {
  22626. this.watchers.forEach((watcher) => {
  22627. watcher(this.locale, oldLocale);
  22628. });
  22629. }
  22630. }
  22631. getLocale() {
  22632. return this.locale;
  22633. }
  22634. watchLocale(fn) {
  22635. const index2 = this.watchers.push(fn) - 1;
  22636. return () => {
  22637. this.watchers.splice(index2, 1);
  22638. };
  22639. }
  22640. add(locale, message, override = true) {
  22641. const curMessages = this.messages[locale];
  22642. if (curMessages) {
  22643. if (override) {
  22644. Object.assign(curMessages, message);
  22645. } else {
  22646. Object.keys(message).forEach((key) => {
  22647. if (!hasOwn(curMessages, key)) {
  22648. curMessages[key] = message[key];
  22649. }
  22650. });
  22651. }
  22652. } else {
  22653. this.messages[locale] = message;
  22654. }
  22655. }
  22656. f(message, values, delimiters) {
  22657. return this.formater.interpolate(message, values, delimiters).join("");
  22658. }
  22659. t(key, locale, values) {
  22660. let message = this.message;
  22661. if (typeof locale === "string") {
  22662. locale = normalizeLocale(locale, this.messages);
  22663. locale && (message = this.messages[locale]);
  22664. } else {
  22665. values = locale;
  22666. }
  22667. if (!hasOwn(message, key)) {
  22668. console.warn(`Cannot translate the value of keypath ${key}. Use the value of keypath as default.`);
  22669. return key;
  22670. }
  22671. return this.formater.interpolate(message[key], values).join("");
  22672. }
  22673. }
  22674. function watchAppLocale(appVm, i18n) {
  22675. if (appVm.$watchLocale) {
  22676. appVm.$watchLocale((newLocale) => {
  22677. i18n.setLocale(newLocale);
  22678. });
  22679. } else {
  22680. appVm.$watch(() => appVm.$locale, (newLocale) => {
  22681. i18n.setLocale(newLocale);
  22682. });
  22683. }
  22684. }
  22685. function getDefaultLocale() {
  22686. if (typeof uni !== "undefined" && uni.getLocale) {
  22687. return uni.getLocale();
  22688. }
  22689. if (typeof global !== "undefined" && global.getLocale) {
  22690. return global.getLocale();
  22691. }
  22692. return LOCALE_EN;
  22693. }
  22694. function initVueI18n(locale, messages2 = {}, fallbackLocale, watcher) {
  22695. if (typeof locale !== "string") {
  22696. const options = [
  22697. messages2,
  22698. locale
  22699. ];
  22700. locale = options[0];
  22701. messages2 = options[1];
  22702. }
  22703. if (typeof locale !== "string") {
  22704. locale = getDefaultLocale();
  22705. }
  22706. if (typeof fallbackLocale !== "string") {
  22707. fallbackLocale = typeof __uniConfig !== "undefined" && __uniConfig.fallbackLocale || LOCALE_EN;
  22708. }
  22709. const i18n = new I18n({
  22710. locale,
  22711. fallbackLocale,
  22712. messages: messages2,
  22713. watcher
  22714. });
  22715. let t2 = (key, values) => {
  22716. if (typeof getApp !== "function") {
  22717. t2 = function(key2, values2) {
  22718. return i18n.t(key2, values2);
  22719. };
  22720. } else {
  22721. let isWatchedAppLocale = false;
  22722. t2 = function(key2, values2) {
  22723. const appVm = getApp().$vm;
  22724. if (appVm) {
  22725. appVm.$locale;
  22726. if (!isWatchedAppLocale) {
  22727. isWatchedAppLocale = true;
  22728. watchAppLocale(appVm, i18n);
  22729. }
  22730. }
  22731. return i18n.t(key2, values2);
  22732. };
  22733. }
  22734. return t2(key, values);
  22735. };
  22736. return {
  22737. i18n,
  22738. f(message, values, delimiters) {
  22739. return i18n.f(message, values, delimiters);
  22740. },
  22741. t(key, values) {
  22742. return t2(key, values);
  22743. },
  22744. add(locale2, message, override = true) {
  22745. return i18n.add(locale2, message, override);
  22746. },
  22747. watch(fn) {
  22748. return i18n.watchLocale(fn);
  22749. },
  22750. getLocale() {
  22751. return i18n.getLocale();
  22752. },
  22753. setLocale(newLocale) {
  22754. return i18n.setLocale(newLocale);
  22755. }
  22756. };
  22757. }
  22758. const en = {
  22759. "uni-datetime-picker.selectDate": "select date",
  22760. "uni-datetime-picker.selectTime": "select time",
  22761. "uni-datetime-picker.selectDateTime": "select date and time",
  22762. "uni-datetime-picker.startDate": "start date",
  22763. "uni-datetime-picker.endDate": "end date",
  22764. "uni-datetime-picker.startTime": "start time",
  22765. "uni-datetime-picker.endTime": "end time",
  22766. "uni-datetime-picker.ok": "ok",
  22767. "uni-datetime-picker.clear": "clear",
  22768. "uni-datetime-picker.cancel": "cancel",
  22769. "uni-datetime-picker.year": "-",
  22770. "uni-datetime-picker.month": "",
  22771. "uni-calender.MON": "MON",
  22772. "uni-calender.TUE": "TUE",
  22773. "uni-calender.WED": "WED",
  22774. "uni-calender.THU": "THU",
  22775. "uni-calender.FRI": "FRI",
  22776. "uni-calender.SAT": "SAT",
  22777. "uni-calender.SUN": "SUN",
  22778. "uni-calender.confirm": "confirm"
  22779. };
  22780. const zhHans = {
  22781. "uni-datetime-picker.selectDate": "选择日期",
  22782. "uni-datetime-picker.selectTime": "选择时间",
  22783. "uni-datetime-picker.selectDateTime": "选择日期时间",
  22784. "uni-datetime-picker.startDate": "开始日期",
  22785. "uni-datetime-picker.endDate": "结束日期",
  22786. "uni-datetime-picker.startTime": "开始时间",
  22787. "uni-datetime-picker.endTime": "结束时间",
  22788. "uni-datetime-picker.ok": "确定",
  22789. "uni-datetime-picker.clear": "清除",
  22790. "uni-datetime-picker.cancel": "取消",
  22791. "uni-datetime-picker.year": "年",
  22792. "uni-datetime-picker.month": "月",
  22793. "uni-calender.SUN": "日",
  22794. "uni-calender.MON": "一",
  22795. "uni-calender.TUE": "二",
  22796. "uni-calender.WED": "三",
  22797. "uni-calender.THU": "四",
  22798. "uni-calender.FRI": "五",
  22799. "uni-calender.SAT": "六",
  22800. "uni-calender.confirm": "确认"
  22801. };
  22802. const zhHant = {
  22803. "uni-datetime-picker.selectDate": "選擇日期",
  22804. "uni-datetime-picker.selectTime": "選擇時間",
  22805. "uni-datetime-picker.selectDateTime": "選擇日期時間",
  22806. "uni-datetime-picker.startDate": "開始日期",
  22807. "uni-datetime-picker.endDate": "結束日期",
  22808. "uni-datetime-picker.startTime": "開始时间",
  22809. "uni-datetime-picker.endTime": "結束时间",
  22810. "uni-datetime-picker.ok": "確定",
  22811. "uni-datetime-picker.clear": "清除",
  22812. "uni-datetime-picker.cancel": "取消",
  22813. "uni-datetime-picker.year": "年",
  22814. "uni-datetime-picker.month": "月",
  22815. "uni-calender.SUN": "日",
  22816. "uni-calender.MON": "一",
  22817. "uni-calender.TUE": "二",
  22818. "uni-calender.WED": "三",
  22819. "uni-calender.THU": "四",
  22820. "uni-calender.FRI": "五",
  22821. "uni-calender.SAT": "六",
  22822. "uni-calender.confirm": "確認"
  22823. };
  22824. const i18nMessages = {
  22825. en,
  22826. "zh-Hans": zhHans,
  22827. "zh-Hant": zhHant
  22828. };
  22829. const { t: t$1 } = initVueI18n(i18nMessages);
  22830. const _sfc_main$U = {
  22831. name: "UniDatetimePicker",
  22832. data() {
  22833. return {
  22834. indicatorStyle: `height: 50px;`,
  22835. visible: false,
  22836. fixNvueBug: {},
  22837. dateShow: true,
  22838. timeShow: true,
  22839. title: "日期和时间",
  22840. // 输入框当前时间
  22841. time: "",
  22842. // 当前的年月日时分秒
  22843. year: 1920,
  22844. month: 0,
  22845. day: 0,
  22846. hour: 0,
  22847. minute: 0,
  22848. second: 0,
  22849. // 起始时间
  22850. startYear: 1920,
  22851. startMonth: 1,
  22852. startDay: 1,
  22853. startHour: 0,
  22854. startMinute: 0,
  22855. startSecond: 0,
  22856. // 结束时间
  22857. endYear: 2120,
  22858. endMonth: 12,
  22859. endDay: 31,
  22860. endHour: 23,
  22861. endMinute: 59,
  22862. endSecond: 59
  22863. };
  22864. },
  22865. props: {
  22866. type: {
  22867. type: String,
  22868. default: "datetime"
  22869. },
  22870. value: {
  22871. type: [String, Number],
  22872. default: ""
  22873. },
  22874. modelValue: {
  22875. type: [String, Number],
  22876. default: ""
  22877. },
  22878. start: {
  22879. type: [Number, String],
  22880. default: ""
  22881. },
  22882. end: {
  22883. type: [Number, String],
  22884. default: ""
  22885. },
  22886. returnType: {
  22887. type: String,
  22888. default: "string"
  22889. },
  22890. disabled: {
  22891. type: [Boolean, String],
  22892. default: false
  22893. },
  22894. border: {
  22895. type: [Boolean, String],
  22896. default: true
  22897. },
  22898. hideSecond: {
  22899. type: [Boolean, String],
  22900. default: false
  22901. }
  22902. },
  22903. watch: {
  22904. modelValue: {
  22905. handler(newVal) {
  22906. if (newVal) {
  22907. this.parseValue(fixIosDateFormat(newVal));
  22908. this.initTime(false);
  22909. } else {
  22910. this.time = "";
  22911. this.parseValue(Date.now());
  22912. }
  22913. },
  22914. immediate: true
  22915. },
  22916. type: {
  22917. handler(newValue) {
  22918. if (newValue === "date") {
  22919. this.dateShow = true;
  22920. this.timeShow = false;
  22921. this.title = "日期";
  22922. } else if (newValue === "time") {
  22923. this.dateShow = false;
  22924. this.timeShow = true;
  22925. this.title = "时间";
  22926. } else {
  22927. this.dateShow = true;
  22928. this.timeShow = true;
  22929. this.title = "日期和时间";
  22930. }
  22931. },
  22932. immediate: true
  22933. },
  22934. start: {
  22935. handler(newVal) {
  22936. this.parseDatetimeRange(fixIosDateFormat(newVal), "start");
  22937. },
  22938. immediate: true
  22939. },
  22940. end: {
  22941. handler(newVal) {
  22942. this.parseDatetimeRange(fixIosDateFormat(newVal), "end");
  22943. },
  22944. immediate: true
  22945. },
  22946. // 月、日、时、分、秒可选范围变化后,检查当前值是否在范围内,不在则当前值重置为可选范围第一项
  22947. months(newVal) {
  22948. this.checkValue("month", this.month, newVal);
  22949. },
  22950. days(newVal) {
  22951. this.checkValue("day", this.day, newVal);
  22952. },
  22953. hours(newVal) {
  22954. this.checkValue("hour", this.hour, newVal);
  22955. },
  22956. minutes(newVal) {
  22957. this.checkValue("minute", this.minute, newVal);
  22958. },
  22959. seconds(newVal) {
  22960. this.checkValue("second", this.second, newVal);
  22961. }
  22962. },
  22963. computed: {
  22964. // 当前年、月、日、时、分、秒选择范围
  22965. years() {
  22966. return this.getCurrentRange("year");
  22967. },
  22968. months() {
  22969. return this.getCurrentRange("month");
  22970. },
  22971. days() {
  22972. return this.getCurrentRange("day");
  22973. },
  22974. hours() {
  22975. return this.getCurrentRange("hour");
  22976. },
  22977. minutes() {
  22978. return this.getCurrentRange("minute");
  22979. },
  22980. seconds() {
  22981. return this.getCurrentRange("second");
  22982. },
  22983. // picker 当前值数组
  22984. ymd() {
  22985. return [this.year - this.minYear, this.month - this.minMonth, this.day - this.minDay];
  22986. },
  22987. hms() {
  22988. return [this.hour - this.minHour, this.minute - this.minMinute, this.second - this.minSecond];
  22989. },
  22990. // 当前 date 是 start
  22991. currentDateIsStart() {
  22992. return this.year === this.startYear && this.month === this.startMonth && this.day === this.startDay;
  22993. },
  22994. // 当前 date 是 end
  22995. currentDateIsEnd() {
  22996. return this.year === this.endYear && this.month === this.endMonth && this.day === this.endDay;
  22997. },
  22998. // 当前年、月、日、时、分、秒的最小值和最大值
  22999. minYear() {
  23000. return this.startYear;
  23001. },
  23002. maxYear() {
  23003. return this.endYear;
  23004. },
  23005. minMonth() {
  23006. if (this.year === this.startYear) {
  23007. return this.startMonth;
  23008. } else {
  23009. return 1;
  23010. }
  23011. },
  23012. maxMonth() {
  23013. if (this.year === this.endYear) {
  23014. return this.endMonth;
  23015. } else {
  23016. return 12;
  23017. }
  23018. },
  23019. minDay() {
  23020. if (this.year === this.startYear && this.month === this.startMonth) {
  23021. return this.startDay;
  23022. } else {
  23023. return 1;
  23024. }
  23025. },
  23026. maxDay() {
  23027. if (this.year === this.endYear && this.month === this.endMonth) {
  23028. return this.endDay;
  23029. } else {
  23030. return this.daysInMonth(this.year, this.month);
  23031. }
  23032. },
  23033. minHour() {
  23034. if (this.type === "datetime") {
  23035. if (this.currentDateIsStart) {
  23036. return this.startHour;
  23037. } else {
  23038. return 0;
  23039. }
  23040. }
  23041. if (this.type === "time") {
  23042. return this.startHour;
  23043. }
  23044. },
  23045. maxHour() {
  23046. if (this.type === "datetime") {
  23047. if (this.currentDateIsEnd) {
  23048. return this.endHour;
  23049. } else {
  23050. return 23;
  23051. }
  23052. }
  23053. if (this.type === "time") {
  23054. return this.endHour;
  23055. }
  23056. },
  23057. minMinute() {
  23058. if (this.type === "datetime") {
  23059. if (this.currentDateIsStart && this.hour === this.startHour) {
  23060. return this.startMinute;
  23061. } else {
  23062. return 0;
  23063. }
  23064. }
  23065. if (this.type === "time") {
  23066. if (this.hour === this.startHour) {
  23067. return this.startMinute;
  23068. } else {
  23069. return 0;
  23070. }
  23071. }
  23072. },
  23073. maxMinute() {
  23074. if (this.type === "datetime") {
  23075. if (this.currentDateIsEnd && this.hour === this.endHour) {
  23076. return this.endMinute;
  23077. } else {
  23078. return 59;
  23079. }
  23080. }
  23081. if (this.type === "time") {
  23082. if (this.hour === this.endHour) {
  23083. return this.endMinute;
  23084. } else {
  23085. return 59;
  23086. }
  23087. }
  23088. },
  23089. minSecond() {
  23090. if (this.type === "datetime") {
  23091. if (this.currentDateIsStart && this.hour === this.startHour && this.minute === this.startMinute) {
  23092. return this.startSecond;
  23093. } else {
  23094. return 0;
  23095. }
  23096. }
  23097. if (this.type === "time") {
  23098. if (this.hour === this.startHour && this.minute === this.startMinute) {
  23099. return this.startSecond;
  23100. } else {
  23101. return 0;
  23102. }
  23103. }
  23104. },
  23105. maxSecond() {
  23106. if (this.type === "datetime") {
  23107. if (this.currentDateIsEnd && this.hour === this.endHour && this.minute === this.endMinute) {
  23108. return this.endSecond;
  23109. } else {
  23110. return 59;
  23111. }
  23112. }
  23113. if (this.type === "time") {
  23114. if (this.hour === this.endHour && this.minute === this.endMinute) {
  23115. return this.endSecond;
  23116. } else {
  23117. return 59;
  23118. }
  23119. }
  23120. },
  23121. /**
  23122. * for i18n
  23123. */
  23124. selectTimeText() {
  23125. return t$1("uni-datetime-picker.selectTime");
  23126. },
  23127. okText() {
  23128. return t$1("uni-datetime-picker.ok");
  23129. },
  23130. clearText() {
  23131. return t$1("uni-datetime-picker.clear");
  23132. },
  23133. cancelText() {
  23134. return t$1("uni-datetime-picker.cancel");
  23135. }
  23136. },
  23137. mounted() {
  23138. },
  23139. methods: {
  23140. /**
  23141. * @param {Object} item
  23142. * 小于 10 在前面加个 0
  23143. */
  23144. lessThanTen(item) {
  23145. return item < 10 ? "0" + item : item;
  23146. },
  23147. /**
  23148. * 解析时分秒字符串,例如:00:00:00
  23149. * @param {String} timeString
  23150. */
  23151. parseTimeType(timeString) {
  23152. if (timeString) {
  23153. let timeArr = timeString.split(":");
  23154. this.hour = Number(timeArr[0]);
  23155. this.minute = Number(timeArr[1]);
  23156. this.second = Number(timeArr[2]);
  23157. }
  23158. },
  23159. /**
  23160. * 解析选择器初始值,类型可以是字符串、时间戳,例如:2000-10-02、'08:30:00'、 1610695109000
  23161. * @param {String | Number} datetime
  23162. */
  23163. initPickerValue(datetime) {
  23164. let defaultValue = null;
  23165. if (datetime) {
  23166. defaultValue = this.compareValueWithStartAndEnd(datetime, this.start, this.end);
  23167. } else {
  23168. defaultValue = Date.now();
  23169. defaultValue = this.compareValueWithStartAndEnd(defaultValue, this.start, this.end);
  23170. }
  23171. this.parseValue(defaultValue);
  23172. },
  23173. /**
  23174. * 初始值规则:
  23175. * - 用户设置初始值 value
  23176. * - 设置了起始时间 start、终止时间 end,并 start < value < end,初始值为 value, 否则初始值为 start
  23177. * - 只设置了起始时间 start,并 start < value,初始值为 value,否则初始值为 start
  23178. * - 只设置了终止时间 end,并 value < end,初始值为 value,否则初始值为 end
  23179. * - 无起始终止时间,则初始值为 value
  23180. * - 无初始值 value,则初始值为当前本地时间 Date.now()
  23181. * @param {Object} value
  23182. * @param {Object} dateBase
  23183. */
  23184. compareValueWithStartAndEnd(value2, start, end) {
  23185. let winner = null;
  23186. value2 = this.superTimeStamp(value2);
  23187. start = this.superTimeStamp(start);
  23188. end = this.superTimeStamp(end);
  23189. if (start && end) {
  23190. if (value2 < start) {
  23191. winner = new Date(start);
  23192. } else if (value2 > end) {
  23193. winner = new Date(end);
  23194. } else {
  23195. winner = new Date(value2);
  23196. }
  23197. } else if (start && !end) {
  23198. winner = start <= value2 ? new Date(value2) : new Date(start);
  23199. } else if (!start && end) {
  23200. winner = value2 <= end ? new Date(value2) : new Date(end);
  23201. } else {
  23202. winner = new Date(value2);
  23203. }
  23204. return winner;
  23205. },
  23206. /**
  23207. * 转换为可比较的时间戳,接受日期、时分秒、时间戳
  23208. * @param {Object} value
  23209. */
  23210. superTimeStamp(value2) {
  23211. let dateBase = "";
  23212. if (this.type === "time" && value2 && typeof value2 === "string") {
  23213. const now2 = /* @__PURE__ */ new Date();
  23214. const year = now2.getFullYear();
  23215. const month = now2.getMonth() + 1;
  23216. const day = now2.getDate();
  23217. dateBase = year + "/" + month + "/" + day + " ";
  23218. }
  23219. if (Number(value2)) {
  23220. value2 = parseInt(value2);
  23221. dateBase = 0;
  23222. }
  23223. return this.createTimeStamp(dateBase + value2);
  23224. },
  23225. /**
  23226. * 解析默认值 value,字符串、时间戳
  23227. * @param {Object} defaultTime
  23228. */
  23229. parseValue(value2) {
  23230. if (!value2) {
  23231. return;
  23232. }
  23233. if (this.type === "time" && typeof value2 === "string") {
  23234. this.parseTimeType(value2);
  23235. } else {
  23236. let defaultDate = null;
  23237. defaultDate = new Date(value2);
  23238. if (this.type !== "time") {
  23239. this.year = defaultDate.getFullYear();
  23240. this.month = defaultDate.getMonth() + 1;
  23241. this.day = defaultDate.getDate();
  23242. }
  23243. if (this.type !== "date") {
  23244. this.hour = defaultDate.getHours();
  23245. this.minute = defaultDate.getMinutes();
  23246. this.second = defaultDate.getSeconds();
  23247. }
  23248. }
  23249. if (this.hideSecond) {
  23250. this.second = 0;
  23251. }
  23252. },
  23253. /**
  23254. * 解析可选择时间范围 start、end,年月日字符串、时间戳
  23255. * @param {Object} defaultTime
  23256. */
  23257. parseDatetimeRange(point, pointType) {
  23258. if (!point) {
  23259. if (pointType === "start") {
  23260. this.startYear = 1920;
  23261. this.startMonth = 1;
  23262. this.startDay = 1;
  23263. this.startHour = 0;
  23264. this.startMinute = 0;
  23265. this.startSecond = 0;
  23266. }
  23267. if (pointType === "end") {
  23268. this.endYear = 2120;
  23269. this.endMonth = 12;
  23270. this.endDay = 31;
  23271. this.endHour = 23;
  23272. this.endMinute = 59;
  23273. this.endSecond = 59;
  23274. }
  23275. return;
  23276. }
  23277. if (this.type === "time") {
  23278. const pointArr = point.split(":");
  23279. this[pointType + "Hour"] = Number(pointArr[0]);
  23280. this[pointType + "Minute"] = Number(pointArr[1]);
  23281. this[pointType + "Second"] = Number(pointArr[2]);
  23282. } else {
  23283. if (!point) {
  23284. pointType === "start" ? this.startYear = this.year - 60 : this.endYear = this.year + 60;
  23285. return;
  23286. }
  23287. if (Number(point)) {
  23288. point = parseInt(point);
  23289. }
  23290. const hasTime = /[0-9]:[0-9]/;
  23291. if (this.type === "datetime" && pointType === "end" && typeof point === "string" && !hasTime.test(
  23292. point
  23293. )) {
  23294. point = point + " 23:59:59";
  23295. }
  23296. const pointDate = new Date(point);
  23297. this[pointType + "Year"] = pointDate.getFullYear();
  23298. this[pointType + "Month"] = pointDate.getMonth() + 1;
  23299. this[pointType + "Day"] = pointDate.getDate();
  23300. if (this.type === "datetime") {
  23301. this[pointType + "Hour"] = pointDate.getHours();
  23302. this[pointType + "Minute"] = pointDate.getMinutes();
  23303. this[pointType + "Second"] = pointDate.getSeconds();
  23304. }
  23305. }
  23306. },
  23307. // 获取 年、月、日、时、分、秒 当前可选范围
  23308. getCurrentRange(value2) {
  23309. const range2 = [];
  23310. for (let i = this["min" + this.capitalize(value2)]; i <= this["max" + this.capitalize(value2)]; i++) {
  23311. range2.push(i);
  23312. }
  23313. return range2;
  23314. },
  23315. // 字符串首字母大写
  23316. capitalize(str) {
  23317. return str.charAt(0).toUpperCase() + str.slice(1);
  23318. },
  23319. // 检查当前值是否在范围内,不在则当前值重置为可选范围第一项
  23320. checkValue(name, value2, values) {
  23321. if (values.indexOf(value2) === -1) {
  23322. this[name] = values[0];
  23323. }
  23324. },
  23325. // 每个月的实际天数
  23326. daysInMonth(year, month) {
  23327. return new Date(year, month, 0).getDate();
  23328. },
  23329. //兼容 iOS、safari 日期格式
  23330. fixIosDateFormat(value2) {
  23331. if (typeof value2 === "string") {
  23332. value2 = value2.replace(/-/g, "/");
  23333. }
  23334. return value2;
  23335. },
  23336. /**
  23337. * 生成时间戳
  23338. * @param {Object} time
  23339. */
  23340. createTimeStamp(time) {
  23341. if (!time)
  23342. return;
  23343. if (typeof time === "number") {
  23344. return time;
  23345. } else {
  23346. time = time.replace(/-/g, "/");
  23347. if (this.type === "date") {
  23348. time = time + " 00:00:00";
  23349. }
  23350. return Date.parse(time);
  23351. }
  23352. },
  23353. /**
  23354. * 生成日期或时间的字符串
  23355. */
  23356. createDomSting() {
  23357. const yymmdd = this.year + "-" + this.lessThanTen(this.month) + "-" + this.lessThanTen(this.day);
  23358. let hhmmss = this.lessThanTen(this.hour) + ":" + this.lessThanTen(this.minute);
  23359. if (!this.hideSecond) {
  23360. hhmmss = hhmmss + ":" + this.lessThanTen(this.second);
  23361. }
  23362. if (this.type === "date") {
  23363. return yymmdd;
  23364. } else if (this.type === "time") {
  23365. return hhmmss;
  23366. } else {
  23367. return yymmdd + " " + hhmmss;
  23368. }
  23369. },
  23370. /**
  23371. * 初始化返回值,并抛出 change 事件
  23372. */
  23373. initTime(emit2 = true) {
  23374. this.time = this.createDomSting();
  23375. if (!emit2)
  23376. return;
  23377. if (this.returnType === "timestamp" && this.type !== "time") {
  23378. this.$emit("change", this.createTimeStamp(this.time));
  23379. this.$emit("input", this.createTimeStamp(this.time));
  23380. this.$emit("update:modelValue", this.createTimeStamp(this.time));
  23381. } else {
  23382. this.$emit("change", this.time);
  23383. this.$emit("input", this.time);
  23384. this.$emit("update:modelValue", this.time);
  23385. }
  23386. },
  23387. /**
  23388. * 用户选择日期或时间更新 data
  23389. * @param {Object} e
  23390. */
  23391. bindDateChange(e) {
  23392. const val = e.detail.value;
  23393. this.year = this.years[val[0]];
  23394. this.month = this.months[val[1]];
  23395. this.day = this.days[val[2]];
  23396. },
  23397. bindTimeChange(e) {
  23398. const val = e.detail.value;
  23399. this.hour = this.hours[val[0]];
  23400. this.minute = this.minutes[val[1]];
  23401. this.second = this.seconds[val[2]];
  23402. },
  23403. /**
  23404. * 初始化弹出层
  23405. */
  23406. initTimePicker() {
  23407. if (this.disabled)
  23408. return;
  23409. const value2 = fixIosDateFormat(this.time);
  23410. this.initPickerValue(value2);
  23411. this.visible = !this.visible;
  23412. },
  23413. /**
  23414. * 触发或关闭弹框
  23415. */
  23416. tiggerTimePicker(e) {
  23417. this.visible = !this.visible;
  23418. },
  23419. /**
  23420. * 用户点击“清空”按钮,清空当前值
  23421. */
  23422. clearTime() {
  23423. this.time = "";
  23424. this.$emit("change", this.time);
  23425. this.$emit("input", this.time);
  23426. this.$emit("update:modelValue", this.time);
  23427. this.tiggerTimePicker();
  23428. },
  23429. /**
  23430. * 用户点击“确定”按钮
  23431. */
  23432. setTime() {
  23433. this.initTime();
  23434. this.tiggerTimePicker();
  23435. }
  23436. }
  23437. };
  23438. function _sfc_render$T(_ctx, _cache, $props, $setup, $data, $options) {
  23439. return vue.openBlock(), vue.createElementBlock("view", { class: "uni-datetime-picker" }, [
  23440. vue.createElementVNode("view", {
  23441. onClick: _cache[0] || (_cache[0] = (...args) => $options.initTimePicker && $options.initTimePicker(...args))
  23442. }, [
  23443. vue.renderSlot(_ctx.$slots, "default", {}, () => [
  23444. vue.createElementVNode(
  23445. "view",
  23446. {
  23447. class: vue.normalizeClass(["uni-datetime-picker-timebox-pointer", { "uni-datetime-picker-disabled": $props.disabled, "uni-datetime-picker-timebox": $props.border }])
  23448. },
  23449. [
  23450. vue.createElementVNode(
  23451. "text",
  23452. { class: "uni-datetime-picker-text" },
  23453. vue.toDisplayString($data.time),
  23454. 1
  23455. /* TEXT */
  23456. ),
  23457. !$data.time ? (vue.openBlock(), vue.createElementBlock("view", {
  23458. key: 0,
  23459. class: "uni-datetime-picker-time"
  23460. }, [
  23461. vue.createElementVNode(
  23462. "text",
  23463. { class: "uni-datetime-picker-text" },
  23464. vue.toDisplayString($options.selectTimeText),
  23465. 1
  23466. /* TEXT */
  23467. )
  23468. ])) : vue.createCommentVNode("v-if", true)
  23469. ],
  23470. 2
  23471. /* CLASS */
  23472. )
  23473. ], true)
  23474. ]),
  23475. $data.visible ? (vue.openBlock(), vue.createElementBlock("view", {
  23476. key: 0,
  23477. id: "mask",
  23478. class: "uni-datetime-picker-mask",
  23479. onClick: _cache[1] || (_cache[1] = (...args) => $options.tiggerTimePicker && $options.tiggerTimePicker(...args))
  23480. })) : vue.createCommentVNode("v-if", true),
  23481. $data.visible ? (vue.openBlock(), vue.createElementBlock(
  23482. "view",
  23483. {
  23484. key: 1,
  23485. class: vue.normalizeClass(["uni-datetime-picker-popup", [$data.dateShow && $data.timeShow ? "" : "fix-nvue-height"]]),
  23486. style: vue.normalizeStyle($data.fixNvueBug)
  23487. },
  23488. [
  23489. vue.createElementVNode("view", { class: "uni-title" }, [
  23490. vue.createElementVNode(
  23491. "text",
  23492. { class: "uni-datetime-picker-text" },
  23493. vue.toDisplayString($options.selectTimeText),
  23494. 1
  23495. /* TEXT */
  23496. )
  23497. ]),
  23498. $data.dateShow ? (vue.openBlock(), vue.createElementBlock("view", {
  23499. key: 0,
  23500. class: "uni-datetime-picker__container-box"
  23501. }, [
  23502. vue.createElementVNode("picker-view", {
  23503. class: "uni-datetime-picker-view",
  23504. "indicator-style": $data.indicatorStyle,
  23505. value: $options.ymd,
  23506. onChange: _cache[2] || (_cache[2] = (...args) => $options.bindDateChange && $options.bindDateChange(...args))
  23507. }, [
  23508. vue.createElementVNode("picker-view-column", null, [
  23509. (vue.openBlock(true), vue.createElementBlock(
  23510. vue.Fragment,
  23511. null,
  23512. vue.renderList($options.years, (item, index2) => {
  23513. return vue.openBlock(), vue.createElementBlock("view", {
  23514. class: "uni-datetime-picker-item",
  23515. key: index2
  23516. }, [
  23517. vue.createElementVNode(
  23518. "text",
  23519. { class: "uni-datetime-picker-item" },
  23520. vue.toDisplayString($options.lessThanTen(item)),
  23521. 1
  23522. /* TEXT */
  23523. )
  23524. ]);
  23525. }),
  23526. 128
  23527. /* KEYED_FRAGMENT */
  23528. ))
  23529. ]),
  23530. vue.createElementVNode("picker-view-column", null, [
  23531. (vue.openBlock(true), vue.createElementBlock(
  23532. vue.Fragment,
  23533. null,
  23534. vue.renderList($options.months, (item, index2) => {
  23535. return vue.openBlock(), vue.createElementBlock("view", {
  23536. class: "uni-datetime-picker-item",
  23537. key: index2
  23538. }, [
  23539. vue.createElementVNode(
  23540. "text",
  23541. { class: "uni-datetime-picker-item" },
  23542. vue.toDisplayString($options.lessThanTen(item)),
  23543. 1
  23544. /* TEXT */
  23545. )
  23546. ]);
  23547. }),
  23548. 128
  23549. /* KEYED_FRAGMENT */
  23550. ))
  23551. ]),
  23552. vue.createElementVNode("picker-view-column", null, [
  23553. (vue.openBlock(true), vue.createElementBlock(
  23554. vue.Fragment,
  23555. null,
  23556. vue.renderList($options.days, (item, index2) => {
  23557. return vue.openBlock(), vue.createElementBlock("view", {
  23558. class: "uni-datetime-picker-item",
  23559. key: index2
  23560. }, [
  23561. vue.createElementVNode(
  23562. "text",
  23563. { class: "uni-datetime-picker-item" },
  23564. vue.toDisplayString($options.lessThanTen(item)),
  23565. 1
  23566. /* TEXT */
  23567. )
  23568. ]);
  23569. }),
  23570. 128
  23571. /* KEYED_FRAGMENT */
  23572. ))
  23573. ])
  23574. ], 40, ["indicator-style", "value"]),
  23575. vue.createCommentVNode(" 兼容 nvue 不支持伪类 "),
  23576. vue.createElementVNode("text", { class: "uni-datetime-picker-sign sign-left" }, "-"),
  23577. vue.createElementVNode("text", { class: "uni-datetime-picker-sign sign-right" }, "-")
  23578. ])) : vue.createCommentVNode("v-if", true),
  23579. $data.timeShow ? (vue.openBlock(), vue.createElementBlock("view", {
  23580. key: 1,
  23581. class: "uni-datetime-picker__container-box"
  23582. }, [
  23583. vue.createElementVNode("picker-view", {
  23584. class: vue.normalizeClass(["uni-datetime-picker-view", [$props.hideSecond ? "time-hide-second" : ""]]),
  23585. "indicator-style": $data.indicatorStyle,
  23586. value: $options.hms,
  23587. onChange: _cache[3] || (_cache[3] = (...args) => $options.bindTimeChange && $options.bindTimeChange(...args))
  23588. }, [
  23589. vue.createElementVNode("picker-view-column", null, [
  23590. (vue.openBlock(true), vue.createElementBlock(
  23591. vue.Fragment,
  23592. null,
  23593. vue.renderList($options.hours, (item, index2) => {
  23594. return vue.openBlock(), vue.createElementBlock("view", {
  23595. class: "uni-datetime-picker-item",
  23596. key: index2
  23597. }, [
  23598. vue.createElementVNode(
  23599. "text",
  23600. { class: "uni-datetime-picker-item" },
  23601. vue.toDisplayString($options.lessThanTen(item)),
  23602. 1
  23603. /* TEXT */
  23604. )
  23605. ]);
  23606. }),
  23607. 128
  23608. /* KEYED_FRAGMENT */
  23609. ))
  23610. ]),
  23611. vue.createElementVNode("picker-view-column", null, [
  23612. (vue.openBlock(true), vue.createElementBlock(
  23613. vue.Fragment,
  23614. null,
  23615. vue.renderList($options.minutes, (item, index2) => {
  23616. return vue.openBlock(), vue.createElementBlock("view", {
  23617. class: "uni-datetime-picker-item",
  23618. key: index2
  23619. }, [
  23620. vue.createElementVNode(
  23621. "text",
  23622. { class: "uni-datetime-picker-item" },
  23623. vue.toDisplayString($options.lessThanTen(item)),
  23624. 1
  23625. /* TEXT */
  23626. )
  23627. ]);
  23628. }),
  23629. 128
  23630. /* KEYED_FRAGMENT */
  23631. ))
  23632. ]),
  23633. !$props.hideSecond ? (vue.openBlock(), vue.createElementBlock("picker-view-column", { key: 0 }, [
  23634. (vue.openBlock(true), vue.createElementBlock(
  23635. vue.Fragment,
  23636. null,
  23637. vue.renderList($options.seconds, (item, index2) => {
  23638. return vue.openBlock(), vue.createElementBlock("view", {
  23639. class: "uni-datetime-picker-item",
  23640. key: index2
  23641. }, [
  23642. vue.createElementVNode(
  23643. "text",
  23644. { class: "uni-datetime-picker-item" },
  23645. vue.toDisplayString($options.lessThanTen(item)),
  23646. 1
  23647. /* TEXT */
  23648. )
  23649. ]);
  23650. }),
  23651. 128
  23652. /* KEYED_FRAGMENT */
  23653. ))
  23654. ])) : vue.createCommentVNode("v-if", true)
  23655. ], 42, ["indicator-style", "value"]),
  23656. vue.createCommentVNode(" 兼容 nvue 不支持伪类 "),
  23657. vue.createElementVNode(
  23658. "text",
  23659. {
  23660. class: vue.normalizeClass(["uni-datetime-picker-sign", [$props.hideSecond ? "sign-center" : "sign-left"]])
  23661. },
  23662. ":",
  23663. 2
  23664. /* CLASS */
  23665. ),
  23666. !$props.hideSecond ? (vue.openBlock(), vue.createElementBlock("text", {
  23667. key: 0,
  23668. class: "uni-datetime-picker-sign sign-right"
  23669. }, ":")) : vue.createCommentVNode("v-if", true)
  23670. ])) : vue.createCommentVNode("v-if", true),
  23671. vue.createElementVNode("view", { class: "uni-datetime-picker-btn" }, [
  23672. vue.createElementVNode("view", {
  23673. onClick: _cache[4] || (_cache[4] = (...args) => $options.clearTime && $options.clearTime(...args))
  23674. }, [
  23675. vue.createElementVNode(
  23676. "text",
  23677. { class: "uni-datetime-picker-btn-text" },
  23678. vue.toDisplayString($options.clearText),
  23679. 1
  23680. /* TEXT */
  23681. )
  23682. ]),
  23683. vue.createElementVNode("view", { class: "uni-datetime-picker-btn-group" }, [
  23684. vue.createElementVNode("view", {
  23685. class: "uni-datetime-picker-cancel",
  23686. onClick: _cache[5] || (_cache[5] = (...args) => $options.tiggerTimePicker && $options.tiggerTimePicker(...args))
  23687. }, [
  23688. vue.createElementVNode(
  23689. "text",
  23690. { class: "uni-datetime-picker-btn-text" },
  23691. vue.toDisplayString($options.cancelText),
  23692. 1
  23693. /* TEXT */
  23694. )
  23695. ]),
  23696. vue.createElementVNode("view", {
  23697. onClick: _cache[6] || (_cache[6] = (...args) => $options.setTime && $options.setTime(...args))
  23698. }, [
  23699. vue.createElementVNode(
  23700. "text",
  23701. { class: "uni-datetime-picker-btn-text" },
  23702. vue.toDisplayString($options.okText),
  23703. 1
  23704. /* TEXT */
  23705. )
  23706. ])
  23707. ])
  23708. ])
  23709. ],
  23710. 6
  23711. /* CLASS, STYLE */
  23712. )) : vue.createCommentVNode("v-if", true)
  23713. ]);
  23714. }
  23715. const TimePicker = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["render", _sfc_render$T], ["__scopeId", "data-v-1d532b70"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/uni_modules/uni-datetime-picker/components/uni-datetime-picker/time-picker.vue"]]);
  23716. const { t } = initVueI18n(i18nMessages);
  23717. const _sfc_main$T = {
  23718. components: {
  23719. calendarItem,
  23720. timePicker: TimePicker
  23721. },
  23722. props: {
  23723. date: {
  23724. type: String,
  23725. default: ""
  23726. },
  23727. defTime: {
  23728. type: [String, Object],
  23729. default: ""
  23730. },
  23731. selectableTimes: {
  23732. type: [Object],
  23733. default() {
  23734. return {};
  23735. }
  23736. },
  23737. selected: {
  23738. type: Array,
  23739. default() {
  23740. return [];
  23741. }
  23742. },
  23743. startDate: {
  23744. type: String,
  23745. default: ""
  23746. },
  23747. endDate: {
  23748. type: String,
  23749. default: ""
  23750. },
  23751. startPlaceholder: {
  23752. type: String,
  23753. default: ""
  23754. },
  23755. endPlaceholder: {
  23756. type: String,
  23757. default: ""
  23758. },
  23759. range: {
  23760. type: Boolean,
  23761. default: false
  23762. },
  23763. hasTime: {
  23764. type: Boolean,
  23765. default: false
  23766. },
  23767. insert: {
  23768. type: Boolean,
  23769. default: true
  23770. },
  23771. showMonth: {
  23772. type: Boolean,
  23773. default: true
  23774. },
  23775. clearDate: {
  23776. type: Boolean,
  23777. default: true
  23778. },
  23779. checkHover: {
  23780. type: Boolean,
  23781. default: true
  23782. },
  23783. hideSecond: {
  23784. type: [Boolean],
  23785. default: false
  23786. },
  23787. pleStatus: {
  23788. type: Object,
  23789. default() {
  23790. return {
  23791. before: "",
  23792. after: "",
  23793. data: [],
  23794. fulldate: ""
  23795. };
  23796. }
  23797. },
  23798. defaultValue: {
  23799. type: [String, Object, Array],
  23800. default: ""
  23801. }
  23802. },
  23803. data() {
  23804. return {
  23805. show: false,
  23806. weeks: [],
  23807. calendar: {},
  23808. nowDate: {},
  23809. aniMaskShow: false,
  23810. firstEnter: true,
  23811. time: "",
  23812. timeRange: {
  23813. startTime: "",
  23814. endTime: ""
  23815. },
  23816. tempSingleDate: "",
  23817. tempRange: {
  23818. before: "",
  23819. after: ""
  23820. }
  23821. };
  23822. },
  23823. watch: {
  23824. date: {
  23825. immediate: true,
  23826. handler(newVal) {
  23827. if (!this.range) {
  23828. this.tempSingleDate = newVal;
  23829. setTimeout(() => {
  23830. this.init(newVal);
  23831. }, 100);
  23832. }
  23833. }
  23834. },
  23835. defTime: {
  23836. immediate: true,
  23837. handler(newVal) {
  23838. if (!this.range) {
  23839. this.time = newVal;
  23840. } else {
  23841. this.timeRange.startTime = newVal.start;
  23842. this.timeRange.endTime = newVal.end;
  23843. }
  23844. }
  23845. },
  23846. startDate(val) {
  23847. if (!this.cale) {
  23848. return;
  23849. }
  23850. this.cale.setStartDate(val);
  23851. this.cale.setDate(this.nowDate.fullDate);
  23852. this.weeks = this.cale.weeks;
  23853. },
  23854. endDate(val) {
  23855. if (!this.cale) {
  23856. return;
  23857. }
  23858. this.cale.setEndDate(val);
  23859. this.cale.setDate(this.nowDate.fullDate);
  23860. this.weeks = this.cale.weeks;
  23861. },
  23862. selected(newVal) {
  23863. if (!this.cale) {
  23864. return;
  23865. }
  23866. this.cale.setSelectInfo(this.nowDate.fullDate, newVal);
  23867. this.weeks = this.cale.weeks;
  23868. },
  23869. pleStatus: {
  23870. immediate: true,
  23871. handler(newVal) {
  23872. const {
  23873. before,
  23874. after,
  23875. fulldate,
  23876. which
  23877. } = newVal;
  23878. this.tempRange.before = before;
  23879. this.tempRange.after = after;
  23880. setTimeout(() => {
  23881. if (fulldate) {
  23882. this.cale.setHoverMultiple(fulldate);
  23883. if (before && after) {
  23884. this.cale.lastHover = true;
  23885. if (this.rangeWithinMonth(after, before))
  23886. return;
  23887. this.setDate(before);
  23888. } else {
  23889. this.cale.setMultiple(fulldate);
  23890. this.setDate(this.nowDate.fullDate);
  23891. this.calendar.fullDate = "";
  23892. this.cale.lastHover = false;
  23893. }
  23894. } else {
  23895. if (!this.cale) {
  23896. return;
  23897. }
  23898. this.cale.setDefaultMultiple(before, after);
  23899. if (which === "left" && before) {
  23900. this.setDate(before);
  23901. this.weeks = this.cale.weeks;
  23902. } else if (after) {
  23903. this.setDate(after);
  23904. this.weeks = this.cale.weeks;
  23905. }
  23906. this.cale.lastHover = true;
  23907. }
  23908. }, 16);
  23909. }
  23910. }
  23911. },
  23912. computed: {
  23913. timepickerStartTime() {
  23914. const activeDate = this.range ? this.tempRange.before : this.calendar.fullDate;
  23915. return activeDate === this.startDate ? this.selectableTimes.start : "";
  23916. },
  23917. timepickerEndTime() {
  23918. const activeDate = this.range ? this.tempRange.after : this.calendar.fullDate;
  23919. return activeDate === this.endDate ? this.selectableTimes.end : "";
  23920. },
  23921. /**
  23922. * for i18n
  23923. */
  23924. selectDateText() {
  23925. return t("uni-datetime-picker.selectDate");
  23926. },
  23927. startDateText() {
  23928. return this.startPlaceholder || t("uni-datetime-picker.startDate");
  23929. },
  23930. endDateText() {
  23931. return this.endPlaceholder || t("uni-datetime-picker.endDate");
  23932. },
  23933. okText() {
  23934. return t("uni-datetime-picker.ok");
  23935. },
  23936. yearText() {
  23937. return t("uni-datetime-picker.year");
  23938. },
  23939. monthText() {
  23940. return t("uni-datetime-picker.month");
  23941. },
  23942. MONText() {
  23943. return t("uni-calender.MON");
  23944. },
  23945. TUEText() {
  23946. return t("uni-calender.TUE");
  23947. },
  23948. WEDText() {
  23949. return t("uni-calender.WED");
  23950. },
  23951. THUText() {
  23952. return t("uni-calender.THU");
  23953. },
  23954. FRIText() {
  23955. return t("uni-calender.FRI");
  23956. },
  23957. SATText() {
  23958. return t("uni-calender.SAT");
  23959. },
  23960. SUNText() {
  23961. return t("uni-calender.SUN");
  23962. },
  23963. confirmText() {
  23964. return t("uni-calender.confirm");
  23965. }
  23966. },
  23967. created() {
  23968. this.cale = new Calendar$1({
  23969. selected: this.selected,
  23970. startDate: this.startDate,
  23971. endDate: this.endDate,
  23972. range: this.range
  23973. });
  23974. this.init(this.date);
  23975. },
  23976. methods: {
  23977. leaveCale() {
  23978. this.firstEnter = true;
  23979. },
  23980. handleMouse(weeks) {
  23981. if (weeks.disable)
  23982. return;
  23983. if (this.cale.lastHover)
  23984. return;
  23985. let {
  23986. before,
  23987. after
  23988. } = this.cale.multipleStatus;
  23989. if (!before)
  23990. return;
  23991. this.calendar = weeks;
  23992. this.cale.setHoverMultiple(this.calendar.fullDate);
  23993. this.weeks = this.cale.weeks;
  23994. if (this.firstEnter) {
  23995. this.$emit("firstEnterCale", this.cale.multipleStatus);
  23996. this.firstEnter = false;
  23997. }
  23998. },
  23999. rangeWithinMonth(A, B) {
  24000. const [yearA, monthA] = A.split("-");
  24001. const [yearB, monthB] = B.split("-");
  24002. return yearA === yearB && monthA === monthB;
  24003. },
  24004. // 蒙版点击事件
  24005. maskClick() {
  24006. this.close();
  24007. this.$emit("maskClose");
  24008. },
  24009. clearCalender() {
  24010. if (this.range) {
  24011. this.timeRange.startTime = "";
  24012. this.timeRange.endTime = "";
  24013. this.tempRange.before = "";
  24014. this.tempRange.after = "";
  24015. this.cale.multipleStatus.before = "";
  24016. this.cale.multipleStatus.after = "";
  24017. this.cale.multipleStatus.data = [];
  24018. this.cale.lastHover = false;
  24019. } else {
  24020. this.time = "";
  24021. this.tempSingleDate = "";
  24022. }
  24023. this.calendar.fullDate = "";
  24024. this.setDate(/* @__PURE__ */ new Date());
  24025. },
  24026. bindDateChange(e) {
  24027. const value2 = e.detail.value + "-1";
  24028. this.setDate(value2);
  24029. },
  24030. /**
  24031. * 初始化日期显示
  24032. * @param {Object} date
  24033. */
  24034. init(date3) {
  24035. if (!this.cale) {
  24036. return;
  24037. }
  24038. this.cale.setDate(date3 || /* @__PURE__ */ new Date());
  24039. this.weeks = this.cale.weeks;
  24040. this.nowDate = this.cale.getInfo(date3);
  24041. this.calendar = { ...this.nowDate };
  24042. if (!date3) {
  24043. this.calendar.fullDate = "";
  24044. if (this.defaultValue && !this.range) {
  24045. const defaultDate = new Date(this.defaultValue);
  24046. const fullDate = getDate(defaultDate);
  24047. const year = defaultDate.getFullYear();
  24048. const month = defaultDate.getMonth() + 1;
  24049. const date4 = defaultDate.getDate();
  24050. const day = defaultDate.getDay();
  24051. this.calendar = {
  24052. fullDate,
  24053. year,
  24054. month,
  24055. date: date4,
  24056. day
  24057. }, this.tempSingleDate = fullDate;
  24058. this.time = getTime(defaultDate, this.hideSecond);
  24059. }
  24060. }
  24061. },
  24062. /**
  24063. * 打开日历弹窗
  24064. */
  24065. open() {
  24066. if (this.clearDate && !this.insert) {
  24067. this.cale.cleanMultipleStatus();
  24068. this.init(this.date);
  24069. }
  24070. this.show = true;
  24071. this.$nextTick(() => {
  24072. setTimeout(() => {
  24073. this.aniMaskShow = true;
  24074. }, 50);
  24075. });
  24076. },
  24077. /**
  24078. * 关闭日历弹窗
  24079. */
  24080. close() {
  24081. this.aniMaskShow = false;
  24082. this.$nextTick(() => {
  24083. setTimeout(() => {
  24084. this.show = false;
  24085. this.$emit("close");
  24086. }, 300);
  24087. });
  24088. },
  24089. /**
  24090. * 确认按钮
  24091. */
  24092. confirm() {
  24093. this.setEmit("confirm");
  24094. this.close();
  24095. },
  24096. /**
  24097. * 变化触发
  24098. */
  24099. change() {
  24100. if (!this.insert)
  24101. return;
  24102. this.setEmit("change");
  24103. },
  24104. /**
  24105. * 选择月份触发
  24106. */
  24107. monthSwitch() {
  24108. let {
  24109. year,
  24110. month
  24111. } = this.nowDate;
  24112. this.$emit("monthSwitch", {
  24113. year,
  24114. month: Number(month)
  24115. });
  24116. },
  24117. /**
  24118. * 派发事件
  24119. * @param {Object} name
  24120. */
  24121. setEmit(name) {
  24122. if (!this.range) {
  24123. if (!this.calendar.fullDate) {
  24124. this.calendar = this.cale.getInfo(/* @__PURE__ */ new Date());
  24125. this.tempSingleDate = this.calendar.fullDate;
  24126. }
  24127. if (this.hasTime && !this.time) {
  24128. this.time = getTime(/* @__PURE__ */ new Date(), this.hideSecond);
  24129. }
  24130. }
  24131. let {
  24132. year,
  24133. month,
  24134. date: date3,
  24135. fullDate,
  24136. extraInfo
  24137. } = this.calendar;
  24138. this.$emit(name, {
  24139. range: this.cale.multipleStatus,
  24140. year,
  24141. month,
  24142. date: date3,
  24143. time: this.time,
  24144. timeRange: this.timeRange,
  24145. fulldate: fullDate,
  24146. extraInfo: extraInfo || {}
  24147. });
  24148. },
  24149. /**
  24150. * 选择天触发
  24151. * @param {Object} weeks
  24152. */
  24153. choiceDate(weeks) {
  24154. if (weeks.disable)
  24155. return;
  24156. this.calendar = weeks;
  24157. this.calendar.userChecked = true;
  24158. this.cale.setMultiple(this.calendar.fullDate, true);
  24159. this.weeks = this.cale.weeks;
  24160. this.tempSingleDate = this.calendar.fullDate;
  24161. const beforeDate = new Date(this.cale.multipleStatus.before).getTime();
  24162. const afterDate = new Date(this.cale.multipleStatus.after).getTime();
  24163. if (beforeDate > afterDate && afterDate) {
  24164. this.tempRange.before = this.cale.multipleStatus.after;
  24165. this.tempRange.after = this.cale.multipleStatus.before;
  24166. } else {
  24167. this.tempRange.before = this.cale.multipleStatus.before;
  24168. this.tempRange.after = this.cale.multipleStatus.after;
  24169. }
  24170. this.change();
  24171. },
  24172. changeMonth(type2) {
  24173. let newDate;
  24174. if (type2 === "pre") {
  24175. newDate = this.cale.getPreMonthObj(this.nowDate.fullDate).fullDate;
  24176. } else if (type2 === "next") {
  24177. newDate = this.cale.getNextMonthObj(this.nowDate.fullDate).fullDate;
  24178. }
  24179. this.setDate(newDate);
  24180. this.monthSwitch();
  24181. },
  24182. /**
  24183. * 设置日期
  24184. * @param {Object} date
  24185. */
  24186. setDate(date3) {
  24187. this.cale.setDate(date3);
  24188. this.weeks = this.cale.weeks;
  24189. this.nowDate = this.cale.getInfo(date3);
  24190. }
  24191. }
  24192. };
  24193. function _sfc_render$S(_ctx, _cache, $props, $setup, $data, $options) {
  24194. const _component_calendar_item = vue.resolveComponent("calendar-item");
  24195. const _component_time_picker = vue.resolveComponent("time-picker");
  24196. const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_0$3);
  24197. return vue.openBlock(), vue.createElementBlock(
  24198. "view",
  24199. {
  24200. class: "uni-calendar",
  24201. onMouseleave: _cache[9] || (_cache[9] = (...args) => $options.leaveCale && $options.leaveCale(...args))
  24202. },
  24203. [
  24204. !$props.insert && $data.show ? (vue.openBlock(), vue.createElementBlock(
  24205. "view",
  24206. {
  24207. key: 0,
  24208. class: vue.normalizeClass(["uni-calendar__mask", { "uni-calendar--mask-show": $data.aniMaskShow }]),
  24209. onClick: _cache[0] || (_cache[0] = (...args) => $options.maskClick && $options.maskClick(...args))
  24210. },
  24211. null,
  24212. 2
  24213. /* CLASS */
  24214. )) : vue.createCommentVNode("v-if", true),
  24215. $props.insert || $data.show ? (vue.openBlock(), vue.createElementBlock(
  24216. "view",
  24217. {
  24218. key: 1,
  24219. class: vue.normalizeClass(["uni-calendar__content", { "uni-calendar--fixed": !$props.insert, "uni-calendar--ani-show": $data.aniMaskShow, "uni-calendar__content-mobile": $data.aniMaskShow }])
  24220. },
  24221. [
  24222. vue.createElementVNode(
  24223. "view",
  24224. {
  24225. class: vue.normalizeClass(["uni-calendar__header", { "uni-calendar__header-mobile": !$props.insert }])
  24226. },
  24227. [
  24228. vue.createElementVNode("view", {
  24229. class: "uni-calendar__header-btn-box",
  24230. onClick: _cache[1] || (_cache[1] = vue.withModifiers(($event) => $options.changeMonth("pre"), ["stop"]))
  24231. }, [
  24232. vue.createElementVNode("view", { class: "uni-calendar__header-btn uni-calendar--left" })
  24233. ]),
  24234. vue.createElementVNode("picker", {
  24235. mode: "date",
  24236. value: $props.date,
  24237. fields: "month",
  24238. onChange: _cache[2] || (_cache[2] = (...args) => $options.bindDateChange && $options.bindDateChange(...args))
  24239. }, [
  24240. vue.createElementVNode(
  24241. "text",
  24242. { class: "uni-calendar__header-text" },
  24243. vue.toDisplayString(($data.nowDate.year || "") + $options.yearText + ($data.nowDate.month || "") + $options.monthText),
  24244. 1
  24245. /* TEXT */
  24246. )
  24247. ], 40, ["value"]),
  24248. vue.createElementVNode("view", {
  24249. class: "uni-calendar__header-btn-box",
  24250. onClick: _cache[3] || (_cache[3] = vue.withModifiers(($event) => $options.changeMonth("next"), ["stop"]))
  24251. }, [
  24252. vue.createElementVNode("view", { class: "uni-calendar__header-btn uni-calendar--right" })
  24253. ]),
  24254. !$props.insert ? (vue.openBlock(), vue.createElementBlock("view", {
  24255. key: 0,
  24256. class: "dialog-close",
  24257. onClick: _cache[4] || (_cache[4] = (...args) => $options.close && $options.close(...args))
  24258. }, [
  24259. vue.createElementVNode("view", {
  24260. class: "dialog-close-plus",
  24261. "data-id": "close"
  24262. }),
  24263. vue.createElementVNode("view", {
  24264. class: "dialog-close-plus dialog-close-rotate",
  24265. "data-id": "close"
  24266. })
  24267. ])) : vue.createCommentVNode("v-if", true)
  24268. ],
  24269. 2
  24270. /* CLASS */
  24271. ),
  24272. vue.createElementVNode("view", { class: "uni-calendar__box" }, [
  24273. $props.showMonth ? (vue.openBlock(), vue.createElementBlock("view", {
  24274. key: 0,
  24275. class: "uni-calendar__box-bg"
  24276. }, [
  24277. vue.createElementVNode(
  24278. "text",
  24279. { class: "uni-calendar__box-bg-text" },
  24280. vue.toDisplayString($data.nowDate.month),
  24281. 1
  24282. /* TEXT */
  24283. )
  24284. ])) : vue.createCommentVNode("v-if", true),
  24285. vue.createElementVNode("view", {
  24286. class: "uni-calendar__weeks",
  24287. style: { "padding-bottom": "7px" }
  24288. }, [
  24289. vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [
  24290. vue.createElementVNode(
  24291. "text",
  24292. { class: "uni-calendar__weeks-day-text" },
  24293. vue.toDisplayString($options.SUNText),
  24294. 1
  24295. /* TEXT */
  24296. )
  24297. ]),
  24298. vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [
  24299. vue.createElementVNode(
  24300. "text",
  24301. { class: "uni-calendar__weeks-day-text" },
  24302. vue.toDisplayString($options.MONText),
  24303. 1
  24304. /* TEXT */
  24305. )
  24306. ]),
  24307. vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [
  24308. vue.createElementVNode(
  24309. "text",
  24310. { class: "uni-calendar__weeks-day-text" },
  24311. vue.toDisplayString($options.TUEText),
  24312. 1
  24313. /* TEXT */
  24314. )
  24315. ]),
  24316. vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [
  24317. vue.createElementVNode(
  24318. "text",
  24319. { class: "uni-calendar__weeks-day-text" },
  24320. vue.toDisplayString($options.WEDText),
  24321. 1
  24322. /* TEXT */
  24323. )
  24324. ]),
  24325. vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [
  24326. vue.createElementVNode(
  24327. "text",
  24328. { class: "uni-calendar__weeks-day-text" },
  24329. vue.toDisplayString($options.THUText),
  24330. 1
  24331. /* TEXT */
  24332. )
  24333. ]),
  24334. vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [
  24335. vue.createElementVNode(
  24336. "text",
  24337. { class: "uni-calendar__weeks-day-text" },
  24338. vue.toDisplayString($options.FRIText),
  24339. 1
  24340. /* TEXT */
  24341. )
  24342. ]),
  24343. vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [
  24344. vue.createElementVNode(
  24345. "text",
  24346. { class: "uni-calendar__weeks-day-text" },
  24347. vue.toDisplayString($options.SATText),
  24348. 1
  24349. /* TEXT */
  24350. )
  24351. ])
  24352. ]),
  24353. (vue.openBlock(true), vue.createElementBlock(
  24354. vue.Fragment,
  24355. null,
  24356. vue.renderList($data.weeks, (item, weekIndex) => {
  24357. return vue.openBlock(), vue.createElementBlock("view", {
  24358. class: "uni-calendar__weeks",
  24359. key: weekIndex
  24360. }, [
  24361. (vue.openBlock(true), vue.createElementBlock(
  24362. vue.Fragment,
  24363. null,
  24364. vue.renderList(item, (weeks, weeksIndex) => {
  24365. return vue.openBlock(), vue.createElementBlock("view", {
  24366. class: "uni-calendar__weeks-item",
  24367. key: weeksIndex
  24368. }, [
  24369. vue.createVNode(_component_calendar_item, {
  24370. class: "uni-calendar-item--hook",
  24371. weeks,
  24372. calendar: $data.calendar,
  24373. selected: $props.selected,
  24374. checkHover: $props.range,
  24375. onChange: $options.choiceDate,
  24376. onHandleMouse: $options.handleMouse
  24377. }, null, 8, ["weeks", "calendar", "selected", "checkHover", "onChange", "onHandleMouse"])
  24378. ]);
  24379. }),
  24380. 128
  24381. /* KEYED_FRAGMENT */
  24382. ))
  24383. ]);
  24384. }),
  24385. 128
  24386. /* KEYED_FRAGMENT */
  24387. ))
  24388. ]),
  24389. !$props.insert && !$props.range && $props.hasTime ? (vue.openBlock(), vue.createElementBlock("view", {
  24390. key: 0,
  24391. class: "uni-date-changed uni-calendar--fixed-top",
  24392. style: { "padding": "0 80px" }
  24393. }, [
  24394. vue.createElementVNode(
  24395. "view",
  24396. { class: "uni-date-changed--time-date" },
  24397. vue.toDisplayString($data.tempSingleDate ? $data.tempSingleDate : $options.selectDateText),
  24398. 1
  24399. /* TEXT */
  24400. ),
  24401. vue.createVNode(_component_time_picker, {
  24402. type: "time",
  24403. start: $options.timepickerStartTime,
  24404. end: $options.timepickerEndTime,
  24405. modelValue: $data.time,
  24406. "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $data.time = $event),
  24407. disabled: !$data.tempSingleDate,
  24408. border: false,
  24409. "hide-second": $props.hideSecond,
  24410. class: "time-picker-style"
  24411. }, null, 8, ["start", "end", "modelValue", "disabled", "hide-second"])
  24412. ])) : vue.createCommentVNode("v-if", true),
  24413. !$props.insert && $props.range && $props.hasTime ? (vue.openBlock(), vue.createElementBlock("view", {
  24414. key: 1,
  24415. class: "uni-date-changed uni-calendar--fixed-top"
  24416. }, [
  24417. vue.createElementVNode("view", { class: "uni-date-changed--time-start" }, [
  24418. vue.createElementVNode(
  24419. "view",
  24420. { class: "uni-date-changed--time-date" },
  24421. vue.toDisplayString($data.tempRange.before ? $data.tempRange.before : $options.startDateText),
  24422. 1
  24423. /* TEXT */
  24424. ),
  24425. vue.createVNode(_component_time_picker, {
  24426. type: "time",
  24427. start: $options.timepickerStartTime,
  24428. modelValue: $data.timeRange.startTime,
  24429. "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $data.timeRange.startTime = $event),
  24430. border: false,
  24431. "hide-second": $props.hideSecond,
  24432. disabled: !$data.tempRange.before,
  24433. class: "time-picker-style"
  24434. }, null, 8, ["start", "modelValue", "hide-second", "disabled"])
  24435. ]),
  24436. vue.createElementVNode("view", { style: { "line-height": "50px" } }, [
  24437. vue.createVNode(_component_uni_icons, {
  24438. type: "arrowthinright",
  24439. color: "#999"
  24440. })
  24441. ]),
  24442. vue.createElementVNode("view", { class: "uni-date-changed--time-end" }, [
  24443. vue.createElementVNode(
  24444. "view",
  24445. { class: "uni-date-changed--time-date" },
  24446. vue.toDisplayString($data.tempRange.after ? $data.tempRange.after : $options.endDateText),
  24447. 1
  24448. /* TEXT */
  24449. ),
  24450. vue.createVNode(_component_time_picker, {
  24451. type: "time",
  24452. end: $options.timepickerEndTime,
  24453. modelValue: $data.timeRange.endTime,
  24454. "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => $data.timeRange.endTime = $event),
  24455. border: false,
  24456. "hide-second": $props.hideSecond,
  24457. disabled: !$data.tempRange.after,
  24458. class: "time-picker-style"
  24459. }, null, 8, ["end", "modelValue", "hide-second", "disabled"])
  24460. ])
  24461. ])) : vue.createCommentVNode("v-if", true),
  24462. !$props.insert ? (vue.openBlock(), vue.createElementBlock("view", {
  24463. key: 2,
  24464. class: "uni-date-changed uni-date-btn--ok"
  24465. }, [
  24466. vue.createElementVNode(
  24467. "view",
  24468. {
  24469. class: "uni-datetime-picker--btn",
  24470. onClick: _cache[8] || (_cache[8] = (...args) => $options.confirm && $options.confirm(...args))
  24471. },
  24472. vue.toDisplayString($options.confirmText),
  24473. 1
  24474. /* TEXT */
  24475. )
  24476. ])) : vue.createCommentVNode("v-if", true)
  24477. ],
  24478. 2
  24479. /* CLASS */
  24480. )) : vue.createCommentVNode("v-if", true)
  24481. ],
  24482. 32
  24483. /* NEED_HYDRATION */
  24484. );
  24485. }
  24486. const Calendar = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["render", _sfc_render$S], ["__scopeId", "data-v-1d379219"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar.vue"]]);
  24487. const _sfc_main$S = {
  24488. name: "UniDatetimePicker",
  24489. options: {
  24490. virtualHost: true
  24491. },
  24492. components: {
  24493. Calendar,
  24494. TimePicker
  24495. },
  24496. data() {
  24497. return {
  24498. isRange: false,
  24499. hasTime: false,
  24500. displayValue: "",
  24501. inputDate: "",
  24502. calendarDate: "",
  24503. pickerTime: "",
  24504. calendarRange: {
  24505. startDate: "",
  24506. startTime: "",
  24507. endDate: "",
  24508. endTime: ""
  24509. },
  24510. displayRangeValue: {
  24511. startDate: "",
  24512. endDate: ""
  24513. },
  24514. tempRange: {
  24515. startDate: "",
  24516. startTime: "",
  24517. endDate: "",
  24518. endTime: ""
  24519. },
  24520. // 左右日历同步数据
  24521. startMultipleStatus: {
  24522. before: "",
  24523. after: "",
  24524. data: [],
  24525. fulldate: ""
  24526. },
  24527. endMultipleStatus: {
  24528. before: "",
  24529. after: "",
  24530. data: [],
  24531. fulldate: ""
  24532. },
  24533. pickerVisible: false,
  24534. pickerPositionStyle: null,
  24535. isEmitValue: false,
  24536. isPhone: false,
  24537. isFirstShow: true,
  24538. i18nT: () => {
  24539. }
  24540. };
  24541. },
  24542. props: {
  24543. type: {
  24544. type: String,
  24545. default: "datetime"
  24546. },
  24547. value: {
  24548. type: [String, Number, Array, Date],
  24549. default: ""
  24550. },
  24551. modelValue: {
  24552. type: [String, Number, Array, Date],
  24553. default: ""
  24554. },
  24555. start: {
  24556. type: [Number, String],
  24557. default: ""
  24558. },
  24559. end: {
  24560. type: [Number, String],
  24561. default: ""
  24562. },
  24563. returnType: {
  24564. type: String,
  24565. default: "string"
  24566. },
  24567. placeholder: {
  24568. type: String,
  24569. default: ""
  24570. },
  24571. startPlaceholder: {
  24572. type: String,
  24573. default: ""
  24574. },
  24575. endPlaceholder: {
  24576. type: String,
  24577. default: ""
  24578. },
  24579. rangeSeparator: {
  24580. type: String,
  24581. default: "-"
  24582. },
  24583. border: {
  24584. type: [Boolean],
  24585. default: true
  24586. },
  24587. disabled: {
  24588. type: [Boolean],
  24589. default: false
  24590. },
  24591. clearIcon: {
  24592. type: [Boolean],
  24593. default: true
  24594. },
  24595. hideSecond: {
  24596. type: [Boolean],
  24597. default: false
  24598. },
  24599. defaultValue: {
  24600. type: [String, Object, Array],
  24601. default: ""
  24602. }
  24603. },
  24604. watch: {
  24605. type: {
  24606. immediate: true,
  24607. handler(newVal) {
  24608. this.hasTime = newVal.indexOf("time") !== -1;
  24609. this.isRange = newVal.indexOf("range") !== -1;
  24610. }
  24611. },
  24612. modelValue: {
  24613. immediate: true,
  24614. handler(newVal) {
  24615. if (this.isEmitValue) {
  24616. this.isEmitValue = false;
  24617. return;
  24618. }
  24619. this.initPicker(newVal);
  24620. }
  24621. },
  24622. start: {
  24623. immediate: true,
  24624. handler(newVal) {
  24625. if (!newVal)
  24626. return;
  24627. this.calendarRange.startDate = getDate(newVal);
  24628. if (this.hasTime) {
  24629. this.calendarRange.startTime = getTime(newVal);
  24630. }
  24631. }
  24632. },
  24633. end: {
  24634. immediate: true,
  24635. handler(newVal) {
  24636. if (!newVal)
  24637. return;
  24638. this.calendarRange.endDate = getDate(newVal);
  24639. if (this.hasTime) {
  24640. this.calendarRange.endTime = getTime(newVal, this.hideSecond);
  24641. }
  24642. }
  24643. }
  24644. },
  24645. computed: {
  24646. timepickerStartTime() {
  24647. const activeDate = this.isRange ? this.tempRange.startDate : this.inputDate;
  24648. return activeDate === this.calendarRange.startDate ? this.calendarRange.startTime : "";
  24649. },
  24650. timepickerEndTime() {
  24651. const activeDate = this.isRange ? this.tempRange.endDate : this.inputDate;
  24652. return activeDate === this.calendarRange.endDate ? this.calendarRange.endTime : "";
  24653. },
  24654. mobileCalendarTime() {
  24655. const timeRange = {
  24656. start: this.tempRange.startTime,
  24657. end: this.tempRange.endTime
  24658. };
  24659. return this.isRange ? timeRange : this.pickerTime;
  24660. },
  24661. mobSelectableTime() {
  24662. return {
  24663. start: this.calendarRange.startTime,
  24664. end: this.calendarRange.endTime
  24665. };
  24666. },
  24667. datePopupWidth() {
  24668. return this.isRange ? 653 : 301;
  24669. },
  24670. /**
  24671. * for i18n
  24672. */
  24673. singlePlaceholderText() {
  24674. return this.placeholder || (this.type === "date" ? this.selectDateText : this.selectDateTimeText);
  24675. },
  24676. startPlaceholderText() {
  24677. return this.startPlaceholder || this.startDateText;
  24678. },
  24679. endPlaceholderText() {
  24680. return this.endPlaceholder || this.endDateText;
  24681. },
  24682. selectDateText() {
  24683. return this.i18nT("uni-datetime-picker.selectDate");
  24684. },
  24685. selectDateTimeText() {
  24686. return this.i18nT("uni-datetime-picker.selectDateTime");
  24687. },
  24688. selectTimeText() {
  24689. return this.i18nT("uni-datetime-picker.selectTime");
  24690. },
  24691. startDateText() {
  24692. return this.startPlaceholder || this.i18nT("uni-datetime-picker.startDate");
  24693. },
  24694. startTimeText() {
  24695. return this.i18nT("uni-datetime-picker.startTime");
  24696. },
  24697. endDateText() {
  24698. return this.endPlaceholder || this.i18nT("uni-datetime-picker.endDate");
  24699. },
  24700. endTimeText() {
  24701. return this.i18nT("uni-datetime-picker.endTime");
  24702. },
  24703. okText() {
  24704. return this.i18nT("uni-datetime-picker.ok");
  24705. },
  24706. clearText() {
  24707. return this.i18nT("uni-datetime-picker.clear");
  24708. },
  24709. showClearIcon() {
  24710. return this.clearIcon && !this.disabled && (this.displayValue || this.displayRangeValue.startDate && this.displayRangeValue.endDate);
  24711. }
  24712. },
  24713. created() {
  24714. this.initI18nT();
  24715. this.platform();
  24716. },
  24717. methods: {
  24718. initI18nT() {
  24719. const vueI18n = initVueI18n(i18nMessages);
  24720. this.i18nT = vueI18n.t;
  24721. },
  24722. initPicker(newVal) {
  24723. if (!newVal && !this.defaultValue || Array.isArray(newVal) && !newVal.length) {
  24724. this.$nextTick(() => {
  24725. this.clear(false);
  24726. });
  24727. return;
  24728. }
  24729. if (!Array.isArray(newVal) && !this.isRange) {
  24730. if (newVal) {
  24731. this.displayValue = this.inputDate = this.calendarDate = getDate(newVal);
  24732. if (this.hasTime) {
  24733. this.pickerTime = getTime(newVal, this.hideSecond);
  24734. this.displayValue = `${this.displayValue} ${this.pickerTime}`;
  24735. }
  24736. } else if (this.defaultValue) {
  24737. this.inputDate = this.calendarDate = getDate(this.defaultValue);
  24738. if (this.hasTime) {
  24739. this.pickerTime = getTime(this.defaultValue, this.hideSecond);
  24740. }
  24741. }
  24742. } else {
  24743. const [before, after] = newVal;
  24744. if (!before && !after)
  24745. return;
  24746. const beforeDate = getDate(before);
  24747. const beforeTime = getTime(before, this.hideSecond);
  24748. const afterDate = getDate(after);
  24749. const afterTime = getTime(after, this.hideSecond);
  24750. const startDate = beforeDate;
  24751. const endDate = afterDate;
  24752. this.displayRangeValue.startDate = this.tempRange.startDate = startDate;
  24753. this.displayRangeValue.endDate = this.tempRange.endDate = endDate;
  24754. if (this.hasTime) {
  24755. this.displayRangeValue.startDate = `${beforeDate} ${beforeTime}`;
  24756. this.displayRangeValue.endDate = `${afterDate} ${afterTime}`;
  24757. this.tempRange.startTime = beforeTime;
  24758. this.tempRange.endTime = afterTime;
  24759. }
  24760. const defaultRange = {
  24761. before: beforeDate,
  24762. after: afterDate
  24763. };
  24764. this.startMultipleStatus = Object.assign({}, this.startMultipleStatus, defaultRange, {
  24765. which: "right"
  24766. });
  24767. this.endMultipleStatus = Object.assign({}, this.endMultipleStatus, defaultRange, {
  24768. which: "left"
  24769. });
  24770. }
  24771. },
  24772. updateLeftCale(e) {
  24773. const left = this.$refs.left;
  24774. left.cale.setHoverMultiple(e.after);
  24775. left.setDate(this.$refs.left.nowDate.fullDate);
  24776. },
  24777. updateRightCale(e) {
  24778. const right = this.$refs.right;
  24779. right.cale.setHoverMultiple(e.after);
  24780. right.setDate(this.$refs.right.nowDate.fullDate);
  24781. },
  24782. platform() {
  24783. if (typeof navigator !== "undefined") {
  24784. this.isPhone = navigator.userAgent.toLowerCase().indexOf("mobile") !== -1;
  24785. return;
  24786. }
  24787. const { windowWidth } = uni.getSystemInfoSync();
  24788. this.isPhone = windowWidth <= 500;
  24789. this.windowWidth = windowWidth;
  24790. },
  24791. show() {
  24792. if (this.disabled) {
  24793. return;
  24794. }
  24795. this.platform();
  24796. if (this.isPhone) {
  24797. setTimeout(() => {
  24798. this.$refs.mobile.open();
  24799. }, 0);
  24800. return;
  24801. }
  24802. this.pickerPositionStyle = {
  24803. top: "10px"
  24804. };
  24805. const dateEditor = uni.createSelectorQuery().in(this).select(".uni-date-editor");
  24806. dateEditor.boundingClientRect((rect) => {
  24807. if (this.windowWidth - rect.left < this.datePopupWidth) {
  24808. this.pickerPositionStyle.right = 0;
  24809. }
  24810. }).exec();
  24811. setTimeout(() => {
  24812. this.pickerVisible = !this.pickerVisible;
  24813. if (!this.isPhone && this.isRange && this.isFirstShow) {
  24814. this.isFirstShow = false;
  24815. const {
  24816. startDate,
  24817. endDate
  24818. } = this.calendarRange;
  24819. if (startDate && endDate) {
  24820. if (this.diffDate(startDate, endDate) < 30) {
  24821. this.$refs.right.changeMonth("pre");
  24822. }
  24823. } else {
  24824. this.$refs.right.changeMonth("next");
  24825. this.$refs.right.cale.lastHover = false;
  24826. }
  24827. }
  24828. }, 50);
  24829. },
  24830. close() {
  24831. setTimeout(() => {
  24832. this.pickerVisible = false;
  24833. this.$emit("maskClick", this.value);
  24834. this.$refs.mobile && this.$refs.mobile.close();
  24835. }, 20);
  24836. },
  24837. setEmit(value2) {
  24838. if (this.returnType === "timestamp" || this.returnType === "date") {
  24839. if (!Array.isArray(value2)) {
  24840. if (!this.hasTime) {
  24841. value2 = value2 + " 00:00:00";
  24842. }
  24843. value2 = this.createTimestamp(value2);
  24844. if (this.returnType === "date") {
  24845. value2 = new Date(value2);
  24846. }
  24847. } else {
  24848. if (!this.hasTime) {
  24849. value2[0] = value2[0] + " 00:00:00";
  24850. value2[1] = value2[1] + " 00:00:00";
  24851. }
  24852. value2[0] = this.createTimestamp(value2[0]);
  24853. value2[1] = this.createTimestamp(value2[1]);
  24854. if (this.returnType === "date") {
  24855. value2[0] = new Date(value2[0]);
  24856. value2[1] = new Date(value2[1]);
  24857. }
  24858. }
  24859. }
  24860. this.$emit("update:modelValue", value2);
  24861. this.$emit("input", value2);
  24862. this.$emit("change", value2);
  24863. this.isEmitValue = true;
  24864. },
  24865. createTimestamp(date3) {
  24866. date3 = fixIosDateFormat(date3);
  24867. return Date.parse(new Date(date3));
  24868. },
  24869. singleChange(e) {
  24870. this.calendarDate = this.inputDate = e.fulldate;
  24871. if (this.hasTime)
  24872. return;
  24873. this.confirmSingleChange();
  24874. },
  24875. confirmSingleChange() {
  24876. if (!checkDate(this.inputDate)) {
  24877. const now2 = /* @__PURE__ */ new Date();
  24878. this.calendarDate = this.inputDate = getDate(now2);
  24879. this.pickerTime = getTime(now2, this.hideSecond);
  24880. }
  24881. let startLaterInputDate = false;
  24882. let startDate, startTime;
  24883. if (this.start) {
  24884. let startString = this.start;
  24885. if (typeof this.start === "number") {
  24886. startString = getDateTime(this.start, this.hideSecond);
  24887. }
  24888. [startDate, startTime] = startString.split(" ");
  24889. if (this.start && !dateCompare(startDate, this.inputDate)) {
  24890. startLaterInputDate = true;
  24891. this.inputDate = startDate;
  24892. }
  24893. }
  24894. let endEarlierInputDate = false;
  24895. let endDate, endTime;
  24896. if (this.end) {
  24897. let endString = this.end;
  24898. if (typeof this.end === "number") {
  24899. endString = getDateTime(this.end, this.hideSecond);
  24900. }
  24901. [endDate, endTime] = endString.split(" ");
  24902. if (this.end && !dateCompare(this.inputDate, endDate)) {
  24903. endEarlierInputDate = true;
  24904. this.inputDate = endDate;
  24905. }
  24906. }
  24907. if (this.hasTime) {
  24908. if (startLaterInputDate) {
  24909. this.pickerTime = startTime || getDefaultSecond(this.hideSecond);
  24910. }
  24911. if (endEarlierInputDate) {
  24912. this.pickerTime = endTime || getDefaultSecond(this.hideSecond);
  24913. }
  24914. if (!this.pickerTime) {
  24915. this.pickerTime = getTime(Date.now(), this.hideSecond);
  24916. }
  24917. this.displayValue = `${this.inputDate} ${this.pickerTime}`;
  24918. } else {
  24919. this.displayValue = this.inputDate;
  24920. }
  24921. this.setEmit(this.displayValue);
  24922. this.pickerVisible = false;
  24923. },
  24924. leftChange(e) {
  24925. const {
  24926. before,
  24927. after
  24928. } = e.range;
  24929. this.rangeChange(before, after);
  24930. const obj = {
  24931. before: e.range.before,
  24932. after: e.range.after,
  24933. data: e.range.data,
  24934. fulldate: e.fulldate
  24935. };
  24936. this.startMultipleStatus = Object.assign({}, this.startMultipleStatus, obj);
  24937. },
  24938. rightChange(e) {
  24939. const {
  24940. before,
  24941. after
  24942. } = e.range;
  24943. this.rangeChange(before, after);
  24944. const obj = {
  24945. before: e.range.before,
  24946. after: e.range.after,
  24947. data: e.range.data,
  24948. fulldate: e.fulldate
  24949. };
  24950. this.endMultipleStatus = Object.assign({}, this.endMultipleStatus, obj);
  24951. },
  24952. mobileChange(e) {
  24953. if (this.isRange) {
  24954. const { before, after } = e.range;
  24955. if (!before || !after) {
  24956. return;
  24957. }
  24958. this.handleStartAndEnd(before, after, true);
  24959. if (this.hasTime) {
  24960. const {
  24961. startTime,
  24962. endTime
  24963. } = e.timeRange;
  24964. this.tempRange.startTime = startTime;
  24965. this.tempRange.endTime = endTime;
  24966. }
  24967. this.confirmRangeChange();
  24968. } else {
  24969. if (this.hasTime) {
  24970. this.displayValue = e.fulldate + " " + e.time;
  24971. } else {
  24972. this.displayValue = e.fulldate;
  24973. }
  24974. this.setEmit(this.displayValue);
  24975. }
  24976. this.$refs.mobile.close();
  24977. },
  24978. rangeChange(before, after) {
  24979. if (!(before && after))
  24980. return;
  24981. this.handleStartAndEnd(before, after, true);
  24982. if (this.hasTime)
  24983. return;
  24984. this.confirmRangeChange();
  24985. },
  24986. confirmRangeChange() {
  24987. if (!this.tempRange.startDate || !this.tempRange.endDate) {
  24988. this.pickerVisible = false;
  24989. return;
  24990. }
  24991. if (!checkDate(this.tempRange.startDate)) {
  24992. this.tempRange.startDate = getDate(Date.now());
  24993. }
  24994. if (!checkDate(this.tempRange.endDate)) {
  24995. this.tempRange.endDate = getDate(Date.now());
  24996. }
  24997. let start, end;
  24998. let startDateLaterRangeStartDate = false;
  24999. let startDateLaterRangeEndDate = false;
  25000. let startDate, startTime;
  25001. if (this.start) {
  25002. let startString = this.start;
  25003. if (typeof this.start === "number") {
  25004. startString = getDateTime(this.start, this.hideSecond);
  25005. }
  25006. [startDate, startTime] = startString.split(" ");
  25007. if (this.start && !dateCompare(this.start, this.tempRange.startDate)) {
  25008. startDateLaterRangeStartDate = true;
  25009. this.tempRange.startDate = startDate;
  25010. }
  25011. if (this.start && !dateCompare(this.start, this.tempRange.endDate)) {
  25012. startDateLaterRangeEndDate = true;
  25013. this.tempRange.endDate = startDate;
  25014. }
  25015. }
  25016. let endDateEarlierRangeStartDate = false;
  25017. let endDateEarlierRangeEndDate = false;
  25018. let endDate, endTime;
  25019. if (this.end) {
  25020. let endString = this.end;
  25021. if (typeof this.end === "number") {
  25022. endString = getDateTime(this.end, this.hideSecond);
  25023. }
  25024. [endDate, endTime] = endString.split(" ");
  25025. if (this.end && !dateCompare(this.tempRange.startDate, this.end)) {
  25026. endDateEarlierRangeStartDate = true;
  25027. this.tempRange.startDate = endDate;
  25028. }
  25029. if (this.end && !dateCompare(this.tempRange.endDate, this.end)) {
  25030. endDateEarlierRangeEndDate = true;
  25031. this.tempRange.endDate = endDate;
  25032. }
  25033. }
  25034. if (!this.hasTime) {
  25035. start = this.displayRangeValue.startDate = this.tempRange.startDate;
  25036. end = this.displayRangeValue.endDate = this.tempRange.endDate;
  25037. } else {
  25038. if (startDateLaterRangeStartDate) {
  25039. this.tempRange.startTime = startTime || getDefaultSecond(this.hideSecond);
  25040. } else if (endDateEarlierRangeStartDate) {
  25041. this.tempRange.startTime = endTime || getDefaultSecond(this.hideSecond);
  25042. }
  25043. if (!this.tempRange.startTime) {
  25044. this.tempRange.startTime = getTime(Date.now(), this.hideSecond);
  25045. }
  25046. if (startDateLaterRangeEndDate) {
  25047. this.tempRange.endTime = startTime || getDefaultSecond(this.hideSecond);
  25048. } else if (endDateEarlierRangeEndDate) {
  25049. this.tempRange.endTime = endTime || getDefaultSecond(this.hideSecond);
  25050. }
  25051. if (!this.tempRange.endTime) {
  25052. this.tempRange.endTime = getTime(Date.now(), this.hideSecond);
  25053. }
  25054. start = this.displayRangeValue.startDate = `${this.tempRange.startDate} ${this.tempRange.startTime}`;
  25055. end = this.displayRangeValue.endDate = `${this.tempRange.endDate} ${this.tempRange.endTime}`;
  25056. }
  25057. if (!dateCompare(start, end)) {
  25058. [start, end] = [end, start];
  25059. }
  25060. this.displayRangeValue.startDate = start;
  25061. this.displayRangeValue.endDate = end;
  25062. const displayRange = [start, end];
  25063. this.setEmit(displayRange);
  25064. this.pickerVisible = false;
  25065. },
  25066. handleStartAndEnd(before, after, temp = false) {
  25067. if (!(before && after))
  25068. return;
  25069. const type2 = temp ? "tempRange" : "range";
  25070. const isStartEarlierEnd = dateCompare(before, after);
  25071. this[type2].startDate = isStartEarlierEnd ? before : after;
  25072. this[type2].endDate = isStartEarlierEnd ? after : before;
  25073. },
  25074. /**
  25075. * 比较时间大小
  25076. */
  25077. dateCompare(startDate, endDate) {
  25078. startDate = new Date(startDate.replace("-", "/").replace("-", "/"));
  25079. endDate = new Date(endDate.replace("-", "/").replace("-", "/"));
  25080. return startDate <= endDate;
  25081. },
  25082. /**
  25083. * 比较时间差
  25084. */
  25085. diffDate(startDate, endDate) {
  25086. startDate = new Date(startDate.replace("-", "/").replace("-", "/"));
  25087. endDate = new Date(endDate.replace("-", "/").replace("-", "/"));
  25088. const diff = (endDate - startDate) / (24 * 60 * 60 * 1e3);
  25089. return Math.abs(diff);
  25090. },
  25091. clear(needEmit = true) {
  25092. if (!this.isRange) {
  25093. this.displayValue = "";
  25094. this.inputDate = "";
  25095. this.pickerTime = "";
  25096. if (this.isPhone) {
  25097. this.$refs.mobile && this.$refs.mobile.clearCalender();
  25098. } else {
  25099. this.$refs.pcSingle && this.$refs.pcSingle.clearCalender();
  25100. }
  25101. if (needEmit) {
  25102. this.$emit("change", "");
  25103. this.$emit("input", "");
  25104. this.$emit("update:modelValue", "");
  25105. }
  25106. } else {
  25107. this.displayRangeValue.startDate = "";
  25108. this.displayRangeValue.endDate = "";
  25109. this.tempRange.startDate = "";
  25110. this.tempRange.startTime = "";
  25111. this.tempRange.endDate = "";
  25112. this.tempRange.endTime = "";
  25113. if (this.isPhone) {
  25114. this.$refs.mobile && this.$refs.mobile.clearCalender();
  25115. } else {
  25116. this.$refs.left && this.$refs.left.clearCalender();
  25117. this.$refs.right && this.$refs.right.clearCalender();
  25118. this.$refs.right && this.$refs.right.changeMonth("next");
  25119. }
  25120. if (needEmit) {
  25121. this.$emit("change", []);
  25122. this.$emit("input", []);
  25123. this.$emit("update:modelValue", []);
  25124. }
  25125. }
  25126. }
  25127. }
  25128. };
  25129. function _sfc_render$R(_ctx, _cache, $props, $setup, $data, $options) {
  25130. const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_0$3);
  25131. const _component_time_picker = vue.resolveComponent("time-picker");
  25132. const _component_Calendar = vue.resolveComponent("Calendar");
  25133. return vue.openBlock(), vue.createElementBlock("view", { class: "uni-date" }, [
  25134. vue.createElementVNode("view", {
  25135. class: "uni-date-editor",
  25136. onClick: _cache[1] || (_cache[1] = (...args) => $options.show && $options.show(...args))
  25137. }, [
  25138. vue.renderSlot(_ctx.$slots, "default", {}, () => [
  25139. vue.createElementVNode(
  25140. "view",
  25141. {
  25142. class: vue.normalizeClass(["uni-date-editor--x", { "uni-date-editor--x__disabled": $props.disabled, "uni-date-x--border": $props.border }])
  25143. },
  25144. [
  25145. !$data.isRange ? (vue.openBlock(), vue.createElementBlock("view", {
  25146. key: 0,
  25147. class: "uni-date-x uni-date-single"
  25148. }, [
  25149. vue.createVNode(_component_uni_icons, {
  25150. class: "icon-calendar",
  25151. type: "calendar",
  25152. color: "#c0c4cc",
  25153. size: "22"
  25154. }),
  25155. vue.createElementVNode(
  25156. "view",
  25157. { class: "uni-date__x-input" },
  25158. vue.toDisplayString($data.displayValue || $options.singlePlaceholderText),
  25159. 1
  25160. /* TEXT */
  25161. )
  25162. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  25163. key: 1,
  25164. class: "uni-date-x uni-date-range"
  25165. }, [
  25166. vue.createVNode(_component_uni_icons, {
  25167. class: "icon-calendar",
  25168. type: "calendar",
  25169. color: "#c0c4cc",
  25170. size: "22"
  25171. }),
  25172. vue.createElementVNode(
  25173. "view",
  25174. { class: "uni-date__x-input text-center" },
  25175. vue.toDisplayString($data.displayRangeValue.startDate || $options.startPlaceholderText),
  25176. 1
  25177. /* TEXT */
  25178. ),
  25179. vue.createElementVNode(
  25180. "view",
  25181. { class: "range-separator" },
  25182. vue.toDisplayString($props.rangeSeparator),
  25183. 1
  25184. /* TEXT */
  25185. ),
  25186. vue.createElementVNode(
  25187. "view",
  25188. { class: "uni-date__x-input text-center" },
  25189. vue.toDisplayString($data.displayRangeValue.endDate || $options.endPlaceholderText),
  25190. 1
  25191. /* TEXT */
  25192. )
  25193. ])),
  25194. $options.showClearIcon ? (vue.openBlock(), vue.createElementBlock("view", {
  25195. key: 2,
  25196. class: "uni-date__icon-clear",
  25197. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.clear && $options.clear(...args), ["stop"]))
  25198. }, [
  25199. vue.createVNode(_component_uni_icons, {
  25200. type: "clear",
  25201. color: "#c0c4cc",
  25202. size: "22"
  25203. })
  25204. ])) : vue.createCommentVNode("v-if", true)
  25205. ],
  25206. 2
  25207. /* CLASS */
  25208. )
  25209. ], true)
  25210. ]),
  25211. vue.withDirectives(vue.createElementVNode(
  25212. "view",
  25213. {
  25214. class: "uni-date-mask--pc",
  25215. onClick: _cache[2] || (_cache[2] = (...args) => $options.close && $options.close(...args))
  25216. },
  25217. null,
  25218. 512
  25219. /* NEED_PATCH */
  25220. ), [
  25221. [vue.vShow, $data.pickerVisible]
  25222. ]),
  25223. !$data.isPhone ? vue.withDirectives((vue.openBlock(), vue.createElementBlock(
  25224. "view",
  25225. {
  25226. key: 0,
  25227. ref: "datePicker",
  25228. class: "uni-date-picker__container"
  25229. },
  25230. [
  25231. !$data.isRange ? (vue.openBlock(), vue.createElementBlock(
  25232. "view",
  25233. {
  25234. key: 0,
  25235. class: "uni-date-single--x",
  25236. style: vue.normalizeStyle($data.pickerPositionStyle)
  25237. },
  25238. [
  25239. vue.createElementVNode("view", { class: "uni-popper__arrow" }),
  25240. $data.hasTime ? (vue.openBlock(), vue.createElementBlock("view", {
  25241. key: 0,
  25242. class: "uni-date-changed popup-x-header"
  25243. }, [
  25244. vue.withDirectives(vue.createElementVNode("input", {
  25245. class: "uni-date__input text-center",
  25246. type: "text",
  25247. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $data.inputDate = $event),
  25248. placeholder: $options.selectDateText
  25249. }, null, 8, ["placeholder"]), [
  25250. [vue.vModelText, $data.inputDate]
  25251. ]),
  25252. vue.createVNode(_component_time_picker, {
  25253. type: "time",
  25254. modelValue: $data.pickerTime,
  25255. "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $data.pickerTime = $event),
  25256. border: false,
  25257. disabled: !$data.inputDate,
  25258. start: $options.timepickerStartTime,
  25259. end: $options.timepickerEndTime,
  25260. hideSecond: $props.hideSecond,
  25261. style: { "width": "100%" }
  25262. }, {
  25263. default: vue.withCtx(() => [
  25264. vue.withDirectives(vue.createElementVNode("input", {
  25265. class: "uni-date__input text-center",
  25266. type: "text",
  25267. "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $data.pickerTime = $event),
  25268. placeholder: $options.selectTimeText,
  25269. disabled: !$data.inputDate
  25270. }, null, 8, ["placeholder", "disabled"]), [
  25271. [vue.vModelText, $data.pickerTime]
  25272. ])
  25273. ]),
  25274. _: 1
  25275. /* STABLE */
  25276. }, 8, ["modelValue", "disabled", "start", "end", "hideSecond"])
  25277. ])) : vue.createCommentVNode("v-if", true),
  25278. vue.createVNode(_component_Calendar, {
  25279. ref: "pcSingle",
  25280. showMonth: false,
  25281. "start-date": $data.calendarRange.startDate,
  25282. "end-date": $data.calendarRange.endDate,
  25283. date: $data.calendarDate,
  25284. onChange: $options.singleChange,
  25285. "default-value": $props.defaultValue,
  25286. style: { "padding": "0 8px" }
  25287. }, null, 8, ["start-date", "end-date", "date", "onChange", "default-value"]),
  25288. $data.hasTime ? (vue.openBlock(), vue.createElementBlock("view", {
  25289. key: 1,
  25290. class: "popup-x-footer"
  25291. }, [
  25292. vue.createElementVNode(
  25293. "text",
  25294. {
  25295. class: "confirm-text",
  25296. onClick: _cache[6] || (_cache[6] = (...args) => $options.confirmSingleChange && $options.confirmSingleChange(...args))
  25297. },
  25298. vue.toDisplayString($options.okText),
  25299. 1
  25300. /* TEXT */
  25301. )
  25302. ])) : vue.createCommentVNode("v-if", true)
  25303. ],
  25304. 4
  25305. /* STYLE */
  25306. )) : (vue.openBlock(), vue.createElementBlock(
  25307. "view",
  25308. {
  25309. key: 1,
  25310. class: "uni-date-range--x",
  25311. style: vue.normalizeStyle($data.pickerPositionStyle)
  25312. },
  25313. [
  25314. vue.createElementVNode("view", { class: "uni-popper__arrow" }),
  25315. $data.hasTime ? (vue.openBlock(), vue.createElementBlock("view", {
  25316. key: 0,
  25317. class: "popup-x-header uni-date-changed"
  25318. }, [
  25319. vue.createElementVNode("view", { class: "popup-x-header--datetime" }, [
  25320. vue.withDirectives(vue.createElementVNode("input", {
  25321. class: "uni-date__input uni-date-range__input",
  25322. type: "text",
  25323. "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => $data.tempRange.startDate = $event),
  25324. placeholder: $options.startDateText
  25325. }, null, 8, ["placeholder"]), [
  25326. [vue.vModelText, $data.tempRange.startDate]
  25327. ]),
  25328. vue.createVNode(_component_time_picker, {
  25329. type: "time",
  25330. modelValue: $data.tempRange.startTime,
  25331. "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => $data.tempRange.startTime = $event),
  25332. start: $options.timepickerStartTime,
  25333. border: false,
  25334. disabled: !$data.tempRange.startDate,
  25335. hideSecond: $props.hideSecond
  25336. }, {
  25337. default: vue.withCtx(() => [
  25338. vue.withDirectives(vue.createElementVNode("input", {
  25339. class: "uni-date__input uni-date-range__input",
  25340. type: "text",
  25341. "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => $data.tempRange.startTime = $event),
  25342. placeholder: $options.startTimeText,
  25343. disabled: !$data.tempRange.startDate
  25344. }, null, 8, ["placeholder", "disabled"]), [
  25345. [vue.vModelText, $data.tempRange.startTime]
  25346. ])
  25347. ]),
  25348. _: 1
  25349. /* STABLE */
  25350. }, 8, ["modelValue", "start", "disabled", "hideSecond"])
  25351. ]),
  25352. vue.createVNode(_component_uni_icons, {
  25353. type: "arrowthinright",
  25354. color: "#999",
  25355. style: { "line-height": "40px" }
  25356. }),
  25357. vue.createElementVNode("view", { class: "popup-x-header--datetime" }, [
  25358. vue.withDirectives(vue.createElementVNode("input", {
  25359. class: "uni-date__input uni-date-range__input",
  25360. type: "text",
  25361. "onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => $data.tempRange.endDate = $event),
  25362. placeholder: $options.endDateText
  25363. }, null, 8, ["placeholder"]), [
  25364. [vue.vModelText, $data.tempRange.endDate]
  25365. ]),
  25366. vue.createVNode(_component_time_picker, {
  25367. type: "time",
  25368. modelValue: $data.tempRange.endTime,
  25369. "onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) => $data.tempRange.endTime = $event),
  25370. end: $options.timepickerEndTime,
  25371. border: false,
  25372. disabled: !$data.tempRange.endDate,
  25373. hideSecond: $props.hideSecond
  25374. }, {
  25375. default: vue.withCtx(() => [
  25376. vue.withDirectives(vue.createElementVNode("input", {
  25377. class: "uni-date__input uni-date-range__input",
  25378. type: "text",
  25379. "onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => $data.tempRange.endTime = $event),
  25380. placeholder: $options.endTimeText,
  25381. disabled: !$data.tempRange.endDate
  25382. }, null, 8, ["placeholder", "disabled"]), [
  25383. [vue.vModelText, $data.tempRange.endTime]
  25384. ])
  25385. ]),
  25386. _: 1
  25387. /* STABLE */
  25388. }, 8, ["modelValue", "end", "disabled", "hideSecond"])
  25389. ])
  25390. ])) : vue.createCommentVNode("v-if", true),
  25391. vue.createElementVNode("view", { class: "popup-x-body" }, [
  25392. vue.createVNode(_component_Calendar, {
  25393. ref: "left",
  25394. showMonth: false,
  25395. "start-date": $data.calendarRange.startDate,
  25396. "end-date": $data.calendarRange.endDate,
  25397. range: true,
  25398. pleStatus: $data.endMultipleStatus,
  25399. onChange: $options.leftChange,
  25400. onFirstEnterCale: $options.updateRightCale,
  25401. style: { "padding": "0 8px" }
  25402. }, null, 8, ["start-date", "end-date", "pleStatus", "onChange", "onFirstEnterCale"]),
  25403. vue.createVNode(_component_Calendar, {
  25404. ref: "right",
  25405. showMonth: false,
  25406. "start-date": $data.calendarRange.startDate,
  25407. "end-date": $data.calendarRange.endDate,
  25408. range: true,
  25409. onChange: $options.rightChange,
  25410. pleStatus: $data.startMultipleStatus,
  25411. onFirstEnterCale: $options.updateLeftCale,
  25412. style: { "padding": "0 8px", "border-left": "1px solid #F1F1F1" }
  25413. }, null, 8, ["start-date", "end-date", "onChange", "pleStatus", "onFirstEnterCale"])
  25414. ]),
  25415. $data.hasTime ? (vue.openBlock(), vue.createElementBlock("view", {
  25416. key: 1,
  25417. class: "popup-x-footer"
  25418. }, [
  25419. vue.createElementVNode(
  25420. "text",
  25421. {
  25422. onClick: _cache[13] || (_cache[13] = (...args) => $options.clear && $options.clear(...args))
  25423. },
  25424. vue.toDisplayString($options.clearText),
  25425. 1
  25426. /* TEXT */
  25427. ),
  25428. vue.createElementVNode(
  25429. "text",
  25430. {
  25431. class: "confirm-text",
  25432. onClick: _cache[14] || (_cache[14] = (...args) => $options.confirmRangeChange && $options.confirmRangeChange(...args))
  25433. },
  25434. vue.toDisplayString($options.okText),
  25435. 1
  25436. /* TEXT */
  25437. )
  25438. ])) : vue.createCommentVNode("v-if", true)
  25439. ],
  25440. 4
  25441. /* STYLE */
  25442. ))
  25443. ],
  25444. 512
  25445. /* NEED_PATCH */
  25446. )), [
  25447. [vue.vShow, $data.pickerVisible]
  25448. ]) : vue.createCommentVNode("v-if", true),
  25449. $data.isPhone ? (vue.openBlock(), vue.createBlock(_component_Calendar, {
  25450. key: 1,
  25451. ref: "mobile",
  25452. clearDate: false,
  25453. date: $data.calendarDate,
  25454. defTime: $options.mobileCalendarTime,
  25455. "start-date": $data.calendarRange.startDate,
  25456. "end-date": $data.calendarRange.endDate,
  25457. selectableTimes: $options.mobSelectableTime,
  25458. startPlaceholder: $props.startPlaceholder,
  25459. endPlaceholder: $props.endPlaceholder,
  25460. "default-value": $props.defaultValue,
  25461. pleStatus: $data.endMultipleStatus,
  25462. showMonth: false,
  25463. range: $data.isRange,
  25464. hasTime: $data.hasTime,
  25465. insert: false,
  25466. hideSecond: $props.hideSecond,
  25467. onConfirm: $options.mobileChange,
  25468. onMaskClose: $options.close
  25469. }, null, 8, ["date", "defTime", "start-date", "end-date", "selectableTimes", "startPlaceholder", "endPlaceholder", "default-value", "pleStatus", "range", "hasTime", "hideSecond", "onConfirm", "onMaskClose"])) : vue.createCommentVNode("v-if", true)
  25470. ]);
  25471. }
  25472. const __easycom_0$2 = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["render", _sfc_render$R], ["__scopeId", "data-v-9802168a"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue"]]);
  25473. const _sfc_main$R = {
  25474. __name: "after-sale",
  25475. setup(__props, { expose: __expose }) {
  25476. __expose();
  25477. const searchParams = vue.ref({
  25478. startTime: "",
  25479. endTime: ""
  25480. });
  25481. const handleSearch = () => {
  25482. uni.navigateTo({
  25483. url: `/pages/index/statistic/after-sale-result?startTime=${encodeURIComponent(searchParams.value.startTime)}&endTime=${encodeURIComponent(searchParams.value.endTime)}`
  25484. });
  25485. };
  25486. const __returned__ = { searchParams, handleSearch, ref: vue.ref };
  25487. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  25488. return __returned__;
  25489. }
  25490. };
  25491. function _sfc_render$Q(_ctx, _cache, $props, $setup, $data, $options) {
  25492. const _component_uni_datetime_picker = resolveEasycom(vue.resolveDynamicComponent("uni-datetime-picker"), __easycom_0$2);
  25493. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  25494. return vue.openBlock(), vue.createElementBlock("view", {
  25495. class: "common-page",
  25496. style: { "padding": "0" }
  25497. }, [
  25498. vue.createElementVNode("view", { class: "search-area flex-d" }, [
  25499. vue.createElementVNode("view", { class: "flex-a mb-20" }, [
  25500. vue.createElementVNode("text", { class: "font-13 mr-10" }, "开始时间:"),
  25501. vue.createVNode(_component_uni_datetime_picker, {
  25502. type: "datetime",
  25503. modelValue: $setup.searchParams.startTime,
  25504. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchParams.startTime = $event),
  25505. placeholder: "请选择开始时间"
  25506. }, null, 8, ["modelValue"])
  25507. ]),
  25508. vue.createElementVNode("view", { class: "flex-a" }, [
  25509. vue.createElementVNode("text", { class: "font-13 mr-10" }, "结束时间:"),
  25510. vue.createVNode(_component_uni_datetime_picker, {
  25511. type: "datetime",
  25512. modelValue: $setup.searchParams.endTime,
  25513. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.searchParams.endTime = $event),
  25514. placeholder: "请选择结束时间"
  25515. }, null, 8, ["modelValue"])
  25516. ])
  25517. ]),
  25518. vue.createElementVNode("view", { class: "footer" }, [
  25519. vue.createVNode(_component_u_button, {
  25520. type: "primary",
  25521. onClick: $setup.handleSearch,
  25522. text: "查询",
  25523. customStyle: "width:100%;height:100rpx;margin:0 auto;"
  25524. })
  25525. ])
  25526. ]);
  25527. }
  25528. const PagesIndexStatisticAfterSale = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["render", _sfc_render$Q], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/index/statistic/after-sale.vue"]]);
  25529. const _sfc_main$Q = {
  25530. __name: "after-sale-result",
  25531. setup(__props, { expose: __expose }) {
  25532. __expose();
  25533. const otherParams = vue.ref({
  25534. startTime: "",
  25535. endTime: ""
  25536. });
  25537. const scrollRef = vue.ref(null);
  25538. const refreshList = () => {
  25539. var _a;
  25540. (_a = scrollRef.value) == null ? void 0 : _a.resetUpScroll();
  25541. getStatData();
  25542. };
  25543. let dataList = vue.ref([]);
  25544. const updateList = (data) => {
  25545. dataList.value = data;
  25546. };
  25547. const total = vue.ref({
  25548. refundOrderNum: 0,
  25549. sendOrderNum: 0,
  25550. notSendBookNum: 0
  25551. });
  25552. const getStatData = () => {
  25553. uni.$u.http.get("/app/orderStat/afterOrderStat?startTime=" + otherParams.value.startTime + "&endTime=" + otherParams.value.endTime).then((res) => {
  25554. total.value = res.data;
  25555. });
  25556. };
  25557. onLoad((options) => {
  25558. if (options.startTime && options.endTime) {
  25559. otherParams.value.startTime = decodeURIComponent(options.startTime);
  25560. otherParams.value.endTime = decodeURIComponent(options.endTime);
  25561. getStatData();
  25562. } else {
  25563. otherParams.value.startTime = "";
  25564. otherParams.value.endTime = "";
  25565. getStatData();
  25566. }
  25567. });
  25568. const __returned__ = { otherParams, scrollRef, refreshList, get dataList() {
  25569. return dataList;
  25570. }, set dataList(v) {
  25571. dataList = v;
  25572. }, updateList, total, getStatData, reactive: vue.reactive, ref: vue.ref, onMounted: vue.onMounted, PageScroll, get onLoad() {
  25573. return onLoad;
  25574. } };
  25575. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  25576. return __returned__;
  25577. }
  25578. };
  25579. function _sfc_render$P(_ctx, _cache, $props, $setup, $data, $options) {
  25580. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_0$7);
  25581. return vue.openBlock(), vue.createElementBlock("view", {
  25582. class: "common-page",
  25583. style: { "padding": "0" }
  25584. }, [
  25585. vue.createVNode($setup["PageScroll"], {
  25586. requestStr: "/app/orderStat/afterOrderDailyStat",
  25587. onUpdateList: $setup.updateList,
  25588. ref: "scrollRef",
  25589. otherParams: $setup.otherParams
  25590. }, {
  25591. default: vue.withCtx(() => [
  25592. vue.createVNode(_component_u_sticky, { customNavHeight: 0 }, {
  25593. default: vue.withCtx(() => [
  25594. vue.createElementVNode("view", { class: "search-area flex-d" }, [
  25595. vue.createElementVNode("view", { class: "flex-a" }, [
  25596. vue.createElementVNode("view", { class: "text-item flex-2" }, "申请时段"),
  25597. vue.createElementVNode("view", { class: "text-item flex-1" }, "售后订单数"),
  25598. vue.createElementVNode("view", { class: "text-item flex-1" }, "发出订单数"),
  25599. vue.createElementVNode("view", { class: "text-item flex-1" }, "未发订单数")
  25600. ])
  25601. ])
  25602. ]),
  25603. _: 1
  25604. /* STABLE */
  25605. }),
  25606. vue.createElementVNode("view", { class: "list-con" }, [
  25607. $setup.dataList.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  25608. key: 0,
  25609. class: "flex-a list-item stat-header"
  25610. }, [
  25611. vue.createElementVNode("view", {
  25612. class: "text-item flex-2",
  25613. style: { "flex": "2" }
  25614. }, [
  25615. $setup.otherParams.startTime && $setup.otherParams.endTime ? (vue.openBlock(), vue.createElementBlock("view", { key: 0 }, [
  25616. vue.createElementVNode("view", { class: "flex-d" }, [
  25617. vue.createElementVNode(
  25618. "view",
  25619. { class: "text-item flex-1" },
  25620. vue.toDisplayString($setup.otherParams.startTime),
  25621. 1
  25622. /* TEXT */
  25623. ),
  25624. vue.createElementVNode(
  25625. "view",
  25626. { class: "text-item flex-1" },
  25627. vue.toDisplayString($setup.otherParams.endTime),
  25628. 1
  25629. /* TEXT */
  25630. )
  25631. ])
  25632. ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 1 }, "合计"))
  25633. ]),
  25634. vue.createElementVNode(
  25635. "view",
  25636. { class: "text-item flex-1" },
  25637. vue.toDisplayString($setup.total.refundOrderNum),
  25638. 1
  25639. /* TEXT */
  25640. ),
  25641. vue.createElementVNode(
  25642. "view",
  25643. { class: "text-item flex-1" },
  25644. vue.toDisplayString($setup.total.sendOrderNum),
  25645. 1
  25646. /* TEXT */
  25647. ),
  25648. vue.createElementVNode(
  25649. "view",
  25650. { class: "text-item flex-1" },
  25651. vue.toDisplayString($setup.total.notSendBookNum),
  25652. 1
  25653. /* TEXT */
  25654. )
  25655. ])) : vue.createCommentVNode("v-if", true),
  25656. (vue.openBlock(true), vue.createElementBlock(
  25657. vue.Fragment,
  25658. null,
  25659. vue.renderList($setup.dataList, (item, index2) => {
  25660. return vue.openBlock(), vue.createElementBlock("view", {
  25661. key: index2,
  25662. class: "flex-a list-item"
  25663. }, [
  25664. vue.createElementVNode(
  25665. "view",
  25666. {
  25667. class: "text-item flex-2",
  25668. style: { "flex": "2" }
  25669. },
  25670. vue.toDisplayString(item.statDate),
  25671. 1
  25672. /* TEXT */
  25673. ),
  25674. vue.createElementVNode(
  25675. "view",
  25676. { class: "text-item flex-1" },
  25677. vue.toDisplayString(item.refundOrderNum),
  25678. 1
  25679. /* TEXT */
  25680. ),
  25681. vue.createElementVNode(
  25682. "view",
  25683. { class: "text-item flex-1" },
  25684. vue.toDisplayString(item.sendOrderNum),
  25685. 1
  25686. /* TEXT */
  25687. ),
  25688. vue.createElementVNode(
  25689. "view",
  25690. { class: "text-item flex-1" },
  25691. vue.toDisplayString(item.notSendBookNum),
  25692. 1
  25693. /* TEXT */
  25694. )
  25695. ]);
  25696. }),
  25697. 128
  25698. /* KEYED_FRAGMENT */
  25699. ))
  25700. ])
  25701. ]),
  25702. _: 1
  25703. /* STABLE */
  25704. }, 8, ["otherParams"])
  25705. ]);
  25706. }
  25707. const PagesIndexStatisticAfterSaleResult = /* @__PURE__ */ _export_sfc(_sfc_main$Q, [["render", _sfc_render$P], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/index/statistic/after-sale-result.vue"]]);
  25708. const _sfc_main$P = {
  25709. __name: "package",
  25710. setup(__props, { expose: __expose }) {
  25711. __expose();
  25712. const scrollRef = vue.ref(null);
  25713. let dataList = vue.ref([]);
  25714. const updateList = (data) => {
  25715. dataList.value = data;
  25716. };
  25717. const __returned__ = { scrollRef, get dataList() {
  25718. return dataList;
  25719. }, set dataList(v) {
  25720. dataList = v;
  25721. }, updateList, PageScroll, ref: vue.ref };
  25722. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  25723. return __returned__;
  25724. }
  25725. };
  25726. function _sfc_render$O(_ctx, _cache, $props, $setup, $data, $options) {
  25727. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_0$7);
  25728. return vue.openBlock(), vue.createElementBlock("view", {
  25729. class: "common-page",
  25730. style: { "padding": "0" }
  25731. }, [
  25732. vue.createVNode(
  25733. $setup["PageScroll"],
  25734. {
  25735. requestStr: "/app/orderStat/splitOrderStat",
  25736. onUpdateList: $setup.updateList,
  25737. ref: "scrollRef"
  25738. },
  25739. {
  25740. default: vue.withCtx(() => [
  25741. vue.createVNode(_component_u_sticky, { customNavHeight: 0 }, {
  25742. default: vue.withCtx(() => [
  25743. vue.createElementVNode("view", { class: "search-area flex-a" }, [
  25744. vue.createElementVNode("view", { class: "text-item flex-1" }, "日期"),
  25745. vue.createElementVNode("view", { class: "text-item flex-1" }, "数量")
  25746. ])
  25747. ]),
  25748. _: 1
  25749. /* STABLE */
  25750. }),
  25751. vue.createElementVNode("view", { class: "list-con" }, [
  25752. (vue.openBlock(true), vue.createElementBlock(
  25753. vue.Fragment,
  25754. null,
  25755. vue.renderList($setup.dataList, (item, index2) => {
  25756. return vue.openBlock(), vue.createElementBlock("view", {
  25757. key: index2,
  25758. class: "flex-a"
  25759. }, [
  25760. vue.createElementVNode(
  25761. "view",
  25762. { class: "text-item flex-1" },
  25763. vue.toDisplayString(item.statDate),
  25764. 1
  25765. /* TEXT */
  25766. ),
  25767. vue.createElementVNode(
  25768. "view",
  25769. { class: "text-item flex-1" },
  25770. vue.toDisplayString(item.statNum),
  25771. 1
  25772. /* TEXT */
  25773. )
  25774. ]);
  25775. }),
  25776. 128
  25777. /* KEYED_FRAGMENT */
  25778. ))
  25779. ])
  25780. ]),
  25781. _: 1
  25782. /* STABLE */
  25783. },
  25784. 512
  25785. /* NEED_PATCH */
  25786. )
  25787. ]);
  25788. }
  25789. const PagesIndexStatisticPackage = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["render", _sfc_render$O], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/index/statistic/package.vue"]]);
  25790. const _sfc_main$O = {
  25791. name: "GoodIn"
  25792. };
  25793. function _sfc_render$N(_ctx, _cache, $props, $setup, $data, $options) {
  25794. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  25795. vue.createCommentVNode(" 开发中提示 "),
  25796. vue.createElementVNode("view", { class: "developing" }, [
  25797. vue.createElementVNode("text", null, "开发中")
  25798. ])
  25799. ]);
  25800. }
  25801. const PagesIndexWmsMediumIn = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["render", _sfc_render$N], ["__scopeId", "data-v-04e21b6f"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/index/wms/medium-in.vue"]]);
  25802. const _sfc_main$N = {
  25803. name: "GoodIn"
  25804. };
  25805. function _sfc_render$M(_ctx, _cache, $props, $setup, $data, $options) {
  25806. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  25807. vue.createCommentVNode(" 开发中提示 "),
  25808. vue.createElementVNode("view", { class: "developing" }, [
  25809. vue.createElementVNode("text", null, "开发中")
  25810. ])
  25811. ]);
  25812. }
  25813. const PagesIndexWmsGoodIn = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["render", _sfc_render$M], ["__scopeId", "data-v-701c6544"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/index/wms/good-in.vue"]]);
  25814. const _sfc_main$M = {
  25815. name: "GoodIn"
  25816. };
  25817. function _sfc_render$L(_ctx, _cache, $props, $setup, $data, $options) {
  25818. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  25819. vue.createCommentVNode(" 开发中提示 "),
  25820. vue.createElementVNode("view", { class: "developing" }, [
  25821. vue.createElementVNode("text", null, "开发中")
  25822. ])
  25823. ]);
  25824. }
  25825. const PagesIndexWmsSecondaryIn = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["render", _sfc_render$L], ["__scopeId", "data-v-52deef37"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/index/wms/secondary-in.vue"]]);
  25826. const MIN_DISTANCE = 10;
  25827. function getDirection(x, y) {
  25828. if (x > y && x > MIN_DISTANCE) {
  25829. return "horizontal";
  25830. }
  25831. if (y > x && y > MIN_DISTANCE) {
  25832. return "vertical";
  25833. }
  25834. return "";
  25835. }
  25836. const touch = {
  25837. methods: {
  25838. getTouchPoint(e) {
  25839. if (!e) {
  25840. return {
  25841. x: 0,
  25842. y: 0
  25843. };
  25844. }
  25845. if (e.touches && e.touches[0]) {
  25846. return {
  25847. x: e.touches[0].pageX,
  25848. y: e.touches[0].pageY
  25849. };
  25850. }
  25851. if (e.changedTouches && e.changedTouches[0]) {
  25852. return {
  25853. x: e.changedTouches[0].pageX,
  25854. y: e.changedTouches[0].pageY
  25855. };
  25856. }
  25857. return {
  25858. x: e.clientX || 0,
  25859. y: e.clientY || 0
  25860. };
  25861. },
  25862. resetTouchStatus() {
  25863. this.direction = "";
  25864. this.deltaX = 0;
  25865. this.deltaY = 0;
  25866. this.offsetX = 0;
  25867. this.offsetY = 0;
  25868. },
  25869. touchStart(event) {
  25870. this.resetTouchStatus();
  25871. const touch2 = this.getTouchPoint(event);
  25872. this.startX = touch2.x;
  25873. this.startY = touch2.y;
  25874. },
  25875. touchMove(event) {
  25876. const touch2 = this.getTouchPoint(event);
  25877. this.deltaX = touch2.x - this.startX;
  25878. this.deltaY = touch2.y - this.startY;
  25879. this.offsetX = Math.abs(this.deltaX);
  25880. this.offsetY = Math.abs(this.deltaY);
  25881. this.direction = this.direction || getDirection(this.offsetX, this.offsetY);
  25882. }
  25883. }
  25884. };
  25885. const props$7 = {
  25886. props: {
  25887. // 控制打开或者关闭
  25888. show: {
  25889. type: Boolean,
  25890. default: props$G.swipeActionItem.show
  25891. },
  25892. // 标识符,如果是v-for,可用index索引值
  25893. name: {
  25894. type: [String, Number],
  25895. default: props$G.swipeActionItem.name
  25896. },
  25897. // 是否禁用
  25898. disabled: {
  25899. type: Boolean,
  25900. default: props$G.swipeActionItem.disabled
  25901. },
  25902. // 是否自动关闭其他swipe按钮组
  25903. autoClose: {
  25904. type: Boolean,
  25905. default: props$G.swipeActionItem.autoClose
  25906. },
  25907. // 滑动距离阈值,只有大于此值,才被认为是要打开菜单
  25908. threshold: {
  25909. type: Number,
  25910. default: props$G.swipeActionItem.threshold
  25911. },
  25912. // 右侧按钮内容
  25913. options: {
  25914. type: Array,
  25915. default() {
  25916. return uni.$u.props.swipeActionItem.rightOptions;
  25917. }
  25918. },
  25919. // 动画过渡时间,单位ms
  25920. duration: {
  25921. type: [String, Number],
  25922. default: props$G.swipeActionItem.duration
  25923. }
  25924. }
  25925. };
  25926. const wxs = {
  25927. methods: {
  25928. // 关闭时执行
  25929. closeHandler() {
  25930. this.status = "close";
  25931. },
  25932. setState(status) {
  25933. this.status = status;
  25934. },
  25935. closeOther() {
  25936. this.parent && this.parent.closeOther(this);
  25937. }
  25938. }
  25939. };
  25940. const block0 = (Comp) => {
  25941. (Comp.$wxs || (Comp.$wxs = [])).push("wxs");
  25942. (Comp.$wxsModules || (Comp.$wxsModules = {}))["wxs"] = "f1d6d7d8";
  25943. };
  25944. const _sfc_main$L = {
  25945. name: "u-swipe-action-item",
  25946. emits: ["click"],
  25947. mixins: [mpMixin, mixin, props$7, touch],
  25948. mixins: [mpMixin, mixin, props$7, touch, wxs],
  25949. data() {
  25950. return {
  25951. // 按钮的尺寸信息
  25952. size: {},
  25953. // 父组件u-swipe-action的参数
  25954. parentData: {
  25955. autoClose: true
  25956. },
  25957. // 当前状态,open-打开,close-关闭
  25958. status: "close"
  25959. };
  25960. },
  25961. watch: {
  25962. // 由于wxs无法直接读取外部的值,需要在外部值变化时,重新执行赋值逻辑
  25963. wxsInit(newValue, oldValue) {
  25964. this.queryRect();
  25965. }
  25966. },
  25967. computed: {
  25968. wxsInit() {
  25969. return [this.disabled, this.autoClose, this.threshold, this.options, this.duration];
  25970. }
  25971. },
  25972. mounted() {
  25973. this.init();
  25974. },
  25975. methods: {
  25976. init() {
  25977. this.updateParentData();
  25978. uni.$u.sleep().then(() => {
  25979. this.queryRect();
  25980. });
  25981. },
  25982. updateParentData() {
  25983. this.getParentData("u-swipe-action");
  25984. },
  25985. // 查询节点
  25986. queryRect() {
  25987. this.$uGetRect(".u-swipe-action-item__right__button", true).then((buttons) => {
  25988. this.size = {
  25989. buttons,
  25990. show: this.show,
  25991. disabled: this.disabled,
  25992. threshold: this.threshold,
  25993. duration: this.duration
  25994. };
  25995. });
  25996. },
  25997. // 按钮被点击
  25998. buttonClickHandler(item, index2) {
  25999. this.$emit("click", {
  26000. index: index2,
  26001. name: this.name
  26002. });
  26003. }
  26004. }
  26005. };
  26006. function _sfc_render$K(_ctx, _cache, $props, $setup, $data, $options) {
  26007. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  26008. return vue.openBlock(), vue.createElementBlock(
  26009. "view",
  26010. {
  26011. class: "u-swipe-action-item",
  26012. ref: "u-swipe-action-item"
  26013. },
  26014. [
  26015. vue.createElementVNode("view", { class: "u-swipe-action-item__right" }, [
  26016. vue.renderSlot(_ctx.$slots, "button", {}, () => [
  26017. (vue.openBlock(true), vue.createElementBlock(
  26018. vue.Fragment,
  26019. null,
  26020. vue.renderList(_ctx.options, (item, index2) => {
  26021. return vue.openBlock(), vue.createElementBlock("view", {
  26022. key: index2,
  26023. class: "u-swipe-action-item__right__button",
  26024. ref_for: true,
  26025. ref: `u-swipe-action-item__right__button-${index2}`,
  26026. style: vue.normalizeStyle([{
  26027. alignItems: item.style && item.style.borderRadius ? "center" : "stretch"
  26028. }]),
  26029. onClick: ($event) => $options.buttonClickHandler(item, index2)
  26030. }, [
  26031. vue.createElementVNode(
  26032. "view",
  26033. {
  26034. class: "u-swipe-action-item__right__button__wrapper",
  26035. style: vue.normalizeStyle([{
  26036. backgroundColor: item.style && item.style.backgroundColor ? item.style.backgroundColor : "#C7C6CD",
  26037. borderRadius: item.style && item.style.borderRadius ? item.style.borderRadius : "0",
  26038. padding: item.style && item.style.borderRadius ? "0" : "0 15px"
  26039. }, item.style])
  26040. },
  26041. [
  26042. item.icon ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  26043. key: 0,
  26044. name: item.icon,
  26045. color: item.style && item.style.color ? item.style.color : "#ffffff",
  26046. size: item.iconSize ? _ctx.$u.addUnit(item.iconSize) : item.style && item.style.fontSize ? _ctx.$u.getPx(item.style.fontSize) * 1.2 : 17,
  26047. customStyle: {
  26048. marginRight: item.text ? "2px" : 0
  26049. }
  26050. }, null, 8, ["name", "color", "size", "customStyle"])) : vue.createCommentVNode("v-if", true),
  26051. item.text ? (vue.openBlock(), vue.createElementBlock(
  26052. "text",
  26053. {
  26054. key: 1,
  26055. class: "u-swipe-action-item__right__button__wrapper__text u-line-1",
  26056. style: vue.normalizeStyle([{
  26057. color: item.style && item.style.color ? item.style.color : "#ffffff",
  26058. fontSize: item.style && item.style.fontSize ? item.style.fontSize : "16px",
  26059. lineHeight: item.style && item.style.fontSize ? item.style.fontSize : "16px"
  26060. }])
  26061. },
  26062. vue.toDisplayString(item.text),
  26063. 5
  26064. /* TEXT, STYLE */
  26065. )) : vue.createCommentVNode("v-if", true)
  26066. ],
  26067. 4
  26068. /* STYLE */
  26069. )
  26070. ], 12, ["onClick"]);
  26071. }),
  26072. 128
  26073. /* KEYED_FRAGMENT */
  26074. ))
  26075. ], true)
  26076. ]),
  26077. vue.createElementVNode("view", {
  26078. class: "u-swipe-action-item__content",
  26079. onTouchstart: _cache[0] || (_cache[0] = (...args) => _ctx.wxs.touchstart && _ctx.wxs.touchstart(...args)),
  26080. onTouchmove: _cache[1] || (_cache[1] = (...args) => _ctx.wxs.touchmove && _ctx.wxs.touchmove(...args)),
  26081. onTouchend: _cache[2] || (_cache[2] = (...args) => _ctx.wxs.touchend && _ctx.wxs.touchend(...args)),
  26082. status: vue.wp($data.status),
  26083. "change:status": _ctx.wxs.statusChange,
  26084. size: vue.wp($data.size),
  26085. "change:size": _ctx.wxs.sizeChange
  26086. }, [
  26087. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  26088. ], 40, ["status", "change:status", "size", "change:size"])
  26089. ],
  26090. 512
  26091. /* NEED_PATCH */
  26092. );
  26093. }
  26094. if (typeof block0 === "function")
  26095. block0(_sfc_main$L);
  26096. const __easycom_1 = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["render", _sfc_render$K], ["__scopeId", "data-v-ed3ce04a"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-swipe-action-item/u-swipe-action-item.vue"]]);
  26097. const props$6 = {
  26098. props: {
  26099. // 是否自动关闭其他swipe按钮组
  26100. autoClose: {
  26101. type: Boolean,
  26102. default: props$G.swipeAction.autoClose
  26103. }
  26104. }
  26105. };
  26106. const _sfc_main$K = {
  26107. name: "u-swipe-action",
  26108. mixins: [mpMixin, mixin, props$6],
  26109. data() {
  26110. return {};
  26111. },
  26112. provide() {
  26113. return {
  26114. swipeAction: this
  26115. };
  26116. },
  26117. computed: {
  26118. // 这里computed的变量,都是子组件u-swipe-action-item需要用到的,由于头条小程序的兼容性差异,子组件无法实时监听父组件参数的变化
  26119. // 所以需要手动通知子组件,这里返回一个parentData变量,供watch监听,在其中去通知每一个子组件重新从父组件(u-swipe-action-item)
  26120. // 拉取父组件新的变化后的参数
  26121. parentData() {
  26122. return [this.autoClose];
  26123. }
  26124. },
  26125. watch: {
  26126. // 当父组件需要子组件需要共享的参数发生了变化,手动通知子组件
  26127. parentData() {
  26128. if (this.children.length) {
  26129. this.children.map((child) => {
  26130. typeof child.updateParentData === "function" && child.updateParentData();
  26131. });
  26132. }
  26133. }
  26134. },
  26135. created() {
  26136. this.children = [];
  26137. },
  26138. methods: {
  26139. closeOther(child) {
  26140. if (this.autoClose) {
  26141. this.children.map((item, index2) => {
  26142. if (child !== item) {
  26143. item.closeHandler();
  26144. }
  26145. });
  26146. }
  26147. }
  26148. }
  26149. };
  26150. function _sfc_render$J(_ctx, _cache, $props, $setup, $data, $options) {
  26151. return vue.openBlock(), vue.createElementBlock("view", { class: "u-swipe-action" }, [
  26152. vue.renderSlot(_ctx.$slots, "default")
  26153. ]);
  26154. }
  26155. const __easycom_2 = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["render", _sfc_render$J], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-swipe-action/u-swipe-action.vue"]]);
  26156. const _sfc_main$J = {
  26157. __name: "BadItem",
  26158. props: {
  26159. data: {
  26160. type: Object,
  26161. required: true,
  26162. default: () => ({
  26163. orderNo: "",
  26164. badCount: "",
  26165. logisticsNo: "",
  26166. checkDate: "",
  26167. operator: ""
  26168. })
  26169. }
  26170. },
  26171. emits: ["delete", "edit"],
  26172. setup(__props, { expose: __expose, emit: __emit }) {
  26173. __expose();
  26174. const props2 = __props;
  26175. const emit2 = __emit;
  26176. const options = vue.ref([
  26177. {
  26178. text: "删除",
  26179. style: {
  26180. backgroundColor: "#ff4444"
  26181. }
  26182. }
  26183. ]);
  26184. const handleAction = (e) => {
  26185. if (e.index === 0) {
  26186. uni.showModal({
  26187. title: "提示",
  26188. content: "确定要删除该订单吗?",
  26189. success: (res) => {
  26190. if (res.confirm) {
  26191. emit2("delete");
  26192. }
  26193. }
  26194. });
  26195. }
  26196. };
  26197. const __returned__ = { props: props2, emit: emit2, options, handleAction, ref: vue.ref };
  26198. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  26199. return __returned__;
  26200. }
  26201. };
  26202. function _sfc_render$I(_ctx, _cache, $props, $setup, $data, $options) {
  26203. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  26204. const _component_u_swipe_action_item = resolveEasycom(vue.resolveDynamicComponent("u-swipe-action-item"), __easycom_1);
  26205. const _component_u_swipe_action = resolveEasycom(vue.resolveDynamicComponent("u-swipe-action"), __easycom_2);
  26206. return vue.openBlock(), vue.createElementBlock("view", { class: "bad-item" }, [
  26207. vue.createVNode(_component_u_swipe_action, null, {
  26208. default: vue.withCtx(() => [
  26209. vue.createVNode(_component_u_swipe_action_item, {
  26210. options: $setup.options,
  26211. onClick: $setup.handleAction
  26212. }, {
  26213. default: vue.withCtx(() => [
  26214. vue.createElementVNode("view", { class: "item-content" }, [
  26215. vue.createElementVNode("view", { class: "item-row" }, [
  26216. vue.createElementVNode("text", { class: "label" }, "订单编号:"),
  26217. vue.createElementVNode(
  26218. "text",
  26219. { class: "value" },
  26220. vue.toDisplayString($props.data.orderId),
  26221. 1
  26222. /* TEXT */
  26223. ),
  26224. vue.createVNode(_component_u_icon, {
  26225. name: "edit-pen",
  26226. color: "#4CAF50",
  26227. size: "20",
  26228. class: "edit-icon",
  26229. onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("edit"))
  26230. })
  26231. ]),
  26232. vue.createElementVNode("view", { class: "item-row" }, [
  26233. vue.createElementVNode("text", { class: "label" }, "不良数量:"),
  26234. vue.createElementVNode(
  26235. "text",
  26236. { class: "value" },
  26237. vue.toDisplayString($props.data.badNum),
  26238. 1
  26239. /* TEXT */
  26240. )
  26241. ]),
  26242. vue.createElementVNode("view", { class: "item-row" }, [
  26243. vue.createElementVNode("text", { class: "label" }, "物流单号:"),
  26244. vue.createElementVNode(
  26245. "text",
  26246. { class: "value" },
  26247. vue.toDisplayString($props.data.waybillCode),
  26248. 1
  26249. /* TEXT */
  26250. )
  26251. ]),
  26252. vue.createElementVNode("view", { class: "item-row" }, [
  26253. vue.createElementVNode("text", { class: "label" }, "验货完成日期:"),
  26254. vue.createElementVNode(
  26255. "text",
  26256. { class: "value" },
  26257. vue.toDisplayString($props.data.auditFinishTime),
  26258. 1
  26259. /* TEXT */
  26260. )
  26261. ]),
  26262. vue.createElementVNode("view", { class: "item-row" }, [
  26263. vue.createElementVNode("text", { class: "label" }, "录入人:"),
  26264. vue.createElementVNode(
  26265. "text",
  26266. { class: "value" },
  26267. vue.toDisplayString($props.data.auditUserName),
  26268. 1
  26269. /* TEXT */
  26270. )
  26271. ])
  26272. ])
  26273. ]),
  26274. _: 1
  26275. /* STABLE */
  26276. }, 8, ["options"])
  26277. ]),
  26278. _: 1
  26279. /* STABLE */
  26280. })
  26281. ]);
  26282. }
  26283. const BadItem = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["render", _sfc_render$I], ["__scopeId", "data-v-93494456"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/index/wms/components/BadItem.vue"]]);
  26284. const _sfc_main$I = {
  26285. __name: "RemarkDialog",
  26286. props: {
  26287. visible: {
  26288. type: Boolean,
  26289. default: false
  26290. },
  26291. initialValue: {
  26292. type: String,
  26293. default: ""
  26294. }
  26295. },
  26296. emits: ["update:visible", "confirm"],
  26297. setup(__props, { expose: __expose, emit: __emit }) {
  26298. __expose();
  26299. const props2 = __props;
  26300. function playGlobalSound() {
  26301. uni.$u.playClickSound();
  26302. }
  26303. const emit2 = __emit;
  26304. const remarkText = vue.ref("");
  26305. const quickTags = vue.ref(["少书", "多书", "子母件", "书单不符"]);
  26306. vue.watch(() => props2.visible, (newVal) => {
  26307. if (newVal) {
  26308. remarkText.value = props2.initialValue;
  26309. }
  26310. });
  26311. const appendTag = (tag) => {
  26312. remarkText.value += remarkText.value ? " " + tag : tag;
  26313. };
  26314. const onClose = () => {
  26315. emit2("update:visible", false);
  26316. };
  26317. const onConfirm = () => {
  26318. emit2("confirm", remarkText.value);
  26319. onClose();
  26320. };
  26321. const __returned__ = { props: props2, playGlobalSound, emit: emit2, remarkText, quickTags, appendTag, onClose, onConfirm, ref: vue.ref, watch: vue.watch };
  26322. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  26323. return __returned__;
  26324. }
  26325. };
  26326. function _sfc_render$H(_ctx, _cache, $props, $setup, $data, $options) {
  26327. const _component_u_textarea = resolveEasycom(vue.resolveDynamicComponent("u-textarea"), __easycom_3$3);
  26328. const _component_u_tag = resolveEasycom(vue.resolveDynamicComponent("u-tag"), __easycom_2$2);
  26329. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  26330. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_7);
  26331. return vue.openBlock(), vue.createBlock(_component_u_popup, {
  26332. show: $props.visible,
  26333. onClose: $setup.onClose,
  26334. mode: "center",
  26335. round: "10",
  26336. closeOnClickOverlay: false
  26337. }, {
  26338. default: vue.withCtx(() => [
  26339. vue.createElementVNode("view", {
  26340. class: "remark-dialog",
  26341. onClick: $setup.playGlobalSound
  26342. }, [
  26343. vue.createElementVNode("view", { class: "dialog-title" }, "编辑备注"),
  26344. vue.createCommentVNode(" 备注输入框 "),
  26345. vue.createElementVNode("view", { class: "dialog-content mb-30" }, [
  26346. vue.createVNode(_component_u_textarea, {
  26347. modelValue: $setup.remarkText,
  26348. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.remarkText = $event),
  26349. placeholder: "请输入",
  26350. maxlength: 200,
  26351. height: "100",
  26352. count: ""
  26353. }, null, 8, ["modelValue"]),
  26354. vue.createCommentVNode(" 快速输入标签 "),
  26355. vue.createElementVNode("view", { class: "quick-tags mt-10" }, [
  26356. vue.createElementVNode("text", { class: "common-title" }, "快速填入"),
  26357. vue.createElementVNode("view", { class: "tags-container flex-w mt-20" }, [
  26358. (vue.openBlock(true), vue.createElementBlock(
  26359. vue.Fragment,
  26360. null,
  26361. vue.renderList($setup.quickTags, (tag, index2) => {
  26362. return vue.openBlock(), vue.createBlock(_component_u_tag, {
  26363. key: index2,
  26364. text: tag,
  26365. plain: "",
  26366. size: "mini",
  26367. type: "primary",
  26368. onClick: ($event) => $setup.appendTag(tag),
  26369. class: "tag-item"
  26370. }, null, 8, ["text", "onClick"]);
  26371. }),
  26372. 128
  26373. /* KEYED_FRAGMENT */
  26374. ))
  26375. ])
  26376. ])
  26377. ]),
  26378. vue.createCommentVNode(" 底部按钮 "),
  26379. vue.createElementVNode("view", { class: "dialog-footer" }, [
  26380. vue.createVNode(_component_u_button, {
  26381. plain: "",
  26382. onClick: $setup.onClose,
  26383. class: "footer-btn"
  26384. }, {
  26385. default: vue.withCtx(() => [
  26386. vue.createTextVNode("取消")
  26387. ]),
  26388. _: 1
  26389. /* STABLE */
  26390. }),
  26391. vue.createVNode(_component_u_button, {
  26392. type: "primary",
  26393. onClick: $setup.onConfirm,
  26394. class: "footer-btn"
  26395. }, {
  26396. default: vue.withCtx(() => [
  26397. vue.createTextVNode("确定")
  26398. ]),
  26399. _: 1
  26400. /* STABLE */
  26401. })
  26402. ])
  26403. ])
  26404. ]),
  26405. _: 1
  26406. /* STABLE */
  26407. }, 8, ["show"]);
  26408. }
  26409. const RemarkDialog = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["render", _sfc_render$H], ["__scopeId", "data-v-73050f50"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/index/wms/components/RemarkDialog.vue"]]);
  26410. const _sfc_main$H = {
  26411. __name: "bad-in",
  26412. setup(__props, { expose: __expose }) {
  26413. __expose();
  26414. const waybillCode = vue.ref();
  26415. const formData = vue.reactive({
  26416. godownName: "",
  26417. godownId: "",
  26418. positionCode: ""
  26419. });
  26420. function playGlobalSound() {
  26421. uni.$u.playClickSound();
  26422. }
  26423. const ordersMap = vue.ref([]);
  26424. const codeMap = vue.ref([]);
  26425. function getDetailByCode2(code2) {
  26426. if (codeMap.value.includes(code2)) {
  26427. uni.$u.ttsModule.speak("重复扫描");
  26428. return;
  26429. }
  26430. uni.$u.http.get("/app/stock/searchOrder?waybillCode=" + code2).then((res) => {
  26431. if (res.code == 200) {
  26432. ordersMap.value.unshift(res.data);
  26433. codeMap.value.push(code2);
  26434. } else if (res.code == 601) {
  26435. uni.$u.ttsModule.speak(res.msg);
  26436. uni.showModal({
  26437. title: "提示",
  26438. content: res.msg,
  26439. showCancel: false,
  26440. success: () => {
  26441. playGlobalSound();
  26442. }
  26443. });
  26444. } else {
  26445. uni.$u.toast(res.msg);
  26446. }
  26447. });
  26448. }
  26449. const remarkVisible = vue.ref(false);
  26450. const currentRemark = vue.ref("");
  26451. const currentEditIndex = vue.ref(-1);
  26452. const goBack = () => {
  26453. if (ordersMap.value.length > 0) {
  26454. uni.showModal({
  26455. title: "退出确认",
  26456. content: "是否确认放弃本次入库?",
  26457. success: (res) => {
  26458. playGlobalSound();
  26459. if (res.confirm) {
  26460. uni.navigateBack();
  26461. }
  26462. }
  26463. });
  26464. } else {
  26465. uni.navigateBack();
  26466. }
  26467. };
  26468. const onSubmit = () => {
  26469. if (!formData.godownId || !formData.positionCode) {
  26470. uni.$u.toast("请先选择仓库和库位");
  26471. uni.$u.ttsModule.speak("请先选择仓库和库位");
  26472. return;
  26473. }
  26474. uni.showModal({
  26475. title: "提交确认",
  26476. content: "是否确认提交本次入库?",
  26477. success: (res) => {
  26478. playGlobalSound();
  26479. if (res.confirm) {
  26480. handleSubmitConfirm();
  26481. }
  26482. }
  26483. });
  26484. };
  26485. const handleSubmitConfirm = async () => {
  26486. uni.showLoading({
  26487. title: "提交中..."
  26488. });
  26489. let orderInfo = ordersMap.value.map((item) => {
  26490. return {
  26491. orderId: item.orderId,
  26492. waybillCode: item.waybillCode,
  26493. bookNum: item.badNum,
  26494. remark: item.remark
  26495. };
  26496. });
  26497. if (orderInfo.length == 0) {
  26498. uni.hideLoading();
  26499. uni.$u.ttsModule.speak("请添加订单数据");
  26500. return;
  26501. }
  26502. uni.$u.http.post("/app/stock/addBatch", {
  26503. godownId: formData.godownId,
  26504. positionCode: formData.positionCode,
  26505. orderInfo
  26506. }).then((res) => {
  26507. if (res.code == 200) {
  26508. uni.$u.toast("入库成功");
  26509. uni.$u.ttsModule.speak("入库成功");
  26510. clearData();
  26511. } else {
  26512. uni.$u.toast(res.msg);
  26513. }
  26514. }).finally(() => {
  26515. uni.hideLoading();
  26516. });
  26517. };
  26518. const clearData = () => {
  26519. ordersMap.value.length = 0;
  26520. waybillCode.value = "";
  26521. formData.godownName = "";
  26522. formData.positionCode = "";
  26523. formData.godownId = "";
  26524. };
  26525. const editOrder = (index2) => {
  26526. openRemarkDialog(index2);
  26527. };
  26528. const openScan = () => {
  26529. uni.scanCode({
  26530. success: (res) => {
  26531. waybillCode.value = res.result;
  26532. getDetailByCode2(res.result);
  26533. },
  26534. fail: (err) => {
  26535. uni.showToast({
  26536. title: "扫码失败",
  26537. icon: "error"
  26538. });
  26539. }
  26540. });
  26541. };
  26542. function selectLocation() {
  26543. if (!formData.godownId) {
  26544. uni.$u.toast("请先选择仓库");
  26545. uni.$u.ttsModule.speak("请先选择仓库");
  26546. return;
  26547. }
  26548. uni.navigateTo({
  26549. url: "/pages/index/wms/location-select?godownId=" + formData.godownId + "&positionCode=" + formData.positionCode
  26550. });
  26551. }
  26552. const deleteOrder = (index2) => {
  26553. ordersMap.value.splice(index2, 1);
  26554. };
  26555. const { unregister } = uni.$u.useEventListener((e) => {
  26556. if (e.barcode) {
  26557. waybillCode.value = e.barcode;
  26558. getDetailByCode2(e.barcode);
  26559. }
  26560. });
  26561. vue.onMounted(() => {
  26562. uni.$on("updateLocation", (locationCode) => {
  26563. formData.positionCode = locationCode;
  26564. });
  26565. uni.$on("updateWarehouse", (data) => {
  26566. formData.godownName = data.godownName;
  26567. formData.godownId = data.id;
  26568. });
  26569. });
  26570. vue.onUnmounted(() => {
  26571. unregister();
  26572. uni.$off("updateLocation");
  26573. uni.$off("updateWarehouse");
  26574. });
  26575. const openRemarkDialog = (index2, remark = "") => {
  26576. currentEditIndex.value = index2;
  26577. currentRemark.value = remark;
  26578. remarkVisible.value = true;
  26579. };
  26580. const handleRemarkConfirm = (remark) => {
  26581. if (currentEditIndex.value >= 0) {
  26582. ordersMap.value[currentEditIndex.value].remark = remark;
  26583. }
  26584. currentEditIndex.value = -1;
  26585. currentRemark.value = "";
  26586. };
  26587. const selectWarehouse = () => {
  26588. uni.navigateTo({
  26589. url: "/pages/index/wms/warehouse-select?godownId=" + formData.godownId
  26590. });
  26591. };
  26592. const __returned__ = { waybillCode, formData, playGlobalSound, ordersMap, codeMap, getDetailByCode: getDetailByCode2, remarkVisible, currentRemark, currentEditIndex, goBack, onSubmit, handleSubmitConfirm, clearData, editOrder, openScan, selectLocation, deleteOrder, unregister, openRemarkDialog, handleRemarkConfirm, selectWarehouse, ref: vue.ref, reactive: vue.reactive, onMounted: vue.onMounted, onUnmounted: vue.onUnmounted, get onShow() {
  26593. return onShow;
  26594. }, BadItem, RemarkDialog };
  26595. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  26596. return __returned__;
  26597. }
  26598. };
  26599. function _sfc_render$G(_ctx, _cache, $props, $setup, $data, $options) {
  26600. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  26601. const _component_u_text = resolveEasycom(vue.resolveDynamicComponent("u-text"), __easycom_1$8);
  26602. const _component_u_navbar = resolveEasycom(vue.resolveDynamicComponent("u-navbar"), __easycom_1$1);
  26603. const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_1$a);
  26604. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  26605. const _component_u_form = resolveEasycom(vue.resolveDynamicComponent("u-form"), __easycom_2$5);
  26606. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$4);
  26607. const _directive_permission = vue.resolveDirective("permission");
  26608. return vue.openBlock(), vue.createElementBlock("view", {
  26609. class: "common-page",
  26610. style: { "padding": "0" },
  26611. onClick: $setup.playGlobalSound
  26612. }, [
  26613. vue.createCommentVNode(" 顶部导航栏 "),
  26614. vue.createElementVNode("view", { class: "header" }, [
  26615. vue.createVNode(_component_u_navbar, {
  26616. title: "不良入库",
  26617. border: false,
  26618. fixed: "",
  26619. "safe-area-inset-top": ""
  26620. }, {
  26621. left: vue.withCtx(() => [
  26622. vue.createVNode(_component_u_icon, {
  26623. name: "arrow-left",
  26624. color: "#333333",
  26625. size: "20",
  26626. onClick: $setup.goBack
  26627. })
  26628. ]),
  26629. right: vue.withCtx(() => [
  26630. vue.withDirectives(vue.createVNode(
  26631. _component_u_text,
  26632. {
  26633. type: "primary",
  26634. text: "提交",
  26635. onClick: $setup.onSubmit
  26636. },
  26637. null,
  26638. 512
  26639. /* NEED_PATCH */
  26640. ), [
  26641. [_directive_permission, "app:wms:badIn:submit"]
  26642. ])
  26643. ]),
  26644. _: 1
  26645. /* STABLE */
  26646. })
  26647. ]),
  26648. vue.createCommentVNode(" 主要内容区域 "),
  26649. vue.createElementVNode("view", { class: "content" }, [
  26650. vue.createCommentVNode(" 订单基本信息 "),
  26651. vue.createElementVNode("view", { class: "info-section" }, [
  26652. vue.createVNode(_component_u_form, {
  26653. model: $setup.formData,
  26654. ref: "formRef",
  26655. "label-width": "80px",
  26656. "label-position": "left"
  26657. }, {
  26658. default: vue.withCtx(() => [
  26659. vue.createVNode(_component_u_form_item, {
  26660. label: "订单总数",
  26661. required: ""
  26662. }, {
  26663. default: vue.withCtx(() => [
  26664. vue.createElementVNode(
  26665. "span",
  26666. null,
  26667. vue.toDisplayString($setup.ordersMap.length),
  26668. 1
  26669. /* TEXT */
  26670. )
  26671. ]),
  26672. _: 1
  26673. /* STABLE */
  26674. }),
  26675. vue.createVNode(_component_u_form_item, {
  26676. label: "仓库",
  26677. required: ""
  26678. }, {
  26679. default: vue.withCtx(() => [
  26680. vue.createElementVNode("view", {
  26681. onClick: $setup.selectWarehouse,
  26682. style: { "width": "100%" }
  26683. }, [
  26684. vue.createVNode(_component_u_input, {
  26685. modelValue: $setup.formData.godownName,
  26686. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.formData.godownName = $event),
  26687. readonly: "",
  26688. "custom-style": "font-size:32rpx",
  26689. placeholder: "请选择仓库",
  26690. suffixIcon: "arrow-right"
  26691. }, null, 8, ["modelValue"])
  26692. ])
  26693. ]),
  26694. _: 1
  26695. /* STABLE */
  26696. }),
  26697. vue.createVNode(_component_u_form_item, {
  26698. label: "库位",
  26699. required: ""
  26700. }, {
  26701. default: vue.withCtx(() => [
  26702. vue.createElementVNode("view", {
  26703. onClick: $setup.selectLocation,
  26704. style: { "width": "100%" }
  26705. }, [
  26706. vue.createVNode(_component_u_input, {
  26707. modelValue: $setup.formData.positionCode,
  26708. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.formData.positionCode = $event),
  26709. readonly: "",
  26710. "custom-style": "font-size:32rpx",
  26711. placeholder: "请选择库位",
  26712. suffixIcon: "arrow-right"
  26713. }, null, 8, ["modelValue"])
  26714. ])
  26715. ]),
  26716. _: 1
  26717. /* STABLE */
  26718. })
  26719. ]),
  26720. _: 1
  26721. /* STABLE */
  26722. }, 8, ["model"])
  26723. ]),
  26724. vue.createCommentVNode(" 订单列表 "),
  26725. vue.createElementVNode("view", { class: "order-list" }, [
  26726. (vue.openBlock(true), vue.createElementBlock(
  26727. vue.Fragment,
  26728. null,
  26729. vue.renderList($setup.ordersMap, (order, index2) => {
  26730. return vue.openBlock(), vue.createBlock($setup["BadItem"], {
  26731. key: index2,
  26732. data: order,
  26733. onDelete: ($event) => $setup.deleteOrder(index2),
  26734. onEdit: ($event) => $setup.editOrder(index2)
  26735. }, null, 8, ["data", "onDelete", "onEdit"]);
  26736. }),
  26737. 128
  26738. /* KEYED_FRAGMENT */
  26739. ))
  26740. ]),
  26741. vue.createCommentVNode(" 底部扫码输入框 "),
  26742. vue.createElementVNode("view", {
  26743. class: "fixed-bottom pad-20",
  26744. style: { "background": "#ffffff" }
  26745. }, [
  26746. vue.createVNode(_component_u_search, {
  26747. placeholder: "请输入物流单号",
  26748. searchIconSize: 24,
  26749. bgColor: "#f6f7f6",
  26750. onSearch: _cache[2] || (_cache[2] = ($event) => $setup.getDetailByCode($setup.waybillCode)),
  26751. modelValue: $setup.waybillCode,
  26752. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.waybillCode = $event),
  26753. "custom-style": "font-size:32rpx",
  26754. "placeholder-style": "font-size:32rpx",
  26755. clearabled: true,
  26756. focus: false,
  26757. showAction: false,
  26758. height: 42
  26759. }, null, 8, ["modelValue"]),
  26760. vue.createVNode(_component_u_icon, {
  26761. name: "scan",
  26762. size: "32",
  26763. color: "#19be6b",
  26764. onClick: $setup.openScan
  26765. })
  26766. ])
  26767. ]),
  26768. vue.createCommentVNode(" 备注弹窗 "),
  26769. vue.createVNode($setup["RemarkDialog"], {
  26770. visible: $setup.remarkVisible,
  26771. "onUpdate:visible": _cache[4] || (_cache[4] = ($event) => $setup.remarkVisible = $event),
  26772. "initial-value": $setup.currentRemark,
  26773. onConfirm: $setup.handleRemarkConfirm
  26774. }, null, 8, ["visible", "initial-value"])
  26775. ]);
  26776. }
  26777. const PagesIndexWmsBadIn = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["render", _sfc_render$G], ["__scopeId", "data-v-04095d32"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/index/wms/bad-in.vue"]]);
  26778. const _sfc_main$G = {
  26779. __name: "bad-out",
  26780. setup(__props, { expose: __expose }) {
  26781. __expose();
  26782. const searchText = vue.ref("");
  26783. const searchType = vue.ref("1");
  26784. function playGlobalSound() {
  26785. uni.$u.playClickSound();
  26786. }
  26787. const onSearch = () => {
  26788. uni.navigateTo({
  26789. url: `/pages/index/wms/bad-out-order?searchText=${searchText.value}&searchType=${searchType.value}`
  26790. });
  26791. };
  26792. const openScan = () => {
  26793. uni.scanCode({
  26794. success: (res) => {
  26795. searchText.value = res.result;
  26796. onSearch();
  26797. },
  26798. fail: (err) => {
  26799. uni.showToast({
  26800. title: "扫码失败",
  26801. icon: "error"
  26802. });
  26803. }
  26804. });
  26805. };
  26806. const { unregister } = uni.$u.useEventListener((e) => {
  26807. if (e.barcode) {
  26808. searchText.value = e.barcode;
  26809. onSearch();
  26810. }
  26811. });
  26812. vue.onUnmounted(() => {
  26813. unregister();
  26814. });
  26815. const __returned__ = { searchText, searchType, playGlobalSound, onSearch, openScan, unregister, ref: vue.ref, computed: vue.computed, onMounted: vue.onMounted, onUnmounted: vue.onUnmounted, get onLoad() {
  26816. return onLoad;
  26817. }, get onShow() {
  26818. return onShow;
  26819. } };
  26820. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  26821. return __returned__;
  26822. }
  26823. };
  26824. function _sfc_render$F(_ctx, _cache, $props, $setup, $data, $options) {
  26825. const _component_u_radio = resolveEasycom(vue.resolveDynamicComponent("u-radio"), __easycom_0$9);
  26826. const _component_u_radio_group = resolveEasycom(vue.resolveDynamicComponent("u-radio-group"), __easycom_1$4);
  26827. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$4);
  26828. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  26829. return vue.openBlock(), vue.createElementBlock("view", {
  26830. class: "container flex-d h100",
  26831. onClick: $setup.playGlobalSound
  26832. }, [
  26833. vue.createCommentVNode(" 库位列表 "),
  26834. vue.createElementVNode("view", { class: "location-list flex-1" }, [
  26835. vue.createElementVNode("view", { class: "no-data flex-c mt-60" }, "请输入快递单号/订单编号")
  26836. ]),
  26837. vue.createCommentVNode(" 底部搜索框 "),
  26838. vue.createElementVNode("view", {
  26839. class: "pad-20 flex flex-column",
  26840. style: { "background": "#ffffff" }
  26841. }, [
  26842. vue.createVNode(_component_u_radio_group, {
  26843. modelValue: $setup.searchType,
  26844. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchType = $event),
  26845. class: "mb-20 ml-20"
  26846. }, {
  26847. default: vue.withCtx(() => [
  26848. vue.createVNode(_component_u_radio, {
  26849. label: "查订单",
  26850. name: "1",
  26851. "label-size": "17"
  26852. }),
  26853. vue.createVNode(_component_u_radio, {
  26854. label: "查物流",
  26855. "custom-style": "margin-left:20px",
  26856. name: "2",
  26857. "label-size": "17"
  26858. })
  26859. ]),
  26860. _: 1
  26861. /* STABLE */
  26862. }, 8, ["modelValue"]),
  26863. vue.createElementVNode("view", { class: "flex-a" }, [
  26864. vue.createVNode(_component_u_search, {
  26865. modelValue: $setup.searchText,
  26866. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.searchText = $event),
  26867. placeholder: "请输入快递单号/订单编号",
  26868. "show-action": false,
  26869. clearabled: true,
  26870. onSearch: $setup.onSearch,
  26871. height: "40"
  26872. }, null, 8, ["modelValue"]),
  26873. vue.createVNode(_component_u_icon, {
  26874. name: "scan",
  26875. size: "28",
  26876. color: "#19be6b",
  26877. onClick: $setup.openScan
  26878. })
  26879. ])
  26880. ])
  26881. ]);
  26882. }
  26883. const PagesIndexWmsBadOut = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["render", _sfc_render$F], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/index/wms/bad-out.vue"]]);
  26884. const _sfc_main$F = {
  26885. __name: "BadOutCard",
  26886. props: {
  26887. item: Object
  26888. },
  26889. setup(__props, { expose: __expose }) {
  26890. __expose();
  26891. const props2 = __props;
  26892. const __returned__ = { props: props2 };
  26893. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  26894. return __returned__;
  26895. }
  26896. };
  26897. function _sfc_render$E(_ctx, _cache, $props, $setup, $data, $options) {
  26898. var _a;
  26899. return vue.openBlock(), vue.createElementBlock("view", { class: "card" }, [
  26900. vue.createElementVNode("view", { class: "flex w100" }, [
  26901. vue.createElementVNode("view", { class: "flex-d" }, [
  26902. vue.createElementVNode("image", {
  26903. style: { "width": "80px", "height": "100px" },
  26904. src: $props.item.cover,
  26905. mode: "aspectFill"
  26906. }, null, 8, ["src"]),
  26907. vue.createElementVNode(
  26908. "view",
  26909. { class: "quantity mt-20" },
  26910. "数量: " + vue.toDisplayString($props.item.num),
  26911. 1
  26912. /* TEXT */
  26913. )
  26914. ]),
  26915. vue.createElementVNode("view", { class: "book-info ml-20 flex-1" }, [
  26916. vue.createElementVNode(
  26917. "view",
  26918. { class: "common-title mb-20" },
  26919. vue.toDisplayString($props.item.bookName),
  26920. 1
  26921. /* TEXT */
  26922. ),
  26923. vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
  26924. vue.createElementVNode(
  26925. "view",
  26926. { class: "isbn" },
  26927. "ISBN: " + vue.toDisplayString($props.item.isbn),
  26928. 1
  26929. /* TEXT */
  26930. ),
  26931. vue.createElementVNode(
  26932. "view",
  26933. { class: "set" },
  26934. "套装: " + vue.toDisplayString($props.item.suit == 1 ? "是" : "否"),
  26935. 1
  26936. /* TEXT */
  26937. )
  26938. ]),
  26939. vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
  26940. vue.createElementVNode(
  26941. "view",
  26942. { class: "discount" },
  26943. "回收折扣: " + vue.toDisplayString($props.item.recycleDiscount),
  26944. 1
  26945. /* TEXT */
  26946. ),
  26947. vue.createElementVNode(
  26948. "view",
  26949. { class: "review" },
  26950. "审核金额: " + vue.toDisplayString($props.item.finalMoney),
  26951. 1
  26952. /* TEXT */
  26953. )
  26954. ]),
  26955. vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
  26956. vue.createElementVNode(
  26957. "view",
  26958. { class: "price" },
  26959. "定价: " + vue.toDisplayString($props.item.bookPrice),
  26960. 1
  26961. /* TEXT */
  26962. ),
  26963. vue.createElementVNode(
  26964. "view",
  26965. { class: "estimate" },
  26966. "预估单价: " + vue.toDisplayString($props.item.expectMoney),
  26967. 1
  26968. /* TEXT */
  26969. )
  26970. ]),
  26971. vue.createElementVNode(
  26972. "view",
  26973. { class: "quality mb-10" },
  26974. " 品相: 良好(" + vue.toDisplayString($props.item.goodNum) + ") 、 一般(" + vue.toDisplayString($props.item.generalNum) + ") 、 极差(" + vue.toDisplayString($props.item.badNum) + ") ",
  26975. 1
  26976. /* TEXT */
  26977. ),
  26978. vue.createElementVNode(
  26979. "view",
  26980. { class: "reason color-red" },
  26981. "原因: " + vue.toDisplayString((_a = $props.item.auditCommentList) == null ? void 0 : _a.filter((item) => item.sts == 3).map((item) => item.com).join(";")),
  26982. 1
  26983. /* TEXT */
  26984. )
  26985. ])
  26986. ])
  26987. ]);
  26988. }
  26989. const BadOutCard = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["render", _sfc_render$E], ["__scopeId", "data-v-e52c1f77"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/index/wms/components/BadOutCard.vue"]]);
  26990. const _sfc_main$E = {
  26991. __name: "bad-out-order",
  26992. setup(__props, { expose: __expose }) {
  26993. __expose();
  26994. const searchText = vue.ref("");
  26995. const searchType = vue.ref("1");
  26996. const errorMsg = vue.ref("");
  26997. const hasData = vue.ref(false);
  26998. function playGlobalSound() {
  26999. uni.$u.playClickSound();
  27000. }
  27001. const locationInfo = vue.ref({
  27002. positionCode: "",
  27003. waybillCode: "",
  27004. orderId: "",
  27005. badNum: "",
  27006. remark: "",
  27007. refundWaybillCode: ""
  27008. });
  27009. const badList = vue.ref([]);
  27010. onLoad((options) => {
  27011. searchType.value = options.searchType || "1";
  27012. if (options.searchText) {
  27013. searchText.value = options.searchText;
  27014. onSearch();
  27015. }
  27016. });
  27017. const { unregister } = uni.$u.useEventListener((e) => {
  27018. if (e.barcode) {
  27019. searchText.value = e.barcode;
  27020. onSearch();
  27021. }
  27022. });
  27023. const getSearchType = (text) => {
  27024. return /^[0-9]+$/.test(text) ? 1 : 2;
  27025. };
  27026. const onSearch = async () => {
  27027. if (!searchText.value) {
  27028. errorMsg.value = "请输入运单号或订单编号";
  27029. hasData.value = false;
  27030. return;
  27031. }
  27032. try {
  27033. const res = await uni.$u.http.post("/app/stock/findOrderOutStock", {
  27034. search: searchText.value,
  27035. searchType: searchType.value
  27036. });
  27037. if (res.code == 200) {
  27038. const data = res.data;
  27039. errorMsg.value = "";
  27040. hasData.value = true;
  27041. locationInfo.value = {
  27042. positionCode: data.positionCode || "",
  27043. waybillCode: data.waybillCode || "",
  27044. orderId: data.orderId || "",
  27045. badNum: data.badNum || "",
  27046. remark: data.remark || "",
  27047. refundWaybillCode: data.refundWaybillCode || ""
  27048. };
  27049. badList.value = data.detailVoList || [];
  27050. } else {
  27051. errorMsg.value = res.msg || "未找到相关数据";
  27052. hasData.value = false;
  27053. return;
  27054. }
  27055. } catch (error2) {
  27056. errorMsg.value = error2.message || "获取数据失败";
  27057. hasData.value = false;
  27058. uni.showToast({
  27059. title: "获取数据失败",
  27060. icon: "none"
  27061. });
  27062. }
  27063. };
  27064. const openScan = () => {
  27065. uni.scanCode({
  27066. success: (res) => {
  27067. searchText.value = res.result;
  27068. onSearch();
  27069. },
  27070. fail: (err) => {
  27071. uni.showToast({
  27072. title: "扫码失败",
  27073. icon: "error"
  27074. });
  27075. }
  27076. });
  27077. };
  27078. vue.onUnmounted(() => {
  27079. unregister();
  27080. });
  27081. const onConfirm = () => {
  27082. uni.showModal({
  27083. title: "确认提示",
  27084. content: "是否确认出库?",
  27085. success: async (res) => {
  27086. if (res.confirm) {
  27087. uni.$u.http.post("/app/stock/outStock", {
  27088. orderId: locationInfo.value.orderId,
  27089. positionCode: locationInfo.value.positionCode,
  27090. outputRemark: locationInfo.value.remark
  27091. }).then((res2) => {
  27092. if (res2.code == 200) {
  27093. uni.showToast({
  27094. title: "出库成功",
  27095. icon: "success"
  27096. });
  27097. uni.$u.ttsModule.speak("出库成功");
  27098. searchText.value = "";
  27099. locationInfo.value = {
  27100. positionCode: "",
  27101. waybillCode: "",
  27102. orderId: "",
  27103. badNum: "",
  27104. remark: ""
  27105. };
  27106. badList.value = [];
  27107. } else {
  27108. uni.showToast({
  27109. title: res2.msg,
  27110. icon: "none"
  27111. });
  27112. uni.$u.ttsModule.speak(res2.msg);
  27113. }
  27114. });
  27115. }
  27116. }
  27117. });
  27118. };
  27119. const remarkVisible = vue.ref(false);
  27120. const currentRemark = vue.ref("");
  27121. const currentEditIndex = vue.ref(-1);
  27122. const openRemarkDialog = (index2, remark = "") => {
  27123. currentEditIndex.value = index2;
  27124. currentRemark.value = remark;
  27125. remarkVisible.value = true;
  27126. };
  27127. const handleRemarkConfirm = (remark) => {
  27128. if (currentEditIndex.value >= 0) {
  27129. orders.value[currentEditIndex.value].remark = remark;
  27130. }
  27131. currentEditIndex.value = -1;
  27132. currentRemark.value = "";
  27133. };
  27134. const __returned__ = { searchText, searchType, errorMsg, hasData, playGlobalSound, locationInfo, badList, unregister, getSearchType, onSearch, openScan, onConfirm, remarkVisible, currentRemark, currentEditIndex, openRemarkDialog, handleRemarkConfirm, ref: vue.ref, onMounted: vue.onMounted, computed: vue.computed, onUnmounted: vue.onUnmounted, BadOutCard, RemarkDialog, get onLoad() {
  27135. return onLoad;
  27136. }, get onShow() {
  27137. return onShow;
  27138. } };
  27139. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  27140. return __returned__;
  27141. }
  27142. };
  27143. function _sfc_render$D(_ctx, _cache, $props, $setup, $data, $options) {
  27144. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$4);
  27145. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  27146. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_0$7);
  27147. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  27148. return vue.openBlock(), vue.createElementBlock("view", {
  27149. class: "container",
  27150. onClick: $setup.playGlobalSound
  27151. }, [
  27152. vue.createCommentVNode(" 搜索框 "),
  27153. vue.createVNode(_component_u_sticky, null, {
  27154. default: vue.withCtx(() => [
  27155. vue.createElementVNode("view", { class: "search-area flex-c mb-20" }, [
  27156. vue.createVNode(_component_u_search, {
  27157. modelValue: $setup.searchText,
  27158. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchText = $event),
  27159. placeholder: $setup.searchType == "1" ? "请输入订单编号" : "请输入运单号",
  27160. "show-action": false,
  27161. clearabled: true,
  27162. onSearch: $setup.onSearch,
  27163. height: "40"
  27164. }, null, 8, ["modelValue", "placeholder"]),
  27165. vue.createVNode(_component_u_icon, {
  27166. name: "scan",
  27167. size: "28",
  27168. color: "#19be6b",
  27169. onClick: $setup.openScan
  27170. })
  27171. ])
  27172. ]),
  27173. _: 1
  27174. /* STABLE */
  27175. }),
  27176. vue.createElementVNode("view", { class: "content" }, [
  27177. vue.createCommentVNode(" 错误提示 "),
  27178. $setup.errorMsg ? (vue.openBlock(), vue.createElementBlock("view", {
  27179. key: 0,
  27180. class: "error-section"
  27181. }, [
  27182. vue.createVNode(_component_u_icon, {
  27183. name: "info-circle",
  27184. color: "#fa3534",
  27185. size: "20"
  27186. }),
  27187. vue.createElementVNode(
  27188. "text",
  27189. { class: "error-text" },
  27190. vue.toDisplayString($setup.errorMsg),
  27191. 1
  27192. /* TEXT */
  27193. )
  27194. ])) : vue.createCommentVNode("v-if", true),
  27195. vue.createCommentVNode(" 基本信息 "),
  27196. $setup.hasData ? (vue.openBlock(), vue.createElementBlock(
  27197. vue.Fragment,
  27198. { key: 1 },
  27199. [
  27200. vue.createElementVNode("view", { class: "info-section" }, [
  27201. vue.createElementVNode(
  27202. "view",
  27203. { class: "info-item" },
  27204. "库位:" + vue.toDisplayString($setup.locationInfo.positionCode),
  27205. 1
  27206. /* TEXT */
  27207. ),
  27208. vue.createElementVNode(
  27209. "view",
  27210. { class: "info-item" },
  27211. "物流单号:" + vue.toDisplayString($setup.locationInfo.waybillCode || "-"),
  27212. 1
  27213. /* TEXT */
  27214. ),
  27215. vue.createElementVNode(
  27216. "view",
  27217. { class: "info-item" },
  27218. "退回物流:" + vue.toDisplayString($setup.locationInfo.refundWaybillCode || "-"),
  27219. 1
  27220. /* TEXT */
  27221. ),
  27222. vue.createElementVNode(
  27223. "view",
  27224. { class: "info-item" },
  27225. "订单编号:" + vue.toDisplayString($setup.locationInfo.orderId),
  27226. 1
  27227. /* TEXT */
  27228. ),
  27229. vue.createElementVNode(
  27230. "view",
  27231. { class: "info-item" },
  27232. "订单商品:" + vue.toDisplayString($setup.locationInfo.badNum),
  27233. 1
  27234. /* TEXT */
  27235. ),
  27236. vue.createElementVNode(
  27237. "view",
  27238. { class: "info-item" },
  27239. "备注信息:" + vue.toDisplayString($setup.locationInfo.remark || "-"),
  27240. 1
  27241. /* TEXT */
  27242. )
  27243. ]),
  27244. vue.createCommentVNode(" 极差商品列表 "),
  27245. vue.createElementVNode("view", { class: "bad-list" }, [
  27246. vue.createElementVNode("view", { class: "list-title mb-6" }, "极差"),
  27247. (vue.openBlock(true), vue.createElementBlock(
  27248. vue.Fragment,
  27249. null,
  27250. vue.renderList($setup.badList, (item, index2) => {
  27251. return vue.openBlock(), vue.createElementBlock("view", { key: index2 }, [
  27252. vue.createVNode($setup["BadOutCard"], {
  27253. item,
  27254. index: index2
  27255. }, null, 8, ["item", "index"])
  27256. ]);
  27257. }),
  27258. 128
  27259. /* KEYED_FRAGMENT */
  27260. ))
  27261. ])
  27262. ],
  27263. 64
  27264. /* STABLE_FRAGMENT */
  27265. )) : vue.createCommentVNode("v-if", true)
  27266. ]),
  27267. vue.createCommentVNode(" 底部按钮 "),
  27268. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  27269. vue.createVNode(_component_u_button, {
  27270. size: "large",
  27271. type: "warning",
  27272. text: "反馈",
  27273. onClick: $setup.openRemarkDialog
  27274. }),
  27275. vue.createVNode(_component_u_button, {
  27276. size: "large",
  27277. type: "primary",
  27278. text: "确定出库",
  27279. onClick: $setup.onConfirm
  27280. })
  27281. ]),
  27282. vue.createCommentVNode(" 备注弹窗 "),
  27283. vue.createVNode($setup["RemarkDialog"], {
  27284. visible: $setup.remarkVisible,
  27285. "onUpdate:visible": _cache[1] || (_cache[1] = ($event) => $setup.remarkVisible = $event),
  27286. "initial-value": $setup.currentRemark,
  27287. onConfirm: $setup.handleRemarkConfirm
  27288. }, null, 8, ["visible", "initial-value"])
  27289. ]);
  27290. }
  27291. const PagesIndexWmsBadOutOrder = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["render", _sfc_render$D], ["__scopeId", "data-v-43bc1c65"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/index/wms/bad-out-order.vue"]]);
  27292. const _sfc_main$D = {
  27293. __name: "bad-off",
  27294. setup(__props, { expose: __expose }) {
  27295. __expose();
  27296. const searchText = vue.ref("");
  27297. function playGlobalSound() {
  27298. uni.$u.playClickSound();
  27299. }
  27300. const taskList = vue.ref([]);
  27301. const loading = vue.ref(false);
  27302. const taskStatusEnum = {
  27303. 1: "待作业",
  27304. 2: "作业中",
  27305. 3: "已完成",
  27306. 4: "已关闭"
  27307. };
  27308. const getTaskStatusText = (status) => {
  27309. return taskStatusEnum[status] || "未知状态";
  27310. };
  27311. const fetchTaskList = async () => {
  27312. loading.value = true;
  27313. try {
  27314. const response = await uni.$u.http.post("/app/appstock/getNeedStockList");
  27315. formatAppLog("log", "at pages/index/wms/bad-off.vue:82", response);
  27316. taskList.value = response;
  27317. if (response.code === 200) {
  27318. taskList.value = response.data || [];
  27319. } else {
  27320. uni.showToast({
  27321. title: response.msg || "获取任务列表失败",
  27322. icon: "none"
  27323. });
  27324. }
  27325. } catch (error2) {
  27326. uni.showToast({
  27327. title: "获取任务列表失败",
  27328. icon: "none"
  27329. });
  27330. } finally {
  27331. loading.value = false;
  27332. }
  27333. };
  27334. const onSearch = () => {
  27335. fetchTaskList();
  27336. };
  27337. const openScan = () => {
  27338. uni.scanCode({
  27339. success: (res) => {
  27340. searchText.value = res.result;
  27341. onSearch();
  27342. },
  27343. fail: (err) => {
  27344. uni.showToast({
  27345. title: "扫码失败",
  27346. icon: "error"
  27347. });
  27348. }
  27349. });
  27350. };
  27351. const handleTaskClick = (task) => {
  27352. uni.showModal({
  27353. title: "领取确认",
  27354. content: "是否确认领取下架任务?",
  27355. cancelText: "取消",
  27356. confirmText: "确认",
  27357. success: async (res) => {
  27358. playGlobalSound();
  27359. if (res.confirm) {
  27360. try {
  27361. const response = await uni.$u.http.post(`/app/appstock/lockStockTask?taskCode=${task.taskCode}`);
  27362. if (response.code === 200) {
  27363. uni.navigateTo({
  27364. url: `/pages/index/wms/task-detail?taskCode=${task.taskCode}`
  27365. });
  27366. } else {
  27367. uni.showToast({
  27368. title: response.msg || "任务锁定失败",
  27369. icon: "none"
  27370. });
  27371. }
  27372. } catch (error2) {
  27373. uni.showToast({
  27374. title: error2,
  27375. icon: "none"
  27376. });
  27377. }
  27378. }
  27379. }
  27380. });
  27381. };
  27382. vue.onMounted(() => {
  27383. fetchTaskList();
  27384. });
  27385. const __returned__ = { searchText, playGlobalSound, taskList, loading, taskStatusEnum, getTaskStatusText, fetchTaskList, onSearch, openScan, handleTaskClick, ref: vue.ref, onMounted: vue.onMounted };
  27386. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  27387. return __returned__;
  27388. }
  27389. };
  27390. function _sfc_render$C(_ctx, _cache, $props, $setup, $data, $options) {
  27391. const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$e);
  27392. return vue.openBlock(), vue.createElementBlock("view", {
  27393. class: "container",
  27394. onClick: $setup.playGlobalSound
  27395. }, [
  27396. vue.createCommentVNode(" 任务列表 "),
  27397. vue.createElementVNode("view", { class: "task-list" }, [
  27398. !$setup.loading ? (vue.openBlock(), vue.createElementBlock(
  27399. vue.Fragment,
  27400. { key: 0 },
  27401. [
  27402. $setup.taskList.length > 0 ? (vue.openBlock(true), vue.createElementBlock(
  27403. vue.Fragment,
  27404. { key: 0 },
  27405. vue.renderList($setup.taskList, (item, index2) => {
  27406. return vue.openBlock(), vue.createElementBlock("view", {
  27407. key: index2,
  27408. class: "task-card",
  27409. onClick: ($event) => $setup.handleTaskClick(item)
  27410. }, [
  27411. vue.createElementVNode("view", { class: "task-header" }, [
  27412. vue.createElementVNode(
  27413. "text",
  27414. { class: "task-no" },
  27415. "作业单号:" + vue.toDisplayString(item.taskCode),
  27416. 1
  27417. /* TEXT */
  27418. )
  27419. ]),
  27420. vue.createElementVNode("view", { class: "task-content" }, [
  27421. vue.createElementVNode("view", { class: "flex-a mb-10" }, [
  27422. vue.createElementVNode("text", { class: "label" }, "仓库:"),
  27423. vue.createElementVNode(
  27424. "text",
  27425. { class: "value" },
  27426. vue.toDisplayString(item.godownName),
  27427. 1
  27428. /* TEXT */
  27429. )
  27430. ]),
  27431. vue.createElementVNode("view", { class: "flex-a mb-10" }, [
  27432. vue.createElementVNode("text", { class: "label" }, "订单数量:"),
  27433. vue.createElementVNode(
  27434. "text",
  27435. { class: "value" },
  27436. vue.toDisplayString(item.orderNum),
  27437. 1
  27438. /* TEXT */
  27439. )
  27440. ]),
  27441. vue.createElementVNode("view", { class: "flex-a mb-10" }, [
  27442. vue.createElementVNode("text", { class: "label" }, "创建时间:"),
  27443. vue.createElementVNode(
  27444. "text",
  27445. { class: "value" },
  27446. vue.toDisplayString(item.createTime),
  27447. 1
  27448. /* TEXT */
  27449. )
  27450. ]),
  27451. vue.createElementVNode("view", { class: "flex-a" }, [
  27452. vue.createElementVNode("text", { class: "label" }, "作业状态:"),
  27453. vue.createElementVNode(
  27454. "text",
  27455. { class: "value" },
  27456. vue.toDisplayString($setup.getTaskStatusText(item.taskStatus)),
  27457. 1
  27458. /* TEXT */
  27459. )
  27460. ])
  27461. ])
  27462. ], 8, ["onClick"]);
  27463. }),
  27464. 128
  27465. /* KEYED_FRAGMENT */
  27466. )) : (vue.openBlock(), vue.createElementBlock("view", {
  27467. key: 1,
  27468. class: "empty-state"
  27469. }, [
  27470. vue.createElementVNode("text", null, "暂无任务数据")
  27471. ]))
  27472. ],
  27473. 64
  27474. /* STABLE_FRAGMENT */
  27475. )) : (vue.openBlock(), vue.createElementBlock("view", {
  27476. key: 1,
  27477. class: "loading-state"
  27478. }, [
  27479. vue.createVNode(_component_u_loading_icon),
  27480. vue.createElementVNode("text", null, "加载中...")
  27481. ]))
  27482. ])
  27483. ]);
  27484. }
  27485. const PagesIndexWmsBadOff = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["render", _sfc_render$C], ["__scopeId", "data-v-58677b56"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/index/wms/bad-off.vue"]]);
  27486. const _sfc_main$C = {
  27487. __name: "order-query",
  27488. setup(__props, { expose: __expose }) {
  27489. __expose();
  27490. const query = vue.reactive({
  27491. searchType: 2,
  27492. search: ""
  27493. });
  27494. const orderQuery = () => {
  27495. if (!query.search) {
  27496. uni.$u.toast("请输入快递单号/订单编号");
  27497. return;
  27498. }
  27499. uni.navigateTo({
  27500. url: `/pages/index/wms/order-query-list?id=${query.search}`
  27501. });
  27502. };
  27503. function openScan() {
  27504. uni.scanCode({
  27505. success: (res) => {
  27506. query.search = res.result;
  27507. orderQuery();
  27508. }
  27509. });
  27510. }
  27511. const { unregister } = uni.$u.useEventListener((e) => {
  27512. query.search = e.barcode;
  27513. });
  27514. vue.onUnmounted(() => {
  27515. unregister();
  27516. });
  27517. const __returned__ = { query, orderQuery, openScan, unregister, reactive: vue.reactive, ref: vue.ref, onUnmounted: vue.onUnmounted, get onLoad() {
  27518. return onLoad;
  27519. }, get onShow() {
  27520. return onShow;
  27521. } };
  27522. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  27523. return __returned__;
  27524. }
  27525. };
  27526. function _sfc_render$B(_ctx, _cache, $props, $setup, $data, $options) {
  27527. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$4);
  27528. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  27529. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  27530. vue.createCommentVNode(" 底部扫码输入框 "),
  27531. vue.createElementVNode("view", {
  27532. class: "fixed-bottom pad-20",
  27533. style: { "background": "#ffffff" }
  27534. }, [
  27535. vue.createVNode(_component_u_search, {
  27536. placeholder: "请输入快递单号/订单编号",
  27537. searchIconSize: 24,
  27538. bgColor: "#f6f7f6",
  27539. onSearch: $setup.orderQuery,
  27540. modelValue: $setup.query.search,
  27541. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.query.search = $event),
  27542. "custom-style": "font-size:32rpx",
  27543. "placeholder-style": "font-size:32rpx",
  27544. clearabled: true,
  27545. focus: false,
  27546. showAction: false,
  27547. height: 42
  27548. }, null, 8, ["modelValue"]),
  27549. vue.createVNode(_component_u_icon, {
  27550. name: "scan",
  27551. size: "34",
  27552. color: "#19be6b",
  27553. onClick: $setup.openScan
  27554. })
  27555. ])
  27556. ]);
  27557. }
  27558. const PagesIndexWmsOrderQuery = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["render", _sfc_render$B], ["__scopeId", "data-v-c65e1cc0"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/index/wms/order-query.vue"]]);
  27559. const props$5 = {
  27560. props: {
  27561. // 是否显示圆点
  27562. isDot: {
  27563. type: Boolean,
  27564. default: props$G.badge.isDot
  27565. },
  27566. // 显示的内容
  27567. value: {
  27568. type: [Number, String],
  27569. default: props$G.badge.value
  27570. },
  27571. // 显示的内容
  27572. modelValue: {
  27573. type: [Number, String],
  27574. default: props$G.badge.modelValue
  27575. },
  27576. // 是否显示
  27577. show: {
  27578. type: Boolean,
  27579. default: props$G.badge.show
  27580. },
  27581. // 最大值,超过最大值会显示 '{max}+'
  27582. max: {
  27583. type: [Number, String],
  27584. default: props$G.badge.max
  27585. },
  27586. // 主题类型,error|warning|success|primary
  27587. type: {
  27588. type: String,
  27589. default: props$G.badge.type
  27590. },
  27591. // 当数值为 0 时,是否展示 Badge
  27592. showZero: {
  27593. type: Boolean,
  27594. default: props$G.badge.showZero
  27595. },
  27596. // 背景颜色,优先级比type高,如设置,type参数会失效
  27597. bgColor: {
  27598. type: [String, null],
  27599. default: props$G.badge.bgColor
  27600. },
  27601. // 字体颜色
  27602. color: {
  27603. type: [String, null],
  27604. default: props$G.badge.color
  27605. },
  27606. // 徽标形状,circle-四角均为圆角,horn-左下角为直角
  27607. shape: {
  27608. type: String,
  27609. default: props$G.badge.shape
  27610. },
  27611. // 设置数字的显示方式,overflow|ellipsis|limit
  27612. // overflow会根据max字段判断,超出显示`${max}+`
  27613. // ellipsis会根据max判断,超出显示`${max}...`
  27614. // limit会依据1000作为判断条件,超出1000,显示`${value/1000}K`,比如2.2k、3.34w,最多保留2位小数
  27615. numberType: {
  27616. type: String,
  27617. default: props$G.badge.numberType
  27618. },
  27619. // 设置badge的位置偏移,格式为 [x, y],也即设置的为top和right的值,absolute为true时有效
  27620. offset: {
  27621. type: Array,
  27622. default: props$G.badge.offset
  27623. },
  27624. // 是否反转背景和字体颜色
  27625. inverted: {
  27626. type: Boolean,
  27627. default: props$G.badge.inverted
  27628. },
  27629. // 是否绝对定位
  27630. absolute: {
  27631. type: Boolean,
  27632. default: props$G.badge.absolute
  27633. }
  27634. }
  27635. };
  27636. const _sfc_main$B = {
  27637. name: "u-badge",
  27638. mixins: [mpMixin, props$5, mixin],
  27639. computed: {
  27640. // 是否将badge中心与父组件右上角重合
  27641. boxStyle() {
  27642. let style = {};
  27643. return style;
  27644. },
  27645. // 整个组件的样式
  27646. badgeStyle() {
  27647. const style = {};
  27648. if (this.color) {
  27649. style.color = this.color;
  27650. }
  27651. if (this.bgColor && !this.inverted) {
  27652. style.backgroundColor = this.bgColor;
  27653. }
  27654. if (this.absolute) {
  27655. style.position = "absolute";
  27656. if (this.offset.length) {
  27657. const top = this.offset[0];
  27658. const right = this.offset[1] || top;
  27659. style.top = uni.$u.addUnit(top);
  27660. style.right = uni.$u.addUnit(right);
  27661. }
  27662. }
  27663. return style;
  27664. },
  27665. showValue() {
  27666. switch (this.numberType) {
  27667. case "overflow":
  27668. return Number(this.value) > Number(this.max) ? this.max + "+" : this.value;
  27669. case "ellipsis":
  27670. return Number(this.value) > Number(this.max) ? "..." : this.value;
  27671. case "limit":
  27672. return Number(this.value) > 999 ? Number(this.value) >= 9999 ? Math.floor(this.value / 1e4 * 100) / 100 + "w" : Math.floor(this.value / 1e3 * 100) / 100 + "k" : this.value;
  27673. default:
  27674. return Number(this.value);
  27675. }
  27676. }
  27677. }
  27678. };
  27679. function _sfc_render$A(_ctx, _cache, $props, $setup, $data, $options) {
  27680. return _ctx.show && ((Number(_ctx.value) === 0 ? _ctx.showZero : true) || _ctx.isDot) ? (vue.openBlock(), vue.createElementBlock(
  27681. "text",
  27682. {
  27683. key: 0,
  27684. class: vue.normalizeClass([[_ctx.isDot ? "u-badge--dot" : "u-badge--not-dot", _ctx.inverted && "u-badge--inverted", _ctx.shape === "horn" && "u-badge--horn", `u-badge--${_ctx.type}${_ctx.inverted ? "--inverted" : ""}`], "u-badge"]),
  27685. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle), $options.badgeStyle])
  27686. },
  27687. vue.toDisplayString(_ctx.isDot ? "" : $options.showValue),
  27688. 7
  27689. /* TEXT, CLASS, STYLE */
  27690. )) : vue.createCommentVNode("v-if", true);
  27691. }
  27692. const __easycom_0$1 = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["render", _sfc_render$A], ["__scopeId", "data-v-06cca9b7"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-badge/u-badge.vue"]]);
  27693. const props$4 = {
  27694. props: {
  27695. // 滑块的移动过渡时间,单位ms
  27696. duration: {
  27697. type: Number,
  27698. default: props$G.tabs.duration
  27699. },
  27700. // tabs标签数组
  27701. list: {
  27702. type: Array,
  27703. default: props$G.tabs.list
  27704. },
  27705. // 滑块颜色
  27706. lineColor: {
  27707. type: String,
  27708. default: props$G.tabs.lineColor
  27709. },
  27710. // 菜单选择中时的样式
  27711. activeStyle: {
  27712. type: [String, Object],
  27713. default: props$G.tabs.activeStyle
  27714. },
  27715. // 菜单非选中时的样式
  27716. inactiveStyle: {
  27717. type: [String, Object],
  27718. default: props$G.tabs.inactiveStyle
  27719. },
  27720. // 滑块长度
  27721. lineWidth: {
  27722. type: [String, Number],
  27723. default: props$G.tabs.lineWidth
  27724. },
  27725. // 滑块高度
  27726. lineHeight: {
  27727. type: [String, Number],
  27728. default: props$G.tabs.lineHeight
  27729. },
  27730. // 滑块背景显示大小,当滑块背景设置为图片时使用
  27731. lineBgSize: {
  27732. type: String,
  27733. default: props$G.tabs.lineBgSize
  27734. },
  27735. // 菜单item的样式
  27736. itemStyle: {
  27737. type: [String, Object],
  27738. default: props$G.tabs.itemStyle
  27739. },
  27740. // 菜单是否可滚动
  27741. scrollable: {
  27742. type: Boolean,
  27743. default: props$G.tabs.scrollable
  27744. },
  27745. // 当前选中标签的索引
  27746. current: {
  27747. type: [Number, String],
  27748. default: props$G.tabs.current
  27749. },
  27750. // 默认读取的键名
  27751. keyName: {
  27752. type: String,
  27753. default: props$G.tabs.keyName
  27754. }
  27755. }
  27756. };
  27757. const _sfc_main$A = {
  27758. name: "u-tabs",
  27759. mixins: [mpMixin, mixin, props$4],
  27760. data() {
  27761. return {
  27762. firstTime: true,
  27763. scrollLeft: 0,
  27764. scrollViewWidth: 0,
  27765. lineOffsetLeft: 0,
  27766. tabsRect: {
  27767. left: 0
  27768. },
  27769. innerCurrent: 0,
  27770. moving: false
  27771. };
  27772. },
  27773. watch: {
  27774. current: {
  27775. immediate: true,
  27776. handler(newValue, oldValue) {
  27777. if (newValue !== this.innerCurrent) {
  27778. this.innerCurrent = newValue;
  27779. this.$nextTick(() => {
  27780. this.resize();
  27781. });
  27782. }
  27783. }
  27784. },
  27785. // list变化时,重新渲染list各项信息
  27786. list() {
  27787. this.$nextTick(() => {
  27788. this.resize();
  27789. });
  27790. }
  27791. },
  27792. computed: {
  27793. textStyle() {
  27794. return (index2) => {
  27795. const style = {};
  27796. const customeStyle = index2 === this.innerCurrent ? uni.$u.addStyle(this.activeStyle) : uni.$u.addStyle(
  27797. this.inactiveStyle
  27798. );
  27799. if (this.list[index2].disabled) {
  27800. style.color = "#c8c9cc";
  27801. }
  27802. return uni.$u.deepMerge(customeStyle, style);
  27803. };
  27804. },
  27805. propsBadge() {
  27806. return uni.$u.props.badge;
  27807. }
  27808. },
  27809. async mounted() {
  27810. this.init();
  27811. },
  27812. emits: ["click", "change"],
  27813. methods: {
  27814. setLineLeft() {
  27815. const tabItem = this.list[this.innerCurrent];
  27816. if (!tabItem) {
  27817. return;
  27818. }
  27819. let lineOffsetLeft = this.list.slice(0, this.innerCurrent).reduce((total, curr) => total + curr.rect.width, 0);
  27820. const lineWidth = uni.$u.getPx(this.lineWidth);
  27821. this.lineOffsetLeft = lineOffsetLeft + (tabItem.rect.width - lineWidth) / 2;
  27822. if (this.firstTime) {
  27823. setTimeout(() => {
  27824. this.firstTime = false;
  27825. }, 10);
  27826. }
  27827. },
  27828. // nvue下设置滑块的位置
  27829. animation(x, duration = 0) {
  27830. },
  27831. // 点击某一个标签
  27832. clickHandler(item, index2) {
  27833. this.$emit("click", {
  27834. ...item,
  27835. index: index2
  27836. });
  27837. if (item.disabled)
  27838. return;
  27839. this.innerCurrent = index2;
  27840. this.resize();
  27841. this.$emit("change", {
  27842. ...item,
  27843. index: index2
  27844. });
  27845. },
  27846. init() {
  27847. uni.$u.sleep().then(() => {
  27848. this.resize();
  27849. });
  27850. },
  27851. setScrollLeft() {
  27852. const tabRect = this.list[this.innerCurrent];
  27853. const offsetLeft = this.list.slice(0, this.innerCurrent).reduce((total, curr) => {
  27854. return total + curr.rect.width;
  27855. }, 0);
  27856. const windowWidth = uni.$u.sys().windowWidth;
  27857. let scrollLeft = offsetLeft - (this.tabsRect.width - tabRect.rect.width) / 2 - (windowWidth - this.tabsRect.right) / 2 + this.tabsRect.left / 2;
  27858. scrollLeft = Math.min(scrollLeft, this.scrollViewWidth - this.tabsRect.width);
  27859. this.scrollLeft = Math.max(0, scrollLeft);
  27860. },
  27861. // 获取所有标签的尺寸
  27862. resize() {
  27863. if (this.list.length === 0) {
  27864. return;
  27865. }
  27866. Promise.all([this.getTabsRect(), this.getAllItemRect()]).then(([tabsRect, itemRect = []]) => {
  27867. this.tabsRect = tabsRect;
  27868. this.scrollViewWidth = 0;
  27869. itemRect.map((item, index2) => {
  27870. this.scrollViewWidth += item.width;
  27871. this.list[index2].rect = item;
  27872. });
  27873. this.setLineLeft();
  27874. this.setScrollLeft();
  27875. });
  27876. },
  27877. // 获取导航菜单的尺寸
  27878. getTabsRect() {
  27879. return new Promise((resolve) => {
  27880. this.queryRect("u-tabs__wrapper__scroll-view").then((size) => resolve(size));
  27881. });
  27882. },
  27883. // 获取所有标签的尺寸
  27884. getAllItemRect() {
  27885. return new Promise((resolve) => {
  27886. const promiseAllArr = this.list.map((item, index2) => this.queryRect(
  27887. `u-tabs__wrapper__nav__item-${index2}`,
  27888. true
  27889. ));
  27890. Promise.all(promiseAllArr).then((sizes) => resolve(sizes));
  27891. });
  27892. },
  27893. // 获取各个标签的尺寸
  27894. queryRect(el, item) {
  27895. return new Promise((resolve) => {
  27896. this.$uGetRect(`.${el}`).then((size) => {
  27897. resolve(size);
  27898. });
  27899. });
  27900. }
  27901. }
  27902. };
  27903. function _sfc_render$z(_ctx, _cache, $props, $setup, $data, $options) {
  27904. const _component_u_badge = resolveEasycom(vue.resolveDynamicComponent("u-badge"), __easycom_0$1);
  27905. return vue.openBlock(), vue.createElementBlock("view", { class: "u-tabs" }, [
  27906. vue.createElementVNode("view", { class: "u-tabs__wrapper" }, [
  27907. vue.renderSlot(_ctx.$slots, "left", {}, void 0, true),
  27908. vue.createElementVNode("view", { class: "u-tabs__wrapper__scroll-view-wrapper" }, [
  27909. vue.createElementVNode("scroll-view", {
  27910. "scroll-x": _ctx.scrollable,
  27911. "scroll-left": $data.scrollLeft,
  27912. "scroll-with-animation": "",
  27913. class: "u-tabs__wrapper__scroll-view",
  27914. "show-scrollbar": false,
  27915. ref: "u-tabs__wrapper__scroll-view"
  27916. }, [
  27917. vue.createElementVNode(
  27918. "view",
  27919. {
  27920. class: "u-tabs__wrapper__nav",
  27921. ref: "u-tabs__wrapper__nav"
  27922. },
  27923. [
  27924. (vue.openBlock(true), vue.createElementBlock(
  27925. vue.Fragment,
  27926. null,
  27927. vue.renderList(_ctx.list, (item, index2) => {
  27928. return vue.openBlock(), vue.createElementBlock("view", {
  27929. class: vue.normalizeClass(["u-tabs__wrapper__nav__item", [`u-tabs__wrapper__nav__item-${index2}`, item.disabled && "u-tabs__wrapper__nav__item--disabled"]]),
  27930. key: index2,
  27931. onClick: ($event) => $options.clickHandler(item, index2),
  27932. ref_for: true,
  27933. ref: `u-tabs__wrapper__nav__item-${index2}`,
  27934. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.itemStyle), { flex: _ctx.scrollable ? "" : 1 }])
  27935. }, [
  27936. vue.createElementVNode(
  27937. "text",
  27938. {
  27939. class: vue.normalizeClass([[item.disabled && "u-tabs__wrapper__nav__item__text--disabled"], "u-tabs__wrapper__nav__item__text"]),
  27940. style: vue.normalizeStyle([$options.textStyle(index2)])
  27941. },
  27942. vue.toDisplayString(item[_ctx.keyName]),
  27943. 7
  27944. /* TEXT, CLASS, STYLE */
  27945. ),
  27946. vue.createVNode(_component_u_badge, {
  27947. show: !!(item.badge && (item.badge.show || item.badge.isDot || item.badge.value)),
  27948. isDot: item.badge && item.badge.isDot || $options.propsBadge.isDot,
  27949. value: item.badge && item.badge.value || $options.propsBadge.value,
  27950. max: item.badge && item.badge.max || $options.propsBadge.max,
  27951. type: item.badge && item.badge.type || $options.propsBadge.type,
  27952. showZero: item.badge && item.badge.showZero || $options.propsBadge.showZero,
  27953. bgColor: item.badge && item.badge.bgColor || $options.propsBadge.bgColor,
  27954. color: item.badge && item.badge.color || $options.propsBadge.color,
  27955. shape: item.badge && item.badge.shape || $options.propsBadge.shape,
  27956. numberType: item.badge && item.badge.numberType || $options.propsBadge.numberType,
  27957. inverted: item.badge && item.badge.inverted || $options.propsBadge.inverted,
  27958. customStyle: "margin-left: 4px;"
  27959. }, null, 8, ["show", "isDot", "value", "max", "type", "showZero", "bgColor", "color", "shape", "numberType", "inverted"])
  27960. ], 14, ["onClick"]);
  27961. }),
  27962. 128
  27963. /* KEYED_FRAGMENT */
  27964. )),
  27965. vue.createElementVNode(
  27966. "view",
  27967. {
  27968. class: "u-tabs__wrapper__nav__line",
  27969. ref: "u-tabs__wrapper__nav__line",
  27970. style: vue.normalizeStyle([{
  27971. width: _ctx.$u.addUnit(_ctx.lineWidth),
  27972. transform: `translate(${$data.lineOffsetLeft}px)`,
  27973. transitionDuration: `${$data.firstTime ? 0 : _ctx.duration}ms`,
  27974. height: _ctx.$u.addUnit(_ctx.lineHeight),
  27975. background: _ctx.lineColor,
  27976. backgroundSize: _ctx.lineBgSize
  27977. }])
  27978. },
  27979. null,
  27980. 4
  27981. /* STYLE */
  27982. )
  27983. ],
  27984. 512
  27985. /* NEED_PATCH */
  27986. )
  27987. ], 8, ["scroll-x", "scroll-left"])
  27988. ]),
  27989. vue.renderSlot(_ctx.$slots, "right", {}, void 0, true)
  27990. ])
  27991. ]);
  27992. }
  27993. const __easycom_4$1 = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["render", _sfc_render$z], ["__scopeId", "data-v-02b0c54f"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-tabs/u-tabs.vue"]]);
  27994. const _sfc_main$z = {
  27995. __name: "order-query-list",
  27996. setup(__props, { expose: __expose }) {
  27997. __expose();
  27998. const list1 = vue.reactive([{
  27999. name: "商品明细"
  28000. }, {
  28001. name: "操作记录"
  28002. }]);
  28003. const activeTab = vue.ref(0);
  28004. const query = vue.reactive({
  28005. searchType: 2,
  28006. search: ""
  28007. });
  28008. const determineSearchType = (search) => {
  28009. const isNumberString = /^\d+$/.test(search.toString());
  28010. return isNumberString ? 1 : 2;
  28011. };
  28012. const detail = vue.ref({});
  28013. const orderQuery = () => {
  28014. if (!query.search) {
  28015. uni.$u.toast("请输入快递单号/订单编号");
  28016. uni.$u.ttsModule.speak("请输入快递单号/订单编号");
  28017. return;
  28018. }
  28019. query.searchType = determineSearchType(query.search);
  28020. uni.$u.http.get("/app/stock/findOrder", { params: query }).then((res) => {
  28021. if (res.code == 200) {
  28022. detail.value = res.data;
  28023. uni.$u.ttsModule.speak("查询成功");
  28024. getOperationLogs(res.data.orderId);
  28025. } else {
  28026. uni.$u.toast(res.msg);
  28027. uni.$u.ttsModule.speak(res.msg);
  28028. }
  28029. });
  28030. };
  28031. const operationLogs = vue.ref([]);
  28032. const getOperationLogs = (orderId) => {
  28033. uni.$u.http.get("/app/stock/getGodownStocklog", { params: { orderId } }).then((res) => {
  28034. if (res.code == 200) {
  28035. operationLogs.value = res.data;
  28036. }
  28037. });
  28038. };
  28039. function handleTabChange(tab) {
  28040. activeTab.value = tab.index;
  28041. }
  28042. function openScan() {
  28043. uni.scanCode({
  28044. success: (res) => {
  28045. query.search = res.result;
  28046. orderQuery();
  28047. }
  28048. });
  28049. }
  28050. onLoad((options) => {
  28051. if (options.id) {
  28052. query.search = options.id;
  28053. orderQuery();
  28054. }
  28055. });
  28056. const { unregister } = uni.$u.useEventListener((e) => {
  28057. if (e.barcode) {
  28058. getDetailByCode(e.barcode);
  28059. }
  28060. });
  28061. vue.onUnmounted(() => {
  28062. unregister();
  28063. });
  28064. const __returned__ = { list1, activeTab, query, determineSearchType, detail, orderQuery, operationLogs, getOperationLogs, handleTabChange, openScan, unregister, reactive: vue.reactive, ref: vue.ref, onUnmounted: vue.onUnmounted, get onLoad() {
  28065. return onLoad;
  28066. }, get onShow() {
  28067. return onShow;
  28068. }, BookInfo };
  28069. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  28070. return __returned__;
  28071. }
  28072. };
  28073. function _sfc_render$y(_ctx, _cache, $props, $setup, $data, $options) {
  28074. const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_4$1);
  28075. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$4);
  28076. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  28077. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  28078. $setup.detail.orderId ? (vue.openBlock(), vue.createElementBlock("view", {
  28079. key: 0,
  28080. class: "header"
  28081. }, [
  28082. vue.createElementVNode("view", { class: "flex-d" }, [
  28083. vue.createElementVNode(
  28084. "text",
  28085. null,
  28086. "订单编号: " + vue.toDisplayString($setup.detail.orderId),
  28087. 1
  28088. /* TEXT */
  28089. ),
  28090. vue.createElementVNode(
  28091. "text",
  28092. { class: "mt-16" },
  28093. "库位: " + vue.toDisplayString($setup.detail.positionCode),
  28094. 1
  28095. /* TEXT */
  28096. )
  28097. ]),
  28098. vue.createElementVNode("view", { class: "status" }, [
  28099. vue.createElementVNode(
  28100. "text",
  28101. null,
  28102. vue.toDisplayString($setup.detail.stockStatus == 1 ? "已入库" : "已出库"),
  28103. 1
  28104. /* TEXT */
  28105. )
  28106. ])
  28107. ])) : vue.createCommentVNode("v-if", true),
  28108. $setup.detail.orderId ? (vue.openBlock(), vue.createElementBlock("view", {
  28109. key: 1,
  28110. style: { "background-color": "#ffffff" },
  28111. class: "pad-5 mt-20 content-info"
  28112. }, [
  28113. vue.createVNode(_component_u_tabs, {
  28114. list: $setup.list1,
  28115. modelValue: $setup.activeTab,
  28116. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.activeTab = $event),
  28117. itemStyle: { height: "44px", width: "48%" },
  28118. onChange: $setup.handleTabChange
  28119. }, null, 8, ["list", "modelValue"]),
  28120. $setup.activeTab === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  28121. key: 0,
  28122. class: "product-details"
  28123. }, [
  28124. vue.createVNode($setup["BookInfo"], {
  28125. bookList: $setup.detail.detailVoList,
  28126. detail: $setup.detail,
  28127. isShow: false
  28128. }, null, 8, ["bookList", "detail"])
  28129. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  28130. key: 1,
  28131. class: "operation-logs mt-20"
  28132. }, [
  28133. (vue.openBlock(true), vue.createElementBlock(
  28134. vue.Fragment,
  28135. null,
  28136. vue.renderList($setup.operationLogs, (log, index2) => {
  28137. return vue.openBlock(), vue.createElementBlock("view", {
  28138. key: index2,
  28139. class: "log-item"
  28140. }, [
  28141. vue.createElementVNode(
  28142. "text",
  28143. null,
  28144. vue.toDisplayString(log.createTime),
  28145. 1
  28146. /* TEXT */
  28147. ),
  28148. vue.createElementVNode(
  28149. "text",
  28150. null,
  28151. vue.toDisplayString(log.createName),
  28152. 1
  28153. /* TEXT */
  28154. ),
  28155. vue.createElementVNode(
  28156. "text",
  28157. null,
  28158. vue.toDisplayString(log.content),
  28159. 1
  28160. /* TEXT */
  28161. )
  28162. ]);
  28163. }),
  28164. 128
  28165. /* KEYED_FRAGMENT */
  28166. ))
  28167. ]))
  28168. ])) : vue.createCommentVNode("v-if", true),
  28169. vue.createCommentVNode(" 底部扫码输入框 "),
  28170. vue.createElementVNode("view", {
  28171. class: "fixed-bottom pad-20",
  28172. style: { "background": "#ffffff" }
  28173. }, [
  28174. vue.createVNode(_component_u_search, {
  28175. placeholder: "请输入快递单号/订单编号",
  28176. searchIconSize: 24,
  28177. bgColor: "#f6f7f6",
  28178. onSearch: $setup.orderQuery,
  28179. modelValue: $setup.query.search,
  28180. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.query.search = $event),
  28181. "custom-style": "font-size:32rpx",
  28182. "placeholder-style": "font-size:32rpx",
  28183. clearabled: true,
  28184. focus: false,
  28185. showAction: false,
  28186. height: 42
  28187. }, null, 8, ["modelValue"]),
  28188. vue.createVNode(_component_u_icon, {
  28189. name: "scan",
  28190. size: "34",
  28191. color: "#19be6b",
  28192. onClick: $setup.openScan
  28193. })
  28194. ])
  28195. ]);
  28196. }
  28197. const PagesIndexWmsOrderQueryList = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_render$y], ["__scopeId", "data-v-13461b03"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/index/wms/order-query-list.vue"]]);
  28198. const _sfc_main$y = {
  28199. __name: "location-order",
  28200. setup(__props, { expose: __expose }) {
  28201. __expose();
  28202. const positionCode = vue.ref("");
  28203. const onSearch = () => {
  28204. if (positionCode.value) {
  28205. uni.navigateTo({
  28206. url: "/pages/index/wms/location-order-list?positionCode=" + positionCode.value
  28207. });
  28208. } else {
  28209. uni.$u.toast("请输入库位编号");
  28210. }
  28211. };
  28212. function openScan() {
  28213. uni.scanCode({
  28214. success: (res) => {
  28215. positionCode.value = res.result;
  28216. onSearch();
  28217. }
  28218. });
  28219. }
  28220. const { unregister } = uni.$u.useEventListener((e) => {
  28221. if (e.barcode) {
  28222. positionCode.value = e.barcode;
  28223. onSearch();
  28224. }
  28225. });
  28226. vue.onUnmounted(() => {
  28227. unregister();
  28228. });
  28229. const __returned__ = { positionCode, onSearch, openScan, unregister, ref: vue.ref, onUnmounted: vue.onUnmounted, get onLoad() {
  28230. return onLoad;
  28231. }, get onShow() {
  28232. return onShow;
  28233. } };
  28234. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  28235. return __returned__;
  28236. }
  28237. };
  28238. function _sfc_render$x(_ctx, _cache, $props, $setup, $data, $options) {
  28239. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$4);
  28240. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  28241. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  28242. vue.createCommentVNode(" 底部扫码输入框 "),
  28243. vue.createElementVNode("view", {
  28244. class: "fixed-bottom pad-20",
  28245. style: { "background": "#ffffff" }
  28246. }, [
  28247. vue.createVNode(_component_u_search, {
  28248. placeholder: "请输入库位编号",
  28249. searchIconSize: 24,
  28250. bgColor: "#f6f7f6",
  28251. onSearch: $setup.onSearch,
  28252. modelValue: $setup.positionCode,
  28253. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.positionCode = $event),
  28254. clearabled: true,
  28255. focus: false,
  28256. showAction: false,
  28257. height: 42
  28258. }, null, 8, ["modelValue"]),
  28259. vue.createVNode(_component_u_icon, {
  28260. name: "scan",
  28261. size: "32",
  28262. color: "#19be6b",
  28263. onClick: $setup.openScan
  28264. })
  28265. ])
  28266. ]);
  28267. }
  28268. const PagesIndexWmsLocationOrder = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["render", _sfc_render$x], ["__scopeId", "data-v-38a6ed3a"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/index/wms/location-order.vue"]]);
  28269. const _imports_0$1 = "/static/img/share.png";
  28270. const _sfc_main$x = {
  28271. __name: "LocationOrderItem",
  28272. props: {
  28273. item: {
  28274. type: Object,
  28275. required: true
  28276. },
  28277. isCheck: {
  28278. type: Boolean,
  28279. default: false
  28280. },
  28281. isLink: {
  28282. type: Boolean,
  28283. default: true
  28284. }
  28285. },
  28286. emits: ["select"],
  28287. setup(__props, { expose: __expose, emit: __emit }) {
  28288. __expose();
  28289. const props2 = __props;
  28290. const emit2 = __emit;
  28291. const toggleSelect = () => {
  28292. emit2("select", props2.item);
  28293. };
  28294. const handleQuickJump = () => {
  28295. uni.navigateTo({
  28296. url: `/pages/index/wms/order-query-list?id=${props2.item.orderId}`
  28297. });
  28298. };
  28299. const __returned__ = { props: props2, emit: emit2, toggleSelect, handleQuickJump };
  28300. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  28301. return __returned__;
  28302. }
  28303. };
  28304. function _sfc_render$w(_ctx, _cache, $props, $setup, $data, $options) {
  28305. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  28306. return vue.openBlock(), vue.createElementBlock("view", { class: "order-item" }, [
  28307. vue.createElementVNode("view", { class: "order-header" }, [
  28308. vue.createElementVNode("view", { class: "order-info" }, [
  28309. vue.createElementVNode("view", { class: "info-row" }, [
  28310. vue.createElementVNode("text", { class: "label" }, "订单编号:"),
  28311. vue.createElementVNode(
  28312. "text",
  28313. { class: "value" },
  28314. vue.toDisplayString($props.item.orderId),
  28315. 1
  28316. /* TEXT */
  28317. )
  28318. ]),
  28319. vue.createElementVNode("view", { class: "info-row" }, [
  28320. vue.createElementVNode("text", { class: "label" }, "不良数量:"),
  28321. vue.createElementVNode(
  28322. "text",
  28323. { class: "value" },
  28324. vue.toDisplayString($props.item.badNum),
  28325. 1
  28326. /* TEXT */
  28327. )
  28328. ]),
  28329. vue.createElementVNode("view", { class: "info-row" }, [
  28330. vue.createElementVNode("text", { class: "label" }, "物流单号:"),
  28331. vue.createElementVNode(
  28332. "text",
  28333. { class: "value" },
  28334. vue.toDisplayString($props.item.waybillCode),
  28335. 1
  28336. /* TEXT */
  28337. )
  28338. ]),
  28339. vue.createElementVNode("view", { class: "info-row" }, [
  28340. vue.createElementVNode("text", { class: "label" }, "验货完成日期:"),
  28341. vue.createElementVNode(
  28342. "text",
  28343. { class: "value" },
  28344. vue.toDisplayString($props.item.auditFinishTime),
  28345. 1
  28346. /* TEXT */
  28347. )
  28348. ]),
  28349. vue.createElementVNode("view", { class: "info-row" }, [
  28350. vue.createElementVNode("text", { class: "label" }, "录入人:"),
  28351. vue.createElementVNode(
  28352. "text",
  28353. { class: "value" },
  28354. vue.toDisplayString($props.item.auditUserName),
  28355. 1
  28356. /* TEXT */
  28357. )
  28358. ])
  28359. ]),
  28360. $props.isCheck ? (vue.openBlock(), vue.createElementBlock("view", {
  28361. key: 0,
  28362. class: "check-icon"
  28363. }, [
  28364. vue.createVNode(_component_u_icon, {
  28365. name: $props.item.checked ? "checkmark-circle-fill" : "checkmark-circle",
  28366. color: $props.item.checked ? "#19be6b" : "#c8c9cc",
  28367. size: "28",
  28368. onClick: $setup.toggleSelect
  28369. }, null, 8, ["name", "color"])
  28370. ])) : vue.createCommentVNode("v-if", true),
  28371. $props.isLink ? (vue.openBlock(), vue.createElementBlock("view", {
  28372. key: 1,
  28373. class: "flex flex-d flex-a-c flex-j-c quick-jump",
  28374. onClick: $setup.handleQuickJump
  28375. }, [
  28376. vue.createElementVNode("image", {
  28377. src: _imports_0$1,
  28378. mode: "widthFix",
  28379. style: { "width": "30px" }
  28380. }),
  28381. vue.createElementVNode("text", { style: { "font-size": "28rpx", "color": "#19be6b" } }, "快速跳转")
  28382. ])) : vue.createCommentVNode("v-if", true)
  28383. ])
  28384. ]);
  28385. }
  28386. const LocationOrderItem = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["render", _sfc_render$w], ["__scopeId", "data-v-b4edd1b0"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/index/wms/components/LocationOrderItem.vue"]]);
  28387. const _sfc_main$w = {
  28388. __name: "location-order-list",
  28389. setup(__props, { expose: __expose }) {
  28390. __expose();
  28391. const orderCode = vue.ref("");
  28392. const originList = vue.ref([]);
  28393. const orderList = vue.ref([]);
  28394. const detail = vue.ref({});
  28395. const getOrderListByPositionCode = (positionCode) => {
  28396. uni.$u.http.get("/app/stock/getOrderByPositionCode?positionCode=" + positionCode).then((res) => {
  28397. if (res.code == 200) {
  28398. detail.value = res.data;
  28399. orderList.value = res.data.godownStockLogResults;
  28400. originList.value = res.data.godownStockLogResults;
  28401. if (originList.value.length > 0) {
  28402. uni.$u.ttsModule.speak("查询到" + originList.value.length + "条订单");
  28403. } else {
  28404. uni.$u.toast("暂无订单");
  28405. uni.$u.ttsModule.speak("暂无订单");
  28406. }
  28407. } else {
  28408. uni.$u.toast(res.msg);
  28409. uni.$u.ttsModule.speak(res.msg);
  28410. }
  28411. });
  28412. };
  28413. const onSearch = () => {
  28414. if (!orderCode.value) {
  28415. orderList.value = originList.value;
  28416. uni.$u.toast("请输入订单号或物流单号");
  28417. return;
  28418. }
  28419. const searchValue = String(orderCode.value).trim();
  28420. const isNumeric = /^[0-9]+$/.test(searchValue);
  28421. const result = originList.value.filter((item) => {
  28422. if (isNumeric) {
  28423. return item.orderId === orderCode.value;
  28424. } else {
  28425. return item.waybillCode === orderCode.value;
  28426. }
  28427. });
  28428. orderList.value = result;
  28429. };
  28430. function openScan() {
  28431. uni.scanCode({
  28432. success: (res) => {
  28433. orderCode.value = res.result;
  28434. onSearch();
  28435. }
  28436. });
  28437. }
  28438. const { unregister } = uni.$u.useEventListener((e) => {
  28439. if (e.barcode) {
  28440. orderCode.value = e.barcode;
  28441. onSearch();
  28442. }
  28443. });
  28444. onLoad((options) => {
  28445. if (options.positionCode) {
  28446. getOrderListByPositionCode(options.positionCode);
  28447. }
  28448. });
  28449. vue.onUnmounted(() => {
  28450. unregister();
  28451. });
  28452. const __returned__ = { orderCode, originList, orderList, detail, getOrderListByPositionCode, onSearch, openScan, unregister, reactive: vue.reactive, ref: vue.ref, onUnmounted: vue.onUnmounted, get onLoad() {
  28453. return onLoad;
  28454. }, get onShow() {
  28455. return onShow;
  28456. }, LocationOrderItem };
  28457. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  28458. return __returned__;
  28459. }
  28460. };
  28461. function _sfc_render$v(_ctx, _cache, $props, $setup, $data, $options) {
  28462. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$4);
  28463. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  28464. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  28465. vue.createElementVNode("view", { class: "header" }, [
  28466. vue.createElementVNode("view", { class: "flex-d" }, [
  28467. vue.createElementVNode(
  28468. "text",
  28469. null,
  28470. "仓库: " + vue.toDisplayString($setup.detail.godownName),
  28471. 1
  28472. /* TEXT */
  28473. ),
  28474. vue.createElementVNode(
  28475. "text",
  28476. { class: "mt-16" },
  28477. "库位编号: " + vue.toDisplayString($setup.detail.positionCode),
  28478. 1
  28479. /* TEXT */
  28480. ),
  28481. vue.createElementVNode(
  28482. "text",
  28483. { class: "mt-16" },
  28484. "订单数量: " + vue.toDisplayString($setup.originList.length),
  28485. 1
  28486. /* TEXT */
  28487. )
  28488. ])
  28489. ]),
  28490. vue.createElementVNode("view", { class: "product-details" }, [
  28491. (vue.openBlock(true), vue.createElementBlock(
  28492. vue.Fragment,
  28493. null,
  28494. vue.renderList($setup.orderList, (item, index2) => {
  28495. return vue.openBlock(), vue.createBlock($setup["LocationOrderItem"], {
  28496. key: index2,
  28497. item
  28498. }, null, 8, ["item"]);
  28499. }),
  28500. 128
  28501. /* KEYED_FRAGMENT */
  28502. ))
  28503. ]),
  28504. vue.createCommentVNode(" 底部扫码输入框 "),
  28505. vue.createElementVNode("view", {
  28506. class: "fixed-bottom pad-20",
  28507. style: { "background": "#ffffff" }
  28508. }, [
  28509. vue.createVNode(_component_u_search, {
  28510. placeholder: "请输入快递单号/订单编号",
  28511. searchIconSize: 24,
  28512. bgColor: "#f6f7f6",
  28513. onSearch: $setup.onSearch,
  28514. modelValue: $setup.orderCode,
  28515. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.orderCode = $event),
  28516. clearabled: true,
  28517. focus: false,
  28518. showAction: false,
  28519. height: 42
  28520. }, null, 8, ["modelValue"]),
  28521. vue.createVNode(_component_u_icon, {
  28522. name: "scan",
  28523. size: "36",
  28524. color: "#19be6b",
  28525. onClick: $setup.openScan
  28526. })
  28527. ])
  28528. ]);
  28529. }
  28530. const PagesIndexWmsLocationOrderList = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["render", _sfc_render$v], ["__scopeId", "data-v-3e424560"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/index/wms/location-order-list.vue"]]);
  28531. const _sfc_main$v = {
  28532. __name: "location-select",
  28533. setup(__props, { expose: __expose }) {
  28534. __expose();
  28535. const searchText = vue.ref("");
  28536. function playGlobalSound() {
  28537. uni.$u.playClickSound();
  28538. }
  28539. const locations = vue.ref([]);
  28540. function getLocationListByGodownId(godownId2, code2 = "", type2 = "") {
  28541. uni.$u.http.get("/app/stock/getGodownPosition?godownId=" + godownId2 + "&code=" + code2).then((res) => {
  28542. if (res.code == 200) {
  28543. locations.value = res.data;
  28544. if (type2 == "select") {
  28545. setTimeout(() => {
  28546. locations.value.forEach((item) => {
  28547. if (item == code2) {
  28548. selectLocation(item);
  28549. }
  28550. });
  28551. }, 500);
  28552. }
  28553. }
  28554. });
  28555. }
  28556. const scrollHeight = vue.ref(0);
  28557. const onSearch = () => {
  28558. getLocationListByGodownId(godownId.value, searchText.value);
  28559. };
  28560. const openScan = () => {
  28561. uni.scanCode({
  28562. success: (res) => {
  28563. searchText.value = res.result;
  28564. onSearch();
  28565. },
  28566. fail: (err) => {
  28567. uni.showToast({
  28568. title: "扫码失败",
  28569. icon: "error"
  28570. });
  28571. }
  28572. });
  28573. };
  28574. const selectLocation = (item) => {
  28575. uni.$emit("updateLocation", item);
  28576. uni.navigateBack();
  28577. };
  28578. const godownId = vue.ref("");
  28579. const positionCode = vue.ref("");
  28580. onLoad((opts) => {
  28581. godownId.value = opts.godownId;
  28582. if (opts.positionCode) {
  28583. positionCode.value = opts.positionCode;
  28584. }
  28585. getLocationListByGodownId(godownId.value);
  28586. scrollHeight.value = uni.getSystemInfoSync().windowHeight - 44 - 60;
  28587. });
  28588. const { unregister } = uni.$u.useEventListener((e) => {
  28589. positionCode.value = e.barcode;
  28590. getLocationListByGodownId(godownId.value, e.barcode, "select");
  28591. });
  28592. vue.onUnmounted(() => {
  28593. unregister();
  28594. });
  28595. const __returned__ = { searchText, playGlobalSound, locations, getLocationListByGodownId, scrollHeight, onSearch, openScan, selectLocation, godownId, positionCode, unregister, ref: vue.ref, computed: vue.computed, onMounted: vue.onMounted, onUnmounted: vue.onUnmounted, get onLoad() {
  28596. return onLoad;
  28597. }, get onShow() {
  28598. return onShow;
  28599. } };
  28600. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  28601. return __returned__;
  28602. }
  28603. };
  28604. function _sfc_render$u(_ctx, _cache, $props, $setup, $data, $options) {
  28605. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$4);
  28606. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  28607. return vue.openBlock(), vue.createElementBlock("view", {
  28608. class: "container",
  28609. onClick: $setup.playGlobalSound
  28610. }, [
  28611. vue.createCommentVNode(" 库位列表 "),
  28612. vue.createElementVNode(
  28613. "scroll-view",
  28614. {
  28615. "scroll-y": "",
  28616. class: "location-list",
  28617. style: vue.normalizeStyle({ height: $setup.scrollHeight + "px" })
  28618. },
  28619. [
  28620. (vue.openBlock(true), vue.createElementBlock(
  28621. vue.Fragment,
  28622. null,
  28623. vue.renderList($setup.locations, (item, index2) => {
  28624. return vue.openBlock(), vue.createElementBlock("view", {
  28625. key: index2,
  28626. class: vue.normalizeClass(["location-item", item === $setup.positionCode ? "location-item-selected" : ""]),
  28627. "hover-class": "location-item-hover",
  28628. onClick: ($event) => $setup.selectLocation(item)
  28629. }, [
  28630. vue.createElementVNode(
  28631. "text",
  28632. null,
  28633. vue.toDisplayString(item),
  28634. 1
  28635. /* TEXT */
  28636. )
  28637. ], 10, ["onClick"]);
  28638. }),
  28639. 128
  28640. /* KEYED_FRAGMENT */
  28641. ))
  28642. ],
  28643. 4
  28644. /* STYLE */
  28645. ),
  28646. vue.createCommentVNode(" 底部搜索框 "),
  28647. vue.createElementVNode("view", {
  28648. class: "fixed-bottom pad-20",
  28649. style: { "background": "#ffffff" }
  28650. }, [
  28651. vue.createVNode(_component_u_search, {
  28652. modelValue: $setup.searchText,
  28653. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchText = $event),
  28654. placeholder: "请输入库位条码",
  28655. "show-action": false,
  28656. clearabled: true,
  28657. onSearch: $setup.onSearch,
  28658. height: "40",
  28659. onClick: _cache[1] || (_cache[1] = ($event) => $setup.searchText = "")
  28660. }, null, 8, ["modelValue"]),
  28661. vue.createVNode(_component_u_icon, {
  28662. name: "scan",
  28663. size: "28",
  28664. color: "#19be6b",
  28665. onClick: $setup.openScan
  28666. })
  28667. ])
  28668. ]);
  28669. }
  28670. const PagesIndexWmsLocationSelect = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["render", _sfc_render$u], ["__scopeId", "data-v-b26ec186"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/index/wms/location-select.vue"]]);
  28671. const _sfc_main$u = {
  28672. __name: "warehouse-select",
  28673. setup(__props, { expose: __expose }) {
  28674. __expose();
  28675. function playGlobalSound() {
  28676. uni.$u.playClickSound();
  28677. }
  28678. const searchText = vue.ref("");
  28679. const warehouses = vue.ref([]);
  28680. function getGodownListByName(name = "") {
  28681. uni.$u.http.post("/app/appUser/searchGodown?name=" + name).then((res) => {
  28682. if (res.code == 200) {
  28683. warehouses.value = res.data;
  28684. }
  28685. });
  28686. }
  28687. getGodownListByName();
  28688. const onSearch = () => {
  28689. getGodownListByName(searchText.value);
  28690. };
  28691. const selectWarehouse = (item) => {
  28692. uni.$emit("updateWarehouse", item);
  28693. uni.navigateBack();
  28694. };
  28695. const selectedId = vue.ref();
  28696. onLoad((options) => {
  28697. if (options.godownId) {
  28698. selectedId.value = options.godownId;
  28699. }
  28700. });
  28701. const __returned__ = { playGlobalSound, searchText, warehouses, getGodownListByName, onSearch, selectWarehouse, selectedId, ref: vue.ref, computed: vue.computed, get onLoad() {
  28702. return onLoad;
  28703. } };
  28704. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  28705. return __returned__;
  28706. }
  28707. };
  28708. function _sfc_render$t(_ctx, _cache, $props, $setup, $data, $options) {
  28709. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$4);
  28710. return vue.openBlock(), vue.createElementBlock("view", {
  28711. class: "container",
  28712. onClick: $setup.playGlobalSound
  28713. }, [
  28714. vue.createCommentVNode(" 搜索框 "),
  28715. vue.createElementVNode("view", { class: "search-area" }, [
  28716. vue.createVNode(_component_u_search, {
  28717. modelValue: $setup.searchText,
  28718. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchText = $event),
  28719. placeholder: "请输入仓库名称",
  28720. "show-action": false,
  28721. clearabled: true,
  28722. onChange: $setup.onSearch,
  28723. height: "40",
  28724. "placeholder-style": "font-size:16px"
  28725. }, null, 8, ["modelValue"])
  28726. ]),
  28727. vue.createCommentVNode(" 仓库列表 "),
  28728. vue.createElementVNode("view", { class: "warehouse-list" }, [
  28729. (vue.openBlock(true), vue.createElementBlock(
  28730. vue.Fragment,
  28731. null,
  28732. vue.renderList($setup.warehouses, (item, index2) => {
  28733. return vue.openBlock(), vue.createElementBlock("view", {
  28734. key: index2,
  28735. class: vue.normalizeClass(["warehouse-item", { "warehouse-item-active": item.id == $setup.selectedId }]),
  28736. "hover-class": "warehouse-item-hover",
  28737. onClick: ($event) => $setup.selectWarehouse(item)
  28738. }, [
  28739. vue.createElementVNode(
  28740. "text",
  28741. null,
  28742. vue.toDisplayString(index2 + 1) + "." + vue.toDisplayString(item.godownName),
  28743. 1
  28744. /* TEXT */
  28745. )
  28746. ], 10, ["onClick"]);
  28747. }),
  28748. 128
  28749. /* KEYED_FRAGMENT */
  28750. ))
  28751. ])
  28752. ]);
  28753. }
  28754. const PagesIndexWmsWarehouseSelect = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["render", _sfc_render$t], ["__scopeId", "data-v-c3e02812"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/index/wms/warehouse-select.vue"]]);
  28755. const _sfc_main$t = {
  28756. __name: "speedy-check",
  28757. setup(__props, { expose: __expose }) {
  28758. __expose();
  28759. const goBack = () => {
  28760. uni.navigateBack();
  28761. };
  28762. const showCheckMethodPicker = vue.ref(false);
  28763. const checkMethod = vue.ref("增加数量");
  28764. const resetType = vue.ref(0);
  28765. const checkMethodOptions = ["增加数量", "减少数量", "实际数量"];
  28766. const getUserDefaultWarehouse = () => {
  28767. uni.$u.http.get("/app/appUser/getUserBindGodown").then((res) => {
  28768. if (res.code == 200) {
  28769. getWarehouseLocationList(res.data.id);
  28770. }
  28771. });
  28772. };
  28773. const location2 = vue.ref("");
  28774. const showLocationPopup = vue.ref(false);
  28775. const locationList = vue.ref([]);
  28776. const selectedLocation = vue.ref("");
  28777. const godownId = vue.ref();
  28778. const getWarehouseLocationList = (id) => {
  28779. godownId.value = id;
  28780. uni.$u.http.get("/app/stock/getGodownPosition?godownId=" + id).then((res) => {
  28781. if (res.code == 200) {
  28782. locationList.value = res.data;
  28783. }
  28784. });
  28785. };
  28786. const searchValue = vue.ref("");
  28787. const products = vue.ref([]);
  28788. const onCheckMethodConfirm = (e) => {
  28789. checkMethod.value = e.value[0];
  28790. showCheckMethodPicker.value = false;
  28791. resetType.value = e.indexs[0] + 1;
  28792. };
  28793. const handleLocationSelect = () => {
  28794. showLocationPopup.value = true;
  28795. selectedLocation.value = location2.value;
  28796. };
  28797. const onLocationConfirm = () => {
  28798. if (selectedLocation.value) {
  28799. location2.value = selectedLocation.value;
  28800. showLocationPopup.value = false;
  28801. selectedLocation.value = "";
  28802. } else {
  28803. uni.$u.toast("请选择库位");
  28804. }
  28805. };
  28806. const selectLocation = (item) => {
  28807. selectedLocation.value = item;
  28808. };
  28809. const onSubmit = () => {
  28810. if (products.value.length === 0) {
  28811. uni.$u.toast("请添加盘点订单");
  28812. return;
  28813. }
  28814. const params = {
  28815. godownId: godownId.value,
  28816. positionCode: location2.value,
  28817. orderInfo: products.value.map((item) => ({
  28818. orderId: item.orderId,
  28819. waybillCode: item.waybillCode,
  28820. bookNum: item.badNum,
  28821. remark: item.remark || ""
  28822. })),
  28823. resetType: resetType.value
  28824. };
  28825. uni.$u.http.post("/app/stock/resetStock", params).then((res) => {
  28826. if (res.code === 200) {
  28827. uni.$u.toast("盘点成功");
  28828. location2.value = "";
  28829. products.value = [];
  28830. searchValue.value = "";
  28831. } else {
  28832. uni.$u.toast(res.msg || "提交失败");
  28833. }
  28834. }).catch((err) => {
  28835. uni.$u.toast("提交失败");
  28836. formatAppLog("error", "at pages/index/wms/speedy-check.vue:229", err);
  28837. });
  28838. };
  28839. const onSearch = () => {
  28840. if (!searchValue.value) {
  28841. uni.$u.toast("请输入快递单号或订单编号");
  28842. return;
  28843. }
  28844. const searchType = /^[0-9]+$/.test(searchValue.value) ? 1 : 2;
  28845. uni.$u.http.get("/app/stock/searchBadOrderForReset", {
  28846. params: {
  28847. searchType,
  28848. search: searchValue.value
  28849. }
  28850. }).then((res) => {
  28851. if (res.code === 200) {
  28852. const exists = products.value.some(
  28853. (item) => item.orderId === res.data.orderId || item.waybillCode === res.data.waybillCode
  28854. );
  28855. if (exists) {
  28856. uni.$u.toast("该订单已添加");
  28857. return;
  28858. }
  28859. products.value.push(res.data);
  28860. searchValue.value = "";
  28861. } else {
  28862. uni.$u.toast(res.msg || "查询失败");
  28863. }
  28864. }).catch((err) => {
  28865. uni.$u.toast("查询失败");
  28866. formatAppLog("error", "at pages/index/wms/speedy-check.vue:271", err);
  28867. });
  28868. };
  28869. const dealScanText = (scanText) => {
  28870. let isLocation = scanText.indexOf("-") > -1 && scanText.length == 9;
  28871. if (isLocation) {
  28872. if (locationList.value.includes(scanText)) {
  28873. location2.value = scanText;
  28874. } else {
  28875. uni.$u.toast("库位不存在");
  28876. }
  28877. } else {
  28878. searchValue.value = scanText;
  28879. onSearch();
  28880. }
  28881. };
  28882. const openScan = () => {
  28883. uni.scanCode({
  28884. success: (res) => {
  28885. dealScanText(res.result);
  28886. },
  28887. fail: (err) => {
  28888. uni.showToast({
  28889. title: "扫码失败",
  28890. icon: "error"
  28891. });
  28892. }
  28893. });
  28894. };
  28895. function handleAdd() {
  28896. if (!location2.value) {
  28897. uni.$u.toast("请选择库位");
  28898. return;
  28899. }
  28900. uni.navigateTo({
  28901. url: "/pages/index/wms/speedy-check-add?location=" + location2.value
  28902. });
  28903. }
  28904. const close = () => {
  28905. showLocationPopup.value = false;
  28906. };
  28907. const open2 = () => {
  28908. showLocationPopup.value = true;
  28909. };
  28910. vue.onUnmounted(() => {
  28911. uni.$u.ttsModule.stop();
  28912. unregister();
  28913. });
  28914. onLoad(() => {
  28915. getUserDefaultWarehouse();
  28916. uni.$on("selectedProducts", (list) => {
  28917. products.value = list;
  28918. });
  28919. });
  28920. const { unregister } = uni.$u.useEventListener((e) => {
  28921. if (e.barcode) {
  28922. dealScanText(e.barcode);
  28923. }
  28924. });
  28925. const __returned__ = { goBack, showCheckMethodPicker, checkMethod, resetType, checkMethodOptions, getUserDefaultWarehouse, location: location2, showLocationPopup, locationList, selectedLocation, godownId, getWarehouseLocationList, searchValue, products, onCheckMethodConfirm, handleLocationSelect, onLocationConfirm, selectLocation, onSubmit, onSearch, dealScanText, openScan, handleAdd, close, open: open2, unregister, reactive: vue.reactive, ref: vue.ref, computed: vue.computed, onUnmounted: vue.onUnmounted, get onLoad() {
  28926. return onLoad;
  28927. }, get onShow() {
  28928. return onShow;
  28929. }, LocationOrderItem };
  28930. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  28931. return __returned__;
  28932. }
  28933. };
  28934. function _sfc_render$s(_ctx, _cache, $props, $setup, $data, $options) {
  28935. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  28936. const _component_u_navbar = resolveEasycom(vue.resolveDynamicComponent("u-navbar"), __easycom_1$1);
  28937. const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_1$6);
  28938. const _component_u_cell_group = resolveEasycom(vue.resolveDynamicComponent("u-cell-group"), __easycom_2$3);
  28939. const _component_u_picker = resolveEasycom(vue.resolveDynamicComponent("u-picker"), __easycom_1$2);
  28940. const _component_u_text = resolveEasycom(vue.resolveDynamicComponent("u-text"), __easycom_1$8);
  28941. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  28942. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_7);
  28943. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$4);
  28944. const _directive_permission = vue.resolveDirective("permission");
  28945. return vue.openBlock(), vue.createElementBlock("view", {
  28946. class: "container",
  28947. style: { "padding-top": "44px", "padding-bottom": "10px" }
  28948. }, [
  28949. vue.createVNode(_component_u_navbar, {
  28950. title: "快速盘点",
  28951. border: false,
  28952. fixed: "",
  28953. "safe-area-inset-top": "",
  28954. bgColor: "#22ac38",
  28955. titleStyle: "font-size:36rpx;color:#fff"
  28956. }, {
  28957. left: vue.withCtx(() => [
  28958. vue.createVNode(_component_u_icon, {
  28959. name: "arrow-left",
  28960. color: "#fff",
  28961. size: "20",
  28962. onClick: $setup.goBack
  28963. })
  28964. ]),
  28965. right: vue.withCtx(() => [
  28966. vue.withDirectives((vue.openBlock(), vue.createElementBlock("text", {
  28967. style: { "color": "#ffffff" },
  28968. onClick: $setup.onSubmit
  28969. }, [
  28970. vue.createTextVNode("提交")
  28971. ])), [
  28972. [_directive_permission, "app:wms:speedyCheck:confirm"]
  28973. ])
  28974. ]),
  28975. _: 1
  28976. /* STABLE */
  28977. }),
  28978. vue.createCommentVNode(" 盘点信息选择区域 "),
  28979. vue.createElementVNode("view", {
  28980. class: "select-area",
  28981. style: { "margin-top": "44px" }
  28982. }, [
  28983. vue.createVNode(_component_u_cell_group, { border: true }, {
  28984. default: vue.withCtx(() => [
  28985. vue.createVNode(_component_u_cell, {
  28986. title: "盘点方式",
  28987. value: $setup.checkMethod,
  28988. onClick: _cache[0] || (_cache[0] = ($event) => $setup.showCheckMethodPicker = true),
  28989. isLink: true,
  28990. border: true
  28991. }, null, 8, ["value"]),
  28992. vue.createVNode(_component_u_cell, {
  28993. title: "目标库位",
  28994. value: $setup.location,
  28995. onClick: $setup.handleLocationSelect,
  28996. isLink: true,
  28997. border: true
  28998. }, null, 8, ["value"])
  28999. ]),
  29000. _: 1
  29001. /* STABLE */
  29002. })
  29003. ]),
  29004. vue.createCommentVNode(" 盘点方式选择器 "),
  29005. vue.createVNode(_component_u_picker, {
  29006. show: $setup.showCheckMethodPicker,
  29007. columns: [$setup.checkMethodOptions],
  29008. onConfirm: $setup.onCheckMethodConfirm,
  29009. onCancel: _cache[1] || (_cache[1] = ($event) => $setup.showCheckMethodPicker = false),
  29010. showToolbar: true,
  29011. title: "选择盘点方式",
  29012. closeOnClickOverlay: true,
  29013. cancelText: "取消",
  29014. confirmText: "确定",
  29015. itemHeight: 44,
  29016. visibleItemCount: 5
  29017. }, null, 8, ["show", "columns"]),
  29018. vue.createCommentVNode(" 库位选择弹出层 "),
  29019. vue.createVNode(_component_u_popup, {
  29020. show: $setup.showLocationPopup,
  29021. mode: "bottom",
  29022. onClose: $setup.close,
  29023. onOpen: $setup.open,
  29024. closeOnClickOverlay: true,
  29025. round: 10,
  29026. safeAreaInsetBottom: true
  29027. }, {
  29028. default: vue.withCtx(() => [
  29029. vue.createElementVNode("view", { class: "location-popup" }, [
  29030. vue.createElementVNode("view", { class: "location-popup-header" }, [
  29031. vue.createElementVNode("text", { style: { "flex": "1" } }, "选择库位"),
  29032. vue.createVNode(_component_u_text, {
  29033. style: { "width": "40px", "flex": "none" },
  29034. type: "primary",
  29035. text: "确定",
  29036. onClick: $setup.onLocationConfirm
  29037. })
  29038. ]),
  29039. vue.createElementVNode("view", { class: "location-popup-content" }, [
  29040. vue.createVNode(_component_u_input, {
  29041. modelValue: $setup.selectedLocation,
  29042. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.selectedLocation = $event),
  29043. placeholder: "请输入库位",
  29044. customStyle: "background-color: #f6f6f6; border-radius: 4px;"
  29045. }, null, 8, ["modelValue"]),
  29046. vue.createElementVNode("view", { class: "location-list" }, [
  29047. (vue.openBlock(true), vue.createElementBlock(
  29048. vue.Fragment,
  29049. null,
  29050. vue.renderList($setup.locationList, (item, index2) => {
  29051. return vue.openBlock(), vue.createElementBlock("view", {
  29052. class: vue.normalizeClass(["location-item", { "location-item--selected": $setup.selectedLocation === item }]),
  29053. key: index2,
  29054. onClick: ($event) => $setup.selectLocation(item)
  29055. }, [
  29056. vue.createElementVNode(
  29057. "text",
  29058. null,
  29059. vue.toDisplayString(item),
  29060. 1
  29061. /* TEXT */
  29062. ),
  29063. $setup.selectedLocation === item ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  29064. key: 0,
  29065. name: "checkmark",
  29066. color: "#19be6b",
  29067. size: "16"
  29068. })) : vue.createCommentVNode("v-if", true)
  29069. ], 10, ["onClick"]);
  29070. }),
  29071. 128
  29072. /* KEYED_FRAGMENT */
  29073. ))
  29074. ])
  29075. ])
  29076. ])
  29077. ]),
  29078. _: 1
  29079. /* STABLE */
  29080. }, 8, ["show"]),
  29081. vue.createCommentVNode(" 订单列表 "),
  29082. vue.createElementVNode("view", { class: "product-details" }, [
  29083. (vue.openBlock(true), vue.createElementBlock(
  29084. vue.Fragment,
  29085. null,
  29086. vue.renderList($setup.products, (item, index2) => {
  29087. return vue.openBlock(), vue.createBlock($setup["LocationOrderItem"], {
  29088. isLink: true,
  29089. key: index2,
  29090. item
  29091. }, null, 8, ["item"]);
  29092. }),
  29093. 128
  29094. /* KEYED_FRAGMENT */
  29095. ))
  29096. ]),
  29097. vue.createElementVNode("view", {
  29098. class: "add-btn",
  29099. onClick: $setup.handleAdd
  29100. }, [
  29101. vue.createVNode(_component_u_icon, {
  29102. name: "plus-circle",
  29103. size: "40",
  29104. color: "#19be6b"
  29105. })
  29106. ]),
  29107. vue.createCommentVNode(" 底部扫码输入框 "),
  29108. vue.createElementVNode("view", {
  29109. class: "fixed-bottom pad-20",
  29110. style: { "background": "#ffffff" }
  29111. }, [
  29112. vue.createVNode(_component_u_search, {
  29113. placeholder: "请输入快递单号/订单编号",
  29114. modelValue: $setup.searchValue,
  29115. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.searchValue = $event),
  29116. onSearch: $setup.onSearch,
  29117. "show-action": false,
  29118. "custom-style": "margin-right:10px"
  29119. }, null, 8, ["modelValue"]),
  29120. vue.createVNode(_component_u_icon, {
  29121. name: "scan",
  29122. size: "28",
  29123. color: "#19be6b",
  29124. onClick: $setup.openScan
  29125. })
  29126. ])
  29127. ]);
  29128. }
  29129. const PagesIndexWmsSpeedyCheck = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$s], ["__scopeId", "data-v-283ebe02"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/index/wms/speedy-check.vue"]]);
  29130. const _sfc_main$s = {
  29131. __name: "BookItemOrder",
  29132. props: {
  29133. book: Object,
  29134. index: Number
  29135. },
  29136. emits: ["remove"],
  29137. setup(__props, { expose: __expose, emit: __emit }) {
  29138. __expose();
  29139. const props2 = __props;
  29140. const emit2 = __emit;
  29141. const removeBook = () => {
  29142. emit2("remove", { book: props2.book, index: props2.index });
  29143. };
  29144. const __returned__ = { props: props2, emit: emit2, removeBook };
  29145. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  29146. return __returned__;
  29147. }
  29148. };
  29149. function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
  29150. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  29151. return vue.openBlock(), vue.createElementBlock("view", { class: "book-item" }, [
  29152. vue.createElementVNode("image", {
  29153. class: "book-image",
  29154. src: $props.book.cover,
  29155. mode: "aspectFill"
  29156. }, null, 8, ["src"]),
  29157. vue.createElementVNode("view", { class: "book-info" }, [
  29158. vue.createElementVNode("view", { class: "book-title" }, [
  29159. vue.createElementVNode(
  29160. "text",
  29161. null,
  29162. vue.toDisplayString($props.book.bookName),
  29163. 1
  29164. /* TEXT */
  29165. ),
  29166. vue.createVNode(_component_u_icon, {
  29167. name: "close",
  29168. size: "18",
  29169. onClick: $setup.removeBook
  29170. })
  29171. ]),
  29172. vue.createElementVNode("view", { class: "flex-a flex-1" }, [
  29173. vue.createElementVNode("view", { class: "book-details flex-d" }, [
  29174. vue.createElementVNode(
  29175. "text",
  29176. null,
  29177. "ISBN: " + vue.toDisplayString($props.book.isbn),
  29178. 1
  29179. /* TEXT */
  29180. ),
  29181. vue.createElementVNode(
  29182. "text",
  29183. null,
  29184. "定价: " + vue.toDisplayString($props.book.price),
  29185. 1
  29186. /* TEXT */
  29187. ),
  29188. vue.createElementVNode(
  29189. "text",
  29190. null,
  29191. "折扣: " + vue.toDisplayString($props.book.recycleDiscount),
  29192. 1
  29193. /* TEXT */
  29194. )
  29195. ]),
  29196. vue.createElementVNode("view", { class: "book-stats flex-d ml-20" }, [
  29197. vue.createElementVNode(
  29198. "text",
  29199. null,
  29200. "数量: " + vue.toDisplayString($props.book.quantity),
  29201. 1
  29202. /* TEXT */
  29203. ),
  29204. vue.createElementVNode(
  29205. "text",
  29206. null,
  29207. "预估单价: " + vue.toDisplayString($props.book.expectPrice),
  29208. 1
  29209. /* TEXT */
  29210. ),
  29211. vue.createElementVNode(
  29212. "text",
  29213. { style: { "color": "#ff0000" } },
  29214. "审核金额: " + vue.toDisplayString($props.book.auditPrice),
  29215. 1
  29216. /* TEXT */
  29217. )
  29218. ])
  29219. ])
  29220. ])
  29221. ]);
  29222. }
  29223. const BookItem = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_render$r], ["__scopeId", "data-v-97928f7a"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/index/components/BookItemOrder.vue"]]);
  29224. const _sfc_main$r = {
  29225. __name: "check-order",
  29226. setup(__props, { expose: __expose }) {
  29227. __expose();
  29228. const bookList = vue.ref([]);
  29229. const totalBooks = vue.computed(() => bookList.value.reduce((sum, book) => sum + parseFloat(book.quantity), 0));
  29230. const totalPrice = vue.computed(() => bookList.value.reduce((sum, book) => sum + parseFloat(book.auditPrice), 0).toFixed(2));
  29231. const removeBook = ({ book, index: index2 }) => {
  29232. bookList.value.splice(index2, 1);
  29233. };
  29234. const handleSubmit = () => {
  29235. if (bookList.value.length === 0) {
  29236. uni.$u.toast("请先添加书籍");
  29237. return;
  29238. }
  29239. uni.$u.http.post("/app/offlineorder/submitOfflineOrder", bookList.value).then((res) => {
  29240. if (res.code == 200) {
  29241. uni.$u.toast("提交成功");
  29242. bookList.value.length = 0;
  29243. }
  29244. });
  29245. };
  29246. const handleScan2 = () => {
  29247. uni.scanCode({
  29248. success: (res) => {
  29249. handleBarcode(res.result);
  29250. formatAppLog("log", "at pages/index/offline/check-order.vue:52", "扫码结果:", res.result);
  29251. },
  29252. fail: (res) => {
  29253. formatAppLog("log", "at pages/index/offline/check-order.vue:56", "扫码失败:", res);
  29254. uni.$u.toast("扫码失败");
  29255. }
  29256. });
  29257. };
  29258. const handleBarcode = (barcode) => {
  29259. formatAppLog("log", "at pages/index/offline/check-order.vue:63", "扫码结果:", barcode);
  29260. uni.$u.http.get(`/app/offlineorder/getBookInfo/${barcode}`).then((res) => {
  29261. if (res.code == 200) {
  29262. res.data.quantity = 1;
  29263. let item = bookList.value.find((item2) => item2.isbn === res.data.isbn);
  29264. if (item) {
  29265. item.quantity += 1;
  29266. item.auditPrice = (item.expectPrice * item.quantity).toFixed(2);
  29267. return;
  29268. } else {
  29269. res.data.auditPrice = (res.data.expectPrice * res.data.quantity).toFixed(2);
  29270. bookList.value.push(res.data);
  29271. }
  29272. }
  29273. });
  29274. };
  29275. const { unregister } = uni.$u.useEventListener((e) => {
  29276. handleBarcode(e.barcode);
  29277. });
  29278. vue.onUnmounted(() => {
  29279. unregister();
  29280. });
  29281. const __returned__ = { bookList, totalBooks, totalPrice, removeBook, handleSubmit, handleScan: handleScan2, handleBarcode, unregister, ref: vue.ref, computed: vue.computed, onUnmounted: vue.onUnmounted, get onLoad() {
  29282. return onLoad;
  29283. }, get onShow() {
  29284. return onShow;
  29285. }, BookItem };
  29286. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  29287. return __returned__;
  29288. }
  29289. };
  29290. function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
  29291. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  29292. const _directive_permission = vue.resolveDirective("permission");
  29293. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  29294. vue.createElementVNode("view", { class: "book-list" }, [
  29295. (vue.openBlock(true), vue.createElementBlock(
  29296. vue.Fragment,
  29297. null,
  29298. vue.renderList($setup.bookList, (book, index2) => {
  29299. return vue.openBlock(), vue.createBlock($setup["BookItem"], {
  29300. key: index2,
  29301. book,
  29302. onRemove: $setup.removeBook
  29303. }, null, 8, ["book"]);
  29304. }),
  29305. 128
  29306. /* KEYED_FRAGMENT */
  29307. ))
  29308. ]),
  29309. vue.createCommentVNode(" 底部信息和按钮 "),
  29310. vue.createElementVNode("view", {
  29311. class: "footer fixed-bottom flex-d",
  29312. style: { "padding-top": "10rpx" }
  29313. }, [
  29314. $setup.bookList.length > 0 ? (vue.openBlock(), vue.createElementBlock("text", {
  29315. key: 0,
  29316. class: "pad-10"
  29317. }, [
  29318. vue.createTextVNode("共 "),
  29319. vue.createElementVNode(
  29320. "text",
  29321. { style: { "color": "#ff0000" } },
  29322. vue.toDisplayString($setup.totalBooks),
  29323. 1
  29324. /* TEXT */
  29325. ),
  29326. vue.createTextVNode(" 本,预估回收价 "),
  29327. vue.createElementVNode(
  29328. "text",
  29329. { style: { "color": "#ff0000" } },
  29330. "¥" + vue.toDisplayString($setup.totalPrice),
  29331. 1
  29332. /* TEXT */
  29333. )
  29334. ])) : vue.createCommentVNode("v-if", true),
  29335. vue.createElementVNode("view", { class: "flex-a mt-12" }, [
  29336. vue.withDirectives(vue.createVNode(
  29337. _component_u_button,
  29338. {
  29339. size: "large",
  29340. type: "primary",
  29341. text: "提交",
  29342. onClick: $setup.handleSubmit
  29343. },
  29344. null,
  29345. 512
  29346. /* NEED_PATCH */
  29347. ), [
  29348. [_directive_permission, "app:offline:checkOrder:confirm"]
  29349. ]),
  29350. vue.createVNode(_component_u_button, {
  29351. size: "large",
  29352. type: "warning",
  29353. text: "扫码",
  29354. onClick: $setup.handleScan
  29355. })
  29356. ])
  29357. ])
  29358. ]);
  29359. }
  29360. const PagesIndexOfflineCheckOrder = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render$q], ["__scopeId", "data-v-8fea8cdb"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/index/offline/check-order.vue"]]);
  29361. const _sfc_main$q = {
  29362. __name: "check-record",
  29363. setup(__props, { expose: __expose }) {
  29364. __expose();
  29365. const scrollRef = vue.ref(null);
  29366. const refreshList = () => {
  29367. var _a;
  29368. (_a = scrollRef.value) == null ? void 0 : _a.resetUpScroll();
  29369. };
  29370. let dataList = vue.ref([]);
  29371. const updateList = (data) => {
  29372. dataList.value = data;
  29373. };
  29374. const __returned__ = { scrollRef, refreshList, get dataList() {
  29375. return dataList;
  29376. }, set dataList(v) {
  29377. dataList = v;
  29378. }, updateList, PageScroll, ref: vue.ref };
  29379. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  29380. return __returned__;
  29381. }
  29382. };
  29383. function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
  29384. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_0$7);
  29385. return vue.openBlock(), vue.createElementBlock("view", {
  29386. class: "common-page",
  29387. style: { "padding": "0" }
  29388. }, [
  29389. vue.createVNode(
  29390. $setup["PageScroll"],
  29391. {
  29392. requestStr: "/app/offlineorder/getUserStat",
  29393. onUpdateList: $setup.updateList,
  29394. ref: "scrollRef"
  29395. },
  29396. {
  29397. default: vue.withCtx(() => [
  29398. vue.createVNode(_component_u_sticky, { customNavHeight: 0 }, {
  29399. default: vue.withCtx(() => [
  29400. vue.createElementVNode("view", { class: "search-area flex-a" }, [
  29401. vue.createElementVNode("view", { class: "text-item flex-1" }, "核单时间"),
  29402. vue.createElementVNode("view", { class: "text-item flex-1" }, "核单数量"),
  29403. vue.createElementVNode("view", { class: "text-item flex-1" }, "核单本数"),
  29404. vue.createElementVNode("view", { class: "text-item flex-1" }, "预估金额")
  29405. ])
  29406. ]),
  29407. _: 1
  29408. /* STABLE */
  29409. }),
  29410. vue.createElementVNode("view", { class: "list-con" }, [
  29411. (vue.openBlock(true), vue.createElementBlock(
  29412. vue.Fragment,
  29413. null,
  29414. vue.renderList($setup.dataList, (item, index2) => {
  29415. return vue.openBlock(), vue.createElementBlock("view", {
  29416. key: index2,
  29417. class: "flex-a"
  29418. }, [
  29419. vue.createElementVNode(
  29420. "view",
  29421. { class: "text-item flex-1" },
  29422. vue.toDisplayString(item.statDate),
  29423. 1
  29424. /* TEXT */
  29425. ),
  29426. vue.createElementVNode(
  29427. "view",
  29428. { class: "text-item flex-1" },
  29429. vue.toDisplayString(item.totalNum),
  29430. 1
  29431. /* TEXT */
  29432. ),
  29433. vue.createElementVNode(
  29434. "view",
  29435. { class: "text-item flex-1" },
  29436. vue.toDisplayString(item.bookNum),
  29437. 1
  29438. /* TEXT */
  29439. ),
  29440. vue.createElementVNode(
  29441. "view",
  29442. { class: "text-item flex-1" },
  29443. vue.toDisplayString(item.expectAmount),
  29444. 1
  29445. /* TEXT */
  29446. )
  29447. ]);
  29448. }),
  29449. 128
  29450. /* KEYED_FRAGMENT */
  29451. ))
  29452. ])
  29453. ]),
  29454. _: 1
  29455. /* STABLE */
  29456. },
  29457. 512
  29458. /* NEED_PATCH */
  29459. )
  29460. ]);
  29461. }
  29462. const PagesIndexOfflineCheckRecord = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$p], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/index/offline/check-record.vue"]]);
  29463. const props$3 = {
  29464. props: {
  29465. // 内置图标名称,或图片路径,建议绝对路径
  29466. icon: {
  29467. type: String,
  29468. default: props$G.empty.icon
  29469. },
  29470. // 提示文字
  29471. text: {
  29472. type: String,
  29473. default: props$G.empty.text
  29474. },
  29475. // 文字颜色
  29476. textColor: {
  29477. type: String,
  29478. default: props$G.empty.textColor
  29479. },
  29480. // 文字大小
  29481. textSize: {
  29482. type: [String, Number],
  29483. default: props$G.empty.textSize
  29484. },
  29485. // 图标的颜色
  29486. iconColor: {
  29487. type: String,
  29488. default: props$G.empty.iconColor
  29489. },
  29490. // 图标的大小
  29491. iconSize: {
  29492. type: [String, Number],
  29493. default: props$G.empty.iconSize
  29494. },
  29495. // 选择预置的图标类型
  29496. mode: {
  29497. type: String,
  29498. default: props$G.empty.mode
  29499. },
  29500. // 图标宽度,单位px
  29501. width: {
  29502. type: [String, Number],
  29503. default: props$G.empty.width
  29504. },
  29505. // 图标高度,单位px
  29506. height: {
  29507. type: [String, Number],
  29508. default: props$G.empty.height
  29509. },
  29510. // 是否显示组件
  29511. show: {
  29512. type: Boolean,
  29513. default: props$G.empty.show
  29514. },
  29515. // 组件距离上一个元素之间的距离,默认px单位
  29516. marginTop: {
  29517. type: [String, Number],
  29518. default: props$G.empty.marginTop
  29519. }
  29520. }
  29521. };
  29522. const _sfc_main$p = {
  29523. name: "u-empty",
  29524. mixins: [mpMixin, mixin, props$3],
  29525. data() {
  29526. return {
  29527. icons: {
  29528. car: "购物车为空",
  29529. page: "页面不存在",
  29530. search: "没有搜索结果",
  29531. address: "没有收货地址",
  29532. wifi: "没有WiFi",
  29533. order: "订单为空",
  29534. coupon: "没有优惠券",
  29535. favor: "暂无收藏",
  29536. permission: "无权限",
  29537. history: "无历史记录",
  29538. news: "无新闻列表",
  29539. message: "消息列表为空",
  29540. list: "列表为空",
  29541. data: "数据为空",
  29542. comment: "暂无评论"
  29543. }
  29544. };
  29545. },
  29546. computed: {
  29547. // 组件样式
  29548. emptyStyle() {
  29549. const style = {};
  29550. style.marginTop = uni.$u.addUnit(this.marginTop);
  29551. return uni.$u.deepMerge(uni.$u.addStyle(this.customStyle), style);
  29552. },
  29553. // 文本样式
  29554. textStyle() {
  29555. const style = {};
  29556. style.color = this.textColor;
  29557. style.fontSize = uni.$u.addUnit(this.textSize);
  29558. return style;
  29559. },
  29560. // 判断icon是否图片路径
  29561. isSrc() {
  29562. return this.icon.indexOf("/") >= 0;
  29563. }
  29564. }
  29565. };
  29566. function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
  29567. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  29568. return _ctx.show ? (vue.openBlock(), vue.createElementBlock(
  29569. "view",
  29570. {
  29571. key: 0,
  29572. class: "u-empty",
  29573. style: vue.normalizeStyle([$options.emptyStyle])
  29574. },
  29575. [
  29576. !$options.isSrc ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  29577. key: 0,
  29578. name: _ctx.mode === "message" ? "chat" : `empty-${_ctx.mode}`,
  29579. size: _ctx.iconSize,
  29580. color: _ctx.iconColor,
  29581. "margin-top": "14"
  29582. }, null, 8, ["name", "size", "color"])) : (vue.openBlock(), vue.createElementBlock("image", {
  29583. key: 1,
  29584. style: vue.normalizeStyle({
  29585. width: _ctx.$u.addUnit(_ctx.width),
  29586. height: _ctx.$u.addUnit(_ctx.height)
  29587. }),
  29588. src: _ctx.icon,
  29589. mode: "widthFix"
  29590. }, null, 12, ["src"])),
  29591. vue.createElementVNode(
  29592. "text",
  29593. {
  29594. class: "u-empty__text",
  29595. style: vue.normalizeStyle([$options.textStyle])
  29596. },
  29597. vue.toDisplayString(_ctx.text ? _ctx.text : $data.icons[_ctx.mode]),
  29598. 5
  29599. /* TEXT, STYLE */
  29600. ),
  29601. _ctx.$slots.default || _ctx.$slots.$default ? (vue.openBlock(), vue.createElementBlock("view", {
  29602. key: 2,
  29603. class: "u-empty__wrap"
  29604. }, [
  29605. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  29606. ])) : vue.createCommentVNode("v-if", true)
  29607. ],
  29608. 4
  29609. /* STYLE */
  29610. )) : vue.createCommentVNode("v-if", true);
  29611. }
  29612. const __easycom_3$1 = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$o], ["__scopeId", "data-v-8dd5928e"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-empty/u-empty.vue"]]);
  29613. const _sfc_main$o = {
  29614. __name: "scan-book",
  29615. setup(__props, { expose: __expose }) {
  29616. __expose();
  29617. const searchValue = vue.ref("");
  29618. const scannedISBN = vue.ref("");
  29619. const currentTab = vue.ref(0);
  29620. const tabsList = [
  29621. {
  29622. name: "简介"
  29623. },
  29624. {
  29625. name: "轨迹"
  29626. }
  29627. ];
  29628. const bookInfo = vue.ref(null);
  29629. const handleSearch = () => {
  29630. if (!searchValue.value)
  29631. return;
  29632. loadBookInfo(searchValue.value);
  29633. };
  29634. const handleScan2 = () => {
  29635. uni.scanCode({
  29636. success: (res) => {
  29637. searchValue.value = res.result;
  29638. scannedISBN.value = res.result;
  29639. loadBookInfo(res.result);
  29640. }
  29641. });
  29642. };
  29643. const loadBookInfo = (isbn) => {
  29644. uni.$u.http.get(`/app/book/getBookByIsbn/${isbn}`).then((res) => {
  29645. if (res.code == 200) {
  29646. bookInfo.value = res.data;
  29647. }
  29648. });
  29649. };
  29650. const { unregister } = uni.$u.useEventListener((e) => {
  29651. searchValue.value = e.barcode;
  29652. scannedISBN.value = e.barcode;
  29653. loadBookInfo(e.barcode);
  29654. });
  29655. vue.onUnmounted(() => {
  29656. unregister();
  29657. });
  29658. const __returned__ = { searchValue, scannedISBN, currentTab, tabsList, bookInfo, handleSearch, handleScan: handleScan2, loadBookInfo, unregister, ref: vue.ref, computed: vue.computed, onUnmounted: vue.onUnmounted, get onLoad() {
  29659. return onLoad;
  29660. }, get onShow() {
  29661. return onShow;
  29662. } };
  29663. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  29664. return __returned__;
  29665. }
  29666. };
  29667. function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
  29668. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  29669. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$4);
  29670. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_0$7);
  29671. const _component_u_empty = resolveEasycom(vue.resolveDynamicComponent("u-empty"), __easycom_3$1);
  29672. const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_4$1);
  29673. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  29674. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  29675. vue.createCommentVNode(" 顶部搜索框 "),
  29676. vue.createVNode(_component_u_sticky, null, {
  29677. default: vue.withCtx(() => [
  29678. vue.createElementVNode("view", { class: "search-area" }, [
  29679. vue.createVNode(_component_u_search, {
  29680. modelValue: $setup.searchValue,
  29681. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.searchValue = $event),
  29682. placeholder: "扫描/输入ISBN或SH码",
  29683. "show-action": true,
  29684. actionText: "查询",
  29685. onSearch: $setup.handleSearch,
  29686. onCustom: $setup.handleSearch
  29687. }, {
  29688. suffixIcon: vue.withCtx(() => [
  29689. $setup.searchValue ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  29690. key: 0,
  29691. name: "close",
  29692. size: "20",
  29693. onClick: _cache[0] || (_cache[0] = ($event) => $setup.searchValue = "")
  29694. })) : vue.createCommentVNode("v-if", true)
  29695. ]),
  29696. _: 1
  29697. /* STABLE */
  29698. }, 8, ["modelValue"])
  29699. ])
  29700. ]),
  29701. _: 1
  29702. /* STABLE */
  29703. }),
  29704. vue.createCommentVNode(" 已扫描ISBN显示 "),
  29705. $setup.scannedISBN ? (vue.openBlock(), vue.createElementBlock("view", {
  29706. key: 0,
  29707. class: "isbn-display"
  29708. }, [
  29709. vue.createElementVNode(
  29710. "text",
  29711. null,
  29712. "已查询ISBN:" + vue.toDisplayString($setup.scannedISBN),
  29713. 1
  29714. /* TEXT */
  29715. )
  29716. ])) : vue.createCommentVNode("v-if", true),
  29717. vue.createCommentVNode(" 内容区域 "),
  29718. vue.createElementVNode("view", { class: "content" }, [
  29719. vue.createCommentVNode(" 空状态 "),
  29720. !$setup.bookInfo ? (vue.openBlock(), vue.createElementBlock("view", {
  29721. key: 0,
  29722. class: "empty-state"
  29723. }, [
  29724. vue.createVNode(_component_u_empty, {
  29725. mode: "data",
  29726. text: "暂无扫描数据",
  29727. "margin-top": "100"
  29728. })
  29729. ])) : (vue.openBlock(), vue.createElementBlock(
  29730. vue.Fragment,
  29731. { key: 1 },
  29732. [
  29733. vue.createCommentVNode(" 书籍详情 "),
  29734. vue.createElementVNode("view", { class: "book-detail" }, [
  29735. vue.createElementVNode("view", { class: "common-card mb-20" }, [
  29736. vue.createElementVNode("view", { class: "flex flex-d flex-a-c" }, [
  29737. vue.createElementVNode("image", {
  29738. class: "book-image",
  29739. src: $setup.bookInfo.cover,
  29740. mode: "heightFix"
  29741. }, null, 8, ["src"]),
  29742. vue.createElementVNode(
  29743. "text",
  29744. { class: "ml-20 font-15" },
  29745. vue.toDisplayString($setup.bookInfo.bookName),
  29746. 1
  29747. /* TEXT */
  29748. )
  29749. ]),
  29750. vue.createElementVNode("view", { class: "book-status" }, [
  29751. vue.createElementVNode(
  29752. "text",
  29753. { class: "status-text" },
  29754. "状态:" + vue.toDisplayString($setup.bookInfo.recycleStatus ? "已加入回收书单" : "未加入回收书单"),
  29755. 1
  29756. /* TEXT */
  29757. ),
  29758. $setup.bookInfo.recycleTime ? (vue.openBlock(), vue.createElementBlock(
  29759. "text",
  29760. {
  29761. key: 0,
  29762. class: "time-text"
  29763. },
  29764. "加入时间:" + vue.toDisplayString($setup.bookInfo.recycleTime),
  29765. 1
  29766. /* TEXT */
  29767. )) : vue.createCommentVNode("v-if", true)
  29768. ])
  29769. ]),
  29770. vue.createCommentVNode(" 基本信息 "),
  29771. vue.createElementVNode("view", { class: "common-card info-section mb-20" }, [
  29772. vue.createElementVNode("view", { class: "price-info" }, [
  29773. vue.createElementVNode("text", { class: "label" }, "定价:"),
  29774. vue.createElementVNode(
  29775. "text",
  29776. { class: "price" },
  29777. "¥" + vue.toDisplayString($setup.bookInfo.price),
  29778. 1
  29779. /* TEXT */
  29780. ),
  29781. vue.createElementVNode(
  29782. "text",
  29783. { class: "recycle-price" },
  29784. "回收价:¥" + vue.toDisplayString($setup.bookInfo.expectPrice),
  29785. 1
  29786. /* TEXT */
  29787. )
  29788. ]),
  29789. vue.createElementVNode("view", { class: "book-info" }, [
  29790. vue.createElementVNode("view", { class: "info-item" }, [
  29791. vue.createElementVNode("text", { class: "label" }, "ISBN:"),
  29792. vue.createElementVNode(
  29793. "text",
  29794. null,
  29795. vue.toDisplayString($setup.bookInfo.isbn),
  29796. 1
  29797. /* TEXT */
  29798. )
  29799. ]),
  29800. vue.createElementVNode("view", { class: "info-item" }, [
  29801. vue.createElementVNode("text", { class: "label" }, "语言:"),
  29802. vue.createElementVNode(
  29803. "text",
  29804. null,
  29805. vue.toDisplayString($setup.bookInfo.lang || "-"),
  29806. 1
  29807. /* TEXT */
  29808. )
  29809. ]),
  29810. vue.createElementVNode("view", { class: "info-item" }, [
  29811. vue.createElementVNode("text", { class: "label" }, "作者:"),
  29812. vue.createElementVNode(
  29813. "text",
  29814. null,
  29815. vue.toDisplayString($setup.bookInfo.author),
  29816. 1
  29817. /* TEXT */
  29818. )
  29819. ]),
  29820. vue.createElementVNode("view", { class: "info-item" }, [
  29821. vue.createElementVNode("text", { class: "label" }, "出版社:"),
  29822. vue.createElementVNode(
  29823. "text",
  29824. null,
  29825. vue.toDisplayString($setup.bookInfo.publish),
  29826. 1
  29827. /* TEXT */
  29828. )
  29829. ]),
  29830. vue.createElementVNode("view", { class: "info-item" }, [
  29831. vue.createElementVNode("text", { class: "label" }, "出版时间:"),
  29832. vue.createElementVNode(
  29833. "text",
  29834. null,
  29835. vue.toDisplayString($setup.bookInfo.pubDate),
  29836. 1
  29837. /* TEXT */
  29838. )
  29839. ])
  29840. ])
  29841. ]),
  29842. vue.createCommentVNode(" 简介和轨迹 "),
  29843. vue.createElementVNode("view", {
  29844. class: "common-card tabs-section",
  29845. style: { "padding": "0" }
  29846. }, [
  29847. vue.createVNode(_component_u_tabs, {
  29848. list: $setup.tabsList,
  29849. modelValue: $setup.currentTab,
  29850. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.currentTab = $event),
  29851. lineColor: "#19be6b"
  29852. }, null, 8, ["modelValue"]),
  29853. vue.createElementVNode("view", { class: "tab-content" }, [
  29854. $setup.currentTab === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  29855. key: 0,
  29856. class: "intro-content"
  29857. }, [
  29858. vue.createElementVNode("text", { class: "section-title" }, "内容简介:"),
  29859. vue.createElementVNode(
  29860. "text",
  29861. { class: "content-text" },
  29862. vue.toDisplayString($setup.bookInfo.contentBlurb),
  29863. 1
  29864. /* TEXT */
  29865. ),
  29866. vue.createElementVNode("text", { class: "section-title" }, "作者简介:"),
  29867. vue.createElementVNode(
  29868. "text",
  29869. { class: "content-text" },
  29870. vue.toDisplayString($setup.bookInfo.anthorBlurb),
  29871. 1
  29872. /* TEXT */
  29873. ),
  29874. vue.createElementVNode(
  29875. "text",
  29876. { class: "content-text" },
  29877. vue.toDisplayString($setup.bookInfo.catalog),
  29878. 1
  29879. /* TEXT */
  29880. )
  29881. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  29882. key: 1,
  29883. class: "track-content"
  29884. }, [
  29885. vue.createElementVNode(
  29886. "text",
  29887. null,
  29888. vue.toDisplayString($setup.bookInfo.track),
  29889. 1
  29890. /* TEXT */
  29891. )
  29892. ]))
  29893. ])
  29894. ])
  29895. ])
  29896. ],
  29897. 2112
  29898. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  29899. ))
  29900. ]),
  29901. vue.createCommentVNode(" 底部扫描按钮 "),
  29902. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  29903. vue.createVNode(_component_u_button, {
  29904. size: "large",
  29905. type: "primary",
  29906. text: "扫码(ISBN或SH码)",
  29907. onClick: $setup.handleScan
  29908. })
  29909. ])
  29910. ]);
  29911. }
  29912. const PagesIndexEntryScanBook = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$n], ["__scopeId", "data-v-04d3117d"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/index/entry/scan-book.vue"]]);
  29913. const _sfc_main$n = {
  29914. __name: "book-weight",
  29915. setup(__props, { expose: __expose }) {
  29916. __expose();
  29917. const customStyle = {
  29918. height: "100rpx",
  29919. fontSize: "32rpx"
  29920. };
  29921. const labelStyle = {
  29922. fontSize: "32rpx"
  29923. };
  29924. const placeholderStyle2 = vue.ref("fontSize: 32rpx");
  29925. const form = vue.ref({
  29926. weight: "",
  29927. isbn: ""
  29928. });
  29929. const rules2 = {
  29930. weight: [
  29931. {
  29932. required: true,
  29933. message: "请输入重量",
  29934. trigger: "blur"
  29935. },
  29936. {
  29937. type: "number",
  29938. message: "重量必须是数字",
  29939. trigger: "blur"
  29940. }
  29941. ],
  29942. isbn: [{
  29943. required: true,
  29944. message: "请输入ISBN",
  29945. trigger: "blur"
  29946. }]
  29947. };
  29948. function handleScan2() {
  29949. uni.scanCode({
  29950. success: (res) => {
  29951. form.value.isbn = res.result;
  29952. }
  29953. });
  29954. }
  29955. const formRef = vue.ref(null);
  29956. const submitForm = () => {
  29957. formRef.value.validate().then((valid) => {
  29958. if (valid) {
  29959. uni.$u.http.post("/app/weighChangeLog/add", form.value).then((res) => {
  29960. if (res.code == 200) {
  29961. uni.$u.toast("修改成功");
  29962. form.value.isbn = "";
  29963. form.value.weight = "";
  29964. } else {
  29965. uni.$u.toast(res.msg);
  29966. }
  29967. });
  29968. }
  29969. });
  29970. };
  29971. const { unregister } = uni.$u.useEventListener((e) => {
  29972. form.value.isbn = e.barcode;
  29973. });
  29974. vue.onUnmounted(() => {
  29975. unregister();
  29976. });
  29977. const __returned__ = { customStyle, labelStyle, placeholderStyle: placeholderStyle2, form, rules: rules2, handleScan: handleScan2, formRef, submitForm, unregister, ref: vue.ref, onUnmounted: vue.onUnmounted, get onLoad() {
  29978. return onLoad;
  29979. }, get onShow() {
  29980. return onShow;
  29981. } };
  29982. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  29983. return __returned__;
  29984. }
  29985. };
  29986. function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
  29987. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  29988. const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_1$a);
  29989. const _component_u_form = resolveEasycom(vue.resolveDynamicComponent("u-form"), __easycom_2$5);
  29990. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  29991. const _directive_permission = vue.resolveDirective("permission");
  29992. return vue.openBlock(), vue.createElementBlock("view", { class: "common-page" }, [
  29993. vue.createVNode(_component_u_form, {
  29994. model: $setup.form,
  29995. rules: $setup.rules,
  29996. ref: "formRef",
  29997. labelWidth: "90px",
  29998. errorType: "toast",
  29999. labelStyle: $setup.labelStyle
  30000. }, {
  30001. default: vue.withCtx(() => [
  30002. vue.createVNode(_component_u_form_item, {
  30003. label: "重量(千克)",
  30004. prop: "weight",
  30005. required: ""
  30006. }, {
  30007. default: vue.withCtx(() => [
  30008. vue.createVNode(_component_u_input, {
  30009. placeholderStyle: $setup.placeholderStyle,
  30010. customStyle: $setup.customStyle,
  30011. modelValue: $setup.form.weight,
  30012. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.form.weight = $event),
  30013. placeholder: "请输入数值",
  30014. clearable: ""
  30015. }, null, 8, ["placeholderStyle", "modelValue"])
  30016. ]),
  30017. _: 1
  30018. /* STABLE */
  30019. }),
  30020. vue.createVNode(_component_u_form_item, {
  30021. label: "ISBN",
  30022. prop: "isbn",
  30023. required: ""
  30024. }, {
  30025. default: vue.withCtx(() => [
  30026. vue.createVNode(_component_u_input, {
  30027. placeholderStyle: $setup.placeholderStyle,
  30028. customStyle: $setup.customStyle,
  30029. modelValue: $setup.form.isbn,
  30030. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.form.isbn = $event),
  30031. placeholder: "请输入编码",
  30032. clearable: ""
  30033. }, null, 8, ["placeholderStyle", "modelValue"])
  30034. ]),
  30035. _: 1
  30036. /* STABLE */
  30037. })
  30038. ]),
  30039. _: 1
  30040. /* STABLE */
  30041. }, 8, ["model"]),
  30042. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  30043. vue.createVNode(_component_u_button, {
  30044. size: "large",
  30045. type: "warning",
  30046. text: "扫码",
  30047. onClick: $setup.handleScan
  30048. }),
  30049. vue.withDirectives(vue.createVNode(
  30050. _component_u_button,
  30051. {
  30052. size: "large",
  30053. type: "success",
  30054. text: "提交",
  30055. onClick: $setup.submitForm
  30056. },
  30057. null,
  30058. 512
  30059. /* NEED_PATCH */
  30060. ), [
  30061. [_directive_permission, "app:entry:bookWeight:confirm"]
  30062. ])
  30063. ])
  30064. ]);
  30065. }
  30066. const PagesIndexEntryBookWeight = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$m], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/index/entry/book-weight.vue"]]);
  30067. const placeholderStyle = "font-size:32rpx";
  30068. const _sfc_main$m = {
  30069. __name: "commodity-scan",
  30070. setup(__props, { expose: __expose }) {
  30071. __expose();
  30072. const customStyle = vue.reactive({
  30073. height: "90rpx"
  30074. });
  30075. const form = vue.ref({
  30076. "isbn": ""
  30077. });
  30078. function scanCode() {
  30079. uni.scanCode({
  30080. success: (res) => {
  30081. form.value.isbn = res.result;
  30082. handleSubmit();
  30083. },
  30084. fail: (err) => {
  30085. uni.$u.toast("扫码失败");
  30086. }
  30087. });
  30088. }
  30089. function handleSubmit() {
  30090. if (!form.value.isbn)
  30091. return uni.$u.toast("请输入ISBN");
  30092. uni.$u.http.post("/app/book/bookPushErp", form.value).then((res) => {
  30093. formatAppLog("log", "at pages/index/entry/commodity-scan.vue:55", res);
  30094. if (res.code == 200) {
  30095. let text = form.value.isbn + res.msg;
  30096. uni.$u.ttsModule.speak(text);
  30097. form.value.isbn = "";
  30098. } else {
  30099. uni.$u.ttsModule.speak(res.msg);
  30100. }
  30101. }).catch((err) => {
  30102. uni.$u.toast("提交失败,请重试");
  30103. });
  30104. }
  30105. const { unregister } = uni.$u.useEventListener((e) => {
  30106. form.value.isbn = e.barcode;
  30107. handleSubmit();
  30108. });
  30109. vue.onUnmounted(() => {
  30110. unregister();
  30111. });
  30112. const __returned__ = { placeholderStyle, customStyle, form, scanCode, handleSubmit, unregister, reactive: vue.reactive, ref: vue.ref, onUnmounted: vue.onUnmounted, get onLoad() {
  30113. return onLoad;
  30114. }, get onShow() {
  30115. return onShow;
  30116. } };
  30117. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  30118. return __returned__;
  30119. }
  30120. };
  30121. function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
  30122. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  30123. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  30124. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  30125. vue.createElementVNode("view", { class: "main-content" }, [
  30126. vue.createElementVNode("view", { class: "input-group" }, [
  30127. vue.createVNode(_component_u_input, {
  30128. customStyle: $setup.customStyle,
  30129. "placeholder-style": $setup.placeholderStyle,
  30130. modelValue: $setup.form.isbn,
  30131. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.form.isbn = $event),
  30132. placeholder: "扫描ISBN",
  30133. border: "surround"
  30134. }, null, 8, ["customStyle", "modelValue"]),
  30135. vue.createVNode(_component_u_button, {
  30136. customStyle: $setup.customStyle,
  30137. type: "info",
  30138. color: "#a4adb3",
  30139. onClick: $setup.handleSubmit,
  30140. text: "提交"
  30141. }, null, 8, ["customStyle"])
  30142. ])
  30143. ]),
  30144. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  30145. vue.createVNode(_component_u_button, {
  30146. size: "large",
  30147. type: "success",
  30148. onClick: $setup.scanCode,
  30149. text: "扫码",
  30150. class: "scan-button"
  30151. })
  30152. ])
  30153. ]);
  30154. }
  30155. const PagesIndexEntryCommodityScan = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$l], ["__scopeId", "data-v-9a4165f6"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/index/entry/commodity-scan.vue"]]);
  30156. const props$2 = {
  30157. props: {
  30158. // 显示文字
  30159. title: {
  30160. type: String,
  30161. default: props$G.alert.title
  30162. },
  30163. // 主题,success/warning/info/error
  30164. type: {
  30165. type: String,
  30166. default: props$G.alert.type
  30167. },
  30168. // 辅助性文字
  30169. description: {
  30170. type: String,
  30171. default: props$G.alert.description
  30172. },
  30173. // 是否可关闭
  30174. closable: {
  30175. type: Boolean,
  30176. default: props$G.alert.closable
  30177. },
  30178. // 是否显示图标
  30179. showIcon: {
  30180. type: Boolean,
  30181. default: props$G.alert.showIcon
  30182. },
  30183. // 浅或深色调,light-浅色,dark-深色
  30184. effect: {
  30185. type: String,
  30186. default: props$G.alert.effect
  30187. },
  30188. // 文字是否居中
  30189. center: {
  30190. type: Boolean,
  30191. default: props$G.alert.center
  30192. },
  30193. // 字体大小
  30194. fontSize: {
  30195. type: [String, Number],
  30196. default: props$G.alert.fontSize
  30197. }
  30198. }
  30199. };
  30200. const _sfc_main$l = {
  30201. name: "u-alert",
  30202. mixins: [mpMixin, mixin, props$2],
  30203. data() {
  30204. return {
  30205. show: true
  30206. };
  30207. },
  30208. computed: {
  30209. iconColor() {
  30210. return this.effect === "light" ? this.type : "#fff";
  30211. },
  30212. // 不同主题对应不同的图标
  30213. iconName() {
  30214. switch (this.type) {
  30215. case "success":
  30216. return "checkmark-circle-fill";
  30217. case "error":
  30218. return "close-circle-fill";
  30219. case "warning":
  30220. return "error-circle-fill";
  30221. case "info":
  30222. return "info-circle-fill";
  30223. case "primary":
  30224. return "more-circle-fill";
  30225. default:
  30226. return "error-circle-fill";
  30227. }
  30228. }
  30229. },
  30230. methods: {
  30231. // 点击内容
  30232. clickHandler() {
  30233. this.$emit("click");
  30234. },
  30235. // 点击关闭按钮
  30236. closeHandler() {
  30237. this.show = false;
  30238. }
  30239. }
  30240. };
  30241. function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
  30242. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  30243. const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_1$5);
  30244. return vue.openBlock(), vue.createBlock(_component_u_transition, {
  30245. mode: "fade",
  30246. show: $data.show
  30247. }, {
  30248. default: vue.withCtx(() => [
  30249. vue.createElementVNode(
  30250. "view",
  30251. {
  30252. class: vue.normalizeClass(["u-alert", [`u-alert--${_ctx.type}--${_ctx.effect}`]]),
  30253. onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.clickHandler && $options.clickHandler(...args), ["stop"])),
  30254. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)])
  30255. },
  30256. [
  30257. _ctx.showIcon ? (vue.openBlock(), vue.createElementBlock("view", {
  30258. key: 0,
  30259. class: "u-alert__icon"
  30260. }, [
  30261. vue.createVNode(_component_u_icon, {
  30262. name: $options.iconName,
  30263. size: "18",
  30264. color: $options.iconColor
  30265. }, null, 8, ["name", "color"])
  30266. ])) : vue.createCommentVNode("v-if", true),
  30267. vue.createElementVNode(
  30268. "view",
  30269. {
  30270. class: "u-alert__content",
  30271. style: vue.normalizeStyle([{
  30272. paddingRight: _ctx.closable ? "20px" : 0
  30273. }])
  30274. },
  30275. [
  30276. _ctx.title ? (vue.openBlock(), vue.createElementBlock(
  30277. "text",
  30278. {
  30279. key: 0,
  30280. class: vue.normalizeClass(["u-alert__content__title", [_ctx.effect === "dark" ? "u-alert__text--dark" : `u-alert__text--${_ctx.type}--light`]]),
  30281. style: vue.normalizeStyle([{
  30282. fontSize: _ctx.$u.addUnit(_ctx.fontSize),
  30283. textAlign: _ctx.center ? "center" : "left"
  30284. }])
  30285. },
  30286. vue.toDisplayString(_ctx.title),
  30287. 7
  30288. /* TEXT, CLASS, STYLE */
  30289. )) : vue.createCommentVNode("v-if", true),
  30290. _ctx.description ? (vue.openBlock(), vue.createElementBlock(
  30291. "text",
  30292. {
  30293. key: 1,
  30294. class: vue.normalizeClass(["u-alert__content__desc", [_ctx.effect === "dark" ? "u-alert__text--dark" : `u-alert__text--${_ctx.type}--light`]]),
  30295. style: vue.normalizeStyle([{
  30296. fontSize: _ctx.$u.addUnit(_ctx.fontSize),
  30297. textAlign: _ctx.center ? "center" : "left"
  30298. }])
  30299. },
  30300. vue.toDisplayString(_ctx.description),
  30301. 7
  30302. /* TEXT, CLASS, STYLE */
  30303. )) : vue.createCommentVNode("v-if", true)
  30304. ],
  30305. 4
  30306. /* STYLE */
  30307. ),
  30308. _ctx.closable ? (vue.openBlock(), vue.createElementBlock("view", {
  30309. key: 1,
  30310. class: "u-alert__close",
  30311. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.closeHandler && $options.closeHandler(...args), ["stop"]))
  30312. }, [
  30313. vue.createVNode(_component_u_icon, {
  30314. name: "close",
  30315. color: $options.iconColor,
  30316. size: "15"
  30317. }, null, 8, ["color"])
  30318. ])) : vue.createCommentVNode("v-if", true)
  30319. ],
  30320. 6
  30321. /* CLASS, STYLE */
  30322. )
  30323. ]),
  30324. _: 1
  30325. /* STABLE */
  30326. }, 8, ["show"]);
  30327. }
  30328. const __easycom_3 = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$k], ["__scopeId", "data-v-158e540a"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-alert/u-alert.vue"]]);
  30329. const _sfc_main$k = {
  30330. __name: "logistics-detail",
  30331. setup(__props, { expose: __expose }) {
  30332. __expose();
  30333. const logisticsInfo = vue.ref([]);
  30334. function getLogisticsDetail(orderId) {
  30335. uni.$u.http.get(`/app/orderinfo/getOrderExpressList?orderId=${orderId}`).then((res) => {
  30336. if (res.code == 200) {
  30337. logisticsInfo.value = res.data;
  30338. }
  30339. });
  30340. }
  30341. function handleButtonClick(status, reason) {
  30342. uni.$u.http.post("/app/orderexception/update", {
  30343. id: id.value,
  30344. checkStatus: status,
  30345. refusalReason: reason
  30346. }).then((res) => {
  30347. if (res.code == 200) {
  30348. checkStatus.value = status;
  30349. uni.$u.toast("操作成功");
  30350. emit("refresh");
  30351. } else {
  30352. uni.$u.toast(res.msg);
  30353. }
  30354. });
  30355. }
  30356. const checkStatus = vue.ref(0);
  30357. const id = vue.ref(0);
  30358. onLoad((e) => {
  30359. checkStatus.value = e.status;
  30360. id.value = e.id;
  30361. getLogisticsDetail(e.orderId);
  30362. });
  30363. const __returned__ = { logisticsInfo, getLogisticsDetail, handleButtonClick, checkStatus, id, ref: vue.ref, get onLoad() {
  30364. return onLoad;
  30365. }, ApproveButton, RejectButton };
  30366. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  30367. return __returned__;
  30368. }
  30369. };
  30370. function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
  30371. const _component_u_alert = resolveEasycom(vue.resolveDynamicComponent("u-alert"), __easycom_3);
  30372. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_0$7);
  30373. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  30374. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  30375. vue.createCommentVNode(" 物流公司信息 "),
  30376. vue.createVNode(_component_u_sticky, null, {
  30377. default: vue.withCtx(() => [
  30378. vue.createVNode(_component_u_alert, {
  30379. title: `物流公司:京东快递`,
  30380. type: "warning"
  30381. })
  30382. ]),
  30383. _: 1
  30384. /* STABLE */
  30385. }),
  30386. vue.createCommentVNode(" 自定义物流轨迹时间轴 "),
  30387. vue.createElementVNode("scroll-view", {
  30388. "scroll-y": "",
  30389. class: "timeline-container"
  30390. }, [
  30391. (vue.openBlock(true), vue.createElementBlock(
  30392. vue.Fragment,
  30393. null,
  30394. vue.renderList($setup.logisticsInfo, (item, index2) => {
  30395. return vue.openBlock(), vue.createElementBlock("view", {
  30396. key: index2,
  30397. class: "timeline-item"
  30398. }, [
  30399. vue.createElementVNode("view", { class: "timeline-icon" }, [
  30400. vue.createVNode(_component_u_icon, {
  30401. name: "map-fill",
  30402. color: "#19be6b",
  30403. size: "16"
  30404. })
  30405. ]),
  30406. vue.createElementVNode("view", { class: "timeline-content" }, [
  30407. vue.createElementVNode(
  30408. "text",
  30409. { class: "title" },
  30410. vue.toDisplayString(item.title),
  30411. 1
  30412. /* TEXT */
  30413. ),
  30414. vue.createElementVNode(
  30415. "text",
  30416. { class: "desc" },
  30417. vue.toDisplayString(item.description),
  30418. 1
  30419. /* TEXT */
  30420. ),
  30421. vue.createElementVNode(
  30422. "text",
  30423. { class: "time" },
  30424. vue.toDisplayString(item.time),
  30425. 1
  30426. /* TEXT */
  30427. )
  30428. ]),
  30429. index2 < $setup.logisticsInfo.length - 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  30430. key: 0,
  30431. class: "timeline-line"
  30432. })) : vue.createCommentVNode("v-if", true)
  30433. ]);
  30434. }),
  30435. 128
  30436. /* KEYED_FRAGMENT */
  30437. ))
  30438. ]),
  30439. vue.createCommentVNode(" 底部操作按钮 "),
  30440. $setup.checkStatus == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  30441. key: 0,
  30442. class: "fixed-bottom"
  30443. }, [
  30444. vue.createVNode($setup["RejectButton"], {
  30445. size: "large",
  30446. onReject: _cache[0] || (_cache[0] = (reason) => $setup.handleButtonClick(3, reason))
  30447. }),
  30448. vue.createVNode($setup["ApproveButton"], {
  30449. size: "large",
  30450. onApprove: _cache[1] || (_cache[1] = ($event) => $setup.handleButtonClick(2))
  30451. })
  30452. ])) : vue.createCommentVNode("v-if", true)
  30453. ]);
  30454. }
  30455. const PagesIndexExpressLogisticsDetail = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$j], ["__scopeId", "data-v-8e52fe94"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/index/express/logistics-detail.vue"]]);
  30456. const _imports_0 = "/static/img/location.png";
  30457. const _imports_1 = "/static/img/location-active.png";
  30458. const _sfc_main$j = {
  30459. __name: "task-detail",
  30460. setup(__props, { expose: __expose }) {
  30461. __expose();
  30462. const currentTask = vue.ref(0);
  30463. const totalTasks = vue.ref(0);
  30464. const curTaskInfo = vue.ref({});
  30465. const nextLocation = vue.ref("");
  30466. const orderList = vue.ref([]);
  30467. const ttsModule2 = vue.ref(null);
  30468. const taskCode = vue.ref("");
  30469. const { unregister } = uni.$u.useEventListener((e) => {
  30470. if (e.barcode) {
  30471. searchText.value = e.barcode;
  30472. checkScanText(e.barcode);
  30473. }
  30474. });
  30475. vue.onUnmounted(() => {
  30476. uni.$u.ttsModule.stop();
  30477. unregister();
  30478. });
  30479. function playGlobalSound() {
  30480. uni.$u.playClickSound();
  30481. }
  30482. const searchText = vue.ref("");
  30483. const badList = vue.ref([]);
  30484. const handleNextTask = () => {
  30485. if (currentTask.value < totalTasks.value) {
  30486. currentTask.value++;
  30487. if (currentTask.value == totalTasks.value) {
  30488. uni.$u.ttsModule.speak("任务完成");
  30489. } else {
  30490. curTaskInfo.value = orderList.value[currentTask.value];
  30491. badList.value = curTaskInfo.value.detailVoList || [];
  30492. let nextInfo = orderList.value[currentTask.value + 1];
  30493. nextLocation.value = nextInfo.positionCode;
  30494. }
  30495. }
  30496. };
  30497. const onSearch = () => {
  30498. uni.$u.http.get(`/app/appstock/getStockTaskDetail?taskCode=${taskCode.value}`).then((res) => {
  30499. if (res.code == 200) {
  30500. orderList.value = res.data;
  30501. totalTasks.value = res.data.length;
  30502. curTaskInfo.value = res.data[currentTask.value];
  30503. badList.value = curTaskInfo.value.detailVoList || [];
  30504. }
  30505. });
  30506. };
  30507. const confirmStockTask = () => {
  30508. const params = {
  30509. positionCode: curTaskInfo.value.positionCode,
  30510. orderId: curTaskInfo.value.orderId,
  30511. taskCode: taskCode.value
  30512. };
  30513. uni.$u.http.post("/app/appstock/setStockTask", params).then((res) => {
  30514. if (res.code === 200) {
  30515. curTaskInfo.value.isCompleted = true;
  30516. orderList.value[currentTask.value] = curTaskInfo.value;
  30517. handleNextTask();
  30518. isFirstScan.value = false;
  30519. uni.$u.ttsModule.speak("下架成功");
  30520. } else {
  30521. uni.showToast({
  30522. title: res.msg,
  30523. icon: "error"
  30524. });
  30525. }
  30526. });
  30527. };
  30528. const unlockTask = () => {
  30529. uni.$u.http.post("/app/appstock/unlockStockTask?taskCode=" + taskCode.value).then((res) => {
  30530. if (res.code == 200) {
  30531. uni.showToast({
  30532. title: "解锁成功",
  30533. icon: "success"
  30534. });
  30535. } else {
  30536. uni.showToast({
  30537. title: res.msg || "解锁失败",
  30538. icon: "error"
  30539. });
  30540. }
  30541. });
  30542. };
  30543. const onSubmit = () => {
  30544. uni.showModal({
  30545. title: "确认提示",
  30546. content: "是否确认提交本次下架?",
  30547. success: (res) => {
  30548. playGlobalSound();
  30549. if (res.confirm) {
  30550. uni.navigateBack();
  30551. uni.$u.ttsModule.speak("任务已提交");
  30552. unlockTask();
  30553. }
  30554. }
  30555. });
  30556. };
  30557. function goBack() {
  30558. uni.showModal({
  30559. title: "确认提示",
  30560. content: "是否确认放弃本次下架?",
  30561. success: (res) => {
  30562. playGlobalSound();
  30563. if (res.confirm) {
  30564. uni.navigateBack();
  30565. uni.$u.ttsModule.speak("任务已放弃");
  30566. unlockTask();
  30567. }
  30568. }
  30569. });
  30570. }
  30571. let isFirstScan = vue.ref(false);
  30572. const checkScanText = (scanText) => {
  30573. formatAppLog("log", "at pages/index/wms/task-detail.vue:236", scanText, "scanText");
  30574. let length = scanText ? scanText.length : 0;
  30575. let isPositionCode = scanText.indexOf("-") > -1 && length == 9;
  30576. let isWaybillCode = /^(?=.*[A-Z])(?=.*\d)[A-Z0-9]+$/.test(scanText);
  30577. let isOrderId = /^\d+$/.test(scanText);
  30578. if (isPositionCode) {
  30579. let positionCode = curTaskInfo.value.positionCode;
  30580. if (positionCode != scanText) {
  30581. uni.showToast({
  30582. title: "库位号不正确",
  30583. icon: "error"
  30584. });
  30585. } else {
  30586. isFirstScan.value = true;
  30587. curTaskInfo.value.isValid = true;
  30588. }
  30589. }
  30590. if (!isFirstScan.value) {
  30591. uni.$u.ttsModule.speak("请先校验库位号");
  30592. return;
  30593. }
  30594. if (isWaybillCode || isOrderId) {
  30595. let waybillCode = curTaskInfo.value.waybillCode;
  30596. let orderId = curTaskInfo.value.orderId;
  30597. if (waybillCode == scanText || orderId == scanText) {
  30598. confirmStockTask();
  30599. } else {
  30600. uni.showToast({
  30601. title: "订单号或物流号不匹配",
  30602. icon: "error"
  30603. });
  30604. curTaskInfo.value.isValid = true;
  30605. }
  30606. }
  30607. };
  30608. const openScan = () => {
  30609. uni.scanCode({
  30610. success: (res) => {
  30611. searchText.value = res.result;
  30612. checkScanText(res.result);
  30613. },
  30614. fail: (err) => {
  30615. uni.showToast({
  30616. title: "扫码失败",
  30617. icon: "error"
  30618. });
  30619. }
  30620. });
  30621. };
  30622. onLoad((opts) => {
  30623. taskCode.value = opts.taskCode;
  30624. onSearch();
  30625. });
  30626. const __returned__ = { currentTask, totalTasks, curTaskInfo, nextLocation, orderList, ttsModule: ttsModule2, taskCode, unregister, playGlobalSound, searchText, badList, handleNextTask, onSearch, confirmStockTask, unlockTask, onSubmit, goBack, get isFirstScan() {
  30627. return isFirstScan;
  30628. }, set isFirstScan(v) {
  30629. isFirstScan = v;
  30630. }, checkScanText, openScan, ref: vue.ref, onMounted: vue.onMounted, computed: vue.computed, onUnmounted: vue.onUnmounted, BadOutCard, get onLoad() {
  30631. return onLoad;
  30632. }, get onShow() {
  30633. return onShow;
  30634. } };
  30635. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  30636. return __returned__;
  30637. }
  30638. };
  30639. function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
  30640. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  30641. const _component_u_text = resolveEasycom(vue.resolveDynamicComponent("u-text"), __easycom_1$8);
  30642. const _component_u_navbar = resolveEasycom(vue.resolveDynamicComponent("u-navbar"), __easycom_1$1);
  30643. const _component_u_alert = resolveEasycom(vue.resolveDynamicComponent("u-alert"), __easycom_3);
  30644. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$4);
  30645. return vue.openBlock(), vue.createElementBlock("view", {
  30646. class: "container",
  30647. onClick: $setup.playGlobalSound
  30648. }, [
  30649. vue.createCommentVNode(" 顶部导航栏 "),
  30650. vue.createVNode(_component_u_navbar, {
  30651. title: "下架任务",
  30652. border: false,
  30653. fixed: "",
  30654. "safe-area-inset-top": ""
  30655. }, {
  30656. left: vue.withCtx(() => [
  30657. vue.createVNode(_component_u_icon, {
  30658. name: "arrow-left",
  30659. color: "#333333",
  30660. size: "20",
  30661. onClick: $setup.goBack
  30662. })
  30663. ]),
  30664. right: vue.withCtx(() => [
  30665. vue.createVNode(_component_u_text, {
  30666. type: "primary",
  30667. text: "提交",
  30668. onClick: $setup.onSubmit
  30669. })
  30670. ]),
  30671. _: 1
  30672. /* STABLE */
  30673. }),
  30674. vue.createCommentVNode(" 任务进度 "),
  30675. vue.createElementVNode("view", { class: "progress-section" }, [
  30676. vue.createVNode(_component_u_alert, {
  30677. title: "当前任务",
  30678. type: "info",
  30679. center: ""
  30680. }),
  30681. vue.createElementVNode("view", {
  30682. class: "flex flex-j-c pad-10",
  30683. style: { "padding-right": "40rpx" }
  30684. }, [
  30685. vue.createCommentVNode(' <view class="next-task" @click="handleNextTask">\n <text>上一个</text>\n </view> '),
  30686. vue.createElementVNode("view", { class: "flex-c" }, [
  30687. vue.createElementVNode("text", null, [
  30688. vue.createTextVNode(
  30689. vue.toDisplayString($setup.currentTask),
  30690. 1
  30691. /* TEXT */
  30692. ),
  30693. vue.createElementVNode(
  30694. "text",
  30695. { class: "progress-text font-20 color-green" },
  30696. "/" + vue.toDisplayString($setup.totalTasks),
  30697. 1
  30698. /* TEXT */
  30699. )
  30700. ])
  30701. ]),
  30702. vue.createCommentVNode(' <view class="color-green" @click="handleNextTask">\n <text>下一个</text>\n </view> ')
  30703. ])
  30704. ]),
  30705. vue.createCommentVNode(" 库位信息 "),
  30706. vue.createElementVNode("view", {
  30707. class: "flex flex-j-b pad-10 next-location",
  30708. style: { "padding-right": "40rpx", "align-items": "center" }
  30709. }, [
  30710. vue.createElementVNode(
  30711. "view",
  30712. { class: "font-14 mb-20" },
  30713. vue.toDisplayString($setup.currentTask + 1) + "/" + vue.toDisplayString($setup.totalTasks),
  30714. 1
  30715. /* TEXT */
  30716. ),
  30717. vue.createElementVNode("view", { class: "flex-d" }, [
  30718. vue.createElementVNode(
  30719. "view",
  30720. { class: "font-20 text-center" },
  30721. vue.toDisplayString($setup.curTaskInfo.positionCode),
  30722. 1
  30723. /* TEXT */
  30724. ),
  30725. $setup.nextLocation ? (vue.openBlock(), vue.createElementBlock(
  30726. "view",
  30727. {
  30728. key: 0,
  30729. class: "location-detail font-13 mt-10"
  30730. },
  30731. "下一库位 " + vue.toDisplayString($setup.nextLocation || "无"),
  30732. 1
  30733. /* TEXT */
  30734. )) : vue.createCommentVNode("v-if", true)
  30735. ]),
  30736. !$setup.curTaskInfo.isValid ? (vue.openBlock(), vue.createElementBlock("image", {
  30737. key: 0,
  30738. src: _imports_0,
  30739. mode: "widthFix",
  30740. style: { "width": "70rpx", "height": "70rpx" }
  30741. })) : (vue.openBlock(), vue.createElementBlock("image", {
  30742. key: 1,
  30743. src: _imports_1,
  30744. mode: "widthFix",
  30745. style: { "width": "70rpx", "height": "70rpx" }
  30746. }))
  30747. ]),
  30748. vue.createCommentVNode(" 订单信息 "),
  30749. vue.createElementVNode("view", { class: "order-info" }, [
  30750. vue.createElementVNode(
  30751. "view",
  30752. { class: "info-item" },
  30753. "订单编号:" + vue.toDisplayString($setup.curTaskInfo.orderId),
  30754. 1
  30755. /* TEXT */
  30756. ),
  30757. vue.createElementVNode(
  30758. "view",
  30759. { class: "info-item" },
  30760. "物流单号:" + vue.toDisplayString($setup.curTaskInfo.waybillCode || "-"),
  30761. 1
  30762. /* TEXT */
  30763. ),
  30764. vue.createElementVNode(
  30765. "view",
  30766. { class: "info-item" },
  30767. "不良数量:" + vue.toDisplayString($setup.curTaskInfo.badNum),
  30768. 1
  30769. /* TEXT */
  30770. )
  30771. ]),
  30772. vue.createCommentVNode(" 极差商品列表 "),
  30773. vue.createElementVNode("view", { class: "bad-list" }, [
  30774. vue.createElementVNode("view", { class: "list-title mb-6 mt-20" }, "极差"),
  30775. (vue.openBlock(true), vue.createElementBlock(
  30776. vue.Fragment,
  30777. null,
  30778. vue.renderList($setup.badList, (item, index2) => {
  30779. return vue.openBlock(), vue.createElementBlock("view", { key: index2 }, [
  30780. vue.createVNode($setup["BadOutCard"], { item }, null, 8, ["item"])
  30781. ]);
  30782. }),
  30783. 128
  30784. /* KEYED_FRAGMENT */
  30785. ))
  30786. ]),
  30787. vue.createCommentVNode(" 底部搜索框 "),
  30788. vue.createElementVNode("view", {
  30789. class: "fixed-bottom pad-20",
  30790. style: { "background": "#ffffff" }
  30791. }, [
  30792. vue.createVNode(_component_u_search, {
  30793. modelValue: $setup.searchText,
  30794. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchText = $event),
  30795. placeholder: "请输入订单编号/物流单号/库位号",
  30796. "show-action": false,
  30797. clearabled: true,
  30798. onSearch: _cache[1] || (_cache[1] = ($event) => $setup.checkScanText($setup.searchText)),
  30799. height: "40"
  30800. }, null, 8, ["modelValue"]),
  30801. vue.createVNode(_component_u_icon, {
  30802. name: "scan",
  30803. size: "28",
  30804. color: "#19be6b",
  30805. onClick: $setup.openScan
  30806. })
  30807. ])
  30808. ]);
  30809. }
  30810. const PagesIndexWmsTaskDetail = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$i], ["__scopeId", "data-v-ca763ad9"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/index/wms/task-detail.vue"]]);
  30811. const _sfc_main$i = {
  30812. __name: "speedy-check-add",
  30813. setup(__props, { expose: __expose }) {
  30814. __expose();
  30815. const location2 = vue.ref("");
  30816. const products = vue.ref([]);
  30817. const orderNum = vue.ref("");
  30818. const godownName = vue.ref("");
  30819. const getOrderByPositionCode = (positionCode) => {
  30820. uni.$u.http.get("/app/stock/getOrderByPositionCode?positionCode=" + positionCode).then((res) => {
  30821. if (res.code === 200) {
  30822. const data = res.data;
  30823. orderNum.value = data.orderNum;
  30824. godownName.value = data.godownName;
  30825. products.value = data.godownStockLogResults || [];
  30826. products.value.forEach((item) => {
  30827. item.checked = false;
  30828. });
  30829. } else {
  30830. uni.$u.toast(res.msg);
  30831. }
  30832. });
  30833. };
  30834. onLoad((options) => {
  30835. if (options.location) {
  30836. location2.value = options.location;
  30837. getOrderByPositionCode(options.location);
  30838. }
  30839. });
  30840. const { unregister } = uni.$u.useEventListener((e) => {
  30841. if (e.barcode) {
  30842. handleScan(e.barcode);
  30843. }
  30844. });
  30845. vue.onUnmounted(() => {
  30846. unregister();
  30847. });
  30848. const isAllSelected = vue.computed(() => {
  30849. return products.value.length > 0 && products.value.every((item) => item.checked);
  30850. });
  30851. const toggleItemSelect = (item) => {
  30852. item.checked = !item.checked;
  30853. };
  30854. const toggleSelectAll = () => {
  30855. const newState = !isAllSelected.value;
  30856. products.value.forEach((item) => {
  30857. item.checked = newState;
  30858. });
  30859. };
  30860. const onSubmit = () => {
  30861. const selectedItems = products.value.filter((item) => item.checked);
  30862. uni.$emit("selectedProducts", selectedItems);
  30863. goBack();
  30864. };
  30865. const goBack = () => {
  30866. uni.navigateBack({
  30867. delta: 1
  30868. });
  30869. };
  30870. const __returned__ = { location: location2, products, orderNum, godownName, getOrderByPositionCode, unregister, isAllSelected, toggleItemSelect, toggleSelectAll, onSubmit, goBack, ref: vue.ref, computed: vue.computed, onUnmounted: vue.onUnmounted, get onLoad() {
  30871. return onLoad;
  30872. }, LocationOrderItem };
  30873. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  30874. return __returned__;
  30875. }
  30876. };
  30877. function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
  30878. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  30879. const _component_u_navbar = resolveEasycom(vue.resolveDynamicComponent("u-navbar"), __easycom_1$1);
  30880. return vue.openBlock(), vue.createElementBlock("view", {
  30881. class: "container",
  30882. style: { "padding-top": "84px", "padding-bottom": "10px" }
  30883. }, [
  30884. vue.createVNode(_component_u_navbar, {
  30885. title: "选择商品",
  30886. border: false,
  30887. fixed: "",
  30888. "safe-area-inset-top": "",
  30889. bgColor: "#22ac38",
  30890. titleStyle: "font-size:36rpx;color:#fff"
  30891. }, {
  30892. left: vue.withCtx(() => [
  30893. vue.createVNode(_component_u_icon, {
  30894. name: "arrow-left",
  30895. color: "#fff",
  30896. size: "20",
  30897. onClick: $setup.goBack
  30898. })
  30899. ]),
  30900. right: vue.withCtx(() => [
  30901. vue.createElementVNode("text", {
  30902. style: { "color": "#ffffff" },
  30903. onClick: $setup.onSubmit
  30904. }, "确定")
  30905. ]),
  30906. _: 1
  30907. /* STABLE */
  30908. }),
  30909. vue.createCommentVNode(" 库位显示 "),
  30910. vue.createElementVNode("view", { class: "location-info" }, [
  30911. vue.createElementVNode(
  30912. "text",
  30913. null,
  30914. "库位: " + vue.toDisplayString($setup.location),
  30915. 1
  30916. /* TEXT */
  30917. ),
  30918. $setup.godownName ? (vue.openBlock(), vue.createElementBlock(
  30919. "text",
  30920. { key: 0 },
  30921. "仓库: " + vue.toDisplayString($setup.godownName),
  30922. 1
  30923. /* TEXT */
  30924. )) : vue.createCommentVNode("v-if", true),
  30925. $setup.orderNum ? (vue.openBlock(), vue.createElementBlock(
  30926. "text",
  30927. { key: 1 },
  30928. "订单号: " + vue.toDisplayString($setup.orderNum),
  30929. 1
  30930. /* TEXT */
  30931. )) : vue.createCommentVNode("v-if", true)
  30932. ]),
  30933. vue.createCommentVNode(" 订单列表 "),
  30934. vue.createElementVNode("view", { class: "product-details" }, [
  30935. (vue.openBlock(true), vue.createElementBlock(
  30936. vue.Fragment,
  30937. null,
  30938. vue.renderList($setup.products, (item, index2) => {
  30939. return vue.openBlock(), vue.createBlock($setup["LocationOrderItem"], {
  30940. isCheck: "",
  30941. key: index2,
  30942. item,
  30943. onSelect: $setup.toggleItemSelect,
  30944. isLink: false
  30945. }, null, 8, ["item"]);
  30946. }),
  30947. 128
  30948. /* KEYED_FRAGMENT */
  30949. ))
  30950. ]),
  30951. vue.createCommentVNode(" 底部全选栏 "),
  30952. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  30953. vue.createElementVNode("view", {
  30954. class: "select-all",
  30955. onClick: $setup.toggleSelectAll
  30956. }, [
  30957. vue.createVNode(_component_u_icon, {
  30958. name: $setup.isAllSelected ? "checkmark-circle-fill" : "checkmark-circle",
  30959. color: $setup.isAllSelected ? "#19be6b" : "#c8c9cc",
  30960. size: "28"
  30961. }, null, 8, ["name", "color"]),
  30962. vue.createElementVNode("text", { class: "select-text" }, "全选")
  30963. ]),
  30964. vue.createElementVNode(
  30965. "text",
  30966. { class: "order-count" },
  30967. "订单总数: " + vue.toDisplayString($setup.products.length),
  30968. 1
  30969. /* TEXT */
  30970. )
  30971. ])
  30972. ]);
  30973. }
  30974. const PagesIndexWmsSpeedyCheckAdd = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$h], ["__scopeId", "data-v-dabb4347"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/index/wms/speedy-check-add.vue"]]);
  30975. const _sfc_main$h = {
  30976. __name: "user-info",
  30977. setup(__props, { expose: __expose }) {
  30978. __expose();
  30979. const userInfo = vue.ref({
  30980. avatar: "/static/images/avatar.jpg",
  30981. name: "无",
  30982. gender: "无",
  30983. birthday: "无",
  30984. education: "无",
  30985. school: "无",
  30986. username: "用户账号",
  30987. account: "fxt",
  30988. createTime: "2024-06-12 12:00:00",
  30989. lastLogin: "",
  30990. company: "无",
  30991. employeeId: "无",
  30992. position: "无",
  30993. phone: "18888888888",
  30994. email: "无",
  30995. address: "无"
  30996. });
  30997. function getUserInfo() {
  30998. uni.$u.http.get("/app/appUser/getUserInfoById").then((res) => {
  30999. if (res.code == 200) {
  31000. userInfo.value = res.data;
  31001. }
  31002. });
  31003. }
  31004. getUserInfo();
  31005. function setAvatar(avatarfile) {
  31006. uni.$u.http.post("/app/appUser/setAvatar?avatarfile=" + avatarfile).then((res) => {
  31007. if (res.code == 200) {
  31008. userInfo.value.avatar = avatarfile;
  31009. uni.showToast({
  31010. title: "头像设置成功",
  31011. icon: "success"
  31012. });
  31013. }
  31014. });
  31015. }
  31016. const handleEditAvatar = () => {
  31017. const token = uni.getStorageSync("token");
  31018. uni.chooseImage({
  31019. count: 1,
  31020. success: (res) => {
  31021. const filePath = res.tempFilePaths[0];
  31022. uni.uploadFile({
  31023. url: `${baseUrl}/common/upload`,
  31024. filePath,
  31025. name: "file",
  31026. header: {
  31027. "Authorization": token
  31028. },
  31029. success: (uploadRes) => {
  31030. const data = JSON.parse(uploadRes.data);
  31031. if (data.code === 200) {
  31032. setAvatar(data.url);
  31033. } else {
  31034. uni.showToast({
  31035. title: "上传失败",
  31036. icon: "none"
  31037. });
  31038. }
  31039. },
  31040. fail: () => {
  31041. uni.showToast({
  31042. title: "上传失败",
  31043. icon: "none"
  31044. });
  31045. }
  31046. });
  31047. }
  31048. });
  31049. };
  31050. const __returned__ = { userInfo, getUserInfo, setAvatar, handleEditAvatar, ref: vue.ref, get baseUrl() {
  31051. return baseUrl;
  31052. } };
  31053. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  31054. return __returned__;
  31055. }
  31056. };
  31057. function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
  31058. const _component_u_avatar = resolveEasycom(vue.resolveDynamicComponent("u-avatar"), __easycom_0$d);
  31059. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  31060. const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_1$6);
  31061. const _component_u_cell_group = resolveEasycom(vue.resolveDynamicComponent("u-cell-group"), __easycom_2$3);
  31062. return vue.openBlock(), vue.createElementBlock("view", { class: "user-info-page" }, [
  31063. vue.createCommentVNode(" 头像区域 "),
  31064. vue.createElementVNode("view", { class: "avatar-section" }, [
  31065. vue.createElementVNode("view", { class: "avatar-wrap" }, [
  31066. vue.createElementVNode("text", null, "头像:"),
  31067. vue.createVNode(_component_u_avatar, {
  31068. size: 50,
  31069. src: $setup.userInfo.avatar
  31070. }, null, 8, ["src"]),
  31071. vue.createVNode(_component_u_button, {
  31072. type: "success",
  31073. style: { "width": "200rpx" },
  31074. size: "small",
  31075. onClick: $setup.handleEditAvatar
  31076. }, {
  31077. default: vue.withCtx(() => [
  31078. vue.createTextVNode("去修改")
  31079. ]),
  31080. _: 1
  31081. /* STABLE */
  31082. })
  31083. ])
  31084. ]),
  31085. vue.createCommentVNode(" 基本信息区域 "),
  31086. vue.createElementVNode("view", { class: "info-section" }, [
  31087. vue.createElementVNode("view", { class: "section-title" }, "基本信息"),
  31088. vue.createElementVNode("view", { class: "info-card" }, [
  31089. vue.createVNode(_component_u_cell_group, { border: false }, {
  31090. default: vue.withCtx(() => [
  31091. vue.createVNode(_component_u_cell, {
  31092. title: "姓名",
  31093. value: $setup.userInfo.nickName || "无"
  31094. }, null, 8, ["value"]),
  31095. vue.createVNode(_component_u_cell, {
  31096. title: "性别",
  31097. value: $setup.userInfo.sex == 0 ? "男" : $setup.userInfo.sex == 1 ? "女" : "未知"
  31098. }, null, 8, ["value"]),
  31099. vue.createVNode(_component_u_cell, {
  31100. title: "生日",
  31101. value: $setup.userInfo.birthday || "无"
  31102. }, null, 8, ["value"]),
  31103. vue.createVNode(_component_u_cell, {
  31104. title: "学历",
  31105. value: $setup.userInfo.education || "无"
  31106. }, null, 8, ["value"]),
  31107. vue.createVNode(_component_u_cell, {
  31108. title: "毕业学校",
  31109. value: $setup.userInfo.school || "无",
  31110. border: false
  31111. }, null, 8, ["value"])
  31112. ]),
  31113. _: 1
  31114. /* STABLE */
  31115. })
  31116. ])
  31117. ]),
  31118. vue.createCommentVNode(" 账号信息区域 "),
  31119. vue.createElementVNode("view", { class: "info-section" }, [
  31120. vue.createElementVNode("view", { class: "section-title" }, "用户账号"),
  31121. vue.createElementVNode("view", { class: "info-card" }, [
  31122. vue.createVNode(_component_u_cell_group, { border: false }, {
  31123. default: vue.withCtx(() => [
  31124. vue.createVNode(_component_u_cell, {
  31125. title: "账号",
  31126. value: $setup.userInfo.userName
  31127. }, null, 8, ["value"]),
  31128. vue.createVNode(_component_u_cell, {
  31129. title: "创建日期",
  31130. value: $setup.userInfo.createTime
  31131. }, null, 8, ["value"]),
  31132. vue.createVNode(_component_u_cell, {
  31133. title: "最近登录",
  31134. value: $setup.userInfo.loginDate || "--",
  31135. border: false
  31136. }, null, 8, ["value"])
  31137. ]),
  31138. _: 1
  31139. /* STABLE */
  31140. })
  31141. ])
  31142. ]),
  31143. vue.createCommentVNode(" 员工资料区域 "),
  31144. vue.createElementVNode("view", { class: "info-section" }, [
  31145. vue.createElementVNode("view", { class: "section-title" }, "员工资料"),
  31146. vue.createElementVNode("view", { class: "info-card" }, [
  31147. vue.createVNode(_component_u_cell_group, { border: false }, {
  31148. default: vue.withCtx(() => [
  31149. vue.createVNode(_component_u_cell, {
  31150. title: "公司",
  31151. value: $setup.userInfo.company || "无"
  31152. }, null, 8, ["value"]),
  31153. vue.createVNode(_component_u_cell, {
  31154. title: "员工编号",
  31155. value: $setup.userInfo.employeeId || "无"
  31156. }, null, 8, ["value"]),
  31157. vue.createVNode(_component_u_cell, {
  31158. title: "职位",
  31159. value: $setup.userInfo.position || "无",
  31160. border: false
  31161. }, null, 8, ["value"])
  31162. ]),
  31163. _: 1
  31164. /* STABLE */
  31165. })
  31166. ])
  31167. ]),
  31168. vue.createCommentVNode(" 联系方式区域 "),
  31169. vue.createElementVNode("view", { class: "info-section" }, [
  31170. vue.createElementVNode("view", { class: "section-title" }, "联系方式"),
  31171. vue.createElementVNode("view", { class: "info-card" }, [
  31172. vue.createVNode(_component_u_cell_group, { border: false }, {
  31173. default: vue.withCtx(() => [
  31174. vue.createVNode(_component_u_cell, {
  31175. title: "电话",
  31176. value: $setup.userInfo.phonenumber
  31177. }, null, 8, ["value"]),
  31178. vue.createVNode(_component_u_cell, {
  31179. title: "邮箱",
  31180. value: $setup.userInfo.email || "无"
  31181. }, null, 8, ["value"]),
  31182. vue.createVNode(_component_u_cell, {
  31183. title: "住址",
  31184. value: $setup.userInfo.address || "无",
  31185. border: false
  31186. }, null, 8, ["value"])
  31187. ]),
  31188. _: 1
  31189. /* STABLE */
  31190. })
  31191. ])
  31192. ])
  31193. ]);
  31194. }
  31195. const PagesMyPageUserInfo = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$g], ["__scopeId", "data-v-804eca28"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/my/page/user-info.vue"]]);
  31196. const _sfc_main$g = {
  31197. __name: "warehouse",
  31198. setup(__props, { expose: __expose }) {
  31199. __expose();
  31200. const showPicker = vue.ref(false);
  31201. const selectedWarehouse = vue.ref("");
  31202. const warehouseList = vue.ref([]);
  31203. const getWarehouseList = () => {
  31204. uni.$u.http.post("/app/appUser/searchGodown?name=").then((res) => {
  31205. if (res.code == 200) {
  31206. warehouseList.value = res.data.filter((v) => v.useStatus == 1).map((v) => ({
  31207. text: v.godownName,
  31208. value: v.id
  31209. }));
  31210. }
  31211. });
  31212. };
  31213. onLoad(() => {
  31214. getWarehouseList();
  31215. getWarehouse();
  31216. });
  31217. getWarehouseList();
  31218. const getWarehouse = () => {
  31219. uni.$u.http.get("/app/appUser/getUserBindGodown").then((res) => {
  31220. var _a;
  31221. if (res.code == 200) {
  31222. selectedWarehouse.value = (_a = res.data) == null ? void 0 : _a.godownName;
  31223. }
  31224. });
  31225. };
  31226. const saveWarehouse = (godownId) => {
  31227. uni.$u.http.post("/app/appUser/bingowGodown?godownId=" + godownId).then((res) => {
  31228. if (res.code == 200) {
  31229. uni.showToast({
  31230. title: "设置默认仓库成功",
  31231. icon: "success"
  31232. });
  31233. }
  31234. });
  31235. };
  31236. const onConfirm = (e) => {
  31237. const [{
  31238. value: value2,
  31239. text
  31240. }] = e.value;
  31241. selectedWarehouse.value = text;
  31242. showPicker.value = false;
  31243. formatAppLog("log", "at pages/my/page/warehouse.vue:81", e, "xxxxxx");
  31244. saveWarehouse(value2);
  31245. };
  31246. const __returned__ = { showPicker, selectedWarehouse, warehouseList, getWarehouseList, getWarehouse, saveWarehouse, onConfirm, ref: vue.ref, get onLoad() {
  31247. return onLoad;
  31248. } };
  31249. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  31250. return __returned__;
  31251. }
  31252. };
  31253. function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
  31254. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  31255. const _component_u_picker = resolveEasycom(vue.resolveDynamicComponent("u-picker"), __easycom_1$2);
  31256. return vue.openBlock(), vue.createElementBlock("view", { class: "warehouse-select" }, [
  31257. vue.createElementVNode("view", {
  31258. class: "select-wrap",
  31259. onClick: _cache[0] || (_cache[0] = ($event) => $setup.showPicker = true)
  31260. }, [
  31261. vue.createElementVNode("text", { class: "required-label" }, "*"),
  31262. vue.createElementVNode("text", { class: "label" }, "默认仓库"),
  31263. vue.createElementVNode("view", { class: "picker-value" }, [
  31264. vue.createElementVNode(
  31265. "text",
  31266. {
  31267. class: vue.normalizeClass(["value-text", !$setup.selectedWarehouse && "placeholder"])
  31268. },
  31269. vue.toDisplayString($setup.selectedWarehouse || "请选择仓库"),
  31270. 3
  31271. /* TEXT, CLASS */
  31272. ),
  31273. vue.createVNode(_component_u_icon, {
  31274. name: "arrow-right",
  31275. color: "#999",
  31276. size: "16"
  31277. })
  31278. ])
  31279. ]),
  31280. vue.createCommentVNode(" 仓库选择器 "),
  31281. vue.createVNode(_component_u_picker, {
  31282. show: $setup.showPicker,
  31283. columns: [$setup.warehouseList],
  31284. onConfirm: $setup.onConfirm,
  31285. onCancel: _cache[1] || (_cache[1] = ($event) => $setup.showPicker = false),
  31286. onClose: _cache[2] || (_cache[2] = ($event) => $setup.showPicker = false),
  31287. title: "选择仓库",
  31288. confirmText: "确定",
  31289. cancelText: "取消"
  31290. }, null, 8, ["show", "columns"])
  31291. ]);
  31292. }
  31293. const PagesMyPageWarehouse = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$f], ["__scopeId", "data-v-972eecda"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/my/page/warehouse.vue"]]);
  31294. const _sfc_main$f = {
  31295. __name: "school",
  31296. setup(__props, { expose: __expose }) {
  31297. __expose();
  31298. const schoolName = vue.ref("");
  31299. const schoolList = vue.ref([]);
  31300. const getSchoolList = () => {
  31301. uni.$u.http.get("/app/appConf/getPadSchoolBroadcast").then((res) => {
  31302. if (res.code == 200) {
  31303. schoolList.value = res.data;
  31304. }
  31305. });
  31306. };
  31307. getSchoolList();
  31308. const handleSubmit = () => {
  31309. if (schoolList.value.length === 0) {
  31310. uni.$u.toast("请至少添加一所学校");
  31311. return;
  31312. }
  31313. uni.$u.http.post("/app/appConf/setPadSchoolBroadcast", schoolList.value).then((res) => {
  31314. if (res.code == 200) {
  31315. uni.showToast({
  31316. title: "设置成功",
  31317. icon: "success"
  31318. });
  31319. }
  31320. });
  31321. };
  31322. const handleAddSchool = () => {
  31323. if (!schoolName.value.trim()) {
  31324. uni.$u.toast("请输入学校名称");
  31325. return;
  31326. }
  31327. schoolList.value.push({
  31328. schoolName: schoolName.value,
  31329. id: ""
  31330. });
  31331. schoolName.value = "";
  31332. };
  31333. const handleRemoveSchool = (index2) => {
  31334. schoolList.value.splice(index2, 1);
  31335. };
  31336. const __returned__ = { schoolName, schoolList, getSchoolList, handleSubmit, handleAddSchool, handleRemoveSchool, ref: vue.ref };
  31337. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  31338. return __returned__;
  31339. }
  31340. };
  31341. function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
  31342. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  31343. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  31344. const _component_u_tag = resolveEasycom(vue.resolveDynamicComponent("u-tag"), __easycom_2$2);
  31345. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  31346. return vue.openBlock(), vue.createElementBlock("view", { class: "school-add" }, [
  31347. vue.createCommentVNode(" 输入区域 "),
  31348. vue.createElementVNode("view", { class: "input-section" }, [
  31349. vue.createElementVNode("view", { class: "input-header" }, [
  31350. vue.createElementVNode("text", { class: "required" }, "*"),
  31351. vue.createElementVNode("text", { class: "label" }, "学校名称:"),
  31352. vue.createVNode(_component_u_input, {
  31353. modelValue: $setup.schoolName,
  31354. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.schoolName = $event),
  31355. placeholder: "请输入一个学校名称",
  31356. border: "false",
  31357. class: "input"
  31358. }, {
  31359. suffix: vue.withCtx(() => [
  31360. vue.createVNode(_component_u_icon, {
  31361. name: "plus",
  31362. size: "24",
  31363. color: "#666",
  31364. onClick: $setup.handleAddSchool
  31365. })
  31366. ]),
  31367. _: 1
  31368. /* STABLE */
  31369. }, 8, ["modelValue"])
  31370. ])
  31371. ]),
  31372. vue.createCommentVNode(" 学校列表 "),
  31373. vue.createElementVNode("view", { class: "school-list" }, [
  31374. (vue.openBlock(true), vue.createElementBlock(
  31375. vue.Fragment,
  31376. null,
  31377. vue.renderList($setup.schoolList, (item, index2) => {
  31378. return vue.openBlock(), vue.createElementBlock("view", {
  31379. class: "school-item",
  31380. key: index2
  31381. }, [
  31382. vue.createVNode(_component_u_tag, {
  31383. text: item.schoolName,
  31384. closable: "",
  31385. size: "large"
  31386. }, null, 8, ["text"])
  31387. ]);
  31388. }),
  31389. 128
  31390. /* KEYED_FRAGMENT */
  31391. ))
  31392. ]),
  31393. vue.createCommentVNode(" 底部提交按钮 "),
  31394. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  31395. vue.createVNode(_component_u_button, {
  31396. size: "large",
  31397. type: "success",
  31398. block: "",
  31399. onClick: $setup.handleSubmit
  31400. }, {
  31401. default: vue.withCtx(() => [
  31402. vue.createTextVNode("提交")
  31403. ]),
  31404. _: 1
  31405. /* STABLE */
  31406. })
  31407. ])
  31408. ]);
  31409. }
  31410. const PagesMyPageSchool = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$e], ["__scopeId", "data-v-6d6c87ab"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/my/page/school.vue"]]);
  31411. const _sfc_main$e = {
  31412. __name: "audit-unfinished",
  31413. setup(__props, { expose: __expose }) {
  31414. __expose();
  31415. const list = vue.ref([]);
  31416. const updateList = (newList) => {
  31417. list.value = newList;
  31418. };
  31419. const __returned__ = { list, updateList, orderItem, pageScroll: PageScroll, ref: vue.ref };
  31420. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  31421. return __returned__;
  31422. }
  31423. };
  31424. function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
  31425. return vue.openBlock(), vue.createElementBlock("view", { class: "audit-list" }, [
  31426. vue.createVNode($setup["pageScroll"], {
  31427. requestStr: "/app/orderinfo/myNeedCheckOrder",
  31428. onUpdateList: $setup.updateList
  31429. }, {
  31430. default: vue.withCtx(() => [
  31431. (vue.openBlock(true), vue.createElementBlock(
  31432. vue.Fragment,
  31433. null,
  31434. vue.renderList($setup.list, (item, index2) => {
  31435. return vue.openBlock(), vue.createBlock($setup["orderItem"], {
  31436. key: index2,
  31437. item
  31438. }, null, 8, ["item"]);
  31439. }),
  31440. 128
  31441. /* KEYED_FRAGMENT */
  31442. ))
  31443. ]),
  31444. _: 1
  31445. /* STABLE */
  31446. })
  31447. ]);
  31448. }
  31449. const PagesMyPageAuditUnfinished = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$d], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/my/page/audit-unfinished.vue"]]);
  31450. const _sfc_main$d = {
  31451. __name: "version",
  31452. setup(__props, { expose: __expose }) {
  31453. __expose();
  31454. const userInfo = vue.reactive({
  31455. version: "v_2024050400_1",
  31456. // Example version number
  31457. updateStatus: "已经是新版本"
  31458. // Example update status
  31459. });
  31460. function checkForUpdates() {
  31461. setTimeout(() => {
  31462. {
  31463. userInfo.updateStatus = "发现新版本,正在下载...";
  31464. downloadNewVersion();
  31465. }
  31466. }, 1e3);
  31467. }
  31468. function downloadNewVersion() {
  31469. setTimeout(() => {
  31470. userInfo.updateStatus = "下载完成,准备安装";
  31471. }, 2e3);
  31472. }
  31473. const __returned__ = { userInfo, checkForUpdates, downloadNewVersion, reactive: vue.reactive };
  31474. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  31475. return __returned__;
  31476. }
  31477. };
  31478. function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
  31479. const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_1$6);
  31480. const _component_u_cell_group = resolveEasycom(vue.resolveDynamicComponent("u-cell-group"), __easycom_2$3);
  31481. return vue.openBlock(), vue.createElementBlock("view", { class: "version-info-page" }, [
  31482. vue.createVNode(_component_u_cell_group, {
  31483. border: false,
  31484. customStyle: "background:#ffffff"
  31485. }, {
  31486. default: vue.withCtx(() => [
  31487. vue.createVNode(_component_u_cell, {
  31488. title: "当前版本号(正式版)",
  31489. value: $setup.userInfo.version || "无"
  31490. }, null, 8, ["value"]),
  31491. vue.createVNode(_component_u_cell, {
  31492. title: "检测更新",
  31493. value: $setup.userInfo.updateStatus || "无",
  31494. border: false,
  31495. onClick: $setup.checkForUpdates
  31496. }, null, 8, ["value"])
  31497. ]),
  31498. _: 1
  31499. /* STABLE */
  31500. })
  31501. ]);
  31502. }
  31503. const PagesMyPageVersion = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$c], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/my/page/version.vue"]]);
  31504. const props$1 = {
  31505. props: {
  31506. // 是否为加载中状态
  31507. loading: {
  31508. type: Boolean,
  31509. default: props$G.switch.loading
  31510. },
  31511. // 是否为禁用装填
  31512. disabled: {
  31513. type: Boolean,
  31514. default: props$G.switch.disabled
  31515. },
  31516. // 开关尺寸,单位px
  31517. size: {
  31518. type: [String, Number],
  31519. default: props$G.switch.size
  31520. },
  31521. // 打开时的背景颜色
  31522. activeColor: {
  31523. type: String,
  31524. default: props$G.switch.activeColor
  31525. },
  31526. // 关闭时的背景颜色
  31527. inactiveColor: {
  31528. type: String,
  31529. default: props$G.switch.inactiveColor
  31530. },
  31531. // 通过v-model双向绑定的值
  31532. modelValue: {
  31533. type: [Boolean, String, Number],
  31534. default: props$G.switch.value
  31535. },
  31536. // switch打开时的值
  31537. activeValue: {
  31538. type: [String, Number, Boolean],
  31539. default: props$G.switch.activeValue
  31540. },
  31541. // switch关闭时的值
  31542. inactiveValue: {
  31543. type: [String, Number, Boolean],
  31544. default: props$G.switch.inactiveValue
  31545. },
  31546. // 是否开启异步变更,开启后需要手动控制输入值
  31547. asyncChange: {
  31548. type: Boolean,
  31549. default: props$G.switch.asyncChange
  31550. },
  31551. // 圆点与外边框的距离
  31552. space: {
  31553. type: [String, Number],
  31554. default: props$G.switch.space
  31555. }
  31556. }
  31557. };
  31558. const _sfc_main$c = {
  31559. name: "u-switch",
  31560. mixins: [mpMixin, mixin, props$1],
  31561. watch: {
  31562. modelValue: {
  31563. immediate: true,
  31564. handler(n) {
  31565. if (n !== this.inactiveValue && n !== this.activeValue) {
  31566. uni.$u.error("v-model绑定的值必须为inactiveValue、activeValue二者之一");
  31567. }
  31568. }
  31569. }
  31570. },
  31571. data() {
  31572. return {
  31573. bgColor: "#ffffff"
  31574. };
  31575. },
  31576. computed: {
  31577. isActive() {
  31578. return this.modelValue === this.activeValue;
  31579. },
  31580. switchStyle() {
  31581. let style = {};
  31582. style.width = uni.$u.addUnit(this.size * 2 + 2);
  31583. style.height = uni.$u.addUnit(Number(this.size) + 2);
  31584. if (this.customInactiveColor) {
  31585. style.borderColor = "rgba(0, 0, 0, 0)";
  31586. }
  31587. style.backgroundColor = this.isActive ? this.activeColor : this.inactiveColor;
  31588. return style;
  31589. },
  31590. nodeStyle() {
  31591. let style = {};
  31592. style.width = uni.$u.addUnit(this.size - this.space);
  31593. style.height = uni.$u.addUnit(this.size - this.space);
  31594. const translateX = this.isActive ? uni.$u.addUnit(this.space) : uni.$u.addUnit(this.size);
  31595. style.transform = `translateX(-${translateX})`;
  31596. return style;
  31597. },
  31598. bgStyle() {
  31599. let style = {};
  31600. style.width = uni.$u.addUnit(Number(this.size) * 2 - this.size / 2);
  31601. style.height = uni.$u.addUnit(this.size);
  31602. style.backgroundColor = this.inactiveColor;
  31603. style.transform = `scale(${this.isActive ? 0 : 1})`;
  31604. return style;
  31605. },
  31606. customInactiveColor() {
  31607. return this.inactiveColor !== "#fff" && this.inactiveColor !== "#ffffff";
  31608. }
  31609. },
  31610. emits: ["update:modelValue", "change"],
  31611. methods: {
  31612. clickHandler() {
  31613. if (!this.disabled && !this.loading) {
  31614. const oldValue = this.isActive ? this.inactiveValue : this.activeValue;
  31615. if (!this.asyncChange) {
  31616. this.$emit("update:modelValue", oldValue);
  31617. }
  31618. this.$nextTick(() => {
  31619. this.$emit("change", oldValue);
  31620. });
  31621. }
  31622. }
  31623. }
  31624. };
  31625. function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
  31626. const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$e);
  31627. return vue.openBlock(), vue.createElementBlock(
  31628. "view",
  31629. {
  31630. class: vue.normalizeClass(["u-switch", [_ctx.disabled && "u-switch--disabled"]]),
  31631. style: vue.normalizeStyle([$options.switchStyle, _ctx.$u.addStyle(_ctx.customStyle)]),
  31632. onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args))
  31633. },
  31634. [
  31635. vue.createElementVNode(
  31636. "view",
  31637. {
  31638. class: "u-switch__bg",
  31639. style: vue.normalizeStyle([$options.bgStyle])
  31640. },
  31641. null,
  31642. 4
  31643. /* STYLE */
  31644. ),
  31645. vue.createElementVNode(
  31646. "view",
  31647. {
  31648. class: vue.normalizeClass(["u-switch__node", [_ctx.modelValue && "u-switch__node--on"]]),
  31649. style: vue.normalizeStyle([$options.nodeStyle]),
  31650. ref: "u-switch__node"
  31651. },
  31652. [
  31653. vue.createVNode(_component_u_loading_icon, {
  31654. show: _ctx.loading,
  31655. mode: "circle",
  31656. timingFunction: "linear",
  31657. color: _ctx.modelValue ? _ctx.activeColor : "#AAABAD",
  31658. size: _ctx.size * 0.6
  31659. }, null, 8, ["show", "color", "size"])
  31660. ],
  31661. 6
  31662. /* CLASS, STYLE */
  31663. )
  31664. ],
  31665. 6
  31666. /* CLASS, STYLE */
  31667. );
  31668. }
  31669. const __easycom_0 = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$b], ["__scopeId", "data-v-6ab257b3"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-switch/u-switch.vue"]]);
  31670. const props = {
  31671. props: {
  31672. // 最小可选值
  31673. min: {
  31674. type: [Number, String],
  31675. default: props$G.slider.min
  31676. },
  31677. // 最大可选值
  31678. max: {
  31679. type: [Number, String],
  31680. default: props$G.slider.max
  31681. },
  31682. // 步长,取值必须大于 0,并且可被(max - min)整除
  31683. step: {
  31684. type: [Number, String],
  31685. default: props$G.slider.step
  31686. },
  31687. // 当前取值
  31688. value: {
  31689. type: [Number, String],
  31690. default: props$G.slider.value
  31691. },
  31692. // 滑块右侧已选择部分的背景色
  31693. activeColor: {
  31694. type: String,
  31695. default: props$G.slider.activeColor
  31696. },
  31697. // 滑块左侧未选择部分的背景色
  31698. inactiveColor: {
  31699. type: String,
  31700. default: props$G.slider.inactiveColor
  31701. },
  31702. // 滑块的大小,取值范围为 12 - 28
  31703. blockSize: {
  31704. type: [Number, String],
  31705. default: props$G.slider.blockSize
  31706. },
  31707. // 滑块的颜色
  31708. blockColor: {
  31709. type: String,
  31710. default: props$G.slider.blockColor
  31711. },
  31712. // 禁用状态
  31713. disabled: {
  31714. type: Boolean,
  31715. default: props$G.slider.disabled
  31716. },
  31717. // 是否显示当前的选择值
  31718. showValue: {
  31719. type: Boolean,
  31720. default: props$G.slider.showValue
  31721. }
  31722. }
  31723. };
  31724. const _sfc_main$b = {
  31725. name: "u--slider",
  31726. mixins: [mpMixin, mixin, props],
  31727. methods: {
  31728. // 拖动过程中触发
  31729. changingHandler(e) {
  31730. const {
  31731. value: value2
  31732. } = e.detail;
  31733. this.$emit("input", value2);
  31734. this.$emit("changing", value2);
  31735. },
  31736. // 滑动结束时触发
  31737. changeHandler(e) {
  31738. const {
  31739. value: value2
  31740. } = e.detail;
  31741. this.$emit("input", value2);
  31742. this.$emit("change", value2);
  31743. }
  31744. }
  31745. };
  31746. function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
  31747. return vue.openBlock(), vue.createElementBlock(
  31748. "view",
  31749. {
  31750. class: "u-slider",
  31751. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)])
  31752. },
  31753. [
  31754. vue.createElementVNode("slider", {
  31755. min: _ctx.min,
  31756. max: _ctx.max,
  31757. step: _ctx.step,
  31758. value: _ctx.value,
  31759. activeColor: _ctx.activeColor,
  31760. inactiveColor: _ctx.inactiveColor,
  31761. blockSize: _ctx.$u.getPx(_ctx.blockSize),
  31762. blockColor: _ctx.blockColor,
  31763. showValue: _ctx.showValue,
  31764. disabled: _ctx.disabled,
  31765. onChanging: _cache[0] || (_cache[0] = (...args) => $options.changingHandler && $options.changingHandler(...args)),
  31766. onChange: _cache[1] || (_cache[1] = (...args) => $options.changeHandler && $options.changeHandler(...args))
  31767. }, null, 40, ["min", "max", "step", "value", "activeColor", "inactiveColor", "blockSize", "blockColor", "showValue", "disabled"])
  31768. ],
  31769. 4
  31770. /* STYLE */
  31771. );
  31772. }
  31773. const __easycom_4 = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$a], ["__scopeId", "data-v-7b84e269"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-slider/u-slider.vue"]]);
  31774. const _VolumeTTS = class _VolumeTTS {
  31775. constructor(opts = {}) {
  31776. this.ttsParams = this._initializeParams(opts);
  31777. this.TTSModule = null;
  31778. this.customOpts = null;
  31779. this.platform = uni.getSystemInfoSync().platform;
  31780. this.isInitialized = false;
  31781. this.isSpeaking = false;
  31782. this._initTTS();
  31783. }
  31784. /**
  31785. * 初始化TTS参数
  31786. * @private
  31787. */
  31788. _initializeParams(opts) {
  31789. const audioConfig = uni.getStorageSync("audioConfig");
  31790. if (opts && Object.keys(opts).length > 0) {
  31791. return { ..._VolumeTTS.DEFAULT_PARAMS, ...opts };
  31792. }
  31793. if (audioConfig) {
  31794. return {
  31795. lang: "zh-CN",
  31796. speed: Math.max(0.1, Math.min(2, audioConfig.audioSpeed / 10)),
  31797. pitch: Math.max(0.1, Math.min(2, audioConfig.audioVolume)),
  31798. volume: 1
  31799. };
  31800. }
  31801. return { ..._VolumeTTS.DEFAULT_PARAMS };
  31802. }
  31803. /**
  31804. * 初始化TTS模块
  31805. * @private
  31806. */
  31807. _initTTS() {
  31808. try {
  31809. this.TTSModule = requireNativePlugin("nrb-tts-plugin");
  31810. if (!this.TTSModule) {
  31811. formatAppLog("warn", "at utils/VolumeTTS.js:61", "TTS模块加载失败");
  31812. return;
  31813. }
  31814. this.TTSModule.init(
  31815. {
  31816. lang: "zh",
  31817. country: "CN"
  31818. },
  31819. (res) => {
  31820. if (res.success === 0) {
  31821. this.isInitialized = true;
  31822. formatAppLog("log", "at utils/VolumeTTS.js:73", "TTS初始化成功");
  31823. } else {
  31824. formatAppLog("error", "at utils/VolumeTTS.js:76", "TTS初始化失败:", res);
  31825. }
  31826. }
  31827. );
  31828. } catch (error2) {
  31829. formatAppLog("error", "at utils/VolumeTTS.js:81", "TTS模块初始化异常:", error2);
  31830. }
  31831. }
  31832. /**
  31833. * 预处理文本,将数字转换为中文
  31834. * @param {string} text - 待处理的文本
  31835. * @returns {string} 处理后的文本
  31836. */
  31837. preprocessText(text) {
  31838. if (!text || typeof text !== "string") {
  31839. return "";
  31840. }
  31841. return text.replace(/\d+/g, (match) => {
  31842. return match.split("").map((digit) => _VolumeTTS.DIGIT_MAP[digit] || digit).join("");
  31843. });
  31844. }
  31845. /**
  31846. * 设置自定义的opts参数
  31847. * @param {Object} opts - 自定义的opts参数
  31848. */
  31849. setCustomOpts(opts) {
  31850. if (opts && typeof opts === "object") {
  31851. this.customOpts = { ...opts };
  31852. }
  31853. }
  31854. /**
  31855. * 获取当前的自定义opts参数
  31856. * @returns {Object|null} 当前的自定义opts参数
  31857. */
  31858. getCustomOpts() {
  31859. return this.customOpts ? { ...this.customOpts } : null;
  31860. }
  31861. /**
  31862. * 清除自定义的opts参数,恢复默认行为
  31863. */
  31864. clearCustomOpts() {
  31865. this.customOpts = null;
  31866. }
  31867. /**
  31868. * 获取平台特定的TTS选项
  31869. * @private
  31870. */
  31871. _getPlatformOpts() {
  31872. if (this.platform === "ios") {
  31873. return {
  31874. rate: this.ttsParams.speed,
  31875. lang: "zh-CN",
  31876. volume: this.ttsParams.volume
  31877. };
  31878. } else {
  31879. return {
  31880. pitch: this.ttsParams.pitch,
  31881. speechRate: this.ttsParams.speed,
  31882. queueMode: 1
  31883. };
  31884. }
  31885. }
  31886. /**
  31887. * 语音合成
  31888. * @param {string} text - 要合成的文本
  31889. * @param {Object} customOpts - 自定义选项
  31890. * @returns {Promise<boolean>} 是否成功开始合成
  31891. */
  31892. async speak(text, customOpts = null) {
  31893. if (!text || typeof text !== "string") {
  31894. formatAppLog("warn", "at utils/VolumeTTS.js:156", "TTS: 无效的文本输入");
  31895. return false;
  31896. }
  31897. if (this.isSpeaking) {
  31898. formatAppLog("log", "at utils/VolumeTTS.js:161", "TTS: 正在播放中,停止当前播放");
  31899. this.stop();
  31900. }
  31901. const processedText = this.preprocessText(text);
  31902. formatAppLog("log", "at utils/VolumeTTS.js:166", "TTS: 开始合成文本:", processedText);
  31903. return this._speakApp(processedText, customOpts);
  31904. }
  31905. /**
  31906. * H5端语音合成
  31907. * @private
  31908. */
  31909. _speakH5(text) {
  31910. if ("speechSynthesis" in window) {
  31911. try {
  31912. const utterance = new SpeechSynthesisUtterance(text);
  31913. utterance.lang = this.ttsParams.lang;
  31914. utterance.rate = this.ttsParams.speed;
  31915. utterance.pitch = this.ttsParams.pitch;
  31916. utterance.volume = this.ttsParams.volume;
  31917. utterance.onstart = () => {
  31918. this.isSpeaking = true;
  31919. formatAppLog("log", "at utils/VolumeTTS.js:194", "TTS: H5开始播放");
  31920. };
  31921. utterance.onend = () => {
  31922. this.isSpeaking = false;
  31923. formatAppLog("log", "at utils/VolumeTTS.js:199", "TTS: H5播放完成");
  31924. };
  31925. utterance.onerror = (error2) => {
  31926. this.isSpeaking = false;
  31927. formatAppLog("error", "at utils/VolumeTTS.js:204", "TTS: H5播放错误:", error2);
  31928. };
  31929. speechSynthesis.speak(utterance);
  31930. return true;
  31931. } catch (error2) {
  31932. formatAppLog("error", "at utils/VolumeTTS.js:210", "TTS: H5播放异常:", error2);
  31933. return false;
  31934. }
  31935. }
  31936. return false;
  31937. }
  31938. /**
  31939. * APP端语音合成
  31940. * @private
  31941. */
  31942. _speakApp(text, customOpts) {
  31943. if (!this.TTSModule || Object.keys(this.TTSModule).length === 0) {
  31944. formatAppLog("log", "at utils/VolumeTTS.js:223", "TTS: 重新初始化模块");
  31945. this._initTTS();
  31946. return false;
  31947. }
  31948. try {
  31949. let opts;
  31950. if (customOpts && typeof customOpts === "object") {
  31951. opts = customOpts;
  31952. } else if (this.customOpts) {
  31953. opts = this.customOpts;
  31954. } else {
  31955. opts = this._getPlatformOpts();
  31956. }
  31957. this.TTSModule.speak(text, opts, (result) => {
  31958. if (result && result.success === 0) {
  31959. this.isSpeaking = true;
  31960. formatAppLog("log", "at utils/VolumeTTS.js:243", "TTS: APP开始播放");
  31961. } else {
  31962. formatAppLog("error", "at utils/VolumeTTS.js:245", "TTS: APP播放失败:", result);
  31963. }
  31964. });
  31965. return true;
  31966. } catch (error2) {
  31967. formatAppLog("error", "at utils/VolumeTTS.js:251", "TTS: APP播放异常:", error2);
  31968. return false;
  31969. }
  31970. }
  31971. /**
  31972. * 停止语音合成
  31973. */
  31974. stop() {
  31975. this.isSpeaking = false;
  31976. if (this.TTSModule && typeof this.TTSModule.stop === "function") {
  31977. try {
  31978. this.TTSModule.stop();
  31979. } catch (error2) {
  31980. formatAppLog("error", "at utils/VolumeTTS.js:273", "TTS: 停止播放异常:", error2);
  31981. }
  31982. }
  31983. formatAppLog("log", "at utils/VolumeTTS.js:278", "TTS: 已停止播放");
  31984. }
  31985. /**
  31986. * 暂停语音合成
  31987. */
  31988. pause() {
  31989. formatAppLog("log", "at utils/VolumeTTS.js:291", "TTS: 已暂停播放");
  31990. }
  31991. /**
  31992. * 恢复语音合成
  31993. */
  31994. resume() {
  31995. formatAppLog("log", "at utils/VolumeTTS.js:304", "TTS: 已恢复播放");
  31996. }
  31997. /**
  31998. * 检查是否正在播放
  31999. * @returns {boolean} 是否正在播放
  32000. */
  32001. isPlaying() {
  32002. return this.isSpeaking;
  32003. }
  32004. /**
  32005. * 检查TTS是否已初始化
  32006. * @returns {boolean} 是否已初始化
  32007. */
  32008. isReady() {
  32009. return this.isInitialized;
  32010. }
  32011. /**
  32012. * 销毁TTS实例
  32013. */
  32014. destroy() {
  32015. this.stop();
  32016. this.isInitialized = false;
  32017. this.TTSModule = null;
  32018. this.customOpts = null;
  32019. this.ttsParams = { ..._VolumeTTS.DEFAULT_PARAMS };
  32020. formatAppLog("log", "at utils/VolumeTTS.js:332", "TTS: 实例已销毁");
  32021. }
  32022. /**
  32023. * 更新TTS参数
  32024. * @param {Object} newParams - 新的参数
  32025. */
  32026. updateParams(newParams) {
  32027. if (newParams && typeof newParams === "object") {
  32028. this.ttsParams = { ...this.ttsParams, ...newParams };
  32029. formatAppLog("log", "at utils/VolumeTTS.js:342", "TTS: 参数已更新:", this.ttsParams);
  32030. }
  32031. }
  32032. /**
  32033. * 获取当前TTS参数
  32034. * @returns {Object} 当前TTS参数
  32035. */
  32036. getParams() {
  32037. return { ...this.ttsParams };
  32038. }
  32039. };
  32040. // 默认TTS参数
  32041. __publicField(_VolumeTTS, "DEFAULT_PARAMS", {
  32042. lang: "zh-CN",
  32043. speed: 1,
  32044. pitch: 1,
  32045. volume: 1
  32046. });
  32047. // 数字到中文的映射
  32048. __publicField(_VolumeTTS, "DIGIT_MAP", {
  32049. 0: "零",
  32050. 1: "一",
  32051. 2: "二",
  32052. 3: "三",
  32053. 4: "四",
  32054. 5: "五",
  32055. 6: "六",
  32056. 7: "七",
  32057. 8: "八",
  32058. 9: "九"
  32059. });
  32060. let VolumeTTS = _VolumeTTS;
  32061. const _sfc_main$a = {
  32062. __name: "volume",
  32063. setup(__props, { expose: __expose }) {
  32064. __expose();
  32065. const settings = vue.ref({
  32066. audioStartSwitch: true,
  32067. audioStart: "书嗨,不辜负每一个爱书的人",
  32068. audioSpeed: 10,
  32069. audioVolume: 5,
  32070. audioPlay: false,
  32071. audioClick: false
  32072. });
  32073. function changeSpeed(value2) {
  32074. settings.value.audioSpeed = value2;
  32075. }
  32076. function changeVolume(value2) {
  32077. settings.value.audioVolume = value2;
  32078. }
  32079. const getVoiceBroadcast = () => {
  32080. uni.$u.http.get("/app/appConf/getAudioConfig").then((res) => {
  32081. if (res.code == 200) {
  32082. settings.value = res.data;
  32083. }
  32084. });
  32085. };
  32086. getVoiceBroadcast();
  32087. const saveVoiceBroadcast = () => {
  32088. uni.$u.http.post("/app/appConf/setAudioConfig", settings.value).then((res) => {
  32089. if (res.code == 200) {
  32090. uni.showToast({
  32091. title: "设置成功",
  32092. icon: "success"
  32093. });
  32094. initTTS();
  32095. let params = {
  32096. speed: settings.value.audioSpeed / 10,
  32097. // 将 0-10 转换为 0-1
  32098. pitch: settings.value.audioVolume,
  32099. // 将 0-10 转换为 0-1
  32100. volume: 1
  32101. };
  32102. uni.$u.ttsModule.setCustomOpts(params);
  32103. }
  32104. });
  32105. };
  32106. const tts = vue.ref(null);
  32107. const initTTS = () => {
  32108. let params = {
  32109. speed: settings.value.audioSpeed / 10,
  32110. // 将 0-10 转换为 0-1
  32111. pitch: settings.value.audioVolume,
  32112. // 将 0-10 转换为 0-1
  32113. volume: 1
  32114. };
  32115. tts.value = new VolumeTTS(params);
  32116. settings.value.audioStartSwitch && tts.value.speak(settings.value.audioStart);
  32117. };
  32118. function stopPlayback() {
  32119. tts.value && tts.value.stop();
  32120. uni.showToast({
  32121. title: "已停止播放",
  32122. icon: "none"
  32123. });
  32124. }
  32125. function restartApp() {
  32126. uni.showModal({
  32127. title: "提示",
  32128. content: "确定要重启应用吗?",
  32129. success: function(res) {
  32130. if (res.confirm) {
  32131. plus.runtime.restart();
  32132. }
  32133. }
  32134. });
  32135. }
  32136. function loadSettings() {
  32137. try {
  32138. const savedSettings = uni.getStorageSync("tts_settings");
  32139. if (savedSettings) {
  32140. Object.assign(settings, savedSettings);
  32141. }
  32142. } catch (error2) {
  32143. formatAppLog("error", "at pages/my/page/volume.vue:211", "加载设置失败:", error2);
  32144. }
  32145. }
  32146. function playClickSound2() {
  32147. if (!settings.audioClick)
  32148. return;
  32149. const audio = uni.createInnerAudioContext();
  32150. audio.src = "/static/audio/click.mp3";
  32151. audio.play();
  32152. }
  32153. vue.onMounted(async () => {
  32154. loadSettings();
  32155. });
  32156. vue.onUnmounted(() => {
  32157. var _a, _b;
  32158. if (tts.value) {
  32159. (_b = (_a = tts.value).destroy) == null ? void 0 : _b.call(_a);
  32160. }
  32161. });
  32162. const __returned__ = { settings, changeSpeed, changeVolume, getVoiceBroadcast, saveVoiceBroadcast, tts, initTTS, stopPlayback, restartApp, loadSettings, playClickSound: playClickSound2, ref: vue.ref, reactive: vue.reactive, onMounted: vue.onMounted, onUnmounted: vue.onUnmounted, get VolumeTTS() {
  32163. return VolumeTTS;
  32164. } };
  32165. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  32166. return __returned__;
  32167. }
  32168. };
  32169. function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
  32170. const _component_u_switch = resolveEasycom(vue.resolveDynamicComponent("u-switch"), __easycom_0);
  32171. const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_1$6);
  32172. const _component_u_cell_group = resolveEasycom(vue.resolveDynamicComponent("u-cell-group"), __easycom_2$3);
  32173. const _component_u_textarea = resolveEasycom(vue.resolveDynamicComponent("u-textarea"), __easycom_3$3);
  32174. const _component_u_slider = resolveEasycom(vue.resolveDynamicComponent("u-slider"), __easycom_4);
  32175. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  32176. return vue.openBlock(), vue.createElementBlock("view", { class: "settings-container" }, [
  32177. vue.createCommentVNode(" 设置选项组 "),
  32178. vue.createElementVNode("view", { class: "settings-section" }, [
  32179. vue.createVNode(_component_u_cell_group, { border: false }, {
  32180. default: vue.withCtx(() => [
  32181. vue.createCommentVNode(" 语音播报设置 "),
  32182. vue.createVNode(_component_u_cell, {
  32183. title: "语音播报",
  32184. label: "控制除app启动提示外所有语音播报的开关",
  32185. "border-bottom": true
  32186. }, {
  32187. "right-icon": vue.withCtx(() => [
  32188. vue.createVNode(_component_u_switch, {
  32189. modelValue: $setup.settings.audioPlay,
  32190. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.settings.audioPlay = $event),
  32191. activeColor: "#4cd964"
  32192. }, null, 8, ["modelValue"])
  32193. ]),
  32194. _: 1
  32195. /* STABLE */
  32196. }),
  32197. vue.createCommentVNode(" 点击音效设置 "),
  32198. vue.createVNode(_component_u_cell, {
  32199. title: "点击音效",
  32200. "border-bottom": true
  32201. }, {
  32202. "right-icon": vue.withCtx(() => [
  32203. vue.createVNode(_component_u_switch, {
  32204. modelValue: $setup.settings.audioClick,
  32205. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.settings.audioClick = $event),
  32206. activeColor: "#4cd964"
  32207. }, null, 8, ["modelValue"])
  32208. ]),
  32209. _: 1
  32210. /* STABLE */
  32211. }),
  32212. vue.createCommentVNode(" 启动提示语设置 "),
  32213. vue.createVNode(_component_u_cell, {
  32214. title: "启动提示语",
  32215. "border-bottom": true
  32216. }, {
  32217. "right-icon": vue.withCtx(() => [
  32218. vue.createVNode(_component_u_switch, {
  32219. modelValue: $setup.settings.audioStartSwitch,
  32220. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.settings.audioStartSwitch = $event),
  32221. activeColor: "#4cd964"
  32222. }, null, 8, ["modelValue"])
  32223. ]),
  32224. _: 1
  32225. /* STABLE */
  32226. })
  32227. ]),
  32228. _: 1
  32229. /* STABLE */
  32230. }),
  32231. vue.createCommentVNode(" 启动提示语输入框 "),
  32232. vue.createElementVNode("view", { class: "input-section" }, [
  32233. vue.createVNode(_component_u_textarea, {
  32234. modelValue: $setup.settings.audioStart,
  32235. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.settings.audioStart = $event),
  32236. placeholder: "输入启动时要说的内容,比如:欢迎使用书嗨/很开心又见到你啦",
  32237. height: "100"
  32238. }, null, 8, ["modelValue"])
  32239. ]),
  32240. vue.createCommentVNode(" 语速设置 "),
  32241. vue.createElementVNode("view", { class: "slider-section" }, [
  32242. vue.createElementVNode("view", { class: "slider-title" }, [
  32243. vue.createElementVNode("text", null, "设置语速"),
  32244. vue.createElementVNode("text", { class: "subtitle" }, "(部分机型不支持)")
  32245. ]),
  32246. vue.createVNode(_component_u_slider, {
  32247. value: $setup.settings.audioSpeed,
  32248. max: 20,
  32249. min: 5,
  32250. step: 1,
  32251. showValue: "",
  32252. onChange: $setup.changeSpeed
  32253. }, null, 8, ["value"])
  32254. ]),
  32255. vue.createCommentVNode(" 音调设置 "),
  32256. vue.createElementVNode("view", { class: "slider-section" }, [
  32257. vue.createElementVNode("view", { class: "slider-title" }, [
  32258. vue.createElementVNode("text", null, "设置音调"),
  32259. vue.createElementVNode("text", { class: "subtitle" }, "(部分机型不支持)")
  32260. ]),
  32261. vue.createVNode(_component_u_slider, {
  32262. value: $setup.settings.audioVolume,
  32263. max: 10,
  32264. min: 1,
  32265. step: 1,
  32266. showValue: "",
  32267. onChange: $setup.changeVolume
  32268. }, null, 8, ["value"])
  32269. ]),
  32270. vue.createCommentVNode(" 操作按钮 "),
  32271. vue.createElementVNode("view", { class: "button-group" }, [
  32272. vue.createVNode(_component_u_button, {
  32273. type: "primary",
  32274. text: "保存设置并试听",
  32275. onClick: $setup.saveVoiceBroadcast
  32276. }),
  32277. vue.createVNode(_component_u_button, {
  32278. type: "warning",
  32279. text: "停止播放",
  32280. onClick: $setup.stopPlayback,
  32281. plain: true
  32282. }),
  32283. vue.createVNode(_component_u_button, {
  32284. type: "error",
  32285. text: "重启app",
  32286. onClick: $setup.restartApp,
  32287. plain: true
  32288. })
  32289. ])
  32290. ])
  32291. ]);
  32292. }
  32293. const PagesMyPageVolume = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$9], ["__scopeId", "data-v-983b50b6"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/my/page/volume.vue"]]);
  32294. const _sfc_main$9 = {
  32295. __name: "book-display",
  32296. setup(__props, { expose: __expose }) {
  32297. __expose();
  32298. const settings = vue.reactive({
  32299. showRecyclePrice: false,
  32300. showRecycleStatus: false,
  32301. showStock: false,
  32302. showDetail: false
  32303. });
  32304. function loadSettings() {
  32305. uni.$u.http.get("/app/appConf/getBookShowConfig").then((res) => {
  32306. if (res.code == 200) {
  32307. Object.assign(settings, res.data);
  32308. }
  32309. });
  32310. }
  32311. function saveSettings() {
  32312. uni.$u.http.post("/app/appConf/setBookShowConfig", settings).then((res) => {
  32313. if (res.code == 200) {
  32314. uni.showToast({
  32315. title: "设置已保存",
  32316. icon: "success"
  32317. });
  32318. } else {
  32319. uni.showToast({
  32320. title: "保存设置失败",
  32321. icon: "error"
  32322. });
  32323. }
  32324. });
  32325. }
  32326. vue.onMounted(() => {
  32327. loadSettings();
  32328. });
  32329. const __returned__ = { settings, loadSettings, saveSettings, reactive: vue.reactive, onMounted: vue.onMounted };
  32330. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  32331. return __returned__;
  32332. }
  32333. };
  32334. function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
  32335. const _component_u_switch = resolveEasycom(vue.resolveDynamicComponent("u-switch"), __easycom_0);
  32336. const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_1$6);
  32337. const _component_u_cell_group = resolveEasycom(vue.resolveDynamicComponent("u-cell-group"), __easycom_2$3);
  32338. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  32339. return vue.openBlock(), vue.createElementBlock("view", { class: "settings-container" }, [
  32340. vue.createCommentVNode(" 设置列表 "),
  32341. vue.createVNode(_component_u_cell_group, {
  32342. border: false,
  32343. class: "settings-group"
  32344. }, {
  32345. default: vue.withCtx(() => [
  32346. vue.createVNode(_component_u_cell, {
  32347. title: "是否展示回收价",
  32348. "border-bottom": true
  32349. }, {
  32350. "right-icon": vue.withCtx(() => [
  32351. vue.createVNode(_component_u_switch, {
  32352. modelValue: $setup.settings.showRecyclePrice,
  32353. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.settings.showRecyclePrice = $event),
  32354. activeColor: "#4cd964"
  32355. }, null, 8, ["modelValue"])
  32356. ]),
  32357. _: 1
  32358. /* STABLE */
  32359. }),
  32360. vue.createVNode(_component_u_cell, {
  32361. title: "是否展示回收状态",
  32362. "border-bottom": true
  32363. }, {
  32364. "right-icon": vue.withCtx(() => [
  32365. vue.createVNode(_component_u_switch, {
  32366. modelValue: $setup.settings.showRecycleStatus,
  32367. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.settings.showRecycleStatus = $event),
  32368. activeColor: "#4cd964"
  32369. }, null, 8, ["modelValue"])
  32370. ]),
  32371. _: 1
  32372. /* STABLE */
  32373. }),
  32374. vue.createVNode(_component_u_cell, {
  32375. title: "是否展示库存信息",
  32376. "border-bottom": true
  32377. }, {
  32378. "right-icon": vue.withCtx(() => [
  32379. vue.createVNode(_component_u_switch, {
  32380. modelValue: $setup.settings.showStock,
  32381. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.settings.showStock = $event),
  32382. activeColor: "#4cd964"
  32383. }, null, 8, ["modelValue"])
  32384. ]),
  32385. _: 1
  32386. /* STABLE */
  32387. }),
  32388. vue.createVNode(_component_u_cell, {
  32389. title: "是否默认展开商品详情",
  32390. "border-bottom": false
  32391. }, {
  32392. "right-icon": vue.withCtx(() => [
  32393. vue.createVNode(_component_u_switch, {
  32394. modelValue: $setup.settings.showDetail,
  32395. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.settings.showDetail = $event),
  32396. activeColor: "#4cd964"
  32397. }, null, 8, ["modelValue"])
  32398. ]),
  32399. _: 1
  32400. /* STABLE */
  32401. })
  32402. ]),
  32403. _: 1
  32404. /* STABLE */
  32405. }),
  32406. vue.createVNode(_component_u_button, {
  32407. class: "mt-40",
  32408. type: "primary",
  32409. onClick: $setup.saveSettings
  32410. }, {
  32411. default: vue.withCtx(() => [
  32412. vue.createTextVNode("保存")
  32413. ]),
  32414. _: 1
  32415. /* STABLE */
  32416. })
  32417. ]);
  32418. }
  32419. const PagesMyPageBookDisplay = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$8], ["__scopeId", "data-v-30e61b0d"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/my/page/book-display.vue"]]);
  32420. const _sfc_main$8 = {
  32421. __name: "password",
  32422. setup(__props, { expose: __expose }) {
  32423. __expose();
  32424. const formRef = vue.ref(null);
  32425. const loading = vue.ref(false);
  32426. const showPassword = vue.reactive({
  32427. old: false,
  32428. new: false,
  32429. confirm: false
  32430. });
  32431. const formData = vue.reactive({
  32432. oldPassword: "",
  32433. newPassword: "",
  32434. confirmPassword: ""
  32435. });
  32436. const rules2 = {
  32437. oldPassword: [{
  32438. required: true,
  32439. message: "请输入原密码",
  32440. trigger: ["blur", "change"]
  32441. }, {
  32442. min: 6,
  32443. message: "密码长度不能小于6位",
  32444. trigger: ["blur", "change"]
  32445. }],
  32446. newPassword: [{
  32447. required: true,
  32448. message: "请输入新密码",
  32449. trigger: ["blur", "change"]
  32450. }, {
  32451. min: 6,
  32452. message: "密码长度不能小于6位",
  32453. trigger: ["blur", "change"]
  32454. }, {
  32455. validator: (rule, value2, callback) => {
  32456. if (value2 === formData.oldPassword) {
  32457. callback(new Error("新密码不能与原密码相同"));
  32458. } else {
  32459. callback();
  32460. }
  32461. },
  32462. trigger: ["blur", "change"]
  32463. }],
  32464. confirmPassword: [{
  32465. required: true,
  32466. message: "请再次输入新密码",
  32467. trigger: ["blur", "change"]
  32468. }, {
  32469. validator: (rule, value2, callback) => {
  32470. if (value2 !== formData.newPassword) {
  32471. callback(new Error("两次输入的密码不一致"));
  32472. } else {
  32473. callback();
  32474. }
  32475. },
  32476. trigger: ["blur", "change"]
  32477. }]
  32478. };
  32479. function submitForm() {
  32480. if (!formRef.value)
  32481. return;
  32482. formRef.value.validate().then((valid) => {
  32483. if (valid) {
  32484. loading.value = true;
  32485. uni.$u.http.post("/app/appUser/updatePwd", formData).then((res) => {
  32486. if (res.code == 200) {
  32487. uni.showModal({
  32488. title: "提示",
  32489. content: "密码修改成功,是否确定要退出重新登录?",
  32490. success: (res2) => {
  32491. if (res2.confirm) {
  32492. uni.clearStorageSync();
  32493. uni.reLaunch({
  32494. url: "/pages/login/login"
  32495. });
  32496. } else {
  32497. uni.navigateBack({
  32498. delta: 1
  32499. });
  32500. }
  32501. }
  32502. });
  32503. }
  32504. }).finally(() => {
  32505. loading.value = false;
  32506. });
  32507. }
  32508. });
  32509. }
  32510. function resetForm() {
  32511. if (!formRef.value)
  32512. return;
  32513. formRef.value.resetFields();
  32514. }
  32515. const __returned__ = { formRef, loading, showPassword, formData, rules: rules2, submitForm, resetForm, ref: vue.ref, reactive: vue.reactive };
  32516. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  32517. return __returned__;
  32518. }
  32519. };
  32520. function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
  32521. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  32522. const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_1$a);
  32523. const _component_u_form = resolveEasycom(vue.resolveDynamicComponent("u-form"), __easycom_2$5);
  32524. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  32525. return vue.openBlock(), vue.createElementBlock("view", { class: "password-container" }, [
  32526. vue.createVNode(_component_u_form, {
  32527. model: $setup.formData,
  32528. rules: $setup.rules,
  32529. ref: "formRef",
  32530. labelPosition: "top",
  32531. borderBottom: true,
  32532. labelWidth: "300px",
  32533. "error-type": "toast"
  32534. }, {
  32535. default: vue.withCtx(() => [
  32536. vue.createVNode(_component_u_form_item, {
  32537. label: "原密码",
  32538. prop: "oldPassword",
  32539. borderBottom: ""
  32540. }, {
  32541. default: vue.withCtx(() => [
  32542. vue.createVNode(_component_u_input, {
  32543. modelValue: $setup.formData.oldPassword,
  32544. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.formData.oldPassword = $event),
  32545. type: "password",
  32546. placeholder: "请输入原密码",
  32547. border: false
  32548. }, null, 8, ["modelValue"])
  32549. ]),
  32550. _: 1
  32551. /* STABLE */
  32552. }),
  32553. vue.createVNode(_component_u_form_item, {
  32554. label: "新密码",
  32555. prop: "newPassword",
  32556. borderBottom: ""
  32557. }, {
  32558. default: vue.withCtx(() => [
  32559. vue.createVNode(_component_u_input, {
  32560. modelValue: $setup.formData.newPassword,
  32561. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.formData.newPassword = $event),
  32562. type: "password",
  32563. placeholder: "请输入新密码",
  32564. border: false
  32565. }, null, 8, ["modelValue"])
  32566. ]),
  32567. _: 1
  32568. /* STABLE */
  32569. }),
  32570. vue.createVNode(_component_u_form_item, {
  32571. label: "确认新密码",
  32572. prop: "confirmPassword",
  32573. borderBottom: ""
  32574. }, {
  32575. default: vue.withCtx(() => [
  32576. vue.createVNode(_component_u_input, {
  32577. modelValue: $setup.formData.confirmPassword,
  32578. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.formData.confirmPassword = $event),
  32579. type: "password",
  32580. placeholder: "请再次输入新密码",
  32581. border: false
  32582. }, null, 8, ["modelValue"])
  32583. ]),
  32584. _: 1
  32585. /* STABLE */
  32586. })
  32587. ]),
  32588. _: 1
  32589. /* STABLE */
  32590. }, 8, ["model"]),
  32591. vue.createElementVNode("view", { class: "submit-btn" }, [
  32592. vue.createVNode(_component_u_button, {
  32593. type: "primary",
  32594. text: "修改密码",
  32595. onClick: $setup.submitForm,
  32596. loading: $setup.loading
  32597. }, null, 8, ["loading"])
  32598. ])
  32599. ]);
  32600. }
  32601. const PagesMyPagePassword = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$7], ["__scopeId", "data-v-b88a898e"], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/my/page/password.vue"]]);
  32602. const _sfc_main$7 = {};
  32603. function _sfc_render$6(_ctx, _cache) {
  32604. return vue.openBlock(), vue.createElementBlock("view");
  32605. }
  32606. const PagesOrderStatPendingReview = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$6], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/order/stat/pending-review.vue"]]);
  32607. const _sfc_main$6 = {};
  32608. function _sfc_render$5(_ctx, _cache) {
  32609. return vue.openBlock(), vue.createElementBlock("view");
  32610. }
  32611. const PagesOrderStatPendingPick = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$5], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/order/stat/pending-pick.vue"]]);
  32612. const _sfc_main$5 = {};
  32613. function _sfc_render$4(_ctx, _cache) {
  32614. return vue.openBlock(), vue.createElementBlock("view");
  32615. }
  32616. const PagesOrderStatPendingSign = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$4], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/order/stat/pending-sign.vue"]]);
  32617. const _sfc_main$4 = {};
  32618. function _sfc_render$3(_ctx, _cache) {
  32619. return vue.openBlock(), vue.createElementBlock("view");
  32620. }
  32621. const PagesOrderStatPendingConfirm = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$3], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/order/stat/pending-confirm.vue"]]);
  32622. const _sfc_main$3 = {};
  32623. function _sfc_render$2(_ctx, _cache) {
  32624. return vue.openBlock(), vue.createElementBlock("view");
  32625. }
  32626. const PagesOrderStatPendingAudit = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$2], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/order/stat/pending-audit.vue"]]);
  32627. const _sfc_main$2 = {};
  32628. function _sfc_render$1(_ctx, _cache) {
  32629. return vue.openBlock(), vue.createElementBlock("view");
  32630. }
  32631. const PagesOrderStatPendingPayment = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$1], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/order/stat/pending-payment.vue"]]);
  32632. const _sfc_main$1 = {
  32633. __name: "receive-stat",
  32634. setup(__props, { expose: __expose }) {
  32635. __expose();
  32636. const scrollRef = vue.ref(null);
  32637. const refreshList = () => {
  32638. var _a;
  32639. (_a = scrollRef.value) == null ? void 0 : _a.resetUpScroll();
  32640. };
  32641. let dataList = vue.ref([]);
  32642. const updateList = (data) => {
  32643. dataList.value = data || [];
  32644. };
  32645. const __returned__ = { scrollRef, refreshList, get dataList() {
  32646. return dataList;
  32647. }, set dataList(v) {
  32648. dataList = v;
  32649. }, updateList, PageScroll, ref: vue.ref };
  32650. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  32651. return __returned__;
  32652. }
  32653. };
  32654. function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  32655. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_0$7);
  32656. return vue.openBlock(), vue.createElementBlock("view", {
  32657. class: "common-page",
  32658. style: { "padding": "0" }
  32659. }, [
  32660. vue.createVNode(
  32661. $setup["PageScroll"],
  32662. {
  32663. requestStr: "/app/stock/godownSignStat",
  32664. onUpdateList: $setup.updateList,
  32665. ref: "scrollRef"
  32666. },
  32667. {
  32668. default: vue.withCtx(() => [
  32669. vue.createVNode(_component_u_sticky, { customNavHeight: 0 }, {
  32670. default: vue.withCtx(() => [
  32671. vue.createElementVNode("view", { class: "search-area flex-a" }, [
  32672. vue.createElementVNode("view", { class: "text-item flex-1" }, "月份"),
  32673. vue.createElementVNode("view", { class: "text-item flex-1" }, "收货单量"),
  32674. vue.createElementVNode("view", { class: "text-item flex-1" }, "收货仓库")
  32675. ])
  32676. ]),
  32677. _: 1
  32678. /* STABLE */
  32679. }),
  32680. vue.createElementVNode("view", { class: "list-con" }, [
  32681. (vue.openBlock(true), vue.createElementBlock(
  32682. vue.Fragment,
  32683. null,
  32684. vue.renderList($setup.dataList, (item, index2) => {
  32685. return vue.openBlock(), vue.createElementBlock("view", {
  32686. key: index2,
  32687. class: "flex-a"
  32688. }, [
  32689. vue.createElementVNode(
  32690. "view",
  32691. { class: "text-item flex-1" },
  32692. vue.toDisplayString(item.statDate),
  32693. 1
  32694. /* TEXT */
  32695. ),
  32696. vue.createElementVNode(
  32697. "view",
  32698. { class: "text-item flex-1" },
  32699. vue.toDisplayString(item.num),
  32700. 1
  32701. /* TEXT */
  32702. ),
  32703. vue.createElementVNode(
  32704. "view",
  32705. { class: "text-item flex-1" },
  32706. vue.toDisplayString(item.godownName),
  32707. 1
  32708. /* TEXT */
  32709. )
  32710. ]);
  32711. }),
  32712. 128
  32713. /* KEYED_FRAGMENT */
  32714. ))
  32715. ])
  32716. ]),
  32717. _: 1
  32718. /* STABLE */
  32719. },
  32720. 512
  32721. /* NEED_PATCH */
  32722. )
  32723. ]);
  32724. }
  32725. const PagesOrderStatReceiveStat = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/pages/order/stat/receive-stat.vue"]]);
  32726. __definePage("pages/login/login", PagesLoginLogin);
  32727. __definePage("pages/index/index", PagesIndexIndex);
  32728. __definePage("pages/my/my", PagesMyMy);
  32729. __definePage("pages/order/index", PagesOrderIndex);
  32730. __definePage("pages/book/index", PagesBookIndex);
  32731. __definePage("pages/index/express/transfer-sign", PagesIndexExpressTransferSign);
  32732. __definePage("pages/index/express/scan", PagesIndexExpressScan);
  32733. __definePage("pages/index/express/quick-check", PagesIndexExpressQuickCheck);
  32734. __definePage("pages/index/express/quick-unpack", PagesIndexExpressQuickUnpack);
  32735. __definePage("pages/index/express/route-exception", PagesIndexExpressRouteException);
  32736. __definePage("pages/index/express/warehouse-sign", PagesIndexExpressWarehouseSign);
  32737. __definePage("pages/index/express/weight-modify", PagesIndexExpressWeightModify);
  32738. __definePage("pages/index/audit/confirm-receipt", PagesIndexAuditConfirmReceipt);
  32739. __definePage("pages/index/audit/scan-order", PagesIndexAuditScanOrder);
  32740. __definePage("pages/index/audit/isbn-order", PagesIndexAuditIsbnOrder);
  32741. __definePage("pages/index/audit/express-order", PagesIndexAuditExpressOrder);
  32742. __definePage("pages/index/detail/user-orders", PagesIndexDetailUserOrders);
  32743. __definePage("pages/index/detail/index", PagesIndexDetailIndex);
  32744. __definePage("pages/index/detail/book-audit", PagesIndexDetailBookAudit);
  32745. __definePage("pages/index/detail/batch-audit", PagesIndexDetailBatchAudit);
  32746. __definePage("pages/index/audit/sender", PagesIndexAuditSender);
  32747. __definePage("pages/index/statistic/audit", PagesIndexStatisticAudit);
  32748. __definePage("pages/index/statistic/after-sale", PagesIndexStatisticAfterSale);
  32749. __definePage("pages/index/statistic/after-sale-result", PagesIndexStatisticAfterSaleResult);
  32750. __definePage("pages/index/statistic/package", PagesIndexStatisticPackage);
  32751. __definePage("pages/index/wms/medium-in", PagesIndexWmsMediumIn);
  32752. __definePage("pages/index/wms/good-in", PagesIndexWmsGoodIn);
  32753. __definePage("pages/index/wms/secondary-in", PagesIndexWmsSecondaryIn);
  32754. __definePage("pages/index/wms/bad-in", PagesIndexWmsBadIn);
  32755. __definePage("pages/index/wms/bad-out", PagesIndexWmsBadOut);
  32756. __definePage("pages/index/wms/bad-out-order", PagesIndexWmsBadOutOrder);
  32757. __definePage("pages/index/wms/bad-off", PagesIndexWmsBadOff);
  32758. __definePage("pages/index/wms/order-query", PagesIndexWmsOrderQuery);
  32759. __definePage("pages/index/wms/order-query-list", PagesIndexWmsOrderQueryList);
  32760. __definePage("pages/index/wms/location-order", PagesIndexWmsLocationOrder);
  32761. __definePage("pages/index/wms/location-order-list", PagesIndexWmsLocationOrderList);
  32762. __definePage("pages/index/wms/location-select", PagesIndexWmsLocationSelect);
  32763. __definePage("pages/index/wms/warehouse-select", PagesIndexWmsWarehouseSelect);
  32764. __definePage("pages/index/wms/speedy-check", PagesIndexWmsSpeedyCheck);
  32765. __definePage("pages/index/offline/check-order", PagesIndexOfflineCheckOrder);
  32766. __definePage("pages/index/offline/check-record", PagesIndexOfflineCheckRecord);
  32767. __definePage("pages/index/entry/scan-book", PagesIndexEntryScanBook);
  32768. __definePage("pages/index/entry/book-weight", PagesIndexEntryBookWeight);
  32769. __definePage("pages/index/entry/commodity-scan", PagesIndexEntryCommodityScan);
  32770. __definePage("pages/index/express/logistics-detail", PagesIndexExpressLogisticsDetail);
  32771. __definePage("pages/index/wms/task-detail", PagesIndexWmsTaskDetail);
  32772. __definePage("pages/index/wms/speedy-check-add", PagesIndexWmsSpeedyCheckAdd);
  32773. __definePage("pages/my/page/user-info", PagesMyPageUserInfo);
  32774. __definePage("pages/my/page/warehouse", PagesMyPageWarehouse);
  32775. __definePage("pages/my/page/school", PagesMyPageSchool);
  32776. __definePage("pages/my/page/audit-unfinished", PagesMyPageAuditUnfinished);
  32777. __definePage("pages/my/page/version", PagesMyPageVersion);
  32778. __definePage("pages/my/page/volume", PagesMyPageVolume);
  32779. __definePage("pages/my/page/book-display", PagesMyPageBookDisplay);
  32780. __definePage("pages/my/page/password", PagesMyPagePassword);
  32781. __definePage("pages/order/stat/pending-review", PagesOrderStatPendingReview);
  32782. __definePage("pages/order/stat/pending-pick", PagesOrderStatPendingPick);
  32783. __definePage("pages/order/stat/pending-sign", PagesOrderStatPendingSign);
  32784. __definePage("pages/order/stat/pending-confirm", PagesOrderStatPendingConfirm);
  32785. __definePage("pages/order/stat/pending-audit", PagesOrderStatPendingAudit);
  32786. __definePage("pages/order/stat/pending-payment", PagesOrderStatPendingPayment);
  32787. __definePage("pages/order/stat/receive-stat", PagesOrderStatReceiveStat);
  32788. const _sfc_main = {
  32789. __name: "App",
  32790. setup(__props, { expose: __expose }) {
  32791. __expose();
  32792. onLaunch(() => {
  32793. let token = uni.getStorageSync("token");
  32794. if (token) {
  32795. let userInfo = uni.getStorageSync("userInfo");
  32796. if (userInfo) {
  32797. if (userInfo.userId) {
  32798. store.setUserInfo(userInfo);
  32799. }
  32800. }
  32801. }
  32802. });
  32803. const __returned__ = { get onLaunch() {
  32804. return onLaunch;
  32805. }, get onShow() {
  32806. return onShow;
  32807. }, get onHide() {
  32808. return onHide;
  32809. }, get store() {
  32810. return store;
  32811. } };
  32812. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  32813. return __returned__;
  32814. }
  32815. };
  32816. const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/Users/mac/项目文件/书嗨/book-hi-pda/App.vue"]]);
  32817. const { toString } = Object.prototype;
  32818. function isArray(val) {
  32819. return toString.call(val) === "[object Array]";
  32820. }
  32821. function isObject(val) {
  32822. return val !== null && typeof val === "object";
  32823. }
  32824. function isDate(val) {
  32825. return toString.call(val) === "[object Date]";
  32826. }
  32827. function isURLSearchParams(val) {
  32828. return typeof URLSearchParams !== "undefined" && val instanceof URLSearchParams;
  32829. }
  32830. function forEach(obj, fn) {
  32831. if (obj === null || typeof obj === "undefined") {
  32832. return;
  32833. }
  32834. if (typeof obj !== "object") {
  32835. obj = [obj];
  32836. }
  32837. if (isArray(obj)) {
  32838. for (let i = 0, l = obj.length; i < l; i++) {
  32839. fn.call(null, obj[i], i, obj);
  32840. }
  32841. } else {
  32842. for (const key in obj) {
  32843. if (Object.prototype.hasOwnProperty.call(obj, key)) {
  32844. fn.call(null, obj[key], key, obj);
  32845. }
  32846. }
  32847. }
  32848. }
  32849. function isPlainObject(obj) {
  32850. return Object.prototype.toString.call(obj) === "[object Object]";
  32851. }
  32852. function deepMerge$1() {
  32853. const result = {};
  32854. function assignValue(val, key) {
  32855. if (typeof result[key] === "object" && typeof val === "object") {
  32856. result[key] = deepMerge$1(result[key], val);
  32857. } else if (typeof val === "object") {
  32858. result[key] = deepMerge$1({}, val);
  32859. } else {
  32860. result[key] = val;
  32861. }
  32862. }
  32863. for (let i = 0, l = arguments.length; i < l; i++) {
  32864. forEach(arguments[i], assignValue);
  32865. }
  32866. return result;
  32867. }
  32868. function isUndefined(val) {
  32869. return typeof val === "undefined";
  32870. }
  32871. function encode(val) {
  32872. return encodeURIComponent(val).replace(/%40/gi, "@").replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
  32873. }
  32874. function buildURL(url2, params) {
  32875. if (!params) {
  32876. return url2;
  32877. }
  32878. let serializedParams;
  32879. if (isURLSearchParams(params)) {
  32880. serializedParams = params.toString();
  32881. } else {
  32882. const parts = [];
  32883. forEach(params, (val, key) => {
  32884. if (val === null || typeof val === "undefined") {
  32885. return;
  32886. }
  32887. if (isArray(val)) {
  32888. key = `${key}[]`;
  32889. } else {
  32890. val = [val];
  32891. }
  32892. forEach(val, (v) => {
  32893. if (isDate(v)) {
  32894. v = v.toISOString();
  32895. } else if (isObject(v)) {
  32896. v = JSON.stringify(v);
  32897. }
  32898. parts.push(`${encode(key)}=${encode(v)}`);
  32899. });
  32900. });
  32901. serializedParams = parts.join("&");
  32902. }
  32903. if (serializedParams) {
  32904. const hashmarkIndex = url2.indexOf("#");
  32905. if (hashmarkIndex !== -1) {
  32906. url2 = url2.slice(0, hashmarkIndex);
  32907. }
  32908. url2 += (url2.indexOf("?") === -1 ? "?" : "&") + serializedParams;
  32909. }
  32910. return url2;
  32911. }
  32912. function isAbsoluteURL(url2) {
  32913. return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url2);
  32914. }
  32915. function combineURLs(baseURL, relativeURL) {
  32916. return relativeURL ? `${baseURL.replace(/\/+$/, "")}/${relativeURL.replace(/^\/+/, "")}` : baseURL;
  32917. }
  32918. function buildFullPath(baseURL, requestedURL) {
  32919. if (baseURL && !isAbsoluteURL(requestedURL)) {
  32920. return combineURLs(baseURL, requestedURL);
  32921. }
  32922. return requestedURL;
  32923. }
  32924. function settle(resolve, reject, response) {
  32925. const { validateStatus } = response.config;
  32926. const status = response.statusCode;
  32927. if (status && (!validateStatus || validateStatus(status))) {
  32928. resolve(response);
  32929. } else {
  32930. reject(response);
  32931. }
  32932. }
  32933. const mergeKeys$1 = (keys, config2) => {
  32934. const config3 = {};
  32935. keys.forEach((prop) => {
  32936. if (!isUndefined(config2[prop])) {
  32937. config3[prop] = config2[prop];
  32938. }
  32939. });
  32940. return config3;
  32941. };
  32942. const adapter = (config2) => new Promise((resolve, reject) => {
  32943. const fullPath = buildURL(buildFullPath(config2.baseURL, config2.url), config2.params);
  32944. const _config = {
  32945. url: fullPath,
  32946. header: config2.header,
  32947. complete: (response) => {
  32948. config2.fullPath = fullPath;
  32949. response.config = config2;
  32950. try {
  32951. if (typeof response.data === "string") {
  32952. response.data = JSON.parse(response.data);
  32953. }
  32954. } catch (e) {
  32955. }
  32956. settle(resolve, reject, response);
  32957. }
  32958. };
  32959. let requestTask;
  32960. if (config2.method === "UPLOAD") {
  32961. delete _config.header["content-type"];
  32962. delete _config.header["Content-Type"];
  32963. const otherConfig = {
  32964. filePath: config2.filePath,
  32965. name: config2.name
  32966. };
  32967. const optionalKeys = [
  32968. "files",
  32969. "timeout",
  32970. "formData"
  32971. ];
  32972. requestTask = uni.uploadFile({ ..._config, ...otherConfig, ...mergeKeys$1(optionalKeys, config2) });
  32973. } else if (config2.method === "DOWNLOAD") {
  32974. if (!isUndefined(config2.timeout)) {
  32975. _config.timeout = config2.timeout;
  32976. }
  32977. requestTask = uni.downloadFile(_config);
  32978. } else {
  32979. const optionalKeys = [
  32980. "data",
  32981. "method",
  32982. "timeout",
  32983. "dataType",
  32984. "responseType",
  32985. "sslVerify",
  32986. "firstIpv4"
  32987. ];
  32988. requestTask = uni.request({ ..._config, ...mergeKeys$1(optionalKeys, config2) });
  32989. }
  32990. if (config2.getTask) {
  32991. config2.getTask(requestTask, config2);
  32992. }
  32993. });
  32994. const dispatchRequest = (config2) => adapter(config2);
  32995. function InterceptorManager() {
  32996. this.handlers = [];
  32997. }
  32998. InterceptorManager.prototype.use = function use(fulfilled, rejected) {
  32999. this.handlers.push({
  33000. fulfilled,
  33001. rejected
  33002. });
  33003. return this.handlers.length - 1;
  33004. };
  33005. InterceptorManager.prototype.eject = function eject(id) {
  33006. if (this.handlers[id]) {
  33007. this.handlers[id] = null;
  33008. }
  33009. };
  33010. InterceptorManager.prototype.forEach = function forEach2(fn) {
  33011. this.handlers.forEach((h) => {
  33012. if (h !== null) {
  33013. fn(h);
  33014. }
  33015. });
  33016. };
  33017. const mergeKeys = (keys, globalsConfig, config2) => {
  33018. const config3 = {};
  33019. keys.forEach((prop) => {
  33020. if (!isUndefined(config2[prop])) {
  33021. config3[prop] = config2[prop];
  33022. } else if (!isUndefined(globalsConfig[prop])) {
  33023. config3[prop] = globalsConfig[prop];
  33024. }
  33025. });
  33026. return config3;
  33027. };
  33028. const mergeConfig = (globalsConfig, config2 = {}) => {
  33029. const method = config2.method || globalsConfig.method || "GET";
  33030. let config3 = {
  33031. baseURL: globalsConfig.baseURL || "",
  33032. method,
  33033. url: config2.url || "",
  33034. params: config2.params || {},
  33035. custom: { ...globalsConfig.custom || {}, ...config2.custom || {} },
  33036. header: deepMerge$1(globalsConfig.header || {}, config2.header || {})
  33037. };
  33038. const defaultToConfig2Keys = ["getTask", "validateStatus"];
  33039. config3 = { ...config3, ...mergeKeys(defaultToConfig2Keys, globalsConfig, config2) };
  33040. if (method === "DOWNLOAD") {
  33041. if (!isUndefined(config2.timeout)) {
  33042. config3.timeout = config2.timeout;
  33043. } else if (!isUndefined(globalsConfig.timeout)) {
  33044. config3.timeout = globalsConfig.timeout;
  33045. }
  33046. } else if (method === "UPLOAD") {
  33047. delete config3.header["content-type"];
  33048. delete config3.header["Content-Type"];
  33049. const uploadKeys = [
  33050. "files",
  33051. "filePath",
  33052. "name",
  33053. "timeout",
  33054. "formData"
  33055. ];
  33056. uploadKeys.forEach((prop) => {
  33057. if (!isUndefined(config2[prop])) {
  33058. config3[prop] = config2[prop];
  33059. }
  33060. });
  33061. if (isUndefined(config3.timeout) && !isUndefined(globalsConfig.timeout)) {
  33062. config3.timeout = globalsConfig.timeout;
  33063. }
  33064. } else {
  33065. const defaultsKeys = [
  33066. "data",
  33067. "timeout",
  33068. "dataType",
  33069. "responseType",
  33070. "sslVerify",
  33071. "firstIpv4"
  33072. ];
  33073. config3 = { ...config3, ...mergeKeys(defaultsKeys, globalsConfig, config2) };
  33074. }
  33075. return config3;
  33076. };
  33077. const defaults = {
  33078. baseURL: "",
  33079. header: {},
  33080. method: "GET",
  33081. dataType: "json",
  33082. responseType: "text",
  33083. custom: {},
  33084. timeout: 6e4,
  33085. sslVerify: true,
  33086. firstIpv4: false,
  33087. validateStatus: function validateStatus(status) {
  33088. return status >= 200 && status < 300;
  33089. }
  33090. };
  33091. var clone = function() {
  33092. function _instanceof(obj, type2) {
  33093. return type2 != null && obj instanceof type2;
  33094. }
  33095. var nativeMap;
  33096. try {
  33097. nativeMap = Map;
  33098. } catch (_) {
  33099. nativeMap = function() {
  33100. };
  33101. }
  33102. var nativeSet;
  33103. try {
  33104. nativeSet = Set;
  33105. } catch (_) {
  33106. nativeSet = function() {
  33107. };
  33108. }
  33109. var nativePromise;
  33110. try {
  33111. nativePromise = Promise;
  33112. } catch (_) {
  33113. nativePromise = function() {
  33114. };
  33115. }
  33116. function clone2(parent, circular, depth, prototype, includeNonEnumerable) {
  33117. if (typeof circular === "object") {
  33118. depth = circular.depth;
  33119. prototype = circular.prototype;
  33120. includeNonEnumerable = circular.includeNonEnumerable;
  33121. circular = circular.circular;
  33122. }
  33123. var allParents = [];
  33124. var allChildren = [];
  33125. var useBuffer = typeof Buffer != "undefined";
  33126. if (typeof circular == "undefined")
  33127. circular = true;
  33128. if (typeof depth == "undefined")
  33129. depth = Infinity;
  33130. function _clone(parent2, depth2) {
  33131. if (parent2 === null)
  33132. return null;
  33133. if (depth2 === 0)
  33134. return parent2;
  33135. var child;
  33136. var proto;
  33137. if (typeof parent2 != "object") {
  33138. return parent2;
  33139. }
  33140. if (_instanceof(parent2, nativeMap)) {
  33141. child = new nativeMap();
  33142. } else if (_instanceof(parent2, nativeSet)) {
  33143. child = new nativeSet();
  33144. } else if (_instanceof(parent2, nativePromise)) {
  33145. child = new nativePromise(function(resolve, reject) {
  33146. parent2.then(function(value2) {
  33147. resolve(_clone(value2, depth2 - 1));
  33148. }, function(err) {
  33149. reject(_clone(err, depth2 - 1));
  33150. });
  33151. });
  33152. } else if (clone2.__isArray(parent2)) {
  33153. child = [];
  33154. } else if (clone2.__isRegExp(parent2)) {
  33155. child = new RegExp(parent2.source, __getRegExpFlags(parent2));
  33156. if (parent2.lastIndex)
  33157. child.lastIndex = parent2.lastIndex;
  33158. } else if (clone2.__isDate(parent2)) {
  33159. child = new Date(parent2.getTime());
  33160. } else if (useBuffer && Buffer.isBuffer(parent2)) {
  33161. if (Buffer.from) {
  33162. child = Buffer.from(parent2);
  33163. } else {
  33164. child = new Buffer(parent2.length);
  33165. parent2.copy(child);
  33166. }
  33167. return child;
  33168. } else if (_instanceof(parent2, Error)) {
  33169. child = Object.create(parent2);
  33170. } else {
  33171. if (typeof prototype == "undefined") {
  33172. proto = Object.getPrototypeOf(parent2);
  33173. child = Object.create(proto);
  33174. } else {
  33175. child = Object.create(prototype);
  33176. proto = prototype;
  33177. }
  33178. }
  33179. if (circular) {
  33180. var index2 = allParents.indexOf(parent2);
  33181. if (index2 != -1) {
  33182. return allChildren[index2];
  33183. }
  33184. allParents.push(parent2);
  33185. allChildren.push(child);
  33186. }
  33187. if (_instanceof(parent2, nativeMap)) {
  33188. parent2.forEach(function(value2, key) {
  33189. var keyChild = _clone(key, depth2 - 1);
  33190. var valueChild = _clone(value2, depth2 - 1);
  33191. child.set(keyChild, valueChild);
  33192. });
  33193. }
  33194. if (_instanceof(parent2, nativeSet)) {
  33195. parent2.forEach(function(value2) {
  33196. var entryChild = _clone(value2, depth2 - 1);
  33197. child.add(entryChild);
  33198. });
  33199. }
  33200. for (var i in parent2) {
  33201. var attrs = Object.getOwnPropertyDescriptor(parent2, i);
  33202. if (attrs) {
  33203. child[i] = _clone(parent2[i], depth2 - 1);
  33204. }
  33205. try {
  33206. var objProperty = Object.getOwnPropertyDescriptor(parent2, i);
  33207. if (objProperty.set === "undefined") {
  33208. continue;
  33209. }
  33210. child[i] = _clone(parent2[i], depth2 - 1);
  33211. } catch (e) {
  33212. if (e instanceof TypeError) {
  33213. continue;
  33214. } else if (e instanceof ReferenceError) {
  33215. continue;
  33216. }
  33217. }
  33218. }
  33219. if (Object.getOwnPropertySymbols) {
  33220. var symbols = Object.getOwnPropertySymbols(parent2);
  33221. for (var i = 0; i < symbols.length; i++) {
  33222. var symbol = symbols[i];
  33223. var descriptor = Object.getOwnPropertyDescriptor(parent2, symbol);
  33224. if (descriptor && !descriptor.enumerable && !includeNonEnumerable) {
  33225. continue;
  33226. }
  33227. child[symbol] = _clone(parent2[symbol], depth2 - 1);
  33228. Object.defineProperty(child, symbol, descriptor);
  33229. }
  33230. }
  33231. if (includeNonEnumerable) {
  33232. var allPropertyNames = Object.getOwnPropertyNames(parent2);
  33233. for (var i = 0; i < allPropertyNames.length; i++) {
  33234. var propertyName = allPropertyNames[i];
  33235. var descriptor = Object.getOwnPropertyDescriptor(parent2, propertyName);
  33236. if (descriptor && descriptor.enumerable) {
  33237. continue;
  33238. }
  33239. child[propertyName] = _clone(parent2[propertyName], depth2 - 1);
  33240. Object.defineProperty(child, propertyName, descriptor);
  33241. }
  33242. }
  33243. return child;
  33244. }
  33245. return _clone(parent, depth);
  33246. }
  33247. clone2.clonePrototype = function clonePrototype(parent) {
  33248. if (parent === null)
  33249. return null;
  33250. var c = function() {
  33251. };
  33252. c.prototype = parent;
  33253. return new c();
  33254. };
  33255. function __objToStr(o) {
  33256. return Object.prototype.toString.call(o);
  33257. }
  33258. clone2.__objToStr = __objToStr;
  33259. function __isDate(o) {
  33260. return typeof o === "object" && __objToStr(o) === "[object Date]";
  33261. }
  33262. clone2.__isDate = __isDate;
  33263. function __isArray(o) {
  33264. return typeof o === "object" && __objToStr(o) === "[object Array]";
  33265. }
  33266. clone2.__isArray = __isArray;
  33267. function __isRegExp(o) {
  33268. return typeof o === "object" && __objToStr(o) === "[object RegExp]";
  33269. }
  33270. clone2.__isRegExp = __isRegExp;
  33271. function __getRegExpFlags(re) {
  33272. var flags = "";
  33273. if (re.global)
  33274. flags += "g";
  33275. if (re.ignoreCase)
  33276. flags += "i";
  33277. if (re.multiline)
  33278. flags += "m";
  33279. return flags;
  33280. }
  33281. clone2.__getRegExpFlags = __getRegExpFlags;
  33282. return clone2;
  33283. }();
  33284. class Request {
  33285. /**
  33286. * @param {Object} arg - 全局配置
  33287. * @param {String} arg.baseURL - 全局根路径
  33288. * @param {Object} arg.header - 全局header
  33289. * @param {String} arg.method = [GET|POST|PUT|DELETE|CONNECT|HEAD|OPTIONS|TRACE] - 全局默认请求方式
  33290. * @param {String} arg.dataType = [json] - 全局默认的dataType
  33291. * @param {String} arg.responseType = [text|arraybuffer] - 全局默认的responseType。支付宝小程序不支持
  33292. * @param {Object} arg.custom - 全局默认的自定义参数
  33293. * @param {Number} arg.timeout - 全局默认的超时时间,单位 ms。默认60000。H5(HBuilderX 2.9.9+)、APP(HBuilderX 2.9.9+)、微信小程序(2.10.0)、支付宝小程序
  33294. * @param {Boolean} arg.sslVerify - 全局默认的是否验证 ssl 证书。默认true.仅App安卓端支持(HBuilderX 2.3.3+)
  33295. * @param {Boolean} arg.withCredentials - 全局默认的跨域请求时是否携带凭证(cookies)。默认false。仅H5支持(HBuilderX 2.6.15+)
  33296. * @param {Boolean} arg.firstIpv4 - 全DNS解析时优先使用ipv4。默认false。仅 App-Android 支持 (HBuilderX 2.8.0+)
  33297. * @param {Function(statusCode):Boolean} arg.validateStatus - 全局默认的自定义验证器。默认statusCode >= 200 && statusCode < 300
  33298. */
  33299. constructor(arg = {}) {
  33300. if (!isPlainObject(arg)) {
  33301. arg = {};
  33302. formatAppLog("warn", "at uni_modules/uview-plus/libs/luch-request/core/Request.js:39", "设置全局参数必须接收一个Object");
  33303. }
  33304. this.config = clone({ ...defaults, ...arg });
  33305. this.interceptors = {
  33306. request: new InterceptorManager(),
  33307. response: new InterceptorManager()
  33308. };
  33309. }
  33310. /**
  33311. * @Function
  33312. * @param {Request~setConfigCallback} f - 设置全局默认配置
  33313. */
  33314. setConfig(f) {
  33315. this.config = f(this.config);
  33316. }
  33317. middleware(config2) {
  33318. config2 = mergeConfig(this.config, config2);
  33319. const chain = [dispatchRequest, void 0];
  33320. let promise2 = Promise.resolve(config2);
  33321. this.interceptors.request.forEach((interceptor) => {
  33322. chain.unshift(interceptor.fulfilled, interceptor.rejected);
  33323. });
  33324. this.interceptors.response.forEach((interceptor) => {
  33325. chain.push(interceptor.fulfilled, interceptor.rejected);
  33326. });
  33327. while (chain.length) {
  33328. promise2 = promise2.then(chain.shift(), chain.shift());
  33329. }
  33330. return promise2;
  33331. }
  33332. /**
  33333. * @Function
  33334. * @param {Object} config - 请求配置项
  33335. * @prop {String} options.url - 请求路径
  33336. * @prop {Object} options.data - 请求参数
  33337. * @prop {Object} [options.responseType = config.responseType] [text|arraybuffer] - 响应的数据类型
  33338. * @prop {Object} [options.dataType = config.dataType] - 如果设为 json,会尝试对返回的数据做一次 JSON.parse
  33339. * @prop {Object} [options.header = config.header] - 请求header
  33340. * @prop {Object} [options.method = config.method] - 请求方法
  33341. * @returns {Promise<unknown>}
  33342. */
  33343. request(config2 = {}) {
  33344. return this.middleware(config2);
  33345. }
  33346. get(url2, options = {}) {
  33347. return this.middleware({
  33348. url: url2,
  33349. method: "GET",
  33350. ...options
  33351. });
  33352. }
  33353. post(url2, data, options = {}) {
  33354. return this.middleware({
  33355. url: url2,
  33356. data,
  33357. method: "POST",
  33358. ...options
  33359. });
  33360. }
  33361. put(url2, data, options = {}) {
  33362. return this.middleware({
  33363. url: url2,
  33364. data,
  33365. method: "PUT",
  33366. ...options
  33367. });
  33368. }
  33369. delete(url2, data, options = {}) {
  33370. return this.middleware({
  33371. url: url2,
  33372. data,
  33373. method: "DELETE",
  33374. ...options
  33375. });
  33376. }
  33377. options(url2, data, options = {}) {
  33378. return this.middleware({
  33379. url: url2,
  33380. data,
  33381. method: "OPTIONS",
  33382. ...options
  33383. });
  33384. }
  33385. upload(url2, config2 = {}) {
  33386. config2.url = url2;
  33387. config2.method = "UPLOAD";
  33388. return this.middleware(config2);
  33389. }
  33390. download(url2, config2 = {}) {
  33391. config2.url = url2;
  33392. config2.method = "DOWNLOAD";
  33393. return this.middleware(config2);
  33394. }
  33395. }
  33396. class Router {
  33397. constructor() {
  33398. this.config = {
  33399. type: "navigateTo",
  33400. url: "",
  33401. delta: 1,
  33402. // navigateBack页面后退时,回退的层数
  33403. params: {},
  33404. // 传递的参数
  33405. animationType: "pop-in",
  33406. // 窗口动画,只在APP有效
  33407. animationDuration: 300,
  33408. // 窗口动画持续时间,单位毫秒,只在APP有效
  33409. intercept: false
  33410. // 是否需要拦截
  33411. };
  33412. this.route = this.route.bind(this);
  33413. }
  33414. // 判断url前面是否有"/",如果没有则加上,否则无法跳转
  33415. addRootPath(url2) {
  33416. return url2[0] === "/" ? url2 : `/${url2}`;
  33417. }
  33418. // 整合路由参数
  33419. mixinParam(url2, params) {
  33420. url2 = url2 && this.addRootPath(url2);
  33421. let query = "";
  33422. if (/.*\/.*\?.*=.*/.test(url2)) {
  33423. query = uni.$u.queryParams(params, false);
  33424. return url2 += `&${query}`;
  33425. }
  33426. query = uni.$u.queryParams(params);
  33427. return url2 += query;
  33428. }
  33429. // 对外的方法名称
  33430. async route(options = {}, params = {}) {
  33431. let mergeConfig2 = {};
  33432. if (typeof options === "string") {
  33433. mergeConfig2.url = this.mixinParam(options, params);
  33434. mergeConfig2.type = "navigateTo";
  33435. } else {
  33436. mergeConfig2 = uni.$u.deepMerge(this.config, options);
  33437. mergeConfig2.url = this.mixinParam(options.url, options.params);
  33438. }
  33439. if (mergeConfig2.url === uni.$u.page())
  33440. return;
  33441. if (params.intercept) {
  33442. this.config.intercept = params.intercept;
  33443. }
  33444. mergeConfig2.params = params;
  33445. mergeConfig2 = uni.$u.deepMerge(this.config, mergeConfig2);
  33446. if (typeof uni.$u.routeIntercept === "function") {
  33447. const isNext = await new Promise((resolve, reject) => {
  33448. uni.$u.routeIntercept(mergeConfig2, resolve);
  33449. });
  33450. isNext && this.openPage(mergeConfig2);
  33451. } else {
  33452. this.openPage(mergeConfig2);
  33453. }
  33454. }
  33455. // 执行路由跳转
  33456. openPage(config2) {
  33457. const {
  33458. url: url2,
  33459. type: type2,
  33460. delta,
  33461. animationType,
  33462. animationDuration
  33463. } = config2;
  33464. if (config2.type == "navigateTo" || config2.type == "to") {
  33465. uni.navigateTo({
  33466. url: url2,
  33467. animationType,
  33468. animationDuration
  33469. });
  33470. }
  33471. if (config2.type == "redirectTo" || config2.type == "redirect") {
  33472. uni.redirectTo({
  33473. url: url2
  33474. });
  33475. }
  33476. if (config2.type == "switchTab" || config2.type == "tab") {
  33477. uni.switchTab({
  33478. url: url2
  33479. });
  33480. }
  33481. if (config2.type == "reLaunch" || config2.type == "launch") {
  33482. uni.reLaunch({
  33483. url: url2
  33484. });
  33485. }
  33486. if (config2.type == "navigateBack" || config2.type == "back") {
  33487. uni.navigateBack({
  33488. delta
  33489. });
  33490. }
  33491. }
  33492. }
  33493. const route = new Router().route;
  33494. function colorGradient(startColor = "rgb(0, 0, 0)", endColor = "rgb(255, 255, 255)", step = 10) {
  33495. const startRGB = hexToRgb(startColor, false);
  33496. const startR = startRGB[0];
  33497. const startG = startRGB[1];
  33498. const startB = startRGB[2];
  33499. const endRGB = hexToRgb(endColor, false);
  33500. const endR = endRGB[0];
  33501. const endG = endRGB[1];
  33502. const endB = endRGB[2];
  33503. const sR = (endR - startR) / step;
  33504. const sG = (endG - startG) / step;
  33505. const sB = (endB - startB) / step;
  33506. const colorArr = [];
  33507. for (let i = 0; i < step; i++) {
  33508. let hex = rgbToHex(`rgb(${Math.round(sR * i + startR)},${Math.round(sG * i + startG)},${Math.round(sB * i + startB)})`);
  33509. if (i === 0)
  33510. hex = rgbToHex(startColor);
  33511. if (i === step - 1)
  33512. hex = rgbToHex(endColor);
  33513. colorArr.push(hex);
  33514. }
  33515. return colorArr;
  33516. }
  33517. function hexToRgb(sColor, str = true) {
  33518. const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  33519. sColor = String(sColor).toLowerCase();
  33520. if (sColor && reg.test(sColor)) {
  33521. if (sColor.length === 4) {
  33522. let sColorNew = "#";
  33523. for (let i = 1; i < 4; i += 1) {
  33524. sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
  33525. }
  33526. sColor = sColorNew;
  33527. }
  33528. const sColorChange = [];
  33529. for (let i = 1; i < 7; i += 2) {
  33530. sColorChange.push(parseInt(`0x${sColor.slice(i, i + 2)}`));
  33531. }
  33532. if (!str) {
  33533. return sColorChange;
  33534. }
  33535. return `rgb(${sColorChange[0]},${sColorChange[1]},${sColorChange[2]})`;
  33536. }
  33537. if (/^(rgb|RGB)/.test(sColor)) {
  33538. const arr = sColor.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
  33539. return arr.map((val) => Number(val));
  33540. }
  33541. return sColor;
  33542. }
  33543. function rgbToHex(rgb) {
  33544. const _this = rgb;
  33545. const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  33546. if (/^(rgb|RGB)/.test(_this)) {
  33547. const aColor = _this.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
  33548. let strHex = "#";
  33549. for (let i = 0; i < aColor.length; i++) {
  33550. let hex = Number(aColor[i]).toString(16);
  33551. hex = String(hex).length == 1 ? `${0}${hex}` : hex;
  33552. if (hex === "0") {
  33553. hex += hex;
  33554. }
  33555. strHex += hex;
  33556. }
  33557. if (strHex.length !== 7) {
  33558. strHex = _this;
  33559. }
  33560. return strHex;
  33561. }
  33562. if (reg.test(_this)) {
  33563. const aNum = _this.replace(/#/, "").split("");
  33564. if (aNum.length === 6) {
  33565. return _this;
  33566. }
  33567. if (aNum.length === 3) {
  33568. let numHex = "#";
  33569. for (let i = 0; i < aNum.length; i += 1) {
  33570. numHex += aNum[i] + aNum[i];
  33571. }
  33572. return numHex;
  33573. }
  33574. } else {
  33575. return _this;
  33576. }
  33577. }
  33578. function colorToRgba(color2, alpha) {
  33579. color2 = rgbToHex(color2);
  33580. const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  33581. let sColor = String(color2).toLowerCase();
  33582. if (sColor && reg.test(sColor)) {
  33583. if (sColor.length === 4) {
  33584. let sColorNew = "#";
  33585. for (let i = 1; i < 4; i += 1) {
  33586. sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
  33587. }
  33588. sColor = sColorNew;
  33589. }
  33590. const sColorChange = [];
  33591. for (let i = 1; i < 7; i += 2) {
  33592. sColorChange.push(parseInt(`0x${sColor.slice(i, i + 2)}`));
  33593. }
  33594. return `rgba(${sColorChange.join(",")},${alpha})`;
  33595. }
  33596. return sColor;
  33597. }
  33598. const colorGradient$1 = {
  33599. colorGradient,
  33600. hexToRgb,
  33601. rgbToHex,
  33602. colorToRgba
  33603. };
  33604. function email(value2) {
  33605. return /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/.test(value2);
  33606. }
  33607. function mobile(value2) {
  33608. return /^1[23456789]\d{9}$/.test(value2);
  33609. }
  33610. function url(value2) {
  33611. return /^((https|http|ftp|rtsp|mms):\/\/)(([0-9a-zA-Z_!~*'().&=+$%-]+: )?[0-9a-zA-Z_!~*'().&=+$%-]+@)?(([0-9]{1,3}.){3}[0-9]{1,3}|([0-9a-zA-Z_!~*'()-]+.)*([0-9a-zA-Z][0-9a-zA-Z-]{0,61})?[0-9a-zA-Z].[a-zA-Z]{2,6})(:[0-9]{1,4})?((\/?)|(\/[0-9a-zA-Z_!~*'().;?:@&=+$,%#-]+)+\/?)$/.test(value2);
  33612. }
  33613. function date(value2) {
  33614. if (!value2)
  33615. return false;
  33616. if (number(value2))
  33617. value2 = +value2;
  33618. return !/Invalid|NaN/.test(new Date(value2).toString());
  33619. }
  33620. function dateISO(value2) {
  33621. return /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(value2);
  33622. }
  33623. function number(value2) {
  33624. return /^[\+-]?(\d+\.?\d*|\.\d+|\d\.\d+e\+\d+)$/.test(value2);
  33625. }
  33626. function string(value2) {
  33627. return typeof value2 === "string";
  33628. }
  33629. function digits(value2) {
  33630. return /^\d+$/.test(value2);
  33631. }
  33632. function idCard(value2) {
  33633. return /^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/.test(
  33634. value2
  33635. );
  33636. }
  33637. function carNo(value2) {
  33638. const xreg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF]$)|([DF][A-HJ-NP-Z0-9][0-9]{4}$))/;
  33639. const creg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/;
  33640. if (value2.length === 7) {
  33641. return creg.test(value2);
  33642. }
  33643. if (value2.length === 8) {
  33644. return xreg.test(value2);
  33645. }
  33646. return false;
  33647. }
  33648. function amount(value2) {
  33649. return /^[1-9]\d*(,\d{3})*(\.\d{1,2})?$|^0\.\d{1,2}$/.test(value2);
  33650. }
  33651. function chinese(value2) {
  33652. const reg = /^[\u4e00-\u9fa5]+$/gi;
  33653. return reg.test(value2);
  33654. }
  33655. function letter(value2) {
  33656. return /^[a-zA-Z]*$/.test(value2);
  33657. }
  33658. function enOrNum(value2) {
  33659. const reg = /^[0-9a-zA-Z]*$/g;
  33660. return reg.test(value2);
  33661. }
  33662. function contains(value2, param) {
  33663. return value2.indexOf(param) >= 0;
  33664. }
  33665. function range$1(value2, param) {
  33666. return value2 >= param[0] && value2 <= param[1];
  33667. }
  33668. function rangeLength(value2, param) {
  33669. return value2.length >= param[0] && value2.length <= param[1];
  33670. }
  33671. function landline(value2) {
  33672. const reg = /^\d{3,4}-\d{7,8}(-\d{3,4})?$/;
  33673. return reg.test(value2);
  33674. }
  33675. function empty(value2) {
  33676. switch (typeof value2) {
  33677. case "undefined":
  33678. return true;
  33679. case "string":
  33680. if (value2.replace(/(^[ \t\n\r]*)|([ \t\n\r]*$)/g, "").length == 0)
  33681. return true;
  33682. break;
  33683. case "boolean":
  33684. if (!value2)
  33685. return true;
  33686. break;
  33687. case "number":
  33688. if (value2 === 0 || isNaN(value2))
  33689. return true;
  33690. break;
  33691. case "object":
  33692. if (value2 === null || value2.length === 0)
  33693. return true;
  33694. for (const i in value2) {
  33695. return false;
  33696. }
  33697. return true;
  33698. }
  33699. return false;
  33700. }
  33701. function jsonString(value2) {
  33702. if (typeof value2 === "string") {
  33703. try {
  33704. const obj = JSON.parse(value2);
  33705. if (typeof obj === "object" && obj) {
  33706. return true;
  33707. }
  33708. return false;
  33709. } catch (e) {
  33710. return false;
  33711. }
  33712. }
  33713. return false;
  33714. }
  33715. function array(value2) {
  33716. if (typeof Array.isArray === "function") {
  33717. return Array.isArray(value2);
  33718. }
  33719. return Object.prototype.toString.call(value2) === "[object Array]";
  33720. }
  33721. function object(value2) {
  33722. return Object.prototype.toString.call(value2) === "[object Object]";
  33723. }
  33724. function code$1(value2, len = 6) {
  33725. return new RegExp(`^\\d{${len}}$`).test(value2);
  33726. }
  33727. function func(value2) {
  33728. return typeof value2 === "function";
  33729. }
  33730. function promise(value2) {
  33731. return object(value2) && func(value2.then) && func(value2.catch);
  33732. }
  33733. function image(value2) {
  33734. const newValue = value2.split("?")[0];
  33735. const IMAGE_REGEXP = /\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i;
  33736. return IMAGE_REGEXP.test(newValue);
  33737. }
  33738. function video(value2) {
  33739. const VIDEO_REGEXP = /\.(mp4|mpg|mpeg|dat|asf|avi|rm|rmvb|mov|wmv|flv|mkv|m3u8)/i;
  33740. return VIDEO_REGEXP.test(value2);
  33741. }
  33742. function regExp(o) {
  33743. return o && Object.prototype.toString.call(o) === "[object RegExp]";
  33744. }
  33745. const test = {
  33746. email,
  33747. mobile,
  33748. url,
  33749. date,
  33750. dateISO,
  33751. number,
  33752. digits,
  33753. idCard,
  33754. carNo,
  33755. amount,
  33756. chinese,
  33757. letter,
  33758. enOrNum,
  33759. contains,
  33760. range: range$1,
  33761. rangeLength,
  33762. empty,
  33763. isEmpty: empty,
  33764. jsonString,
  33765. landline,
  33766. object,
  33767. array,
  33768. code: code$1,
  33769. func,
  33770. promise,
  33771. video,
  33772. image,
  33773. regExp,
  33774. string
  33775. };
  33776. let timeout = null;
  33777. function debounce(func2, wait = 500, immediate = false) {
  33778. if (timeout !== null)
  33779. clearTimeout(timeout);
  33780. if (immediate) {
  33781. const callNow = !timeout;
  33782. timeout = setTimeout(() => {
  33783. timeout = null;
  33784. }, wait);
  33785. if (callNow)
  33786. typeof func2 === "function" && func2();
  33787. } else {
  33788. timeout = setTimeout(() => {
  33789. typeof func2 === "function" && func2();
  33790. }, wait);
  33791. }
  33792. }
  33793. let flag;
  33794. function throttle(func2, wait = 500, immediate = true) {
  33795. if (immediate) {
  33796. if (!flag) {
  33797. flag = true;
  33798. typeof func2 === "function" && func2();
  33799. setTimeout(() => {
  33800. flag = false;
  33801. }, wait);
  33802. }
  33803. } else if (!flag) {
  33804. flag = true;
  33805. setTimeout(() => {
  33806. flag = false;
  33807. typeof func2 === "function" && func2();
  33808. }, wait);
  33809. }
  33810. }
  33811. function strip(num, precision = 15) {
  33812. return +parseFloat(Number(num).toPrecision(precision));
  33813. }
  33814. function digitLength(num) {
  33815. const eSplit = num.toString().split(/[eE]/);
  33816. const len = (eSplit[0].split(".")[1] || "").length - +(eSplit[1] || 0);
  33817. return len > 0 ? len : 0;
  33818. }
  33819. function float2Fixed(num) {
  33820. if (num.toString().indexOf("e") === -1) {
  33821. return Number(num.toString().replace(".", ""));
  33822. }
  33823. const dLen = digitLength(num);
  33824. return dLen > 0 ? strip(Number(num) * Math.pow(10, dLen)) : Number(num);
  33825. }
  33826. function checkBoundary(num) {
  33827. {
  33828. if (num > Number.MAX_SAFE_INTEGER || num < Number.MIN_SAFE_INTEGER) {
  33829. formatAppLog("warn", "at uni_modules/uview-plus/libs/function/digit.js:45", `${num} 超出了精度限制,结果可能不正确`);
  33830. }
  33831. }
  33832. }
  33833. function iteratorOperation(arr, operation) {
  33834. const [num1, num2, ...others] = arr;
  33835. let res = operation(num1, num2);
  33836. others.forEach((num) => {
  33837. res = operation(res, num);
  33838. });
  33839. return res;
  33840. }
  33841. function times(...nums) {
  33842. if (nums.length > 2) {
  33843. return iteratorOperation(nums, times);
  33844. }
  33845. const [num1, num2] = nums;
  33846. const num1Changed = float2Fixed(num1);
  33847. const num2Changed = float2Fixed(num2);
  33848. const baseNum = digitLength(num1) + digitLength(num2);
  33849. const leftValue = num1Changed * num2Changed;
  33850. checkBoundary(leftValue);
  33851. return leftValue / Math.pow(10, baseNum);
  33852. }
  33853. function divide(...nums) {
  33854. if (nums.length > 2) {
  33855. return iteratorOperation(nums, divide);
  33856. }
  33857. const [num1, num2] = nums;
  33858. const num1Changed = float2Fixed(num1);
  33859. const num2Changed = float2Fixed(num2);
  33860. checkBoundary(num1Changed);
  33861. checkBoundary(num2Changed);
  33862. return times(num1Changed / num2Changed, strip(Math.pow(10, digitLength(num2) - digitLength(num1))));
  33863. }
  33864. function round(num, ratio) {
  33865. const base = Math.pow(10, ratio);
  33866. let result = divide(Math.round(Math.abs(times(num, base))), base);
  33867. if (num < 0 && result !== 0) {
  33868. result = times(result, -1);
  33869. }
  33870. return result;
  33871. }
  33872. function range(min = 0, max = 0, value2 = 0) {
  33873. return Math.max(min, Math.min(max, Number(value2)));
  33874. }
  33875. function getPx(value2, unit = false) {
  33876. if (test.number(value2)) {
  33877. return unit ? `${value2}px` : Number(value2);
  33878. }
  33879. if (/(rpx|upx)$/.test(value2)) {
  33880. return unit ? `${uni.upx2px(parseInt(value2))}px` : Number(uni.upx2px(parseInt(value2)));
  33881. }
  33882. return unit ? `${parseInt(value2)}px` : parseInt(value2);
  33883. }
  33884. function sleep(value2 = 30) {
  33885. return new Promise((resolve) => {
  33886. setTimeout(() => {
  33887. resolve();
  33888. }, value2);
  33889. });
  33890. }
  33891. function os() {
  33892. return uni.getSystemInfoSync().platform.toLowerCase();
  33893. }
  33894. function sys() {
  33895. return uni.getSystemInfoSync();
  33896. }
  33897. function random(min, max) {
  33898. if (min >= 0 && max > 0 && max >= min) {
  33899. const gab = max - min + 1;
  33900. return Math.floor(Math.random() * gab + min);
  33901. }
  33902. return 0;
  33903. }
  33904. function guid(len = 32, firstU = true, radix = null) {
  33905. const chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");
  33906. const uuid = [];
  33907. radix = radix || chars.length;
  33908. if (len) {
  33909. for (let i = 0; i < len; i++)
  33910. uuid[i] = chars[0 | Math.random() * radix];
  33911. } else {
  33912. let r;
  33913. uuid[8] = uuid[13] = uuid[18] = uuid[23] = "-";
  33914. uuid[14] = "4";
  33915. for (let i = 0; i < 36; i++) {
  33916. if (!uuid[i]) {
  33917. r = 0 | Math.random() * 16;
  33918. uuid[i] = chars[i == 19 ? r & 3 | 8 : r];
  33919. }
  33920. }
  33921. }
  33922. if (firstU) {
  33923. uuid.shift();
  33924. return `u${uuid.join("")}`;
  33925. }
  33926. return uuid.join("");
  33927. }
  33928. function $parent(name = void 0) {
  33929. let parent = this.$parent;
  33930. while (parent) {
  33931. if (parent.$options && parent.$options.name !== name) {
  33932. parent = parent.$parent;
  33933. } else {
  33934. return parent;
  33935. }
  33936. }
  33937. return false;
  33938. }
  33939. function addStyle(customStyle, target = "object") {
  33940. if (test.empty(customStyle) || typeof customStyle === "object" && target === "object" || target === "string" && typeof customStyle === "string") {
  33941. return customStyle;
  33942. }
  33943. if (target === "object") {
  33944. customStyle = trim(customStyle);
  33945. const styleArray = customStyle.split(";");
  33946. const style = {};
  33947. for (let i = 0; i < styleArray.length; i++) {
  33948. if (styleArray[i]) {
  33949. const item = styleArray[i].split(":");
  33950. style[trim(item[0])] = trim(item[1]);
  33951. }
  33952. }
  33953. return style;
  33954. }
  33955. let string2 = "";
  33956. for (const i in customStyle) {
  33957. const key = i.replace(/([A-Z])/g, "-$1").toLowerCase();
  33958. string2 += `${key}:${customStyle[i]};`;
  33959. }
  33960. return trim(string2);
  33961. }
  33962. function addUnit(value2 = "auto", unit = "") {
  33963. if (!unit) {
  33964. unit = uni.$u.config.unit || "px";
  33965. }
  33966. value2 = String(value2);
  33967. return test.number(value2) ? `${value2}${unit}` : value2;
  33968. }
  33969. function deepClone(obj) {
  33970. if ([null, void 0, NaN, false].includes(obj))
  33971. return obj;
  33972. if (typeof obj !== "object" && typeof obj !== "function") {
  33973. return obj;
  33974. }
  33975. const o = test.array(obj) ? [] : {};
  33976. for (const i in obj) {
  33977. if (obj.hasOwnProperty(i)) {
  33978. o[i] = typeof obj[i] === "object" ? deepClone(obj[i]) : obj[i];
  33979. }
  33980. }
  33981. return o;
  33982. }
  33983. function deepMerge(target = {}, source = {}) {
  33984. target = deepClone(target);
  33985. if (typeof target !== "object" || typeof source !== "object")
  33986. return false;
  33987. for (const prop in source) {
  33988. if (!source.hasOwnProperty(prop))
  33989. continue;
  33990. if (prop in target) {
  33991. if (typeof target[prop] !== "object") {
  33992. target[prop] = source[prop];
  33993. } else if (typeof source[prop] !== "object") {
  33994. target[prop] = source[prop];
  33995. } else if (target[prop].concat && source[prop].concat) {
  33996. target[prop] = target[prop].concat(source[prop]);
  33997. } else {
  33998. target[prop] = deepMerge(target[prop], source[prop]);
  33999. }
  34000. } else {
  34001. target[prop] = source[prop];
  34002. }
  34003. }
  34004. return target;
  34005. }
  34006. function error(err) {
  34007. {
  34008. formatAppLog("error", "at uni_modules/uview-plus/libs/function/index.js:238", `uView提示:${err}`);
  34009. }
  34010. }
  34011. function randomArray(array3 = []) {
  34012. return array3.sort(() => Math.random() - 0.5);
  34013. }
  34014. if (!String.prototype.padStart) {
  34015. String.prototype.padStart = function(maxLength, fillString = " ") {
  34016. if (Object.prototype.toString.call(fillString) !== "[object String]") {
  34017. throw new TypeError(
  34018. "fillString must be String"
  34019. );
  34020. }
  34021. const str = this;
  34022. if (str.length >= maxLength)
  34023. return String(str);
  34024. const fillLength = maxLength - str.length;
  34025. let times2 = Math.ceil(fillLength / fillString.length);
  34026. while (times2 >>= 1) {
  34027. fillString += fillString;
  34028. if (times2 === 1) {
  34029. fillString += fillString;
  34030. }
  34031. }
  34032. return fillString.slice(0, fillLength) + str;
  34033. };
  34034. }
  34035. function timeFormat(dateTime = null, formatStr = "yyyy-mm-dd") {
  34036. let date3;
  34037. if (!dateTime) {
  34038. date3 = /* @__PURE__ */ new Date();
  34039. } else if (/^\d{10}$/.test(dateTime.toString().trim())) {
  34040. date3 = new Date(dateTime * 1e3);
  34041. } else if (typeof dateTime === "string" && /^\d+$/.test(dateTime.trim())) {
  34042. date3 = new Date(Number(dateTime));
  34043. } else {
  34044. date3 = new Date(
  34045. typeof dateTime === "string" ? dateTime.replace(/-/g, "/") : dateTime
  34046. );
  34047. }
  34048. const timeSource = {
  34049. "y": date3.getFullYear().toString(),
  34050. // 年
  34051. "m": (date3.getMonth() + 1).toString().padStart(2, "0"),
  34052. // 月
  34053. "d": date3.getDate().toString().padStart(2, "0"),
  34054. // 日
  34055. "h": date3.getHours().toString().padStart(2, "0"),
  34056. // 时
  34057. "M": date3.getMinutes().toString().padStart(2, "0"),
  34058. // 分
  34059. "s": date3.getSeconds().toString().padStart(2, "0")
  34060. // 秒
  34061. // 有其他格式化字符需求可以继续添加,必须转化成字符串
  34062. };
  34063. for (const key in timeSource) {
  34064. const [ret] = new RegExp(`${key}+`).exec(formatStr) || [];
  34065. if (ret) {
  34066. const beginIndex = key === "y" && ret.length === 2 ? 2 : 0;
  34067. formatStr = formatStr.replace(ret, timeSource[key].slice(beginIndex));
  34068. }
  34069. }
  34070. return formatStr;
  34071. }
  34072. function timeFrom(timestamp = null, format2 = "yyyy-mm-dd") {
  34073. if (timestamp == null)
  34074. timestamp = Number(/* @__PURE__ */ new Date());
  34075. timestamp = parseInt(timestamp);
  34076. if (timestamp.toString().length == 10)
  34077. timestamp *= 1e3;
  34078. let timer = (/* @__PURE__ */ new Date()).getTime() - timestamp;
  34079. timer = parseInt(timer / 1e3);
  34080. let tips = "";
  34081. switch (true) {
  34082. case timer < 300:
  34083. tips = "刚刚";
  34084. break;
  34085. case (timer >= 300 && timer < 3600):
  34086. tips = `${parseInt(timer / 60)}分钟前`;
  34087. break;
  34088. case (timer >= 3600 && timer < 86400):
  34089. tips = `${parseInt(timer / 3600)}小时前`;
  34090. break;
  34091. case (timer >= 86400 && timer < 2592e3):
  34092. tips = `${parseInt(timer / 86400)}天前`;
  34093. break;
  34094. default:
  34095. if (format2 === false) {
  34096. if (timer >= 2592e3 && timer < 365 * 86400) {
  34097. tips = `${parseInt(timer / (86400 * 30))}个月前`;
  34098. } else {
  34099. tips = `${parseInt(timer / (86400 * 365))}年前`;
  34100. }
  34101. } else {
  34102. tips = timeFormat(timestamp, format2);
  34103. }
  34104. }
  34105. return tips;
  34106. }
  34107. function trim(str, pos = "both") {
  34108. str = String(str);
  34109. if (pos == "both") {
  34110. return str.replace(/^\s+|\s+$/g, "");
  34111. }
  34112. if (pos == "left") {
  34113. return str.replace(/^\s*/, "");
  34114. }
  34115. if (pos == "right") {
  34116. return str.replace(/(\s*$)/g, "");
  34117. }
  34118. if (pos == "all") {
  34119. return str.replace(/\s+/g, "");
  34120. }
  34121. return str;
  34122. }
  34123. function queryParams(data = {}, isPrefix = true, arrayFormat = "brackets") {
  34124. const prefix = isPrefix ? "?" : "";
  34125. const _result = [];
  34126. if (["indices", "brackets", "repeat", "comma"].indexOf(arrayFormat) == -1)
  34127. arrayFormat = "brackets";
  34128. for (const key in data) {
  34129. const value2 = data[key];
  34130. if (["", void 0, null].indexOf(value2) >= 0) {
  34131. continue;
  34132. }
  34133. if (value2.constructor === Array) {
  34134. switch (arrayFormat) {
  34135. case "indices":
  34136. for (let i = 0; i < value2.length; i++) {
  34137. _result.push(`${key}[${i}]=${value2[i]}`);
  34138. }
  34139. break;
  34140. case "brackets":
  34141. value2.forEach((_value) => {
  34142. _result.push(`${key}[]=${_value}`);
  34143. });
  34144. break;
  34145. case "repeat":
  34146. value2.forEach((_value) => {
  34147. _result.push(`${key}=${_value}`);
  34148. });
  34149. break;
  34150. case "comma":
  34151. let commaStr = "";
  34152. value2.forEach((_value) => {
  34153. commaStr += (commaStr ? "," : "") + _value;
  34154. });
  34155. _result.push(`${key}=${commaStr}`);
  34156. break;
  34157. default:
  34158. value2.forEach((_value) => {
  34159. _result.push(`${key}[]=${_value}`);
  34160. });
  34161. }
  34162. } else {
  34163. _result.push(`${key}=${value2}`);
  34164. }
  34165. }
  34166. return _result.length ? prefix + _result.join("&") : "";
  34167. }
  34168. function toast(title, duration = 2e3) {
  34169. uni.showToast({
  34170. title: String(title),
  34171. icon: "none",
  34172. duration
  34173. });
  34174. }
  34175. function type2icon(type2 = "success", fill = false) {
  34176. if (["primary", "info", "error", "warning", "success"].indexOf(type2) == -1)
  34177. type2 = "success";
  34178. let iconName = "";
  34179. switch (type2) {
  34180. case "primary":
  34181. iconName = "info-circle";
  34182. break;
  34183. case "info":
  34184. iconName = "info-circle";
  34185. break;
  34186. case "error":
  34187. iconName = "close-circle";
  34188. break;
  34189. case "warning":
  34190. iconName = "error-circle";
  34191. break;
  34192. case "success":
  34193. iconName = "checkmark-circle";
  34194. break;
  34195. default:
  34196. iconName = "checkmark-circle";
  34197. }
  34198. if (fill)
  34199. iconName += "-fill";
  34200. return iconName;
  34201. }
  34202. function priceFormat(number3, decimals = 0, decimalPoint = ".", thousandsSeparator = ",") {
  34203. number3 = `${number3}`.replace(/[^0-9+-Ee.]/g, "");
  34204. const n = !isFinite(+number3) ? 0 : +number3;
  34205. const prec = !isFinite(+decimals) ? 0 : Math.abs(decimals);
  34206. const sep = typeof thousandsSeparator === "undefined" ? "," : thousandsSeparator;
  34207. const dec = typeof decimalPoint === "undefined" ? "." : decimalPoint;
  34208. let s = "";
  34209. s = (prec ? round(n, prec) + "" : `${Math.round(n)}`).split(".");
  34210. const re = /(-?\d+)(\d{3})/;
  34211. while (re.test(s[0])) {
  34212. s[0] = s[0].replace(re, `$1${sep}$2`);
  34213. }
  34214. if ((s[1] || "").length < prec) {
  34215. s[1] = s[1] || "";
  34216. s[1] += new Array(prec - s[1].length + 1).join("0");
  34217. }
  34218. return s.join(dec);
  34219. }
  34220. function getDuration(value2, unit = true) {
  34221. const valueNum = parseInt(value2);
  34222. if (unit) {
  34223. if (/s$/.test(value2))
  34224. return value2;
  34225. return value2 > 30 ? `${value2}ms` : `${value2}s`;
  34226. }
  34227. if (/ms$/.test(value2))
  34228. return valueNum;
  34229. if (/s$/.test(value2))
  34230. return valueNum > 30 ? valueNum : valueNum * 1e3;
  34231. return valueNum;
  34232. }
  34233. function padZero(value2) {
  34234. return `00${value2}`.slice(-2);
  34235. }
  34236. function formValidate(instance, event) {
  34237. const formItem = uni.$u.$parent.call(instance, "u-form-item");
  34238. const form = uni.$u.$parent.call(instance, "u-form");
  34239. if (formItem && form) {
  34240. form.validateField(formItem.prop, () => {
  34241. }, event);
  34242. }
  34243. }
  34244. function getProperty(obj, key) {
  34245. if (!obj) {
  34246. return;
  34247. }
  34248. if (typeof key !== "string" || key === "") {
  34249. return "";
  34250. }
  34251. if (key.indexOf(".") !== -1) {
  34252. const keys = key.split(".");
  34253. let firstObj = obj[keys[0]] || {};
  34254. for (let i = 1; i < keys.length; i++) {
  34255. if (firstObj) {
  34256. firstObj = firstObj[keys[i]];
  34257. }
  34258. }
  34259. return firstObj;
  34260. }
  34261. return obj[key];
  34262. }
  34263. function setProperty(obj, key, value2) {
  34264. if (!obj) {
  34265. return;
  34266. }
  34267. const inFn = function(_obj, keys, v) {
  34268. if (keys.length === 1) {
  34269. _obj[keys[0]] = v;
  34270. return;
  34271. }
  34272. while (keys.length > 1) {
  34273. const k = keys[0];
  34274. if (!_obj[k] || typeof _obj[k] !== "object") {
  34275. _obj[k] = {};
  34276. }
  34277. keys.shift();
  34278. inFn(_obj[k], keys, v);
  34279. }
  34280. };
  34281. if (typeof key !== "string" || key === "")
  34282. ;
  34283. else if (key.indexOf(".") !== -1) {
  34284. const keys = key.split(".");
  34285. inFn(obj, keys, value2);
  34286. } else {
  34287. obj[key] = value2;
  34288. }
  34289. }
  34290. function page() {
  34291. const pages2 = getCurrentPages();
  34292. return `/${pages2[pages2.length - 1].route || ""}`;
  34293. }
  34294. function pages() {
  34295. const pages2 = getCurrentPages();
  34296. return pages2;
  34297. }
  34298. function setConfig({
  34299. props: props2 = {},
  34300. config: config2 = {},
  34301. color: color2 = {},
  34302. zIndex: zIndex2 = {}
  34303. }) {
  34304. const {
  34305. deepMerge: deepMerge2
  34306. } = uni.$u;
  34307. uni.$u.config = deepMerge2(uni.$u.config, config2);
  34308. uni.$u.props = deepMerge2(uni.$u.props, props2);
  34309. uni.$u.color = deepMerge2(uni.$u.color, color2);
  34310. uni.$u.zIndex = deepMerge2(uni.$u.zIndex, zIndex2);
  34311. }
  34312. const index = {
  34313. range,
  34314. getPx,
  34315. sleep,
  34316. os,
  34317. sys,
  34318. random,
  34319. guid,
  34320. $parent,
  34321. addStyle,
  34322. addUnit,
  34323. deepClone,
  34324. deepMerge,
  34325. error,
  34326. randomArray,
  34327. timeFormat,
  34328. timeFrom,
  34329. trim,
  34330. queryParams,
  34331. toast,
  34332. type2icon,
  34333. priceFormat,
  34334. getDuration,
  34335. padZero,
  34336. formValidate,
  34337. getProperty,
  34338. setProperty,
  34339. page,
  34340. pages,
  34341. setConfig
  34342. };
  34343. const zIndex = {
  34344. toast: 10090,
  34345. noNetwork: 10080,
  34346. // popup包含popup,actionsheet,keyboard,picker的值
  34347. popup: 10075,
  34348. mask: 10070,
  34349. navbar: 980,
  34350. topTips: 975,
  34351. sticky: 970,
  34352. indexListSticky: 965
  34353. };
  34354. let platform = "none";
  34355. platform = "vue3";
  34356. platform = "plus";
  34357. const platform$1 = platform;
  34358. const $u = {
  34359. route,
  34360. date: index.timeFormat,
  34361. // 另名date
  34362. colorGradient: colorGradient$1.colorGradient,
  34363. hexToRgb: colorGradient$1.hexToRgb,
  34364. rgbToHex: colorGradient$1.rgbToHex,
  34365. colorToRgba: colorGradient$1.colorToRgba,
  34366. test,
  34367. type: ["primary", "success", "error", "warning", "info"],
  34368. http: new Request(),
  34369. config,
  34370. // uView配置信息相关,比如版本号
  34371. zIndex,
  34372. debounce,
  34373. throttle,
  34374. mixin,
  34375. mpMixin,
  34376. props: props$G,
  34377. ...index,
  34378. color,
  34379. platform: platform$1
  34380. };
  34381. uni.$u = $u;
  34382. const install = (Vue2) => {
  34383. Vue2.config.globalProperties.$u = $u;
  34384. Vue2.config.globalProperties.$nextTick = (cb) => {
  34385. cb();
  34386. };
  34387. Vue2.mixin(mixin);
  34388. };
  34389. const uviewPlus = {
  34390. install
  34391. };
  34392. const share = {
  34393. data() {
  34394. return {
  34395. // 默认的全局分享内容
  34396. share: {
  34397. title: "标题",
  34398. path: "/pages/home/home",
  34399. // 这里是分享的页面
  34400. imageUrl: ""
  34401. // 这里是分析的图片,如果不写则默认截取当前分享页为分享图片
  34402. }
  34403. };
  34404. },
  34405. // 定义全局分享
  34406. // 1.发送给朋友
  34407. onShareAppMessage(res) {
  34408. return {
  34409. title: this.share.title,
  34410. path: this.share.path,
  34411. imageUrl: this.share.imageUrl
  34412. };
  34413. },
  34414. //2.分享到朋友圈
  34415. onShareTimeline(res) {
  34416. return {
  34417. title: this.share.title,
  34418. path: this.share.path,
  34419. imageUrl: this.share.imageUrl
  34420. };
  34421. }
  34422. };
  34423. const permission = {
  34424. // 在绑定元素的父组件挂载时调用
  34425. mounted(el, binding) {
  34426. const { value: value2 } = binding;
  34427. const buttonList = uni.getStorageSync("buttonList") || [];
  34428. const hasPermission = checkPermission(value2, buttonList);
  34429. if (!hasPermission) {
  34430. el.parentNode && el.parentNode.removeChild(el);
  34431. }
  34432. }
  34433. };
  34434. function checkPermission(permission2, buttonList) {
  34435. if (!permission2 || !buttonList || buttonList.length === 0) {
  34436. return false;
  34437. }
  34438. if (buttonList.includes("*:*:*")) {
  34439. return true;
  34440. }
  34441. return buttonList.includes(permission2);
  34442. }
  34443. const permissionDirective = {
  34444. install(app) {
  34445. app.directive("permission", permission);
  34446. }
  34447. };
  34448. const audioContext = vue.ref(null);
  34449. const initClickSound = () => {
  34450. audioContext.value = uni.createInnerAudioContext();
  34451. audioContext.value.src = "/static/bap.mp3";
  34452. audioContext.value.volume = 0.8;
  34453. };
  34454. const playClickSound = () => {
  34455. if (audioContext.value) {
  34456. audioContext.value.play();
  34457. }
  34458. };
  34459. function initBarcodeModule() {
  34460. var barcodeModel = requireNativePlugin("iData-BarcodePlugin-BarcodeModule");
  34461. barcodeModel.initScan((ret) => {
  34462. formatAppLog("log", "at utils/utils.js:57", "initBarcodeModule", ret);
  34463. });
  34464. return barcodeModel;
  34465. }
  34466. function useGlobalEvent(onScan) {
  34467. if (typeof onScan !== "function") {
  34468. throw new Error("onScan 必须是函数");
  34469. }
  34470. let barcodeModel = initBarcodeModule();
  34471. var globalEvent = requireNativePlugin("globalEvent");
  34472. globalEvent.addEventListener("iDataBarcodeEvent", (e) => {
  34473. onScan(e);
  34474. });
  34475. return () => {
  34476. globalEvent.removeEventListener("iDataBarcodeEvent", onScan);
  34477. barcodeModel.closeScan((ret) => {
  34478. });
  34479. };
  34480. }
  34481. function useEventListener(onEvent, isOnShow = false) {
  34482. if (typeof onEvent !== "function") {
  34483. throw new Error("useEventListener 需要传入函数类型的回调");
  34484. }
  34485. const cleanupRef = vue.ref(null);
  34486. const register = () => {
  34487. if (!cleanupRef.value) {
  34488. cleanupRef.value = useGlobalEvent(onEvent);
  34489. }
  34490. };
  34491. const unregister = () => {
  34492. if (cleanupRef.value) {
  34493. cleanupRef.value();
  34494. cleanupRef.value = null;
  34495. }
  34496. };
  34497. !isOnShow && onShow(register);
  34498. onHide(unregister);
  34499. onUnload(unregister);
  34500. return {
  34501. unregister,
  34502. register
  34503. };
  34504. }
  34505. initClickSound();
  34506. let ttsModule = new VolumeTTS();
  34507. uni.$u.ttsModule = ttsModule;
  34508. uni.$u.useEventListener = useEventListener;
  34509. uni.$u.playClickSound = playClickSound;
  34510. function createApp() {
  34511. const app = vue.createVueApp(App);
  34512. initRequest();
  34513. const pinia2 = createPinia();
  34514. app.use(pinia2).use(uviewPlus).use(permissionDirective);
  34515. app.mixin(share);
  34516. return {
  34517. app,
  34518. pinia: pinia2
  34519. };
  34520. }
  34521. const { app: __app__, Vuex: __Vuex__, Pinia: __Pinia__ } = createApp();
  34522. uni.Vuex = __Vuex__;
  34523. uni.Pinia = __Pinia__;
  34524. __app__.provide("__globalStyles", __uniConfig.styles);
  34525. __app__._component.mpType = "app";
  34526. __app__._component.render = () => {
  34527. };
  34528. __app__.mount("#app");
  34529. })(Vue);