index.vue 104 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475
  1. <template>
  2. <div class="content">
  3. <div class="goodsCard acea-row row-between">
  4. <div class="conter">
  5. <div class="cart">
  6. <div :style="'height:' + 100 + '%'" class="acea-row">
  7. <div class="acea-row row-between row-bottom cart-left">
  8. <div class="left-top">
  9. <div v-if="checkOut == 0" class="cart">
  10. <div v-if="staffInfo" class="title acea-row row-middle">
  11. <div class="picture">
  12. <img :src="staffInfo.avatar" v-if="staffInfo.avatar" />
  13. <img src="../../assets/images/yonghu.png" alt="" v-else />
  14. </div>`
  15. <div class="text">
  16. <div class="textCon line1">
  17. <div class="text-wrap">
  18. <div class="name-wrap">
  19. <span class="name">{{ staffInfo.name || '请选择员工'}}</span>
  20. <!-- <span v-if="userInfo.phone" class="phone mr10">手机号:{{ userInfo.phone }}</span> -->
  21. </div>
  22. </div>
  23. <div class="switchs" trigger="click" @click="changeStaff(1)">
  24. <a href="javascript:void(0)">
  25. 选择员工
  26. <Icon type="ios-arrow-down"></Icon>
  27. </a>
  28. </div>
  29. </div>
  30. </div>
  31. </div>
  32. <div v-if="userInfo" class="title acea-row row-middle">
  33. <div class="picture" @click="getUserDetail">
  34. <img :src="userInfo.avatar" />
  35. </div>
  36. <div class="text">
  37. <div class="textCon line1">
  38. <div class="text-wrap">
  39. <div class="name-wrap">
  40. <span class="name">{{ userInfo.nickname }}</span>
  41. <span v-if="userInfo.phone"
  42. class="phone mr10">手机号:{{ userInfo.phone }}</span>
  43. </div>
  44. </div>
  45. <Dropdown class="switchs" trigger="click"
  46. @on-click="changeMenu($event)">
  47. <a href="javascript:void(0)">
  48. 切换会员
  49. <Icon type="ios-arrow-down"></Icon>
  50. </a>
  51. <DropdownMenu slot="list">
  52. <DropdownItem name="1">选择用户</DropdownItem>
  53. <DropdownItem name="2">游客</DropdownItem>
  54. </DropdownMenu>
  55. </Dropdown>
  56. </div>
  57. <div v-if="userInfo.uid" class="user-msg">
  58. <span class="balance">积分<span class="num">{{
  59. userInfo.integral
  60. }}</span></span>
  61. <span class="balance">余额<span class="num">{{
  62. userInfo.now_money
  63. }}</span></span>
  64. </div>
  65. </div>
  66. </div>
  67. <div class="count">
  68. <div class="cart-sel">
  69. 已选购<span class="num">{{ cartSum }}</span>件
  70. </div>
  71. <div class="count-r">
  72. <!-- <span class="coupon" @click="couponTap">优惠券</span>-->
  73. <span class="clear" @click="delAll">
  74. <img alt="" src="../../assets/images/clear.png" />
  75. 清空</span>
  76. </div>
  77. </div>
  78. <div class="listCon">
  79. <div v-if="cartList.length" class="list">
  80. <div v-for="(data, proindex) in cartList" :key="proindex + 'data'"
  81. class="promotions">
  82. <div v-for="(pro, index) in data.promotions" :key="index + 'pro'"
  83. class="promotions-msg">
  84. <div class="flex-1">
  85. <span class="card">{{ pro.title }}</span>
  86. <span class="desc">{{ pro.desc }}</span>
  87. </div>
  88. <div class="collect" @click="collectOrder(pro)">
  89. {{ pro.promotions_type == 1 ? "去逛逛" : "去凑单" }}
  90. <span class="iconfont iconjinru"></span>
  91. </div>
  92. </div>
  93. <div v-for="(item, indexs) in data.cart" :key="indexs + 'car'"
  94. :class="{ is_give: item.is_gift }" class="item acea-row row-middle">
  95. <div class="picture">
  96. <img v-if="item.productInfo.attrInfo"
  97. :src="item.productInfo.attrInfo.image" />
  98. <img v-else :src="item.productInfo.image" />
  99. </div>
  100. <div v-if="!item.is_gift" class="text">
  101. <div class="name line1">
  102. {{ item.productInfo.store_name }}
  103. </div>
  104. <div v-if="
  105. item.productInfo.attrInfo &&
  106. item.productInfo.spec_type
  107. " class="info" @click="cartAttr(item)">
  108. <div class="suk line1">
  109. {{ item.productInfo.attrInfo.suk }}
  110. </div>
  111. <span class="iconfont iconxiayi"></span>
  112. </div>
  113. <div v-else class="info">默认</div>
  114. <div class="sum_price">¥ {{ item.sum_price }}</div>
  115. </div>
  116. <div v-else class="text">
  117. <div class="give-name line1">
  118. {{ item.productInfo.store_name }}
  119. </div>
  120. <div class="give-info">赠品</div>
  121. </div>
  122. <div v-if="!item.is_gift" class="del"
  123. @click="delCart(item, proindex, indexs, 'cart')">
  124. 删除
  125. </div>
  126. <div v-if="!item.is_gift"
  127. class="cartBnt acea-row row-center-wrapper">
  128. <div class="iconfont iconjian"
  129. @click="calculate(item, 'reduce')"></div>
  130. <!-- <input type="text" v-model="item.cart_num">-->
  131. <InputNumber v-model="item.cart_num"
  132. :max="item.productInfo.attrInfo.stock" :min="1" @on-blur="
  133. (e) => {
  134. changeCart(e, item);
  135. }
  136. "></InputNumber>
  137. <div class="iconfont iconjia" @click="calculate(item, 'add')">
  138. </div>
  139. </div>
  140. <div v-else class="cartBnt">
  141. <span>x{{ item.cart_num }}</span>
  142. </div>
  143. </div>
  144. </div>
  145. </div>
  146. <div v-if="invalidList.length" class="list promotions">
  147. <div v-for="(item, index) in invalidList" :key="index"
  148. class="item acea-row row-middle">
  149. <div class="picture">
  150. <img v-if="item.productInfo.attrInfo"
  151. :src="item.productInfo.attrInfo.image" />
  152. <img v-else :src="item.productInfo.image" />
  153. </div>
  154. <div class="text invalid">
  155. <div class="name line1">
  156. {{ item.productInfo.store_name }}
  157. </div>
  158. <div v-if="item.productInfo.attrInfo" class="info">
  159. <div class="suk line1">
  160. {{ item.productInfo.attrInfo.suk }}
  161. </div>
  162. <span class="iconfont iconxiayi"></span>
  163. </div>
  164. <div v-else class="info">默认</div>
  165. <div class="end">该商品已失效</div>
  166. </div>
  167. <div class="del" @click="delCart(item, index, 1, 'inv')">
  168. 删除
  169. </div>
  170. </div>
  171. </div>
  172. <div v-if="!invalidList.length && !cartList.length"
  173. class="noCart acea-row row-center-wrapper">
  174. <div>
  175. <div class="picture">
  176. <img src="@/assets/images/no-cart.png" />
  177. </div>
  178. <div class="tip">暂无商品,快去添加吧~</div>
  179. </div>
  180. </div>
  181. </div>
  182. <div class="footer">
  183. <div class="left">
  184. <div class="conInfo">
  185. <div class="right">
  186. <div class="storeBnt-wrap">
  187. </div>
  188. <div class="discount">
  189. 优惠: ¥{{
  190. this.$computes.Sub(
  191. priceInfo.sumPrice || 0,
  192. priceInfo.payPrice || 0
  193. ) || 0
  194. }}
  195. </div>
  196. <div v-if="cartList.length" class="detailed" @click="discountCon">
  197. 明细
  198. </div>
  199. <span class="discount">实付: </span>
  200. <span class="rmb">¥</span>
  201. <span class="num">{{
  202. cartSum && priceInfo.payPrice ? priceInfo.payPrice : 0
  203. }}</span>
  204. </div>
  205. </div>
  206. </div>
  207. <div class="footer-bottom">
  208. <Button :disabled="!cartList.length" @click="openSettle">立即结账</Button>
  209. </div>
  210. </div>
  211. </div>
  212. <div v-else class="cart" style="padding-top: 15px">
  213. <Form ref="lodgeFrom" :label-width="100" :model="lodgeFrom" @submit.native.prevent>
  214. <FormItem :labelWidth="20" label="" label-for="nickname">
  215. <Row>
  216. <Col>
  217. <Input v-model="lodgeFrom.keyword" element-id="nickname" enter-button
  218. placeholder="请输入用户名称/ID/手机号" search style="width: 370px"
  219. @on-search="storeSearch">
  220. </Input>
  221. </Col>
  222. </Row>
  223. </FormItem>
  224. </Form>
  225. <Table ref="selection" :columns="columns" :data="tableHang" :loading="loading"
  226. class="tableList" highlight-row no-filtered-userFrom-text="暂无筛选结果"
  227. no-userFrom-text="暂无数据">
  228. <template slot="nickname" slot-scope="{ row }">
  229. <div>{{ row.uid ? row.nickname : "游客" }}</div>
  230. </template>
  231. <template slot="action" slot-scope="{ row, index }">
  232. <a @click="billHang(row, index)">提单</a>
  233. <a class="ml10" @click="hangDel(row, index)">删除</a>
  234. </template>
  235. </Table>
  236. <div class="acea-row row-right page mr5">
  237. <Page :current="lodgeFrom.page" :page-size="lodgeFrom.limit" :total="totalHang"
  238. show-total size="small" @on-change="pageHangChange" />
  239. </div>
  240. </div>
  241. <div class="btn-group-vertical">
  242. <Button :disabled="!cartList.length" @click="lodgeTap">挂单</Button>
  243. <Button :disabled="!userInfo.uid" @click="rechargeBnt">充值</Button>
  244. <Button :disabled="!userInfo.uid || !cartList.length"
  245. :class="{ selected: integral }" @click="integralTap">积分</Button>
  246. <Button :disabled="!userInfo.uid || !cartList.length"
  247. @click="couponTap">优惠券</Button>
  248. <Button :disabled="!cartList.length" @click="changePrice">改价</Button>
  249. <Button :disabled="!cartList.length" @click="remarks">备注</Button>
  250. </div>
  251. </div>
  252. </div>
  253. </div>
  254. </div>
  255. </div>
  256. <div class="goods">
  257. <div class="acea-row" style="height: 100%">
  258. <div class="goodsCon">
  259. <div class="goods-top">
  260. <Input v-model="goodFrom.store_name" :maxlength="20" class="input" element-id="name"
  261. enter-button placeholder="搜索商品名称/ID/唯一码或点击聚焦扫码" search size="large"
  262. @on-search="orderSearch">
  263. <Select slot="prepend" v-model="goodFrom.field_key" style="width: 90px">
  264. <Option value="all">全部</Option>
  265. <Option value="store_name">商品名称</Option>
  266. <Option value="id">ID</Option>
  267. <Option value="bar_code">唯一码</Option>
  268. </Select>
  269. </Input>
  270. <swiper v-if="activityTypeArr.length" :options="swiperOption" @ready="readySwiper"
  271. @click="clickSwiper">
  272. <swiper-slide v-for="(item, index) in activityTypeArr" :key="index"
  273. :class="{ active: swiperClickedIndex === index }">{{ item.desc }}</swiper-slide>
  274. </swiper>
  275. <Alert v-if="swiperClickedIndex">
  276. <div>活动时间:{{activityTypeArr[swiperClickedIndex].section_time[0]}} ~
  277. {{activityTypeArr[swiperClickedIndex].section_time[1]}}
  278. </div>
  279. <div style="margin-top: 14px;">活动内容:{{activityTypeArr[swiperClickedIndex].desc}}</div>
  280. </Alert>
  281. <div ref="listWrap" class="list-wrap" @scroll="pageChange">
  282. <Row v-if="goodData.length && (goodFrom.cate_id !== '99999' || activityFrom.type)"
  283. :gutter="15" class="list">
  284. <Col v-for="(item, index) in goodData" :key="index" :sm="12" :md="12" :lg="12"
  285. :xl="8" :xxl="4">
  286. <div :class="{ on: item.stock }" class="item" @click="attrTap(item)">
  287. <div :style="{ height: goodsHeight + 'px' }" class="picture">
  288. <img :src="item.image" alt="商品图" style="width: 100%;" />
  289. </div>
  290. <div class="name line1">
  291. {{ item.store_name || item.title }}
  292. </div>
  293. <div class="text">
  294. <div class="text-left">
  295. <div class="money">
  296. <span class="rmb">¥</span>{{ item.price }}
  297. </div>
  298. </div>
  299. <div v-if="item.cart_num && cartList.length" class="icon-cart-num">
  300. {{ item.cart_num > 99 ? "99+" : item.cart_num }}
  301. </div>
  302. <div v-if="!item.stock && !item.cart_num" class="no-stock">
  303. <div class="trip">
  304. <div>暂无</div>
  305. <div>库存</div>
  306. </div>
  307. </div>
  308. </div>
  309. </div>
  310. </Col>
  311. </Row>
  312. <div v-else-if="goodFrom.cate_id === '99999' && !activityFrom.type">
  313. <activityCard v-if="!activityFrom.type" :uid="userInfo.uid"
  314. @selectaActivity="selectaActivity">
  315. </activityCard>
  316. </div>
  317. <div v-else class="noGood acea-row row-center-wrapper">
  318. <div>
  319. <div class="picture">
  320. <img :src="
  321. require(`@/assets/images/${
  322. goodFrom.cate_id == '99999'
  323. ? 'no-active.png'
  324. : 'no-goods.png'
  325. }`)
  326. " />
  327. </div>
  328. <div class="tip">
  329. {{
  330. goodFrom.cate_id === "99999"
  331. ? "暂无活动,敬请期待~"
  332. : "暂无商品,先看看别的吧~"
  333. }}
  334. </div>
  335. </div>
  336. </div>
  337. </div>
  338. <!-- </Scroll> -->
  339. </div>
  340. </div>
  341. <div class="goodClass acea-row row-center">
  342. <div>
  343. <div v-for="(item, index) in cateData" :key="index"
  344. :class="currentCate == index ? 'on' : ''" class="item line1"
  345. @click="cateTap(item, index)">
  346. {{ item.cate_name }}
  347. </div>
  348. </div>
  349. </div>
  350. </div>
  351. </div>
  352. </div>
  353. <Modal v-model="modalUser" :mask-closable="false" :scrollable="true" closable footer-hide title="用户列表"
  354. width="950" class-name="user-modal">
  355. <userList v-if="modalUser" ref="users" :uid="userInfo.uid || 0" @getUserId="getUserId"></userList>
  356. </Modal>
  357. <settleDrawer v-model="settleVisible" :list="payList" :type="payType" :money="settleMoney" @close='defaultcalc=false'
  358. :collection="collection" :verify="yueVerify" :z-index="zIndex" @payPrice="payPrice" @numTap="numTap"
  359. @delNum="delNum" @cashBnt="cashBnt"></settleDrawer>
  360. <recharge ref="recharge" v-model="rechargeVisible" :userInfo="userInfo" @getSuccess="getSuccess"
  361. @recharge="onRecharge"></recharge>
  362. <couponList v-if="userInfo && cartList.length" ref="coupon" :couponId="couponId==0?-1:couponId"
  363. :cartList="cartList" :uid="userInfo.uid" @getCouponId="getCouponId"></couponList>
  364. <storeList ref="store" :storeInfo="storeInfos" @getStoreId="getStoreId" @getUserInfo="getUserInfo"></storeList>
  365. <!-- :uid="userInfo?userInfo.uid:0" -->
  366. <productAttr ref="attrs" :attr="attr" :disabled="disabled" :isCart="isCart" @ChangeAttr="ChangeAttr"
  367. @goCat="goCat">
  368. </productAttr>
  369. <productAttr ref="skillAttrs" :attr="attr" :disabled="disabled" :isCart="isCart" isSkill
  370. @ChangeAttr="ChangeAttr" @goCat="goPay"></productAttr>
  371. <Modal v-model="payTypeModal" footer-hide title="支付方式" @on-visible-change="changeModal">
  372. <div class="payModal">
  373. <div class="type" @click="payPrice('cash')">
  374. <div class="img">
  375. <img alt="" src="../../assets/images/xpay.png" />
  376. </div>
  377. <div class="text">现金收款</div>
  378. </div>
  379. <div class="type" @click="payPrice('')">
  380. <div class="img">
  381. <img alt="" src="../../assets/images/wx_zfb_pay.png" />
  382. </div>
  383. <div class="text">微信/支付宝</div>
  384. </div>
  385. <div class="type" @click="payPrice('yue')">
  386. <div class="img">
  387. <img alt="" src="../../assets/images/yue.png" />
  388. </div>
  389. <div class="text">余额收款</div>
  390. </div>
  391. </div>
  392. </Modal>
  393. <Modal v-model="modal" title="备注" class-name="remarks-modal">
  394. <!-- <form-create-->
  395. <!-- v-model="fapi"-->
  396. <!-- :rule="rule"-->
  397. <!-- @on-submit="onSubmit"-->
  398. <!-- class="remark"-->
  399. <!-- ></form-create>-->
  400. <Input v-model="createOrder.remarks" :rows="5" maxlength="200" placeholder="订单备注" show-word-limit
  401. type="textarea" />
  402. <div slot="footer">
  403. <Button type="primary" size="large" long @click="onSubmit">提交</Button>
  404. </div>
  405. </Modal>
  406. <Modal v-model="modal2" title="订单改价" class-name="change-price-modal" @on-cancel="cancelPrice">
  407. <Form :model="formItem">
  408. <FormItem>
  409. <div class="acea-row">
  410. <div class="input-number">
  411. <InputNumber v-model="formItem.price" :max="9999999" :min="0" @on-change="tapPrice">
  412. </InputNumber>
  413. <div class="input-suffix">元</div>
  414. </div>
  415. <div class="input-number discount">
  416. <InputNumber v-model="discountPrice" :max="100" :min="0" @on-change="tapDiscount">
  417. </InputNumber>
  418. <div class="input-suffix">%</div>
  419. </div>
  420. </div>
  421. </FormItem>
  422. <FormItem label="改价后金额:">
  423. <div class="changePrice">
  424. ¥{{ formItem.price || 0 }}
  425. </div>
  426. </FormItem>
  427. </Form>
  428. <div slot="footer">
  429. <Button type="primary" size="large" long @click="onSubmit2">确定</Button>
  430. </div>
  431. <!-- <form-create v-model="fapi2" :rule="rule2" @on-submit="onSubmit2" class="remark"></form-create> -->
  432. </Modal>
  433. <Modal v-model="modalPay" class="modalPay" footer-hide width="430px" @on-cancel="modalPayCancel">
  434. <div class="payPage">
  435. <div class="header acea-row row-center-wrapper">
  436. <div class="picture"><img src="../../assets/images/gold.png" /></div>
  437. <div class="text">应收金额(元)</div>
  438. </div>
  439. <div class="money">
  440. ¥<span class="num">{{
  441. priceInfo.payPrice ? priceInfo.payPrice : 0
  442. }}</span>
  443. </div>
  444. <!-- <div class="tip acea-row row-center-wrapper">
  445. <Icon type="ios-alert" class="icon" />
  446. {{createOrder.pay_type=='yue'?'提示:使用扫码枪扫描用户个人中心二维码':'提示:引导用户扫描柜台二维码,注册登录后支付'}}
  447. </div> -->
  448. <Input ref="focusNum" v-model="payNum" placeholder="请点击输入框聚焦扫码或输入编码号" size="large"
  449. style="margin-top: 16px" type="url" @input="inputSaoMa" />
  450. <div class="process">
  451. <div class="picture">
  452. <!-- <img
  453. v-if="createOrder.pay_type == 'yue'"
  454. src="../../assets/images/process1.png"
  455. />
  456. <img v-else src="../../assets/images/process2.png" /> -->
  457. <img src="../../assets/images/process1.png" />
  458. </div>
  459. <div class="list acea-row row-between-wrapper">
  460. <div class="item one">
  461. <div class="name">
  462. {{
  463. createOrder.pay_type == "yue" ? "出示付款码" : "打开付款码"
  464. }}
  465. </div>
  466. <div>
  467. {{
  468. createOrder.pay_type == "yue"
  469. ? "用户打开个人中心"
  470. : "微信/支付宝付款码"
  471. }}
  472. </div>
  473. </div>
  474. <div class="item two">
  475. <div class="name">
  476. {{ createOrder.pay_type == "yue" ? "扫描付款码" : "贴合付款盒子" }}
  477. </div>
  478. <div>
  479. {{ createOrder.pay_type == "yue" ? "扫码枪" : "等待完成支付" }}
  480. </div>
  481. </div>
  482. <div class="item three">
  483. <div class="name">确认收款</div>
  484. <div>收银台确认</div>
  485. </div>
  486. </div>
  487. </div>
  488. </div>
  489. </Modal>
  490. <Modal v-model="modalCash" class="cash" footer-hide width="770px" @on-cancel="cancel">
  491. <div class="cashPage acea-row">
  492. <div class="left">
  493. <div class="picture">
  494. <img src="../../assets/images/gold.png" />
  495. </div>
  496. <div class="text">应收金额(元)</div>
  497. <div class="money">
  498. ¥<span class="num">{{
  499. priceInfo.payPrice ? priceInfo.payPrice : 0
  500. }}</span>
  501. </div>
  502. </div>
  503. <div class="right">
  504. <div class="rightCon">
  505. <div class="top acea-row row-between-wrapper">
  506. <div>实际收款(元)</div>
  507. <div class="num">{{ collection }}</div>
  508. </div>
  509. <div class="center acea-row row-between-wrapper">
  510. <div>需找零(元)</div>
  511. <div v-if="
  512. this.$computes.Sub(
  513. collection,
  514. priceInfo.payPrice ? priceInfo.payPrice : 0
  515. ) > 0
  516. " class="num">
  517. {{
  518. this.$computes.Sub(
  519. collection,
  520. priceInfo.payPrice ? priceInfo.payPrice : 0
  521. )
  522. }}
  523. </div>
  524. <div v-else class="num">0</div>
  525. </div>
  526. <div class="bottom acea-row">
  527. <div v-for="(item, index) in numList" :key="index" :class="item == '.' ? 'spot' : ''"
  528. class="item acea-row row-center-wrapper" @click="numTap(item)">
  529. {{ item }}
  530. </div>
  531. <div class="item acea-row row-center-wrapper" @click="delNum">
  532. <Icon type="ios-backspace" />
  533. </div>
  534. </div>
  535. </div>
  536. <Button type="primary" @click="cashBnt">确认</Button>
  537. </div>
  538. </div>
  539. </Modal>
  540. <Modal v-model="discount" footer-hide title="优惠明细" width="400">
  541. <div class="discountCon">
  542. <div class="item acea-row row-between-wrapper">
  543. <div>订单原价</div>
  544. <div>¥{{ priceInfo.sumPrice || 0 }}</div>
  545. </div>
  546. <div class="item acea-row row-between-wrapper">
  547. <div>会员优惠金额:</div>
  548. <div>¥{{ priceInfo.vipPrice || 0 }}</div>
  549. </div>
  550. <div class="item acea-row row-between-wrapper">
  551. <div>优惠券金额:</div>
  552. <div>¥{{ priceInfo.couponPrice || 0 }}</div>
  553. </div>
  554. <div class="item acea-row row-between-wrapper">
  555. <div>积分抵扣:</div>
  556. <div>¥{{ priceInfo.deductionPrice || 0 }}</div>
  557. </div>
  558. <div v-for="(item, index) in priceInfo.promotionsDetail" :key="index"
  559. class="item acea-row row-between-wrapper">
  560. <div>{{ item.title }}:</div>
  561. <div>¥{{ item.promotions_price || 0 }}</div>
  562. </div>
  563. </div>
  564. </Modal>
  565. <Modal v-model="userInfoShow" class-name="vertical-center-modal" footer-hide title="是否切换此用户" width="340">
  566. <div class="search_user_info">
  567. <div class="picture">
  568. <img :src="modalUserInfo.avatar" alt="" />
  569. </div>
  570. <p class="user_name">{{ modalUserInfo.real_name }}</p>
  571. <p class="user_id">ID:{{ modalUserInfo.uid }}</p>
  572. <p class="user_phone">手机号:{{ modalUserInfo.phone }}</p>
  573. <div class="sure_btn" @click="checkUser()">确定</div>
  574. </div>
  575. </Modal>
  576. <Modal v-model="modalStaff" :mask-closable="false" :scrollable="true" closable footer-hide title="员工列表"
  577. width="950" class-name="user-modal">
  578. <staffList v-if="modalStaff" ref="users" :uid="staffInfo.uid || 0" @getUserId="getStaffId"></staffList>
  579. </Modal>
  580. <!-- 会员详情-->
  581. <user-details ref="userDetails" @operation="operation"></user-details>
  582. </div>
  583. </template>
  584. <script>
  585. import userList from "@/components/userList";
  586. import storeList from "@/components/storeList";
  587. import couponList from "@/components/couponList";
  588. import productAttr from "./components/productAttr";
  589. import recharge from "@/components/recharge";
  590. import activityCard from "@/components/activityCard";
  591. import userDetails from "@/components/userDetail/userDetails"; import staffList from "@/components/staffList";
  592. import settleDrawer from "@/components/settleDrawer";
  593. import "../../assets/js/core.js";
  594. import {
  595. cashierProduct,
  596. cashierCate,
  597. cashierUser,
  598. cashierCode,
  599. cashierCart,
  600. cashierDetail,
  601. cashierCartList,
  602. cashierCartNum,
  603. cashierchangeCart,
  604. cashierCartDel,
  605. cashierCompute,
  606. cashierCreate,
  607. cashierPay,
  608. postCashierSwitch,
  609. postCashierHang,
  610. getHangList,
  611. getHang,
  612. cashierHang,
  613. cashierGetAttr,
  614. swithUser
  615. } from "@/api/order";
  616. import {
  617. checkOrderApi,
  618. getUserInfo,
  619. userSaveApi
  620. } from "@/api/user";
  621. import {
  622. activityList,
  623. activityTypeList
  624. } from "@/api/product";
  625. import Setting from '@/setting';
  626. export default {
  627. name: "index",
  628. components: {
  629. userList,
  630. storeList,
  631. productAttr,
  632. couponList,
  633. recharge,
  634. activityCard,
  635. userDetails,
  636. settleDrawer,
  637. staffList,
  638. },
  639. data() {
  640. return {
  641. modalStaff:false,
  642. staffInfo: {
  643. avatar: ''
  644. },
  645. formItem: {
  646. price: 0,
  647. },
  648. discountPrice: 100,
  649. loading: false,
  650. cashBntLoading: false,
  651. totalHang: 0,
  652. tableHang: [],
  653. activeHangon: -1,
  654. hangData: [],
  655. lodgeFrom: {
  656. keyword: "",
  657. page: 1,
  658. limit: 10,
  659. },
  660. currentid: "",
  661. columns: [{
  662. title: "选择",
  663. key: "chose",
  664. width: 60,
  665. align: "center",
  666. render: (h, params) => {
  667. let id = params.row.id;
  668. let flag = false;
  669. if (this.currentid === id) {
  670. flag = true;
  671. } else {
  672. flag = false;
  673. }
  674. let self = this;
  675. return h("div", [
  676. h("Radio", {
  677. props: {
  678. value: flag,
  679. },
  680. on: {
  681. "on-change": () => {
  682. self.currentid = id;
  683. self.activeHangon = params.index;
  684. let data = {
  685. uid: params.row.uid,
  686. };
  687. let touristId = params.row.tourist_uid;
  688. if (params.row.uid) {
  689. this.userInfoData(data);
  690. } else {
  691. this.setUp(touristId);
  692. }
  693. },
  694. },
  695. }),
  696. ]);
  697. },
  698. },
  699. {
  700. title: "用户",
  701. slot: "nickname",
  702. minWidth: 70,
  703. },
  704. {
  705. title: "订单金额",
  706. key: "price",
  707. minWidth: 70,
  708. },
  709. {
  710. title: "时间",
  711. key: "_add_time",
  712. minWidth: 70,
  713. },
  714. {
  715. title: "操作",
  716. slot: "action",
  717. minWidth: 100,
  718. align: "center",
  719. },
  720. ],
  721. checkOut: 0,
  722. modalUser: false,
  723. flag: true,
  724. goodFrom: {
  725. store_name: "",
  726. field_key: "all",
  727. cate_id: "",
  728. page: 1,
  729. limit: 20,
  730. uid: 0,
  731. staff_id: 0,
  732. },
  733. activityFrom: {
  734. page: 1,
  735. limit: 20,
  736. type: 0,
  737. uid: 0,
  738. promotions_id: 0,
  739. },
  740. total: 0,
  741. goodData: [],
  742. cateData: [],
  743. currentCate: 0, //分类的当前index;
  744. currentTab: "2",
  745. codeNum: "",
  746. payNum: "",
  747. userInfo: {},
  748. storeInfos: {}, //门店店员信息
  749. storeList: [], //门店列表
  750. attr: {
  751. productAttr: [],
  752. productSelect: {},
  753. },
  754. storeInfo: {}, //商品信息
  755. productValue: [],
  756. attrValue: "", //已选属性
  757. productId: 0, //产品id
  758. seckillId: 0, //秒杀商品id
  759. cartList: [],
  760. isCart: 0,
  761. cartInfo: {
  762. //更改属性所需参数
  763. cart_id: 0,
  764. product_id: 0,
  765. unique: "",
  766. },
  767. modal: false,
  768. fapi: {},
  769. rule: [{
  770. type: "input",
  771. field: "remarks",
  772. title: "备注",
  773. props: {
  774. type: "textarea",
  775. maxlength: 100,
  776. "show-word-limit": true,
  777. },
  778. }, ],
  779. modal2: false,
  780. rule2: [{
  781. type: "InputNumber",
  782. field: "change_price",
  783. title: "实付款",
  784. value: 0,
  785. props: {
  786. min: 0,
  787. },
  788. }, ],
  789. integral: false, //是否使用积分
  790. coupon: false, //是否使用优惠券
  791. couponId: 0, //优惠券id
  792. modalPay: false,
  793. payTypeModal: false,
  794. cartSum: 0,
  795. priceInfo: {},
  796. createOrder: {
  797. remarks: "",
  798. change_price: 0,
  799. cart_id: [], // 购物车id
  800. userCode: "",
  801. is_price: 0,
  802. auth_code: "",
  803. },
  804. modalCash: false,
  805. numList: ["7", "8", "9", "4", "5", "6", "1", "2", "3", "0", "."],
  806. collectionArray: [],
  807. collection: 0,
  808. isOrderCreate: 0,
  809. discount: false,
  810. payType: "", // 支付方式
  811. orderId: "", //订单id
  812. seckillOrderId: "", //秒杀订单id
  813. clientHeight: 0,
  814. cartHeight: 0,
  815. goodsHeight: 0,
  816. invalidList: [],
  817. promotionsList: [],
  818. defaultcalc: false,
  819. orderSystem: {
  820. loadingMsg: null,
  821. timer: null,
  822. },
  823. disabled: false, //阻止属性弹窗多次提交
  824. unchangedPrice: 0,
  825. cumping: false, //加减节流
  826. modalUserInfo: {}, //搜索出来的用户信息
  827. userInfoShow: false, //扫码枪搜索用户弹窗状态
  828. settleVisible: false,
  829. payList: [{
  830. label: '微信/支付宝',
  831. value: '',
  832. status: true,
  833. },
  834. {
  835. label: '现金收款',
  836. value: 'cash',
  837. status: true,
  838. },
  839. {
  840. label: '余额收款',
  841. value: 'yue',
  842. status: true,
  843. },
  844. ],
  845. shadow: 0,
  846. rechargeVisible: false,
  847. settleMoney: 0,
  848. yueVerify: false,
  849. activityTypeArr: [],
  850. swiper: null,
  851. swiperClickedIndex: 0,
  852. swiperOption: {
  853. slidesPerView: 'auto',
  854. spaceBetween: 14,
  855. setWrapperSize: true,
  856. },
  857. rechargeData: {},
  858. zIndex: 9999,
  859. endTimeout:''
  860. };
  861. },
  862. watch: {
  863. goodData(value) {
  864. this.$nextTick(() => {
  865. if (value.length) {
  866. this.goodsHeight = this.$refs.listWrap.querySelector('.picture').clientWidth;
  867. }
  868. });
  869. }
  870. },
  871. created() {
  872. let clientWidth = document.documentElement.clientWidth;
  873. let pageLimt;
  874. if (clientWidth > 2260) {
  875. pageLimt = 30;
  876. } else if (clientWidth > 1580) {
  877. pageLimt = 30;
  878. } else if (clientWidth > 1270) {
  879. pageLimt = 30;
  880. } else {
  881. pageLimt = 30;
  882. }
  883. this.goodFrom.limit = pageLimt;
  884. this.activityFrom.limit = pageLimt;
  885. this.userInfo = JSON.parse(window.localStorage.getItem("cashierUser")) || {};
  886. if (!this.userInfo.uid) {
  887. this.setUp();
  888. }
  889. this.cateList();
  890. console.log(this.$route.query)
  891. if (this.$route.query.uid || this.$route.query.tourist_uid) {
  892. let uid = this.$route.query.uid,
  893. touristId = this.$route.query.tourist_uid,
  894. staffId = this.$route.query.staff_id,
  895. index = this.$route.query.index;
  896. this.checkOut = 0;
  897. this.activeHangon = index;
  898. this.storeInfos.id = staffId;
  899. let data = {
  900. uid,
  901. };
  902. if (uid != 0) {
  903. this.userInfoData(data, true);
  904. this.getSwithUser(data);
  905. } else {
  906. this.setUp(touristId, true);
  907. if (touristId) {
  908. this.getSwithUser({
  909. tourist_uid: touristId
  910. });
  911. }
  912. }
  913. } else if (this.userInfo.uid) {
  914. this.getSwithUser({
  915. uid: this.userInfo.uid
  916. })
  917. } else if (this.userInfo.touristId) {
  918. console.log(this.userInfo.touristId)
  919. this.getSwithUser({
  920. tourist_uid: this.userInfo.touristId
  921. })
  922. }
  923. },
  924. methods: {
  925. changeStaff() {
  926. this.modalStaff = true;
  927. },
  928. getStaffId(e) {
  929. this.modalStaff = false;
  930. this.staffInfo = e
  931. },
  932. reloadList() {
  933. this.reloading = true;
  934. this.limitTemp = this.goodFrom.limit;
  935. this.goodFrom.limit *= this.goodFrom.page;
  936. this.goodFrom.page = 1;
  937. if (this.activityFrom.type) {
  938. this.limitTemp = this.activityFrom.limit;
  939. this.activityFrom.limit *= this.activityFrom.page;
  940. this.activityFrom.page = 1;
  941. }
  942. },
  943. getSwithUser(data) {
  944. swithUser(data).then(res => {}).catch(err => {
  945. this.$Message.error(err.msg);
  946. })
  947. },
  948. ceshi() {
  949. this.$router.push({
  950. path: `${Setting.roterPre}/auxScreen/login`
  951. })
  952. },
  953. jsToJava() {
  954. try {
  955. window.Jsbridge.invoke('openCacheBox', JSON.stringify({
  956. 'p1-key': 'p1-value'
  957. }), this.myFunction());
  958. } catch (e) {
  959. }
  960. },
  961. myFunction() {
  962. console.log('myFunction called222');
  963. },
  964. tapDiscount() {
  965. this.formItem.price =
  966. this.$computes
  967. .Mul(this.unchangedPrice || 0, this.discountPrice / 100 || 0)
  968. .toFixed(2) || 0;
  969. },
  970. tapPrice() {
  971. this.formItem.price = Number(this.formItem.price.toFixed(2));
  972. let num = this.$computes.Div(
  973. this.formItem.price || 0,
  974. this.unchangedPrice || 0
  975. );
  976. this.discountPrice = Number((num * 100).toFixed(2)) || 0;
  977. },
  978. cancelPrice() {
  979. this.formItem.price = this.priceInfo.payPrice || 0;
  980. this.tapPrice();
  981. },
  982. getSuccess(e) {
  983. let money = this.$computes.Add(this.userInfo.now_money, e);
  984. this.userInfo.now_money = money;
  985. let storage = window.localStorage;
  986. storage.setItem("cashierUser", JSON.stringify(this.userInfo));
  987. },
  988. clear() {
  989. this.priceInfo.couponPrice = 0;
  990. this.priceInfo.payPrice = 0;
  991. this.priceInfo.deductionPrice = 0;
  992. this.priceInfo.totalPrice = 0;
  993. this.priceInfo.vipPrice = 0;
  994. this.priceInfo.sumPrice = 0;
  995. this.cartList = [];
  996. this.promotionsList = [];
  997. this.cartSum = 0;
  998. this.collection = 0;
  999. this.collectionArray = [];
  1000. this.createOrder.change_price = 0;
  1001. this.createOrder.remarks = "";
  1002. this.coupon = false;
  1003. this.couponId = 0;
  1004. this.integral = false;
  1005. this.createOrder.is_price = 0;
  1006. this.activityFrom.type = 0;
  1007. this.goodFrom.cate_id = "";
  1008. },
  1009. cancel() {
  1010. this.collection = 0;
  1011. this.collectionArray = [];
  1012. },
  1013. // 挂单区删除
  1014. hangDel(row, index) {
  1015. cashierHang(row.id)
  1016. .then((res) => {
  1017. if (this.tableHang.length == 1) {
  1018. this.lodgeFrom.page = 1;
  1019. this.hangList();
  1020. } else {
  1021. this.tableHang.splice(index, 1);
  1022. this.totalHang = this.totalHang - 1;
  1023. }
  1024. this.hangData[index].is_check = 1;
  1025. this.$Message.success(res.msg);
  1026. })
  1027. .catch((err) => {
  1028. this.$Message.error(err.msg);
  1029. });
  1030. },
  1031. // 点击左侧挂单
  1032. hangDataTap(index, item) {
  1033. this.activeHangon = index;
  1034. this.checkOut = 0;
  1035. let touristId = item.tourist_uid;
  1036. let data = {
  1037. uid: item.uid,
  1038. };
  1039. this.activityFrom.type = 0;
  1040. if (item.uid) {
  1041. this.userInfoData(data);
  1042. } else {
  1043. this.setUp(touristId);
  1044. this.getSwithUser({
  1045. tourist_uid: touristId
  1046. })
  1047. }
  1048. },
  1049. // 挂单列表
  1050. hangList() {
  1051. this.loading = true;
  1052. let storeId = this.storeInfos.id;
  1053. getHangList(storeId, this.lodgeFrom)
  1054. .then((res) => {
  1055. this.loading = false;
  1056. this.tableHang = res.data.data;
  1057. this.totalHang = res.data.count;
  1058. })
  1059. .catch((err) => {
  1060. this.loading = false;
  1061. this.$Message.error(err.msg);
  1062. });
  1063. },
  1064. pageHangChange(e) {
  1065. this.lodgeFrom.page = e;
  1066. this.hangList();
  1067. },
  1068. // 提单;
  1069. billHang(item, index) {
  1070. this.checkOut = 0;
  1071. this.activeHangon = index;
  1072. let touristId = item.tourist_uid;
  1073. let data = {
  1074. uid: item.uid,
  1075. };
  1076. if (item.uid) {
  1077. this.userInfoData(data);
  1078. } else {
  1079. this.setUp(touristId);
  1080. }
  1081. },
  1082. //快速挂单列表(最左侧的)
  1083. hangDataList() {
  1084. let storeId = this.storeInfos.id;
  1085. getHang(storeId)
  1086. .then((res) => {
  1087. this.hangData = res.data;
  1088. this.defaultSel();
  1089. })
  1090. .catch((err) => {
  1091. this.$Message.error(err.msg);
  1092. });
  1093. },
  1094. //保存挂单
  1095. lodgeTap() {
  1096. // let data = {
  1097. // cart_ids: this.createOrder.cart_id,
  1098. // uid: this.userInfo.uid || 0,
  1099. // tourist_uid: this.userInfo.touristId || "",
  1100. // staff_id: this.storeInfos.id,
  1101. // price: this.priceInfo.payPrice || 0,
  1102. // };
  1103. let userInfo = {
  1104. avatar: require("@/assets/images/yonghu.png"),
  1105. nickname: "游客",
  1106. uid: 0,
  1107. touristId: this.userInfo.touristId,
  1108. };
  1109. this.userInfo = userInfo;
  1110. let storage = window.localStorage;
  1111. storage.setItem("cashierUser", JSON.stringify(userInfo));
  1112. setTimeout((e) => {
  1113. this.hangDataTap(0, this.hangData[0]);
  1114. }, 500);
  1115. // postCashierHang(data)
  1116. // .then((res) => {
  1117. // this.activeHangon = -1;
  1118. // this.$Message.success(res.msg);
  1119. // this.hangDataList();
  1120. // this.hangList();
  1121. // this.setUp();
  1122. // })
  1123. // .catch((err) => {
  1124. // this.$Message.error(err.msg);
  1125. // });
  1126. },
  1127. //搜索挂单
  1128. storeSearch() {
  1129. this.lodgeFrom.page = 1;
  1130. this.hangList();
  1131. },
  1132. //默认选中
  1133. defaultSel(type) {
  1134. let uid = this.userInfo.uid;
  1135. let touristId = this.userInfo.touristId;
  1136. if (uid) {
  1137. let flag = 0;
  1138. this.hangData.forEach((item, index) => {
  1139. if (item.uid == uid) {
  1140. flag = 1;
  1141. this.activeHangon = index;
  1142. }
  1143. });
  1144. if (!flag) {
  1145. this.activeHangon = -1;
  1146. }
  1147. } else if (touristId) {
  1148. this.activeHangon = -1;
  1149. this.hangData.forEach((item, index) => {
  1150. if (item.tourist_uid == touristId) {
  1151. this.activeHangon = index;
  1152. }
  1153. });
  1154. if (this.activeHangon == -1) {
  1155. this.activeHangon = 0;
  1156. this.userInfo.touristId = this.hangData[0].tourist_uid;
  1157. this.getSwithUser({
  1158. tourist_uid: this.userInfo.touristId
  1159. })
  1160. }
  1161. }
  1162. },
  1163. // 充值
  1164. rechargeBnt() {
  1165. this.rechargeVisible = true;
  1166. },
  1167. //点击出现优惠明细
  1168. discountCon() {
  1169. this.discount = true;
  1170. },
  1171. //现金收款创建订单并支付
  1172. cashBnt(payNum) {
  1173. if (this.cashBntLoading) return;
  1174. this.cashBntLoading = true;
  1175. this.payNum = payNum;
  1176. if (this.isOrderCreate) {
  1177. this.getCashierPay("cash");
  1178. } else {
  1179. console.log(this.rechargeVisible,'rechargeVisible')
  1180. if (this.rechargeVisible) {
  1181. this.rechargeBalance(payNum);
  1182. } else {
  1183. this.orderCreate(payNum);
  1184. }
  1185. }
  1186. setTimeout(() => {
  1187. this.cashBntLoading = false;
  1188. }, 1000);
  1189. },
  1190. //清除计算机输入的数字
  1191. delNum(type) {
  1192. if (type === -1) {
  1193. this.collectionArray = [];
  1194. } else {
  1195. this.collectionArray.pop();
  1196. }
  1197. this.collection = this.collectionArray.length ?
  1198. this.collectionArray.join("") :
  1199. 0;
  1200. },
  1201. //输入实际收款金额
  1202. numTap(item) {
  1203. console.log('进入' ,this.defaultcalc);
  1204. if (this.defaultcalc === false) {
  1205. this.collection = "";
  1206. this.defaultcalc = true;
  1207. }
  1208. let x = String(this.collection).indexOf(".") + 1;
  1209. let y = String(this.collection).length - x;
  1210. console.log(x, y);
  1211. if (x === 0 || y < 2) {
  1212. if (this.collectionArray.join("") <= 9999999) {
  1213. this.collectionArray.push(item);
  1214. }
  1215. this.collection =
  1216. this.collectionArray.join("") > 99999999 ?
  1217. 99999999 :
  1218. this.collectionArray.join("");
  1219. }
  1220. },
  1221. checkOrderTime(msg) {
  1222. let that = this;
  1223. let num = 1;
  1224. let timer = (this.orderSystem.timer = setInterval(function() {
  1225. that.confirmOrder(timer, msg);
  1226. num++;
  1227. if (num >= 60) {
  1228. clearInterval(timer);
  1229. msg();
  1230. that.isOrderCreate = 1;
  1231. that.$Message.success("支付失败");
  1232. }
  1233. }, 1000));
  1234. },
  1235. confirmOrder(timer, msg) {
  1236. let data = {
  1237. order_id: this.orderId,
  1238. };
  1239. checkOrderApi(3, data)
  1240. .then((res) => {
  1241. if (res.data.status == true) {
  1242. msg();
  1243. clearInterval(timer);
  1244. this.isOrderCreate = 0;
  1245. this.$Message.success("支付成功");
  1246. this.goodList();
  1247. this.modalPay = false;
  1248. this.changePoints();
  1249. let storage = window.localStorage;
  1250. storage.setItem("cashierUser", JSON.stringify(this.userInfo));
  1251. this.clear();
  1252. }
  1253. })
  1254. .catch((err) => {
  1255. msg();
  1256. this.$Message.error(err.msg);
  1257. });
  1258. },
  1259. async payPrice(payType) {
  1260. console.log(this.payType,payType)
  1261. this.payType = payType;
  1262. if (payType == "" || payType == "yue") {
  1263. this.createOrder.userCode = "";
  1264. this.createOrder.auth_code = "";
  1265. } else if (payType == "cash") {
  1266. this.keyboard();
  1267. }
  1268. this.createOrder.integral = this.integral;
  1269. this.createOrder.coupon = this.coupon;
  1270. this.createOrder.coupon_id = this.couponId;
  1271. if (this.coupon && !this.couponId)
  1272. return this.$Message.error("请选择有效优惠券");
  1273. this.createOrder.pay_type = payType;
  1274. this.createOrder.staff_id = this.storeInfos.id;
  1275. // this.fapi.resetFields();
  1276. this.cartCompute();
  1277. },
  1278. modalPayCancel() {
  1279. this.$Message.destroy();
  1280. if (this.orderSystem.timer) {
  1281. clearInterval(this.orderSystem.timer);
  1282. this.orderSystem.timer = null;
  1283. }
  1284. },
  1285. getCashierPay(payType) {
  1286. let data = {
  1287. payType: payType,
  1288. userCode: this.payNum,
  1289. auth_code: this.payNum,
  1290. };
  1291. if (payType == "cash") {
  1292. if (parseFloat(this.priceInfo.payPrice) > parseFloat(this.collection)) {
  1293. return this.$Message.error("您付款金额不足");
  1294. }
  1295. }
  1296. cashierPay(this.orderId, data)
  1297. .then((res) => {
  1298. this.payNum = "";
  1299. if (res.data.status == "SUCCESS") {
  1300. this.isOrderCreate = 0;
  1301. this.$Message.success("支付成功");
  1302. this.modalCash = false;
  1303. this.modalPay = false;
  1304. this.changePoints();
  1305. let storage = window.localStorage;
  1306. storage.setItem("cashierUser", JSON.stringify(this.userInfo));
  1307. this.clear();
  1308. this.goodList();
  1309. //现金收款打开钱箱
  1310. if (payType == "cash") {
  1311. this.jsToJava();
  1312. }
  1313. } else if (res.data.status == "PAY_ING") {
  1314. let msg = this.$Message.loading({
  1315. content: "等待支付中...",
  1316. duration: 0,
  1317. });
  1318. this.orderSystem.loadingMsg = msg;
  1319. this.orderId = res.data.order_id;
  1320. this.checkOrderTime(msg);
  1321. // this.confirmOrder();
  1322. } else {
  1323. this.isOrderCreate = 1;
  1324. this.orderId = res.data.order_id;
  1325. this.$Message.error(res.data.message);
  1326. }
  1327. })
  1328. .catch((err) => {
  1329. this.payNum = "";
  1330. this.$Message.error(err.msg);
  1331. });
  1332. },
  1333. // 创建订单
  1334. orderCreate(payNum) {
  1335. if (this.payType == "cash") {
  1336. if (parseFloat(this.priceInfo.payPrice) > parseFloat(this.collection)) {
  1337. return this.$Message.error("您付款金额不足");
  1338. }
  1339. }
  1340. this.createOrder.tourist_uid = this.userInfo.touristId;
  1341. if(this.staffInfo.id){
  1342. this.createOrder.sale_uid = this.staffInfo.id
  1343. }
  1344. if (this.activityFrom.type == 5) {
  1345. this.createOrder.cart_id = [this.seckillOrderId];
  1346. this.createOrder.new = 1;
  1347. } else if (this.storeInfo.product_type == 4) {
  1348. this.createOrder.new = 1;
  1349. }
  1350. if (this.payType == "") {
  1351. this.createOrder.auth_code=payNum
  1352. }
  1353. if (this.payType=='yue') {
  1354. this.createOrder.userCode=payNum
  1355. }
  1356. cashierCreate(this.userInfo.uid, this.createOrder)
  1357. .then((res) => {
  1358. console.log(res,'返回res')
  1359. let storage = window.localStorage;
  1360. this.payNum = "";
  1361. if (this.payType == "yue") {
  1362. // this.modalPay = false;
  1363. this.settleVisible = false;
  1364. this.payNum = "";
  1365. this.createOrder.userCode = "";
  1366. if (res.data.status == "ORDER_CREATE") {
  1367. this.isOrderCreate = 1;
  1368. this.orderId = res.data.order_id;
  1369. this.$Message.success(res.data.message);
  1370. } else if (res.data.status == "SUCCESS") {
  1371. this.isOrderCreate = 0;
  1372. this.$Message.success("支付成功");
  1373. let money = this.$computes.Sub(
  1374. this.userInfo.now_money,
  1375. this.priceInfo.payPrice
  1376. );
  1377. this.userInfo.now_money = money;
  1378. this.changePoints();
  1379. this.payTypeModal = false;
  1380. // this.modalPay = false;
  1381. storage.setItem("cashierUser", JSON.stringify(this.userInfo));
  1382. // this.goodList();
  1383. this.clear();
  1384. } else {
  1385. this.isOrderCreate = 1;
  1386. this.orderId = res.data.order_id;
  1387. this.$Message.error(res.data.message);
  1388. }
  1389. }
  1390. if (this.payType == "cash") {
  1391. if (res.data.status == "SUCCESS") {
  1392. this.$Message.success("支付成功");
  1393. // storage.removeItem("cashierUser");
  1394. // this.userInfo = null;
  1395. if (this.userInfo.uid) {
  1396. this.changePoints();
  1397. }
  1398. storage.setItem("cashierUser", JSON.stringify(this.userInfo));
  1399. // this.goodList();
  1400. // this.modalCash = false;
  1401. this.payTypeModal = false;
  1402. this.settleVisible = false;
  1403. this.clear();
  1404. this.jsToJava();
  1405. }
  1406. }
  1407. if (this.payType == "") {
  1408. console.log('支付')
  1409. this.payNum = "";
  1410. this.createOrder.auth_code = "";
  1411. if (res.data.status == "ORDER_CREATE") {
  1412. console.log('支付1')
  1413. this.isOrderCreate = 1;
  1414. console.log('支付23')
  1415. this.orderId = res.data.order_id;
  1416. console.log('支付22')
  1417. this.$Message.success(res.data.message);
  1418. console.log('支付2')
  1419. } else if (res.data.status == "PAY_ING") {
  1420. let msg = this.$Message.loading({
  1421. content: "等待支付中...",
  1422. duration: 0,
  1423. });
  1424. this.orderId = res.data.order_id;
  1425. this.checkOrderTime(msg);
  1426. } else if (res.data.status == "SUCCESS") {
  1427. this.$Message.success("支付成功");
  1428. // storage.removeItem("cashierUser");
  1429. // this.userInfo = null;
  1430. // this.setUp();
  1431. this.changePoints();
  1432. storage.setItem("cashierUser", JSON.stringify(this.userInfo));
  1433. // this.goodList();
  1434. // this.modalPay = false;
  1435. this.settleVisible = false;
  1436. this.clear();
  1437. } else {
  1438. this.isOrderCreate = 1;
  1439. this.orderId = res.data.order_id;
  1440. this.$Message.error(res.data.message);
  1441. }
  1442. }
  1443. })
  1444. .catch((err) => {
  1445. console.log(err,'err')
  1446. this.payNum = "";
  1447. this.$Message.error(err.msg);
  1448. });
  1449. },
  1450. //更新积分、更新左侧挂单、更新挂单(此函数支付成功调用)
  1451. changePoints() {
  1452. let usedIntegral = this.$computes.Sub(
  1453. this.userInfo.integral,
  1454. this.priceInfo.usedIntegral
  1455. );
  1456. this.userInfo.integral = usedIntegral;
  1457. // this.hangDataList();
  1458. //顶部挂单列表中删除刚才支付成功的用户
  1459. this.hangData.splice(this.activeHangon, 1);
  1460. //重置默认选中
  1461. this.activeHangon = 0;
  1462. this.hangDataTap(0, this.hangData[0]);
  1463. //
  1464. this.tableHang.forEach((item, index) => {
  1465. if (item.uid) {
  1466. if (this.userInfo.uid == item.uid) {
  1467. this.tableHang.splice(index, 1);
  1468. }
  1469. } else {
  1470. if (this.userInfo.touristId == item.tourist_uid) {
  1471. this.tableHang.splice(index, 1);
  1472. }
  1473. }
  1474. });
  1475. },
  1476. changeModal(n) {
  1477. if (!n) {
  1478. this.cartCompute();
  1479. }
  1480. },
  1481. // 计算金额
  1482. cartCompute(cartId) {
  1483. let ids = [];
  1484. if (cartId) {
  1485. ids = [cartId];
  1486. } else {
  1487. if (!this.cartList.length) {
  1488. this.priceInfo = {};
  1489. return;
  1490. }
  1491. this.cartList.forEach((item) => {
  1492. item.cart.forEach((good) => {
  1493. ids.push(good.id);
  1494. });
  1495. });
  1496. }
  1497. this.createOrder.cart_id = ids;
  1498. let data = {
  1499. integral: this.integral,
  1500. coupon: this.coupon,
  1501. coupon_id: this.couponId,
  1502. cart_id: ids,
  1503. payType: this.payType
  1504. };
  1505. if (cartId) {
  1506. data.new = 1;
  1507. }
  1508. cashierCompute(this.userInfo.uid, data)
  1509. .then((res) => {
  1510. this.priceInfo = res.data;
  1511. this.settleMoney = res.data.payPrice
  1512. this.unchangedPrice = this.priceInfo.payPrice || 0;
  1513. this.formItem.price = this.priceInfo.payPrice || 0;
  1514. this.tapPrice();
  1515. if (cartId) {
  1516. this.openSettle();
  1517. }
  1518. })
  1519. .catch((err) => {
  1520. this.$Message.error(err.msg);
  1521. this.coupon = false;
  1522. });
  1523. },
  1524. // 点击使用优惠券
  1525. couponTap() {
  1526. this.$refs.coupon.modals = true;
  1527. this.$refs.coupon.currentid = this.couponId || 0;
  1528. this.$refs.coupon.getList();
  1529. },
  1530. getCouponId(e) {
  1531. this.couponId = e.id;
  1532. this.coupon = true;
  1533. this.$refs.coupon.modals = false;
  1534. if (e.id) this.createOrder.is_price = 0;
  1535. this.cartCompute();
  1536. },
  1537. closeCoupon() {
  1538. this.coupon = false;
  1539. this.couponId = 0;
  1540. this.cartCompute();
  1541. },
  1542. // 是否使用积分
  1543. integralTap() {
  1544. if (!this.userInfo.uid) {
  1545. this.$Message.warning("请先选择用户再使用积分");
  1546. return;
  1547. }
  1548. this.integral = !this.integral;
  1549. if (this.integral) this.createOrder.is_price = 0;
  1550. this.cartCompute();
  1551. },
  1552. changePrice() {
  1553. this.modal2 = true;
  1554. },
  1555. remarks() {
  1556. // this.fapi.resetFields();
  1557. this.modal = true;
  1558. },
  1559. // 提交备注
  1560. onSubmit() {
  1561. this.modal = false;
  1562. },
  1563. onSubmit2() {
  1564. if (this.formItem.price >= 0 && this.formItem.price != null) {
  1565. this.priceInfo.payPrice = this.formItem.price;
  1566. this.$Message.success("改价成功");
  1567. this.createOrder.is_price = 1;
  1568. this.createOrder.change_price = this.formItem.price;
  1569. this.getSwithUser({
  1570. change_price: this.formItem.price
  1571. });
  1572. this.cancelPrice();
  1573. this.modal2 = false;
  1574. } else {
  1575. return this.$Message.error("价格不能为空");
  1576. }
  1577. },
  1578. // 删除
  1579. del(ids, type, index, num, name) {
  1580. this.$Modal.confirm({
  1581. title: "删除该购物车",
  1582. content: "<p>确定要删除该购物车吗?</p><p>删除该购物车后将无法恢复,请谨慎操作!</p>",
  1583. onOk: () => {
  1584. cashierCartDel(this.userInfo.uid, ids)
  1585. .then((res) => {
  1586. this.$Message.success("删除成功");
  1587. this.reloadList();
  1588. this.goodList(this.activityFrom.type);
  1589. if (type) {
  1590. this.clear();
  1591. this.invalidList = [];
  1592. this.hangDataList();
  1593. } else {
  1594. if (name == "inv" && num) {
  1595. this.invalidList.splice(index, 1);
  1596. } else {
  1597. this.cartList[index].cart.splice(num, 1);
  1598. if (this.cartList.length) {
  1599. this.getCartList();
  1600. // if (this.activityFrom.type) {
  1601. // this.goodList(this.activityFrom.type);
  1602. // } else {
  1603. // // this.goodList();
  1604. // }
  1605. } else {
  1606. this.hangDataList();
  1607. this.clear();
  1608. }
  1609. }
  1610. // this.cartSum = this.cartSum - 1;
  1611. }
  1612. })
  1613. .catch((err) => {
  1614. this.$Message.error(err.msg);
  1615. });
  1616. },
  1617. onCancel: () => {},
  1618. });
  1619. },
  1620. delAll() {
  1621. let ids = [];
  1622. if (!this.cartList.length && !this.invalidList.length)
  1623. return this.$Message.warning("购物车暂无商品");
  1624. this.cartList.forEach((item) => {
  1625. item.cart.forEach((good) => {
  1626. ids.push(good.id);
  1627. });
  1628. });
  1629. this.getSwithUser({
  1630. chang_cart_remove: 1
  1631. });
  1632. this.invalidList.forEach((item) => {
  1633. ids.push(item.id);
  1634. });
  1635. this.del({
  1636. ids: ids,
  1637. },
  1638. 1
  1639. );
  1640. },
  1641. delCart(item, index, num, type) {
  1642. let ids = [];
  1643. ids.push(item.id);
  1644. this.del({
  1645. ids: ids,
  1646. },
  1647. 0,
  1648. index,
  1649. num,
  1650. type
  1651. );
  1652. },
  1653. // 点击切换属性
  1654. cartAttr(item) {
  1655. this.disabled = false;
  1656. this.$refs.attrs.modals = true;
  1657. this.isCart = 1;
  1658. this.cartInfo.cart_id = item.id;
  1659. this.cartInfo.product_id = item.product_id;
  1660. this.goodsInfo(item.product_id);
  1661. },
  1662. // 加入购物车
  1663. joinCart(num) {
  1664. console.log(num,'num');
  1665. let that = this;
  1666. if (num) {
  1667. let productSelect = that.productValue[this.attrValue];
  1668. //如果有属性,没有选择,提示用户选择
  1669. if (that.attr.productAttr.length && productSelect === undefined) {
  1670. return this.$Message.warning("产品库存不足,请选择其它");
  1671. }
  1672. }
  1673. if (this.activeHangon == -1) this.activeHangon = 0;
  1674. // let uid = this.userInfo.uid;
  1675. let uid = this.hangData[this.activeHangon].uid || this.userInfo.uid || 0;
  1676. let data = {
  1677. productId: this.productId,
  1678. seckillId: this.seckillId,
  1679. cartNum: 1,
  1680. uniqueId: num ?
  1681. this.attr.productSelect !== undefined ?
  1682. this.attr.productSelect.unique :
  1683. "" : "",
  1684. staff_id: this.storeInfos.id,
  1685. tourist_uid: this.userInfo.touristId,
  1686. new: Number(this.storeInfo.product_type === 4),
  1687. };
  1688. cashierCart(uid, data)
  1689. .then((res) => {
  1690. if (this.storeInfo.product_type === 4) {
  1691. this.$refs.skillAttrs.modals = false;
  1692. this.cartCompute(res.data.cartId);
  1693. return false;
  1694. }
  1695. this.$refs.attrs.modals = false;
  1696. this.$Message.success("添加购物车成功");
  1697. this.getCartList();
  1698. if (this.activityFrom.type) {
  1699. this.reloadList();
  1700. this.goodList(this.activityFrom.type);
  1701. } else {
  1702. //如果是扫码查询商品摒弃直接加入购物车的情况下,在加入购物车成功以后,清空输入框的内容,重新请求列表
  1703. this.goodFrom.store_name = "";
  1704. this.reloadList();
  1705. this.goodList();
  1706. }
  1707. this.hangDataList();
  1708. this.disabled = true;
  1709. })
  1710. .catch((err) => {
  1711. this.$Message.error(err.msg);
  1712. });
  1713. },
  1714. // 购物车加减
  1715. cartChange(item) {
  1716. let uid = item.uid;
  1717. let data = {
  1718. number: item.cart_num,
  1719. id: item.id,
  1720. };
  1721. cashierCartNum(uid, data)
  1722. .then((res) => {
  1723. this.cartCompute();
  1724. })
  1725. .catch((err) => {
  1726. this.$Message.error(err.msg);
  1727. });
  1728. },
  1729. changeCart(e, item) {
  1730. let uid = item.uid;
  1731. let data = {
  1732. number: item.cart_num,
  1733. id: item.id,
  1734. };
  1735. cashierCartNum(uid, data)
  1736. .then((res) => {
  1737. this.getCartList();
  1738. this.cartCompute();
  1739. this.reloadList();
  1740. this.goodList(this.activityFrom.type);
  1741. })
  1742. .catch((err) => {
  1743. if (type === "reduce" && item.cart_num > 1) {
  1744. item.cart_num++;
  1745. } else if (type === "add" && item.cart_num < item.branch_stock) {
  1746. item.cart_num--;
  1747. }
  1748. this.$Message.error(err.msg);
  1749. });
  1750. },
  1751. calculate(item, type) {
  1752. if (this.cumping) return;
  1753. if (type === "reduce" && item.cart_num > 1) {
  1754. item.cart_num--;
  1755. } else if (type === "add" && item.cart_num < item.branch_stock) {
  1756. item.cart_num++;
  1757. } else {
  1758. return this.$Message.error(
  1759. item.cart_num === 1 ? "数量最小为1" : "库存不足"
  1760. );
  1761. }
  1762. let uid = item.uid;
  1763. let data = {
  1764. number: item.cart_num,
  1765. id: item.id,
  1766. };
  1767. this.cumping = true;
  1768. cashierCartNum(uid, data)
  1769. .then((res) => {
  1770. this.getCartList();
  1771. this.cartCompute();
  1772. this.reloadList();
  1773. this.goodList(this.activityFrom.type);
  1774. })
  1775. .catch((err) => {
  1776. if (type === "reduce" && item.cart_num > 1) {
  1777. item.cart_num++;
  1778. } else if (type === "add" && item.cart_num < item.branch_stock) {
  1779. item.cart_num--;
  1780. }
  1781. this.$Message.error(err.msg);
  1782. });
  1783. },
  1784. changeCartAttr() {
  1785. this.cartInfo.unique =
  1786. this.attr.productSelect !== undefined ?
  1787. this.attr.productSelect.unique :
  1788. "";
  1789. cashierchangeCart(this.cartInfo)
  1790. .then((res) => {
  1791. this.disabled = true;
  1792. this.$Message.success(res.msg);
  1793. this.$refs.attrs.modals = false;
  1794. this.getCartList();
  1795. // this.cartList.forEach(res => {
  1796. // if (res.id == this.cartInfo.cart_id) {
  1797. // res.productInfo.attrInfo.suk = this.attrValue;
  1798. // res.truePrice = this.attr.productSelect.price;
  1799. // }
  1800. // })
  1801. this.cartCompute();
  1802. })
  1803. .catch((err) => {
  1804. this.$Message.error(err.msg);
  1805. });
  1806. },
  1807. goCat(e) {
  1808. if (e) {
  1809. this.changeCartAttr();
  1810. } else {
  1811. this.joinCart(1);
  1812. }
  1813. },
  1814. //秒杀购买
  1815. goPay() {
  1816. if (this.storeInfo.product_type === 4) {
  1817. this.joinCart(0);
  1818. } else {
  1819. this.joinSkillCart(0);
  1820. }
  1821. },
  1822. joinSkillCart(num) {
  1823. let that = this;
  1824. if (num) {
  1825. let productSelect = that.productValue[this.attrValue];
  1826. //如果有属性,没有选择,提示用户选择
  1827. if (that.attr.productAttr.length && productSelect === undefined) {
  1828. return this.$Message.warning("产品库存不足,请选择其它");
  1829. }
  1830. }
  1831. let uid = this.userInfo.uid;
  1832. let data = {
  1833. productId: this.productId,
  1834. secKillId: this.seckillId,
  1835. cartNum: 1,
  1836. uniqueId: this.attr.productSelect.unique,
  1837. staff_id: this.storeInfos.id,
  1838. tourist_uid: this.userInfo.touristId,
  1839. new: 1,
  1840. };
  1841. cashierCart(uid, data)
  1842. .then((res) => {
  1843. this.seckillOrderId = res.data.cartId;
  1844. this.$refs.skillAttrs.modals = false;
  1845. // this.payTypeModal = true;
  1846. this.cartComputeActivity(res.data.cartId);
  1847. this.disabled = true;
  1848. })
  1849. .catch((err) => {
  1850. this.$Message.error(err.msg);
  1851. });
  1852. },
  1853. // 获取用户详情
  1854. getUserDetail() {
  1855. if (this.userInfo.uid) {
  1856. this.$refs.userDetails.modals = true;
  1857. this.$refs.userDetails.activeName = "info";
  1858. this.$refs.userDetails.getDetails(this.userInfo.uid);
  1859. }
  1860. },
  1861. // 购物车列表
  1862. getCartList() {
  1863. let uid = this.userInfo.uid;
  1864. let staffId = this.storeInfos.id;
  1865. if (uid >= 0) {
  1866. let data = {
  1867. tourist_uid: this.userInfo.touristId
  1868. };
  1869. cashierCartList(uid, staffId, data)
  1870. .then((res) => {
  1871. this.cartList = res.data.valid;
  1872. this.invalidList = res.data.invalid;
  1873. this.cartSum = res.data.count;
  1874. // this.promotionsList = res.data.promotions;
  1875. // this.cartSum = res.data.valid.length;
  1876. if (res.data.valid.length) {
  1877. this.cartCompute();
  1878. } else {
  1879. this.clear();
  1880. }
  1881. })
  1882. .catch((err) => {
  1883. this.$Message.error(err.msg);
  1884. })
  1885. .finally((e) => {
  1886. this.cumping = false;
  1887. });
  1888. } else {
  1889. this.$Message.error("请添加或选择用户");
  1890. }
  1891. },
  1892. // 选择属性
  1893. attrTap(item) {
  1894. console.log(item,'item');
  1895. this.disabled = false;
  1896. if (this.userInfo && this.userInfo.uid >= 0) {
  1897. this.productId = item.product_id;
  1898. if (!item.stock) return this.$Message.error("暂无库存");
  1899. if (this.activityFrom.type === "5") {
  1900. this.seckillId = item.id;
  1901. this.isCart = 0; //判断切换属性或是加入购物车:0加入购物车;1切换属性
  1902. this.$refs.skillAttrs.modals = true;
  1903. this.cashierGetAttr(item.id);
  1904. } else if (item.spec_type) {
  1905. this.isCart = 0; //判断切换属性或是加入购物车:0加入购物车;1切换属性
  1906. this.$refs.attrs.modals = true;
  1907. this.goodsInfo(item.product_id || item.id);
  1908. } else {
  1909. // 0为单规格属性
  1910. if (item.product_type === 4) {
  1911. this.isCart = 0;
  1912. this.$refs.skillAttrs.modals = true;
  1913. this.goodsInfo(item.product_id || item.id);
  1914. } else {
  1915. this.joinCart(0);
  1916. }
  1917. }
  1918. } else {
  1919. this.$Message.error("请添加或选择用户");
  1920. }
  1921. },
  1922. // 商品详情
  1923. goodsInfo(id) {
  1924. cashierDetail(id, this.userInfo.uid)
  1925. .then((res) => {
  1926. let data = res.data;
  1927. this.storeInfo = data.storeInfo;
  1928. this.productValue = data.productValue;
  1929. this.$set(this.attr, "productAttr", data.productAttr);
  1930. this.DefaultSelect();
  1931. })
  1932. .catch((err) => {
  1933. this.$Message.error(err.msg);
  1934. });
  1935. },
  1936. // 商品详情
  1937. cashierGetAttr(id) {
  1938. cashierGetAttr(id, this.userInfo.uid)
  1939. .then((res) => {
  1940. let data = res.data;
  1941. this.storeInfo = data.storeInfo;
  1942. this.productValue = data.productValue;
  1943. this.$set(this.attr, "productAttr", data.productAttr);
  1944. this.DefaultSelect();
  1945. })
  1946. .catch((err) => {
  1947. this.$Message.error(err.msg);
  1948. });
  1949. },
  1950. /**
  1951. * 默认选中属性
  1952. *
  1953. */
  1954. DefaultSelect: function() {
  1955. let productAttr = this.attr.productAttr;
  1956. let value = [];
  1957. for (var key in this.productValue) {
  1958. if (this.productValue[key].stock > 0) {
  1959. value = this.attr.productAttr.length ? key.split(",") : [];
  1960. break;
  1961. }
  1962. }
  1963. //isCart 1为触发购物车 0为商品
  1964. if (this.isCart) {
  1965. //购物车默认打开时,随着选中的属性改变
  1966. let attrValue = [];
  1967. // this.cartList.forEach((res) => {
  1968. // if (res.id == this.cartInfo.cart_id) {
  1969. // attrValue = res.productInfo.attrInfo.suk.split(",");
  1970. // }
  1971. // });
  1972. this.cartList.forEach((item) => {
  1973. item.cart.forEach((res) => {
  1974. if (res.id == this.cartInfo.cart_id) {
  1975. attrValue = res.productInfo.attrInfo.suk.split(",");
  1976. }
  1977. });
  1978. });
  1979. for (let i = 0; i < productAttr.length; i++) {
  1980. this.$set(productAttr[i], "index", attrValue[i]);
  1981. }
  1982. } else {
  1983. for (let i = 0; i < productAttr.length; i++) {
  1984. this.$set(productAttr[i], "index", value[i]);
  1985. }
  1986. }
  1987. //sort();排序函数:数字-英文-汉字;
  1988. let productSelect = this.productValue[value.join(",")];
  1989. if (productSelect && productAttr.length) {
  1990. this.$set(
  1991. this.attr.productSelect,
  1992. "store_name",
  1993. this.storeInfo.store_name
  1994. );
  1995. this.$set(this.attr.productSelect, "image", productSelect.image);
  1996. this.$set(this.attr.productSelect, "price", productSelect.price);
  1997. this.$set(this.attr.productSelect, "stock", productSelect.stock);
  1998. this.$set(this.attr.productSelect, "unique", productSelect.unique);
  1999. this.$set(this.attr.productSelect, "cart_num", 1);
  2000. this.$set(this, "attrValue", value.join(","));
  2001. } else if (!productSelect && productAttr.length) {
  2002. this.$set(
  2003. this.attr.productSelect,
  2004. "store_name",
  2005. this.storeInfo.store_name
  2006. );
  2007. this.$set(this.attr.productSelect, "image", this.storeInfo.image);
  2008. this.$set(this.attr.productSelect, "price", this.storeInfo.price);
  2009. this.$set(this.attr.productSelect, "stock", 0);
  2010. this.$set(this.attr.productSelect, "unique", "");
  2011. this.$set(this.attr.productSelect, "cart_num", 0);
  2012. this.$set(this, "attrValue", "");
  2013. } else if (!productSelect && !productAttr.length) {
  2014. this.$set(
  2015. this.attr.productSelect,
  2016. "store_name",
  2017. this.storeInfo.store_name
  2018. );
  2019. this.$set(this.attr.productSelect, "image", this.storeInfo.image);
  2020. this.$set(this.attr.productSelect, "price", this.storeInfo.price);
  2021. this.$set(this.attr.productSelect, "stock", this.storeInfo.stock);
  2022. this.$set(
  2023. this.attr.productSelect,
  2024. "unique",
  2025. this.storeInfo.unique || ""
  2026. );
  2027. this.$set(this.attr.productSelect, "cart_num", 1);
  2028. this.$set(this, "attrValue", "");
  2029. }
  2030. },
  2031. /**
  2032. * 属性变动赋值
  2033. *
  2034. */
  2035. ChangeAttr(res) {
  2036. let productSelect = this.productValue[res];
  2037. if (productSelect && productSelect.stock > 0) {
  2038. this.$set(this.attr.productSelect, "image", productSelect.image);
  2039. this.$set(this.attr.productSelect, "price", productSelect.price);
  2040. this.$set(this.attr.productSelect, "stock", productSelect.stock);
  2041. this.$set(this.attr.productSelect, "unique", productSelect.unique);
  2042. this.$set(this.attr.productSelect, "cart_num", 1);
  2043. this.$set(
  2044. this.attr.productSelect,
  2045. "vip_price",
  2046. productSelect.vip_price
  2047. );
  2048. this.$set(this, "attrValue", res);
  2049. } else {
  2050. this.$set(this.attr.productSelect, "image", this.storeInfo.image);
  2051. this.$set(this.attr.productSelect, "price", this.storeInfo.price);
  2052. this.$set(this.attr.productSelect, "stock", 0);
  2053. this.$set(this.attr.productSelect, "unique", "");
  2054. this.$set(this.attr.productSelect, "cart_num", 0);
  2055. this.$set(
  2056. this.attr.productSelect,
  2057. "vip_price",
  2058. this.storeInfo.vip_price
  2059. );
  2060. this.$set(this, "attrValue", "");
  2061. }
  2062. },
  2063. storeTap() {
  2064. this.$refs.store.modals = true;
  2065. this.$refs.store.cancel();
  2066. },
  2067. setUp(touristId, init) {
  2068. let timestamp = new Date().getTime();
  2069. let userInfo = {
  2070. avatar: require("@/assets/images/yonghu.png"),
  2071. nickname: "游客",
  2072. uid: 0,
  2073. touristId: touristId || timestamp,
  2074. };
  2075. if (!touristId) {
  2076. this.getSwithUser({
  2077. tourist_uid: timestamp
  2078. })
  2079. }
  2080. this.userInfo = userInfo;
  2081. let storage = window.localStorage;
  2082. storage.setItem("cashierUser", JSON.stringify(userInfo));
  2083. if (init) return;
  2084. this.getCartList();
  2085. this.reloadList();
  2086. this.goodList();
  2087. },
  2088. // 选择用户
  2089. changeMenu(name) {
  2090. if (name == 1) {
  2091. this.setUser();
  2092. } else {
  2093. this.activeHangon = -1;
  2094. this.clear();
  2095. this.setUp();
  2096. }
  2097. },
  2098. // 修改用户
  2099. setUser() {
  2100. this.modalUser = true;
  2101. // this.$refs.users.currentid = 0;
  2102. // this.$refs.users.modals = true
  2103. // this.$refs.users.cancel();
  2104. },
  2105. // 当前选中门店店员信息
  2106. getStoreId(e) {
  2107. this.clear();
  2108. this.storeList.forEach((i) => {
  2109. if (i.id == e.id) {
  2110. sessionStorage.setItem("staffInfo", JSON.stringify(e));
  2111. this.goodFrom.staff_id = e.id;
  2112. this.storeInfos = i;
  2113. this.getCartList();
  2114. this.reloadList();
  2115. this.goodList();
  2116. this.hangDataList();
  2117. // this.hangList();
  2118. this.getSwithUser({
  2119. cashier_id: e.id
  2120. });
  2121. }
  2122. });
  2123. },
  2124. // 门店店员信息以及门店店员列表
  2125. getUserInfo(e) {
  2126. this.storeInfos = e.users;
  2127. this.storeList = e.storeList;
  2128. this.goodFrom.staff_id = e.users.id;
  2129. sessionStorage.setItem("staffInfo", JSON.stringify(e.users));
  2130. if (this.userInfo) {
  2131. this.getCartList();
  2132. } else {
  2133. this.setUp();
  2134. }
  2135. this.reloadList();
  2136. this.goodList();
  2137. this.hangDataList();
  2138. // this.hangList();
  2139. },
  2140. // 收银台切换购物车用户
  2141. cashierSwitch(data) {
  2142. postCashierSwitch(data, this.storeInfos.id)
  2143. .then((res) => {})
  2144. .catch((err) => {
  2145. this.$Message.error(err.msg);
  2146. });
  2147. },
  2148. getUserId(e) {
  2149. this.clear();
  2150. this.modalUser = false;
  2151. let data = {
  2152. uid: e.uid,
  2153. };
  2154. let dataSwitch = {
  2155. uid: this.userInfo.touristId,
  2156. to_uid: e.uid,
  2157. is_tourist: 1,
  2158. };
  2159. this.cashierSwitch(dataSwitch);
  2160. this.userInfoData(data);
  2161. this.getSwithUser({
  2162. uid: e.uid
  2163. });
  2164. },
  2165. checkUser() {
  2166. this.userInfoShow = false;
  2167. this.goodFrom.store_name = "";
  2168. this.getUserId(this.modalUserInfo);
  2169. },
  2170. // 获取收银台用户信息
  2171. userInfoData(data, init) {
  2172. cashierUser(data)
  2173. .then((res) => {
  2174. this.userInfo = res.data;
  2175. let storage = window.localStorage;
  2176. storage.setItem("cashierUser", JSON.stringify(res.data));
  2177. if (init) return;
  2178. this.hangDataList();
  2179. this.getCartList();
  2180. this.reloadList();
  2181. this.goodList();
  2182. this.defaultSel(1);
  2183. })
  2184. .catch((err) => {
  2185. this.$Message.error(err.msg);
  2186. });
  2187. },
  2188. //扫码枪扫码,针对带有字母的
  2189. inputSaoMa(e) {
  2190. console.log(e,'扫码枪输入结果')
  2191. // setTimeout定时器的作用是,等待扫码枪输入完,拿到完整的二维码信息,再调接口(扫码枪输入速度大概8~20毫秒,手动输速度大概是80毫秒),否则拿不到完整的二维信息。
  2192. let val = e;
  2193. console.log(e,'扫码枪结果')
  2194. if (val === "") return false;
  2195. console.log(',this.codeNum2222')
  2196. clearTimeout(this.endTimeout);
  2197. console.log(',this.codeNum2')
  2198. this.endTimeout = null;
  2199. this.endTimeout = setTimeout(() => {
  2200. console.log(',this.codeNum1')
  2201. // if (this.payNum === val) {
  2202. // clearTimeout(this.endTimeout)
  2203. // if (val) {
  2204. // this.createOrder.userCode = val;
  2205. // this.createOrder.auth_code = val;
  2206. // this.confirm();
  2207. // }
  2208. // }
  2209. console.log(this.codeNum,',this.codeNum')
  2210. if (this.codeNum === val) {
  2211. clearTimeout(this.endTimeout);
  2212. if (val) {
  2213. this.codeInfo({
  2214. bar_code: val,
  2215. });
  2216. }
  2217. }
  2218. }, 500);
  2219. },
  2220. // 用户详情操作
  2221. operation(type) {
  2222. this.$refs.userDetails.modals = false;
  2223. if (type === 1) {
  2224. this.rechargeBnt();
  2225. } else {
  2226. this.setUser();
  2227. }
  2228. },
  2229. codeInfo(data) {
  2230. data.uid = this.userInfo ? this.userInfo.uid : 0;
  2231. data.staff_id = this.storeInfos.id;
  2232. data.tourist_uid = this.userInfo.touristId;
  2233. if (this.userInfo == null) {
  2234. this.codeNum = "";
  2235. return this.$Message.error("请添加或选择用户");
  2236. }
  2237. cashierCode(data)
  2238. .then((res) => {
  2239. this.codeNum = "";
  2240. let data = res.data;
  2241. if (data.hasOwnProperty("userInfo")) {
  2242. // 用户 Object.keys(this.userInfo).length
  2243. if (this.userInfo) {
  2244. this.$Modal.confirm({
  2245. title: "切换用户",
  2246. content: "<p>确定要切换用户吗?</p>",
  2247. onOk: () => {
  2248. this.userInfo = res.data.userInfo;
  2249. let storage = window.localStorage;
  2250. storage.setItem(
  2251. "cashierUser",
  2252. JSON.stringify(res.data.userInfo)
  2253. );
  2254. this.getCartList();
  2255. },
  2256. onCancel: () => {},
  2257. });
  2258. } else {
  2259. this.userInfo = res.data.userInfo;
  2260. let storage = window.localStorage;
  2261. storage.setItem("cashierUser", JSON.stringify(res.data.userInfo));
  2262. }
  2263. }
  2264. this.goodList();
  2265. this.getCartList();
  2266. })
  2267. .catch((err) => {
  2268. this.codeNum = "";
  2269. this.$Message.error(err.msg);
  2270. });
  2271. },
  2272. //点击分类
  2273. cateTap(item, index) {
  2274. this.currentCate = index;
  2275. this.goodFrom.cate_id = item.id;
  2276. this.goodFrom.promotions_id = 0;
  2277. this.activityFrom.type = 0;
  2278. this.activityFrom.page = 1;
  2279. this.goodFrom.page = 1;
  2280. this.goodFrom.store_name = "";
  2281. this.goodData = [];
  2282. this.activityTypeArr = [];
  2283. this.swiperClickedIndex = 0;
  2284. this.activityFrom.promotions_id = 0;
  2285. if (index !== 1) {
  2286. this.seckillId = 0;
  2287. this.goodList();
  2288. }
  2289. },
  2290. //分类列表
  2291. cateList() {
  2292. cashierCate()
  2293. .then((res) => {
  2294. let all = [{
  2295. cate_name: "全部商品",
  2296. id: "",
  2297. },
  2298. {
  2299. cate_name: "活动商品",
  2300. id: "99999",
  2301. },
  2302. ];
  2303. let data = [...all, ...res.data];
  2304. this.cateData = data;
  2305. })
  2306. .catch((err) => {
  2307. this.$Message.error(err.msg);
  2308. });
  2309. },
  2310. //商品列表
  2311. goodList(type) {
  2312. if (this.activityFrom.type) {
  2313. this.activityFrom.uid = this.userInfo ? this.userInfo.uid : 0;
  2314. this.activityFrom.type = type;
  2315. this.activityFrom.staff_id = this.storeInfos.id;
  2316. if (!this.userInfo.uid)
  2317. this.activityFrom.tourist_uid = this.userInfo.touristId;
  2318. activityList(this.activityFrom).then((res) => {
  2319. let data = res.data;
  2320. this.total = data.count;
  2321. if (this.reloading) {
  2322. this.reloading = false;
  2323. this.activityFrom.limit = this.limitTemp;
  2324. this.goodData = data.list;
  2325. } else {
  2326. this.goodData = this.goodData.concat(data.list);
  2327. }
  2328. });
  2329. } else {
  2330. this.goodFrom.uid = this.userInfo ? this.userInfo.uid : 0;
  2331. if (!this.userInfo.uid)
  2332. this.goodFrom.tourist_uid = this.userInfo.touristId;
  2333. cashierProduct(this.goodFrom)
  2334. .then((res) => {
  2335. let data = res.data;
  2336. this.total = data.count;
  2337. if (this.reloading) {
  2338. this.reloading = false;
  2339. this.goodFrom.limit = this.limitTemp;
  2340. this.goodData = data.list;
  2341. } else {
  2342. this.goodData = this.goodData.concat(data.list);
  2343. }
  2344. if (data.attrValue) {
  2345. // 加入购物车
  2346. this.attr.productSelect.unique = data.attrValue.unique;
  2347. this.productId = data.attrValue.product_id;
  2348. this.joinCart(1);
  2349. }
  2350. if (data.userInfo) {
  2351. this.modalUserInfo = data.userInfo;
  2352. this.userInfoShow = true;
  2353. }
  2354. })
  2355. .catch((err) => {
  2356. this.$Message.error(err.msg);
  2357. });
  2358. }
  2359. },
  2360. // 活动商品列表
  2361. selectaActivity(type) {
  2362. this.goodData = [];
  2363. this.activityFrom.type = type;
  2364. if (this.activityFrom.type != 5) {
  2365. this.activityTypeList(type);
  2366. }
  2367. this.goodList(type);
  2368. },
  2369. cartComputeActivity(id) {
  2370. let data = {
  2371. integral: this.integral,
  2372. coupon: this.coupon,
  2373. coupon_id: this.couponId,
  2374. cart_id: [id],
  2375. new: 1,
  2376. };
  2377. cashierCompute(this.userInfo.uid, data)
  2378. .then((res) => {
  2379. this.priceInfo = res.data;
  2380. this.unchangedPrice = this.priceInfo.payPrice || 0;
  2381. this.formItem.price = this.priceInfo.payPrice || 0;
  2382. this.tapPrice();
  2383. this.openSettle();
  2384. })
  2385. .catch((err) => {
  2386. this.$Message.error(err.msg);
  2387. this.coupon = false;
  2388. });
  2389. },
  2390. // 去凑单
  2391. collectOrder(item) {
  2392. this.currentCate = 1;
  2393. this.activityFrom.promotions_id = item.id;
  2394. this.activityFrom.page = 1;
  2395. this.activityFrom.type = item.promotions_type;
  2396. this.reloadList();
  2397. this.goodList(item.promotions_type);
  2398. },
  2399. //搜索
  2400. orderSearch() {
  2401. this.goodFrom.page = 1;
  2402. this.goodData = [];
  2403. if (this.activityFrom.type) {
  2404. this.activityFrom.page = 1;
  2405. this.activityFrom.store_name = this.goodFrom.store_name;
  2406. this.goodList(this.activityFrom.type);
  2407. } else {
  2408. this.goodFrom.page = 1;
  2409. this.goodList();
  2410. }
  2411. },
  2412. pageChange(event) {
  2413. if (Math.abs(event.target.scrollHeight - event.target.clientHeight - event.target.scrollTop) < 1) {
  2414. if (this.activityFrom.type) {
  2415. this.activityFrom.page++;
  2416. } else {
  2417. this.goodFrom.page++;
  2418. }
  2419. this.goodList(this.activityFrom.type);
  2420. }
  2421. },
  2422. // 监听键盘函数
  2423. keyboard() {
  2424. let that = this;
  2425. function delNums(item) {
  2426. that.collectionArray.pop();
  2427. that.collection = that.collectionArray.length ?
  2428. that.collectionArray.join("") :
  2429. 0;
  2430. }
  2431. document.onkeydown = function(event) {
  2432. let e = event || window.event;
  2433. let key = e.keyCode;
  2434. if (that.modalCash) {
  2435. event.stopPropagation(); // 阻止事件冒泡传递
  2436. event.preventDefault(); //阻止默认事件原有功能
  2437. }
  2438. switch (key) {
  2439. case 96:
  2440. case 48:
  2441. that.numTap(0);
  2442. break;
  2443. case 97:
  2444. case 49:
  2445. that.numTap(1);
  2446. break;
  2447. case 98:
  2448. case 50:
  2449. that.numTap(2);
  2450. break;
  2451. case 99:
  2452. case 51:
  2453. that.numTap(3);
  2454. break;
  2455. case 100:
  2456. case 52:
  2457. that.numTap(4);
  2458. break;
  2459. case 101:
  2460. case 53:
  2461. that.numTap(5);
  2462. break;
  2463. case 102:
  2464. case 54:
  2465. that.numTap(6);
  2466. break;
  2467. case 103:
  2468. case 55:
  2469. that.numTap(7);
  2470. break;
  2471. case 104:
  2472. case 56:
  2473. that.numTap(8);
  2474. break;
  2475. case 105:
  2476. case 57:
  2477. that.numTap(9);
  2478. break;
  2479. case 110:
  2480. that.numTap(".");
  2481. break;
  2482. case 190:
  2483. that.numTap(".");
  2484. break;
  2485. case 8:
  2486. delNums();
  2487. break;
  2488. }
  2489. };
  2490. },
  2491. // 打开结算抽屉
  2492. openSettle() {
  2493. this.payList.forEach((value, index, arr) => {
  2494. value.status = true;
  2495. if (value.value === 'yue' && !this.userInfo.uid) {
  2496. value.status = false;
  2497. }
  2498. if (value.status && (!index || !arr[index - 1].status)) {
  2499. this.payType = value.value;
  2500. }
  2501. });
  2502. this.yueVerify = !!this.priceInfo.is_cashier_yue_pay_verify;
  2503. this.settleMoney = this.priceInfo.payPrice;
  2504. this.collection = this.priceInfo.payPrice;
  2505. this.collectionArray = [];
  2506. this.settleVisible = true;
  2507. },
  2508. onRecharge(e) {
  2509. for (let i = 0; i < this.payList.length; i++) {
  2510. this.payList[i].status = this.payList[i].value !== 'yue';
  2511. if (!this.payList[i].status) {
  2512. continue;
  2513. }
  2514. if (!i || !this.payList[i - 1].status) {
  2515. this.payType = this.payList[i].value;
  2516. }
  2517. }
  2518. this.yueVerify = !!this.priceInfo.is_cashier_yue_pay_verify;
  2519. this.settleMoney = e.price;
  2520. this.collection = e.price;
  2521. this.rechargeData.rechar_id = e.rechar_id;
  2522. this.rechargeData.price = e.price;
  2523. this.zIndex = 1 + Number(this.$refs.recharge.$el.querySelector('.ivu-modal-mask').style.zIndex);
  2524. this.settleVisible = true;
  2525. },
  2526. activityTypeList(type) {
  2527. activityTypeList(type).then(res => {
  2528. this.activityTypeArr = [{
  2529. desc: '全部',
  2530. id: 0
  2531. },
  2532. ...res.data
  2533. ];
  2534. });
  2535. },
  2536. readySwiper(swiper) {
  2537. this.swiper = swiper;
  2538. },
  2539. clickSwiper() {
  2540. if (this.swiper.clickedIndex === undefined || this.swiper.clickedIndex === this.swiperClickedIndex) {
  2541. return false;
  2542. }
  2543. this.swiperClickedIndex = this.swiper.clickedIndex;
  2544. this.activityFrom.page = 1;
  2545. this.activityFrom.promotions_id = this.activityTypeArr[this.swiperClickedIndex].id;
  2546. this.goodData = [];
  2547. this.goodList(this.activityFrom.type);
  2548. },
  2549. // 充值余额
  2550. rechargeBalance(auth_code) {
  2551. this.rechargeData.uid = this.userInfo.uid;
  2552. this.rechargeData.pay_type = this.payType ? 4 : 3;
  2553. this.rechargeData.auth_code = auth_code || '';
  2554. userSaveApi(this.rechargeData).then((res) => {
  2555. let status = res.data.status;
  2556. switch (status) {
  2557. case 'SUCCESS':
  2558. this.$Message.success('充值成功');
  2559. this.settleVisible = false;
  2560. this.userInfoData({
  2561. uid: this.userInfo.uid
  2562. });
  2563. break;
  2564. case 'PAY_ING':
  2565. let msg = this.$Message.loading({
  2566. content: '等待支付中...',
  2567. duration: 0,
  2568. });
  2569. this.checkOrderTime(msg);
  2570. break;
  2571. default:
  2572. this.$Message.warning('支付失败');
  2573. break;
  2574. }
  2575. }).catch((err) => {
  2576. this.$Message.error(err.msg);
  2577. });
  2578. }
  2579. },
  2580. };
  2581. </script>
  2582. <style lang="stylus" scoped>
  2583. @media screen and (min-width: 2260px) {
  2584. // .goodsCon {
  2585. // .item {
  2586. // width: 19% !important;
  2587. // }
  2588. // .list:after{
  2589. // content:'';
  2590. // width: 20%;
  2591. // }
  2592. // }
  2593. }
  2594. @media screen and (max-width: 1580px) {
  2595. // .goodsCon {
  2596. // .item {
  2597. // width: 32% !important;
  2598. // }
  2599. // .list:after{
  2600. // content:'';
  2601. // width: 33%;
  2602. // }
  2603. // }
  2604. }
  2605. @media screen and (max-width: 1270px) {
  2606. // .goodsCon {
  2607. // .item {
  2608. // width: 49% !important;
  2609. // }
  2610. // }
  2611. }
  2612. ::-webkit-scrollbar-thumb {
  2613. -webkit-box-shadow: inset 0 0 6px #ccc;
  2614. }
  2615. ::-webkit-scrollbar {
  2616. width: 2px !important;
  2617. /* 对垂直流动条有效 */
  2618. }
  2619. /deep/.change-price-modal {
  2620. .ivu-modal-content {
  2621. border-radius: 10px;
  2622. }
  2623. .ivu-modal-body {
  2624. padding: 30px 25px 50px;
  2625. }
  2626. .ivu-form-item:last-child {
  2627. margin-bottom: 0;
  2628. }
  2629. .ivu-form-item-content {
  2630. font-size: 14px !important;
  2631. color: #303133;
  2632. }
  2633. .input-suffix {
  2634. color: #909399;
  2635. }
  2636. .ivu-modal-footer {
  2637. padding: 17px 25px;
  2638. border-top: none;
  2639. }
  2640. .ivu-btn {
  2641. height: 46px;
  2642. border-radius: 23px;
  2643. background: #1890FF;
  2644. font-weight: 500;
  2645. font-size: 16px !important;
  2646. }
  2647. }
  2648. .input-number {
  2649. flex: 1;
  2650. position: relative;
  2651. display: flex;
  2652. align-items: center;
  2653. padding: 0 15px 0 0;
  2654. border: 1px solid #DDDDDD;
  2655. border-radius: 4px;
  2656. .ivu-input-number {
  2657. flex: 1;
  2658. height: 36px;
  2659. border: none;
  2660. &-focused {
  2661. box-shadow: none;
  2662. }
  2663. }
  2664. /deep/.ivu-input-number-handler-wrap {
  2665. display: none;
  2666. }
  2667. /deep/.ivu-input-number-input-wrap {
  2668. height: 36px;
  2669. }
  2670. /deep/.ivu-input-number-input {
  2671. height: 36px;
  2672. padding: 0 15px;
  2673. }
  2674. &.discount {
  2675. flex: none;
  2676. width: 167px;
  2677. margin-left: 12px;
  2678. }
  2679. }
  2680. .changePrice {
  2681. font-weight: 600;
  2682. font-size: 14px;
  2683. color: #F5222D;
  2684. .price {
  2685. font-size: 17px;
  2686. margin-left: 5px;
  2687. }
  2688. }
  2689. .tableList {
  2690. /deep/ .ivu-table-header table {
  2691. border-top: 0 !important;
  2692. }
  2693. /deep/ .ivu-table th,
  2694. /deep/ .ivu-table td {
  2695. border-bottom: 0 !important;
  2696. height: 34px !important;
  2697. }
  2698. /deep/ .ivu-table-cell {
  2699. padding: 0 !important;
  2700. }
  2701. /deep/ .ivu-table th {
  2702. color: #999999;
  2703. }
  2704. }
  2705. .left {
  2706. /deep/ .ivu-form-item {
  2707. margin-bottom: 12px !important;
  2708. }
  2709. }
  2710. .header .ivu-btn {
  2711. width: 56px;
  2712. height: 28px;
  2713. border-radius: 4px;
  2714. border: 1px solid #FFFFFF;
  2715. background-color: unset !important;
  2716. color: #fff;
  2717. &:hover {
  2718. border-color: #ccc;
  2719. color: #ccc;
  2720. }
  2721. }
  2722. .headerCard {
  2723. background: #1890FF;
  2724. border-radius: 0 !important;
  2725. }
  2726. .remark {
  2727. /deep/ .ivu-input-wrapper {
  2728. width: 91% !important;
  2729. }
  2730. /deep/ .ivu-input-number {
  2731. width: 91% !important;
  2732. }
  2733. /deep/ .ivu-form-item-content {
  2734. margin-left: 63px !important;
  2735. }
  2736. /deep/ .ivu-form-item-label {
  2737. width: 63px !important;
  2738. }
  2739. }
  2740. .noCart {
  2741. height: 100%;
  2742. display: flex;
  2743. .tip {
  2744. text-align: center;
  2745. color: #ccc;
  2746. font-size: 14px;
  2747. }
  2748. .picture {
  2749. width: 200px;
  2750. height: 140px;
  2751. margin: 20px 160px;
  2752. img {
  2753. width: 100%;
  2754. height: 100%;
  2755. }
  2756. }
  2757. }
  2758. .goodsCard {
  2759. flex: 1;
  2760. max-width: 100%;
  2761. min-width: 1100px;
  2762. height: calc(100vh - 155px);
  2763. display: flex;
  2764. flex-wrap: nowrap;
  2765. padding: 20px;
  2766. background-color: #F5F5F5;
  2767. }
  2768. .modalPay {
  2769. /deep/ .ivu-modal-body {
  2770. padding: 0;
  2771. }
  2772. }
  2773. .cash {
  2774. /deep/ .ivu-modal-body {
  2775. padding: 0 !important;
  2776. }
  2777. }
  2778. .discountCon {
  2779. .item {
  2780. font-size: 15px;
  2781. margin-bottom: 10px;
  2782. }
  2783. }
  2784. .content {
  2785. height: calc(100vh - 66px);
  2786. display: flex;
  2787. flex-direction: column;
  2788. }
  2789. .cashPage {
  2790. text-align: center;
  2791. .right {
  2792. width: 488px;
  2793. background: #F5F5F5;
  2794. padding: 16px 16px 16px 0;
  2795. border-radius: 0 6px 6px 0;
  2796. /deep/ .ivu-btn-primary {
  2797. width: 100px;
  2798. }
  2799. .rightCon {
  2800. width: 388px;
  2801. height: 506px;
  2802. margin: 35px auto 20px auto;
  2803. background-color: #fff;
  2804. border-radius: 14px;
  2805. .top {
  2806. height: 80px;
  2807. color: rgba(0, 0, 0, 0.65);
  2808. font-size: 13px;
  2809. padding: 0 20px;
  2810. .num {
  2811. font-size: 42px;
  2812. color: rgba(0, 0, 0, 0.85);
  2813. }
  2814. }
  2815. .center {
  2816. width: 100%;
  2817. height: 46px;
  2818. background-color: #1890FF;
  2819. font-size: 13px;
  2820. color: #fff;
  2821. padding: 0 20px;
  2822. .num {
  2823. font-size: 27px;
  2824. }
  2825. }
  2826. .bottom {
  2827. padding: 10px 0 0 8px;
  2828. .item {
  2829. width: 108px;
  2830. height: 62px;
  2831. background: #FAFAFA;
  2832. border-radius: 9px;
  2833. border: 1px solid rgba(0, 0, 0, 0.15);
  2834. color: #1890FF;
  2835. font-size: 32px;
  2836. margin-left: 12px;
  2837. margin-top: 12px;
  2838. cursor: pointer;
  2839. &.on {
  2840. background: #1890FF;
  2841. color: #FFFFFF;
  2842. font-size: 20px;
  2843. }
  2844. &.spot {
  2845. padding-bottom: 15px;
  2846. }
  2847. }
  2848. }
  2849. }
  2850. }
  2851. .left {
  2852. width: 282px;
  2853. padding: 16px 0 16px 16px;
  2854. .picture {
  2855. width: 110px;
  2856. height: 110px;
  2857. margin: 180px auto 0 auto;
  2858. img {
  2859. width: 100%;
  2860. height: 100%;
  2861. }
  2862. }
  2863. .text {
  2864. color: rgba(0, 0, 0, 0.45);
  2865. font-size: 14px;
  2866. margin-top: 14px;
  2867. }
  2868. .money {
  2869. color: rgba(0, 0, 0, 0.85);
  2870. font-size: 18px;
  2871. .num {
  2872. font-size: 32px;
  2873. margin-left: 5px;
  2874. }
  2875. }
  2876. }
  2877. }
  2878. .payPage {
  2879. text-align: center;
  2880. padding: 16px;
  2881. /deep/ .ivu-input {
  2882. width: 394px !important;
  2883. text-align: center;
  2884. }
  2885. .header {
  2886. margin: 35px 0 3px 0;
  2887. }
  2888. .process {
  2889. width: 394px;
  2890. height: 158px;
  2891. border: 1px dashed #D8D8D8;
  2892. border-top: 1px dashed #fff;
  2893. margin: -1px auto 43px;
  2894. &.on {
  2895. border-top: 1px dashed #D8D8D8;
  2896. margin-top: 20px;
  2897. .list {
  2898. padding-left: 14px !important;
  2899. }
  2900. }
  2901. .list {
  2902. padding: 6px 10px 0 3px;
  2903. .item {
  2904. font-size: 12px;
  2905. color: #666;
  2906. .name {
  2907. color: #333;
  2908. font-size: 13px;
  2909. font-weight: bold;
  2910. }
  2911. }
  2912. }
  2913. .picture {
  2914. width: 362px;
  2915. height: 68px;
  2916. margin: 24px auto 0 auto;
  2917. img {
  2918. width: 100%;
  2919. height: 100%;
  2920. }
  2921. }
  2922. }
  2923. .picture {
  2924. width: 18px;
  2925. height: 18px;
  2926. img {
  2927. width: 100%;
  2928. height: 100%;
  2929. }
  2930. margin-right: 7px;
  2931. }
  2932. .text {
  2933. color: rgba(0, 0, 0, 0.45);
  2934. font-size: 14px;
  2935. }
  2936. .money {
  2937. font-size: 18px;
  2938. color: rgba(0, 0, 0, 0.85);
  2939. .num {
  2940. font-size: 32px;
  2941. margin-left: 5px;
  2942. }
  2943. }
  2944. .tip {
  2945. width: 310px;
  2946. height: 26px;
  2947. background: rgba(255, 126, 0, 0.1);
  2948. border-radius: 13px;
  2949. font-size: 13px;
  2950. color: #FF7E00;
  2951. margin: 10px auto 0 auto;
  2952. .icon {
  2953. font-size: 16px;
  2954. margin-right: 5px;
  2955. }
  2956. }
  2957. .bnt {
  2958. width: 394px;
  2959. height: 38px;
  2960. margin: 28px 0 15px 0;
  2961. }
  2962. }
  2963. .goods {
  2964. flex: 1;
  2965. min-width: 0;
  2966. // width: calc(100% - 500px);
  2967. height: 100%;
  2968. /deep/ .ivu-card-body {
  2969. height: 100%;
  2970. padding: 10px 0 0px 0 !important;
  2971. }
  2972. .smCode {
  2973. padding: 0 16px;
  2974. /deep/ .ivu-input-large {
  2975. height: 350px !important;
  2976. text-align: center;
  2977. font-size: 20px !important;
  2978. }
  2979. }
  2980. .goodsCon {
  2981. flex: 1;
  2982. min-width: 0;
  2983. padding: 0 20px;
  2984. height: 100%;
  2985. display: flex;
  2986. flex-direction: column;
  2987. justify-content: space-between;
  2988. /deep/ .ivu-input-group {
  2989. .ivu-input {
  2990. height: 50px;
  2991. text-align: center;
  2992. border: 0;
  2993. }
  2994. }
  2995. .input {
  2996. // padding: 20px 10px 10px 0;
  2997. /deep/ .ivu-input-group-prepend,
  2998. .ivu-input-group-append {
  2999. border: 0;
  3000. border-radius: 10px;
  3001. background-color: #FFFFFF;
  3002. }
  3003. /deep/.ivu-input-search {
  3004. border-radius: 0 10px 10px 0;
  3005. }
  3006. }
  3007. .goods-top {
  3008. flex: 1;
  3009. min-height: 0;
  3010. display: flex;
  3011. flex-direction: column;
  3012. overflow: hidden;
  3013. }
  3014. .page {
  3015. margin-top: 0;
  3016. padding: 10px 16px 10px 0;
  3017. }
  3018. .noGood {
  3019. height: 100%;
  3020. border-radius: 20px;
  3021. background: #FFFFFF;
  3022. .picture {
  3023. width: 180px;
  3024. height: 140px;
  3025. }
  3026. img {
  3027. width: 100%;
  3028. height: 100%;
  3029. }
  3030. .tip {
  3031. margin-top: 30px;
  3032. font-size: 15px;
  3033. text-align: center;
  3034. color: #ccc;
  3035. }
  3036. }
  3037. .list-wrap {
  3038. flex: 1;
  3039. min-height: 0;
  3040. padding-top: 20px;
  3041. overflow-x: hidden;
  3042. }
  3043. .list-wrap::-webkit-scrollbar {
  3044. display: none;
  3045. }
  3046. .ivu-scroll-wrapper {
  3047. flex: 1;
  3048. min-height: 0;
  3049. }
  3050. /deep/.ivu-scroll-container {
  3051. height: 100%;
  3052. }
  3053. .list {
  3054. .item {
  3055. position: relative;
  3056. padding: 10px;
  3057. border-radius: 10px;
  3058. margin-bottom: 15px;
  3059. background: #FFFFFF;
  3060. &.on:hover {
  3061. background-color: #1890FF;
  3062. color: #fff !important;
  3063. box-shadow: 0px 0px 14px 0px rgba(0, 84, 161, 0.18);
  3064. .name {
  3065. color: #fff !important;
  3066. margin-bottom: 10px;
  3067. }
  3068. .stock {
  3069. color: #fff !important;
  3070. span {
  3071. border-color: #fff !important;
  3072. }
  3073. }
  3074. .money {
  3075. color: #fff !important;
  3076. }
  3077. }
  3078. .icon-cart-num {
  3079. position: absolute;
  3080. top: -8px;
  3081. right: 0;
  3082. padding: 5px 7px 3px;
  3083. border-radius: 11px;
  3084. background: #FF7700;
  3085. font-size: 14px;
  3086. line-height: 14px;
  3087. color: #FFFFFF;
  3088. }
  3089. .no-stock {
  3090. top: 0;
  3091. left: 0;
  3092. position: absolute;
  3093. width: 100%;
  3094. height: 100%;
  3095. background: rgba(0, 0, 0, 0.2);
  3096. border-radius: 10px;
  3097. display: flex;
  3098. align-items: center;
  3099. justify-content: center;
  3100. .trip {
  3101. background: #4E4E4E;
  3102. width: 70px;
  3103. height: 70px;
  3104. border-radius: 50%;
  3105. display: flex;
  3106. align-items: center;
  3107. flex-direction: column;
  3108. justify-content: center;
  3109. color: #FFFFFF;
  3110. font-size: 14px;
  3111. }
  3112. }
  3113. .picture {
  3114. width: 100%;
  3115. height: 130px;
  3116. img {
  3117. width: 100%;
  3118. height: 100%;
  3119. border-radius: 8px;
  3120. }
  3121. }
  3122. .name {
  3123. font-size: 16px;
  3124. line-height: 16px;
  3125. color: rgba(0, 0, 0, 0.85);
  3126. margin-top: 10px;
  3127. margin-bottom: 14px;
  3128. }
  3129. .text {
  3130. display: flex;
  3131. justify-content: space-between;
  3132. max-height: 80px;
  3133. .text-left {
  3134. display: flex;
  3135. flex-direction: column;
  3136. justify-content: space-between;
  3137. }
  3138. .iconfont {
  3139. position: absolute;
  3140. color: #1890FF;
  3141. font-size: 20px;
  3142. right: 5px;
  3143. bottom: 5px;
  3144. }
  3145. .stock {
  3146. font-size: 13px;
  3147. color: #606266;
  3148. margin: 2px 0;
  3149. span {
  3150. border-radius: 3px;
  3151. border: 1px solid #606266;
  3152. padding: 3px 6px;
  3153. margin-right: 8px;
  3154. font-size: 12px;
  3155. }
  3156. }
  3157. .money {
  3158. font-weight: 500;
  3159. color: #F5222D;
  3160. font-size: 18px;
  3161. line-height: 18px;
  3162. .rmb {
  3163. font-size: 14px;
  3164. }
  3165. }
  3166. }
  3167. }
  3168. .item-shadow {
  3169. width: 150px;
  3170. }
  3171. }
  3172. }
  3173. .goodClass {
  3174. width: 140px;
  3175. overflow-y: auto;
  3176. border-radius: 20px;
  3177. padding: 20px 15px;
  3178. background-color: #FFFFFF;
  3179. .item {
  3180. cursor: pointer;
  3181. width: 110px;
  3182. height: 40px;
  3183. text-align: center;
  3184. line-height: 40px;
  3185. margin-bottom: 18px;
  3186. font-size: 16px;
  3187. color: rgba(0, 0, 0, 0.85);
  3188. border-radius: 20px;
  3189. transition: all 0.1s;
  3190. &.on {
  3191. background-color: #1890FF;
  3192. color: #fff;
  3193. }
  3194. }
  3195. .item:hover {
  3196. background-color: #1890FF;
  3197. color: #fff;
  3198. }
  3199. }
  3200. }
  3201. .conter {
  3202. height: 100%;
  3203. width: 595px;
  3204. /deep/ .ivu-card-body {
  3205. height: 100%;
  3206. padding: 0 !important;
  3207. }
  3208. .cart {
  3209. position: relative;
  3210. display: flex;
  3211. flex-direction: column;
  3212. height: 100%;
  3213. padding-top: 27px;
  3214. // max-width: 500px;
  3215. .title {
  3216. padding: 0 18px;
  3217. border: 2px solid #FF7700;
  3218. }
  3219. .left-top {
  3220. width: 100%;
  3221. height: 100%;
  3222. display: flex;
  3223. border-radius: 20px;
  3224. background-color: #FFFFFF;
  3225. overflow: hidden;
  3226. .cart {
  3227. // height: calc(100% - 82px);
  3228. flex: 1;
  3229. min-width: 0;
  3230. }
  3231. .btn-group-vertical {
  3232. display: flex;
  3233. flex-direction: column;
  3234. padding: 27px 18px;
  3235. border-left: 1px solid #EEEEEE;
  3236. overflow-x: hidden;
  3237. .ivu-btn {
  3238. flex-shrink: 0;
  3239. width: 100px;
  3240. height: 40px;
  3241. border-color: #1890FF;
  3242. border-radius: 20px;
  3243. margin-bottom: 30px;
  3244. font-size: 16px !important;
  3245. color: #1890FF;
  3246. }
  3247. .ivu-btn[disabled] {
  3248. color: #c5c8ce;
  3249. border-color: #dcdee2;
  3250. }
  3251. .ivu-btn:not([disabled]):active {
  3252. background-color: #F1F1F1;
  3253. }
  3254. .ivu-btn.selected {
  3255. background-color: #F1F1F1;
  3256. }
  3257. }
  3258. }
  3259. .cart-left {
  3260. display: flex;
  3261. flex-direction: column;
  3262. width: 100%;
  3263. height: 100%;
  3264. .count {
  3265. padding: 0px 24px 20px;
  3266. border-bottom: 1px solid #EEEEEE;
  3267. display: flex;
  3268. align-items: center;
  3269. justify-content: space-between;
  3270. .num {
  3271. color: #FF7700;
  3272. padding: 0 5px;
  3273. }
  3274. .cart-sel {
  3275. font-size: 14px;
  3276. }
  3277. .count-r {
  3278. display: flex;
  3279. align-items: center;
  3280. .coupon {
  3281. border-radius: 4px;
  3282. border: 1px solid #FF7700;
  3283. color: #FF7700;
  3284. padding: 3px 10px;
  3285. cursor: pointer;
  3286. font-size: 14px;
  3287. }
  3288. .clear {
  3289. display: flex;
  3290. align-items: center;
  3291. cursor: pointer;
  3292. font-size: 12px;
  3293. img {
  3294. width: 16px;
  3295. height: 16px;
  3296. margin: 0 6px 0 14px;
  3297. }
  3298. }
  3299. }
  3300. }
  3301. }
  3302. .tourist::-webkit-scrollbar {
  3303. height: 4px !important;
  3304. }
  3305. .tourist {
  3306. width: 100%;
  3307. padding-left: 13px;
  3308. padding-top: 15px;
  3309. display: flex;
  3310. overflow-x: auto;
  3311. overflow-y: hidden;
  3312. white-space: nowrap;
  3313. /* 解决ios手机页面滑动卡顿问题 */
  3314. -webkit-overflow-scrolling: touch;
  3315. .item-w1 {
  3316. min-width: 100px;
  3317. }
  3318. .item-w2 {
  3319. min-width: 140px;
  3320. }
  3321. .item {
  3322. height: 38px;
  3323. background: #F7F7F7;
  3324. border-radius: 50px;
  3325. font-size: 12px;
  3326. color: rgba(0, 0, 0, 0.85);
  3327. position: relative;
  3328. padding-left: 7px;
  3329. margin-bottom: 9px;
  3330. margin-right: 12px;
  3331. cursor: pointer;
  3332. .picture {
  3333. width: 24px;
  3334. height: 24px;
  3335. border-radius: 50%;
  3336. margin-right: 6px;
  3337. img {
  3338. width: 100%;
  3339. height: 100%;
  3340. border-radius: 50%;
  3341. }
  3342. }
  3343. .name {
  3344. width: 50px;
  3345. }
  3346. .guadan {
  3347. font-size: 10px;
  3348. border: 1px solid #FF7700;
  3349. color: #FF7700;
  3350. padding: 0 3px;
  3351. border-radius: 2px;
  3352. margin-right: 12px;
  3353. }
  3354. &:hover {
  3355. background: #FF7700;
  3356. color: #fff;
  3357. .guadan {
  3358. border: 1px solid #fff;
  3359. color: #fff;
  3360. }
  3361. }
  3362. &.on {
  3363. background: #FF7700;
  3364. color: #fff;
  3365. .guadan {
  3366. border: 1px solid #fff;
  3367. color: #fff;
  3368. }
  3369. }
  3370. }
  3371. }
  3372. .right {
  3373. width: 90px;
  3374. .navTabs {
  3375. position: absolute;
  3376. top: 15px;
  3377. cursor: pointer;
  3378. img {
  3379. display: block;
  3380. width: 40px;
  3381. height: 85px;
  3382. }
  3383. .label01 {
  3384. z-index: 5;
  3385. position: relative;
  3386. }
  3387. .label02 {
  3388. margin-top: -16px;
  3389. }
  3390. }
  3391. .item {
  3392. width: 72px;
  3393. background: #F2F3F5;
  3394. margin: 0 auto 13px auto;
  3395. text-align: center;
  3396. padding: 9px 0;
  3397. cursor: pointer;
  3398. position: relative;
  3399. .iconfont {
  3400. position: absolute;
  3401. font-size: 20px;
  3402. top: -9px;
  3403. right: -7px;
  3404. color: #bbb;
  3405. }
  3406. &:hover {
  3407. background-color: #1890FF;
  3408. color: #fff;
  3409. }
  3410. &.on {
  3411. background-color: #1890FF;
  3412. color: #fff;
  3413. }
  3414. }
  3415. }
  3416. .title {
  3417. // border-bottom: 1px solid #D8D8D8;
  3418. // width: 376px;
  3419. flex-shrink: 0;
  3420. height: 90px;
  3421. background: rgba(255, 119, 0, 0.05);
  3422. border-radius: 10px;
  3423. margin: 0px 24px 24px;
  3424. display: flex;
  3425. align-items: center;
  3426. flex-wrap: nowrap;
  3427. overflow: hidden;
  3428. .picture {
  3429. width: 50px;
  3430. height: 50px;
  3431. border-radius: 50%;
  3432. margin-right: 15px;
  3433. img {
  3434. width: 100%;
  3435. height: 100%;
  3436. border-radius: 50%;
  3437. }
  3438. }
  3439. .switchs {
  3440. color: #FF7700;
  3441. cursor: pointer;
  3442. // position: absolute;
  3443. // right: 19px;
  3444. // top: 10px;
  3445. a {
  3446. font-size: 14px;
  3447. color: #FF7700;
  3448. }
  3449. }
  3450. .text {
  3451. font-size: 13px;
  3452. font-weight: 400;
  3453. color: rgba(51, 51, 51, 0.85);
  3454. flex: 1;
  3455. min-width: 0;
  3456. .textCon {
  3457. margin-bottom: 6px;
  3458. display: flex;
  3459. align-items: center;
  3460. .name {
  3461. font-size: 18px;
  3462. }
  3463. .phone {
  3464. color: #999;
  3465. }
  3466. }
  3467. .text-wrap {
  3468. flex: 1;
  3469. min-width: 0;
  3470. }
  3471. .name-wrap {
  3472. display: inline-flex;
  3473. align-items: center;
  3474. max-width: 100%;
  3475. }
  3476. .user-msg {}
  3477. .balance {
  3478. margin-right: 12px;
  3479. .num {
  3480. font-weight: 600;
  3481. color: #303133;
  3482. font-size 17px;
  3483. line-height: 17px;
  3484. margin-left: 4px;
  3485. }
  3486. }
  3487. .recharge {
  3488. color: #1890FF;
  3489. padding: 2px 4px;
  3490. cursor: pointer;
  3491. border-radius: 3px;
  3492. }
  3493. .recharge:hover {
  3494. background-color: #1890FF;
  3495. color: #fff;
  3496. }
  3497. .name {
  3498. flex: 1;
  3499. min-width: 0;
  3500. overflow: hidden;
  3501. text-overflow: ellipsis;
  3502. color: rgba(0, 0, 0, 0.85);
  3503. font-size: 14px;
  3504. font-weight: 600;
  3505. margin-right: 6px;
  3506. }
  3507. }
  3508. }
  3509. .listCon {
  3510. overflow-x: hidden;
  3511. // height: calc(100% - 168px);
  3512. flex: 1;
  3513. .promotions {
  3514. border-bottom: 1px dashed #EEEEEE;
  3515. .promotions-msg {
  3516. display: flex;
  3517. justify-content: space-between;
  3518. padding: 10px 0;
  3519. color: #333333;
  3520. font-size: 14px;
  3521. border-bottom: 1px solid #f2f2f2;
  3522. .card {
  3523. color: #FF7700;
  3524. padding: 1px 6px;
  3525. margin-right: 8px;
  3526. border-radius: 3px;
  3527. background-color: #Fcf0e2;
  3528. font-size: 12px;
  3529. white-space: nowrap;
  3530. }
  3531. .flex-1 {
  3532. flex: 1;
  3533. display: flex;
  3534. align-items: center;
  3535. }
  3536. .collect {
  3537. cursor: pointer;
  3538. width: 70px;
  3539. display: flex;
  3540. align-items: center;
  3541. flex-basis: max-content;
  3542. .iconjinru {
  3543. font-size: 12px;
  3544. }
  3545. }
  3546. }
  3547. .is_give {
  3548. height: 60px;
  3549. .picture {
  3550. width: 40px;
  3551. height: 40px;
  3552. img {
  3553. width: 100%;
  3554. height: 100%;
  3555. border-radius: 5px;
  3556. }
  3557. }
  3558. .give-name {
  3559. font-size: 12px;
  3560. color: #333;
  3561. max-width: 200px;
  3562. }
  3563. .give-info {
  3564. font-size: 12px;
  3565. color: #ccc;
  3566. }
  3567. }
  3568. }
  3569. }
  3570. .list::-webkit-scrollbar {
  3571. width: 0 !important;
  3572. }
  3573. .list {
  3574. -ms-overflow-style: none;
  3575. }
  3576. .list {
  3577. overflow: -moz-scrollbars-none;
  3578. }
  3579. .list {
  3580. overflow: hidden;
  3581. overflow-y: scroll;
  3582. .item {
  3583. padding: 20px 25px;
  3584. position: relative;
  3585. display: flex;
  3586. flex-wrap: nowrap;
  3587. height: 100%;
  3588. border-radius: 10px;
  3589. &:hover {
  3590. background: rgba(24, 144, 255, 0.05);
  3591. }
  3592. /deep/ .ivu-input-number-input {
  3593. text-align: center;
  3594. }
  3595. /deep/ .ivu-input-number-controls-outside {
  3596. width: 112px !important;
  3597. }
  3598. .picture {
  3599. width: 74px;
  3600. height: 74px;
  3601. img {
  3602. width: 100%;
  3603. height: 100%;
  3604. border-radius: 5px;
  3605. }
  3606. }
  3607. .del {
  3608. position: absolute;
  3609. font-size: 15px;
  3610. color: #1890FF;
  3611. right: 25px;
  3612. top: 20px;
  3613. cursor: pointer;
  3614. padding: 2px 7px;
  3615. }
  3616. .cartBnt {
  3617. position: absolute;
  3618. right: 25px;
  3619. height: 24px;
  3620. bottom: 20px;
  3621. .iconfont {
  3622. width: 24px;
  3623. height: 24px;
  3624. background-color: #F2F3F5;
  3625. text-align: center;
  3626. line-height: 24px;
  3627. color: rgba(0, 0, 0, 0.85);
  3628. border-radius: 50%;
  3629. }
  3630. .iconjia {
  3631. color: #fff;
  3632. background-color: #1890FF;
  3633. font-size: 12px;
  3634. }
  3635. .ivu-input-number {
  3636. outline: unset;
  3637. width: 60px;
  3638. margin: 0 2px;
  3639. text-align: center;
  3640. font-size: 16px;
  3641. font-family: PingFangSC-Semibold, PingFang SC;
  3642. font-weight: 600;
  3643. color: rgba(0, 0, 0, 0.85);
  3644. border: none;
  3645. background-color: rgba(255, 255, 255, 0);
  3646. /deep/ .ivu-input-number-handler-wrap {
  3647. display: none;
  3648. }
  3649. }
  3650. }
  3651. .text {
  3652. flex: 1;
  3653. color: #000;
  3654. font-size: 18px;
  3655. margin-left: 10px;
  3656. display: flex;
  3657. flex-direction: column;
  3658. justify-content: space-between;
  3659. height: 100%;
  3660. overflow: hidden;
  3661. .end {
  3662. color: #999;
  3663. font-size: 13px;
  3664. }
  3665. .name {
  3666. font-size: 15px;
  3667. margin-top: 5px;
  3668. width: 82%;
  3669. }
  3670. .info {
  3671. color: #999;
  3672. font-size: 12px;
  3673. cursor: pointer;
  3674. padding: 4px 0 7px 0;
  3675. display: flex;
  3676. align-items: center;
  3677. .iconfont {
  3678. font-size: 12px;
  3679. margin-left: 5px;
  3680. }
  3681. .suk {
  3682. max-width: 50%;
  3683. }
  3684. }
  3685. .sum_price {
  3686. font-size: 16px;
  3687. font-weight: 500;
  3688. color: rgba(0, 0, 0, 0.85);
  3689. }
  3690. &.invalid {
  3691. .info {
  3692. cursor: unset;
  3693. display: flex;
  3694. align-items: center;
  3695. }
  3696. .suk {
  3697. max-width: 50%;
  3698. }
  3699. .name {
  3700. color: #999;
  3701. }
  3702. }
  3703. }
  3704. }
  3705. }
  3706. .left {
  3707. width: 100%;
  3708. height: 70px;
  3709. display: flex;
  3710. align-items: center;
  3711. background-color: #fff;
  3712. padding: 0 30px 0 24px;
  3713. }
  3714. .conInfo {
  3715. display: flex;
  3716. justify-content: space-between;
  3717. align-items: center;
  3718. width: 100%;
  3719. color: #000;
  3720. .storeBnt-wrap {
  3721. flex: 1;
  3722. }
  3723. .right {
  3724. flex: 1;
  3725. display: flex;
  3726. width: max-content;
  3727. align-items: baseline;
  3728. font-size: 14px;
  3729. flex-wrap: nowrap;
  3730. white-space: nowrap;
  3731. div {
  3732. white-space: nowrap;
  3733. }
  3734. .rmb {
  3735. font-weight: 600;
  3736. font-size: 16px;
  3737. color: rgba(245, 34, 45, 1);
  3738. }
  3739. .discount {
  3740. font-size: 14px;
  3741. padding: 0 9px
  3742. }
  3743. .detailed {
  3744. color: #1890FF;
  3745. padding: 0 9px 0 3px;
  3746. cursor: pointer;
  3747. }
  3748. .num {
  3749. color: rgba(245, 34, 45, 1);
  3750. font-size: 24px;
  3751. line-height: 22px;
  3752. font-weight: 600;
  3753. white-space: nowrap;
  3754. }
  3755. }
  3756. .num {
  3757. font-size: 24px;
  3758. }
  3759. }
  3760. .footer {
  3761. box-shadow: 0 -1px 11px 0 rgba(0, 0, 0, 0.06);
  3762. .footer-bottom {
  3763. display: flex;
  3764. align-items: center;
  3765. height: 88px;
  3766. padding: 0 24px;
  3767. border-top: 1px solid #EEEEEE;
  3768. .ivu-btn {
  3769. flex: 1;
  3770. height: 50px;
  3771. border-color: #1890FF;
  3772. border-radius: 25px;
  3773. background-color: #1890FF;
  3774. font-weight: 500;
  3775. font-size: 18px !important;
  3776. color: #FFFFFF;
  3777. }
  3778. }
  3779. }
  3780. }
  3781. .title {
  3782. color: rgba(0, 0, 0, 0.85);
  3783. .text {
  3784. font-size: 16px;
  3785. font-weight: 500;
  3786. }
  3787. .picture {
  3788. width: 32px;
  3789. height: 32px;
  3790. border-radius: 50%;
  3791. cursor: pointer;
  3792. img {
  3793. width: 100%;
  3794. height: 100%;
  3795. border-radius: 50%;
  3796. }
  3797. }
  3798. .info {
  3799. font-size: 14px;
  3800. margin-left: 8px;
  3801. cursor: pointer;
  3802. .iconfont {
  3803. font-size: 12px;
  3804. margin-left: 5px;
  3805. }
  3806. &:hover {
  3807. color: #2d8cf0;
  3808. }
  3809. }
  3810. }
  3811. }
  3812. .header {
  3813. color: #fff;
  3814. .title {
  3815. font-size: 18px;
  3816. font-weight: 500;
  3817. }
  3818. .right {
  3819. .picture {
  3820. width: 32px;
  3821. height: 32px;
  3822. border-radius: 50%;
  3823. img {
  3824. width: 100%;
  3825. height: 100%;
  3826. border-radius: 50%;
  3827. }
  3828. }
  3829. .storeBnt {
  3830. width: 80px;
  3831. height: 32px;
  3832. background: #FFFFFF;
  3833. border-radius: 1px;
  3834. color: #1890FF;
  3835. font-size: 14px;
  3836. text-align: center;
  3837. line-height: 32px;
  3838. margin-left: 10px;
  3839. cursor: pointer;
  3840. &:hover {
  3841. background-color: rgba(255, 255, 255, 0.9);
  3842. }
  3843. }
  3844. .info {
  3845. font-size: 14px;
  3846. font-weight: 400;
  3847. color: #fff;
  3848. span {
  3849. padding: 0 8px;
  3850. &~span {
  3851. border-left: 1px solid #DDDDDD;
  3852. }
  3853. }
  3854. }
  3855. .bnt {
  3856. margin-left: 20px;
  3857. }
  3858. }
  3859. }
  3860. footer {
  3861. display: flex;
  3862. background-color: #fff;
  3863. .footer {
  3864. width: 500px;
  3865. padding: 13px 17px 13px 17px;
  3866. .pay {
  3867. .bnt {
  3868. border-radius: 6px;
  3869. width: 30%;
  3870. height: 0.32rem;
  3871. border: 1px solid #1890FF;
  3872. color: #1890FF;
  3873. font-size: 0.11rem;
  3874. text-align: center;
  3875. font-weight: 500;
  3876. cursor: pointer;
  3877. &.on {
  3878. background: #1890FF;
  3879. color: #fff;
  3880. }
  3881. &.bntUid {
  3882. background: #1890FF;
  3883. color: #fff;
  3884. cursor: unset;
  3885. &.on {
  3886. background: #ccc;
  3887. border: 1px solid #ccc;
  3888. color: #fff;
  3889. }
  3890. }
  3891. }
  3892. &.noCart {
  3893. .bnt {
  3894. border: 1px solid #ccc !important;
  3895. color: #ccc;
  3896. cursor: unset;
  3897. &.on {
  3898. border: 1px solid #1890FF;
  3899. background: #ccc;
  3900. color: #fff;
  3901. }
  3902. }
  3903. }
  3904. }
  3905. }
  3906. .right {
  3907. padding: 10px 17px 15px 17px;
  3908. border-radius: 0 6px 6px 0;
  3909. display: flex;
  3910. flex: 1;
  3911. box-shadow: 5px 0px 14px 0px rgba(0, 0, 0, 0.06);
  3912. background-color: #fff;
  3913. /deep/ .ivu-btn-primary {
  3914. width: 100px;
  3915. }
  3916. .rightCon {
  3917. display: flex;
  3918. align-items: center;
  3919. .top {
  3920. height: 80px;
  3921. color: rgba(0, 0, 0, 0.65);
  3922. font-size: 13px;
  3923. padding: 0 20px;
  3924. .num {
  3925. font-size: 42px;
  3926. color: rgba(0, 0, 0, 0.85);
  3927. }
  3928. }
  3929. .center {
  3930. width: 100%;
  3931. height: 46px;
  3932. background-color: #1890FF;
  3933. font-size: 13px;
  3934. color: #fff;
  3935. padding: 0 20px;
  3936. .num {
  3937. font-size: 27px;
  3938. }
  3939. }
  3940. .item {
  3941. width: 80px;
  3942. height: 46px;
  3943. display: flex;
  3944. align-items: center;
  3945. justify-content: center;
  3946. background: #F2F3F5;
  3947. color: #fff;
  3948. cursor: unset;
  3949. border-radius: 4px;
  3950. margin-right: 14px;
  3951. cursor: pointer;
  3952. color: #000000;
  3953. font-size: 17px;
  3954. &.on {
  3955. background: #E7F3FF;
  3956. color: #1890FF;
  3957. font-size: 17px;
  3958. font-weight: 400;
  3959. }
  3960. &.spot {
  3961. padding-bottom: 15px;
  3962. }
  3963. }
  3964. .bottom {
  3965. padding: 10px 0 0 8px;
  3966. }
  3967. }
  3968. .noCart {
  3969. display: flex;
  3970. align-items: center;
  3971. .item {
  3972. background: #ccc;
  3973. color: #fff;
  3974. cursor: unset;
  3975. width: 80px;
  3976. height: 46px;
  3977. display: flex;
  3978. align-items: center;
  3979. justify-content: center;
  3980. margin-right: 14px;
  3981. border-radius: 4px;
  3982. font-size: 16px;
  3983. &:nth-child(3) {
  3984. &:hover {
  3985. background-color: #ccc;
  3986. }
  3987. }
  3988. &:nth-child(4) {
  3989. &:hover {
  3990. background-color: #ccc;
  3991. }
  3992. }
  3993. &:nth-child(5) {
  3994. &:hover {
  3995. background-color: #ccc;
  3996. }
  3997. }
  3998. &.on {
  3999. background-color: #ccc;
  4000. }
  4001. }
  4002. }
  4003. }
  4004. }
  4005. /deep/ .ivu-page {
  4006. font-size: 15px;
  4007. }
  4008. .payModal {
  4009. display: flex;
  4010. align-items: center;
  4011. justify-content: center;
  4012. padding: 67px 52px;
  4013. .type {
  4014. display: flex;
  4015. flex-direction: column;
  4016. align-items: center;
  4017. border: 1px solid #1890FF;
  4018. padding: 33px 37px;
  4019. border-radius: 6px;
  4020. margin: 0 15px;
  4021. cursor: pointer;
  4022. .img {
  4023. width: 66px;
  4024. height: 55px;
  4025. margin-bottom: 33px;
  4026. img {
  4027. width: 100%;
  4028. }
  4029. }
  4030. .text {
  4031. white-space: nowrap;
  4032. }
  4033. }
  4034. .type:hover {
  4035. background-color: #f2f2f2;
  4036. }
  4037. }
  4038. .goast {
  4039. background: rgba(24, 144, 255, 0.1) !important;
  4040. color: #1890FF !important;
  4041. }
  4042. .v-center {
  4043. margin-top: 100px;
  4044. }
  4045. .search_user_info {
  4046. display: flex;
  4047. flex-direction: column;
  4048. align-items: center;
  4049. justify-content: center;
  4050. .picture {
  4051. width: 110px;
  4052. height: 110px;
  4053. margin: 20px 0 20px;
  4054. img {
  4055. width: 100%;
  4056. height: 100%;
  4057. border-radius: 50%;
  4058. }
  4059. }
  4060. .user_name {
  4061. font-size: 18px;
  4062. font-weight: 600;
  4063. color: rgba(0, 0, 0, 0.85);
  4064. margin-bottom: 14px;
  4065. }
  4066. .user_id {
  4067. font-size: 12px;
  4068. font-weight: 400;
  4069. color: #999999;
  4070. }
  4071. .user_phone {
  4072. font-size: 14px;
  4073. font-weight: 400;
  4074. color: rgba(0, 0, 0, 0.85);
  4075. margin: 14px 0 40px;
  4076. }
  4077. .sure_btn {
  4078. width: 176px;
  4079. height: 46px;
  4080. line-height: 46px;
  4081. text-align: center;
  4082. color: #fff;
  4083. font-size: 16px;
  4084. background: #1890FF;
  4085. border-radius: 6px;
  4086. margin-bottom: 30px;
  4087. }
  4088. }
  4089. /deep/.remarks-modal {
  4090. .ivu-modal-content {
  4091. border-radius: 10px;
  4092. }
  4093. .ivu-modal-body {
  4094. padding: 20px 25px;
  4095. }
  4096. .ivu-input {
  4097. padding: 14px;
  4098. border: 1px solid #DDDDDD;
  4099. border-radius: 6px;
  4100. &:focus {
  4101. border-color: #1890FF;
  4102. box-shadow: none;
  4103. }
  4104. }
  4105. .ivu-input-word-count {
  4106. right: 14px;
  4107. bottom: 14px;
  4108. }
  4109. .ivu-modal-footer {
  4110. padding: 17px 25px;
  4111. border-top: none;
  4112. }
  4113. .ivu-btn {
  4114. height: 46px;
  4115. border-radius: 23px;
  4116. background: #1890FF;
  4117. font-weight: 500;
  4118. font-size: 16px !important;
  4119. }
  4120. }
  4121. /deep/.user-modal {
  4122. .ivu-modal-content {
  4123. border-radius: 10px;
  4124. }
  4125. }
  4126. .swiper-container {
  4127. width: 100%;
  4128. margin-top: 20px;
  4129. }
  4130. .swiper-slide {
  4131. width: auto;
  4132. height: 36px;
  4133. padding: 0 16px;
  4134. border: 1px solid #CCCCCC;
  4135. border-radius: 18px;
  4136. background: #F7FBFF;
  4137. font-size: 14px;
  4138. line-height: 36px;
  4139. color: #666666;
  4140. cursor: pointer;
  4141. &.active {
  4142. border: 1px solid #1890FF;
  4143. color: #1890FF;
  4144. }
  4145. }
  4146. .ivu-alert {
  4147. padding: 20px 18px;
  4148. border: 1px solid #1890FF;
  4149. border-radius: 10px;
  4150. margin-top: 20px;
  4151. background: #F7FBFF;
  4152. font-size: 14px;
  4153. line-height: 22px;
  4154. color: #1890FF;
  4155. }
  4156. </style>