order-list.vue 29 KB

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