index.vue 39 KB

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