order-historylist.vue 28 KB

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