order-historylist.vue 29 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144
  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 tuiLoadmore from '@/components/tui-components/loadmore/loadmore'
  264. import tuiNomore from '@/components/tui-components/nomore/nomore'
  265. import orderButton from './components/sellerOrderButton' // 操作按钮
  266. import modalLayer from '@/components/modal-layer'
  267. import empty from '@/components/empty'
  268. import shareAlert from './components/sellerShareAlert.vue' // 分享弹窗
  269. export default {
  270. components: {
  271. headerBack,
  272. empty,
  273. btSearch,
  274. tuiLoadmore,
  275. tuiNomore,
  276. orderButton,
  277. modalLayer,
  278. shareAlert
  279. },
  280. data() {
  281. return {
  282. orderTabBar: [
  283. { listType: 0, text: '全部订单', orderList: [] },
  284. { listType: 1, text: '待确认', orderList: [] },
  285. { listType: 2, text: '待付款', orderList: [] },
  286. { listType: 3, text: '待发货', orderList: [] },
  287. { listType: 4, text: '已发货', orderList: [] },
  288. { listType: 5, text: '退货/款', orderList: [] }
  289. ],
  290. screenTabBar: [
  291. { type: 0, text: '全部订单' },
  292. { type: 1, text: '自主订单' },
  293. { type: 2, text: '协销订单' }
  294. ],
  295. winHeight: '', //窗口高度
  296. clubId: 0, //机构ID
  297. userId: 0,
  298. currentTab: 0, //预设当前项的值
  299. screenTab: 0, //筛选预设当前项的值
  300. scrollLeft: 0, //tab标题的滚动条位置
  301. clubSpId:0, // 机构协销Id
  302. serviceProviderId: 0, //协销用户ID
  303. orderData: [],
  304. btnClubUserID: 0,
  305. btnoRderID: 0, //点击按钮传入的的订单ID
  306. pageNum: 1, //页数
  307. pageSize: 10, //条数
  308. scrollTop: 0,
  309. deteleType: '',
  310. skeletonShow: true,
  311. isClickChange: false,
  312. isShareModal: false, //控制分享弹窗
  313. isShareType:2,
  314. isSeller: false,
  315. isModalLayer: false,
  316. loadding: false,
  317. pullUpOn: true,
  318. hasNextPage: false,
  319. pullFlag: true,
  320. navbarHeight: '',
  321. nomoreText: '上拉显示更多',
  322. showAgan: false,
  323. failList: [], // 再来一单可购买商品
  324. promptitle: '',
  325. aganOrderId: 0,
  326. authType:0,
  327. }
  328. },
  329. onLoad(option) {
  330. let self = this
  331. this.currentTab = option.listType
  332. this.authType = option.authType
  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. if(this.authType === '1' || this.authType === '2'){
  501. this.$api.navigateTo(
  502. `/pages/seller/order/order-club-details?listType=${this.currentTab}&orderId=${order.orderId}&userId=${
  503. order.userId
  504. }`
  505. )
  506. }else{
  507. this.$api.navigateTo(
  508. `/pages/seller/order/order-details?listType=${this.currentTab}&orderId=${order.orderId}&userId=${
  509. order.userId
  510. }`
  511. )
  512. }
  513. },
  514. handButtonConfirm(data) {
  515. //获取点击
  516. this.handShowAlert(data)
  517. this.btnoRderID = data.orderId
  518. },
  519. handShowAlert(data) {
  520. //执行
  521. switch (data.type) {
  522. case 'query':
  523. this.isModalLayer = true
  524. this.$api.navigateTo('/pages/user/order/order-logistics?orderId=' + data.orderId)
  525. break
  526. case 'delete':
  527. this.handOrderDetele(data.orderId)
  528. break
  529. case 'cancel':
  530. this.handCenceConfirm(data.orderId)
  531. break
  532. case 'confirm':
  533. this.handOrderConfirm(data.orderId)
  534. break
  535. case 'again':
  536. this.handOrderAgain(data.orderId)
  537. break
  538. }
  539. },
  540. handOrderAgain(orderId) {
  541. this.aganOrderId = orderId
  542. this.SellerService.SellerCreateOrderAgain({
  543. confirmFlag: 0,
  544. orderId: this.aganOrderId,
  545. serviceProviderId: this.serviceProviderId
  546. })
  547. .then(res => {
  548. if (res.code == 0) {
  549. this.$api.setStorage('orderUserInfo', {
  550. clubId: res.data.clubId,
  551. againBuyProductIds: res.data.productIds,
  552. userId: res.data.userId
  553. })
  554. this.$api.navigateTo('/pages/seller/cart/cart')
  555. }
  556. })
  557. .catch(error => {
  558. if (error.code == -3) {
  559. this.showAgan = true
  560. this.promptitle = error.msg
  561. this.failList = error.data
  562. } else if (error.code == -2) {
  563. this.$util.modal('', error.msg, '确定', '', false, () => {})
  564. } else {
  565. this.$util.msg(error.msg, 2000)
  566. }
  567. })
  568. },
  569. closeBtn() {
  570. //
  571. this.showAgan = false
  572. },
  573. cancelBtn() {
  574. // 再来一单弹窗
  575. this.SellerService.SellerCreateOrderAgain({
  576. serviceProviderId: this.serviceProviderId,
  577. orderId: this.aganOrderId,
  578. confirmFlag: 1
  579. }).then(res => {
  580. if (res.code == 0) {
  581. this.$api.navigateTo('/pages/seller/cart/cart')
  582. this.showAgan = false
  583. }
  584. })
  585. },
  586. handOrderConfirm(orderId) {
  587. //确认订单
  588. this.$util.modal('提示', '确认此订单?', '确定', '取消', true, () => {
  589. this.OrderService.AffirmOrder({ 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. handOrderDetele(orderId) {
  602. //删除订单
  603. this.$util.modal('提示', '确认删除该订单吗?', '确定', '取消', true, () => {
  604. this.OrderService.DeleteOrder({ orderId: orderId })
  605. .then(response => {
  606. this.$util.msg(response.msg, 2000, true, 'success')
  607. setTimeout(() => {
  608. this.getOrderDatainit(this.currentTab)
  609. }, 2000)
  610. })
  611. .catch(error => {
  612. this.$util.msg(error.msg, 2000)
  613. })
  614. })
  615. },
  616. handCenceConfirm(orderId) {
  617. //取消订单
  618. this.$util.modal('提示', '确认取消该订单吗?', '确定', '取消', true, () => {
  619. this.OrderService.CancelOrder({ orderId: orderId })
  620. .then(response => {
  621. this.$util.msg(response.msg, 2000, true, 'success')
  622. setTimeout(() => {
  623. this.getOrderDatainit(this.currentTab)
  624. }, 2000)
  625. })
  626. .catch(error => {
  627. this.$util.msg(error.msg, 2000)
  628. })
  629. })
  630. },
  631. handlSearchPath() {
  632. this.$api.navigateTo('/pages/seller/order/search-order')
  633. },
  634. onShareAppMessage(res) {
  635. //分享转发
  636. this.isShareModal = false
  637. if (res.from === 'button') {
  638. // 来自页面内转发按钮
  639. // console.log(res.target)
  640. }
  641. return {
  642. title: '您有新的分享订单,快来查看吧~',
  643. path: `/pages/user/order/order-sharelogin?orderId=${this.btnoRderID}&userId=${
  644. this.btnClubUserID
  645. }&serviceProviderId=${this.serviceProviderId}`,
  646. imageUrl: 'https://img.caimei365.com/group1/M00/03/95/Cmis216Sk_SABnOFABZCgCzFV_g063.png'
  647. }
  648. },
  649. PromotionsFormat(promo) {
  650. //促销活动类型数据处理
  651. if (promo != null) {
  652. if (promo.type == 1 && promo.mode == 1) {
  653. return true
  654. } else {
  655. return false
  656. }
  657. }
  658. return false
  659. },
  660. //订单状态文字和颜色
  661. StateExpFormat(state) {
  662. let stateText = '',
  663. stateTextObject = {
  664. 0: '待确认',
  665. 4: '交易完成',
  666. 5: '订单完成',
  667. 6: '已关闭',
  668. 7: '交易全退',
  669. 77: '交易全退',
  670. 11: '待付款待发货',
  671. 12: '待付款部分发货',
  672. 13: '待付款已发货',
  673. 21: '部分付款待发货',
  674. 22: '部分付款部分发货',
  675. 23: '部分付款已发货',
  676. 31: '已付款待发货',
  677. 32: '已付款部分发货',
  678. 33: '已付款已发货',
  679. 111: '待付款待发货'
  680. }
  681. Object.keys(stateTextObject).forEach(key => {
  682. if (key == state) {
  683. stateText = stateTextObject[key]
  684. }
  685. })
  686. return stateText
  687. },
  688. orderPriceToFixed(n) {
  689. let price = ''
  690. price = n.toFixed(2)
  691. return price
  692. }
  693. },
  694. onPageScroll(e) {
  695. this.scrollTop = e.scrollTop
  696. },
  697. onShow() {
  698. this.isModalLayer = false
  699. }
  700. }
  701. </script>
  702. <style lang="scss">
  703. /*tabbar end*/
  704. page {
  705. background: #ffffff;
  706. }
  707. /*tabbar start*/
  708. ::-webkit-scrollbar {
  709. width: 0;
  710. height: 0;
  711. color: transparent;
  712. }
  713. .order-section-top {
  714. width: 100%;
  715. position: fixed;
  716. top: 0;
  717. left: 0;
  718. z-index: 99;
  719. background: #ffffff;
  720. .tab-screen {
  721. height: 60rpx;
  722. width: 702rpx;
  723. padding: 10rpx 24rpx;
  724. border-top: 1px solid #f7f7f7;
  725. border-bottom: 1px solid #f7f7f7;
  726. display: flex;
  727. justify-content: center;
  728. justify-items: center;
  729. .tab-screen-item {
  730. flex: 1;
  731. height: 60rpx;
  732. border-radius: 10rpx;
  733. background: #f7f7f7;
  734. margin-right: 22rpx;
  735. line-height: 66rpx;
  736. font-size: $font-size-28;
  737. color: #333333;
  738. text-align: center;
  739. &.active {
  740. color: $color-system;
  741. }
  742. &:last-child {
  743. margin-right: 0;
  744. }
  745. }
  746. }
  747. }
  748. .tab-view::before {
  749. content: '';
  750. position: absolute;
  751. border-bottom: 1rpx solid #eaeef1;
  752. -webkit-transform: scaleY(0.5);
  753. transform: scaleY(0.5);
  754. bottom: 0;
  755. right: 0;
  756. left: 0;
  757. }
  758. .tab-view {
  759. width: 100%;
  760. height: 80rpx;
  761. overflow: hidden;
  762. box-sizing: border-box;
  763. background: #fff;
  764. white-space: nowrap;
  765. border-top: 1px solid #f7f7f7;
  766. }
  767. .tab-bar-item {
  768. padding: 0;
  769. height: 80rpx;
  770. min-width: 80rpx;
  771. line-height: 80rpx;
  772. margin: 0 28rpx;
  773. display: inline-block;
  774. text-align: center;
  775. box-sizing: border-box;
  776. &.active {
  777. border-bottom: 6rpx solid $color-system;
  778. }
  779. .tab-bar-title {
  780. height: 80rpx;
  781. line-height: 80rpx;
  782. font-size: $font-size-28;
  783. color: $text-color;
  784. }
  785. &.active .tab-bar-title {
  786. color: $color-system !important;
  787. }
  788. }
  789. .container {
  790. padding-bottom: env(safe-area-inset-bottom);
  791. height: auto;
  792. position: relative;
  793. }
  794. .tui-order-content {
  795. width: 100%;
  796. height: auto;
  797. }
  798. .tui-order-list {
  799. width: 100%;
  800. position: relative;
  801. }
  802. .tui-order-item {
  803. display: flex;
  804. flex-direction: column;
  805. width: 702rpx;
  806. padding: 0 24rpx;
  807. background: #fff;
  808. border-bottom: 20rpx solid #f7f7f7;
  809. }
  810. .order-title {
  811. width: 100%;
  812. height: auto;
  813. .order-title-name {
  814. width: 100%;
  815. height: 72rpx;
  816. border-bottom: 1px solid #f7f7f7;
  817. line-height: 72rpx;
  818. text-align: left;
  819. font-size: $font-size-28;
  820. color: #333333;
  821. .tags {
  822. display: inline-block;
  823. width: 60rpx;
  824. height: 32rpx;
  825. border-radius: 8rpx;
  826. background: #f0cb72;
  827. font-size: $font-size-22;
  828. color: #4e4539;
  829. text-align: center;
  830. line-height: 32rpx;
  831. margin-left: 10rpx;
  832. &.sv {
  833. background: #333333;
  834. color: #f0cb72;
  835. }
  836. }
  837. }
  838. .order-title-t {
  839. width: 100%;
  840. height: 68rpx;
  841. float: left;
  842. line-height: 68rpx;
  843. position: relative;
  844. .bage-icon {
  845. width: 50rpx;
  846. height: 50rpx;
  847. display: block;
  848. position: absolute;
  849. right: 0;
  850. top: 9rpx;
  851. }
  852. .bage-buss {
  853. display: inline-block;
  854. width: 72rpx;
  855. height: 30rpx;
  856. background: radial-gradient(circle, rgba(255, 39, 180, 1) 0%, rgba(193, 77, 245, 1) 100%);
  857. border-radius: 4rpx;
  858. line-height: 30rpx;
  859. font-size: $font-size-22;
  860. text-align: center;
  861. color: #ffffff;
  862. margin-top: 8rpx;
  863. }
  864. .bage-auto {
  865. display: inline-block;
  866. width: 72rpx;
  867. height: 30rpx;
  868. background: radial-gradient(circle, rgba(255, 180, 39, 1) 0%, rgba(245, 142, 77, 1) 100%);
  869. border-radius: 4rpx;
  870. line-height: 30rpx;
  871. font-size: $font-size-22;
  872. text-align: center;
  873. color: #ffffff;
  874. margin-top: 8rpx;
  875. }
  876. .bage-text {
  877. display: inline-block;
  878. font-size: $font-size-28;
  879. line-height: 68rpx;
  880. text-align: left;
  881. color: $color-system;
  882. margin-left: 15rpx;
  883. }
  884. }
  885. .order-title-b {
  886. width: 100%;
  887. height: 40rpx;
  888. float: left;
  889. margin-top: 8rpx;
  890. .order-title-btxt {
  891. float: left;
  892. font-size: $font-size-28;
  893. line-height: 40rpx;
  894. color: #999999;
  895. text-align: lef;
  896. }
  897. .order-title-tip {
  898. float: right;
  899. font-size: $font-size-28;
  900. line-height: 40rpx;
  901. text-align: right;
  902. color: #ff2a2a;
  903. }
  904. }
  905. }
  906. .goods-title {
  907. width: 100%;
  908. height: 56rpx;
  909. float: left;
  910. margin-top: 10rpx;
  911. .floor-item-act {
  912. height: 56rpx;
  913. text-align: center;
  914. box-sizing: border-box;
  915. float: left;
  916. padding: 10rpx 0;
  917. margin-right: 12rpx;
  918. }
  919. .title-text {
  920. width: 400rpx;
  921. overflow: hidden;
  922. text-overflow: ellipsis;
  923. white-space: nowrap;
  924. float: left;
  925. font-size: $font-size-28;
  926. color: $text-color;
  927. text-align: left;
  928. line-height: 56rpx;
  929. font-weight: bold;
  930. }
  931. }
  932. .goods-item {
  933. width: 100%;
  934. height: auto;
  935. }
  936. .goods-pros-t {
  937. width: 100%;
  938. height: auto;
  939. padding: 24rpx 0;
  940. .pros-img {
  941. float: left;
  942. width: 210rpx;
  943. height: 100%;
  944. border-radius: 10rpx;
  945. margin: 0 26rpx 0 0;
  946. position: relative;
  947. .tips {
  948. display: inline-block;
  949. width: 80rpx;
  950. height: 40rpx;
  951. background-image: linear-gradient(214deg, #ff4500 0%, #ff5800 53%, #ff4367 100%);
  952. line-height: 40rpx;
  953. text-align: center;
  954. font-size: $font-size-24;
  955. color: #ffffff;
  956. border-radius: 10rpx 0 10rpx 0;
  957. position: absolute;
  958. top: 0;
  959. left: 0;
  960. }
  961. image {
  962. width: 210rpx;
  963. height: 210rpx;
  964. border-radius: 10rpx;
  965. border: 1px solid #f3f3f3;
  966. }
  967. }
  968. }
  969. .pros-product {
  970. width: 460rpx;
  971. height: 100%;
  972. line-height: 36rpx;
  973. font-size: $font-size-26;
  974. position: relative;
  975. float: left;
  976. .producttitle {
  977. width: 100%;
  978. display: inline-block;
  979. height: auto;
  980. text-overflow: ellipsis;
  981. display: -webkit-box;
  982. word-break: break-all;
  983. -webkit-box-orient: vertical;
  984. -webkit-line-clamp: 2;
  985. overflow: hidden;
  986. margin-bottom: 8rpx;
  987. }
  988. .productspec {
  989. height: 36rpx;
  990. color: #999999;
  991. text-overflow: ellipsis;
  992. display: -webkit-box;
  993. word-break: break-all;
  994. -webkit-box-orient: vertical;
  995. -webkit-line-clamp: 1;
  996. overflow: hidden;
  997. }
  998. .productprice {
  999. height: 48rpx;
  1000. width: 100%;
  1001. float: left;
  1002. .price {
  1003. line-height: 48rpx;
  1004. font-size: $font-size-28;
  1005. width: 48%;
  1006. color: #ff2a2a;
  1007. float: left;
  1008. font-weight: bold;
  1009. &.none {
  1010. text-decoration: line-through;
  1011. color: #999999;
  1012. }
  1013. }
  1014. .count {
  1015. height: 100%;
  1016. float: right;
  1017. position: relative;
  1018. .small {
  1019. color: #666666;
  1020. }
  1021. }
  1022. }
  1023. .floor-item-act {
  1024. width: 100%;
  1025. height: 56rpx;
  1026. text-align: center;
  1027. box-sizing: border-box;
  1028. float: left;
  1029. padding: 0 0 10rpx 0;
  1030. }
  1031. }
  1032. .order-footer {
  1033. width: 100%;
  1034. height: 78rpx;
  1035. float: left;
  1036. .order-footer-top {
  1037. width: 100%;
  1038. height: 34rpx;
  1039. line-height: 34rpx;
  1040. font-size: $font-size-24;
  1041. color: #999999;
  1042. text-align: right;
  1043. }
  1044. .order-footer-bot {
  1045. width: 100%;
  1046. float: left;
  1047. height: 48rpx;
  1048. line-height: 48rpx;
  1049. font-size: $font-size-28;
  1050. font-weight: bold;
  1051. color: $text-color;
  1052. .count {
  1053. width: 50%;
  1054. float: left;
  1055. text-align: left;
  1056. }
  1057. .money {
  1058. width: 50%;
  1059. float: right;
  1060. text-align: right;
  1061. }
  1062. }
  1063. }
  1064. .aganBj {
  1065. position: fixed;
  1066. left: 0;
  1067. top: 0;
  1068. bottom: 0;
  1069. width: 100%;
  1070. height: 100%;
  1071. background-color: rgba(0, 0, 0, 0.5);
  1072. z-index: 999999;
  1073. .alertAgan {
  1074. position: absolute;
  1075. top: 50%;
  1076. left: 50%;
  1077. transform: translate(-50%, -50%);
  1078. width: 580rpx;
  1079. background-color: #fff;
  1080. border-radius: 16rpx;
  1081. .title {
  1082. font-size: 30rpx;
  1083. color: #333333;
  1084. line-height: 42rpx;
  1085. padding: 30rpx;
  1086. display: block;
  1087. }
  1088. .goods {
  1089. padding: 0 30rpx;
  1090. .list {
  1091. padding: 10px 0;
  1092. border-bottom: 1rpx solid #e1e1e1;
  1093. margin: 10rpx 0;
  1094. .image-left {
  1095. width: 86rpx;
  1096. height: 86rpx;
  1097. border: 2rpx solid #e1e1e1;
  1098. border-radius: 6rpx;
  1099. display: inline-block;
  1100. vertical-align: middle;
  1101. }
  1102. .name-right {
  1103. display: inline-block;
  1104. width: 416rpx;
  1105. margin-left: 15rpx;
  1106. font-size: 26rpx;
  1107. color: #666666;
  1108. vertical-align: middle;
  1109. word-break: break-all;
  1110. overflow: hidden;
  1111. text-overflow: ellipsis;
  1112. display: -webkit-inline-box;
  1113. -webkit-line-clamp: 2;
  1114. -webkit-box-orient: vertical;
  1115. }
  1116. }
  1117. }
  1118. .BtnAll {
  1119. margin-top: 30rpx;
  1120. .btn {
  1121. display: inline-block;
  1122. width: 290rpx;
  1123. height: 90rpx;
  1124. line-height: 90rpx;
  1125. text-align: center;
  1126. &.closebtn {
  1127. border-radius: 0px 0px 0px 10px;
  1128. color: #999999;
  1129. background: #efefef;
  1130. }
  1131. &.cancel {
  1132. border-radius: 0px 0px 8px 0px;
  1133. background: $btn-confirm;
  1134. color: #fff;
  1135. }
  1136. }
  1137. }
  1138. }
  1139. }
  1140. </style>