order-list.vue 28 KB

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