order-historylist.vue 29 KB

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