order-list.vue 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083
  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"></modal-layer>
  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 btSearch from '@/components/uni-search/bt-search.vue' //搜索
  319. import modalLayer from '@/components/modal-layer'
  320. import empty from '@/components/empty'
  321. import cmListButton from './components/cm-list-button' //操作按钮
  322. import cmSharePopup from './components/cm-share-popup' //分享弹窗
  323. import cmOrderDrawer from '../components/cm-order-drawer' //筛选抽屉
  324. import orderMixins from './mixins/orderMixins.js'
  325. export default {
  326. mixins: [orderMixins],
  327. components: {
  328. headerBack,
  329. empty,
  330. btSearch,
  331. modalLayer,
  332. cmListButton,
  333. cmSharePopup,
  334. cmOrderDrawer
  335. },
  336. data() {
  337. return {
  338. orderTabBar: [
  339. { listType: 0, text: '全部订单', orderList: [] },
  340. { listType: 1, text: '待确认', orderList: [] },
  341. { listType: 2, text: '待付款', orderList: [] },
  342. { listType: 3, text: '待发货', orderList: [] },
  343. { listType: 4, text: '已发货', orderList: [] },
  344. { listType: 5, text: '退货/款', orderList: [] }
  345. ],
  346. screenTabBar: [
  347. { type: 0, text: '全部订单(我的)' },
  348. { type: 1, text: '自主订单(我的)' },
  349. { type: 2, text: '协销订单(我的)' }
  350. ],
  351. headerBtnPosi: this.setHeaderBtnPosi(), //获取设备顶部胶囊高度
  352. systeminfo: this.setSysteminfo(), //获取设备信息
  353. nvabarData: {
  354. //顶部自定义导航
  355. showCapsule: 1, // 是否显示左上角图标 1表示显示 0表示不显示,
  356. showSearch: 1,
  357. title: ' ' // 导航栏中间的标题
  358. },
  359. CustomBar: this.CustomBar, // 顶部导航栏高度
  360. winHeight: '', //窗口高度
  361. currentTab: 0, //预设当前项的值
  362. screenTab: 0, //筛选预设当前项的值
  363. scrollLeft: 0, //tab标题的滚动条位置
  364. orderData: [],
  365. listQuery: {
  366. pageNum: 1, //页数
  367. pageSize: 10, //条数
  368. groupServiceId: 0,
  369. serviceProviderId: 0, //协销用户ID
  370. listType: 0,
  371. orderSubmitType: 0
  372. },
  373. scrollTop: 0,
  374. skeletonShow: true,
  375. isClickChange: false,
  376. isShareModal: false, //控制分享弹窗
  377. isShareType: 2,
  378. isModalLayer: false,
  379. loadding: false,
  380. pullUpOn: true,
  381. hasNextPage: false,
  382. pullFlag: true,
  383. navbarHeight: '',
  384. nomoreText: '上拉显示更多',
  385. showAgan: false,
  386. failList: [], // 再来一单可购买商品
  387. promptitle: '',
  388. userId: 0,
  389. manager: 0,
  390. rightDrawer: false ,//控制筛选抽屉
  391. }
  392. },
  393. onLoad(option) {
  394. if (option.type === 'detele') {
  395. this.isDelete = true
  396. }
  397. this.currentTab = option.listType
  398. this.getHeaderTopHeight() //设置自定义导航高度
  399. this.initGetStotage()
  400. },
  401. computed: {
  402. ...mapState(['isManage'])
  403. },
  404. methods: {
  405. async initGetStotage() {
  406. const userInfo = await this.$api.getStorage()
  407. this.userId = userInfo.userId ? userInfo.userId : 0
  408. this.manager = userInfo.manager ? userInfo.manager : 0
  409. this.listQuery.serviceProviderId = userInfo.serviceProviderId
  410. this.getOrderDatainit(this.currentTab)
  411. },
  412. // 滚动切换标签样式
  413. onChange(e) {
  414. let index = e.target.current || e.detail.current
  415. if (this.isClickChange) {
  416. this.currentTab = index
  417. this.isClickChange = false
  418. return
  419. }
  420. this.isClickChange = false
  421. this.currentTab = index
  422. this.listQuery.listType = index
  423. this.checkCor()
  424. this.pullUpOn = true //切换时隐藏
  425. this.loadding = false //切换时隐藏
  426. this.nomoreText = ''
  427. this.getOrderDatainit(this.currentTab, 'tabChange')
  428. },
  429. // 点击标题切换当前页时改变样式
  430. onClickTab(e) {
  431. let tabIndex = e.target.dataset.current || e.currentTarget.dataset.current
  432. if (this.currentTab === tabIndex) {
  433. return false
  434. } else {
  435. this.isClickChange = true
  436. this.currentTab = tabIndex
  437. this.listQuery.listType = tabIndex
  438. this.pullUpOn = true //切换时隐藏
  439. this.loadding = false //切换时隐藏
  440. this.getOrderDatainit(this.currentTab)
  441. }
  442. },
  443. onClickScreenTab(index) {
  444. this.screenTab = index
  445. this.listQuery.orderSubmitType = index
  446. this.pullUpOn = true //切换时隐藏
  447. this.loadding = false //切换时隐藏
  448. this.nomoreText = ''
  449. this.getOrderDatainit(this.currentTab)
  450. },
  451. //判断当前滚动超过一屏时,设置tab标题滚动条。
  452. checkCor: function() {
  453. if (this.currentTab > 3) {
  454. //这里距离按实际计算
  455. this.scrollLeft = 300
  456. } else {
  457. this.scrollLeft = 0
  458. }
  459. },
  460. async getOrderDatainit(index, source) {
  461. try {
  462. this.listQuery.pageNum = 1
  463. let orderItem = this.orderTabBar[index]
  464. if (source === 'tabChange' && orderItem.loaded === true) {
  465. //tab切换只有第一次需要加载数据
  466. return
  467. }
  468. //loaded新字段用于表示数据加载完毕,如果为空可以显示空白页
  469. const res = await this.SellerService.GetSellerOrderList(this.listQuery)
  470. const data = res.data
  471. if (data.list && data.list.length > 0) {
  472. orderItem.orderList = []
  473. data.list.forEach(item => {
  474. orderItem.orderList.push(item)
  475. })
  476. this.hasNextPage = data.hasNextPage
  477. if (this.hasNextPage) {
  478. this.pullUpOn = false
  479. this.nomoreText = '上拉显示更多'
  480. } else {
  481. if (orderItem.orderList.length < 2) {
  482. this.pullUpOn = true
  483. } else {
  484. this.pullUpOn = false
  485. this.nomoreText = '已至底部'
  486. }
  487. }
  488. } else {
  489. this.$set(orderItem, 'loaded', true)
  490. orderItem.orderList = []
  491. }
  492. this.skeletonShow = false
  493. } catch (error) {
  494. this.$util.msg(error.msg, 2000)
  495. }
  496. },
  497. //上拉加载
  498. async getOnReachBottomData(index) {
  499. try {
  500. this.listQuery.pageNum += 1
  501. const res = await this.SellerService.GetSellerOrderList(this.listQuery)
  502. const data = res.data
  503. const orderItem = this.orderTabBar[index]
  504. orderItem.orderList = orderItem.orderList.concat(data.list)
  505. this.hasNextPage = data.hasNextPage
  506. this.pullFlag = false // 防上拉暴滑
  507. setTimeout(() => {
  508. this.pullFlag = true
  509. }, 500)
  510. if (this.hasNextPage) {
  511. this.pullUpOn = false
  512. this.nomoreText = '上拉显示更多'
  513. } else {
  514. this.loadding = false
  515. this.pullUpOn = false
  516. this.nomoreText = '已至底部'
  517. }
  518. } catch (error) {
  519. this.$util.msg(error.msg, 2000)
  520. }
  521. },
  522. //获取点击
  523. handButtonConfirm(data) {
  524. console.log('data',data)
  525. this.handleShopOrderId = data.shopOrderId
  526. switch (data.type) {
  527. case 'cancel': //取消订单
  528. this.modal = true
  529. this.contentModalText = '确认取消该订单吗?'
  530. this.handleModelEven = 1
  531. break
  532. case 'delete': //删除订单
  533. this.modal = true
  534. this.contentModalText = '确认删除该订单吗?'
  535. this.handleModelEven = 2
  536. break
  537. case 'confirm': // 确认订单
  538. this.modal = true
  539. this.contentModalText = '确认此订单吗?'
  540. this.handleModelEven = 3
  541. break
  542. case 'again':
  543. this.handOrderAgain(data.shopOrderId)
  544. break
  545. case 'query':
  546. this.isModalLayer = true
  547. this.$api.navigateTo('/pages/user/order/order-logistics?shopOrderId=' + data.shopOrderId)
  548. break
  549. }
  550. },
  551. //确定筛选
  552. handSearchConfirmData(data) {
  553. this.listQuery.groupServiceId = data.serviceProviderId
  554. this.getOrderDatainit(this.currentTab)
  555. },
  556. scrolltolower() {
  557. if (this.hasNextPage) {
  558. this.loadding = true
  559. this.pullUpOn = true
  560. this.getOnReachBottomData(this.currentTab)
  561. }
  562. },
  563. detail(order) {
  564. //订单详情跳转
  565. this.isModalLayer = true
  566. if (this.screenTab === 3) {
  567. this.$api.navigateTo(
  568. `/pages/seller/order/order-club-details?listType=${this.currentTab}&shopOrderId=${
  569. order.shopOrderId
  570. }&userId=${order.userId}`
  571. )
  572. } else {
  573. this.$api.navigateTo(
  574. `/pages/seller/order/order-details?listType=${this.currentTab}&shopOrderId=${
  575. order.shopOrderId
  576. }&userId=${order.userId}`
  577. )
  578. }
  579. },
  580. handlSearchPath() {
  581. this.$api.navigateTo('/pages/seller/order/search-order')
  582. },
  583. PromotionsFormat(promo) {
  584. //促销活动类型数据处理
  585. if (promo != null) {
  586. if (promo.type == 1 && promo.mode == 1) {
  587. return true
  588. } else {
  589. return false
  590. }
  591. }
  592. return false
  593. },
  594. getHeaderTopHeight() {
  595. // 状态栏高度
  596. let self = this
  597. let statusBarHeight = this.systeminfo.statusBarHeight
  598. let headerPosi = this.headerBtnPosi
  599. let btnPosi = {
  600. // 胶囊实际位置,坐标信息不是左上角原点
  601. height: headerPosi.height,
  602. width: headerPosi.width,
  603. // 胶囊top - 状态栏高度
  604. top: headerPosi.top - statusBarHeight,
  605. // 胶囊bottom - 胶囊height - 状态栏height (现胶囊bottom 为距离导航栏底部的长度)
  606. bottom: headerPosi.bottom - headerPosi.height - statusBarHeight,
  607. // 屏幕宽度 - 胶囊right
  608. right: this.systeminfo.screenWidth - headerPosi.right
  609. }
  610. this.navbarHeight = headerPosi.bottom + btnPosi.bottom // 原胶囊bottom + 现胶囊bottom
  611. // 高度自适应
  612. uni.getSystemInfo({
  613. success: function(res) {
  614. let calc = res.windowHeight
  615. self.winHeight = calc - self.CustomBar - 82
  616. }
  617. })
  618. },
  619. setHeaderBtnPosi() {
  620. // 获得胶囊按钮位置信息
  621. let headerBtnPosi = uni.getMenuButtonBoundingClientRect()
  622. return headerBtnPosi
  623. },
  624. setSysteminfo() {
  625. let systeminfo
  626. uni.getSystemInfo({
  627. // 获取设备信息
  628. success: res => {
  629. systeminfo = res
  630. }
  631. })
  632. return systeminfo
  633. }
  634. },
  635. onPageScroll(e) {
  636. this.scrollTop = e.scrollTop
  637. },
  638. onShow() {
  639. this.isModalLayer = false
  640. }
  641. }
  642. </script>
  643. <style lang="scss">
  644. page {
  645. background-color: #ffffff;
  646. }
  647. /*tabbar start*/
  648. ::-webkit-scrollbar {
  649. width: 0;
  650. height: 0;
  651. color: transparent;
  652. }
  653. .order-section-top {
  654. width: 100%;
  655. position: fixed;
  656. top: 0;
  657. left: 0;
  658. z-index: 99;
  659. background: #ffffff;
  660. .tab-screen {
  661. width: 100%;
  662. box-sizing: border-box;
  663. background: #fff;
  664. white-space: nowrap;
  665. height: 80rpx;
  666. padding: 10rpx 0;
  667. border-top: 1px solid #f7f7f7;
  668. border-bottom: 1px solid #f7f7f7;
  669. overflow: hidden;
  670. .tab-screen-item {
  671. min-width: 100rpx;
  672. height: 60rpx;
  673. border-radius: 10rpx;
  674. background: #f7f7f7;
  675. margin: 0 15rpx;
  676. padding: 0 15rpx;
  677. line-height: 60rpx;
  678. font-size: $font-size-28;
  679. color: #333333;
  680. text-align: center;
  681. display: inline-block;
  682. &.active {
  683. color: $color-system;
  684. }
  685. }
  686. }
  687. }
  688. .tab-view::before {
  689. content: '';
  690. position: absolute;
  691. border-bottom: 1rpx solid #eaeef1;
  692. -webkit-transform: scaleY(0.5);
  693. transform: scaleY(0.5);
  694. bottom: 0;
  695. right: 0;
  696. left: 0;
  697. }
  698. .tab-view {
  699. width: 100%;
  700. height: 80rpx;
  701. overflow: hidden;
  702. box-sizing: border-box;
  703. background: #fff;
  704. white-space: nowrap;
  705. border-top: 1px solid #f7f7f7;
  706. }
  707. .tab-bar-item {
  708. padding: 0;
  709. height: 80rpx;
  710. min-width: 80rpx;
  711. line-height: 80rpx;
  712. margin: 0 28rpx;
  713. display: inline-block;
  714. text-align: center;
  715. box-sizing: border-box;
  716. &.active {
  717. border-bottom: 6rpx solid $color-system;
  718. }
  719. .tab-bar-title {
  720. height: 80rpx;
  721. line-height: 80rpx;
  722. font-size: $font-size-28;
  723. color: $text-color;
  724. }
  725. &.active .tab-bar-title {
  726. color: $color-system !important;
  727. }
  728. }
  729. .container {
  730. padding-bottom: env(safe-area-inset-bottom);
  731. height: auto;
  732. position: relative;
  733. }
  734. .tui-order-content {
  735. width: 100%;
  736. height: auto;
  737. }
  738. .tui-order-list {
  739. width: 100%;
  740. position: relative;
  741. }
  742. .tui-order-item {
  743. display: flex;
  744. flex-direction: column;
  745. width: 702rpx;
  746. padding: 20rpx 24rpx 0 24rpx;
  747. background: #fff;
  748. border-bottom: 20rpx solid #f7f7f7;
  749. }
  750. .order-title {
  751. width: 100%;
  752. height: auto;
  753. .order-title-name {
  754. width: 100%;
  755. height: 72rpx;
  756. border-bottom: 1px solid #f7f7f7;
  757. line-height: 72rpx;
  758. text-align: left;
  759. font-size: $font-size-28;
  760. color: #333333;
  761. .tags {
  762. display: inline-block;
  763. width: 60rpx;
  764. height: 32rpx;
  765. border-radius: 16rpx 0;
  766. background: #f0cb72;
  767. font-size: $font-size-22;
  768. color: #4e4539;
  769. text-align: center;
  770. line-height: 32rpx;
  771. margin-left: 10rpx;
  772. &.sv {
  773. background: #333333;
  774. color: #f0cb72;
  775. }
  776. }
  777. .name {
  778. float: right;
  779. font-size: 26rpx;
  780. color: #999999;
  781. }
  782. }
  783. .order-title-t {
  784. width: 100%;
  785. height: 68rpx;
  786. float: left;
  787. line-height: 68rpx;
  788. position: relative;
  789. .bage-icon {
  790. width: 50rpx;
  791. height: 50rpx;
  792. display: block;
  793. position: absolute;
  794. right: 110rpx;
  795. top: 12rpx;
  796. }
  797. .bage{
  798. display: inline-block;
  799. width: 72rpx;
  800. height: 32rpx;
  801. margin: 19rpx 10rpx 0 10rpx;
  802. border-radius: 16rpx 0;
  803. line-height: 32rpx;
  804. font-size: $font-size-22;
  805. text-align: center;
  806. color: #ffffff;
  807. float: right;
  808. &.buss{
  809. background: radial-gradient(circle, rgba(255, 39, 180, 1) 0%, rgba(193, 77, 245, 1) 100%);
  810. }
  811. &.auto{
  812. background: #7fba4f;
  813. color: #ffffff;
  814. }
  815. &.ebate{
  816. background: #ff7a51;
  817. }
  818. }
  819. .order-title-tip {
  820. float: left;
  821. font-size: $font-size-28;
  822. line-height: 68rpx;
  823. text-align: right;
  824. color: #ff2a2a;
  825. }
  826. }
  827. .order-title-b {
  828. width: 100%;
  829. height: 40rpx;
  830. float: left;
  831. margin-top: 8rpx;
  832. .order-title-btxt {
  833. float: left;
  834. font-size: $font-size-28;
  835. line-height: 40rpx;
  836. color: #999999;
  837. text-align: left;
  838. &.num{
  839. color: #333333;
  840. }
  841. }
  842. }
  843. }
  844. .goods-title {
  845. width: 100%;
  846. height: 56rpx;
  847. float: left;
  848. margin-top: 10rpx;
  849. .floor-item-act {
  850. height: 56rpx;
  851. text-align: center;
  852. box-sizing: border-box;
  853. float: left;
  854. padding: 10rpx 0;
  855. margin-right: 12rpx;
  856. }
  857. .title-text {
  858. width: 400rpx;
  859. overflow: hidden;
  860. text-overflow: ellipsis;
  861. white-space: nowrap;
  862. float: left;
  863. font-size: $font-size-28;
  864. color: $text-color;
  865. text-align: left;
  866. line-height: 56rpx;
  867. font-weight: bold;
  868. }
  869. }
  870. .goods-item {
  871. width: 100%;
  872. height: auto;
  873. }
  874. .goods-pros-t {
  875. width: 100%;
  876. height: auto;
  877. padding: 24rpx 0;
  878. .pros-img {
  879. float: left;
  880. width: 210rpx;
  881. height: 100%;
  882. border-radius: 10rpx;
  883. margin: 0 26rpx 0 0;
  884. position: relative;
  885. .tips {
  886. display: inline-block;
  887. width: 80rpx;
  888. height: 40rpx;
  889. background-image: linear-gradient(214deg, #ff4500 0%, #ff5800 53%, #ff4367 100%);
  890. line-height: 40rpx;
  891. text-align: center;
  892. font-size: $font-size-24;
  893. color: #ffffff;
  894. border-radius: 10rpx 0 10rpx 0;
  895. position: absolute;
  896. top: 0;
  897. left: 0;
  898. }
  899. image {
  900. width: 210rpx;
  901. height: 210rpx;
  902. border-radius: 10rpx;
  903. border: 1px solid #f3f3f3;
  904. }
  905. }
  906. }
  907. .pros-product {
  908. width: 460rpx;
  909. height: 100%;
  910. line-height: 36rpx;
  911. font-size: $font-size-26;
  912. position: relative;
  913. float: left;
  914. .producttitle {
  915. width: 100%;
  916. display: inline-block;
  917. height: auto;
  918. text-overflow: ellipsis;
  919. display: -webkit-box;
  920. word-break: break-all;
  921. -webkit-box-orient: vertical;
  922. -webkit-line-clamp: 2;
  923. overflow: hidden;
  924. margin-bottom: 8rpx;
  925. }
  926. .productspec {
  927. height: 36rpx;
  928. color: #999999;
  929. text-overflow: ellipsis;
  930. display: -webkit-box;
  931. word-break: break-all;
  932. -webkit-box-orient: vertical;
  933. -webkit-line-clamp: 1;
  934. overflow: hidden;
  935. }
  936. .productprice {
  937. height: 48rpx;
  938. width: 100%;
  939. float: left;
  940. .price {
  941. line-height: 48rpx;
  942. font-size: $font-size-28;
  943. width: 48%;
  944. color: #ff2a2a;
  945. float: left;
  946. font-weight: bold;
  947. &.none {
  948. text-decoration: line-through;
  949. color: #999999;
  950. }
  951. }
  952. .count {
  953. height: 100%;
  954. float: right;
  955. position: relative;
  956. .small {
  957. color: #666666;
  958. }
  959. }
  960. }
  961. .floor-item-act {
  962. width: 100%;
  963. height: 56rpx;
  964. text-align: center;
  965. box-sizing: border-box;
  966. float: left;
  967. padding: 0 0 10rpx 0;
  968. }
  969. }
  970. .order-footer {
  971. width: 100%;
  972. height: 78rpx;
  973. float: left;
  974. .order-footer-top {
  975. width: 100%;
  976. height: 34rpx;
  977. line-height: 34rpx;
  978. font-size: $font-size-24;
  979. color: #999999;
  980. text-align: right;
  981. }
  982. .order-footer-bot {
  983. width: 100%;
  984. float: left;
  985. height: 48rpx;
  986. line-height: 48rpx;
  987. font-size: $font-size-28;
  988. font-weight: bold;
  989. color: $text-color;
  990. .count {
  991. width: 50%;
  992. float: left;
  993. text-align: left;
  994. }
  995. .money {
  996. width: 50%;
  997. float: right;
  998. text-align: right;
  999. }
  1000. }
  1001. }
  1002. .aganBj {
  1003. position: fixed;
  1004. left: 0;
  1005. top: 0;
  1006. bottom: 0;
  1007. width: 100%;
  1008. height: 100%;
  1009. background-color: rgba(0, 0, 0, 0.5);
  1010. z-index: 999999;
  1011. .alertAgan {
  1012. position: absolute;
  1013. top: 50%;
  1014. left: 50%;
  1015. transform: translate(-50%, -50%);
  1016. width: 580rpx;
  1017. background-color: #fff;
  1018. border-radius: 16rpx;
  1019. .title {
  1020. font-size: 30rpx;
  1021. color: #333333;
  1022. line-height: 42rpx;
  1023. padding: 30rpx;
  1024. display: block;
  1025. }
  1026. .goods {
  1027. padding: 0 30rpx;
  1028. .list {
  1029. padding: 10px 0;
  1030. border-bottom: 1rpx solid #e1e1e1;
  1031. margin: 10rpx 0;
  1032. .image-left {
  1033. width: 86rpx;
  1034. height: 86rpx;
  1035. border: 2rpx solid #e1e1e1;
  1036. border-radius: 6rpx;
  1037. display: inline-block;
  1038. vertical-align: middle;
  1039. }
  1040. .name-right {
  1041. display: inline-block;
  1042. width: 416rpx;
  1043. margin-left: 15rpx;
  1044. font-size: 26rpx;
  1045. color: #666666;
  1046. vertical-align: middle;
  1047. word-break: break-all;
  1048. overflow: hidden;
  1049. text-overflow: ellipsis;
  1050. display: -webkit-inline-box;
  1051. -webkit-line-clamp: 2;
  1052. -webkit-box-orient: vertical;
  1053. }
  1054. }
  1055. }
  1056. .BtnAll {
  1057. margin-top: 30rpx;
  1058. .btn {
  1059. display: inline-block;
  1060. width: 290rpx;
  1061. height: 90rpx;
  1062. line-height: 90rpx;
  1063. text-align: center;
  1064. &.closebtn {
  1065. border-radius: 0px 0px 0px 10px;
  1066. color: #999999;
  1067. background: #efefef;
  1068. }
  1069. &.cancel {
  1070. border-radius: 0px 0px 8px 0px;
  1071. background: $btn-confirm;
  1072. color: #fff;
  1073. }
  1074. }
  1075. }
  1076. }
  1077. }
  1078. </style>