order-list.vue 29 KB

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