cart.vue 43 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588
  1. <template>
  2. <view class="container cart clearfix">
  3. <tui-skeleton v-if="skeletonShow" backgroundColor="#fafafa" borderRadius="10rpx" :isLoading ="true" :loadingType="5"></tui-skeleton>
  4. <view class="foot-check-delbtn" v-if="!isshowDelbtn && goodsList.length>0" :style="{top:CustomBar+'px'}">
  5. <view class="foot-text">共<text>{{kindCount}}</text>件商品</view>
  6. <view class="delBtn" @tap.stop="showDelManager">删除</view>
  7. </view>
  8. <view class="container-cart-main tui-skeleton" :style="{paddingTop:isshowDelbtn ? '0rpx':'80rpx'}">
  9. <view v-if="!isEmpty" class="container-cart">
  10. <scroll-view class="cart-content" scroll-y @scrolltolower="toLower">
  11. <view class="goods-list">
  12. <view v-for="(item, index) in goodsList" :key="index" class="goods-item">
  13. <view class="shoptitle">
  14. <!--选择商店的全部商品 :disabled="isNnder"-->
  15. <view class="checkbox-box" @click.stop="checkShop(item)">
  16. <view class="checkbox iconfont" :class="[item.isChecked ?'icon-yixuanze':'icon-weixuanze']"></view>
  17. </view>
  18. <view v-if="item.promotions" class="floor-item-act">
  19. <view class="floor-tags" @click.stop="clickPopupShow(item,2)">{{item.promotions.name}}</view>
  20. </view>
  21. <view class="text">{{item.shopName}}</view>
  22. </view>
  23. <view class="productlist">
  24. <view class="goods-pros" v-for="(pros,idx) in item.cartList" :key="idx">
  25. <view class="goods-pros-t">
  26. <!--选择商品-->
  27. <view class="checkbox-box" @click.stop="ischeck(item,pros,idx)">
  28. <view class="checkbox iconfont" :class="[pros.isChecked ?'icon-yixuanze':'icon-weixuanze']"></view>
  29. </view>
  30. <view class="pros-img" @click.stop="navToListPage(pros.productId)">
  31. <image :src="pros.image ? pros.image :''" alt="" />
  32. </view>
  33. <view class="pros-product">
  34. <view class="producttitle" @click.stop="navToListPage(pros.productId)" >
  35. {{pros.name}}
  36. </view>
  37. <view class="productspec">规格:{{pros.unit ? pros.unit : ''}}</view>
  38. <view class="productspec" v-if="pros.productCode!=''&&pros.productCode!=null">
  39. <view bgcolor="#666666">商品编码:{{pros.productCode}}</view>
  40. </view>
  41. <view class="productprice">
  42. <!--使用过滤器对总价改变-->
  43. <view class="price" :class="PromotionsFormat(pros.promotions) ? 'disabled' : ''">
  44. <text>¥</text>
  45. {{ (PromotionsFormat(pros.promotions) ? pros.originalPrice : pros.price) | NumFormat }}
  46. </view>
  47. <view class="count" :class="[isshowDelbtn ? 'none':'show']">
  48. <text class="count-tips" v-if="pros.number<pros.min">起订量:{{pros.min}}</text>
  49. <text class="count-tips step" v-if="pros.isStep">购买量必须为起订量的整数倍</text>
  50. <view class="number-box">
  51. <view class="iconfont icon-jianhao" @click="changeCountSub(item,pros)"></view>
  52. <input class="btn-input" type="number" maxlength='6' v-model="pros.number" @blur="changeNnmber($event,item,pros)">
  53. <view class="iconfont icon-jiahao" @click="changeCountAdd(item,pros)"></view>
  54. </view>
  55. </view>
  56. </view>
  57. <view v-show="pros.actStatus==1" class="floor-item-act">
  58. <view v-if="PromotionsFormat(pros.promotions)" class="floor-tags" @click.stop="clickPopupShow(pros,1)">
  59. {{pros.promotions.name}}
  60. <text v-if ="pros.promotions!=null && pros.promotions.type!=3">
  61. :¥{{ pros.promotions == null ? '0.00' : pros.promotions.touchPrice | NumFormat}}
  62. </text>
  63. </view>
  64. <view v-else-if="pros.promotions.type!=3" class="floor-tags" @click.stop="clickPopupShow(pros,2)">
  65. {{pros.promotions.name}}
  66. </view>
  67. </view>
  68. <view v-if="pros.actStatus == null && pros.ladderFlag == 1" class="floor-item-act">
  69. <view class="floor-tags" @click.stop="clickPopupShow(pros,2)">阶梯价格</view>
  70. </view>
  71. </view>
  72. </view>
  73. </view>
  74. </view>
  75. <view class="goods-pros-b clearfix" :class="[isshowDelbtn ? 'none':'show']" >
  76. <view class="sum-none" v-if="item.reducedPrice>0">
  77. <text class="money-sign">¥</text>
  78. <text class="money">{{ item.totalOriginalPrice | NumFormat }}</text>
  79. <text class="money-reduced">减<text>¥{{ item.reducedPrice | NumFormat}}</text></text>
  80. </view>
  81. <view class="sum">合计:<text class="money"><text class="money-sign">¥</text>{{item.totalPrice | NumFormat}}</text></view>
  82. </view>
  83. </view>
  84. </view>
  85. <view class="failure-list" v-if="failureList.length>0">
  86. <view class="failure-title">
  87. <view class="title-txt">失效商品<text>{{failureList.length}}件</text></view>
  88. <view class="title-btn" @click.stop="deletefailureList"><text class="butto">清空失效商品</text></view>
  89. </view>
  90. <view class="productlist">
  91. <view class="goods-pros" v-for="(failure,failureIdx) in failureList" :key="failureIdx" >
  92. <view class="goods-pros-t" @click.stop="failureToProduct(failure)">
  93. <!--选择商品-->
  94. <view class="checkbox-box" @click.stop="ischeckFailure(failure)" v-if="isshowDelbtn">
  95. <button class="checkbox iconfont"
  96. :class="[ failure.isChecked ? 'icon-yixuanze':'icon-weixuanze']">
  97. </button>
  98. </view>
  99. <text class="img-tip">失效</text>
  100. <view class="pros-img">
  101. <image :src="failure.mainImage ? failure.mainImage:''" alt="" />
  102. </view>
  103. <view class="pros-product">
  104. <view class="producttitle">{{failure.name}}</view>
  105. <view class="productspec">规格:{{failure.unit ? failure.unit : ''}}</view>
  106. <view class="productstate">{{failureStateText(failure.validFlag)}}</view>
  107. </view>
  108. <view class="pros-marks" v-if="failure.isFailureLayer"></view>
  109. <!--</view>-->
  110. </view>
  111. </view>
  112. </view>
  113. </view>
  114. <!--加载loadding-->
  115. <tui-loadmore :visible="loadding" :index="3" type="black"></tui-loadmore>
  116. <tui-nomore :visible="!pullUpOn" :backgroundColor="'#ffffff'" :text='nomoreText'></tui-nomore>
  117. <!--加载loadding-->
  118. </scroll-view>
  119. <!-- 脚部菜单 -->
  120. <view class="footer" :style="{paddingBottom :isIphoneX ? '68rpx' : '0rpx'}">
  121. <view class="footer-le">
  122. <view class="foot-check checkbox-box" @tap.stop="checkAll()">
  123. <button class="checkbox iconfont" :class="[isCheckAll?'icon-yixuanze':'icon-weixuanze']"></button>
  124. <view class="text">全选</view>
  125. </view>
  126. <view class="sum">
  127. <view class="sum-none" v-if="reducedPrice>0">
  128. <text class="money-sign">¥</text>
  129. <text class="money">{{ totalOriginalPrice | NumFormat }}</text>
  130. <text class="money-reduced">减<text>¥{{ reducedPrice | NumFormat}}</text></text>
  131. </view>
  132. <view class="sum-price" :class="reducedPrice == 0 ? 'none' : ''">
  133. 总价:<text class="money-sign">¥</text><text class="money">{{allPrice | NumFormat}}</text>
  134. </view>
  135. </view>
  136. </view>
  137. <view v-if="!isshowDelbtn" class="footer-ri" >
  138. <view class="btn hanld-btn" @tap="toConfirmation">去结算({{allCount}})</view>
  139. </view>
  140. <view v-else class="footer-del">
  141. <view class="btn btn-cancel" @tap.stop="hideDelManage">取消</view>
  142. <view class="btn btn-confirm" @tap.stop="deleteList">删除</view>
  143. </view>
  144. </view>
  145. </view>
  146. <view v-if="isEmpty" class="cart-content empty">
  147. <view class="empty-container">
  148. <image class="empty-container-image" src="https://img.caimei365.com/group1/M00/03/71/Cmis2F3wna6AWdWzAAGlgAP0das422.png" mode="aspectFit"></image>
  149. <text class="error-text">购物车空空如也~</text>
  150. </view>
  151. </view>
  152. </view>
  153. <!-- 促销活动弹窗 -->
  154. <activi-popup :product="handlerPros" :popupShow="popupShow"></activi-popup>
  155. <!-- 透明模态层 -->
  156. <modal-layer v-if='modallayer'></modal-layer>
  157. </view>
  158. </template>
  159. <script>
  160. import tuiSkeleton from '@/components/tui-skeleton/tui-skeleton'
  161. import tuiLoadmore from '@/components/tui-components/loadmore/loadmore'
  162. import tuiNomore from '@/components/tui-components/nomore/nomore'
  163. import activiPopup from '@/components/cm-module/productDetails/cm-activipopu'
  164. import modalLayer from '@/components/modal-layer'
  165. import { mapState,mapMutations } from 'vuex'
  166. const defaultListQuery = {
  167. clubId:0, // 机构Id
  168. serviceProviderId:0, //协销Id
  169. againBuyProductIds:'',// 再次购买商品ids
  170. pageNum:1, // 页码
  171. pageSize:10, // 条数
  172. }
  173. export default{
  174. components:{
  175. tuiSkeleton,
  176. tuiLoadmore,
  177. tuiNomore,
  178. activiPopup,
  179. modalLayer
  180. },
  181. data(){
  182. return{
  183. kindCount:0,
  184. isStock:'',
  185. popupShow:false,
  186. listQuery: Object.assign({}, defaultListQuery), // 购物车立即结算确认订单参数
  187. handlerPros:{},//监听单挑促销商品
  188. promotionsList:[],//促销活动列表
  189. failureList:[], //失效商品列表
  190. goodsList:[], //购物车的商品
  191. delGoodsList:'',//要删除的商品
  192. setGoodData:'', //确认订单的商品
  193. isCheckAll:false,//是否全选
  194. totalOriginalPrice:0,//所有原价价
  195. reducedPrice:0,//满减
  196. allPrice:0,//所有价格
  197. allCount:0,//被选中的产品数量
  198. isModallayer:false,
  199. skeletonShow:true,
  200. isshowDelbtn:false,
  201. isDisabled: false, // 供应商/店铺全选是否禁用状态
  202. isEmpty:false,//显示空购物车
  203. scrollHeight: 'auto',
  204. nomoreText: '上拉显示更多',
  205. hasNextPage: false,
  206. loadding: false,
  207. pullUpOn: true,
  208. pullFlag: true,
  209. submitIds:[],
  210. depositIds : [6060,6061,6062,6063,6064],//定金商品ID
  211. rechargeIds : [6065,6066,6067,6068,6069],//充值余额商品ID
  212. isIphoneX:this.$store.state.isIphoneX,
  213. }
  214. },
  215. onLoad(){
  216. this.setScrollHeight()
  217. },
  218. computed: {
  219. ...mapState(['hasLogin','userInfo'])
  220. },
  221. filters:{
  222. NumFormat(value) {//处理金额
  223. return Number(value).toFixed(2)
  224. },
  225. totalprice(val,count){//单件商品的价格 × 数量
  226. return (val * count).toFixed(2)
  227. }
  228. },
  229. methods:{
  230. initData(){
  231. this.isModallayer = false //遮罩层 防止多次点击
  232. this.skeletonShow = true //预加载圆圈
  233. this.isCheckAll=false//是否全选
  234. this.submitIds = []
  235. this.$api.getStorage().then((resolve) => {
  236. this.listQuery.serviceProviderId = resolve.serviceProviderId ? resolve.serviceProviderId : 0
  237. this.initGetCartGoodsList()
  238. this.getClubProductNum()
  239. })
  240. },
  241. initLogin(){
  242. this.$api.redirectTo('/pages/login/login?type=4')
  243. },
  244. clickPopupShow(pros,type){//显示活动弹窗
  245. this.popupShow = true
  246. this.handlerPros = pros
  247. },
  248. failureToProduct(failure){
  249. if(failure.status == 1){
  250. this.$util.msg('商品已丢失,不能查看',2000)
  251. return
  252. }else if(failure.status == 2){
  253. this.$util.msg('商品已停售,不能查看',2000)
  254. return
  255. }else{
  256. this.isModallayer = true
  257. this.$api.navigateTo(`/pages/goods/product?id=${failure.productId}`)
  258. }
  259. },
  260. failureStateText(state){
  261. let stateText = '',
  262. stateTextObject={
  263. 0:'商品已停售',
  264. 10:'商品已丢失'
  265. }
  266. Object.keys(stateTextObject).forEach(key => {
  267. if(key == state){
  268. stateText = stateTextObject[key]
  269. }
  270. })
  271. return stateText
  272. },
  273. deletefailureList(){
  274. this.failureList.forEach(failure=>{ this.delGoodsList += failure.sellerCartId+',' })
  275. this.$util.modal('','确定清空全部失效商品吗?','确定','取消',true,() =>{
  276. console.log(this.delGoodsList)
  277. this.SellerService.SellerCartdelete({sellerCartIds:this.delGoodsList}).then(response =>{
  278. console.log(response)
  279. this.$util.msg('删除成功',2000)
  280. setTimeout(()=>{
  281. this.isshowDelbtn = false
  282. this.initGetCartGoodsList()
  283. },2000)
  284. }).catch(error =>{
  285. this.$util.msg(error.msg,2000)
  286. })
  287. })
  288. },
  289. setScrollHeight() {
  290. // 窗口高度-footer高度
  291. const {windowHeight, pixelRatio} = uni.getSystemInfoSync()
  292. setTimeout(()=> {
  293. const query = uni.createSelectorQuery().in(this)
  294. query.selectAll('.footer').boundingClientRect()
  295. query.exec(res => {
  296. this.windowHeight = windowHeight
  297. if(res[0][0]) {
  298. this.scrollHeight = windowHeight - res[0][0].height
  299. }
  300. })
  301. }, 500)
  302. },
  303. initGetCartGoodsList(){//初始化购物车 index:1
  304. this.SellerService.GetSellerShoppingInfo(this.listQuery).then(response =>{
  305. this.skeletonShow = false
  306. let data = response.data
  307. let dataPage = data.pageDate
  308. this.promotionsList = data.promotionsList
  309. if(dataPage.list.length > 0||data.invalidProductList.length>0){
  310. this.isEmpty =false
  311. }else{
  312. this.isEmpty =true
  313. }
  314. if(dataPage.list && dataPage.list.length > 0){
  315. this.hasNextPage = dataPage.hasNextPage
  316. this.goodsList = dataPage.list
  317. this.goodsList.forEach((item,index) => {
  318. let cartListLength = item.cartList.length,invalidLength = 0
  319. item.cartList.forEach(pros => {
  320. pros.shopId = item.shopId
  321. pros.isStep = false
  322. if(pros.step === 2){
  323. if(pros.number % pros.min != 0){
  324. pros.number = pros.min
  325. this.totalShopPeice()
  326. this.updateShoppogNum(pros)
  327. }
  328. }
  329. })
  330. })
  331. this.totalShopPeice()
  332. this.pullFlag = false
  333. setTimeout(()=>{this.pullFlag = true},500)
  334. if(this.hasNextPage){
  335. this.pullUpOn = false
  336. this.nomoreText = '上拉显示更多'
  337. }else{
  338. if(this.goodsList.length < 4){
  339. this.pullUpOn = true
  340. }else{
  341. this.pullUpOn = false
  342. this.nomoreText = '已至底部'
  343. }
  344. }
  345. } else {
  346. this.goodsList = []
  347. }
  348. if( response.data.invalidProductList && response.data.invalidProductList.length > 0){
  349. let newFailureList = [],isFailureLayer
  350. response.data.invalidProductList.forEach((failure,index) => {
  351. if(failure.validFlag == 0 || failure.validFlag == 10) {
  352. isFailureLayer = true
  353. }else{
  354. isFailureLayer = false
  355. }
  356. newFailureList.push(Object.assign({},failure,{isFailureLayer:isFailureLayer}))
  357. })
  358. this.failureList = newFailureList
  359. console.log(this.failureList)
  360. } else {
  361. this.failureList = []
  362. }
  363. }).catch(error =>{
  364. this.$util.msg(error.msg,2000)
  365. })
  366. },
  367. getOnReachBottomData(){//上拉加载
  368. this.listQuery.pageNum+=1
  369. this.SellerService.GetSellerShoppingInfo(this.listQuery).then(response =>{
  370. let resultsData = response.data.pageDate
  371. this.promotionsList = response.data.promotionsList
  372. this.hasNextPage = resultsData.hasNextPage
  373. this.goodsList = this.goodsList.concat(resultsData.results)
  374. this.goodsList.forEach((item,index) => {
  375. let productsListLength = item.cartList.length,invalidLength = 0
  376. item.cartList.forEach(pros => {
  377. pros.shopId = item.shopId
  378. pros.isStep = false
  379. if(pros.step === 2){
  380. if(pros.number % pros.min != 0){
  381. pros.number = pros.min
  382. this.totalShopPeice()
  383. this.updateShoppogNum(pros)
  384. }
  385. }
  386. })
  387. })
  388. this.totalShopPeice()
  389. this.pullFlag = false// 防上拉暴滑
  390. setTimeout(()=>{this.pullFlag = true},500)
  391. if(this.hasNextPage){
  392. this.pullUpOn = false
  393. this.nomoreText = '上拉显示更多'
  394. }else{
  395. this.loadding = false
  396. this.pullUpOn = false
  397. this.nomoreText = '已至底部'
  398. }
  399. }).catch(error =>{
  400. this.$util.msg(error.msg,2000)
  401. })
  402. },
  403. getClubProductNum(){// 获取协销下机构购物车数量
  404. this.SellerService.GetSellerProductNum(
  405. {
  406. clubId:this.listQuery.clubId,
  407. serviceProviderId:this.listQuery.serviceProviderId,
  408. }
  409. ).then(response =>{
  410. this.kindCount = response.data
  411. })
  412. },
  413. ischeck(item,pro){//为未选中的时候改变为true,反之为true
  414. pro.isChecked = !pro.isChecked
  415. if(pro.isChecked) {
  416. if(!this.submitIds.includes(pro.productId*1)){
  417. this.submitIds.push(pro.productId)
  418. }
  419. } else {
  420. var lent = this.submitIds.indexOf(pro.productId*1)
  421. if(lent >=0 ){
  422. this.submitIds.splice(lent, 1)
  423. }
  424. }
  425. this.updateProductCheckedAllBtn(item)
  426. this.updateCheckAllBtn()
  427. },
  428. updateProductCheckedAllBtn(item) {// 单独每个供应商的勾选判断
  429. let productsList = item.cartList,
  430. productsCheckedLength = 0,
  431. disabledLength = 0
  432. if(this.isshowDelbtn) {
  433. productsList.forEach(pros => {
  434. if(pros.isChecked) {
  435. productsCheckedLength++
  436. }
  437. })
  438. } else {
  439. productsList.forEach(pros => {
  440. if(pros.isChecked) {
  441. productsCheckedLength++
  442. }
  443. })
  444. }
  445. item.isChecked = productsCheckedLength === productsList.length - disabledLength
  446. },
  447. updateCheckAllBtn() {// 全选勾选判断
  448. let goodsCheckedLength = 0,
  449. disabledListLength = 0,
  450. goodsList = this.goodsList
  451. goodsList.forEach(item => {
  452. if(item.isChecked) {
  453. goodsCheckedLength++
  454. }
  455. })
  456. this.isCheckAll = goodsCheckedLength === goodsList.length - disabledListLength
  457. },
  458. checkShop(item){//与单选商品类似
  459. item.isChecked = !item.isChecked
  460. this.setProductChecked(item)
  461. this.updateCheckAllBtn()
  462. },
  463. setProductChecked(item) {
  464. item.cartList.forEach(pros=>{
  465. if(item.isChecked) {
  466. pros.isChecked = true
  467. if(!this.submitIds.includes(pros.productId*1)){
  468. this.submitIds.push(pros.productId)
  469. }
  470. } else {
  471. pros.isChecked = false
  472. var lent = this.submitIds.indexOf(pros.productId*1)
  473. if(lent >=0 ){
  474. this.submitIds.splice(lent, 1)
  475. }
  476. }
  477. })
  478. },
  479. updateBothCheckBtn() {
  480. if(this.isshowDelbtn) {
  481. // 当管理删除按钮出现时,失效的商品可被选择
  482. this.goodsList.forEach((item)=>{
  483. item.isChecked = this.isCheckAll
  484. this.setProductChecked(item)
  485. })
  486. } else {
  487. this.goodsList.forEach((item)=>{
  488. item.isChecked = this.isCheckAll
  489. this.setProductChecked(item)
  490. })
  491. }
  492. },
  493. checkAll(){//全选方法内调用方法
  494. this.isCheckAll = !this.isCheckAll
  495. this.updateBothCheckBtn()
  496. },
  497. totalShopPeice(){//每次所属会所下的商品增减重新计算合计价格&减去含有下架的商品
  498. let touchPrice = 0
  499. let reducedPrice = 0//商铺合计满减价
  500. this.goodsList.map((item,index)=>{
  501. //计算店铺满减后店铺合计
  502. if(item.promotions && item.promotions.mode == 2){
  503. let prosPrice=0
  504. let totalOriginalPrice = 0//商铺合计原价
  505. item.cartList.forEach(pros=>{
  506. prosPrice += pros.price*pros.number
  507. totalOriginalPrice += pros.price*pros.number
  508. })
  509. if(prosPrice >= item.promotions.touchPrice){
  510. item.totalPrice = prosPrice - item.promotions.reducedPrice
  511. item.reducedPrice = item.promotions.reducedPrice
  512. item.totalOriginalPrice = totalOriginalPrice
  513. }else{
  514. item.reducedPrice = 0 //统计合计价格
  515. item.totalPrice = prosPrice
  516. }
  517. }else{//以下为计算除店铺满减以外的单品满减以及正常商品合计
  518. let _totalPrice = 0
  519. let _reducedPrice = 0
  520. let _totalOriginalPrice =0
  521. item.cartList.forEach(pros=>{
  522. let _price = pros.price*pros.number
  523. _totalOriginalPrice += pros.price*pros.number
  524. if(pros.promotions && pros.promotions.type != 2 && pros.promotions.mode == 2){
  525. if(_price >= pros.promotions.touchPrice){
  526. _price = _price - pros.promotions.reducedPrice
  527. _reducedPrice += pros.promotions.reducedPrice
  528. }
  529. _totalPrice += _price
  530. }else{
  531. _reducedPrice = 0
  532. _totalPrice += pros.price*pros.number
  533. }
  534. })
  535. item.reducedPrice = _reducedPrice
  536. item.totalOriginalPrice = _totalOriginalPrice
  537. item.totalPrice = _totalPrice
  538. }
  539. })
  540. },
  541. totalPeice(){ //计算总价格,每次调用此方法,将初始值为0,遍历价格并累加
  542. let totalPrice = 0
  543. let reducedPrice = 0
  544. let originalPrice = 0
  545. this.goodsList.forEach((item,index)=>{
  546. let supplierPrice = 0
  547. let supplierReducedPrice = 0
  548. item.totalprice = 0
  549. item.reducedprice = 0
  550. item.originalprice = 0
  551. item.cartList.forEach(pros=>{
  552. if(pros.isChecked){
  553. supplierPrice += pros.price*pros.number
  554. // 单品满减
  555. if(pros.promotions && pros.promotions.type*1===1 && pros.promotions.mode*1===2){
  556. // 单品满减-重新计算供应商总价/满减金额
  557. if(pros.price*pros.number >= pros.promotions.touchPrice){
  558. supplierPrice -= pros.promotions.reducedPrice
  559. supplierReducedPrice += pros.promotions.reducedPrice
  560. }
  561. }
  562. }
  563. })
  564. // 店铺满减
  565. if(item.promotions && item.promotions.mode*1===2){
  566. // 店铺满减-计算供应商总价/满减金额
  567. if(supplierPrice >= item.promotions.touchPrice){
  568. supplierPrice -= item.promotions.reducedPrice
  569. supplierReducedPrice += item.promotions.reducedPrice
  570. }
  571. }
  572. item.totalprice = supplierPrice
  573. item.reducedprice = supplierReducedPrice
  574. item.originalprice = (supplierPrice+supplierReducedPrice)
  575. totalPrice += item.totalprice
  576. reducedPrice += item.reducedprice
  577. originalPrice += item.originalprice
  578. })
  579. //总促销计算
  580. this.promotionsList.forEach(promotions =>{
  581. // 凑单满减
  582. if(promotions.mode*1===2 && promotions.type*1===2){
  583. let total = 0
  584. promotions.products.forEach(pros=>{
  585. if (this.submitIds.includes(pros.productId*1)){
  586. total += pros.number * pros.price
  587. }
  588. })
  589. if(total>=promotions.touchPrice){
  590. totalPrice -= promotions.reducedPrice
  591. reducedPrice += promotions.reducedPrice
  592. }
  593. }
  594. })
  595. //最后统计商品原价
  596. this.totalOriginalPrice = originalPrice
  597. //最后满减金额 = 店铺减去金额 + 单品减去金额 + 凑单减去金额
  598. this.reducedPrice = reducedPrice
  599. //最终合计价格 = 店铺满减合计 + 单品满减 + 正常合计 + 凑单满减
  600. this.allPrice = totalPrice
  601. },
  602. totalCount(){//计算总数量
  603. this.allCount = 0
  604. let prosAllCount=0
  605. let validCount = 0
  606. let validList =[]
  607. let productsList =[]
  608. this.goodsList.forEach(item=>{
  609. productsList = item.cartList
  610. productsList.forEach(pros=>{
  611. if(pros.isChecked){
  612. prosAllCount+=parseInt(pros.number)
  613. this.allCount = prosAllCount
  614. }
  615. })
  616. })
  617. },
  618. changeCountAdd(item,pros){//商品数量加加
  619. if(pros.step === 2){
  620. pros.isStep = false
  621. pros.number += pros.min
  622. this.processActivityPrice(pros)
  623. this.isStock = false
  624. }else{
  625. pros.number++
  626. this.processActivityPrice(pros)
  627. this.isStock = false
  628. }
  629. this.updateShoppogNum(pros)
  630. this.totalShopPeice()
  631. },
  632. changeCountSub(item,pros){//商品数量减减
  633. if(pros.number<=pros.min){
  634. pros.number= pros.min
  635. this.$util.msg(`该商品最小起订量为${pros.min}`,2000)
  636. return
  637. }else{
  638. if(pros.step === 2){
  639. pros.isStep = false
  640. pros.number -= pros.min
  641. }else{
  642. pros.number--
  643. }
  644. this.processActivityPrice(pros)
  645. }
  646. this.updateShoppogNum(pros)
  647. this.totalShopPeice()
  648. },
  649. changeNnmber(e,item,pros){//输入商品数量更新
  650. let _value = e.detail.value
  651. if(!this.$api.isNumber(_value)){
  652. pros.number = pros.min
  653. }else if(_value < pros.min){
  654. this.$util.msg(`该商品最小起订量为${pros.min}`,2000)
  655. pros.number = pros.min
  656. }else if(_value % pros.min != 0){
  657. pros.isStep = true
  658. pros.number = pros.min
  659. }else{
  660. pros.isStep = false
  661. pros.number = e.detail.value
  662. this.processActivityPrice(pros)
  663. }
  664. this.updateShoppogNum(pros)
  665. this.totalShopPeice()
  666. },
  667. processActivityPrice(pros){//单独处理活动价格和阶梯价格
  668. let ladderPriceList = pros.ladderPrices
  669. if(pros.ladderFlag == 0 || pros.actStatus == 1){
  670. pros.price = pros.price
  671. }else{
  672. ladderPriceList.forEach((item,index)=>{
  673. if(pros.number>=item.buyNum){
  674. pros.price = item.buyPrice
  675. }
  676. })
  677. }
  678. },
  679. updateShoppogNum(pros){//加减购物车商品更新到后台
  680. this.SellerService.SellerAddProductNum(
  681. {
  682. id:pros.id,
  683. productCount:pros.number,
  684. serviceProviderId:this.listQuery.serviceProviderId,
  685. }
  686. ).then(response =>{
  687. this.isshowDelbtn = false
  688. this.isCheckAll = false
  689. this.initGetCartGoodsList()
  690. }).catch(error =>{
  691. this.$util.msg(error.msg,2000)
  692. })
  693. },
  694. toConfirmation(){//跳转确认订单页面
  695. let setGoodsList=[]
  696. let productIdList = []
  697. let productIds = ''
  698. this.goodsList.forEach(res=>{
  699. let products = res.cartList
  700. products.forEach(pros=>{
  701. if(pros.isChecked){
  702. setGoodsList.push(pros.productId)
  703. }
  704. })
  705. })
  706. if(setGoodsList == ''){
  707. this.$util.msg('请先选择结算商品~',2000)
  708. return
  709. }else{
  710. /**
  711. * @获取勾选的商品ID拼接字符串逗号隔开,最后一个逗号去掉
  712. * @获取勾选的商品分类ID拼接字符串格式逗号隔开,最后一个逗号去掉
  713. */
  714. this.goodsList.forEach(el=>{
  715. el.cartList.forEach(pros=>{
  716. if(pros.isChecked){
  717. productIdList.push(pros.productId)
  718. }
  719. })
  720. })
  721. //判断勾选的商品是否为充值商品或者为定金商品的一些处理逻辑
  722. const isHasDepositlds = productIdList.filter(item =>this.depositIds.includes(item))
  723. const isHasRechargeIds = productIdList.filter(item =>this.rechargeIds.includes(item))
  724. const isGoods= productIdList.every(item =>{ [...this.depositIds,...this.rechargeIds].includes(item)})
  725. if(productIdList.length == 1 && isHasDepositlds.length === 1 && isHasRechargeIds.length === 0){
  726. console.log('定金商品')
  727. productIdList.forEach(item =>{
  728. productIds += item +','
  729. })
  730. }else if(productIdList.length == 1 && isHasRechargeIds.length === 1 && isHasDepositlds.length === 0){
  731. console.log('充值余额商品')
  732. productIdList.forEach(item =>{
  733. productIds += item +','
  734. })
  735. }else if(!isGoods && isHasRechargeIds.length === 0 && isHasDepositlds.length === 0){
  736. console.log('正常商品')
  737. productIdList.forEach(item =>{
  738. productIds += item +','
  739. })
  740. }else{
  741. this.$util.modal('提示','缴纳订金商品或余额充值商品请单独下单!','确定','',false,() =>{})
  742. return
  743. }
  744. let cartPramsData={ productIds:productIds.substring(0,productIds.lastIndexOf(',')) }
  745. this.$api.navigateTo(`/pages/seller/order/create-order?data=${JSON.stringify({data:cartPramsData})}`)
  746. }
  747. },
  748. showDelManager(){//显示删除商品管理
  749. this.isshowDelbtn = true
  750. if(this.isCheckAll) {
  751. this.updateBothCheckBtn()
  752. } else {
  753. this.updateCheckAllBtn()
  754. }
  755. },
  756. hideDelManage(){//隐藏删除商品管理
  757. this.isshowDelbtn = false
  758. if(this.isCheckAll) {
  759. this.updateBothCheckBtn()
  760. } else {
  761. this.updateCheckAllBtn()
  762. }
  763. },
  764. deleteList(){//删除购物车商品
  765. this.delGoodsList=[]
  766. this.goodsList.forEach(delitem=>{
  767. let products = delitem.cartList
  768. products.forEach(pros=>{
  769. if(pros.isChecked){
  770. this.delGoodsList += pros.id+','
  771. }
  772. })
  773. })
  774. this.failureList.forEach(failure=>{
  775. if(failure.isChecked){
  776. this.delGoodsList += failure.id+','
  777. }
  778. })
  779. if(this.delGoodsList.length == 0){
  780. this.$util.msg('请选择要删除的商品~',2000)
  781. return
  782. }else{
  783. this.$util.modal('','确定删除选中的商品吗?','确定','取消',true,() =>{
  784. this.SellerService.DeleteSellerCart(
  785. {
  786. cartIds:this.delGoodsList,
  787. serviceProviderId:this.listQuery.serviceProviderId
  788. }
  789. ).then(response =>{
  790. this.$util.msg('删除成功',2000)
  791. setTimeout(()=>{
  792. this.isshowDelbtn = false
  793. this.initGetCartGoodsList()
  794. },2000)
  795. }).catch(error =>{
  796. this.$util.msg(error.msg,2000)
  797. })
  798. })
  799. }
  800. },
  801. goNavto(url){
  802. uni.navigateTo ({
  803. url
  804. })
  805. },
  806. PromotionsFormat(promo){//促销活动类型数据处理
  807. if(promo!=null){
  808. if(promo.type == 1 && promo.mode == 1){
  809. return true
  810. }else{
  811. return false
  812. }
  813. }
  814. return false
  815. },
  816. navToListPage(id){
  817. this.isModallayer = true
  818. this.$api.navigateTo(`/pages/goods/product?id=${id}`)
  819. }
  820. },
  821. watch:{//深度监听所有数据,每次改变重新计算总价和总数
  822. goodsList:{
  823. deep:true,
  824. handler(val,oldval){
  825. this.totalPeice()
  826. this.totalCount()
  827. }
  828. }
  829. },
  830. onReachBottom() {
  831. if(this.hasNextPage){
  832. this.loadding = true
  833. this.pullUpOn = true
  834. this.getOnReachBottomData()
  835. }
  836. },
  837. onPullDownRefresh() {//下拉刷新
  838. this.initGetCartGoodsList()
  839. uni.stopPullDownRefresh()
  840. },
  841. onShow(){
  842. this.$api.getComStorage('orderUserInfo').then((resolve) =>{
  843. console.log(resolve)
  844. this.listQuery.clubId = resolve.clubID ? resolve.clubID : 0
  845. this.listQuery.againBuyProductIds = resolve.againBuyProductIds ? resolve.againBuyProductIds : ''
  846. this.initData()
  847. })
  848. }
  849. }
  850. </script>
  851. <style lang="scss">
  852. page{
  853. background: #f7f7f7;
  854. }
  855. .cart-content{
  856. position: relative;
  857. padding-bottom:74rpx;
  858. }
  859. .container-cart-main.none{
  860. display: none;
  861. }
  862. .container-cart-main.show{
  863. display: block;
  864. }
  865. .cart-content.empty.none{
  866. display: none;
  867. }
  868. .cart-content.empty.show{
  869. display: block;
  870. }
  871. .container-cart.show{
  872. display: block;
  873. }
  874. .container-cart.none{
  875. display: none;
  876. }
  877. .empty-container.none{
  878. display: none;
  879. }
  880. .empty-container.show{
  881. display: flex;
  882. }
  883. .foot-check-delbtn{
  884. width: 100%;
  885. height: 80rpx;
  886. position: fixed;
  887. top: 0;
  888. left: 0;
  889. box-sizing: border-box;
  890. padding: 15rpx 24rpx;
  891. background-color: #F7F7F7;
  892. z-index: 990;
  893. .foot-text{
  894. font-size: $font-size-26;
  895. height: 50rpx;
  896. line-height: 50rpx;
  897. color: #666666;
  898. float: left;
  899. padding-left: 10rpx;
  900. text{
  901. // color: $color-system;
  902. margin: 0 6rpx;
  903. }
  904. }
  905. .delBtn{
  906. width: 100rpx;
  907. display: inline-block;
  908. padding: 0 15rpx;
  909. font-size: $font-size-26;
  910. height: 50rpx;
  911. line-height: 50rpx;
  912. border-radius: 30rpx;
  913. background:#FFFFFF;
  914. border: 1px solid #E15616;
  915. color: $color-system;
  916. float: right;
  917. text-align: center;
  918. &.none{
  919. display: none;
  920. }
  921. }
  922. }
  923. .checkbox-box{
  924. display: flex;
  925. align-items: center;
  926. .checkbox{
  927. display: flex;
  928. margin: 0;
  929. padding: 0;
  930. display: flex;
  931. flex-direction: column;
  932. align-items: center;
  933. box-sizing: border-box;
  934. text-align: center;
  935. text-decoration: none;
  936. border-radius: 0;
  937. -webkit-tap-highlight-color: transparent;
  938. overflow: hidden;
  939. background-color:#FFFFFF;
  940. font-size: 36rpx;
  941. color:$color-system;
  942. padding: 5rpx;
  943. &.icon-weixuanze{
  944. color: #b2b2b2;
  945. }
  946. }
  947. &.disabled{
  948. .checkbox{
  949. color:#999999
  950. }
  951. }
  952. .text{
  953. font-size: $font-size-24;
  954. margin-left: 10rpx;
  955. }
  956. }
  957. .goods-list{
  958. width: 100%;
  959. height: auto;
  960. border-top: 1px solid #EBEBEB;
  961. background-color: #F7F7F7;
  962. .goods-item{
  963. width: 702rpx;
  964. padding: 0 24rpx;
  965. background: #FFFFFF;
  966. margin-bottom: 24rpx;
  967. }
  968. .shoptitle{
  969. display: flex;
  970. align-items: center;
  971. height: 80rpx;
  972. line-height: 80rpx;
  973. .checkbox-box{
  974. padding: 10rpx;
  975. }
  976. .text{
  977. width: 450rpx;
  978. display: block;
  979. overflow: hidden;
  980. text-overflow:ellipsis;
  981. white-space: nowrap;
  982. margin-left: 20rpx;
  983. font-size: $font-size-28;
  984. color: $text-color;
  985. text-align: left;
  986. font-weight: bold;
  987. }
  988. .floor-item-act{
  989. height: 56rpx;
  990. text-align: center;
  991. box-sizing: border-box;
  992. float: left;
  993. padding:10rpx 0;
  994. margin-left: 20rpx;
  995. .floor-tags{
  996. height: 28rpx;
  997. border-radius: 6rpx;
  998. background-color: #FFFFFF;
  999. line-height: 28rpx;
  1000. color: $color-system;
  1001. text-align: center;
  1002. display: inline-block;
  1003. padding:0 16rpx;
  1004. font-size: $font-size-20;
  1005. border: 1px solid #E15616;
  1006. float: right;
  1007. }
  1008. }
  1009. }
  1010. .goods-pros{
  1011. width: 100%;
  1012. height: auto;
  1013. }
  1014. .goods-pros-t{
  1015. display: flex;
  1016. align-items: center;
  1017. width: 100%;
  1018. height: auto;
  1019. padding:0 0 20rpx 0;
  1020. .checkbox-box{
  1021. padding: 10rpx;
  1022. }
  1023. .pros-img{
  1024. width: 210rpx;
  1025. height: 210rpx;
  1026. border-radius: 10rpx;
  1027. margin:0 20rpx;
  1028. border:1px solid #f3f3f3;
  1029. image{
  1030. width: 210rpx;
  1031. height: 210rpx;
  1032. border-radius: 10rpx;
  1033. }
  1034. }
  1035. }
  1036. .goods-pros-b{
  1037. width:100%;
  1038. height: auto;
  1039. padding:0 0 24rpx 0;
  1040. box-sizing: border-box;
  1041. &.show{
  1042. display: block;
  1043. }
  1044. &.none{
  1045. display: none;
  1046. }
  1047. .sum-none{
  1048. width: 100%;
  1049. height: 48rpx;
  1050. line-height: 48rpx;
  1051. color: $text-color;
  1052. float: left;
  1053. text-align: right;
  1054. .money{
  1055. font-size: $font-size-26;
  1056. color: #999999;
  1057. text-decoration: line-through;
  1058. }
  1059. .money-sign{
  1060. font-size: $font-size-26;
  1061. color: #999999;
  1062. text-decoration: line-through;
  1063. }
  1064. .money-reduced{
  1065. margin-left: 10rpx;
  1066. font-size: $font-size-26;
  1067. color: $color-system;
  1068. .iconfont{
  1069. font-size: $font-size-34;
  1070. }
  1071. }
  1072. }
  1073. .sum{
  1074. width: 100%;
  1075. height: 40rpx;
  1076. font-size: $font-size-28;
  1077. line-height: 40rpx;
  1078. color: $text-color;
  1079. float: left;
  1080. display: flex;
  1081. justify-content: flex-end;
  1082. .money{
  1083. color: #FF2A2A;
  1084. font-size: $font-size-28;
  1085. }
  1086. .money-sign{
  1087. font-size: $font-size-24;
  1088. color: #FF2A2A;
  1089. }
  1090. }
  1091. }
  1092. .pros-product{
  1093. width: 386rpx;
  1094. height: 100%;
  1095. line-height: 36rpx;
  1096. font-size: $font-size-26;
  1097. position: relative;
  1098. .producttitle{
  1099. width: 100%;
  1100. display: inline-block;
  1101. height: auto;
  1102. text-overflow:ellipsis;
  1103. display: -webkit-box;
  1104. word-break: break-all;
  1105. -webkit-box-orient: vertical;
  1106. -webkit-line-clamp: 2;
  1107. overflow: hidden;
  1108. margin-bottom: 8rpx;
  1109. .no-text{
  1110. display: inline-block;
  1111. height:36rpx;
  1112. padding: 0 12rpx;
  1113. line-height: 36rpx;
  1114. background:linear-gradient(315deg,rgba(231,0,0,1) 0%,rgba(255,104,1,1) 100%);
  1115. border-radius:18rpx;
  1116. text-align: center;
  1117. color: #FFFFFF;
  1118. font-size: $font-size-24;
  1119. margin-right: 24rpx;
  1120. }
  1121. }
  1122. .productspec{
  1123. height: 36rpx;
  1124. color: #999999;
  1125. text-overflow:ellipsis;
  1126. display: -webkit-box;
  1127. word-break: break-all;
  1128. -webkit-box-orient: vertical;
  1129. -webkit-line-clamp: 2;
  1130. overflow: hidden;
  1131. margin-top: 10rpX;
  1132. }
  1133. .productCode{
  1134. color: #666666;
  1135. }
  1136. .productprice{
  1137. width: 100%;
  1138. height: 48rpx;
  1139. margin: 10rpx 0 0 0;
  1140. .price{
  1141. line-height: 48rpx;
  1142. font-size: $font-size-28;
  1143. width: 48%;
  1144. color: #FF2A2A;
  1145. float: left;
  1146. &.disabled{
  1147. color: #999999;
  1148. text-decoration: line-through;
  1149. }
  1150. .money-sign{
  1151. font-size: $font-size-24;
  1152. color: #FF2A2A;
  1153. }
  1154. }
  1155. .count{
  1156. height: 100%;
  1157. float: right;
  1158. position: relative;
  1159. &.show{
  1160. display: block;
  1161. }
  1162. &.none{
  1163. display: none;
  1164. }
  1165. .count-tips{
  1166. width: auto;
  1167. display: inline-block;
  1168. padding: 0 15rpx;
  1169. line-height: 44rpx;
  1170. height: 44rpx;
  1171. border-radius: 22rpx;
  1172. background: $btn-confirm;
  1173. font-size: $font-size-24;
  1174. text-align: center;
  1175. color: #FFFFFF;
  1176. position: absolute;
  1177. top:-60rpx;
  1178. left: -5rpx;
  1179. z-index: 5;
  1180. &.step{
  1181. left:-217rpx
  1182. }
  1183. &::before{
  1184. content: "";
  1185. position: absolute;
  1186. bottom: -30rpx;
  1187. right: 15rpx;
  1188. z-index:1;
  1189. width: 0;
  1190. height: 0;
  1191. border-width: 18rpx;
  1192. border-style: solid;
  1193. border-color:$color-system transparent transparent transparent;
  1194. }
  1195. }
  1196. .number-box{
  1197. display: flex;
  1198. justify-content: center;
  1199. align-items: center;
  1200. border: 2rpx solid #ffe6dc;
  1201. border-radius: 30rpx;
  1202. height: 48rpx;
  1203. .iconfont{
  1204. font-size: $font-size-24;
  1205. padding:0 18rpx;
  1206. color: #999999;
  1207. text-align: center;
  1208. line-height: 48rpx;
  1209. font-weight: bold;
  1210. background: #fef6f3;
  1211. &.icon-jianhao{
  1212. border-radius: 30rpx 0 0 30rpx;
  1213. }
  1214. &.icon-jiahao{
  1215. border-radius: 0 30rpx 30rpx 0;
  1216. }
  1217. }
  1218. .btn-input{
  1219. width: 62rpx;
  1220. height: 44rpx;
  1221. line-height: 44rpx;
  1222. border-radius: 4rpx;
  1223. text-align: center;
  1224. font-size: $font-size-24;
  1225. border-bottom: 2rpx solid #ffe6dc;
  1226. border-top: 2rpx solid #ffe6dc;
  1227. }
  1228. }
  1229. .uni-numbox{
  1230. position: absolute;
  1231. left: 45rpx;
  1232. bottom: 0;
  1233. .uni-numbox-minus, .uni-numbox-plus{
  1234. width: 50rpx;
  1235. line-height: 40rpx;
  1236. }
  1237. .uni-numbox-value {
  1238. font-size: $font-size-28;
  1239. width: 60rpx;
  1240. }
  1241. }
  1242. }
  1243. }
  1244. .floor-item-act{
  1245. width: 100%;
  1246. height: 56rpx;
  1247. text-align: center;
  1248. box-sizing: border-box;
  1249. float: left;
  1250. padding:0 0 10rpx 0;
  1251. margin-left: 10rpx;
  1252. .floor-tags{
  1253. height: 28rpx;
  1254. border-radius: 6rpx;
  1255. background-color: #FFFFFF;
  1256. line-height: 28rpx;
  1257. color: $color-system;
  1258. text-align: center;
  1259. display: inline-block;
  1260. padding:0 16rpx;
  1261. font-size: $font-size-20;
  1262. border: 1px solid #E15616;
  1263. float: left;
  1264. }
  1265. }
  1266. }
  1267. }
  1268. .footer{
  1269. width: 100%;
  1270. background-color: #FFFFFF;
  1271. height: 110rpx;
  1272. position: fixed;
  1273. bottom: 0rpx;
  1274. z-index: 100;
  1275. .footer-le{
  1276. width: 510rpx;
  1277. height: 100%;
  1278. padding:0 24rpx;
  1279. float: left;
  1280. .foot-check{
  1281. width: 100rpx;
  1282. float: left;
  1283. line-height: 110rpx;
  1284. font-size: $font-size-24;
  1285. .checkbox{
  1286. width: 40rpx;
  1287. text-align: center;
  1288. }
  1289. .text{
  1290. width: 60rpx;
  1291. float: right;
  1292. }
  1293. }
  1294. .sum{
  1295. width: 380rpx;
  1296. height: 110rpx;
  1297. float: right;
  1298. box-sizing: border-box;
  1299. padding: 10rpx;
  1300. .sum-none{
  1301. width: 100%;
  1302. height: 45rpx;
  1303. line-height: 45rpx;
  1304. color: $text-color;
  1305. float: left;
  1306. text-align: right;
  1307. .money{
  1308. font-size: $font-size-24;
  1309. color: #999999;
  1310. text-decoration: line-through;
  1311. }
  1312. .money-sign{
  1313. font-size: $font-size-24;
  1314. color: #999999;
  1315. text-decoration: line-through;
  1316. }
  1317. .money-reduced{
  1318. margin-left: 10rpx;
  1319. font-size: $font-size-24;
  1320. color: $color-system;
  1321. }
  1322. }
  1323. .sum-price{
  1324. text-align: right;
  1325. width: 100%;
  1326. height: 45rpx;
  1327. line-height: 45rpx;
  1328. font-size: $font-size-30;
  1329. color: $text-color;
  1330. float: left;
  1331. font-weight: normal;
  1332. &.none{
  1333. height: 90rpx;
  1334. line-height: 90rpx;
  1335. }
  1336. .money{
  1337. color: #FF2A2A;
  1338. }
  1339. .money-sign{
  1340. font-size: $font-size-24;
  1341. color: #FF2A2A;
  1342. }
  1343. }
  1344. }
  1345. }
  1346. .footer-ri{
  1347. width: 180rpx;
  1348. height: 84rpx;
  1349. background:linear-gradient(135deg,rgba(242,143,49,1) 0%,rgba(225,86,22,1) 100%);
  1350. float: right;
  1351. display: flex;
  1352. justify-content: space-between;
  1353. align-items: center;
  1354. z-index: 999;
  1355. border-radius: 49rpx;
  1356. margin-top: 15rpx;
  1357. margin-right: 10rpx;
  1358. &.none{
  1359. display: none;
  1360. }
  1361. .btn{
  1362. width: 200rpx;
  1363. height: 100%;
  1364. font-size: $font-size-28;
  1365. line-height: 110rpx;
  1366. color: #FFFFFF;
  1367. display: flex;
  1368. justify-content: center;
  1369. align-items: center;
  1370. }
  1371. }
  1372. .footer-del{
  1373. width: 400rpx;
  1374. height: 110rpx;
  1375. position: absolute;
  1376. padding-left: 200rpx;
  1377. background: #FFFFFF;
  1378. right: 0;
  1379. top: 0;
  1380. z-index: 1000;
  1381. &.show{
  1382. animation: showDelbtn 0s linear both;
  1383. }
  1384. &.none{
  1385. animation: hideDelbtn 0s linear both;
  1386. }
  1387. .btn{
  1388. width: 50%;
  1389. height: 100%;
  1390. line-height: 110rpx;
  1391. font-size: $font-size-28;
  1392. color: #FFFFFF;
  1393. text-align: center;
  1394. float: left;
  1395. }
  1396. .btn.btn-cancel{
  1397. background:#EEC1AB;
  1398. }
  1399. .btn.btn-confirm{
  1400. background:#FF2A2A;
  1401. }
  1402. @keyframes showDelbtn {
  1403. 0% {
  1404. transform: translateX(0);
  1405. }
  1406. 100% {
  1407. transform: translateX(-100%);
  1408. }
  1409. }
  1410. @keyframes hideDelbtn {
  1411. 0% {
  1412. transform: translateX(-100%);
  1413. }
  1414. 100% {
  1415. transform: translateX(0);
  1416. }
  1417. }
  1418. }
  1419. }
  1420. .failure-list{
  1421. width: 702rpx;
  1422. height: auto;
  1423. padding: 0 24rpx;
  1424. margin-top: 20rpx;
  1425. background: #FFFFFF;
  1426. .failure-title{
  1427. width: 100%;
  1428. height: 82rpx;
  1429. line-height: 82rpx;
  1430. font-size: $font-size-28;
  1431. .title-txt{
  1432. float: left;
  1433. color:#666666;
  1434. text-align: left;
  1435. }
  1436. .title-btn{
  1437. float: right;
  1438. color: $color-system;
  1439. text-align: right;
  1440. line-height: 80rpx;
  1441. .butto{
  1442. display: inline-block;
  1443. padding: 0 15rpx;
  1444. font-size: $font-size-26;
  1445. height: 50rpx;
  1446. line-height: 50rpx;
  1447. border-radius: 30rpx;
  1448. background:#FFFFFF;
  1449. // border: 1px solid #C9C9C9;
  1450. // color: #999999;
  1451. margin-top: 15rpx;
  1452. }
  1453. }
  1454. }
  1455. .productlist{
  1456. padding-top: 10rpx;
  1457. .goods-pros{
  1458. width: 100%;
  1459. height: auto;
  1460. padding: 20rpx 0;
  1461. }
  1462. .goods-pros-t{
  1463. display: flex;
  1464. align-items: center;
  1465. width: 100%;
  1466. height: 210rpx;
  1467. position: relative;
  1468. .img-tip{
  1469. display: block;
  1470. width: 72rpx;
  1471. height: 36rpx;
  1472. line-height: 36rpx;
  1473. font-size: $font-size-24;
  1474. text-align: center;
  1475. color: #FFFFFF;
  1476. border-radius: 24rpx;
  1477. background:rgba(51,51,51,0.3);
  1478. // position: absolute;
  1479. // left: 0;
  1480. // top: 0;
  1481. }
  1482. .checkbox-box{
  1483. padding: 10rpx;
  1484. }
  1485. .pros-img{
  1486. width: 180rpx;
  1487. height: 100%;
  1488. border-radius: 10rpx;
  1489. margin:0 20rpx;
  1490. border:1px solid #f3f3f3;
  1491. position: relative;
  1492. image{
  1493. width: 100%;
  1494. height: 100%;
  1495. border-radius: 10rpx;
  1496. }
  1497. }
  1498. .pros-marks{
  1499. width: 750rpx;
  1500. height: 250rpx;
  1501. z-index: 90;
  1502. background: rgba(0,0,0,.05);
  1503. position: absolute;
  1504. left:-20rpx;
  1505. top: -20rpx;
  1506. }
  1507. }
  1508. .goods-pros-b{
  1509. width:622rpx;
  1510. margin-left: 84rpx;
  1511. height: 40rpx;
  1512. padding:0 0 26rpx 0;
  1513. // border-top: 1px solid #EBEBEB;
  1514. &.show{
  1515. display: block;
  1516. }
  1517. &.none{
  1518. display: none;
  1519. }
  1520. .sum{
  1521. font-size: $font-size-28;
  1522. line-height: 40rpx;
  1523. color: $text-color;
  1524. display: flex;
  1525. justify-content: flex-end;
  1526. .money{
  1527. color: #FF2A2A;
  1528. font-size: $font-size-28;
  1529. }
  1530. .money-sign{
  1531. font-size: $font-size-24;
  1532. color: #FF2A2A;
  1533. }
  1534. }
  1535. }
  1536. .pros-product{
  1537. width: 402rpx;
  1538. height: 100%;
  1539. line-height: 36rpx;
  1540. font-size: $font-size-28;
  1541. position: relative;
  1542. .producttitle{
  1543. width: 100%;
  1544. display: inline-block;
  1545. height: auto;
  1546. text-overflow:ellipsis;
  1547. display: -webkit-box;
  1548. word-break: break-all;
  1549. -webkit-box-orient: vertical;
  1550. -webkit-line-clamp: 2;
  1551. overflow: hidden;
  1552. margin-bottom: 8rpx;
  1553. .no-text{
  1554. display: inline-block;
  1555. height:36rpx;
  1556. padding: 0 12rpx;
  1557. line-height: 36rpx;
  1558. background:linear-gradient(315deg,rgba(231,0,0,1) 0%,rgba(255,104,1,1) 100%);
  1559. border-radius:18rpx;
  1560. text-align: center;
  1561. color: #FFFFFF;
  1562. font-size: $font-size-28;
  1563. margin-right: 24rpx;
  1564. }
  1565. }
  1566. .productspec{
  1567. height: 36rpx;
  1568. color: #999999;
  1569. font-size: $font-size-26;
  1570. margin-top: 20rpx;
  1571. }
  1572. .productstate{
  1573. font-size: $font-size-28;
  1574. height: 44rpx;
  1575. color: #FF2A2A;
  1576. position: absolute;
  1577. bottom: 0;
  1578. left: 0;
  1579. }
  1580. }
  1581. }
  1582. }
  1583. </style>