order-list.vue 27 KB

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