order-historylist.vue 27 KB

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