order-list.vue 27 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082
  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: 8rpx;
  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: 4rpx;
  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: radial-gradient(circle, rgba(255, 180, 39, 1) 0%, rgba(245, 142, 77, 1) 100%);
  813. }
  814. &.ebate{
  815. background: #ff7a51;
  816. }
  817. }
  818. .order-title-tip {
  819. float: left;
  820. font-size: $font-size-28;
  821. line-height: 68rpx;
  822. text-align: right;
  823. color: #ff2a2a;
  824. }
  825. }
  826. .order-title-b {
  827. width: 100%;
  828. height: 40rpx;
  829. float: left;
  830. margin-top: 8rpx;
  831. .order-title-btxt {
  832. float: left;
  833. font-size: $font-size-28;
  834. line-height: 40rpx;
  835. color: #999999;
  836. text-align: left;
  837. &.num{
  838. color: #333333;
  839. }
  840. }
  841. }
  842. }
  843. .goods-title {
  844. width: 100%;
  845. height: 56rpx;
  846. float: left;
  847. margin-top: 10rpx;
  848. .floor-item-act {
  849. height: 56rpx;
  850. text-align: center;
  851. box-sizing: border-box;
  852. float: left;
  853. padding: 10rpx 0;
  854. margin-right: 12rpx;
  855. }
  856. .title-text {
  857. width: 400rpx;
  858. overflow: hidden;
  859. text-overflow: ellipsis;
  860. white-space: nowrap;
  861. float: left;
  862. font-size: $font-size-28;
  863. color: $text-color;
  864. text-align: left;
  865. line-height: 56rpx;
  866. font-weight: bold;
  867. }
  868. }
  869. .goods-item {
  870. width: 100%;
  871. height: auto;
  872. }
  873. .goods-pros-t {
  874. width: 100%;
  875. height: auto;
  876. padding: 24rpx 0;
  877. .pros-img {
  878. float: left;
  879. width: 210rpx;
  880. height: 100%;
  881. border-radius: 10rpx;
  882. margin: 0 26rpx 0 0;
  883. position: relative;
  884. .tips {
  885. display: inline-block;
  886. width: 80rpx;
  887. height: 40rpx;
  888. background-image: linear-gradient(214deg, #ff4500 0%, #ff5800 53%, #ff4367 100%);
  889. line-height: 40rpx;
  890. text-align: center;
  891. font-size: $font-size-24;
  892. color: #ffffff;
  893. border-radius: 10rpx 0 10rpx 0;
  894. position: absolute;
  895. top: 0;
  896. left: 0;
  897. }
  898. image {
  899. width: 210rpx;
  900. height: 210rpx;
  901. border-radius: 10rpx;
  902. border: 1px solid #f3f3f3;
  903. }
  904. }
  905. }
  906. .pros-product {
  907. width: 460rpx;
  908. height: 100%;
  909. line-height: 36rpx;
  910. font-size: $font-size-26;
  911. position: relative;
  912. float: left;
  913. .producttitle {
  914. width: 100%;
  915. display: inline-block;
  916. height: auto;
  917. text-overflow: ellipsis;
  918. display: -webkit-box;
  919. word-break: break-all;
  920. -webkit-box-orient: vertical;
  921. -webkit-line-clamp: 2;
  922. overflow: hidden;
  923. margin-bottom: 8rpx;
  924. }
  925. .productspec {
  926. height: 36rpx;
  927. color: #999999;
  928. text-overflow: ellipsis;
  929. display: -webkit-box;
  930. word-break: break-all;
  931. -webkit-box-orient: vertical;
  932. -webkit-line-clamp: 1;
  933. overflow: hidden;
  934. }
  935. .productprice {
  936. height: 48rpx;
  937. width: 100%;
  938. float: left;
  939. .price {
  940. line-height: 48rpx;
  941. font-size: $font-size-28;
  942. width: 48%;
  943. color: #ff2a2a;
  944. float: left;
  945. font-weight: bold;
  946. &.none {
  947. text-decoration: line-through;
  948. color: #999999;
  949. }
  950. }
  951. .count {
  952. height: 100%;
  953. float: right;
  954. position: relative;
  955. .small {
  956. color: #666666;
  957. }
  958. }
  959. }
  960. .floor-item-act {
  961. width: 100%;
  962. height: 56rpx;
  963. text-align: center;
  964. box-sizing: border-box;
  965. float: left;
  966. padding: 0 0 10rpx 0;
  967. }
  968. }
  969. .order-footer {
  970. width: 100%;
  971. height: 78rpx;
  972. float: left;
  973. .order-footer-top {
  974. width: 100%;
  975. height: 34rpx;
  976. line-height: 34rpx;
  977. font-size: $font-size-24;
  978. color: #999999;
  979. text-align: right;
  980. }
  981. .order-footer-bot {
  982. width: 100%;
  983. float: left;
  984. height: 48rpx;
  985. line-height: 48rpx;
  986. font-size: $font-size-28;
  987. font-weight: bold;
  988. color: $text-color;
  989. .count {
  990. width: 50%;
  991. float: left;
  992. text-align: left;
  993. }
  994. .money {
  995. width: 50%;
  996. float: right;
  997. text-align: right;
  998. }
  999. }
  1000. }
  1001. .aganBj {
  1002. position: fixed;
  1003. left: 0;
  1004. top: 0;
  1005. bottom: 0;
  1006. width: 100%;
  1007. height: 100%;
  1008. background-color: rgba(0, 0, 0, 0.5);
  1009. z-index: 999999;
  1010. .alertAgan {
  1011. position: absolute;
  1012. top: 50%;
  1013. left: 50%;
  1014. transform: translate(-50%, -50%);
  1015. width: 580rpx;
  1016. background-color: #fff;
  1017. border-radius: 16rpx;
  1018. .title {
  1019. font-size: 30rpx;
  1020. color: #333333;
  1021. line-height: 42rpx;
  1022. padding: 30rpx;
  1023. display: block;
  1024. }
  1025. .goods {
  1026. padding: 0 30rpx;
  1027. .list {
  1028. padding: 10px 0;
  1029. border-bottom: 1rpx solid #e1e1e1;
  1030. margin: 10rpx 0;
  1031. .image-left {
  1032. width: 86rpx;
  1033. height: 86rpx;
  1034. border: 2rpx solid #e1e1e1;
  1035. border-radius: 6rpx;
  1036. display: inline-block;
  1037. vertical-align: middle;
  1038. }
  1039. .name-right {
  1040. display: inline-block;
  1041. width: 416rpx;
  1042. margin-left: 15rpx;
  1043. font-size: 26rpx;
  1044. color: #666666;
  1045. vertical-align: middle;
  1046. word-break: break-all;
  1047. overflow: hidden;
  1048. text-overflow: ellipsis;
  1049. display: -webkit-inline-box;
  1050. -webkit-line-clamp: 2;
  1051. -webkit-box-orient: vertical;
  1052. }
  1053. }
  1054. }
  1055. .BtnAll {
  1056. margin-top: 30rpx;
  1057. .btn {
  1058. display: inline-block;
  1059. width: 290rpx;
  1060. height: 90rpx;
  1061. line-height: 90rpx;
  1062. text-align: center;
  1063. &.closebtn {
  1064. border-radius: 0px 0px 0px 10px;
  1065. color: #999999;
  1066. background: #efefef;
  1067. }
  1068. &.cancel {
  1069. border-radius: 0px 0px 8px 0px;
  1070. background: $btn-confirm;
  1071. color: #fff;
  1072. }
  1073. }
  1074. }
  1075. }
  1076. }
  1077. </style>