order-list.vue 27 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081
  1. <template>
  2. <view class="container" :style="{ paddingTop: navbarHeight + 82 + 'px' }">
  3. <!-- 自定义返回 -->
  4. <header-back
  5. :systeminfo="systeminfo"
  6. :navbar-data="nvabarData"
  7. :headerBtnPosi="headerBtnPosi"
  8. :isDelete="isDelete"
  9. :isUsertype="1"
  10. :screenTab="screenTab"
  11. @goSearchPath="handlSearchPath"
  12. />
  13. <tui-skeleton
  14. v-if="skeletonShow"
  15. backgroundColor="#fafafa"
  16. borderRadius="10rpx"
  17. :isLoading="true"
  18. :loadingType="5"
  19. />
  20. <template v-else>
  21. <view class="order-section-top" :style="{ marginTop: navbarHeight + 'px' }">
  22. <scroll-view scroll-x scroll-with-animation class="tab-view" :scroll-left="scrollLeft">
  23. <view
  24. v-for="(item, index) in orderTabBar"
  25. :key="index"
  26. class="tab-bar-item"
  27. :class="[currentTab == index ? 'active' : '']"
  28. :data-current="index"
  29. @tap.stop="onClickTab"
  30. >
  31. <text class="tab-bar-title">{{ item.text }}</text>
  32. </view>
  33. </scroll-view>
  34. <scroll-view scroll-x scroll-with-animation class="tab-screen" :scroll-left="scrollLeft">
  35. <view
  36. v-for="(item, index) in screenTabBar"
  37. :key="index"
  38. class="tab-screen-item"
  39. :class="[screenTab == index ? 'active' : '']"
  40. :data-current="index"
  41. @tap.stop="onClickScreenTab(index)"
  42. >{{ item.text }}</view
  43. >
  44. <view
  45. class="tab-screen-item"
  46. v-if="isManage"
  47. :data-current="3"
  48. :class="[screenTab == 3 ? 'active' : '']"
  49. @tap.stop="onClickScreenTab(3)"
  50. >组员订单</view
  51. >
  52. </scroll-view>
  53. </view>
  54. <swiper
  55. class="tab-content"
  56. :current="currentTab"
  57. duration="80"
  58. @animationfinish="onChange"
  59. :style="{ height: winHeight + 'px' }"
  60. >
  61. <swiper-item v-for="(tabItem, index) in orderTabBar" :key="index" @touchmove.stop="">
  62. <scroll-view
  63. scroll-y
  64. class="scoll-y tui-skeleton"
  65. @scrolltolower="scrolltolower"
  66. :style="{ height: winHeight + 'px' }"
  67. >
  68. <view :class="{ 'tui-order-list': scrollTop >= 0 }" class="tui-skeleton clearfix">
  69. <!-- 空白页 -->
  70. <empty
  71. v-if="tabItem.loaded === true && tabItem.orderList.length === 0"
  72. :typeIndex="currentTab"
  73. :navbarHeight="navbarHeight"
  74. />
  75. <!-- 列表 -->
  76. <view v-else class="tui-order-content">
  77. <view
  78. class="tui-order-item"
  79. v-for="(order, orderIndex) in tabItem.orderList"
  80. :key="orderIndex"
  81. @click.stop="detail(order)"
  82. >
  83. <view class="order-title">
  84. <view class="order-title-name">
  85. <text>{{ order.clubName ? order.clubName : '' }}</text>
  86. <text
  87. class="tags"
  88. v-if="order.svipUserFlag == 0 && order.userIdentity === 2"
  89. >VIP</text
  90. >
  91. <text class="tags sv" v-if="order.svipUserFlag == 1">SVIP</text>
  92. <view class="name" v-if="screenTab === 3"
  93. >【 {{ order.serviceName ? order.serviceName : '' }} 】</view
  94. >
  95. </view>
  96. <view class="order-title-t">
  97. <view class="order-title-tip tui-skeleton-fillet">
  98. {{ order.status | statusFilters }}
  99. </view>
  100. <view class="bage ebate" v-if="order.rebateFlag == 1">返佣</view>
  101. <text
  102. class="bage buss tui-skeleton-fillet"
  103. v-if="order.orderSubmitType == 3 || order.orderSubmitType == 4"
  104. >
  105. 协销
  106. </text>
  107. <text
  108. class="bage auto tui-skeleton-fillet"
  109. v-if="
  110. order.orderSubmitType == 0 ||
  111. order.orderSubmitType == 1 ||
  112. order.orderSubmitType == 2
  113. "
  114. >
  115. 自主
  116. </text>
  117. <image
  118. class="bage-icon"
  119. src="https://static.caimei365.com/app/img/icon/icon-type@3x.png"
  120. mode="widthFix"
  121. v-if="order.secondHandOrderFlag == 1"
  122. >
  123. </image>
  124. </view>
  125. <view class="order-title-b">
  126. <view class="order-title-btxt num tui-skeleton-fillet">
  127. 订单编号:{{ order.shopOrderNo }}({{ order.shopOrderId }})
  128. </view>
  129. </view>
  130. <view class="order-title-b">
  131. <view class="order-title-btxt tui-skeleton-fillet">
  132. 下单时间:{{ order.orderTime }}
  133. </view>
  134. </view>
  135. </view>
  136. <view class="goods-title">
  137. <view v-if="order.shopPromotion" class="floor-item-act">
  138. <view class="floor-tags">{{ order.shopPromotion.name }}</view>
  139. </view>
  140. <view class="title-text tui-skeleton-fillet">{{ order.shopName }}</view>
  141. </view>
  142. <view
  143. class="goods-item"
  144. v-for="(pros, prosIndex) in order.orderProductList"
  145. :key="prosIndex"
  146. >
  147. <view class="goods-pros-t">
  148. <view class="pros-img tui-skeleton-fillet">
  149. <image :src="pros.image" alt="" />
  150. <text
  151. class="tips"
  152. v-if="pros.giftType == 2 || pros.giftType == 1"
  153. >赠品</text
  154. >
  155. </view>
  156. <view class="pros-product clearfix">
  157. <view class="producttitle tui-skeleton-fillet">{{
  158. pros.name
  159. }}</view>
  160. <view
  161. class="productspec tui-skeleton-fillet"
  162. v-if="pros.productCategory != 2"
  163. >
  164. 规格:{{ pros.productUnit ? pros.productUnit : '' }}
  165. </view>
  166. <view class="productprice">
  167. <view
  168. class="price tui-skeleton-fillet"
  169. :class="
  170. pros.svipPriceFlag == 1 ||
  171. PromotionsFormat(pros.productPromotion)
  172. ? 'none'
  173. : ''
  174. "
  175. >
  176. <text>¥{{ pros.price | NumFormat }}</text>
  177. </view>
  178. <view class="count tui-skeleton-fillet">
  179. <text class="small">x</text>{{ pros.num }}
  180. </view>
  181. </view>
  182. <view class="floor-item-act">
  183. <template v-if="pros.productPromotion">
  184. <view
  185. v-if="PromotionsFormat(pros.productPromotion)"
  186. class="floor-tags"
  187. @click.stop="clickPopupShow(pros.productPromotion)"
  188. >
  189. {{ pros.productPromotion.name }}
  190. <text
  191. v-if="
  192. pros.productPromotion != null &&
  193. pros.productPromotion.type != 3
  194. "
  195. >
  196. :¥{{
  197. pros.productPromotion == null
  198. ? '0.00'
  199. : pros.productPromotion.touchPrice
  200. | NumFormat
  201. }}
  202. </text>
  203. </view>
  204. <view
  205. v-else-if="pros.productPromotion.type != 3"
  206. class="floor-tags"
  207. @click.stop="clickPopupShow(pros.productPromotion)"
  208. >{{ pros.productPromotion.name }}</view
  209. >
  210. </template>
  211. <template v-if="pros.svipPriceFlag == 1">
  212. <view class="svip-tags">
  213. <view class="tags">SVIP</view>
  214. <view class="price">{{ pros.svipPriceTag }}</view>
  215. </view>
  216. </template>
  217. </view>
  218. </view>
  219. </view>
  220. </view>
  221. <view class="order-footer">
  222. <!-- <view class="order-footer-top" v-if="order.discountFee != 0"
  223. >经理折扣:¥{{ order.discountFee | NumFormat }}</view
  224. > -->
  225. <view class="order-footer-bot">
  226. <view class="count tui-skeleton-fillet"
  227. >共{{ order.itemCount }}件商品</view
  228. >
  229. <view
  230. class="money tui-skeleton-fillet"
  231. v-if="order.status == 31 || order.status == 32 || order.status == 33"
  232. >
  233. 已支付:<label style="color:#f94b4b ;"
  234. >¥{{ order.receiptAmount | NumFormat }}</label
  235. >
  236. </view>
  237. <view class="money tui-skeleton-fillet" v-else
  238. >待付总额:<label style="color:#f94b4b ;">
  239. ¥{{ order.obligation | NumFormat }}</label
  240. >
  241. </view>
  242. </view>
  243. </view>
  244. <!-- 底部button -->
  245. <cm-list-button
  246. ref="orderButton"
  247. v-if="screenTab != 3"
  248. :status="order.status"
  249. :order="order"
  250. :shopOrderId="order.shopOrderId"
  251. :rechargeGoods="order.rechargeGoods"
  252. :userId="order.userId"
  253. :secondHandOrderFlag="order.secondHandOrderFlag"
  254. @buttonConfirm="handButtonConfirm"
  255. />
  256. </view>
  257. <!--加载loadding-->
  258. <tui-loadmore :visible="loadding" :index="3" type="black"/>
  259. <tui-nomore
  260. :visible="!pullUpOn"
  261. :backgroundColor="'#ffffff'"
  262. :text="nomoreText"
  263. />
  264. <!--加载loadding-->
  265. </view>
  266. </view>
  267. </scroll-view>
  268. </swiper-item>
  269. </swiper>
  270. </template>
  271. <!-- 分享弹窗 -->
  272. <cm-share-popup
  273. :shopOrderId="handleShopOrderId"
  274. :shareType="isShareType"
  275. v-if="isShareModal"
  276. @shareConfirm="onShareAppMessage"
  277. />
  278. <!-- 透明模态层 -->
  279. <modal-layer v-if="isModalLayer" />
  280. <view class="aganBj" v-show="showAgan">
  281. <view class="alertAgan">
  282. <text class="title">{{ promptitle }}</text>
  283. <view class="goods">
  284. <view class="list" v-for="(item, index) in failList" :key="index">
  285. <image class="image-left" :src="item.image"></image>
  286. <view class="name-right">{{ item.name }}</view>
  287. </view>
  288. </view>
  289. <view class="BtnAll">
  290. <view class="closebtn btn" @click="showAgan = false">取消</view>
  291. <view class="cancel btn" @click="handleAddAgian">确定</view>
  292. </view>
  293. </view>
  294. </view>
  295. <!-- 筛选抽屉 -->
  296. <cm-orderDrawer
  297. ref="screendrawer"
  298. v-if="rightDrawer"
  299. :rightDrawer="rightDrawer"
  300. @handSearchConfirm="handSearchConfirmData"
  301. />
  302. <!-- 提示弹窗 -->
  303. <tui-modal
  304. :show="modal"
  305. @click="handleClick"
  306. :content="contentModalText"
  307. :button="modalButton"
  308. color="#333"
  309. :size="32"
  310. shape="circle"
  311. :maskClosable="false"
  312. />
  313. </view>
  314. </template>
  315. <script>
  316. import { mapState, mapMutations } from 'vuex'
  317. import headerBack from '@/components/cm-module/headerNavbar/header-back' //自定义顶部导航
  318. import modalLayer from '@/components/modal-layer'
  319. import empty from '@/components/empty'
  320. import cmListButton from './components/cm-list-button' //操作按钮
  321. import cmSharePopup from './components/cm-share-popup' //分享弹窗
  322. import cmOrderDrawer from '../components/cm-order-drawer' //筛选抽屉
  323. import orderMixins from './mixins/orderMixins.js'
  324. export default {
  325. mixins: [orderMixins],
  326. components: {
  327. headerBack,
  328. empty,
  329. modalLayer,
  330. cmListButton,
  331. cmSharePopup,
  332. cmOrderDrawer
  333. },
  334. data() {
  335. return {
  336. orderTabBar: [
  337. { listType: 0, text: '全部订单', orderList: [] },
  338. { listType: 1, text: '待确认', orderList: [] },
  339. { listType: 2, text: '待付款', orderList: [] },
  340. { listType: 3, text: '待发货', orderList: [] },
  341. { listType: 4, text: '已发货', orderList: [] },
  342. { listType: 5, text: '退货/款', orderList: [] }
  343. ],
  344. screenTabBar: [
  345. { type: 0, text: '全部订单(我的)' },
  346. { type: 1, text: '自主订单(我的)' },
  347. { type: 2, text: '协销订单(我的)' }
  348. ],
  349. headerBtnPosi: this.setHeaderBtnPosi(), //获取设备顶部胶囊高度
  350. systeminfo: this.setSysteminfo(), //获取设备信息
  351. nvabarData: {
  352. //顶部自定义导航
  353. showCapsule: 1, // 是否显示左上角图标 1表示显示 0表示不显示,
  354. showSearch: 1,
  355. title: ' ' // 导航栏中间的标题
  356. },
  357. CustomBar: this.CustomBar, // 顶部导航栏高度
  358. winHeight: '', //窗口高度
  359. currentTab: 0, //预设当前项的值
  360. screenTab: 0, //筛选预设当前项的值
  361. scrollLeft: 0, //tab标题的滚动条位置
  362. orderData: [],
  363. listQuery: {
  364. pageNum: 1, //页数
  365. pageSize: 10, //条数
  366. groupServiceId: 0,
  367. serviceProviderId: 0, //协销用户ID
  368. listType: 0,
  369. orderSubmitType: 0
  370. },
  371. scrollTop: 0,
  372. skeletonShow: true,
  373. isClickChange: false,
  374. isShareModal: false, //控制分享弹窗
  375. isShareType: 2,
  376. isModalLayer: false,
  377. loadding: false,
  378. pullUpOn: true,
  379. hasNextPage: false,
  380. pullFlag: true,
  381. navbarHeight: '',
  382. nomoreText: '上拉显示更多',
  383. showAgan: false,
  384. failList: [], // 再来一单可购买商品
  385. promptitle: '',
  386. userId: 0,
  387. manager: 0,
  388. rightDrawer: false ,//控制筛选抽屉
  389. }
  390. },
  391. onLoad(option) {
  392. if (option.type === 'detele') {
  393. this.isDelete = true
  394. }
  395. this.currentTab = option.listType
  396. this.getHeaderTopHeight() //设置自定义导航高度
  397. this.initGetStotage()
  398. },
  399. computed: {
  400. ...mapState(['isManage'])
  401. },
  402. methods: {
  403. async initGetStotage() {
  404. const userInfo = await this.$api.getStorage()
  405. this.userId = userInfo.userId ? userInfo.userId : 0
  406. this.manager = userInfo.manager ? userInfo.manager : 0
  407. this.listQuery.serviceProviderId = userInfo.serviceProviderId
  408. this.getOrderDatainit(this.currentTab)
  409. },
  410. // 滚动切换标签样式
  411. onChange(e) {
  412. let index = e.target.current || e.detail.current
  413. if (this.isClickChange) {
  414. this.currentTab = index
  415. this.isClickChange = false
  416. return
  417. }
  418. this.isClickChange = false
  419. this.currentTab = index
  420. this.listQuery.listType = index
  421. this.checkCor()
  422. this.pullUpOn = true //切换时隐藏
  423. this.loadding = false //切换时隐藏
  424. this.nomoreText = ''
  425. this.getOrderDatainit(this.currentTab, 'tabChange')
  426. },
  427. // 点击标题切换当前页时改变样式
  428. onClickTab(e) {
  429. let tabIndex = e.target.dataset.current || e.currentTarget.dataset.current
  430. if (this.currentTab === tabIndex) {
  431. return false
  432. } else {
  433. this.isClickChange = true
  434. this.currentTab = tabIndex
  435. this.listQuery.listType = tabIndex
  436. this.pullUpOn = true //切换时隐藏
  437. this.loadding = false //切换时隐藏
  438. this.getOrderDatainit(this.currentTab)
  439. }
  440. },
  441. onClickScreenTab(index) {
  442. this.screenTab = index
  443. this.listQuery.orderSubmitType = index
  444. this.pullUpOn = true //切换时隐藏
  445. this.loadding = false //切换时隐藏
  446. this.nomoreText = ''
  447. this.getOrderDatainit(this.currentTab)
  448. },
  449. //判断当前滚动超过一屏时,设置tab标题滚动条。
  450. checkCor: function() {
  451. if (this.currentTab > 3) {
  452. //这里距离按实际计算
  453. this.scrollLeft = 300
  454. } else {
  455. this.scrollLeft = 0
  456. }
  457. },
  458. async getOrderDatainit(index, source) {
  459. try {
  460. this.listQuery.pageNum = 1
  461. let orderItem = this.orderTabBar[index]
  462. if (source === 'tabChange' && orderItem.loaded === true) {
  463. //tab切换只有第一次需要加载数据
  464. return
  465. }
  466. //loaded新字段用于表示数据加载完毕,如果为空可以显示空白页
  467. const res = await this.SellerService.GetSellerOrderList(this.listQuery)
  468. const data = res.data
  469. if (data.list && data.list.length > 0) {
  470. orderItem.orderList = []
  471. data.list.forEach(item => {
  472. orderItem.orderList.push(item)
  473. })
  474. this.hasNextPage = data.hasNextPage
  475. if (this.hasNextPage) {
  476. this.pullUpOn = false
  477. this.nomoreText = '上拉显示更多'
  478. } else {
  479. if (orderItem.orderList.length < 2) {
  480. this.pullUpOn = true
  481. } else {
  482. this.pullUpOn = false
  483. this.nomoreText = '已至底部'
  484. }
  485. }
  486. } else {
  487. this.$set(orderItem, 'loaded', true)
  488. orderItem.orderList = []
  489. }
  490. this.skeletonShow = false
  491. } catch (error) {
  492. this.$util.msg(error.msg, 2000)
  493. }
  494. },
  495. //上拉加载
  496. async getOnReachBottomData(index) {
  497. try {
  498. this.listQuery.pageNum += 1
  499. const res = await this.SellerService.GetSellerOrderList(this.listQuery)
  500. const data = res.data
  501. const orderItem = this.orderTabBar[index]
  502. orderItem.orderList = orderItem.orderList.concat(data.list)
  503. this.hasNextPage = data.hasNextPage
  504. this.pullFlag = false // 防上拉暴滑
  505. setTimeout(() => {
  506. this.pullFlag = true
  507. }, 500)
  508. if (this.hasNextPage) {
  509. this.pullUpOn = false
  510. this.nomoreText = '上拉显示更多'
  511. } else {
  512. this.loadding = false
  513. this.pullUpOn = false
  514. this.nomoreText = '已至底部'
  515. }
  516. } catch (error) {
  517. this.$util.msg(error.msg, 2000)
  518. }
  519. },
  520. //获取点击
  521. handButtonConfirm(data) {
  522. console.log('data',data)
  523. this.handleShopOrderId = data.shopOrderId
  524. switch (data.type) {
  525. case 'cancel': //取消订单
  526. this.modal = true
  527. this.contentModalText = '确认取消该订单吗?'
  528. this.handleModelEven = 1
  529. break
  530. case 'delete': //删除订单
  531. this.modal = true
  532. this.contentModalText = '确认删除该订单吗?'
  533. this.handleModelEven = 2
  534. break
  535. case 'confirm': // 确认订单
  536. this.modal = true
  537. this.contentModalText = '确认此订单吗?'
  538. this.handleModelEven = 3
  539. break
  540. case 'again':
  541. this.handOrderAgain(data.shopOrderId)
  542. break
  543. case 'query':
  544. this.isModalLayer = true
  545. this.$api.navigateTo('/pages/user/order/order-logistics?shopOrderId=' + data.shopOrderId)
  546. break
  547. }
  548. },
  549. //确定筛选
  550. handSearchConfirmData(data) {
  551. this.listQuery.groupServiceId = data.serviceProviderId
  552. this.getOrderDatainit(this.currentTab)
  553. },
  554. scrolltolower() {
  555. if (this.hasNextPage) {
  556. this.loadding = true
  557. this.pullUpOn = true
  558. this.getOnReachBottomData(this.currentTab)
  559. }
  560. },
  561. detail(order) {
  562. //订单详情跳转
  563. this.isModalLayer = true
  564. if (this.screenTab === 3) {
  565. this.$api.navigateTo(
  566. `/pages/seller/order/order-club-details?listType=${this.currentTab}&shopOrderId=${
  567. order.shopOrderId
  568. }&userId=${order.userId}`
  569. )
  570. } else {
  571. this.$api.navigateTo(
  572. `/pages/seller/order/order-details?listType=${this.currentTab}&shopOrderId=${
  573. order.shopOrderId
  574. }&userId=${order.userId}`
  575. )
  576. }
  577. },
  578. handlSearchPath() {
  579. this.$api.navigateTo('/pages/seller/order/search-order')
  580. },
  581. PromotionsFormat(promo) {
  582. //促销活动类型数据处理
  583. if (promo != null) {
  584. if (promo.type == 1 && promo.mode == 1) {
  585. return true
  586. } else {
  587. return false
  588. }
  589. }
  590. return false
  591. },
  592. getHeaderTopHeight() {
  593. // 状态栏高度
  594. let self = this
  595. let statusBarHeight = this.systeminfo.statusBarHeight
  596. let headerPosi = this.headerBtnPosi
  597. let btnPosi = {
  598. // 胶囊实际位置,坐标信息不是左上角原点
  599. height: headerPosi.height,
  600. width: headerPosi.width,
  601. // 胶囊top - 状态栏高度
  602. top: headerPosi.top - statusBarHeight,
  603. // 胶囊bottom - 胶囊height - 状态栏height (现胶囊bottom 为距离导航栏底部的长度)
  604. bottom: headerPosi.bottom - headerPosi.height - statusBarHeight,
  605. // 屏幕宽度 - 胶囊right
  606. right: this.systeminfo.screenWidth - headerPosi.right
  607. }
  608. this.navbarHeight = headerPosi.bottom + btnPosi.bottom // 原胶囊bottom + 现胶囊bottom
  609. // 高度自适应
  610. uni.getSystemInfo({
  611. success: function(res) {
  612. let calc = res.windowHeight
  613. self.winHeight = calc - self.CustomBar - 82
  614. }
  615. })
  616. },
  617. setHeaderBtnPosi() {
  618. // 获得胶囊按钮位置信息
  619. let headerBtnPosi = uni.getMenuButtonBoundingClientRect()
  620. return headerBtnPosi
  621. },
  622. setSysteminfo() {
  623. let systeminfo
  624. uni.getSystemInfo({
  625. // 获取设备信息
  626. success: res => {
  627. systeminfo = res
  628. }
  629. })
  630. return systeminfo
  631. }
  632. },
  633. onPageScroll(e) {
  634. this.scrollTop = e.scrollTop
  635. },
  636. onShow() {
  637. this.isModalLayer = false
  638. }
  639. }
  640. </script>
  641. <style lang="scss">
  642. page {
  643. background-color: #ffffff;
  644. }
  645. /*tabbar start*/
  646. ::-webkit-scrollbar {
  647. width: 0;
  648. height: 0;
  649. color: transparent;
  650. }
  651. .order-section-top {
  652. width: 100%;
  653. position: fixed;
  654. top: 0;
  655. left: 0;
  656. z-index: 99;
  657. background: #ffffff;
  658. .tab-screen {
  659. width: 100%;
  660. box-sizing: border-box;
  661. background: #fff;
  662. white-space: nowrap;
  663. height: 80rpx;
  664. padding: 10rpx 0;
  665. border-top: 1px solid #f7f7f7;
  666. border-bottom: 1px solid #f7f7f7;
  667. overflow: hidden;
  668. .tab-screen-item {
  669. min-width: 100rpx;
  670. height: 60rpx;
  671. border-radius: 10rpx;
  672. background: #f7f7f7;
  673. margin: 0 15rpx;
  674. padding: 0 15rpx;
  675. line-height: 60rpx;
  676. font-size: $font-size-28;
  677. color: #333333;
  678. text-align: center;
  679. display: inline-block;
  680. &.active {
  681. color: $color-system;
  682. }
  683. }
  684. }
  685. }
  686. .tab-view::before {
  687. content: '';
  688. position: absolute;
  689. border-bottom: 1rpx solid #eaeef1;
  690. -webkit-transform: scaleY(0.5);
  691. transform: scaleY(0.5);
  692. bottom: 0;
  693. right: 0;
  694. left: 0;
  695. }
  696. .tab-view {
  697. width: 100%;
  698. height: 80rpx;
  699. overflow: hidden;
  700. box-sizing: border-box;
  701. background: #fff;
  702. white-space: nowrap;
  703. border-top: 1px solid #f7f7f7;
  704. }
  705. .tab-bar-item {
  706. padding: 0;
  707. height: 80rpx;
  708. min-width: 80rpx;
  709. line-height: 80rpx;
  710. margin: 0 28rpx;
  711. display: inline-block;
  712. text-align: center;
  713. box-sizing: border-box;
  714. &.active {
  715. border-bottom: 6rpx solid $color-system;
  716. }
  717. .tab-bar-title {
  718. height: 80rpx;
  719. line-height: 80rpx;
  720. font-size: $font-size-28;
  721. color: $text-color;
  722. }
  723. &.active .tab-bar-title {
  724. color: $color-system !important;
  725. }
  726. }
  727. .container {
  728. padding-bottom: env(safe-area-inset-bottom);
  729. height: auto;
  730. position: relative;
  731. }
  732. .tui-order-content {
  733. width: 100%;
  734. height: auto;
  735. }
  736. .tui-order-list {
  737. width: 100%;
  738. position: relative;
  739. }
  740. .tui-order-item {
  741. display: flex;
  742. flex-direction: column;
  743. width: 702rpx;
  744. padding: 20rpx 24rpx 0 24rpx;
  745. background: #fff;
  746. border-bottom: 20rpx solid #f7f7f7;
  747. }
  748. .order-title {
  749. width: 100%;
  750. height: auto;
  751. .order-title-name {
  752. width: 100%;
  753. height: 72rpx;
  754. border-bottom: 1px solid #f7f7f7;
  755. line-height: 72rpx;
  756. text-align: left;
  757. font-size: $font-size-28;
  758. color: #333333;
  759. .tags {
  760. display: inline-block;
  761. width: 60rpx;
  762. height: 32rpx;
  763. border-radius: 16rpx 0;
  764. background: #f0cb72;
  765. font-size: $font-size-22;
  766. color: #4e4539;
  767. text-align: center;
  768. line-height: 32rpx;
  769. margin-left: 10rpx;
  770. &.sv {
  771. background: #333333;
  772. color: #f0cb72;
  773. }
  774. }
  775. .name {
  776. float: right;
  777. font-size: 26rpx;
  778. color: #999999;
  779. }
  780. }
  781. .order-title-t {
  782. width: 100%;
  783. height: 68rpx;
  784. float: left;
  785. line-height: 68rpx;
  786. position: relative;
  787. .bage-icon {
  788. width: 50rpx;
  789. height: 50rpx;
  790. display: block;
  791. position: absolute;
  792. right: 110rpx;
  793. top: 12rpx;
  794. }
  795. .bage{
  796. display: inline-block;
  797. width: 72rpx;
  798. height: 32rpx;
  799. margin: 19rpx 10rpx 0 10rpx;
  800. border-radius: 16rpx 0;
  801. line-height: 32rpx;
  802. font-size: $font-size-22;
  803. text-align: center;
  804. color: #ffffff;
  805. float: right;
  806. &.buss{
  807. background: radial-gradient(circle, rgba(255, 39, 180, 1) 0%, rgba(193, 77, 245, 1) 100%);
  808. }
  809. &.auto{
  810. background: #7fba4f;
  811. color: #ffffff;
  812. }
  813. &.ebate{
  814. background: #ff7a51;
  815. }
  816. }
  817. .order-title-tip {
  818. float: left;
  819. font-size: $font-size-28;
  820. line-height: 68rpx;
  821. text-align: right;
  822. color: #ff2a2a;
  823. }
  824. }
  825. .order-title-b {
  826. width: 100%;
  827. height: 40rpx;
  828. float: left;
  829. margin-top: 8rpx;
  830. .order-title-btxt {
  831. float: left;
  832. font-size: $font-size-28;
  833. line-height: 40rpx;
  834. color: #999999;
  835. text-align: left;
  836. &.num{
  837. color: #333333;
  838. }
  839. }
  840. }
  841. }
  842. .goods-title {
  843. width: 100%;
  844. height: 56rpx;
  845. float: left;
  846. margin-top: 10rpx;
  847. .floor-item-act {
  848. height: 56rpx;
  849. text-align: center;
  850. box-sizing: border-box;
  851. float: left;
  852. padding: 10rpx 0;
  853. margin-right: 12rpx;
  854. }
  855. .title-text {
  856. width: 400rpx;
  857. overflow: hidden;
  858. text-overflow: ellipsis;
  859. white-space: nowrap;
  860. float: left;
  861. font-size: $font-size-28;
  862. color: $text-color;
  863. text-align: left;
  864. line-height: 56rpx;
  865. font-weight: bold;
  866. }
  867. }
  868. .goods-item {
  869. width: 100%;
  870. height: auto;
  871. }
  872. .goods-pros-t {
  873. width: 100%;
  874. height: auto;
  875. padding: 24rpx 0;
  876. .pros-img {
  877. float: left;
  878. width: 210rpx;
  879. height: 100%;
  880. border-radius: 10rpx;
  881. margin: 0 26rpx 0 0;
  882. position: relative;
  883. .tips {
  884. display: inline-block;
  885. width: 80rpx;
  886. height: 40rpx;
  887. background-image: linear-gradient(214deg, #ff4500 0%, #ff5800 53%, #ff4367 100%);
  888. line-height: 40rpx;
  889. text-align: center;
  890. font-size: $font-size-24;
  891. color: #ffffff;
  892. border-radius: 10rpx 0 10rpx 0;
  893. position: absolute;
  894. top: 0;
  895. left: 0;
  896. }
  897. image {
  898. width: 210rpx;
  899. height: 210rpx;
  900. border-radius: 10rpx;
  901. border: 1px solid #f3f3f3;
  902. }
  903. }
  904. }
  905. .pros-product {
  906. width: 460rpx;
  907. height: 100%;
  908. line-height: 36rpx;
  909. font-size: $font-size-26;
  910. position: relative;
  911. float: left;
  912. .producttitle {
  913. width: 100%;
  914. display: inline-block;
  915. height: auto;
  916. text-overflow: ellipsis;
  917. display: -webkit-box;
  918. word-break: break-all;
  919. -webkit-box-orient: vertical;
  920. -webkit-line-clamp: 2;
  921. overflow: hidden;
  922. margin-bottom: 8rpx;
  923. }
  924. .productspec {
  925. height: 36rpx;
  926. color: #999999;
  927. text-overflow: ellipsis;
  928. display: -webkit-box;
  929. word-break: break-all;
  930. -webkit-box-orient: vertical;
  931. -webkit-line-clamp: 1;
  932. overflow: hidden;
  933. }
  934. .productprice {
  935. height: 48rpx;
  936. width: 100%;
  937. float: left;
  938. .price {
  939. line-height: 48rpx;
  940. font-size: $font-size-28;
  941. width: 48%;
  942. color: #ff2a2a;
  943. float: left;
  944. font-weight: bold;
  945. &.none {
  946. text-decoration: line-through;
  947. color: #999999;
  948. }
  949. }
  950. .count {
  951. height: 100%;
  952. float: right;
  953. position: relative;
  954. .small {
  955. color: #666666;
  956. }
  957. }
  958. }
  959. .floor-item-act {
  960. width: 100%;
  961. height: 56rpx;
  962. text-align: center;
  963. box-sizing: border-box;
  964. float: left;
  965. padding: 0 0 10rpx 0;
  966. }
  967. }
  968. .order-footer {
  969. width: 100%;
  970. height: 78rpx;
  971. float: left;
  972. .order-footer-top {
  973. width: 100%;
  974. height: 34rpx;
  975. line-height: 34rpx;
  976. font-size: $font-size-24;
  977. color: #999999;
  978. text-align: right;
  979. }
  980. .order-footer-bot {
  981. width: 100%;
  982. float: left;
  983. height: 48rpx;
  984. line-height: 48rpx;
  985. font-size: $font-size-28;
  986. font-weight: bold;
  987. color: $text-color;
  988. .count {
  989. width: 50%;
  990. float: left;
  991. text-align: left;
  992. }
  993. .money {
  994. width: 50%;
  995. float: right;
  996. text-align: right;
  997. }
  998. }
  999. }
  1000. .aganBj {
  1001. position: fixed;
  1002. left: 0;
  1003. top: 0;
  1004. bottom: 0;
  1005. width: 100%;
  1006. height: 100%;
  1007. background-color: rgba(0, 0, 0, 0.5);
  1008. z-index: 999999;
  1009. .alertAgan {
  1010. position: absolute;
  1011. top: 50%;
  1012. left: 50%;
  1013. transform: translate(-50%, -50%);
  1014. width: 580rpx;
  1015. background-color: #fff;
  1016. border-radius: 16rpx;
  1017. .title {
  1018. font-size: 30rpx;
  1019. color: #333333;
  1020. line-height: 42rpx;
  1021. padding: 30rpx;
  1022. display: block;
  1023. }
  1024. .goods {
  1025. padding: 0 30rpx;
  1026. .list {
  1027. padding: 10px 0;
  1028. border-bottom: 1rpx solid #e1e1e1;
  1029. margin: 10rpx 0;
  1030. .image-left {
  1031. width: 86rpx;
  1032. height: 86rpx;
  1033. border: 2rpx solid #e1e1e1;
  1034. border-radius: 6rpx;
  1035. display: inline-block;
  1036. vertical-align: middle;
  1037. }
  1038. .name-right {
  1039. display: inline-block;
  1040. width: 416rpx;
  1041. margin-left: 15rpx;
  1042. font-size: 26rpx;
  1043. color: #666666;
  1044. vertical-align: middle;
  1045. word-break: break-all;
  1046. overflow: hidden;
  1047. text-overflow: ellipsis;
  1048. display: -webkit-inline-box;
  1049. -webkit-line-clamp: 2;
  1050. -webkit-box-orient: vertical;
  1051. }
  1052. }
  1053. }
  1054. .BtnAll {
  1055. margin-top: 30rpx;
  1056. .btn {
  1057. display: inline-block;
  1058. width: 290rpx;
  1059. height: 90rpx;
  1060. line-height: 90rpx;
  1061. text-align: center;
  1062. &.closebtn {
  1063. border-radius: 0px 0px 0px 10px;
  1064. color: #999999;
  1065. background: #efefef;
  1066. }
  1067. &.cancel {
  1068. border-radius: 0px 0px 8px 0px;
  1069. background: $btn-confirm;
  1070. color: #fff;
  1071. }
  1072. }
  1073. }
  1074. }
  1075. }
  1076. </style>