order-list.vue 29 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051
  1. <template>
  2. <view class="container" :style="{paddingTop:(navbarHeight+82)+'px'}">
  3. <!-- 自定义返回 -->
  4. <header-back :systeminfo='systeminfo'
  5. :navbar-data='nvabarData'
  6. :headerBtnPosi ="headerBtnPosi"
  7. :isDelete="isDelete"
  8. :isUsertype="1"
  9. @goSearchPath="handlSearchPath">
  10. </header-back>
  11. <view class="order-section-top" :style="{marginTop:navbarHeight+'px'}">
  12. <scroll-view scroll-x scroll-with-animation class="tab-view" :scroll-left="scrollLeft">
  13. <view v-for="(item,index) in orderTabBar" :key="index" class="tab-bar-item" :class="[currentTab==index ? 'active' : '']"
  14. :data-current="index" @tap.stop="onClickTab">
  15. <text class="tab-bar-title">{{item.text}}</text>
  16. </view>
  17. </scroll-view>
  18. <view class="tab-screen">
  19. <view v-for="(item,index) in screenTabBar" :key="index" class="tab-screen-item" :class="[screenTab == index ? 'active' : '']"
  20. :data-current="index" @tap.stop="onClickScreenTab(index)">{{item.text}}</view>
  21. </view>
  22. </view>
  23. <swiper class="tab-content" :current="currentTab" duration="80" @animationfinish="onChange" :style="{height:winHeight+'px'}" >
  24. <swiper-item v-for="(tabItem,index) in orderTabBar" :key="index">
  25. <tui-skeleton v-if="skeletonShow" backgroundColor="#fafafa" borderRadius="10rpx" :isLoading ="false" :loadingType="5"></tui-skeleton>
  26. <scroll-view scroll-y class="scoll-y tui-skeleton" @scrolltolower="scrolltolower" :style="{height:winHeight+'px'}" >
  27. <view :class="{'tui-order-list':scrollTop >= 0}" class="tui-skeleton clearfix">
  28. <!-- 空白页 -->
  29. <empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0" :typeIndex="currentTab" :navbarHeight="navbarHeight"></empty>
  30. <!-- 列表 -->
  31. <view v-else class="tui-order-content">
  32. <view class="tui-order-item" v-for="(order,orderIndex) in tabItem.orderList" :key="orderIndex" @click.stop="detail(order)">
  33. <view class="order-title">
  34. <view class="order-title-name">{{order.clubName ? order.clubName : ''}}</view>
  35. <view class="order-title-t">
  36. <view class="Rebate " v-if="order.rebateFlag==1">返佣</view>
  37. <text class="bage-buss tui-skeleton-fillet"
  38. v-if="order.orderSubmitType == 3 || order.orderSubmitType == 4">
  39. 协销
  40. </text>
  41. <text class="bage-auto tui-skeleton-fillet"
  42. v-if="order.orderSubmitType == 0 || order.orderSubmitType == 1 || order.orderSubmitType == 2">
  43. 自主
  44. </text>
  45. <text class="bage-text tui-skeleton-fillet">
  46. 订单编号:{{order.orderNo}}({{order.orderId}})
  47. </text>
  48. <image class="bage-icon"
  49. src="https://static.caimei365.com/app/img/icon/icon-type@3x.png"
  50. mode="widthFix"
  51. v-if="order.secondHandOrderFlag == 1">
  52. </image>
  53. </view>
  54. <view class="order-title-b">
  55. <view class="order-title-btxt tui-skeleton-fillet">
  56. 下单时间:{{order.orderTime}}
  57. </view>
  58. <view class="order-title-tip tui-skeleton-fillet">
  59. {{StateExpFormat(order.status)}}
  60. </view>
  61. </view>
  62. </view>
  63. <block v-for="(shop,index) in order.shopOrderList" :key="index">
  64. <view class="goods-title">
  65. <view v-if="shop.shopPromotion" class="floor-item-act">
  66. <view class="floor-tags">{{shop.shopPromotion.name}}</view>
  67. </view>
  68. <view class="title-text tui-skeleton-fillet">{{shop.shopName}}</view>
  69. </view>
  70. <view class="goods-item" v-for="(pros,prosIndex) in shop.orderProductList" :key="prosIndex">
  71. <view class="goods-pros-t">
  72. <view class="pros-img tui-skeleton-fillet">
  73. <image :src="pros.image" alt="" />
  74. <text class="tips" v-if="pros.productType ==2 || pros.productType ==1">赠品</text>
  75. </view>
  76. <view class="pros-product clearfix">
  77. <view class="producttitle tui-skeleton-fillet">{{pros.name}}</view>
  78. <view class="productspec tui-skeleton-fillet" v-if="pros.productCategory!=2" >
  79. 规格:{{pros.productUnit ? pros.productUnit : ''}}
  80. </view>
  81. <view class="productprice">
  82. <view class="price tui-skeleton-fillet">
  83. <text>¥{{pros.price | NumFormat}}</text>
  84. </view>
  85. <view class="count tui-skeleton-fillet">
  86. <text class="small">x</text>{{pros.num}}
  87. </view>
  88. </view>
  89. <view class="floor-item-act" v-if="pros.productPromotion!=null">
  90. <view v-if="PromotionsFormat(pros.productPromotion)" class="floor-tags">
  91. {{pros.productPromotion.name}}
  92. <text v-if ="pros.productPromotion!=null && pros.productPromotion.type !=3 ">
  93. :¥{{ pros.productPromotion == null ? '0.00' : pros.productPromotion.touchPrice | NumFormat}}
  94. </text>
  95. </view>
  96. <view v-else-if="pros.productPromotion.type !=3" class="floor-tags">
  97. {{pros.productPromotion.name}}
  98. </view>
  99. </view>
  100. </view>
  101. </view>
  102. </view>
  103. </block>
  104. <view class="order-footer">
  105. <view class="order-footer-top" v-if="order.discountFee!=0">经理折扣:¥{{ order.discountFee | NumFormat }}</view>
  106. <view class="order-footer-bot">
  107. <view class="count tui-skeleton-fillet">共{{order.productCount}}件商品</view>
  108. <view class="money tui-skeleton-fillet"
  109. v-if="order.status==31||order.status==32||order.status==33">
  110. 已支付:<label style="color:#f94b4b ;">¥{{ order.receiptAmount | NumFormat }}</label>
  111. </view>
  112. <view class="money tui-skeleton-fillet" v-else>待付总额:<label style="color:#f94b4b ;">
  113. ¥{{ order.pendingPayments | NumFormat }}</label>
  114. </view>
  115. </view>
  116. </view>
  117. <!-- 底部button -->
  118. <order-button ref="orderButton"
  119. :status="order.status"
  120. :orderId="order.orderId"
  121. :rechargeGoods = "order.rechargeGoods"
  122. :userId = "order.userId"
  123. :secondHandOrderFlag = "order.secondHandOrderFlag"
  124. @buttonConfirm="handButtonConfirm">
  125. </order-button>
  126. </view>
  127. <!--加载loadding-->
  128. <tui-loadmore :visible="loadding" :index="3" type="black"></tui-loadmore>
  129. <tui-nomore :visible="!pullUpOn" :backgroundColor="'#ffffff'" :text='nomoreText'></tui-nomore>
  130. <!--加载loadding-->
  131. </view>
  132. </view>
  133. </scroll-view>
  134. </swiper-item>
  135. </swiper>
  136. <!-- 分享弹窗 -->
  137. <share-alert v-if="isShareModal"
  138. :orderId="btnoRderID"
  139. @shareConfirm ='onShareAppMessage'>
  140. </share-alert>
  141. <!-- 透明模态层 -->
  142. <modal-layer v-if='isModalLayer'></modal-layer>
  143. <view class="aganBj" v-show="showAgan">
  144. <view class="alertAgan">
  145. <text class="title">{{ promptitle }}</text>
  146. <view class="goods">
  147. <view class="list" v-for="(item,index) in failList" :key="index">
  148. <image class="image-left" :src="item.image"></image>
  149. <view class="name-right">{{item.name}}</view>
  150. </view>
  151. </view>
  152. <view class="BtnAll">
  153. <view class="closebtn btn" @click="closeBtn">取消</view>
  154. <view class="cancel btn" @click="cancelBtn">确定</view>
  155. </view>
  156. </view>
  157. </view>
  158. </view>
  159. </template>
  160. <script>
  161. import headerBack from '@/components/cm-module/headerNavbar/header-back' //自定义顶部导航
  162. import btSearch from '@/components/uni-search/bt-search.vue' //搜索
  163. import tuiSkeleton from "@/components/tui-skeleton/tui-skeleton"
  164. import tuiLoadmore from "@/components/tui-components/loadmore/loadmore"
  165. import tuiNomore from "@/components/tui-components/nomore/nomore"
  166. import orderButton from '@/components/cm-module/orderDetails/sellerOrderButton' //操作按钮
  167. import modalLayer from "@/components/modal-layer"
  168. import empty from "@/components/empty";
  169. import shareAlert from '@/components/cm-module/modelAlert/sellerShareAlert' //分享弹窗
  170. export default {
  171. components: {
  172. headerBack,
  173. empty,
  174. btSearch,
  175. tuiLoadmore,
  176. tuiNomore,
  177. orderButton,
  178. tuiSkeleton,
  179. modalLayer,
  180. shareAlert
  181. },
  182. data() {
  183. return {
  184. orderTabBar: [{listType: 0,text: '全部订单',orderList: []},
  185. {listType: 1,text: '待确认',orderList: []},
  186. {listType: 2,text: '待付款',orderList: []},
  187. {listType: 3,text: '待发货',orderList: []},
  188. {listType: 4,text: '已发货',orderList: []},
  189. {listType: 5,text: '退货/款',orderList: []},
  190. ],
  191. screenTabBar:[
  192. {type:0,text:'全部订单'},
  193. {type:1,text:'机构自主订单'},
  194. {type:2,text:'协销订单'}
  195. ],
  196. headerBtnPosi: this.setHeaderBtnPosi(), //获取设备顶部胶囊高度
  197. systeminfo: this.setSysteminfo(), //获取设备信息
  198. nvabarData: { //顶部自定义导航
  199. showCapsule: 1, // 是否显示左上角图标 1表示显示 0表示不显示,
  200. showSearch: 1,
  201. title: '我的订单 ', // 导航栏中间的标题
  202. },
  203. CustomBar:this.CustomBar,// 顶部导航栏高度
  204. winHeight: "", //窗口高度
  205. currentTab: 0, //预设当前项的值
  206. screenTab:0, //筛选预设当前项的值
  207. scrollLeft: 0 ,//tab标题的滚动条位置
  208. serviceProviderId:0,//协销用户ID
  209. orderData: [],
  210. btnClubUserID:0,
  211. btnoRderID: 0, //点击按钮传入的的订单ID
  212. pageNum: 1, //页数
  213. pageSize: 10, //条数
  214. scrollTop: 0,
  215. deteleType:'',
  216. skeletonShow: true,
  217. isClickChange: false,
  218. isShareModal: false,//控制分享弹窗
  219. isSeller:false,
  220. isModalLayer: false,
  221. loadding: false,
  222. pullUpOn: true,
  223. hasNextPage: false,
  224. pullFlag: true,
  225. navbarHeight:'',
  226. nomoreText: '上拉显示更多',
  227. showAgan:false,
  228. failList:[], // 再来一单可购买商品
  229. promptitle:'',
  230. aganOrderId:0,// 再来一单商品id
  231. userId:0
  232. }
  233. },
  234. onLoad(option) {
  235. let self = this;
  236. if(option.type ==='detele'){self.isDelete = true}
  237. self.currentTab = option.listType
  238. self.getHeaderTopHeight()//设置自定义导航高度
  239. // 高度自适应
  240. uni.getSystemInfo({
  241. success: function(res) {
  242. let calc = res.windowHeight;
  243. self.winHeight = calc-self.CustomBar-82;
  244. }
  245. });
  246. this.$api.getStorage().then((resolve) =>{
  247. this.userId = resolve.userId ? resolve.userId : 0
  248. })
  249. },
  250. filters:{
  251. NumFormat(value) {//处理金额
  252. return Number(value).toFixed(2);
  253. },
  254. },
  255. methods: {
  256. // 滚动切换标签样式
  257. onChange (e) {
  258. let index = e.target.current || e.detail.current;
  259. if (this.isClickChange) {
  260. this.currentTab = index;
  261. this.isClickChange = false
  262. return;
  263. }
  264. this.isClickChange = false
  265. this.currentTab = index
  266. this.checkCor()
  267. this.pageNum = 1
  268. this.pullUpOn = true //切换时隐藏
  269. this.loadding = false //切换时隐藏
  270. this.nomoreText = ''
  271. this.getOrderDatainit(this.currentTab,'tabChange')
  272. },
  273. // 点击标题切换当前页时改变样式
  274. onClickTab (e) {
  275. let tabIndex = e.target.dataset.current || e.currentTarget.dataset.current;
  276. if (this.currentTab === tabIndex) {
  277. return false;
  278. } else {
  279. this.isClickChange = true
  280. this.currentTab = tabIndex
  281. this.pageNum = 1
  282. this.pullUpOn = true //切换时隐藏
  283. this.loadding = false //切换时隐藏
  284. this.getOrderDatainit(this.currentTab)
  285. }
  286. },
  287. onClickScreenTab(index){
  288. this.screenTab = index
  289. this.pageNum = 1
  290. this.pullUpOn = true //切换时隐藏
  291. this.loadding = false //切换时隐藏
  292. this.nomoreText = ''
  293. this.getOrderDatainit(this.currentTab)
  294. },
  295. //判断当前滚动超过一屏时,设置tab标题滚动条。
  296. checkCor: function() {
  297. if (this.currentTab > 3) {
  298. //这里距离按实际计算
  299. this.scrollLeft = 300
  300. } else {
  301. this.scrollLeft = 0
  302. }
  303. },
  304. getOrderDatainit(index,source){
  305. setTimeout(()=>{this.skeletonShow = false},1500)
  306. let orderItem = this.orderTabBar[index];
  307. let listType = orderItem.listType;
  308. if(source === 'tabChange' && orderItem.loaded === true){//tab切换只有第一次需要加载数据
  309. return;
  310. }
  311. setTimeout(()=>{
  312. this.$api.getStorage().then((resolve) =>{
  313. this.serviceProviderId = resolve.serviceProviderId
  314. this.SellerService.GetSellerOrderList(
  315. {
  316. listType:index,
  317. orderSubmitType:this.screenTab,
  318. serviceProviderId:this.serviceProviderId,
  319. pageNum:1,
  320. pageSize:this.pageSize,
  321. }
  322. ).then(response =>{
  323. let data = response.data
  324. if(data.list && data.list.length>0){
  325. let orderList = data.list.filter(item=>{
  326. //添加不同状态下订单的表现形式
  327. item = Object.assign(item, this.StateExpFormat(item.listType));
  328. return item;
  329. });
  330. orderItem.orderList =[];
  331. orderList.forEach(item=>{
  332. orderItem.orderList.push(item);
  333. })
  334. //loaded新字段用于表示数据加载完毕,如果为空可以显示空白页
  335. this.$set(orderItem, 'loaded', true);
  336. this.hasNextPage = data.hasNextPage;
  337. if(this.hasNextPage){
  338. this.pullUpOn = false
  339. this.nomoreText = '上拉显示更多'
  340. }else{
  341. if(orderItem.orderList.length < 2){
  342. this.pullUpOn = true
  343. }else{
  344. this.pullUpOn = false
  345. this.nomoreText = '已至底部'
  346. }
  347. }
  348. }
  349. }).catch(error =>{
  350. this.$util.msg(error.msg,2000);
  351. })
  352. })
  353. }, 600);
  354. },
  355. getOnReachBottomData(index){//上拉加载
  356. this.SellerService.GetSellerOrderList(
  357. {
  358. listType:index,
  359. orderSubmitType:this.screenTab,
  360. serviceProviderId:this.serviceProviderId,
  361. pageNum:this.pageNum+=1,
  362. pageSize:this.pageSize,
  363. }
  364. ).then(response =>{
  365. let orderItem = this.orderTabBar[index];
  366. let data = response.data
  367. this.hasNextPage =data.hasNextPage;
  368. orderItem.orderList = orderItem.orderList.concat(data.list)
  369. this.pullFlag = false;// 防上拉暴滑
  370. setTimeout(()=>{this.pullFlag = true;},500)
  371. if(this.hasNextPage){
  372. this.pullUpOn = false
  373. this.nomoreText = '上拉显示更多'
  374. }else{
  375. this.loadding = false
  376. this.pullUpOn = false
  377. this.nomoreText = '已至底部'
  378. }
  379. }).catch(error =>{
  380. this.$util.msg(error.msg,2000)
  381. })
  382. },
  383. scrolltolower() {
  384. if(this.hasNextPage){
  385. this.loadding = true
  386. this.pullUpOn = true
  387. this.getOnReachBottomData(this.currentTab);
  388. }
  389. },
  390. detail(order) {//订单详情跳转
  391. this.isModalLayer = true;
  392. this.$api.navigateTo(`/pages/seller/order/order-details?listType=${this.currentTab}&orderId=${order.orderId}&userId=${order.userId}`)
  393. },
  394. handButtonConfirm(data) {//获取点击
  395. this.handShowAlert(data)
  396. this.btnoRderID = data.orderId
  397. },
  398. handShowAlert(data) {//执行
  399. switch(data.type){
  400. case 'query':
  401. this.isModalLayer = true;
  402. this.$api.navigateTo('/pages/user/order/order-logistics?orderId='+data.orderId)
  403. break
  404. case 'delete':
  405. this.handOrderDetele(data.orderId);
  406. break
  407. case 'cancel':
  408. this.handCenceConfirm(data.orderId)
  409. break
  410. case 'confirm':
  411. this.handOrderConfirm(data.orderId);
  412. break
  413. case 'again':
  414. this.handOrderAgain(data.orderId);
  415. break
  416. }
  417. },
  418. handOrderAgain(orderId){
  419. this.aganOrderId = orderId;
  420. this.SellerService.SellerCreateOrderAgain(
  421. {
  422. confirmFlag:0,
  423. orderId:this.aganOrderId,
  424. serviceProviderId:this.serviceProviderId
  425. }
  426. ).then(res =>{
  427. if(res.code==0){
  428. this.$api.setStorage('orderUserInfo',{clubID:res.data.clubId,againBuyProductIds:res.data.againBuyProductIds})
  429. this.$api.navigateTo('/pages/seller/cart/cart');
  430. }
  431. }).catch(error =>{
  432. if(error.code== -3){
  433. this.showAgan = true
  434. this.promptitle = error.msg
  435. this.failList = error.data
  436. }else if(error.code== -2){
  437. this.$util.modal('',error.msg,'确定','',false,() =>{})
  438. }else{
  439. this.$util.msg(error.msg,2000)
  440. }
  441. })
  442. },
  443. closeBtn(){//
  444. this.showAgan = false;
  445. },
  446. cancelBtn(){// 再来一单弹窗
  447. this.SellerService.SellerCreateOrderAgain(
  448. {
  449. serviceProviderId:this.serviceProviderId,
  450. orderId:this.aganOrderId,
  451. confirmFlag:1,
  452. }
  453. ).then(res =>{
  454. if(res.code==0){
  455. this.$api.navigateTo('/pages/seller/cart/cart');
  456. this.showAgan = false;
  457. }
  458. })
  459. },
  460. handOrderConfirm (orderId){//确认订单
  461. this.$util.modal('提示','确认此订单?','确定','取消',true,() =>{
  462. this.OrderService.AffirmOrder({orderId:orderId}).then(response =>{
  463. this.$util.msg(response.msg,2000,true,'success');
  464. setTimeout(() => {
  465. this.getOrderDatainit(this.currentTab)
  466. },2000)
  467. }).catch(error =>{
  468. this.$util.msg(error.msg,2000)
  469. })
  470. })
  471. },
  472. handOrderDetele(orderId){//删除订单
  473. this.$util.modal('提示','确认删除该订单吗?','确定','取消',true,() =>{
  474. this.OrderService.DeleteOrder({orderId:orderId}).then(response =>{
  475. this.$util.msg(response.msg,2000,true,'success');
  476. setTimeout(() => {
  477. this.getOrderDatainit(this.currentTab)
  478. },2000)
  479. }).catch(error =>{
  480. this.$util.msg(error.msg,2000)
  481. })
  482. })
  483. },
  484. handCenceConfirm(orderId){//取消订单
  485. this.$util.modal('提示','确认取消该订单吗?','确定','取消',true,() =>{
  486. this.OrderService.CancelOrder({orderId:orderId}).then(response =>{
  487. this.$util.msg(response.msg,2000,true,'success');
  488. setTimeout(() => {
  489. this.getOrderDatainit(this.currentTab)
  490. },2000)
  491. }).catch(error =>{
  492. this.$util.msg(error.msg,2000)
  493. })
  494. })
  495. },
  496. handlSearchPath(){
  497. this.$api.navigateTo('/pages/seller/search/search-order')
  498. },
  499. onShareAppMessage (res){//分享转发
  500. this.isShareModal = false
  501. if (res.from === 'button') {// 来自页面内转发按钮
  502. // console.log(res.target)
  503. }
  504. return {
  505. title: '您有新的订单,请点击查看~',
  506. path: `/pages/user/order/order-sharelogin?orderId=${this.btnoRderID}&userId=${this.btnClubUserID}&serviceProviderId=${this.serviceProviderId}`,
  507. imageUrl:'https://img.caimei365.com/group1/M00/03/95/Cmis216Sk_SABnOFABZCgCzFV_g063.png'
  508. }
  509. },
  510. PromotionsFormat(promo){//促销活动类型数据处理
  511. if(promo!=null){
  512. if(promo.type == 1 && promo.mode == 1){
  513. return true
  514. }else{
  515. return false
  516. }
  517. }
  518. return false
  519. },
  520. //订单状态文字和颜色
  521. StateExpFormat (state){
  522. let stateText = '',
  523. stateTextObject={
  524. 0:'待确认',
  525. 4:'交易完成',
  526. 5:'订单完成',
  527. 6:'已关闭',
  528. 7:'交易全退',
  529. 77:'交易全退',
  530. 11:'待付款待发货',
  531. 12:'待付款部分发货',
  532. 13:'待付款已发货',
  533. 21:'部分付款待发货',
  534. 22:'部分付款部分发货',
  535. 23:'部分付款已发货',
  536. 31:'已付款待发货',
  537. 32:'已付款部分发货',
  538. 33:'已付款已发货',
  539. 111:'待付款待发货',
  540. }
  541. Object.keys(stateTextObject).forEach(key => {
  542. if(key == state){
  543. stateText = stateTextObject[key]
  544. }
  545. })
  546. return stateText;
  547. },
  548. orderPriceToFixed (n){
  549. let price ='';
  550. price = n.toFixed(2);
  551. return price
  552. },
  553. getHeaderTopHeight (){ // 状态栏高度
  554. let statusBarHeight = this.systeminfo.statusBarHeight
  555. let headerPosi = this.headerBtnPosi
  556. let btnPosi = { // 胶囊实际位置,坐标信息不是左上角原点
  557. height: headerPosi.height,
  558. width: headerPosi.width,
  559. // 胶囊top - 状态栏高度
  560. top: headerPosi.top - statusBarHeight,
  561. // 胶囊bottom - 胶囊height - 状态栏height (现胶囊bottom 为距离导航栏底部的长度)
  562. bottom: headerPosi.bottom - headerPosi.height - statusBarHeight,
  563. // 屏幕宽度 - 胶囊right
  564. right: this.systeminfo.screenWidth - headerPosi.right
  565. }
  566. this.navbarHeight= headerPosi.bottom + btnPosi.bottom// 原胶囊bottom + 现胶囊bottom
  567. },
  568. setHeaderBtnPosi (){
  569. // 获得胶囊按钮位置信息
  570. let headerBtnPosi = uni.getMenuButtonBoundingClientRect();
  571. return headerBtnPosi
  572. },
  573. setSysteminfo (){
  574. let systeminfo;
  575. uni.getSystemInfo({ // 获取设备信息
  576. success: (res) => {
  577. systeminfo = res
  578. },
  579. })
  580. return systeminfo
  581. }
  582. },
  583. onPageScroll(e) {
  584. this.scrollTop = e.scrollTop;
  585. },
  586. onShow() {
  587. this.isModalLayer = false;
  588. this.getOrderDatainit(this.currentTab)
  589. }
  590. }
  591. </script>
  592. <style lang="scss">
  593. page{
  594. background-color: #FFFFFF;
  595. }
  596. /*tabbar start*/
  597. ::-webkit-scrollbar {
  598. width: 0;
  599. height: 0;
  600. color: transparent;
  601. }
  602. .order-section-top{
  603. width: 100%;
  604. position: fixed;
  605. top: 0;
  606. left: 0;
  607. z-index: 99;
  608. background: #FFFFFF;
  609. .tab-screen{
  610. height: 60rpx;
  611. width: 702rpx;
  612. padding: 10rpx 24rpx;
  613. border-top: 1px solid #F7F7F7;
  614. border-bottom: 1px solid #F7F7F7;
  615. display: flex;
  616. justify-content: center;
  617. justify-items: center;
  618. .tab-screen-item{
  619. flex: 1;
  620. height: 60rpx;
  621. border-radius: 10rpx;
  622. background: #F7F7F7;
  623. margin-right: 22rpx;
  624. line-height: 66rpx;
  625. font-size: $font-size-28;
  626. color: #333333;
  627. text-align: center;
  628. &.active{
  629. color: $color-system;
  630. }
  631. &:last-child{
  632. margin-right: 0;
  633. }
  634. }
  635. }
  636. }
  637. .tab-view::before {
  638. content: '';
  639. position: absolute;
  640. border-bottom: 1rpx solid #eaeef1;
  641. -webkit-transform: scaleY(0.5);
  642. transform: scaleY(0.5);
  643. bottom: 0;
  644. right: 0;
  645. left: 0;
  646. }
  647. .tab-view {
  648. width: 100%;
  649. height: 80rpx;
  650. overflow: hidden;
  651. box-sizing: border-box;
  652. background: #fff;
  653. white-space: nowrap;
  654. border-top: 1px solid #F7F7F7;
  655. }
  656. .tab-bar-item {
  657. padding: 0;
  658. height: 80rpx;
  659. min-width: 80rpx;
  660. line-height: 80rpx;
  661. margin: 0 28rpx;
  662. display: inline-block;
  663. text-align: center;
  664. box-sizing: border-box;
  665. &.active {
  666. border-bottom: 6rpx solid $color-system;
  667. }
  668. .tab-bar-title {
  669. height: 80rpx;
  670. line-height: 80rpx;
  671. font-size:$font-size-28;
  672. color: $text-color;
  673. }
  674. &.active .tab-bar-title {
  675. color: $color-system !important;
  676. }
  677. }
  678. .container {
  679. padding-bottom: env(safe-area-inset-bottom);
  680. height: auto;
  681. position: relative;
  682. }
  683. .tui-order-content{
  684. width: 100%;
  685. height: auto;
  686. }
  687. .tui-order-list {
  688. width: 100%;
  689. position: relative;
  690. }
  691. .tui-order-item {
  692. display: flex;
  693. flex-direction: column;
  694. width: 702rpx;
  695. padding:20rpx 24rpx 0 24rpx;
  696. background: #fff;
  697. border-bottom: 20rpx solid #F7F7F7;
  698. }
  699. .order-title{
  700. width: 100%;
  701. height: auto;
  702. .order-title-name{
  703. width: 100%;
  704. height: 72rpx;
  705. border-bottom: 1px solid #F7F7F7;
  706. line-height: 72rpx;
  707. text-align: left;
  708. font-size: $font-size-28;
  709. color: #333333;
  710. }
  711. .order-title-t{
  712. width: 100%;
  713. height: 68rpx;
  714. float: left;
  715. line-height: 68rpx;
  716. position: relative;
  717. .bage-icon{
  718. width: 50rpx;
  719. height: 50rpx;
  720. display: block;
  721. position: absolute;
  722. right: 0;
  723. top: 9rpx;
  724. }
  725. .bage-buss{
  726. display: inline-block;
  727. width: 72rpx;
  728. height: 30rpx;
  729. background:radial-gradient(circle,rgba(255,39,180,1) 0%,rgba(193,77,245,1) 100%);
  730. border-radius: 4rpx;
  731. line-height: 30rpx;
  732. font-size: $font-size-22;
  733. text-align: center;
  734. color: #FFFFFF;
  735. }
  736. .bage-auto{
  737. display: inline-block;
  738. width: 72rpx;
  739. height: 30rpx;
  740. background:radial-gradient(circle,rgba(255,180,39,1) 0%,rgba(245,142,77,1) 100%);
  741. border-radius: 4rpx;
  742. line-height: 30rpx;
  743. font-size: $font-size-22;
  744. text-align: center;
  745. color: #FFFFFF;
  746. }
  747. .Rebate{
  748. display: inline-block;
  749. width: 72rpx;
  750. height: 32rpx;
  751. background:#ff7a51;
  752. border-radius: 6rpx;
  753. line-height: 32rpx;
  754. text-align: center;
  755. color: #FFFFFF;
  756. margin-top: 10rpx;
  757. font-size: $font-size-22;
  758. margin-right: 20rpx;
  759. }
  760. .bage-text{
  761. display: inline-block;
  762. font-size: $font-size-28;
  763. line-height: 68rpx;
  764. text-align: left;
  765. color: $text-color;
  766. margin-left: 10rpx;
  767. }
  768. }
  769. .order-title-b{
  770. width: 100%;
  771. height: 40rpx;
  772. float: left;
  773. margin-top: 8rpx;
  774. .order-title-btxt{
  775. float: left;
  776. font-size: $font-size-28;
  777. line-height: 40rpx;
  778. color: #999999;
  779. text-align: lef
  780. }
  781. .order-title-tip{
  782. float: right;
  783. font-size: $font-size-28;
  784. line-height: 40rpx;
  785. text-align: right;
  786. color: #FF2A2A;
  787. }
  788. }
  789. }
  790. .goods-title{
  791. width: 100%;
  792. height: 56rpx;
  793. float: left;
  794. margin-top:10rpx;
  795. .floor-item-act{
  796. height: 56rpx;
  797. text-align: center;
  798. box-sizing: border-box;
  799. float: left;
  800. padding: 10rpx 0;
  801. margin-right: 12rpx;
  802. .floor-tags{
  803. height: 28rpx;
  804. border-radius: 6rpx;
  805. background-color: #FFFFFF;
  806. line-height: 28rpx;
  807. color: $color-system;
  808. text-align: center;
  809. display: inline-block;
  810. padding:0 16rpx;
  811. font-size: $font-size-20;
  812. border: 1px solid #E15616;
  813. float: left;
  814. }
  815. }
  816. .title-text{
  817. width: 400rpx;
  818. overflow: hidden;
  819. text-overflow:ellipsis;
  820. white-space: nowrap;
  821. float: left;
  822. font-size: $font-size-28;
  823. color: $text-color;
  824. text-align: left;
  825. line-height: 56rpx;
  826. font-weight: bold;
  827. }
  828. }
  829. .goods-item{
  830. width: 100%;
  831. height: auto;
  832. }
  833. .goods-pros-t{
  834. width: 100%;
  835. height: auto;
  836. padding:24rpx 0;
  837. .pros-img{
  838. float: left;
  839. width: 210rpx;
  840. height: 100%;
  841. border-radius: 10rpx;
  842. margin:0 26rpx 0 0;
  843. position: relative;
  844. .tips{
  845. display: inline-block;
  846. width: 80rpx;
  847. height: 40rpx;
  848. background-image: linear-gradient(214deg, #ff4500 0%, #ff5800 53%, #ff4367 100%);
  849. line-height: 40rpx;
  850. text-align: center;
  851. font-size: $font-size-24;
  852. color: #FFFFFF;
  853. border-radius:10rpx 0 10rpx 0 ;
  854. position: absolute;
  855. top:0;
  856. left: 0;
  857. }
  858. image{
  859. width: 210rpx;
  860. height: 210rpx;
  861. border-radius: 10rpx;
  862. border:1px solid #f3f3f3;
  863. }
  864. }
  865. }
  866. .pros-product{
  867. width: 460rpx;
  868. height: 100%;
  869. line-height: 36rpx;
  870. font-size: $font-size-26;
  871. position: relative;
  872. float: left;
  873. .producttitle{
  874. width: 100%;
  875. display: inline-block;
  876. height: auto;
  877. text-overflow:ellipsis;
  878. display: -webkit-box;
  879. word-break: break-all;
  880. -webkit-box-orient: vertical;
  881. -webkit-line-clamp: 2;
  882. overflow: hidden;
  883. margin-bottom: 8rpx;
  884. }
  885. .productspec{
  886. height: 36rpx;
  887. color: #999999;
  888. text-overflow:ellipsis;
  889. display: -webkit-box;
  890. word-break: break-all;
  891. -webkit-box-orient: vertical;
  892. -webkit-line-clamp: 1;
  893. overflow: hidden;
  894. }
  895. .productprice{
  896. height: 48rpx;
  897. width: 100%;
  898. float: left;
  899. .price{
  900. line-height: 48rpx;
  901. font-size: $font-size-28;
  902. width: 48%;
  903. color: #FF2A2A;
  904. float: left;
  905. font-weight: bold;
  906. }
  907. .count{
  908. height: 100%;
  909. float: right;
  910. position: relative;
  911. .small{
  912. color: #666666;
  913. }
  914. }
  915. }
  916. .floor-item-act{
  917. width: 100%;
  918. height: 56rpx;
  919. text-align: center;
  920. box-sizing: border-box;
  921. float: left;
  922. padding:0 0 10rpx 0;
  923. .floor-tags{
  924. height: 28rpx;
  925. border-radius: 6rpx;
  926. background-color: #FFFFFF;
  927. line-height: 28rpx;
  928. color: $color-system;
  929. text-align: center;
  930. display: inline-block;
  931. padding:0 16rpx;
  932. font-size: $font-size-20;
  933. border: 1px solid #E15616;
  934. float: left;
  935. }
  936. }
  937. }
  938. .order-footer{
  939. width: 100%;
  940. height: 78rpx;
  941. float: left;
  942. .order-footer-top{
  943. width: 100%;
  944. height: 34rpx;
  945. line-height: 34rpx;
  946. font-size: $font-size-24;
  947. color: #999999;
  948. text-align: right;
  949. }
  950. .order-footer-bot{
  951. width: 100%;
  952. float: left;
  953. height: 48rpx;
  954. line-height: 48rpx;
  955. font-size: $font-size-28;
  956. font-weight: bold;
  957. color: $text-color;
  958. .count{
  959. width: 50%;
  960. float: left;
  961. text-align: left;
  962. }
  963. .money{
  964. width: 50%;
  965. float: right;
  966. text-align: right;
  967. }
  968. }
  969. }
  970. .aganBj {
  971. position: fixed;
  972. left: 0;
  973. top: 0;
  974. bottom: 0;
  975. width: 100%;
  976. height: 100%;
  977. background-color: rgba(0, 0, 0, .5);
  978. z-index: 999999;
  979. .alertAgan {
  980. position: absolute;
  981. top: 50%;
  982. left: 50%;
  983. transform: translate(-50%, -50%);
  984. width:580rpx;
  985. background-color: #fff;
  986. border-radius: 16rpx;
  987. .title{
  988. font-size: 30rpx;
  989. color: #333333;
  990. line-height: 42rpx;
  991. padding: 30rpx;
  992. display: block;
  993. }
  994. .goods{
  995. padding: 0 30rpx;
  996. .list{
  997. padding: 10px 0;
  998. border-bottom: 1rpx solid #e1e1e1;
  999. margin: 10rpx 0;
  1000. .image-left{
  1001. width: 86rpx;
  1002. height: 86rpx;
  1003. border: 2rpx solid #e1e1e1;
  1004. border-radius: 6rpx;
  1005. display: inline-block;
  1006. vertical-align: middle;
  1007. }
  1008. .name-right{
  1009. display: inline-block;
  1010. width: 416rpx;
  1011. margin-left: 15rpx;
  1012. font-size: 26rpx;
  1013. color: #666666;
  1014. vertical-align: middle;
  1015. word-break: break-all;
  1016. overflow: hidden;
  1017. text-overflow: ellipsis;
  1018. display: -webkit-inline-box;
  1019. -webkit-line-clamp: 2;
  1020. -webkit-box-orient: vertical;
  1021. }
  1022. }
  1023. }
  1024. .BtnAll{
  1025. margin-top: 30rpx;
  1026. .btn{
  1027. display: inline-block;
  1028. width: 290rpx;
  1029. height: 90rpx;
  1030. line-height: 90rpx;
  1031. text-align: center;
  1032. &.closebtn{
  1033. border-radius: 0px 0px 0px 10px;
  1034. color:#999999 ;
  1035. background: #efefef;
  1036. }
  1037. &.cancel{
  1038. border-radius: 0px 0px 8px 0px;
  1039. background: $btn-confirm;
  1040. color: #fff;
  1041. }
  1042. }
  1043. }
  1044. }
  1045. }
  1046. </style>