cart.vue 43 KB

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