order-list.vue 35 KB

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