order-list.vue 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089
  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($event)"
  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,item.type)"
  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. <text
  98. class="bage buss tui-skeleton-fillet"
  99. v-if="order.orderSubmitType == 3 || order.orderSubmitType == 4"
  100. >
  101. 服务商
  102. </text>
  103. <text
  104. class="bage auto tui-skeleton-fillet"
  105. v-if="
  106. order.orderSubmitType == 0 ||
  107. order.orderSubmitType == 1 ||
  108. order.orderSubmitType == 2
  109. "
  110. >
  111. 自主
  112. </text>
  113. <view class="bage ebate" v-if="order.rebateFlag == 1">返佣</view>
  114. <view class="order-title-tip tui-skeleton-fillet">
  115. {{ order.status | statusFilters }}
  116. </view>
  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: 2, text: '服务商订单' },
  346. { type: 1, text: '机构自主订单' }
  347. ],
  348. headerBtnPosi: this.setHeaderBtnPosi(), //获取设备顶部胶囊高度
  349. systeminfo: this.setSysteminfo(), //获取设备信息
  350. nvabarData: {
  351. //顶部自定义导航
  352. showCapsule: 1, // 是否显示左上角图标 1表示显示 0表示不显示,
  353. showSearch: 1,
  354. title: ' ' // 导航栏中间的标题
  355. },
  356. CustomBar: this.CustomBar, // 顶部导航栏高度
  357. winHeight: '', //窗口高度
  358. currentTab: 0, //预设当前项的值
  359. screenTab: 0, //筛选预设当前项的值
  360. scrollLeft: 0, //tab标题的滚动条位置
  361. orderData: [],
  362. listQuery: {
  363. pageNum: 1, //页数
  364. pageSize: 10, //条数
  365. groupServiceId: 0,
  366. serviceProviderId: 0, //服务商用户ID
  367. listType: 0,
  368. orderSubmitType: 2
  369. },
  370. scrollTop: 0,
  371. skeletonShow: true,
  372. isClickChange: false,
  373. isShareModal: false, //控制分享弹窗
  374. isShareType: 2,
  375. isModalLayer: false,
  376. loadding: false,
  377. pullUpOn: true,
  378. hasNextPage: false,
  379. pullFlag: true,
  380. navbarHeight: '',
  381. nomoreText: '上拉显示更多',
  382. showAgan: false,
  383. failList: [], // 再来一单可购买商品
  384. promptitle: '',
  385. userId: 0,
  386. manager: 0,
  387. rightDrawer: false ,//控制筛选抽屉
  388. }
  389. },
  390. onLoad(option) {
  391. if (option.type === 'detele') {
  392. this.isDelete = true
  393. }
  394. this.currentTab = option.listType
  395. this.getHeaderTopHeight() //设置自定义导航高度
  396. this.initGetStotage()
  397. },
  398. computed: {
  399. ...mapState(['isManage'])
  400. },
  401. methods: {
  402. async initGetStotage() {
  403. const userInfo = await this.$api.getStorage()
  404. this.userId = userInfo.userId ? userInfo.userId : 0
  405. this.manager = userInfo.manager ? userInfo.manager : 0
  406. this.listQuery.serviceProviderId = userInfo.serviceProviderId
  407. this.getOrderDatainit(this.currentTab)
  408. },
  409. // 滚动切换标签样式
  410. onChange(e) {
  411. let index = e.target.current || e.detail.current
  412. if (this.isClickChange) {
  413. this.currentTab = index
  414. this.isClickChange = false
  415. return
  416. }
  417. this.isClickChange = false
  418. this.currentTab = index
  419. this.listQuery.listType = index
  420. this.checkCor()
  421. this.pullUpOn = true //切换时隐藏
  422. this.loadding = false //切换时隐藏
  423. this.nomoreText = ''
  424. this.getOrderDatainit(this.currentTab, 'tabChange')
  425. },
  426. // 点击标题切换当前页时改变样式
  427. onClickTab(event) {
  428. console.log('e',event)
  429. let tabIndex = event.target.dataset.current || event.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,type) {
  442. this.screenTab = index
  443. this.listQuery.orderSubmitType = type
  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: #f7f7f7;
  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. box-sizing: border-box;
  736. padding: 0 20rpx;
  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: 100%;
  746. padding: 0rpx 24rpx 0 24rpx;
  747. background: #fff;
  748. box-sizing: border-box;
  749. border-radius: 16rpx;
  750. overflow: hidden;
  751. margin: 20rpx 0;
  752. }
  753. .order-title {
  754. width: 100%;
  755. height: auto;
  756. .order-title-name {
  757. width: 100%;
  758. height: 72rpx;
  759. border-bottom: 1px solid #f7f7f7;
  760. line-height: 72rpx;
  761. text-align: left;
  762. font-size: $font-size-28;
  763. color: #333333;
  764. .tags {
  765. display: inline-block;
  766. width: 60rpx;
  767. height: 32rpx;
  768. border-radius: 16rpx 0;
  769. background: #f0cb72;
  770. font-size: $font-size-22;
  771. color: #4e4539;
  772. text-align: center;
  773. line-height: 32rpx;
  774. margin-left: 10rpx;
  775. &.sv {
  776. background: #333333;
  777. color: #f0cb72;
  778. }
  779. }
  780. .name {
  781. float: right;
  782. font-size: 26rpx;
  783. color: #999999;
  784. }
  785. }
  786. .order-title-t {
  787. width: 100%;
  788. height: 68rpx;
  789. float: left;
  790. line-height: 68rpx;
  791. position: relative;
  792. display: flex;
  793. .bage-icon {
  794. width: 50rpx;
  795. height: 50rpx;
  796. display: block;
  797. position: absolute;
  798. right: 110rpx;
  799. top: 12rpx;
  800. }
  801. .bage{
  802. display: inline-block;
  803. width: 72rpx;
  804. height: 32rpx;
  805. margin: 19rpx 10rpx 0 0;
  806. border-radius: 4rpx;
  807. line-height: 32rpx;
  808. font-size: $font-size-22;
  809. text-align: center;
  810. color: #ffffff;
  811. float: left;
  812. &.buss{
  813. background: rgb(223, 240, 255);
  814. color: rgb(126, 172, 213);
  815. padding: 0 6rpx;
  816. }
  817. &.auto{
  818. background: #7fba4f;
  819. color: #ffffff;
  820. }
  821. &.ebate{
  822. background: #ff7a51;
  823. }
  824. }
  825. .order-title-tip {
  826. font-size: $font-size-24;
  827. line-height: 68rpx;
  828. text-align: right;
  829. color: #ff2a2a;
  830. }
  831. }
  832. .order-title-b {
  833. width: 100%;
  834. height: 40rpx;
  835. float: left;
  836. margin-top: 8rpx;
  837. .order-title-btxt {
  838. float: left;
  839. font-size: $font-size-28;
  840. line-height: 40rpx;
  841. color: #999999;
  842. text-align: left;
  843. &.num{
  844. color: #333333;
  845. }
  846. }
  847. }
  848. }
  849. .goods-title {
  850. width: 100%;
  851. height: 56rpx;
  852. float: left;
  853. margin-top: 10rpx;
  854. .floor-item-act {
  855. height: 56rpx;
  856. text-align: center;
  857. box-sizing: border-box;
  858. float: left;
  859. padding: 10rpx 0;
  860. margin-right: 12rpx;
  861. }
  862. .title-text {
  863. width: 400rpx;
  864. overflow: hidden;
  865. text-overflow: ellipsis;
  866. white-space: nowrap;
  867. float: left;
  868. font-size: $font-size-28;
  869. color: $text-color;
  870. text-align: left;
  871. line-height: 56rpx;
  872. font-weight: bold;
  873. }
  874. }
  875. .goods-item {
  876. width: 100%;
  877. height: auto;
  878. }
  879. .goods-pros-t {
  880. width: 100%;
  881. height: auto;
  882. padding: 24rpx 0;
  883. display: flex;
  884. .pros-img {
  885. float: left;
  886. width: 180rpx;
  887. height: 100%;
  888. border-radius: 10rpx;
  889. margin: 0 20rpx 0 0;
  890. position: relative;
  891. .tips {
  892. display: inline-block;
  893. width: 80rpx;
  894. height: 40rpx;
  895. background-image: linear-gradient(214deg, #ff4500 0%, #ff5800 53%, #ff4367 100%);
  896. line-height: 40rpx;
  897. text-align: center;
  898. font-size: $font-size-24;
  899. color: #ffffff;
  900. border-radius: 10rpx 0 10rpx 0;
  901. position: absolute;
  902. top: 0;
  903. left: 0;
  904. }
  905. image {
  906. width: 178rpx;
  907. height: 178rpx;
  908. border-radius: 10rpx;
  909. border: 1px solid #f3f3f3;
  910. }
  911. }
  912. }
  913. .pros-product {
  914. width: 460rpx;
  915. height: 100%;
  916. line-height: 36rpx;
  917. font-size: $font-size-26;
  918. position: relative;
  919. float: left;
  920. .producttitle {
  921. width: 100%;
  922. display: inline-block;
  923. height: auto;
  924. text-overflow: ellipsis;
  925. display: -webkit-box;
  926. word-break: break-all;
  927. -webkit-box-orient: vertical;
  928. -webkit-line-clamp: 2;
  929. overflow: hidden;
  930. margin-bottom: 8rpx;
  931. }
  932. .productspec {
  933. height: 36rpx;
  934. color: #999999;
  935. text-overflow: ellipsis;
  936. display: -webkit-box;
  937. word-break: break-all;
  938. -webkit-box-orient: vertical;
  939. -webkit-line-clamp: 1;
  940. overflow: hidden;
  941. }
  942. .productprice {
  943. height: 48rpx;
  944. width: 100%;
  945. float: left;
  946. .price {
  947. line-height: 48rpx;
  948. font-size: $font-size-28;
  949. width: 48%;
  950. color: #ff2a2a;
  951. float: left;
  952. font-weight: bold;
  953. &.none {
  954. text-decoration: line-through;
  955. color: #999999;
  956. }
  957. }
  958. .count {
  959. height: 100%;
  960. float: right;
  961. position: relative;
  962. .small {
  963. color: #666666;
  964. }
  965. }
  966. }
  967. .floor-item-act {
  968. width: 100%;
  969. height: 56rpx;
  970. text-align: center;
  971. box-sizing: border-box;
  972. float: left;
  973. padding: 0 0 10rpx 0;
  974. }
  975. }
  976. .order-footer {
  977. width: 100%;
  978. height: 78rpx;
  979. float: left;
  980. .order-footer-top {
  981. width: 100%;
  982. height: 34rpx;
  983. line-height: 34rpx;
  984. font-size: $font-size-24;
  985. color: #999999;
  986. text-align: right;
  987. }
  988. .order-footer-bot {
  989. width: 100%;
  990. float: left;
  991. height: 48rpx;
  992. line-height: 48rpx;
  993. font-size: $font-size-28;
  994. font-weight: bold;
  995. color: $text-color;
  996. .count {
  997. width: 50%;
  998. float: left;
  999. text-align: left;
  1000. }
  1001. .money {
  1002. width: 50%;
  1003. float: right;
  1004. text-align: right;
  1005. }
  1006. }
  1007. }
  1008. .aganBj {
  1009. position: fixed;
  1010. left: 0;
  1011. top: 0;
  1012. bottom: 0;
  1013. width: 100%;
  1014. height: 100%;
  1015. background-color: rgba(0, 0, 0, 0.5);
  1016. z-index: 999999;
  1017. .alertAgan {
  1018. position: absolute;
  1019. top: 50%;
  1020. left: 50%;
  1021. transform: translate(-50%, -50%);
  1022. width: 580rpx;
  1023. background-color: #fff;
  1024. border-radius: 16rpx;
  1025. .title {
  1026. font-size: 30rpx;
  1027. color: #333333;
  1028. line-height: 42rpx;
  1029. padding: 30rpx;
  1030. display: block;
  1031. }
  1032. .goods {
  1033. padding: 0 30rpx;
  1034. .list {
  1035. padding: 10px 0;
  1036. border-bottom: 1rpx solid #e1e1e1;
  1037. margin: 10rpx 0;
  1038. .image-left {
  1039. width: 86rpx;
  1040. height: 86rpx;
  1041. border: 2rpx solid #e1e1e1;
  1042. border-radius: 6rpx;
  1043. display: inline-block;
  1044. vertical-align: middle;
  1045. }
  1046. .name-right {
  1047. display: inline-block;
  1048. width: 416rpx;
  1049. margin-left: 15rpx;
  1050. font-size: 26rpx;
  1051. color: #666666;
  1052. vertical-align: middle;
  1053. word-break: break-all;
  1054. overflow: hidden;
  1055. text-overflow: ellipsis;
  1056. display: -webkit-inline-box;
  1057. -webkit-line-clamp: 2;
  1058. -webkit-box-orient: vertical;
  1059. }
  1060. }
  1061. }
  1062. .BtnAll {
  1063. margin-top: 30rpx;
  1064. .btn {
  1065. display: inline-block;
  1066. width: 290rpx;
  1067. height: 90rpx;
  1068. line-height: 90rpx;
  1069. text-align: center;
  1070. &.closebtn {
  1071. border-radius: 0px 0px 0px 10px;
  1072. color: #999999;
  1073. background: #efefef;
  1074. }
  1075. &.cancel {
  1076. border-radius: 0px 0px 8px 0px;
  1077. background: $btn-confirm;
  1078. color: #fff;
  1079. }
  1080. }
  1081. }
  1082. }
  1083. }
  1084. </style>