order-historylist.vue 28 KB

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