index.vue 109 KB

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