order-historylist.vue 28 KB

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