order-club-list.vue 28 KB

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