order-list.vue 35 KB

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