order-historylist.vue 28 KB

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