order-historylist.vue 28 KB

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