order-list-retail.vue 37 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066
  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 | formatPrice }}</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 | formatPrice }}</text>
  125. </view>
  126. <view class="money" v-else>
  127. 待付总额:<text class="color"
  128. >¥{{ order.pendingPayments | formatPrice }}</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. onPageScroll(e) {
  274. this.scrollTop = e.scrollTop
  275. },
  276. onLoad(e) {
  277. let self = this
  278. if (e.type === 'detele') {
  279. self.isDelete = true
  280. }
  281. self.currentTab = e.state
  282. self.isOnloadFlag = true
  283. self.getHeaderTopHeight() //设置自定义导航高度
  284. // 高度自适应
  285. uni.getSystemInfo({
  286. success: function(res) {
  287. let calc = res.windowHeight
  288. self.winHeight = calc - self.CustomBar
  289. }
  290. })
  291. },
  292. onShow() {
  293. this.isModalLayer = false
  294. this.GetOrderDatainit(this.currentTab)
  295. // console.log(this.orderTabBar)
  296. },
  297. methods: {
  298. // 滚动切换标签样式
  299. onChange: function(e) {
  300. let index = e.target.current || e.detail.current
  301. if (this.isClickChange) {
  302. this.currentTab = index
  303. this.isClickChange = false
  304. return
  305. }
  306. this.isClickChange = false
  307. this.currentTab = index
  308. this.checkCor()
  309. this.pageNum = 1
  310. this.pullUpOn = true //切换时隐藏
  311. this.loadding = false //切换时隐藏
  312. this.nomoreText = ''
  313. if (!this.isOnloadFlag) {
  314. this.GetOrderDatainit(this.currentTab, 'tabChange')
  315. }
  316. },
  317. // 点击标题切换当前页时改变样式
  318. onClickTab: function(e) {
  319. let tabIndex = e.target.dataset.current || e.currentTarget.dataset.current
  320. if (this.currentTab === tabIndex) {
  321. return false
  322. } else {
  323. this.isClickChange = true
  324. this.currentTab = tabIndex
  325. this.pageNum = 1
  326. this.pullUpOn = true //切换时隐藏
  327. this.loadding = false //切换时隐藏
  328. this.GetOrderDatainit(this.currentTab)
  329. }
  330. },
  331. onClickScreenTab(index) {
  332. this.screenTab = index
  333. this.pageNum = 1
  334. this.pullUpOn = true //切换时隐藏
  335. this.loadding = false //切换时隐藏
  336. this.nomoreText = ''
  337. this.GetOrderDatainit(this.currentTab)
  338. },
  339. //判断当前滚动超过一屏时,设置tab标题滚动条。
  340. checkCor: function() {
  341. if (this.currentTab > 3) {
  342. //这里距离按实际计算
  343. this.scrollLeft = 300
  344. } else {
  345. this.scrollLeft = 0
  346. }
  347. },
  348. GetOrderDatainit(index, source) {
  349. /**
  350. * @订单初始化加载 仅加载第一页码
  351. * @param:orderState(订单状态:0全部,1待付款,2待发货,3已发货,4退货款)
  352. * @param:userId(用户ID)
  353. * @param:pageNum(页码数)
  354. * @param:pageSize(每页条数)
  355. * @param:organizeID(全局变量组织ID)
  356. */
  357. let orderItem = this.orderTabBar[index]
  358. let state = orderItem.state
  359. if (source === 'tabChange' && orderItem.loaded === true) {
  360. //tab切换只有第一次需要加载数据
  361. return
  362. }
  363. this.OrderService.QueryOrderDealerList({
  364. orderState: index,
  365. orderType: this.screenTab,
  366. userId: this.userId,
  367. pageNum: 1,
  368. pageSize: this.pageSize
  369. })
  370. .then(response => {
  371. let data = response.data
  372. //loaded新字段用于表示数据加载完毕,如果为空可以显示空白页
  373. let orderList = data.list.filter(item => {
  374. //添加不同状态下订单的表现形式
  375. item = Object.assign(item, this.StateExpFormat(item.state))
  376. return item
  377. })
  378. orderItem.orderList = []
  379. orderList.forEach(item => {
  380. orderItem.orderList.push(item)
  381. })
  382. this.$set(orderItem, 'loaded', true)
  383. this.hasNextPage = data.hasNextPage
  384. if (this.hasNextPage) {
  385. this.pullUpOn = false
  386. this.nomoreText = '上拉显示更多'
  387. } else {
  388. if (orderItem.orderList.length < 2) {
  389. this.pullUpOn = true
  390. } else {
  391. this.pullUpOn = false
  392. this.nomoreText = '已至底部'
  393. }
  394. }
  395. this.skeletonShow = false
  396. this.isOnloadFlag = false
  397. })
  398. .catch(error => {
  399. this.$util.msg(error.msg, 2000)
  400. })
  401. },
  402. getOnReachBottomData(index) {
  403. //上拉加载
  404. this.pageNum += 1
  405. this.OrderService.QueryOrderDealerList({
  406. orderState: index,
  407. orderType: this.screenTab,
  408. userId: this.userId,
  409. pageNum: this.pageNum,
  410. pageSize: this.pageSize
  411. })
  412. .then(response => {
  413. let orderItem = this.orderTabBar[index]
  414. let data = response.data
  415. this.hasNextPage = data.hasNextPage
  416. orderItem.orderList = orderItem.orderList.concat(data.list)
  417. this.pullFlag = false // 防上拉暴滑
  418. setTimeout(() => {
  419. this.pullFlag = true
  420. }, 500)
  421. if (this.hasNextPage) {
  422. this.pullUpOn = false
  423. this.nomoreText = '上拉显示更多'
  424. } else {
  425. this.loadding = false
  426. this.pullUpOn = false
  427. this.nomoreText = '已至底部'
  428. }
  429. })
  430. .catch(error => {
  431. this.$util.msg(error.msg, 2000)
  432. })
  433. },
  434. scrolltolower() {
  435. if (this.hasNextPage) {
  436. this.loadding = true
  437. this.pullUpOn = true
  438. this.getOnReachBottomData(this.currentTab)
  439. }
  440. },
  441. detail(id) {
  442. //订单详情跳转
  443. this.isModalLayer = true
  444. this.$api.navigateTo(`/pages/user/order/order-details?state=${this.currentTab}&orderId=${id}`)
  445. },
  446. handButtonConfirm(data) {
  447. //获取点击
  448. this.hanldOrder = data
  449. this.btnoRderID = data.orderId
  450. this.OperationType = data.type
  451. this.orderInfo = data.order
  452. this.handShowAlert(data)
  453. },
  454. handShowAlert(data) {
  455. //执行
  456. switch (data.type) {
  457. case 'cancel':
  458. this.modal = true
  459. this.contentModalText = '确认取消该订单吗?'
  460. break
  461. case 'delete':
  462. this.modal = true
  463. this.contentModalText = '确认删除该订单吗?'
  464. break
  465. case 'confirm':
  466. this.modal = true
  467. this.contentModalText = '是否确认收货?'
  468. break
  469. case 'query':
  470. this.isModalLayer = true
  471. this.$api.navigateTo('/pages/user/order/order-logistics?orderId=' + data.orderId)
  472. break
  473. case 'again':
  474. this.handBuyAgainInfo()
  475. break
  476. case 'pay':
  477. this.miniWxPayFor(data.order)
  478. break
  479. }
  480. },
  481. handleClick(e) {
  482. //用户操作订单
  483. let index = e.index
  484. if (index == 1) {
  485. switch (this.OperationType) {
  486. case 'delete':
  487. this.handOrderDetele(this.btnoRderID)
  488. break
  489. case 'cancel':
  490. this.handCenceConfirm(this.btnoRderID)
  491. break
  492. case 'confirm':
  493. this.handOrderConfirm(this.btnoRderID)
  494. break
  495. }
  496. }
  497. this.modal = false
  498. },
  499. handleClick2() {
  500. this.modal2 = false
  501. },
  502. handleClick3() {
  503. this.handShoppingAgainCart()
  504. this.modal3 = false
  505. },
  506. hideMobel(index) {
  507. switch (index) {
  508. case 1:
  509. this.modal = false
  510. break
  511. case 2:
  512. this.modal2 = false
  513. break
  514. case 3:
  515. this.modal3 = false
  516. break
  517. }
  518. },
  519. handBuyAgainInfo() {
  520. //再次购买初始化查询订单商品信息
  521. this.OrderService.GetOrderBuyAgain({
  522. orderId: this.btnoRderID
  523. })
  524. .then(response => {
  525. this.handShoppingAgainCart()
  526. })
  527. .catch(error => {
  528. if (error.data && error.data.length > 0) {
  529. this.modal3 = true
  530. this.invalidList = error.data
  531. } else {
  532. this.modal2 = true
  533. }
  534. })
  535. },
  536. handShoppingAgainCart() {
  537. //一键加入购物车
  538. this.ProductService.ShoppingAgainCart({
  539. orderId: this.btnoRderID
  540. })
  541. .then(response => {
  542. this.ProductService.QueryShoppingQuantity({ userId: this.userId })
  543. .then(response => {
  544. this.$api.switchTabTo('/pages/tabBar/cart/index')
  545. })
  546. .catch(error => {
  547. console.log('查询购物车数量错误信息', error)
  548. })
  549. })
  550. .catch(error => {
  551. this.$util.msg(error.msg, 2000)
  552. })
  553. },
  554. handOrderConfirm(id) {
  555. //确认收货
  556. this.OrderService.ConfirmReceipt({ orderId: id })
  557. .then(response => {
  558. this.$util.msg(response.msg, 2000, true, 'success')
  559. setTimeout(() => {
  560. this.GetOrderDatainit(this.currentTab)
  561. }, 2000)
  562. })
  563. .catch(error => {
  564. this.$util.msg(error.msg, 2000)
  565. })
  566. },
  567. handOrderDetele(id) {
  568. //删除订单
  569. this.OrderService.DeleteOrder({ orderId: id })
  570. .then(response => {
  571. this.$util.msg(response.msg, 2000, true, 'success')
  572. setTimeout(() => {
  573. this.GetOrderDatainit(this.currentTab)
  574. }, 2000)
  575. })
  576. .catch(error => {
  577. this.$util.msg(error.msg, 2000)
  578. })
  579. },
  580. handCenceConfirm(id) {
  581. //取消订单
  582. this.OrderService.CancelOrder({ orderId: id })
  583. .then(response => {
  584. this.$util.msg(response.msg, 2000, true, 'success')
  585. setTimeout(() => {
  586. this.GetOrderDatainit(this.currentTab)
  587. }, 2000)
  588. })
  589. .catch(error => {
  590. this.$util.msg(error.msg, 2000)
  591. })
  592. },
  593. handlSearchPath() {
  594. this.$api.navigateTo('/pages/user/order/search-order')
  595. },
  596. getHeaderTopHeight() {
  597. // 状态栏高度
  598. let statusBarHeight = this.systeminfo.statusBarHeight
  599. let headerPosi = this.headerBtnPosi
  600. let btnPosi = {
  601. // 胶囊实际位置,坐标信息不是左上角原点
  602. height: headerPosi.height,
  603. width: headerPosi.width,
  604. // 胶囊top - 状态栏高度
  605. top: headerPosi.top - statusBarHeight,
  606. // 胶囊bottom - 胶囊height - 状态栏height (现胶囊bottom 为距离导航栏底部的长度)
  607. bottom: headerPosi.bottom - headerPosi.height - statusBarHeight,
  608. // 屏幕宽度 - 胶囊right
  609. right: this.systeminfo.screenWidth - headerPosi.right
  610. }
  611. this.navbarHeight = headerPosi.bottom + btnPosi.bottom // 原胶囊bottom + 现胶囊bottom
  612. },
  613. setHeaderBtnPosi() {
  614. // 获得胶囊按钮位置信息
  615. let headerBtnPosi = uni.getMenuButtonBoundingClientRect()
  616. return headerBtnPosi
  617. },
  618. setSysteminfo() {
  619. let systeminfo
  620. uni.getSystemInfo({
  621. // 获取设备信息
  622. success: res => {
  623. systeminfo = res
  624. }
  625. })
  626. return systeminfo
  627. },
  628. StateExpFormat(state) {
  629. //订单状态文字和颜色
  630. var HtmlStateText = '',
  631. stateTextObject = {
  632. 4: '交易完成',
  633. 5: '订单完成',
  634. 6: '已关闭',
  635. 7: '交易全退',
  636. 77: '交易全退',
  637. 11: '待付款待发货',
  638. 12: '待付款部分发货',
  639. 13: '待付款已发货',
  640. 21: '部分付款待发货',
  641. 22: '部分付款部分发货',
  642. 23: '部分付款已发货',
  643. 31: '已付款待发货',
  644. 32: '已付款部分发货',
  645. 33: '已付款已发货',
  646. 111: '待付款待发货'
  647. }
  648. Object.keys(stateTextObject).forEach(function(key) {
  649. if (key == state) {
  650. HtmlStateText = stateTextObject[key]
  651. }
  652. })
  653. return HtmlStateText
  654. }
  655. }
  656. }
  657. </script>
  658. <style lang="scss">
  659. page {
  660. background-color: #ffffff;
  661. }
  662. /*tabbar start*/
  663. ::-webkit-scrollbar {
  664. width: 0;
  665. height: 0;
  666. color: transparent;
  667. }
  668. .order-section-top {
  669. width: 100%;
  670. position: fixed;
  671. top: 0;
  672. left: 0;
  673. z-index: 99;
  674. background: #ffffff;
  675. .tab-screen {
  676. height: 48rpx;
  677. width: 702rpx;
  678. padding: 20rpx 24rpx 30rpx 24rpx;
  679. .tab-screen-item {
  680. height: 48rpx;
  681. border-radius: 24rpx;
  682. background: #f7f7f7;
  683. margin-right: 48rpx;
  684. line-height: 48rpx;
  685. font-size: $font-size-26;
  686. color: #333333;
  687. text-align: center;
  688. padding: 0 24rpx;
  689. float: left;
  690. &.active {
  691. color: $color-system;
  692. background-color: #fff3f7;
  693. }
  694. &:last-child {
  695. margin-right: 0;
  696. }
  697. }
  698. }
  699. }
  700. .tab-view::before {
  701. content: '';
  702. position: absolute;
  703. border-bottom: 1rpx solid #eaeef1;
  704. -webkit-transform: scaleY(0.5);
  705. transform: scaleY(0.5);
  706. bottom: 0;
  707. right: 0;
  708. left: 0;
  709. }
  710. .tab-view {
  711. width: 100%;
  712. height: 80rpx;
  713. overflow: hidden;
  714. box-sizing: border-box;
  715. background: #fff;
  716. white-space: nowrap;
  717. }
  718. .tab-bar-item {
  719. padding: 0;
  720. height: 80rpx;
  721. min-width: 80rpx;
  722. line-height: 80rpx;
  723. margin: 0 28rpx;
  724. display: inline-block;
  725. text-align: center;
  726. box-sizing: border-box;
  727. position: relative;
  728. .tab-bar-title {
  729. height: 80rpx;
  730. line-height: 80rpx;
  731. font-size: $font-size-28;
  732. color: $text-color;
  733. }
  734. .line {
  735. width: 40rpx;
  736. height: 4rpx;
  737. border-radius: 2rpx;
  738. position: absolute;
  739. bottom: 8rpx;
  740. left: 50%;
  741. margin-left: -20rpx;
  742. background-color: #ffffff;
  743. }
  744. &.active {
  745. .line {
  746. background-color: $color-system;
  747. }
  748. .tab-bar-title {
  749. color: $color-system !important;
  750. }
  751. }
  752. }
  753. .container {
  754. padding-bottom: env(safe-area-inset-bottom);
  755. height: auto;
  756. position: relative;
  757. }
  758. .tui-order-content {
  759. width: 100%;
  760. height: auto;
  761. }
  762. .tui-order-list {
  763. width: 100%;
  764. position: relative;
  765. }
  766. .tui-order-item {
  767. display: flex;
  768. flex-direction: column;
  769. width: 702rpx;
  770. padding: 20rpx 24rpx 0 24rpx;
  771. background: #fff;
  772. border-bottom: 20rpx solid #f7f7f7;
  773. }
  774. .order-title {
  775. width: 100%;
  776. height: auto;
  777. padding-bottom: 20rpx;
  778. border-bottom: 1px solid #e1e1e1;
  779. .order-title-t {
  780. width: 100%;
  781. height: 48rpx;
  782. float: left;
  783. line-height: 48rpx;
  784. position: relative;
  785. .bage-icon {
  786. width: 50rpx;
  787. height: 50rpx;
  788. display: block;
  789. position: absolute;
  790. right: 0;
  791. top: 9rpx;
  792. }
  793. .bage-text {
  794. display: inline-block;
  795. font-size: $font-size-28;
  796. line-height: 48rpx;
  797. text-align: left;
  798. color: $text-color;
  799. .text {
  800. color: #999999;
  801. }
  802. }
  803. }
  804. .order-title-b {
  805. width: 100%;
  806. height: 48rpx;
  807. float: left;
  808. margin-top: 8rpx;
  809. .order-title-btxt {
  810. float: left;
  811. font-size: $font-size-28;
  812. line-height: 48rpx;
  813. color: $text-color;
  814. text-align: left;
  815. .text {
  816. color: #999999;
  817. }
  818. }
  819. .order-title-tip {
  820. float: right;
  821. font-size: $font-size-28;
  822. line-height: 48rpx;
  823. text-align: right;
  824. color: #ff457b;
  825. }
  826. }
  827. }
  828. .goods-title {
  829. width: 100%;
  830. height: 56rpx;
  831. float: left;
  832. margin-top: 10rpx;
  833. .title-logo {
  834. width: 56rpx;
  835. height: 56rpx;
  836. float: left;
  837. border-radius: 8rpx;
  838. border: 1px solid #e1e1e1;
  839. margin-right: 8rpx;
  840. image {
  841. border-radius: 8rpx;
  842. width: 56rpx;
  843. height: 56rpx;
  844. }
  845. }
  846. .title-text {
  847. width: 400rpx;
  848. overflow: hidden;
  849. text-overflow: ellipsis;
  850. white-space: nowrap;
  851. float: left;
  852. font-size: $font-size-28;
  853. color: $text-color;
  854. text-align: left;
  855. line-height: 56rpx;
  856. font-weight: bold;
  857. }
  858. }
  859. .goods-item {
  860. width: 100%;
  861. height: auto;
  862. }
  863. .goods-pros-t {
  864. width: 100%;
  865. height: auto;
  866. padding: 24rpx 0;
  867. .pros-img {
  868. float: left;
  869. width: 210rpx;
  870. height: 100%;
  871. border-radius: 10rpx;
  872. margin: 0 26rpx 0 0;
  873. position: relative;
  874. image {
  875. width: 210rpx;
  876. height: 210rpx;
  877. border-radius: 10rpx;
  878. border: 1px solid #f3f3f3;
  879. }
  880. }
  881. }
  882. .pros-product {
  883. width: 460rpx;
  884. height: 100%;
  885. line-height: 36rpx;
  886. font-size: $font-size-26;
  887. position: relative;
  888. float: left;
  889. .producttitle {
  890. width: 100%;
  891. display: inline-block;
  892. height: auto;
  893. text-overflow: ellipsis;
  894. display: -webkit-box;
  895. word-break: break-all;
  896. -webkit-box-orient: vertical;
  897. -webkit-line-clamp: 2;
  898. overflow: hidden;
  899. margin-bottom: 8rpx;
  900. }
  901. .productspec {
  902. height: 36rpx;
  903. color: #999999;
  904. margin: 10rpx 0 0 0;
  905. }
  906. .productprice {
  907. height: 48rpx;
  908. width: 100%;
  909. float: left;
  910. margin-top: 10rpx;
  911. .price {
  912. line-height: 48rpx;
  913. font-size: $font-size-28;
  914. width: 48%;
  915. color: $color-system;
  916. float: left;
  917. font-weight: bold;
  918. &.disabled {
  919. color: #999999;
  920. text-decoration: line-through;
  921. }
  922. }
  923. .count {
  924. height: 100%;
  925. float: right;
  926. position: relative;
  927. .small {
  928. color: #666666;
  929. }
  930. }
  931. }
  932. .floor-item-act {
  933. width: 100%;
  934. height: 30rpx;
  935. margin-top: 8rpx;
  936. float: left;
  937. .tag {
  938. display: inline-block;
  939. height: 32rpx;
  940. font-size: 22rpx;
  941. line-height: 30rpx;
  942. text-align: center;
  943. color: #f83c6c;
  944. float: left;
  945. margin-right: 10rpx;
  946. &.tag-02 {
  947. width: 80rpx;
  948. background: url(https://static.caimei365.com/app/mini-hehe/icon/icon-active.png) top center no-repeat;
  949. background-size: contain;
  950. }
  951. &.tag-01 {
  952. width: 56rpx;
  953. color: #fff;
  954. background-color: #f83c6c;
  955. border-radius: 4rpx;
  956. }
  957. }
  958. }
  959. }
  960. .order-footer {
  961. width: 100%;
  962. height: 78rpx;
  963. float: left;
  964. margin-top: 20rpx;
  965. .order-footer-bot {
  966. width: 100%;
  967. float: left;
  968. height: 48rpx;
  969. line-height: 48rpx;
  970. font-size: $font-size-28;
  971. color: $text-color;
  972. .count {
  973. width: 50%;
  974. float: left;
  975. text-align: left;
  976. font-weight: bold;
  977. }
  978. .money {
  979. width: 50%;
  980. float: right;
  981. text-align: right;
  982. .color {
  983. color: $color-system;
  984. font-weight: bold;
  985. }
  986. }
  987. }
  988. }
  989. .tui-modal-custom-text {
  990. min-height: 300rpx;
  991. margin-bottom: 30rpx;
  992. .title {
  993. width: 100%;
  994. height: auto;
  995. font-size: $font-size-30;
  996. text-align: justify;
  997. color: #333333;
  998. line-height: 40rpx;
  999. margin-bottom: 30rpx;
  1000. }
  1001. .tui-modal-custom-list {
  1002. width: 100%;
  1003. height: 350rpx;
  1004. overflow: hidden;
  1005. .custom-list {
  1006. width: 100%;
  1007. height: 117rpx;
  1008. box-sizing: border-box;
  1009. float: left;
  1010. padding: 15rpx 0;
  1011. .custom-list-image {
  1012. width: 86rpx;
  1013. height: 86rpx;
  1014. float: left;
  1015. border-radius: 6rpx;
  1016. box-sizing: border-box;
  1017. border: 1px solid #e1e1e1;
  1018. image {
  1019. width: 84rpx;
  1020. height: 84rpx;
  1021. border-radius: 6rpx;
  1022. display: block;
  1023. }
  1024. }
  1025. .custom-list-name {
  1026. width: 400rpx;
  1027. height: 86rpx;
  1028. float: right;
  1029. line-height: 43rpx;
  1030. font-size: $font-size-26;
  1031. color: #666666;
  1032. text-overflow: ellipsis;
  1033. overflow: hidden;
  1034. display: -webkit-box;
  1035. -webkit-line-clamp: 2;
  1036. line-clamp: 2;
  1037. -webkit-box-orient: vertical;
  1038. }
  1039. }
  1040. }
  1041. }
  1042. .tui-modal-button {
  1043. width: 100%;
  1044. height: 72rpx;
  1045. display: flex;
  1046. .modal-button {
  1047. width: 200rpx;
  1048. height: 72rpx;
  1049. line-height: 72rpx;
  1050. border-radius: 36rpx;
  1051. box-sizing: border-box;
  1052. &.cancel {
  1053. border: 1px solid #b2b2b2;
  1054. background: #ffffff;
  1055. color: #333333;
  1056. }
  1057. &.confirm {
  1058. background: $btn-confirm;
  1059. color: #ffffff;
  1060. }
  1061. }
  1062. }
  1063. </style>