order-historylist.vue 28 KB

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