order-list-retail.vue 37 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072
  1. <template>
  2. <view class="container" :style="{ paddingTop: navbarHeight + 82 + 'px' }">
  3. <tui-skeleton v-if="skeletonShow" loadingType="2"></tui-skeleton>
  4. <!-- 自定义返回 -->
  5. <header-order
  6. :systeminfo="systeminfo"
  7. :navbar-data="nvabarData"
  8. :headerBtnPosi="headerBtnPosi"
  9. :isDelete="isDelete"
  10. :isUsertype="1"
  11. @goSearchPath="handlSearchPath"
  12. >
  13. </header-order>
  14. <view class="order-section-top" :style="{ marginTop: navbarHeight + 'px' }">
  15. <scroll-view scroll-x scroll-with-animation class="tab-view" :scroll-left="scrollLeft">
  16. <view
  17. v-for="(item, index) in orderTabBar"
  18. :key="index"
  19. class="tab-bar-item"
  20. :class="[currentTab == index ? 'active' : '']"
  21. :data-current="index"
  22. @tap.stop="onClickTab"
  23. >
  24. <text class="tab-bar-title">{{ item.text }}</text> <text class="line"></text>
  25. </view>
  26. </scroll-view>
  27. <view class="tab-screen">
  28. <view
  29. v-for="(item, index) in screenTabBar"
  30. :key="index"
  31. class="tab-screen-item"
  32. :class="[screenTab == index ? 'active' : '']"
  33. :data-current="index"
  34. @tap.stop="onClickScreenTab(index)"
  35. >{{ item.text }}</view
  36. >
  37. </view>
  38. </view>
  39. <swiper
  40. class="tab-content"
  41. :current="currentTab"
  42. duration="80"
  43. @animationfinish="onChange"
  44. :style="{ height: winHeight + 'px' }"
  45. >
  46. <swiper-item v-for="(tabItem, index) in orderTabBar" :key="index">
  47. <scroll-view
  48. scroll-y
  49. class="scoll-y"
  50. @scrolltolower="scrolltolower"
  51. :style="{ height: winHeight + 'px' }"
  52. >
  53. <view :class="{ 'tui-order-list': scrollTop >= 0 }" class="clearfix">
  54. <!-- 空白页 -->
  55. <empty
  56. v-if="tabItem.loaded === true && tabItem.orderList.length === 0"
  57. :typeIndex="currentTab"
  58. :navbarHeight="navbarHeight"
  59. ></empty>
  60. <!-- 列表 -->
  61. <view v-else class="tui-order-content">
  62. <view
  63. class="tui-order-item"
  64. v-for="(order, orderIndex) in tabItem.orderList"
  65. :key="orderIndex"
  66. >
  67. <view class="order-title">
  68. <view class="order-title-t">
  69. <text class="bage-text"
  70. ><text class="text">订单编号:</text>{{ order.orderNo }}</text
  71. >
  72. </view>
  73. <view class="order-title-b">
  74. <view class="order-title-btxt"
  75. ><text class="text">下单时间:</text>{{ order.orderTime }}</view
  76. >
  77. <view class="order-title-tip">{{ StateExpFormat(order.status) }}</view>
  78. </view>
  79. </view>
  80. <block v-for="(shop, sindex) in order.shopOrderList" :key="sindex">
  81. <view class="goods-title">
  82. <view class="title-logo"><image :src="shop.shopLogo" mode=""></image></view>
  83. <view class="title-text">{{ shop.shopName }}</view>
  84. </view>
  85. <view
  86. class="goods-item"
  87. v-for="(pros, prosIndex) in shop.orderProductList"
  88. :key="prosIndex"
  89. @click.stop="detail(order.orderId)"
  90. >
  91. <view class="goods-pros-t">
  92. <view class="pros-img"> <image :src="pros.productImage" alt="" /> </view>
  93. <view class="pros-product clearfix">
  94. <view class="producttitle">{{ pros.name }}</view>
  95. <view class="productspec" v-if="pros.productCategory != 2"
  96. >规格:{{ pros.productUnit }}</view
  97. >
  98. <view class="floor-item-act" v-if="pros.ladderPriceFlag === '1'">
  99. <text class="tag tag-01" v-if="!pros.heUserId">自营</text>
  100. <text class="tag tag-01" v-else>促销</text>
  101. <text class="tag tag-02" @click.stop="clickPopupShow(pros, 2)"
  102. >活动价</text
  103. >
  104. </view>
  105. <view class="productprice">
  106. <view class="price"
  107. ><text>¥{{ pros.price | NumFormat }}</text></view
  108. >
  109. <view class="count"
  110. ><text class="small">x</text>{{ pros.num }}</view
  111. >
  112. </view>
  113. </view>
  114. </view>
  115. </view>
  116. </block>
  117. <view class="order-footer">
  118. <view class="order-footer-bot">
  119. <view class="count">共{{ order.productCount }}件商品</view>
  120. <view
  121. class="money"
  122. v-if="order.status == 31 || order.status == 32 || order.status == 33"
  123. >
  124. 已支付:<text class="color">¥{{ order.receiptAmount | NumFormat }}</text>
  125. </view>
  126. <view class="money" v-else>
  127. 待付总额:<text class="color"
  128. >¥{{ order.pendingPayments | NumFormat }}</text
  129. >
  130. </view>
  131. </view>
  132. </view>
  133. <!-- 底部button -->
  134. <order-button
  135. v-if="order.userId == userId"
  136. ref="orderButton"
  137. :status="order.status"
  138. :order="order"
  139. @buttonConfirm="handButtonConfirm"
  140. >
  141. </order-button>
  142. </view>
  143. <!--加载loadding-->
  144. <tui-loadmore :visible="loadding" :index="3" type="black"></tui-loadmore>
  145. <tui-nomore
  146. :visible="!pullUpOn"
  147. :backgroundColor="'#ffffff'"
  148. :text="nomoreText"
  149. ></tui-nomore>
  150. <!--加载loadding-->
  151. </view>
  152. </view>
  153. </scroll-view>
  154. </swiper-item>
  155. </swiper>
  156. <!-- 操作弹窗 -->
  157. <tui-modal
  158. :show="modal"
  159. @click="handleClick"
  160. @cancel="hideMobel(1)"
  161. :content="contentModalText"
  162. color="#333"
  163. :size="32"
  164. shape="circle"
  165. :maskClosable="false"
  166. ></tui-modal>
  167. <!-- 再次购买订单商品全部下架弹窗 -->
  168. <tui-modal
  169. :show="modal2"
  170. @click="handleClick2"
  171. @cancel="hideMobel(2)"
  172. shape="circle"
  173. content="订单内商品已全部下架,不能购买!"
  174. :button="button"
  175. ></tui-modal>
  176. <!-- 再次购买部分商品失效弹窗 -->
  177. <tui-modal :show="modal3" @cancel="hideMobel(3)" :custom="true">
  178. <view class="tui-modal-custom">
  179. <view class="tui-modal-custom-text">
  180. <view class="title">以下商品已失效,不能进行购买;是否先将其他商品加入购物车?</view>
  181. <scroll-view scroll-y class="tui-modal-custom-list">
  182. <view class="custom-list" v-for="(invalid, index) in invalidList" :key="index">
  183. <view class="custom-list-image"><image :src="invalid.productImage" mode=""></image></view>
  184. <view class="custom-list-name">{{ invalid.name }}</view>
  185. </view>
  186. </scroll-view>
  187. </view>
  188. <view class="tui-modal-button">
  189. <button class="modal-button cancel" @click="hideMobel(3)">我再想想</button>
  190. <button class="modal-button confirm" @click="handleClick3">加入购物车</button>
  191. </view>
  192. </view>
  193. </tui-modal>
  194. <!-- 透明模态层 -->
  195. <modal-layer v-if="isModalLayer"></modal-layer>
  196. <cm-loading :visible="isSubLoading" :text="loadingText"></cm-loading>
  197. </view>
  198. </template>
  199. <script>
  200. import authorize from '@/common/authorize.js'
  201. import HeaderOrder from '@/components/cm-module/headerNavbar/header-order' //自定义导航
  202. import orderButton from '@/components/cm-module/orderDetails/orderListButton' //按钮
  203. import modalLayer from '@/components/cm-module/modal-layer/modal-layer'
  204. import empty from '@/components/cm-module/empty/empty'
  205. import CmLoading from '@/components/cm-module/cm-loading/cm-loading.vue'
  206. import { mapGetters } from 'vuex'
  207. import wechatPay from '@/mixins/wechatPay.js'
  208. export default {
  209. components: {
  210. HeaderOrder,
  211. empty,
  212. orderButton,
  213. modalLayer,
  214. CmLoading
  215. },
  216. mixins: [wechatPay],
  217. data() {
  218. return {
  219. CustomBar: this.CustomBar, // 顶部导航栏高度
  220. orderTabBar: [
  221. { state: 0, text: '全部', orderList: [] },
  222. { state: 1, text: '待付款', orderList: [] },
  223. { state: 2, text: '待发货', orderList: [] },
  224. { state: 3, text: '已发货', orderList: [] },
  225. { state: 4, text: '退货/款', orderList: [] }
  226. ],
  227. screenTabBar: [{ type: 0, text: '全部订单' }, { type: 1, text: '用户订单' }, { type: 2, text: '自身订单' }],
  228. headerBtnPosi: this.setHeaderBtnPosi(), //获取设备顶部胶囊高度
  229. systeminfo: this.setSysteminfo(), //获取设备信息
  230. nvabarData: {
  231. //顶部自定义导航
  232. showCapsule: 1, // 是否显示左上角图标 1表示显示 0表示不显示,
  233. showSearch: 1,
  234. title: '我的订单' // 导航栏 中间的标题
  235. },
  236. winHeight: '', //窗口高度
  237. currentTab: 0, //预设当前项的值
  238. screenTab: 0, //筛选预设当前项的值
  239. scrollLeft: 0, //tab标题的滚动条位置
  240. btnoRderID: 0, //点击按钮传入的的订单ID
  241. pageNum: 1, //页数
  242. pageSize: 10, //条数
  243. scrollTop: 0,
  244. skeletonShow: true,
  245. isDelete: false,
  246. isClickChange: false,
  247. isModalLayer: false,
  248. loadding: false,
  249. pullUpOn: true,
  250. hasNextPage: false,
  251. pullFlag: true,
  252. navbarHeight: '',
  253. nomoreText: '上拉显示更多',
  254. isOnloadFlag: false,
  255. modal: false,
  256. modal2: false,
  257. modal3: false,
  258. OperationType: '',
  259. contentModalText: '',
  260. button: [
  261. {
  262. text: '确定',
  263. type: 'danger'
  264. }
  265. ],
  266. invalidList: [],
  267. hanldOrder: {}
  268. }
  269. },
  270. computed: {
  271. ...mapGetters(['userId'])
  272. },
  273. filters: {
  274. NumFormat(value) {
  275. //处理金额
  276. return Number(value).toFixed(2)
  277. }
  278. },
  279. onPageScroll(e) {
  280. this.scrollTop = e.scrollTop
  281. },
  282. onLoad(e) {
  283. let self = this
  284. if (e.type === 'detele') {
  285. self.isDelete = true
  286. }
  287. self.currentTab = e.state
  288. self.isOnloadFlag = true
  289. self.getHeaderTopHeight() //设置自定义导航高度
  290. // 高度自适应
  291. uni.getSystemInfo({
  292. success: function(res) {
  293. let calc = res.windowHeight
  294. self.winHeight = calc - self.CustomBar
  295. }
  296. })
  297. },
  298. onShow() {
  299. this.isModalLayer = false
  300. this.GetOrderDatainit(this.currentTab)
  301. // console.log(this.orderTabBar)
  302. },
  303. methods: {
  304. // 滚动切换标签样式
  305. onChange: function(e) {
  306. let index = e.target.current || e.detail.current
  307. if (this.isClickChange) {
  308. this.currentTab = index
  309. this.isClickChange = false
  310. return
  311. }
  312. this.isClickChange = false
  313. this.currentTab = index
  314. this.checkCor()
  315. this.pageNum = 1
  316. this.pullUpOn = true //切换时隐藏
  317. this.loadding = false //切换时隐藏
  318. this.nomoreText = ''
  319. if (!this.isOnloadFlag) {
  320. this.GetOrderDatainit(this.currentTab, 'tabChange')
  321. }
  322. },
  323. // 点击标题切换当前页时改变样式
  324. onClickTab: function(e) {
  325. let tabIndex = e.target.dataset.current || e.currentTarget.dataset.current
  326. if (this.currentTab === tabIndex) {
  327. return false
  328. } else {
  329. this.isClickChange = true
  330. this.currentTab = tabIndex
  331. this.pageNum = 1
  332. this.pullUpOn = true //切换时隐藏
  333. this.loadding = false //切换时隐藏
  334. this.GetOrderDatainit(this.currentTab)
  335. }
  336. },
  337. onClickScreenTab(index) {
  338. this.screenTab = index
  339. this.pageNum = 1
  340. this.pullUpOn = true //切换时隐藏
  341. this.loadding = false //切换时隐藏
  342. this.nomoreText = ''
  343. this.GetOrderDatainit(this.currentTab)
  344. },
  345. //判断当前滚动超过一屏时,设置tab标题滚动条。
  346. checkCor: function() {
  347. if (this.currentTab > 3) {
  348. //这里距离按实际计算
  349. this.scrollLeft = 300
  350. } else {
  351. this.scrollLeft = 0
  352. }
  353. },
  354. GetOrderDatainit(index, source) {
  355. /**
  356. * @订单初始化加载 仅加载第一页码
  357. * @param:orderState(订单状态:0全部,1待付款,2待发货,3已发货,4退货款)
  358. * @param:userId(用户ID)
  359. * @param:pageNum(页码数)
  360. * @param:pageSize(每页条数)
  361. * @param:organizeID(全局变量组织ID)
  362. */
  363. let orderItem = this.orderTabBar[index]
  364. let state = orderItem.state
  365. if (source === 'tabChange' && orderItem.loaded === true) {
  366. //tab切换只有第一次需要加载数据
  367. return
  368. }
  369. this.OrderService.QueryOrderDealerList({
  370. orderState: index,
  371. orderType: this.screenTab,
  372. userId: this.userId,
  373. pageNum: 1,
  374. pageSize: this.pageSize
  375. })
  376. .then(response => {
  377. let data = response.data
  378. //loaded新字段用于表示数据加载完毕,如果为空可以显示空白页
  379. let orderList = data.list.filter(item => {
  380. //添加不同状态下订单的表现形式
  381. item = Object.assign(item, this.StateExpFormat(item.state))
  382. return item
  383. })
  384. orderItem.orderList = []
  385. orderList.forEach(item => {
  386. orderItem.orderList.push(item)
  387. })
  388. this.$set(orderItem, 'loaded', true)
  389. this.hasNextPage = data.hasNextPage
  390. if (this.hasNextPage) {
  391. this.pullUpOn = false
  392. this.nomoreText = '上拉显示更多'
  393. } else {
  394. if (orderItem.orderList.length < 2) {
  395. this.pullUpOn = true
  396. } else {
  397. this.pullUpOn = false
  398. this.nomoreText = '已至底部'
  399. }
  400. }
  401. this.skeletonShow = false
  402. this.isOnloadFlag = false
  403. })
  404. .catch(error => {
  405. this.$util.msg(error.msg, 2000)
  406. })
  407. },
  408. getOnReachBottomData(index) {
  409. //上拉加载
  410. this.pageNum += 1
  411. this.OrderService.QueryOrderDealerList({
  412. orderState: index,
  413. orderType: this.screenTab,
  414. userId: this.userId,
  415. pageNum: this.pageNum,
  416. pageSize: this.pageSize
  417. })
  418. .then(response => {
  419. let orderItem = this.orderTabBar[index]
  420. let data = response.data
  421. this.hasNextPage = data.hasNextPage
  422. orderItem.orderList = orderItem.orderList.concat(data.list)
  423. this.pullFlag = false // 防上拉暴滑
  424. setTimeout(() => {
  425. this.pullFlag = true
  426. }, 500)
  427. if (this.hasNextPage) {
  428. this.pullUpOn = false
  429. this.nomoreText = '上拉显示更多'
  430. } else {
  431. this.loadding = false
  432. this.pullUpOn = false
  433. this.nomoreText = '已至底部'
  434. }
  435. })
  436. .catch(error => {
  437. this.$util.msg(error.msg, 2000)
  438. })
  439. },
  440. scrolltolower() {
  441. if (this.hasNextPage) {
  442. this.loadding = true
  443. this.pullUpOn = true
  444. this.getOnReachBottomData(this.currentTab)
  445. }
  446. },
  447. detail(id) {
  448. //订单详情跳转
  449. this.isModalLayer = true
  450. this.$api.navigateTo(`/pages/user/order/order-details?state=${this.currentTab}&orderId=${id}`)
  451. },
  452. handButtonConfirm(data) {
  453. //获取点击
  454. this.hanldOrder = data
  455. this.btnoRderID = data.orderId
  456. this.OperationType = data.type
  457. this.orderInfo = data.order
  458. this.handShowAlert(data)
  459. },
  460. handShowAlert(data) {
  461. //执行
  462. switch (data.type) {
  463. case 'cancel':
  464. this.modal = true
  465. this.contentModalText = '确认取消该订单吗?'
  466. break
  467. case 'delete':
  468. this.modal = true
  469. this.contentModalText = '确认删除该订单吗?'
  470. break
  471. case 'confirm':
  472. this.modal = true
  473. this.contentModalText = '是否确认收货?'
  474. break
  475. case 'query':
  476. this.isModalLayer = true
  477. this.$api.navigateTo('/pages/user/order/order-logistics?orderId=' + data.orderId)
  478. break
  479. case 'again':
  480. this.handBuyAgainInfo()
  481. break
  482. case 'pay':
  483. this.miniWxPayFor(data.order)
  484. break
  485. }
  486. },
  487. handleClick(e) {
  488. //用户操作订单
  489. let index = e.index
  490. if (index == 1) {
  491. switch (this.OperationType) {
  492. case 'delete':
  493. this.handOrderDetele(this.btnoRderID)
  494. break
  495. case 'cancel':
  496. this.handCenceConfirm(this.btnoRderID)
  497. break
  498. case 'confirm':
  499. this.handOrderConfirm(this.btnoRderID)
  500. break
  501. }
  502. }
  503. this.modal = false
  504. },
  505. handleClick2() {
  506. this.modal2 = false
  507. },
  508. handleClick3() {
  509. this.handShoppingAgainCart()
  510. this.modal3 = false
  511. },
  512. hideMobel(index) {
  513. switch (index) {
  514. case 1:
  515. this.modal = false
  516. break
  517. case 2:
  518. this.modal2 = false
  519. break
  520. case 3:
  521. this.modal3 = false
  522. break
  523. }
  524. },
  525. handBuyAgainInfo() {
  526. //再次购买初始化查询订单商品信息
  527. this.OrderService.GetOrderBuyAgain({
  528. orderId: this.btnoRderID
  529. })
  530. .then(response => {
  531. this.handShoppingAgainCart()
  532. })
  533. .catch(error => {
  534. if (error.data && error.data.length > 0) {
  535. this.modal3 = true
  536. this.invalidList = error.data
  537. } else {
  538. this.modal2 = true
  539. }
  540. })
  541. },
  542. handShoppingAgainCart() {
  543. //一键加入购物车
  544. this.ProductService.ShoppingAgainCart({
  545. orderId: this.btnoRderID
  546. })
  547. .then(response => {
  548. this.ProductService.QueryShoppingQuantity({ userId: this.userId })
  549. .then(response => {
  550. this.$api.switchTabTo('/pages/tabBar/cart/index')
  551. })
  552. .catch(error => {
  553. console.log('查询购物车数量错误信息', error)
  554. })
  555. })
  556. .catch(error => {
  557. this.$util.msg(error.msg, 2000)
  558. })
  559. },
  560. handOrderConfirm(id) {
  561. //确认收货
  562. this.OrderService.ConfirmReceipt({ orderId: id })
  563. .then(response => {
  564. this.$util.msg(response.msg, 2000, true, 'success')
  565. setTimeout(() => {
  566. this.GetOrderDatainit(this.currentTab)
  567. }, 2000)
  568. })
  569. .catch(error => {
  570. this.$util.msg(error.msg, 2000)
  571. })
  572. },
  573. handOrderDetele(id) {
  574. //删除订单
  575. this.OrderService.DeleteOrder({ orderId: id })
  576. .then(response => {
  577. this.$util.msg(response.msg, 2000, true, 'success')
  578. setTimeout(() => {
  579. this.GetOrderDatainit(this.currentTab)
  580. }, 2000)
  581. })
  582. .catch(error => {
  583. this.$util.msg(error.msg, 2000)
  584. })
  585. },
  586. handCenceConfirm(id) {
  587. //取消订单
  588. this.OrderService.CancelOrder({ orderId: id })
  589. .then(response => {
  590. this.$util.msg(response.msg, 2000, true, 'success')
  591. setTimeout(() => {
  592. this.GetOrderDatainit(this.currentTab)
  593. }, 2000)
  594. })
  595. .catch(error => {
  596. this.$util.msg(error.msg, 2000)
  597. })
  598. },
  599. handlSearchPath() {
  600. this.$api.navigateTo('/pages/user/order/search-order')
  601. },
  602. getHeaderTopHeight() {
  603. // 状态栏高度
  604. let statusBarHeight = this.systeminfo.statusBarHeight
  605. let headerPosi = this.headerBtnPosi
  606. let btnPosi = {
  607. // 胶囊实际位置,坐标信息不是左上角原点
  608. height: headerPosi.height,
  609. width: headerPosi.width,
  610. // 胶囊top - 状态栏高度
  611. top: headerPosi.top - statusBarHeight,
  612. // 胶囊bottom - 胶囊height - 状态栏height (现胶囊bottom 为距离导航栏底部的长度)
  613. bottom: headerPosi.bottom - headerPosi.height - statusBarHeight,
  614. // 屏幕宽度 - 胶囊right
  615. right: this.systeminfo.screenWidth - headerPosi.right
  616. }
  617. this.navbarHeight = headerPosi.bottom + btnPosi.bottom // 原胶囊bottom + 现胶囊bottom
  618. },
  619. setHeaderBtnPosi() {
  620. // 获得胶囊按钮位置信息
  621. let headerBtnPosi = uni.getMenuButtonBoundingClientRect()
  622. return headerBtnPosi
  623. },
  624. setSysteminfo() {
  625. let systeminfo
  626. uni.getSystemInfo({
  627. // 获取设备信息
  628. success: res => {
  629. systeminfo = res
  630. }
  631. })
  632. return systeminfo
  633. },
  634. StateExpFormat(state) {
  635. //订单状态文字和颜色
  636. var HtmlStateText = '',
  637. stateTextObject = {
  638. 4: '交易完成',
  639. 5: '订单完成',
  640. 6: '已关闭',
  641. 7: '交易全退',
  642. 77: '交易全退',
  643. 11: '待付款待发货',
  644. 12: '待付款部分发货',
  645. 13: '待付款已发货',
  646. 21: '部分付款待发货',
  647. 22: '部分付款部分发货',
  648. 23: '部分付款已发货',
  649. 31: '已付款待发货',
  650. 32: '已付款部分发货',
  651. 33: '已付款已发货',
  652. 111: '待付款待发货'
  653. }
  654. Object.keys(stateTextObject).forEach(function(key) {
  655. if (key == state) {
  656. HtmlStateText = stateTextObject[key]
  657. }
  658. })
  659. return HtmlStateText
  660. }
  661. }
  662. }
  663. </script>
  664. <style lang="scss">
  665. page {
  666. background-color: #ffffff;
  667. }
  668. /*tabbar start*/
  669. ::-webkit-scrollbar {
  670. width: 0;
  671. height: 0;
  672. color: transparent;
  673. }
  674. .order-section-top {
  675. width: 100%;
  676. position: fixed;
  677. top: 0;
  678. left: 0;
  679. z-index: 99;
  680. background: #ffffff;
  681. .tab-screen {
  682. height: 48rpx;
  683. width: 702rpx;
  684. padding: 20rpx 24rpx 30rpx 24rpx;
  685. .tab-screen-item {
  686. height: 48rpx;
  687. border-radius: 24rpx;
  688. background: #f7f7f7;
  689. margin-right: 48rpx;
  690. line-height: 48rpx;
  691. font-size: $font-size-26;
  692. color: #333333;
  693. text-align: center;
  694. padding: 0 24rpx;
  695. float: left;
  696. &.active {
  697. color: $color-system;
  698. background-color: #fff3f7;
  699. }
  700. &:last-child {
  701. margin-right: 0;
  702. }
  703. }
  704. }
  705. }
  706. .tab-view::before {
  707. content: '';
  708. position: absolute;
  709. border-bottom: 1rpx solid #eaeef1;
  710. -webkit-transform: scaleY(0.5);
  711. transform: scaleY(0.5);
  712. bottom: 0;
  713. right: 0;
  714. left: 0;
  715. }
  716. .tab-view {
  717. width: 100%;
  718. height: 80rpx;
  719. overflow: hidden;
  720. box-sizing: border-box;
  721. background: #fff;
  722. white-space: nowrap;
  723. }
  724. .tab-bar-item {
  725. padding: 0;
  726. height: 80rpx;
  727. min-width: 80rpx;
  728. line-height: 80rpx;
  729. margin: 0 28rpx;
  730. display: inline-block;
  731. text-align: center;
  732. box-sizing: border-box;
  733. position: relative;
  734. .tab-bar-title {
  735. height: 80rpx;
  736. line-height: 80rpx;
  737. font-size: $font-size-28;
  738. color: $text-color;
  739. }
  740. .line {
  741. width: 40rpx;
  742. height: 4rpx;
  743. border-radius: 2rpx;
  744. position: absolute;
  745. bottom: 8rpx;
  746. left: 50%;
  747. margin-left: -20rpx;
  748. background-color: #ffffff;
  749. }
  750. &.active {
  751. .line {
  752. background-color: $color-system;
  753. }
  754. .tab-bar-title {
  755. color: $color-system !important;
  756. }
  757. }
  758. }
  759. .container {
  760. padding-bottom: env(safe-area-inset-bottom);
  761. height: auto;
  762. position: relative;
  763. }
  764. .tui-order-content {
  765. width: 100%;
  766. height: auto;
  767. }
  768. .tui-order-list {
  769. width: 100%;
  770. position: relative;
  771. }
  772. .tui-order-item {
  773. display: flex;
  774. flex-direction: column;
  775. width: 702rpx;
  776. padding: 20rpx 24rpx 0 24rpx;
  777. background: #fff;
  778. border-bottom: 20rpx solid #f7f7f7;
  779. }
  780. .order-title {
  781. width: 100%;
  782. height: auto;
  783. padding-bottom: 20rpx;
  784. border-bottom: 1px solid #e1e1e1;
  785. .order-title-t {
  786. width: 100%;
  787. height: 48rpx;
  788. float: left;
  789. line-height: 48rpx;
  790. position: relative;
  791. .bage-icon {
  792. width: 50rpx;
  793. height: 50rpx;
  794. display: block;
  795. position: absolute;
  796. right: 0;
  797. top: 9rpx;
  798. }
  799. .bage-text {
  800. display: inline-block;
  801. font-size: $font-size-28;
  802. line-height: 48rpx;
  803. text-align: left;
  804. color: $text-color;
  805. .text {
  806. color: #999999;
  807. }
  808. }
  809. }
  810. .order-title-b {
  811. width: 100%;
  812. height: 48rpx;
  813. float: left;
  814. margin-top: 8rpx;
  815. .order-title-btxt {
  816. float: left;
  817. font-size: $font-size-28;
  818. line-height: 48rpx;
  819. color: $text-color;
  820. text-align: left;
  821. .text {
  822. color: #999999;
  823. }
  824. }
  825. .order-title-tip {
  826. float: right;
  827. font-size: $font-size-28;
  828. line-height: 48rpx;
  829. text-align: right;
  830. color: #ff457b;
  831. }
  832. }
  833. }
  834. .goods-title {
  835. width: 100%;
  836. height: 56rpx;
  837. float: left;
  838. margin-top: 10rpx;
  839. .title-logo {
  840. width: 56rpx;
  841. height: 56rpx;
  842. float: left;
  843. border-radius: 8rpx;
  844. border: 1px solid #e1e1e1;
  845. margin-right: 8rpx;
  846. image {
  847. border-radius: 8rpx;
  848. width: 56rpx;
  849. height: 56rpx;
  850. }
  851. }
  852. .title-text {
  853. width: 400rpx;
  854. overflow: hidden;
  855. text-overflow: ellipsis;
  856. white-space: nowrap;
  857. float: left;
  858. font-size: $font-size-28;
  859. color: $text-color;
  860. text-align: left;
  861. line-height: 56rpx;
  862. font-weight: bold;
  863. }
  864. }
  865. .goods-item {
  866. width: 100%;
  867. height: auto;
  868. }
  869. .goods-pros-t {
  870. width: 100%;
  871. height: auto;
  872. padding: 24rpx 0;
  873. .pros-img {
  874. float: left;
  875. width: 210rpx;
  876. height: 100%;
  877. border-radius: 10rpx;
  878. margin: 0 26rpx 0 0;
  879. position: relative;
  880. image {
  881. width: 210rpx;
  882. height: 210rpx;
  883. border-radius: 10rpx;
  884. border: 1px solid #f3f3f3;
  885. }
  886. }
  887. }
  888. .pros-product {
  889. width: 460rpx;
  890. height: 100%;
  891. line-height: 36rpx;
  892. font-size: $font-size-26;
  893. position: relative;
  894. float: left;
  895. .producttitle {
  896. width: 100%;
  897. display: inline-block;
  898. height: auto;
  899. text-overflow: ellipsis;
  900. display: -webkit-box;
  901. word-break: break-all;
  902. -webkit-box-orient: vertical;
  903. -webkit-line-clamp: 2;
  904. overflow: hidden;
  905. margin-bottom: 8rpx;
  906. }
  907. .productspec {
  908. height: 36rpx;
  909. color: #999999;
  910. margin: 10rpx 0 0 0;
  911. }
  912. .productprice {
  913. height: 48rpx;
  914. width: 100%;
  915. float: left;
  916. margin-top: 10rpx;
  917. .price {
  918. line-height: 48rpx;
  919. font-size: $font-size-28;
  920. width: 48%;
  921. color: $color-system;
  922. float: left;
  923. font-weight: bold;
  924. &.disabled {
  925. color: #999999;
  926. text-decoration: line-through;
  927. }
  928. }
  929. .count {
  930. height: 100%;
  931. float: right;
  932. position: relative;
  933. .small {
  934. color: #666666;
  935. }
  936. }
  937. }
  938. .floor-item-act {
  939. width: 100%;
  940. height: 30rpx;
  941. margin-top: 8rpx;
  942. float: left;
  943. .tag {
  944. display: inline-block;
  945. height: 32rpx;
  946. font-size: 22rpx;
  947. line-height: 30rpx;
  948. text-align: center;
  949. color: #f83c6c;
  950. float: left;
  951. margin-right: 10rpx;
  952. &.tag-02 {
  953. width: 80rpx;
  954. background: url(https://static.caimei365.com/app/mini-hehe/icon/icon-active.png) top center no-repeat;
  955. background-size: contain;
  956. }
  957. &.tag-01 {
  958. width: 56rpx;
  959. color: #fff;
  960. background-color: #f83c6c;
  961. border-radius: 4rpx;
  962. }
  963. }
  964. }
  965. }
  966. .order-footer {
  967. width: 100%;
  968. height: 78rpx;
  969. float: left;
  970. margin-top: 20rpx;
  971. .order-footer-bot {
  972. width: 100%;
  973. float: left;
  974. height: 48rpx;
  975. line-height: 48rpx;
  976. font-size: $font-size-28;
  977. color: $text-color;
  978. .count {
  979. width: 50%;
  980. float: left;
  981. text-align: left;
  982. font-weight: bold;
  983. }
  984. .money {
  985. width: 50%;
  986. float: right;
  987. text-align: right;
  988. .color {
  989. color: $color-system;
  990. font-weight: bold;
  991. }
  992. }
  993. }
  994. }
  995. .tui-modal-custom-text {
  996. min-height: 300rpx;
  997. margin-bottom: 30rpx;
  998. .title {
  999. width: 100%;
  1000. height: auto;
  1001. font-size: $font-size-30;
  1002. text-align: justify;
  1003. color: #333333;
  1004. line-height: 40rpx;
  1005. margin-bottom: 30rpx;
  1006. }
  1007. .tui-modal-custom-list {
  1008. width: 100%;
  1009. height: 350rpx;
  1010. overflow: hidden;
  1011. .custom-list {
  1012. width: 100%;
  1013. height: 117rpx;
  1014. box-sizing: border-box;
  1015. float: left;
  1016. padding: 15rpx 0;
  1017. .custom-list-image {
  1018. width: 86rpx;
  1019. height: 86rpx;
  1020. float: left;
  1021. border-radius: 6rpx;
  1022. box-sizing: border-box;
  1023. border: 1px solid #e1e1e1;
  1024. image {
  1025. width: 84rpx;
  1026. height: 84rpx;
  1027. border-radius: 6rpx;
  1028. display: block;
  1029. }
  1030. }
  1031. .custom-list-name {
  1032. width: 400rpx;
  1033. height: 86rpx;
  1034. float: right;
  1035. line-height: 43rpx;
  1036. font-size: $font-size-26;
  1037. color: #666666;
  1038. text-overflow: ellipsis;
  1039. overflow: hidden;
  1040. display: -webkit-box;
  1041. -webkit-line-clamp: 2;
  1042. line-clamp: 2;
  1043. -webkit-box-orient: vertical;
  1044. }
  1045. }
  1046. }
  1047. }
  1048. .tui-modal-button {
  1049. width: 100%;
  1050. height: 72rpx;
  1051. display: flex;
  1052. .modal-button {
  1053. width: 200rpx;
  1054. height: 72rpx;
  1055. line-height: 72rpx;
  1056. border-radius: 36rpx;
  1057. box-sizing: border-box;
  1058. &.cancel {
  1059. border: 1px solid #b2b2b2;
  1060. background: #ffffff;
  1061. color: #333333;
  1062. }
  1063. &.confirm {
  1064. background: $btn-confirm;
  1065. color: #ffffff;
  1066. }
  1067. }
  1068. }
  1069. </style>