index.vue 39 KB

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