order-list.vue 36 KB

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