order-historylist.vue 28 KB

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